image-salon-sdk 1.0.70 → 1.0.72
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 +1108 -1106
- package/dist/image-salon-sdk.umd.cjs +2 -2
- package/package.json +1 -1
package/dist/image-salon-sdk.js
CHANGED
|
@@ -5,7 +5,7 @@ var Qn = (s) => {
|
|
|
5
5
|
};
|
|
6
6
|
var ni = (s, e, t) => e in s ? ti(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
|
|
7
7
|
var he = (s, e, t) => ni(s, typeof e != "symbol" ? e + "" : e, t), Yn = (s, e, t) => e.has(s) || Qn("Cannot " + t);
|
|
8
|
-
var E = (s, e, t) => (Yn(s, e, "read from private field"), t ? t.call(s) : e.get(s)), z = (s, e, t) => e.has(s) ? Qn("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(s) : e.set(s, t), H = (s, e, t,
|
|
8
|
+
var E = (s, e, t) => (Yn(s, e, "read from private field"), t ? t.call(s) : e.get(s)), z = (s, e, t) => e.has(s) ? Qn("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(s) : e.set(s, t), H = (s, e, t, n) => (Yn(s, e, "write to private field"), n ? n.call(s, t) : e.set(s, t), t);
|
|
9
9
|
function Ar(s) {
|
|
10
10
|
let e = typeof s;
|
|
11
11
|
if (e == "object") {
|
|
@@ -27,12 +27,12 @@ Nn[95] = yt.indexOf("/");
|
|
|
27
27
|
function kr(s) {
|
|
28
28
|
let e = s.length * 3 / 4;
|
|
29
29
|
s[s.length - 2] == "=" ? e -= 2 : s[s.length - 1] == "=" && (e -= 1);
|
|
30
|
-
let t = new Uint8Array(e),
|
|
30
|
+
let t = new Uint8Array(e), n = 0, r = 0, i, o = 0;
|
|
31
31
|
for (let a = 0; a < s.length; a++) {
|
|
32
32
|
if (i = Nn[s.charCodeAt(a)], i === void 0)
|
|
33
33
|
switch (s[a]) {
|
|
34
34
|
case "=":
|
|
35
|
-
|
|
35
|
+
r = 0;
|
|
36
36
|
case `
|
|
37
37
|
`:
|
|
38
38
|
case "\r":
|
|
@@ -42,55 +42,55 @@ function kr(s) {
|
|
|
42
42
|
default:
|
|
43
43
|
throw Error("invalid base64 string.");
|
|
44
44
|
}
|
|
45
|
-
switch (
|
|
45
|
+
switch (r) {
|
|
46
46
|
case 0:
|
|
47
|
-
o = i,
|
|
47
|
+
o = i, r = 1;
|
|
48
48
|
break;
|
|
49
49
|
case 1:
|
|
50
|
-
t[
|
|
50
|
+
t[n++] = o << 2 | (i & 48) >> 4, o = i, r = 2;
|
|
51
51
|
break;
|
|
52
52
|
case 2:
|
|
53
|
-
t[
|
|
53
|
+
t[n++] = (o & 15) << 4 | (i & 60) >> 2, o = i, r = 3;
|
|
54
54
|
break;
|
|
55
55
|
case 3:
|
|
56
|
-
t[
|
|
56
|
+
t[n++] = (o & 3) << 6 | i, r = 0;
|
|
57
57
|
break;
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
if (
|
|
60
|
+
if (r == 1)
|
|
61
61
|
throw Error("invalid base64 string.");
|
|
62
|
-
return t.subarray(0,
|
|
62
|
+
return t.subarray(0, n);
|
|
63
63
|
}
|
|
64
64
|
function Fr(s) {
|
|
65
|
-
let e = "", t = 0,
|
|
65
|
+
let e = "", t = 0, n, r = 0;
|
|
66
66
|
for (let i = 0; i < s.length; i++)
|
|
67
|
-
switch (
|
|
67
|
+
switch (n = s[i], t) {
|
|
68
68
|
case 0:
|
|
69
|
-
e += yt[
|
|
69
|
+
e += yt[n >> 2], r = (n & 3) << 4, t = 1;
|
|
70
70
|
break;
|
|
71
71
|
case 1:
|
|
72
|
-
e += yt[
|
|
72
|
+
e += yt[r | n >> 4], r = (n & 15) << 2, t = 2;
|
|
73
73
|
break;
|
|
74
74
|
case 2:
|
|
75
|
-
e += yt[
|
|
75
|
+
e += yt[r | n >> 6], e += yt[n & 63], t = 0;
|
|
76
76
|
break;
|
|
77
77
|
}
|
|
78
|
-
return t && (e += yt[
|
|
78
|
+
return t && (e += yt[r], e += "=", t == 1 && (e += "=")), e;
|
|
79
79
|
}
|
|
80
80
|
var G;
|
|
81
81
|
(function(s) {
|
|
82
|
-
s.symbol = Symbol.for("protobuf-ts/unknown"), s.onRead = (t,
|
|
83
|
-
(e(
|
|
84
|
-
}, s.onWrite = (t,
|
|
85
|
-
for (let { no: i, wireType: o, data: a } of s.list(
|
|
86
|
-
|
|
87
|
-
}, s.list = (t,
|
|
82
|
+
s.symbol = Symbol.for("protobuf-ts/unknown"), s.onRead = (t, n, r, i, o) => {
|
|
83
|
+
(e(n) ? n[s.symbol] : n[s.symbol] = []).push({ no: r, wireType: i, data: o });
|
|
84
|
+
}, s.onWrite = (t, n, r) => {
|
|
85
|
+
for (let { no: i, wireType: o, data: a } of s.list(n))
|
|
86
|
+
r.tag(i, o).raw(a);
|
|
87
|
+
}, s.list = (t, n) => {
|
|
88
88
|
if (e(t)) {
|
|
89
|
-
let
|
|
90
|
-
return
|
|
89
|
+
let r = t[s.symbol];
|
|
90
|
+
return n ? r.filter((i) => i.no == n) : r;
|
|
91
91
|
}
|
|
92
92
|
return [];
|
|
93
|
-
}, s.last = (t,
|
|
93
|
+
}, s.last = (t, n) => s.list(t, n).slice(-1)[0];
|
|
94
94
|
const e = (t) => t && Array.isArray(t[s.symbol]);
|
|
95
95
|
})(G || (G = {}));
|
|
96
96
|
function ii(s, e) {
|
|
@@ -102,17 +102,17 @@ var j;
|
|
|
102
102
|
})(j || (j = {}));
|
|
103
103
|
function si() {
|
|
104
104
|
let s = 0, e = 0;
|
|
105
|
-
for (let
|
|
106
|
-
let
|
|
107
|
-
if (s |= (
|
|
105
|
+
for (let n = 0; n < 28; n += 7) {
|
|
106
|
+
let r = this.buf[this.pos++];
|
|
107
|
+
if (s |= (r & 127) << n, !(r & 128))
|
|
108
108
|
return this.assertBounds(), [s, e];
|
|
109
109
|
}
|
|
110
110
|
let t = this.buf[this.pos++];
|
|
111
111
|
if (s |= (t & 15) << 28, e = (t & 112) >> 4, !(t & 128))
|
|
112
112
|
return this.assertBounds(), [s, e];
|
|
113
|
-
for (let
|
|
114
|
-
let
|
|
115
|
-
if (e |= (
|
|
113
|
+
for (let n = 3; n <= 31; n += 7) {
|
|
114
|
+
let r = this.buf[this.pos++];
|
|
115
|
+
if (e |= (r & 127) << n, !(r & 128))
|
|
116
116
|
return this.assertBounds(), [s, e];
|
|
117
117
|
}
|
|
118
118
|
throw new Error("invalid varint");
|
|
@@ -123,8 +123,8 @@ function Un(s, e, t) {
|
|
|
123
123
|
if (t.push(c), !a)
|
|
124
124
|
return;
|
|
125
125
|
}
|
|
126
|
-
const
|
|
127
|
-
if (t.push((
|
|
126
|
+
const n = s >>> 28 & 15 | (e & 7) << 4, r = !!(e >> 3);
|
|
127
|
+
if (t.push((r ? n | 128 : n) & 255), !!r) {
|
|
128
128
|
for (let i = 3; i < 31; i = i + 7) {
|
|
129
129
|
const o = e >>> i, a = !!(o >>> 7), c = (a ? o | 128 : o) & 255;
|
|
130
130
|
if (t.push(c), !a)
|
|
@@ -138,17 +138,17 @@ function Nr(s) {
|
|
|
138
138
|
let e = s[0] == "-";
|
|
139
139
|
e && (s = s.slice(1));
|
|
140
140
|
const t = 1e6;
|
|
141
|
-
let
|
|
141
|
+
let n = 0, r = 0;
|
|
142
142
|
function i(o, a) {
|
|
143
143
|
const c = Number(s.slice(o, a));
|
|
144
|
-
|
|
144
|
+
r *= t, n = n * t + c, n >= mn && (r = r + (n / mn | 0), n = n % mn);
|
|
145
145
|
}
|
|
146
|
-
return i(-24, -18), i(-18, -12), i(-12, -6), i(-6), [e,
|
|
146
|
+
return i(-24, -18), i(-18, -12), i(-12, -6), i(-6), [e, n, r];
|
|
147
147
|
}
|
|
148
148
|
function Hn(s, e) {
|
|
149
149
|
if (e >>> 0 <= 2097151)
|
|
150
150
|
return "" + (mn * e + (s >>> 0));
|
|
151
|
-
let t = s & 16777215,
|
|
151
|
+
let t = s & 16777215, n = (s >>> 24 | e << 8) >>> 0 & 16777215, r = e >> 16 & 65535, i = t + n * 6777216 + r * 6710656, o = n + r * 8147497, a = r * 2, c = 1e7;
|
|
152
152
|
i >= c && (o += Math.floor(i / c), i %= c), o >= c && (a += Math.floor(o / c), o %= c);
|
|
153
153
|
function d(l, u) {
|
|
154
154
|
let h = l ? String(l) : "";
|
|
@@ -272,10 +272,10 @@ class Se extends Lr {
|
|
|
272
272
|
return this.ZERO;
|
|
273
273
|
if (e = e.trim(), !Tr.test(e))
|
|
274
274
|
throw new Error("string is no integer");
|
|
275
|
-
let [t,
|
|
275
|
+
let [t, n, r] = Nr(e);
|
|
276
276
|
if (t)
|
|
277
277
|
throw new Error("signed value for ulong");
|
|
278
|
-
return new Se(
|
|
278
|
+
return new Se(n, r);
|
|
279
279
|
case "number":
|
|
280
280
|
if (e == 0)
|
|
281
281
|
return this.ZERO;
|
|
@@ -334,13 +334,13 @@ class Ee extends Lr {
|
|
|
334
334
|
return this.ZERO;
|
|
335
335
|
if (e = e.trim(), !Tr.test(e))
|
|
336
336
|
throw new Error("string is no integer");
|
|
337
|
-
let [t,
|
|
337
|
+
let [t, n, r] = Nr(e);
|
|
338
338
|
if (t) {
|
|
339
|
-
if (
|
|
339
|
+
if (r > dn || r == dn && n != 0)
|
|
340
340
|
throw new Error("signed long too small");
|
|
341
|
-
} else if (
|
|
341
|
+
} else if (r >= dn)
|
|
342
342
|
throw new Error("signed long too large");
|
|
343
|
-
let i = new Ee(
|
|
343
|
+
let i = new Ee(n, r);
|
|
344
344
|
return t ? i.negate() : i;
|
|
345
345
|
case "number":
|
|
346
346
|
if (e == 0)
|
|
@@ -403,10 +403,10 @@ class ci {
|
|
|
403
403
|
* Reads a tag - field number and wire type.
|
|
404
404
|
*/
|
|
405
405
|
tag() {
|
|
406
|
-
let e = this.uint32(), t = e >>> 3,
|
|
407
|
-
if (t <= 0 ||
|
|
408
|
-
throw new Error("illegal tag: field no " + t + " wire type " +
|
|
409
|
-
return [t,
|
|
406
|
+
let e = this.uint32(), t = e >>> 3, n = e & 7;
|
|
407
|
+
if (t <= 0 || n < 0 || n > 5)
|
|
408
|
+
throw new Error("illegal tag: field no " + t + " wire type " + n);
|
|
409
|
+
return [t, n];
|
|
410
410
|
}
|
|
411
411
|
/**
|
|
412
412
|
* Skip one element on the wire and return the skipped data.
|
|
@@ -425,13 +425,13 @@ class ci {
|
|
|
425
425
|
this.pos += 4;
|
|
426
426
|
break;
|
|
427
427
|
case j.LengthDelimited:
|
|
428
|
-
let
|
|
429
|
-
this.pos +=
|
|
428
|
+
let n = this.uint32();
|
|
429
|
+
this.pos += n;
|
|
430
430
|
break;
|
|
431
431
|
case j.StartGroup:
|
|
432
|
-
let
|
|
433
|
-
for (; (
|
|
434
|
-
this.skip(
|
|
432
|
+
let r;
|
|
433
|
+
for (; (r = this.tag()[1]) !== j.EndGroup; )
|
|
434
|
+
this.skip(r);
|
|
435
435
|
break;
|
|
436
436
|
default:
|
|
437
437
|
throw new Error("cant skip wire type " + e);
|
|
@@ -474,8 +474,8 @@ class ci {
|
|
|
474
474
|
* Read a `sint64` field, a signed, zig-zag-encoded 64-bit varint.
|
|
475
475
|
*/
|
|
476
476
|
sint64() {
|
|
477
|
-
let [e, t] = this.varint64(),
|
|
478
|
-
return e = (e >>> 1 | (t & 1) << 31) ^
|
|
477
|
+
let [e, t] = this.varint64(), n = -(e & 1);
|
|
478
|
+
return e = (e >>> 1 | (t & 1) << 31) ^ n, t = t >>> 1 ^ n, new Ee(e, t);
|
|
479
479
|
}
|
|
480
480
|
/**
|
|
481
481
|
* Read a `bool` field, a variant.
|
|
@@ -574,11 +574,11 @@ class gi {
|
|
|
574
574
|
finish() {
|
|
575
575
|
this.chunks.push(new Uint8Array(this.buf));
|
|
576
576
|
let e = 0;
|
|
577
|
-
for (let
|
|
578
|
-
e += this.chunks[
|
|
579
|
-
let t = new Uint8Array(e),
|
|
580
|
-
for (let
|
|
581
|
-
t.set(this.chunks[
|
|
577
|
+
for (let r = 0; r < this.chunks.length; r++)
|
|
578
|
+
e += this.chunks[r].length;
|
|
579
|
+
let t = new Uint8Array(e), n = 0;
|
|
580
|
+
for (let r = 0; r < this.chunks.length; r++)
|
|
581
|
+
t.set(this.chunks[r], n), n += this.chunks[r].length;
|
|
582
582
|
return this.chunks = [], t;
|
|
583
583
|
}
|
|
584
584
|
/**
|
|
@@ -690,15 +690,15 @@ class gi {
|
|
|
690
690
|
* Write a `fixed64` value, a signed, fixed-length 64-bit integer.
|
|
691
691
|
*/
|
|
692
692
|
sfixed64(e) {
|
|
693
|
-
let t = new Uint8Array(8),
|
|
694
|
-
return
|
|
693
|
+
let t = new Uint8Array(8), n = new DataView(t.buffer), r = Ee.from(e);
|
|
694
|
+
return n.setInt32(0, r.lo, !0), n.setInt32(4, r.hi, !0), this.raw(t);
|
|
695
695
|
}
|
|
696
696
|
/**
|
|
697
697
|
* Write a `fixed64` value, an unsigned, fixed-length 64 bit integer.
|
|
698
698
|
*/
|
|
699
699
|
fixed64(e) {
|
|
700
|
-
let t = new Uint8Array(8),
|
|
701
|
-
return
|
|
700
|
+
let t = new Uint8Array(8), n = new DataView(t.buffer), r = Se.from(e);
|
|
701
|
+
return n.setInt32(0, r.lo, !0), n.setInt32(4, r.hi, !0), this.raw(t);
|
|
702
702
|
}
|
|
703
703
|
/**
|
|
704
704
|
* Write a `int64` value, a signed 64-bit varint.
|
|
@@ -711,8 +711,8 @@ class gi {
|
|
|
711
711
|
* Write a `sint64` value, a signed, zig-zag-encoded 64-bit varint.
|
|
712
712
|
*/
|
|
713
713
|
sint64(e) {
|
|
714
|
-
let t = Ee.from(e),
|
|
715
|
-
return Un(
|
|
714
|
+
let t = Ee.from(e), n = t.hi >> 31, r = t.lo << 1 ^ n, i = (t.hi << 1 | t.lo >>> 31) ^ n;
|
|
715
|
+
return Un(r, i, this.buf), this;
|
|
716
716
|
}
|
|
717
717
|
/**
|
|
718
718
|
* Write a `uint64` value, an unsigned 64-bit varint.
|
|
@@ -737,17 +737,17 @@ function yi(s) {
|
|
|
737
737
|
return s ? Object.assign(Object.assign({}, rr), s) : rr;
|
|
738
738
|
}
|
|
739
739
|
function bi(s, e) {
|
|
740
|
-
var t,
|
|
741
|
-
let
|
|
742
|
-
return
|
|
740
|
+
var t, n;
|
|
741
|
+
let r = Object.assign(Object.assign({}, s), e);
|
|
742
|
+
return r.typeRegistry = [...(t = s == null ? void 0 : s.typeRegistry) !== null && t !== void 0 ? t : [], ...(n = e == null ? void 0 : e.typeRegistry) !== null && n !== void 0 ? n : []], r;
|
|
743
743
|
}
|
|
744
744
|
const Ur = Symbol.for("protobuf-ts/message-type");
|
|
745
745
|
function $n(s) {
|
|
746
746
|
let e = !1;
|
|
747
747
|
const t = [];
|
|
748
|
-
for (let
|
|
749
|
-
let
|
|
750
|
-
|
|
748
|
+
for (let n = 0; n < s.length; n++) {
|
|
749
|
+
let r = s.charAt(n);
|
|
750
|
+
r == "_" ? e = !0 : /\d/.test(r) ? (t.push(r), e = !0) : e ? (t.push(r.toUpperCase()), e = !1) : n == 0 ? t.push(r.toLowerCase()) : t.push(r);
|
|
751
751
|
}
|
|
752
752
|
return t.join("");
|
|
753
753
|
}
|
|
@@ -764,8 +764,8 @@ var bn;
|
|
|
764
764
|
s[s.NO = 0] = "NO", s[s.PACKED = 1] = "PACKED", s[s.UNPACKED = 2] = "UNPACKED";
|
|
765
765
|
})(bn || (bn = {}));
|
|
766
766
|
function Ci(s) {
|
|
767
|
-
var e, t,
|
|
768
|
-
return s.localName = (e = s.localName) !== null && e !== void 0 ? e : $n(s.name), s.jsonName = (t = s.jsonName) !== null && t !== void 0 ? t : $n(s.name), s.repeat = (
|
|
767
|
+
var e, t, n, r;
|
|
768
|
+
return s.localName = (e = s.localName) !== null && e !== void 0 ? e : $n(s.name), s.jsonName = (t = s.jsonName) !== null && t !== void 0 ? t : $n(s.name), s.repeat = (n = s.repeat) !== null && n !== void 0 ? n : bn.NO, s.opt = (r = s.opt) !== null && r !== void 0 ? r : s.repeat || s.oneof ? !1 : s.kind == "message", s;
|
|
769
769
|
}
|
|
770
770
|
function Ei(s) {
|
|
771
771
|
if (typeof s != "object" || s === null || !s.hasOwnProperty("oneofKind"))
|
|
@@ -787,24 +787,24 @@ class vi {
|
|
|
787
787
|
prepare() {
|
|
788
788
|
if (this.data)
|
|
789
789
|
return;
|
|
790
|
-
const e = [], t = [],
|
|
791
|
-
for (let
|
|
792
|
-
if (
|
|
793
|
-
|
|
790
|
+
const e = [], t = [], n = [];
|
|
791
|
+
for (let r of this.fields)
|
|
792
|
+
if (r.oneof)
|
|
793
|
+
n.includes(r.oneof) || (n.push(r.oneof), e.push(r.oneof), t.push(r.oneof));
|
|
794
794
|
else
|
|
795
|
-
switch (t.push(
|
|
795
|
+
switch (t.push(r.localName), r.kind) {
|
|
796
796
|
case "scalar":
|
|
797
797
|
case "enum":
|
|
798
|
-
(!
|
|
798
|
+
(!r.opt || r.repeat) && e.push(r.localName);
|
|
799
799
|
break;
|
|
800
800
|
case "message":
|
|
801
|
-
|
|
801
|
+
r.repeat && e.push(r.localName);
|
|
802
802
|
break;
|
|
803
803
|
case "map":
|
|
804
|
-
e.push(
|
|
804
|
+
e.push(r.localName);
|
|
805
805
|
break;
|
|
806
806
|
}
|
|
807
|
-
this.data = { req: e, known: t, oneofs: Object.values(
|
|
807
|
+
this.data = { req: e, known: t, oneofs: Object.values(n) };
|
|
808
808
|
}
|
|
809
809
|
/**
|
|
810
810
|
* Is the argument a valid message as specified by the
|
|
@@ -826,14 +826,14 @@ class vi {
|
|
|
826
826
|
* The number of map entries / repeated values being checked
|
|
827
827
|
* is < depth.
|
|
828
828
|
*/
|
|
829
|
-
is(e, t,
|
|
829
|
+
is(e, t, n = !1) {
|
|
830
830
|
if (t < 0)
|
|
831
831
|
return !0;
|
|
832
832
|
if (e == null || typeof e != "object")
|
|
833
833
|
return !1;
|
|
834
834
|
this.prepare();
|
|
835
|
-
let
|
|
836
|
-
if (
|
|
835
|
+
let r = Object.keys(e), i = this.data;
|
|
836
|
+
if (r.length < i.req.length || i.req.some((o) => !r.includes(o)) || !n && r.some((o) => !i.known.includes(o)))
|
|
837
837
|
return !1;
|
|
838
838
|
if (t < 1)
|
|
839
839
|
return !0;
|
|
@@ -844,114 +844,114 @@ class vi {
|
|
|
844
844
|
if (a.oneofKind === void 0)
|
|
845
845
|
continue;
|
|
846
846
|
const c = this.fields.find((d) => d.localName === a.oneofKind);
|
|
847
|
-
if (!c || !this.field(a[a.oneofKind], c,
|
|
847
|
+
if (!c || !this.field(a[a.oneofKind], c, n, t))
|
|
848
848
|
return !1;
|
|
849
849
|
}
|
|
850
850
|
for (const o of this.fields)
|
|
851
|
-
if (o.oneof === void 0 && !this.field(e[o.localName], o,
|
|
851
|
+
if (o.oneof === void 0 && !this.field(e[o.localName], o, n, t))
|
|
852
852
|
return !1;
|
|
853
853
|
return !0;
|
|
854
854
|
}
|
|
855
|
-
field(e, t,
|
|
855
|
+
field(e, t, n, r) {
|
|
856
856
|
let i = t.repeat;
|
|
857
857
|
switch (t.kind) {
|
|
858
858
|
case "scalar":
|
|
859
|
-
return e === void 0 ? t.opt : i ? this.scalars(e, t.T,
|
|
859
|
+
return e === void 0 ? t.opt : i ? this.scalars(e, t.T, r, t.L) : this.scalar(e, t.T, t.L);
|
|
860
860
|
case "enum":
|
|
861
|
-
return e === void 0 ? t.opt : i ? this.scalars(e, D.INT32,
|
|
861
|
+
return e === void 0 ? t.opt : i ? this.scalars(e, D.INT32, r) : this.scalar(e, D.INT32);
|
|
862
862
|
case "message":
|
|
863
|
-
return e === void 0 ? !0 : i ? this.messages(e, t.T(),
|
|
863
|
+
return e === void 0 ? !0 : i ? this.messages(e, t.T(), n, r) : this.message(e, t.T(), n, r);
|
|
864
864
|
case "map":
|
|
865
865
|
if (typeof e != "object" || e === null)
|
|
866
866
|
return !1;
|
|
867
|
-
if (
|
|
867
|
+
if (r < 2)
|
|
868
868
|
return !0;
|
|
869
|
-
if (!this.mapKeys(e, t.K,
|
|
869
|
+
if (!this.mapKeys(e, t.K, r))
|
|
870
870
|
return !1;
|
|
871
871
|
switch (t.V.kind) {
|
|
872
872
|
case "scalar":
|
|
873
|
-
return this.scalars(Object.values(e), t.V.T,
|
|
873
|
+
return this.scalars(Object.values(e), t.V.T, r, t.V.L);
|
|
874
874
|
case "enum":
|
|
875
|
-
return this.scalars(Object.values(e), D.INT32,
|
|
875
|
+
return this.scalars(Object.values(e), D.INT32, r);
|
|
876
876
|
case "message":
|
|
877
|
-
return this.messages(Object.values(e), t.V.T(),
|
|
877
|
+
return this.messages(Object.values(e), t.V.T(), n, r);
|
|
878
878
|
}
|
|
879
879
|
break;
|
|
880
880
|
}
|
|
881
881
|
return !0;
|
|
882
882
|
}
|
|
883
|
-
message(e, t,
|
|
884
|
-
return
|
|
883
|
+
message(e, t, n, r) {
|
|
884
|
+
return n ? t.isAssignable(e, r) : t.is(e, r);
|
|
885
885
|
}
|
|
886
|
-
messages(e, t,
|
|
886
|
+
messages(e, t, n, r) {
|
|
887
887
|
if (!Array.isArray(e))
|
|
888
888
|
return !1;
|
|
889
|
-
if (
|
|
889
|
+
if (r < 2)
|
|
890
890
|
return !0;
|
|
891
|
-
if (
|
|
892
|
-
for (let i = 0; i < e.length && i <
|
|
893
|
-
if (!t.isAssignable(e[i],
|
|
891
|
+
if (n) {
|
|
892
|
+
for (let i = 0; i < e.length && i < r; i++)
|
|
893
|
+
if (!t.isAssignable(e[i], r - 1))
|
|
894
894
|
return !1;
|
|
895
895
|
} else
|
|
896
|
-
for (let i = 0; i < e.length && i <
|
|
897
|
-
if (!t.is(e[i],
|
|
896
|
+
for (let i = 0; i < e.length && i < r; i++)
|
|
897
|
+
if (!t.is(e[i], r - 1))
|
|
898
898
|
return !1;
|
|
899
899
|
return !0;
|
|
900
900
|
}
|
|
901
|
-
scalar(e, t,
|
|
902
|
-
let
|
|
901
|
+
scalar(e, t, n) {
|
|
902
|
+
let r = typeof e;
|
|
903
903
|
switch (t) {
|
|
904
904
|
case D.UINT64:
|
|
905
905
|
case D.FIXED64:
|
|
906
906
|
case D.INT64:
|
|
907
907
|
case D.SFIXED64:
|
|
908
908
|
case D.SINT64:
|
|
909
|
-
switch (
|
|
909
|
+
switch (n) {
|
|
910
910
|
case ht.BIGINT:
|
|
911
|
-
return
|
|
911
|
+
return r == "bigint";
|
|
912
912
|
case ht.NUMBER:
|
|
913
|
-
return
|
|
913
|
+
return r == "number" && !isNaN(e);
|
|
914
914
|
default:
|
|
915
|
-
return
|
|
915
|
+
return r == "string";
|
|
916
916
|
}
|
|
917
917
|
case D.BOOL:
|
|
918
|
-
return
|
|
918
|
+
return r == "boolean";
|
|
919
919
|
case D.STRING:
|
|
920
|
-
return
|
|
920
|
+
return r == "string";
|
|
921
921
|
case D.BYTES:
|
|
922
922
|
return e instanceof Uint8Array;
|
|
923
923
|
case D.DOUBLE:
|
|
924
924
|
case D.FLOAT:
|
|
925
|
-
return
|
|
925
|
+
return r == "number" && !isNaN(e);
|
|
926
926
|
default:
|
|
927
|
-
return
|
|
927
|
+
return r == "number" && Number.isInteger(e);
|
|
928
928
|
}
|
|
929
929
|
}
|
|
930
|
-
scalars(e, t,
|
|
930
|
+
scalars(e, t, n, r) {
|
|
931
931
|
if (!Array.isArray(e))
|
|
932
932
|
return !1;
|
|
933
|
-
if (
|
|
933
|
+
if (n < 2)
|
|
934
934
|
return !0;
|
|
935
935
|
if (Array.isArray(e)) {
|
|
936
|
-
for (let i = 0; i < e.length && i <
|
|
937
|
-
if (!this.scalar(e[i], t,
|
|
936
|
+
for (let i = 0; i < e.length && i < n; i++)
|
|
937
|
+
if (!this.scalar(e[i], t, r))
|
|
938
938
|
return !1;
|
|
939
939
|
}
|
|
940
940
|
return !0;
|
|
941
941
|
}
|
|
942
|
-
mapKeys(e, t,
|
|
943
|
-
let
|
|
942
|
+
mapKeys(e, t, n) {
|
|
943
|
+
let r = Object.keys(e);
|
|
944
944
|
switch (t) {
|
|
945
945
|
case D.INT32:
|
|
946
946
|
case D.FIXED32:
|
|
947
947
|
case D.SFIXED32:
|
|
948
948
|
case D.SINT32:
|
|
949
949
|
case D.UINT32:
|
|
950
|
-
return this.scalars(
|
|
950
|
+
return this.scalars(r.slice(0, n).map((i) => parseInt(i)), t, n);
|
|
951
951
|
case D.BOOL:
|
|
952
|
-
return this.scalars(
|
|
952
|
+
return this.scalars(r.slice(0, n).map((i) => i == "true" ? !0 : i == "false" ? !1 : i), t, n);
|
|
953
953
|
default:
|
|
954
|
-
return this.scalars(
|
|
954
|
+
return this.scalars(r, t, n, ht.STRING);
|
|
955
955
|
}
|
|
956
956
|
}
|
|
957
957
|
}
|
|
@@ -974,15 +974,15 @@ class Ai {
|
|
|
974
974
|
if (this.fMap === void 0) {
|
|
975
975
|
this.fMap = {};
|
|
976
976
|
const t = (e = this.info.fields) !== null && e !== void 0 ? e : [];
|
|
977
|
-
for (const
|
|
978
|
-
this.fMap[
|
|
977
|
+
for (const n of t)
|
|
978
|
+
this.fMap[n.name] = n, this.fMap[n.jsonName] = n, this.fMap[n.localName] = n;
|
|
979
979
|
}
|
|
980
980
|
}
|
|
981
981
|
// Cannot parse JSON <type of jsonValue> for <type name>#<fieldName>.
|
|
982
|
-
assert(e, t,
|
|
982
|
+
assert(e, t, n) {
|
|
983
983
|
if (!e) {
|
|
984
|
-
let
|
|
985
|
-
throw (
|
|
984
|
+
let r = Ar(n);
|
|
985
|
+
throw (r == "number" || r == "boolean") && (r = n.toString()), new Error(`Cannot parse JSON ${r} for ${this.info.typeName}#${t}`);
|
|
986
986
|
}
|
|
987
987
|
}
|
|
988
988
|
/**
|
|
@@ -994,13 +994,13 @@ class Ai {
|
|
|
994
994
|
* If a message field is already present, it will be merged with the
|
|
995
995
|
* new data.
|
|
996
996
|
*/
|
|
997
|
-
read(e, t,
|
|
997
|
+
read(e, t, n) {
|
|
998
998
|
this.prepare();
|
|
999
|
-
const
|
|
999
|
+
const r = [];
|
|
1000
1000
|
for (const [i, o] of Object.entries(e)) {
|
|
1001
1001
|
const a = this.fMap[i];
|
|
1002
1002
|
if (!a) {
|
|
1003
|
-
if (!
|
|
1003
|
+
if (!n.ignoreUnknownFields)
|
|
1004
1004
|
throw new Error(`Found unknown field while reading ${this.info.typeName} from JSON format. JSON key: ${i}`);
|
|
1005
1005
|
continue;
|
|
1006
1006
|
}
|
|
@@ -1009,9 +1009,9 @@ class Ai {
|
|
|
1009
1009
|
if (a.oneof) {
|
|
1010
1010
|
if (o === null && (a.kind !== "enum" || a.T()[0] !== "google.protobuf.NullValue"))
|
|
1011
1011
|
continue;
|
|
1012
|
-
if (
|
|
1012
|
+
if (r.includes(a.oneof))
|
|
1013
1013
|
throw new Error(`Multiple members of the oneof group "${a.oneof}" of ${this.info.typeName} are present in JSON.`);
|
|
1014
|
-
|
|
1014
|
+
r.push(a.oneof), d = t[a.oneof] = {
|
|
1015
1015
|
oneofKind: c
|
|
1016
1016
|
};
|
|
1017
1017
|
} else
|
|
@@ -1026,10 +1026,10 @@ class Ai {
|
|
|
1026
1026
|
let f;
|
|
1027
1027
|
switch (a.V.kind) {
|
|
1028
1028
|
case "message":
|
|
1029
|
-
f = a.V.T().internalJsonRead(h,
|
|
1029
|
+
f = a.V.T().internalJsonRead(h, n);
|
|
1030
1030
|
break;
|
|
1031
1031
|
case "enum":
|
|
1032
|
-
if (f = this.enum(a.V.T(), h, a.name,
|
|
1032
|
+
if (f = this.enum(a.V.T(), h, a.name, n.ignoreUnknownFields), f === !1)
|
|
1033
1033
|
continue;
|
|
1034
1034
|
break;
|
|
1035
1035
|
case "scalar":
|
|
@@ -1050,10 +1050,10 @@ class Ai {
|
|
|
1050
1050
|
let h;
|
|
1051
1051
|
switch (a.kind) {
|
|
1052
1052
|
case "message":
|
|
1053
|
-
h = a.T().internalJsonRead(u,
|
|
1053
|
+
h = a.T().internalJsonRead(u, n);
|
|
1054
1054
|
break;
|
|
1055
1055
|
case "enum":
|
|
1056
|
-
if (h = this.enum(a.T(), u, a.name,
|
|
1056
|
+
if (h = this.enum(a.T(), u, a.name, n.ignoreUnknownFields), h === !1)
|
|
1057
1057
|
continue;
|
|
1058
1058
|
break;
|
|
1059
1059
|
case "scalar":
|
|
@@ -1069,10 +1069,10 @@ class Ai {
|
|
|
1069
1069
|
this.assert(a.oneof === void 0, a.name + " (oneof member)", null);
|
|
1070
1070
|
continue;
|
|
1071
1071
|
}
|
|
1072
|
-
d[c] = a.T().internalJsonRead(o,
|
|
1072
|
+
d[c] = a.T().internalJsonRead(o, n, d[c]);
|
|
1073
1073
|
break;
|
|
1074
1074
|
case "enum":
|
|
1075
|
-
let l = this.enum(a.T(), o, a.name,
|
|
1075
|
+
let l = this.enum(a.T(), o, a.name, n.ignoreUnknownFields);
|
|
1076
1076
|
if (l === !1)
|
|
1077
1077
|
continue;
|
|
1078
1078
|
d[c] = l;
|
|
@@ -1088,21 +1088,21 @@ class Ai {
|
|
|
1088
1088
|
*
|
|
1089
1089
|
* google.protobuf.NullValue accepts only JSON `null` (or the old `"NULL_VALUE"`).
|
|
1090
1090
|
*/
|
|
1091
|
-
enum(e, t,
|
|
1092
|
-
if (e[0] == "google.protobuf.NullValue" && J(t === null || t === "NULL_VALUE", `Unable to parse field ${this.info.typeName}#${
|
|
1091
|
+
enum(e, t, n, r) {
|
|
1092
|
+
if (e[0] == "google.protobuf.NullValue" && J(t === null || t === "NULL_VALUE", `Unable to parse field ${this.info.typeName}#${n}, enum ${e[0]} only accepts null.`), t === null)
|
|
1093
1093
|
return 0;
|
|
1094
1094
|
switch (typeof t) {
|
|
1095
1095
|
case "number":
|
|
1096
|
-
return J(Number.isInteger(t), `Unable to parse field ${this.info.typeName}#${
|
|
1096
|
+
return J(Number.isInteger(t), `Unable to parse field ${this.info.typeName}#${n}, enum can only be integral number, got ${t}.`), t;
|
|
1097
1097
|
case "string":
|
|
1098
1098
|
let i = t;
|
|
1099
1099
|
e[2] && t.substring(0, e[2].length) === e[2] && (i = t.substring(e[2].length));
|
|
1100
1100
|
let o = e[1][i];
|
|
1101
|
-
return typeof o > "u" &&
|
|
1101
|
+
return typeof o > "u" && r ? !1 : (J(typeof o == "number", `Unable to parse field ${this.info.typeName}#${n}, enum ${e[0]} has no value for "${t}".`), o);
|
|
1102
1102
|
}
|
|
1103
|
-
J(!1, `Unable to parse field ${this.info.typeName}#${
|
|
1103
|
+
J(!1, `Unable to parse field ${this.info.typeName}#${n}, cannot parse enum value from ${typeof t}".`);
|
|
1104
1104
|
}
|
|
1105
|
-
scalar(e, t,
|
|
1105
|
+
scalar(e, t, n, r) {
|
|
1106
1106
|
let i;
|
|
1107
1107
|
try {
|
|
1108
1108
|
switch (t) {
|
|
@@ -1151,17 +1151,17 @@ class Ai {
|
|
|
1151
1151
|
case D.SFIXED64:
|
|
1152
1152
|
case D.SINT64:
|
|
1153
1153
|
if (e === null)
|
|
1154
|
-
return Qe(Ee.ZERO,
|
|
1154
|
+
return Qe(Ee.ZERO, n);
|
|
1155
1155
|
if (typeof e != "number" && typeof e != "string")
|
|
1156
1156
|
break;
|
|
1157
|
-
return Qe(Ee.from(e),
|
|
1157
|
+
return Qe(Ee.from(e), n);
|
|
1158
1158
|
case D.FIXED64:
|
|
1159
1159
|
case D.UINT64:
|
|
1160
1160
|
if (e === null)
|
|
1161
|
-
return Qe(Se.ZERO,
|
|
1161
|
+
return Qe(Se.ZERO, n);
|
|
1162
1162
|
if (typeof e != "number" && typeof e != "string")
|
|
1163
1163
|
break;
|
|
1164
|
-
return Qe(Se.from(e),
|
|
1164
|
+
return Qe(Se.from(e), n);
|
|
1165
1165
|
case D.BOOL:
|
|
1166
1166
|
if (e === null)
|
|
1167
1167
|
return !1;
|
|
@@ -1192,7 +1192,7 @@ class Ai {
|
|
|
1192
1192
|
} catch (o) {
|
|
1193
1193
|
i = o.message;
|
|
1194
1194
|
}
|
|
1195
|
-
this.assert(!1,
|
|
1195
|
+
this.assert(!1, r + (i ? " - " + i : ""), e);
|
|
1196
1196
|
}
|
|
1197
1197
|
}
|
|
1198
1198
|
class ki {
|
|
@@ -1204,24 +1204,24 @@ class ki {
|
|
|
1204
1204
|
* Converts the message to a JSON object, based on the field descriptors.
|
|
1205
1205
|
*/
|
|
1206
1206
|
write(e, t) {
|
|
1207
|
-
const
|
|
1207
|
+
const n = {}, r = e;
|
|
1208
1208
|
for (const i of this.fields) {
|
|
1209
1209
|
if (!i.oneof) {
|
|
1210
|
-
let d = this.field(i,
|
|
1211
|
-
d !== void 0 && (
|
|
1210
|
+
let d = this.field(i, r[i.localName], t);
|
|
1211
|
+
d !== void 0 && (n[t.useProtoFieldName ? i.name : i.jsonName] = d);
|
|
1212
1212
|
continue;
|
|
1213
1213
|
}
|
|
1214
|
-
const o =
|
|
1214
|
+
const o = r[i.oneof];
|
|
1215
1215
|
if (o.oneofKind !== i.localName)
|
|
1216
1216
|
continue;
|
|
1217
1217
|
const a = i.kind == "scalar" || i.kind == "enum" ? Object.assign(Object.assign({}, t), { emitDefaultValues: !0 }) : t;
|
|
1218
1218
|
let c = this.field(i, o[i.localName], a);
|
|
1219
|
-
J(c !== void 0),
|
|
1219
|
+
J(c !== void 0), n[t.useProtoFieldName ? i.name : i.jsonName] = c;
|
|
1220
1220
|
}
|
|
1221
|
-
return
|
|
1221
|
+
return n;
|
|
1222
1222
|
}
|
|
1223
|
-
field(e, t,
|
|
1224
|
-
let
|
|
1223
|
+
field(e, t, n) {
|
|
1224
|
+
let r;
|
|
1225
1225
|
if (e.kind == "map") {
|
|
1226
1226
|
J(typeof t == "object" && t !== null);
|
|
1227
1227
|
const i = {};
|
|
@@ -1235,7 +1235,7 @@ class ki {
|
|
|
1235
1235
|
case "message":
|
|
1236
1236
|
const o = e.V.T();
|
|
1237
1237
|
for (const [c, d] of Object.entries(t)) {
|
|
1238
|
-
const l = this.message(o, d, e.name,
|
|
1238
|
+
const l = this.message(o, d, e.name, n);
|
|
1239
1239
|
J(l !== void 0), i[c.toString()] = l;
|
|
1240
1240
|
}
|
|
1241
1241
|
break;
|
|
@@ -1243,12 +1243,12 @@ class ki {
|
|
|
1243
1243
|
const a = e.V.T();
|
|
1244
1244
|
for (const [c, d] of Object.entries(t)) {
|
|
1245
1245
|
J(d === void 0 || typeof d == "number");
|
|
1246
|
-
const l = this.enum(a, d, e.name, !1, !0,
|
|
1246
|
+
const l = this.enum(a, d, e.name, !1, !0, n.enumAsInteger);
|
|
1247
1247
|
J(l !== void 0), i[c.toString()] = l;
|
|
1248
1248
|
}
|
|
1249
1249
|
break;
|
|
1250
1250
|
}
|
|
1251
|
-
(
|
|
1251
|
+
(n.emitDefaultValues || Object.keys(i).length > 0) && (r = i);
|
|
1252
1252
|
} else if (e.repeat) {
|
|
1253
1253
|
J(Array.isArray(t));
|
|
1254
1254
|
const i = [];
|
|
@@ -1263,55 +1263,55 @@ class ki {
|
|
|
1263
1263
|
const o = e.T();
|
|
1264
1264
|
for (let c = 0; c < t.length; c++) {
|
|
1265
1265
|
J(t[c] === void 0 || typeof t[c] == "number");
|
|
1266
|
-
const d = this.enum(o, t[c], e.name, e.opt, !0,
|
|
1266
|
+
const d = this.enum(o, t[c], e.name, e.opt, !0, n.enumAsInteger);
|
|
1267
1267
|
J(d !== void 0), i.push(d);
|
|
1268
1268
|
}
|
|
1269
1269
|
break;
|
|
1270
1270
|
case "message":
|
|
1271
1271
|
const a = e.T();
|
|
1272
1272
|
for (let c = 0; c < t.length; c++) {
|
|
1273
|
-
const d = this.message(a, t[c], e.name,
|
|
1273
|
+
const d = this.message(a, t[c], e.name, n);
|
|
1274
1274
|
J(d !== void 0), i.push(d);
|
|
1275
1275
|
}
|
|
1276
1276
|
break;
|
|
1277
1277
|
}
|
|
1278
|
-
(
|
|
1278
|
+
(n.emitDefaultValues || i.length > 0 || n.emitDefaultValues) && (r = i);
|
|
1279
1279
|
} else
|
|
1280
1280
|
switch (e.kind) {
|
|
1281
1281
|
case "scalar":
|
|
1282
|
-
|
|
1282
|
+
r = this.scalar(e.T, t, e.name, e.opt, n.emitDefaultValues);
|
|
1283
1283
|
break;
|
|
1284
1284
|
case "enum":
|
|
1285
|
-
|
|
1285
|
+
r = this.enum(e.T(), t, e.name, e.opt, n.emitDefaultValues, n.enumAsInteger);
|
|
1286
1286
|
break;
|
|
1287
1287
|
case "message":
|
|
1288
|
-
|
|
1288
|
+
r = this.message(e.T(), t, e.name, n);
|
|
1289
1289
|
break;
|
|
1290
1290
|
}
|
|
1291
|
-
return
|
|
1291
|
+
return r;
|
|
1292
1292
|
}
|
|
1293
1293
|
/**
|
|
1294
1294
|
* Returns `null` as the default for google.protobuf.NullValue.
|
|
1295
1295
|
*/
|
|
1296
|
-
enum(e, t,
|
|
1296
|
+
enum(e, t, n, r, i, o) {
|
|
1297
1297
|
if (e[0] == "google.protobuf.NullValue")
|
|
1298
|
-
return !i && !
|
|
1298
|
+
return !i && !r ? void 0 : null;
|
|
1299
1299
|
if (t === void 0) {
|
|
1300
|
-
J(
|
|
1300
|
+
J(r);
|
|
1301
1301
|
return;
|
|
1302
1302
|
}
|
|
1303
|
-
if (!(t === 0 && !i && !
|
|
1303
|
+
if (!(t === 0 && !i && !r))
|
|
1304
1304
|
return J(typeof t == "number"), J(Number.isInteger(t)), o || !e[1].hasOwnProperty(t) ? t : e[2] ? e[2] + e[1][t] : e[1][t];
|
|
1305
1305
|
}
|
|
1306
|
-
message(e, t,
|
|
1307
|
-
return t === void 0 ?
|
|
1306
|
+
message(e, t, n, r) {
|
|
1307
|
+
return t === void 0 ? r.emitDefaultValues ? null : void 0 : e.internalJsonWrite(t, r);
|
|
1308
1308
|
}
|
|
1309
|
-
scalar(e, t,
|
|
1309
|
+
scalar(e, t, n, r, i) {
|
|
1310
1310
|
if (t === void 0) {
|
|
1311
|
-
J(
|
|
1311
|
+
J(r);
|
|
1312
1312
|
return;
|
|
1313
1313
|
}
|
|
1314
|
-
const o = i ||
|
|
1314
|
+
const o = i || r;
|
|
1315
1315
|
switch (e) {
|
|
1316
1316
|
case D.INT32:
|
|
1317
1317
|
case D.SFIXED32:
|
|
@@ -1374,7 +1374,7 @@ class Fi {
|
|
|
1374
1374
|
var e;
|
|
1375
1375
|
if (!this.fieldNoToField) {
|
|
1376
1376
|
const t = (e = this.info.fields) !== null && e !== void 0 ? e : [];
|
|
1377
|
-
this.fieldNoToField = new Map(t.map((
|
|
1377
|
+
this.fieldNoToField = new Map(t.map((n) => [n.no, n]));
|
|
1378
1378
|
}
|
|
1379
1379
|
}
|
|
1380
1380
|
/**
|
|
@@ -1386,13 +1386,13 @@ class Fi {
|
|
|
1386
1386
|
* If a message field is already present, it will be merged with the
|
|
1387
1387
|
* new data.
|
|
1388
1388
|
*/
|
|
1389
|
-
read(e, t,
|
|
1389
|
+
read(e, t, n, r) {
|
|
1390
1390
|
this.prepare();
|
|
1391
|
-
const i =
|
|
1391
|
+
const i = r === void 0 ? e.len : e.pos + r;
|
|
1392
1392
|
for (; e.pos < i; ) {
|
|
1393
1393
|
const [o, a] = e.tag(), c = this.fieldNoToField.get(o);
|
|
1394
1394
|
if (!c) {
|
|
1395
|
-
let h =
|
|
1395
|
+
let h = n.readUnknownField;
|
|
1396
1396
|
if (h == "throw")
|
|
1397
1397
|
throw new Error(`Unknown field ${o} (wire type ${a}) for ${this.info.typeName}`);
|
|
1398
1398
|
let f = e.skip(a);
|
|
@@ -1419,13 +1419,13 @@ class Fi {
|
|
|
1419
1419
|
break;
|
|
1420
1420
|
case "message":
|
|
1421
1421
|
if (l) {
|
|
1422
|
-
let T = d[u], C = c.T().internalBinaryRead(e, e.uint32(),
|
|
1422
|
+
let T = d[u], C = c.T().internalBinaryRead(e, e.uint32(), n);
|
|
1423
1423
|
T.push(C);
|
|
1424
1424
|
} else
|
|
1425
|
-
d[u] = c.T().internalBinaryRead(e, e.uint32(),
|
|
1425
|
+
d[u] = c.T().internalBinaryRead(e, e.uint32(), n, d[u]);
|
|
1426
1426
|
break;
|
|
1427
1427
|
case "map":
|
|
1428
|
-
let [y, k] = this.mapEntry(c, e,
|
|
1428
|
+
let [y, k] = this.mapEntry(c, e, n);
|
|
1429
1429
|
d[u][y] = k;
|
|
1430
1430
|
break;
|
|
1431
1431
|
}
|
|
@@ -1434,8 +1434,8 @@ class Fi {
|
|
|
1434
1434
|
/**
|
|
1435
1435
|
* Read a map field, expecting key field = 1, value field = 2
|
|
1436
1436
|
*/
|
|
1437
|
-
mapEntry(e, t,
|
|
1438
|
-
let
|
|
1437
|
+
mapEntry(e, t, n) {
|
|
1438
|
+
let r = t.uint32(), i = t.pos + r, o, a;
|
|
1439
1439
|
for (; t.pos < i; ) {
|
|
1440
1440
|
let [c, d] = t.tag();
|
|
1441
1441
|
switch (c) {
|
|
@@ -1451,7 +1451,7 @@ class Fi {
|
|
|
1451
1451
|
a = t.int32();
|
|
1452
1452
|
break;
|
|
1453
1453
|
case "message":
|
|
1454
|
-
a = e.V.T().internalBinaryRead(t, t.uint32(),
|
|
1454
|
+
a = e.V.T().internalBinaryRead(t, t.uint32(), n);
|
|
1455
1455
|
break;
|
|
1456
1456
|
}
|
|
1457
1457
|
break;
|
|
@@ -1477,7 +1477,7 @@ class Fi {
|
|
|
1477
1477
|
}
|
|
1478
1478
|
return [o, a];
|
|
1479
1479
|
}
|
|
1480
|
-
scalar(e, t,
|
|
1480
|
+
scalar(e, t, n) {
|
|
1481
1481
|
switch (t) {
|
|
1482
1482
|
case D.INT32:
|
|
1483
1483
|
return e.int32();
|
|
@@ -1490,11 +1490,11 @@ class Fi {
|
|
|
1490
1490
|
case D.FLOAT:
|
|
1491
1491
|
return e.float();
|
|
1492
1492
|
case D.INT64:
|
|
1493
|
-
return Qe(e.int64(),
|
|
1493
|
+
return Qe(e.int64(), n);
|
|
1494
1494
|
case D.UINT64:
|
|
1495
|
-
return Qe(e.uint64(),
|
|
1495
|
+
return Qe(e.uint64(), n);
|
|
1496
1496
|
case D.FIXED64:
|
|
1497
|
-
return Qe(e.fixed64(),
|
|
1497
|
+
return Qe(e.fixed64(), n);
|
|
1498
1498
|
case D.FIXED32:
|
|
1499
1499
|
return e.fixed32();
|
|
1500
1500
|
case D.BYTES:
|
|
@@ -1504,11 +1504,11 @@ class Fi {
|
|
|
1504
1504
|
case D.SFIXED32:
|
|
1505
1505
|
return e.sfixed32();
|
|
1506
1506
|
case D.SFIXED64:
|
|
1507
|
-
return Qe(e.sfixed64(),
|
|
1507
|
+
return Qe(e.sfixed64(), n);
|
|
1508
1508
|
case D.SINT32:
|
|
1509
1509
|
return e.sint32();
|
|
1510
1510
|
case D.SINT64:
|
|
1511
|
-
return Qe(e.sint64(),
|
|
1511
|
+
return Qe(e.sint64(), n);
|
|
1512
1512
|
}
|
|
1513
1513
|
}
|
|
1514
1514
|
}
|
|
@@ -1519,13 +1519,13 @@ class Ni {
|
|
|
1519
1519
|
prepare() {
|
|
1520
1520
|
if (!this.fields) {
|
|
1521
1521
|
const e = this.info.fields ? this.info.fields.concat() : [];
|
|
1522
|
-
this.fields = e.sort((t,
|
|
1522
|
+
this.fields = e.sort((t, n) => t.no - n.no);
|
|
1523
1523
|
}
|
|
1524
1524
|
}
|
|
1525
1525
|
/**
|
|
1526
1526
|
* Writes the message to binary format.
|
|
1527
1527
|
*/
|
|
1528
|
-
write(e, t,
|
|
1528
|
+
write(e, t, n) {
|
|
1529
1529
|
this.prepare();
|
|
1530
1530
|
for (const i of this.fields) {
|
|
1531
1531
|
let o, a, c = i.repeat, d = i.localName;
|
|
@@ -1552,68 +1552,68 @@ class Ni {
|
|
|
1552
1552
|
if (c) {
|
|
1553
1553
|
J(Array.isArray(o));
|
|
1554
1554
|
for (const u of o)
|
|
1555
|
-
this.message(t,
|
|
1555
|
+
this.message(t, n, i.T(), i.no, u);
|
|
1556
1556
|
} else
|
|
1557
|
-
this.message(t,
|
|
1557
|
+
this.message(t, n, i.T(), i.no, o);
|
|
1558
1558
|
break;
|
|
1559
1559
|
case "map":
|
|
1560
1560
|
J(typeof o == "object" && o !== null);
|
|
1561
1561
|
for (const [u, h] of Object.entries(o))
|
|
1562
|
-
this.mapEntry(t,
|
|
1562
|
+
this.mapEntry(t, n, i, u, h);
|
|
1563
1563
|
break;
|
|
1564
1564
|
}
|
|
1565
1565
|
}
|
|
1566
|
-
let
|
|
1567
|
-
|
|
1566
|
+
let r = n.writeUnknownFields;
|
|
1567
|
+
r !== !1 && (r === !0 ? G.onWrite : r)(this.info.typeName, e, t);
|
|
1568
1568
|
}
|
|
1569
|
-
mapEntry(e, t,
|
|
1570
|
-
e.tag(
|
|
1571
|
-
let o =
|
|
1572
|
-
switch (
|
|
1569
|
+
mapEntry(e, t, n, r, i) {
|
|
1570
|
+
e.tag(n.no, j.LengthDelimited), e.fork();
|
|
1571
|
+
let o = r;
|
|
1572
|
+
switch (n.K) {
|
|
1573
1573
|
case D.INT32:
|
|
1574
1574
|
case D.FIXED32:
|
|
1575
1575
|
case D.UINT32:
|
|
1576
1576
|
case D.SFIXED32:
|
|
1577
1577
|
case D.SINT32:
|
|
1578
|
-
o = Number.parseInt(
|
|
1578
|
+
o = Number.parseInt(r);
|
|
1579
1579
|
break;
|
|
1580
1580
|
case D.BOOL:
|
|
1581
|
-
J(
|
|
1581
|
+
J(r == "true" || r == "false"), o = r == "true";
|
|
1582
1582
|
break;
|
|
1583
1583
|
}
|
|
1584
|
-
switch (this.scalar(e,
|
|
1584
|
+
switch (this.scalar(e, n.K, 1, o, !0), n.V.kind) {
|
|
1585
1585
|
case "scalar":
|
|
1586
|
-
this.scalar(e,
|
|
1586
|
+
this.scalar(e, n.V.T, 2, i, !0);
|
|
1587
1587
|
break;
|
|
1588
1588
|
case "enum":
|
|
1589
1589
|
this.scalar(e, D.INT32, 2, i, !0);
|
|
1590
1590
|
break;
|
|
1591
1591
|
case "message":
|
|
1592
|
-
this.message(e, t,
|
|
1592
|
+
this.message(e, t, n.V.T(), 2, i);
|
|
1593
1593
|
break;
|
|
1594
1594
|
}
|
|
1595
1595
|
e.join();
|
|
1596
1596
|
}
|
|
1597
|
-
message(e, t,
|
|
1598
|
-
i !== void 0 && (
|
|
1597
|
+
message(e, t, n, r, i) {
|
|
1598
|
+
i !== void 0 && (n.internalBinaryWrite(i, e.tag(r, j.LengthDelimited).fork(), t), e.join());
|
|
1599
1599
|
}
|
|
1600
1600
|
/**
|
|
1601
1601
|
* Write a single scalar value.
|
|
1602
1602
|
*/
|
|
1603
|
-
scalar(e, t,
|
|
1604
|
-
let [o, a, c] = this.scalarInfo(t,
|
|
1605
|
-
(!c || i) && (e.tag(
|
|
1603
|
+
scalar(e, t, n, r, i) {
|
|
1604
|
+
let [o, a, c] = this.scalarInfo(t, r);
|
|
1605
|
+
(!c || i) && (e.tag(n, o), e[a](r));
|
|
1606
1606
|
}
|
|
1607
1607
|
/**
|
|
1608
1608
|
* Write an array of scalar values in packed format.
|
|
1609
1609
|
*/
|
|
1610
|
-
packed(e, t,
|
|
1611
|
-
if (!
|
|
1610
|
+
packed(e, t, n, r) {
|
|
1611
|
+
if (!r.length)
|
|
1612
1612
|
return;
|
|
1613
|
-
J(t !== D.BYTES && t !== D.STRING), e.tag(
|
|
1613
|
+
J(t !== D.BYTES && t !== D.STRING), e.tag(n, j.LengthDelimited), e.fork();
|
|
1614
1614
|
let [, i] = this.scalarInfo(t);
|
|
1615
|
-
for (let o = 0; o <
|
|
1616
|
-
e[i](
|
|
1615
|
+
for (let o = 0; o < r.length; o++)
|
|
1616
|
+
e[i](r[o]);
|
|
1617
1617
|
e.join();
|
|
1618
1618
|
}
|
|
1619
1619
|
/**
|
|
@@ -1627,121 +1627,121 @@ class Ni {
|
|
|
1627
1627
|
* If argument `value` is omitted, [2] is always false.
|
|
1628
1628
|
*/
|
|
1629
1629
|
scalarInfo(e, t) {
|
|
1630
|
-
let
|
|
1630
|
+
let n = j.Varint, r, i = t === void 0, o = t === 0;
|
|
1631
1631
|
switch (e) {
|
|
1632
1632
|
case D.INT32:
|
|
1633
|
-
|
|
1633
|
+
r = "int32";
|
|
1634
1634
|
break;
|
|
1635
1635
|
case D.STRING:
|
|
1636
|
-
o = i || !t.length,
|
|
1636
|
+
o = i || !t.length, n = j.LengthDelimited, r = "string";
|
|
1637
1637
|
break;
|
|
1638
1638
|
case D.BOOL:
|
|
1639
|
-
o = t === !1,
|
|
1639
|
+
o = t === !1, r = "bool";
|
|
1640
1640
|
break;
|
|
1641
1641
|
case D.UINT32:
|
|
1642
|
-
|
|
1642
|
+
r = "uint32";
|
|
1643
1643
|
break;
|
|
1644
1644
|
case D.DOUBLE:
|
|
1645
|
-
|
|
1645
|
+
n = j.Bit64, r = "double";
|
|
1646
1646
|
break;
|
|
1647
1647
|
case D.FLOAT:
|
|
1648
|
-
|
|
1648
|
+
n = j.Bit32, r = "float";
|
|
1649
1649
|
break;
|
|
1650
1650
|
case D.INT64:
|
|
1651
|
-
o = i || Ee.from(t).isZero(),
|
|
1651
|
+
o = i || Ee.from(t).isZero(), r = "int64";
|
|
1652
1652
|
break;
|
|
1653
1653
|
case D.UINT64:
|
|
1654
|
-
o = i || Se.from(t).isZero(),
|
|
1654
|
+
o = i || Se.from(t).isZero(), r = "uint64";
|
|
1655
1655
|
break;
|
|
1656
1656
|
case D.FIXED64:
|
|
1657
|
-
o = i || Se.from(t).isZero(),
|
|
1657
|
+
o = i || Se.from(t).isZero(), n = j.Bit64, r = "fixed64";
|
|
1658
1658
|
break;
|
|
1659
1659
|
case D.BYTES:
|
|
1660
|
-
o = i || !t.byteLength,
|
|
1660
|
+
o = i || !t.byteLength, n = j.LengthDelimited, r = "bytes";
|
|
1661
1661
|
break;
|
|
1662
1662
|
case D.FIXED32:
|
|
1663
|
-
|
|
1663
|
+
n = j.Bit32, r = "fixed32";
|
|
1664
1664
|
break;
|
|
1665
1665
|
case D.SFIXED32:
|
|
1666
|
-
|
|
1666
|
+
n = j.Bit32, r = "sfixed32";
|
|
1667
1667
|
break;
|
|
1668
1668
|
case D.SFIXED64:
|
|
1669
|
-
o = i || Ee.from(t).isZero(),
|
|
1669
|
+
o = i || Ee.from(t).isZero(), n = j.Bit64, r = "sfixed64";
|
|
1670
1670
|
break;
|
|
1671
1671
|
case D.SINT32:
|
|
1672
|
-
|
|
1672
|
+
r = "sint32";
|
|
1673
1673
|
break;
|
|
1674
1674
|
case D.SINT64:
|
|
1675
|
-
o = i || Ee.from(t).isZero(),
|
|
1675
|
+
o = i || Ee.from(t).isZero(), r = "sint64";
|
|
1676
1676
|
break;
|
|
1677
1677
|
}
|
|
1678
|
-
return [
|
|
1678
|
+
return [n, r, i || o];
|
|
1679
1679
|
}
|
|
1680
1680
|
}
|
|
1681
1681
|
function Ii(s) {
|
|
1682
1682
|
const e = s.messagePrototype ? Object.create(s.messagePrototype) : Object.defineProperty({}, Ur, { value: s });
|
|
1683
1683
|
for (let t of s.fields) {
|
|
1684
|
-
let
|
|
1684
|
+
let n = t.localName;
|
|
1685
1685
|
if (!t.opt)
|
|
1686
1686
|
if (t.oneof)
|
|
1687
1687
|
e[t.oneof] = { oneofKind: void 0 };
|
|
1688
1688
|
else if (t.repeat)
|
|
1689
|
-
e[
|
|
1689
|
+
e[n] = [];
|
|
1690
1690
|
else
|
|
1691
1691
|
switch (t.kind) {
|
|
1692
1692
|
case "scalar":
|
|
1693
|
-
e[
|
|
1693
|
+
e[n] = Pn(t.T, t.L);
|
|
1694
1694
|
break;
|
|
1695
1695
|
case "enum":
|
|
1696
|
-
e[
|
|
1696
|
+
e[n] = 0;
|
|
1697
1697
|
break;
|
|
1698
1698
|
case "map":
|
|
1699
|
-
e[
|
|
1699
|
+
e[n] = {};
|
|
1700
1700
|
break;
|
|
1701
1701
|
}
|
|
1702
1702
|
}
|
|
1703
1703
|
return e;
|
|
1704
1704
|
}
|
|
1705
1705
|
function ve(s, e, t) {
|
|
1706
|
-
let
|
|
1706
|
+
let n, r = t, i;
|
|
1707
1707
|
for (let o of s.fields) {
|
|
1708
1708
|
let a = o.localName;
|
|
1709
1709
|
if (o.oneof) {
|
|
1710
|
-
const c =
|
|
1710
|
+
const c = r[o.oneof];
|
|
1711
1711
|
if ((c == null ? void 0 : c.oneofKind) == null)
|
|
1712
1712
|
continue;
|
|
1713
|
-
if (
|
|
1713
|
+
if (n = c[a], i = e[o.oneof], i.oneofKind = c.oneofKind, n == null) {
|
|
1714
1714
|
delete i[a];
|
|
1715
1715
|
continue;
|
|
1716
1716
|
}
|
|
1717
|
-
} else if (
|
|
1717
|
+
} else if (n = r[a], i = e, n == null)
|
|
1718
1718
|
continue;
|
|
1719
|
-
switch (o.repeat && (i[a].length =
|
|
1719
|
+
switch (o.repeat && (i[a].length = n.length), o.kind) {
|
|
1720
1720
|
case "scalar":
|
|
1721
1721
|
case "enum":
|
|
1722
1722
|
if (o.repeat)
|
|
1723
|
-
for (let d = 0; d <
|
|
1724
|
-
i[a][d] =
|
|
1723
|
+
for (let d = 0; d < n.length; d++)
|
|
1724
|
+
i[a][d] = n[d];
|
|
1725
1725
|
else
|
|
1726
|
-
i[a] =
|
|
1726
|
+
i[a] = n;
|
|
1727
1727
|
break;
|
|
1728
1728
|
case "message":
|
|
1729
1729
|
let c = o.T();
|
|
1730
1730
|
if (o.repeat)
|
|
1731
|
-
for (let d = 0; d <
|
|
1732
|
-
i[a][d] = c.create(
|
|
1733
|
-
else i[a] === void 0 ? i[a] = c.create(
|
|
1731
|
+
for (let d = 0; d < n.length; d++)
|
|
1732
|
+
i[a][d] = c.create(n[d]);
|
|
1733
|
+
else i[a] === void 0 ? i[a] = c.create(n) : c.mergePartial(i[a], n);
|
|
1734
1734
|
break;
|
|
1735
1735
|
case "map":
|
|
1736
1736
|
switch (o.V.kind) {
|
|
1737
1737
|
case "scalar":
|
|
1738
1738
|
case "enum":
|
|
1739
|
-
Object.assign(i[a],
|
|
1739
|
+
Object.assign(i[a], n);
|
|
1740
1740
|
break;
|
|
1741
1741
|
case "message":
|
|
1742
1742
|
let d = o.V.T();
|
|
1743
|
-
for (let l of Object.keys(
|
|
1744
|
-
i[a][l] = d.create(
|
|
1743
|
+
for (let l of Object.keys(n))
|
|
1744
|
+
i[a][l] = d.create(n[l]);
|
|
1745
1745
|
break;
|
|
1746
1746
|
}
|
|
1747
1747
|
break;
|
|
@@ -1753,22 +1753,22 @@ function Ti(s, e, t) {
|
|
|
1753
1753
|
return !0;
|
|
1754
1754
|
if (!e || !t)
|
|
1755
1755
|
return !1;
|
|
1756
|
-
for (let
|
|
1757
|
-
let
|
|
1758
|
-
switch (
|
|
1756
|
+
for (let n of s.fields) {
|
|
1757
|
+
let r = n.localName, i = n.oneof ? e[n.oneof][r] : e[r], o = n.oneof ? t[n.oneof][r] : t[r];
|
|
1758
|
+
switch (n.kind) {
|
|
1759
1759
|
case "enum":
|
|
1760
1760
|
case "scalar":
|
|
1761
|
-
let a =
|
|
1762
|
-
if (!(
|
|
1761
|
+
let a = n.kind == "enum" ? D.INT32 : n.T;
|
|
1762
|
+
if (!(n.repeat ? sr(a, i, o) : xr(a, i, o)))
|
|
1763
1763
|
return !1;
|
|
1764
1764
|
break;
|
|
1765
1765
|
case "map":
|
|
1766
|
-
if (!(
|
|
1766
|
+
if (!(n.V.kind == "message" ? or(n.V.T(), hn(i), hn(o)) : sr(n.V.kind == "enum" ? D.INT32 : n.V.T, hn(i), hn(o))))
|
|
1767
1767
|
return !1;
|
|
1768
1768
|
break;
|
|
1769
1769
|
case "message":
|
|
1770
|
-
let c =
|
|
1771
|
-
if (!(
|
|
1770
|
+
let c = n.T();
|
|
1771
|
+
if (!(n.repeat ? or(c, i, o) : c.equals(i, o)))
|
|
1772
1772
|
return !1;
|
|
1773
1773
|
break;
|
|
1774
1774
|
}
|
|
@@ -1781,34 +1781,34 @@ function xr(s, e, t) {
|
|
|
1781
1781
|
return !0;
|
|
1782
1782
|
if (s !== D.BYTES)
|
|
1783
1783
|
return !1;
|
|
1784
|
-
let
|
|
1785
|
-
if (
|
|
1784
|
+
let n = e, r = t;
|
|
1785
|
+
if (n.length !== r.length)
|
|
1786
1786
|
return !1;
|
|
1787
|
-
for (let i = 0; i <
|
|
1788
|
-
if (
|
|
1787
|
+
for (let i = 0; i < n.length; i++)
|
|
1788
|
+
if (n[i] != r[i])
|
|
1789
1789
|
return !1;
|
|
1790
1790
|
return !0;
|
|
1791
1791
|
}
|
|
1792
1792
|
function sr(s, e, t) {
|
|
1793
1793
|
if (e.length !== t.length)
|
|
1794
1794
|
return !1;
|
|
1795
|
-
for (let
|
|
1796
|
-
if (!xr(s, e[
|
|
1795
|
+
for (let n = 0; n < e.length; n++)
|
|
1796
|
+
if (!xr(s, e[n], t[n]))
|
|
1797
1797
|
return !1;
|
|
1798
1798
|
return !0;
|
|
1799
1799
|
}
|
|
1800
1800
|
function or(s, e, t) {
|
|
1801
1801
|
if (e.length !== t.length)
|
|
1802
1802
|
return !1;
|
|
1803
|
-
for (let
|
|
1804
|
-
if (!s.equals(e[
|
|
1803
|
+
for (let n = 0; n < e.length; n++)
|
|
1804
|
+
if (!s.equals(e[n], t[n]))
|
|
1805
1805
|
return !1;
|
|
1806
1806
|
return !0;
|
|
1807
1807
|
}
|
|
1808
1808
|
const Li = Object.getOwnPropertyDescriptors(Object.getPrototypeOf({}));
|
|
1809
1809
|
class Ie {
|
|
1810
|
-
constructor(e, t,
|
|
1811
|
-
this.defaultCheckDepth = 16, this.typeName = e, this.fields = t.map(Ci), this.options =
|
|
1810
|
+
constructor(e, t, n) {
|
|
1811
|
+
this.defaultCheckDepth = 16, this.typeName = e, this.fields = t.map(Ci), this.options = n ?? {}, this.messagePrototype = Object.create(null, Object.assign(Object.assign({}, Li), { [Ur]: { value: this } })), this.refTypeCheck = new vi(this), this.refJsonReader = new Ai(this), this.refJsonWriter = new ki(this), this.refBinReader = new Fi(this), this.refBinWriter = new Ni(this);
|
|
1812
1812
|
}
|
|
1813
1813
|
create(e) {
|
|
1814
1814
|
let t = Ii(this);
|
|
@@ -1856,8 +1856,8 @@ class Ie {
|
|
|
1856
1856
|
* Create a new message from binary format.
|
|
1857
1857
|
*/
|
|
1858
1858
|
fromBinary(e, t) {
|
|
1859
|
-
let
|
|
1860
|
-
return this.internalBinaryRead(
|
|
1859
|
+
let n = li(t);
|
|
1860
|
+
return this.internalBinaryRead(n.readerFactory(e), e.byteLength, n);
|
|
1861
1861
|
}
|
|
1862
1862
|
/**
|
|
1863
1863
|
* Read a new message from a JSON value.
|
|
@@ -1870,8 +1870,8 @@ class Ie {
|
|
|
1870
1870
|
* This is equivalent to `T.fromJson(JSON.parse(json))`.
|
|
1871
1871
|
*/
|
|
1872
1872
|
fromJsonString(e, t) {
|
|
1873
|
-
let
|
|
1874
|
-
return this.fromJson(
|
|
1873
|
+
let n = JSON.parse(e);
|
|
1874
|
+
return this.fromJson(n, t);
|
|
1875
1875
|
}
|
|
1876
1876
|
/**
|
|
1877
1877
|
* Write the message to canonical JSON value.
|
|
@@ -1884,16 +1884,16 @@ class Ie {
|
|
|
1884
1884
|
* This is equivalent to `JSON.stringify(T.toJson(t))`
|
|
1885
1885
|
*/
|
|
1886
1886
|
toJsonString(e, t) {
|
|
1887
|
-
var
|
|
1888
|
-
let
|
|
1889
|
-
return JSON.stringify(
|
|
1887
|
+
var n;
|
|
1888
|
+
let r = this.toJson(e, t);
|
|
1889
|
+
return JSON.stringify(r, null, (n = t == null ? void 0 : t.prettySpaces) !== null && n !== void 0 ? n : 0);
|
|
1890
1890
|
}
|
|
1891
1891
|
/**
|
|
1892
1892
|
* Write the message to binary format.
|
|
1893
1893
|
*/
|
|
1894
1894
|
toBinary(e, t) {
|
|
1895
|
-
let
|
|
1896
|
-
return this.internalBinaryWrite(e,
|
|
1895
|
+
let n = mi(t);
|
|
1896
|
+
return this.internalBinaryWrite(e, n.writerFactory(), n).finish();
|
|
1897
1897
|
}
|
|
1898
1898
|
/**
|
|
1899
1899
|
* This is an internal method. If you just want to read a message from
|
|
@@ -1903,10 +1903,10 @@ class Ie {
|
|
|
1903
1903
|
* according to protobuf rules. If the target is omitted,
|
|
1904
1904
|
* a new instance is created first.
|
|
1905
1905
|
*/
|
|
1906
|
-
internalJsonRead(e, t,
|
|
1906
|
+
internalJsonRead(e, t, n) {
|
|
1907
1907
|
if (e !== null && typeof e == "object" && !Array.isArray(e)) {
|
|
1908
|
-
let
|
|
1909
|
-
return this.refJsonReader.read(e,
|
|
1908
|
+
let r = n ?? this.create();
|
|
1909
|
+
return this.refJsonReader.read(e, r, t), r;
|
|
1910
1910
|
}
|
|
1911
1911
|
throw new Error(`Unable to parse message ${this.typeName} from JSON ${Ar(e)}.`);
|
|
1912
1912
|
}
|
|
@@ -1926,8 +1926,8 @@ class Ie {
|
|
|
1926
1926
|
* Serializes the message in binary format and appends it to the given
|
|
1927
1927
|
* writer. Returns passed writer.
|
|
1928
1928
|
*/
|
|
1929
|
-
internalBinaryWrite(e, t,
|
|
1930
|
-
return this.refBinWriter.write(e, t,
|
|
1929
|
+
internalBinaryWrite(e, t, n) {
|
|
1930
|
+
return this.refBinWriter.write(e, t, n), t;
|
|
1931
1931
|
}
|
|
1932
1932
|
/**
|
|
1933
1933
|
* This is an internal method. If you just want to read a message from
|
|
@@ -1937,24 +1937,24 @@ class Ie {
|
|
|
1937
1937
|
* the target according to protobuf rules. If the target is
|
|
1938
1938
|
* omitted, a new instance is created first.
|
|
1939
1939
|
*/
|
|
1940
|
-
internalBinaryRead(e, t,
|
|
1941
|
-
let i =
|
|
1942
|
-
return this.refBinReader.read(e, i,
|
|
1940
|
+
internalBinaryRead(e, t, n, r) {
|
|
1941
|
+
let i = r ?? this.create();
|
|
1942
|
+
return this.refBinReader.read(e, i, n, t), i;
|
|
1943
1943
|
}
|
|
1944
1944
|
}
|
|
1945
1945
|
function Ui(s, e) {
|
|
1946
|
-
var t,
|
|
1946
|
+
var t, n, r;
|
|
1947
1947
|
let i = s;
|
|
1948
|
-
return i.service = e, i.localName = (t = i.localName) !== null && t !== void 0 ? t : $n(i.name), i.serverStreaming = !!i.serverStreaming, i.clientStreaming = !!i.clientStreaming, i.options = (
|
|
1948
|
+
return i.service = e, i.localName = (t = i.localName) !== null && t !== void 0 ? t : $n(i.name), i.serverStreaming = !!i.serverStreaming, i.clientStreaming = !!i.clientStreaming, i.options = (n = i.options) !== null && n !== void 0 ? n : {}, i.idempotency = (r = i.idempotency) !== null && r !== void 0 ? r : void 0, i;
|
|
1949
1949
|
}
|
|
1950
1950
|
class Kn {
|
|
1951
|
-
constructor(e, t,
|
|
1952
|
-
this.typeName = e, this.methods = t.map((
|
|
1951
|
+
constructor(e, t, n) {
|
|
1952
|
+
this.typeName = e, this.methods = t.map((r) => Ui(r, this)), this.options = n ?? {};
|
|
1953
1953
|
}
|
|
1954
1954
|
}
|
|
1955
1955
|
class se extends Error {
|
|
1956
|
-
constructor(e, t = "UNKNOWN",
|
|
1957
|
-
super(e), this.name = "RpcError", Object.setPrototypeOf(this, new.target.prototype), this.code = t, this.meta =
|
|
1956
|
+
constructor(e, t = "UNKNOWN", n) {
|
|
1957
|
+
super(e), this.name = "RpcError", Object.setPrototypeOf(this, new.target.prototype), this.code = t, this.meta = n ?? {};
|
|
1958
1958
|
}
|
|
1959
1959
|
toString() {
|
|
1960
1960
|
const e = [this.name + ": " + this.message];
|
|
@@ -1962,8 +1962,8 @@ class se extends Error {
|
|
|
1962
1962
|
let t = Object.entries(this.meta);
|
|
1963
1963
|
if (t.length) {
|
|
1964
1964
|
e.push(""), e.push("Meta:");
|
|
1965
|
-
for (let [
|
|
1966
|
-
e.push(` ${
|
|
1965
|
+
for (let [n, r] of t)
|
|
1966
|
+
e.push(` ${n}: ${r}`);
|
|
1967
1967
|
}
|
|
1968
1968
|
return e.join(`
|
|
1969
1969
|
`);
|
|
@@ -1974,9 +1974,9 @@ function xi(s, e) {
|
|
|
1974
1974
|
return s;
|
|
1975
1975
|
let t = {};
|
|
1976
1976
|
un(s, t), un(e, t);
|
|
1977
|
-
for (let
|
|
1978
|
-
let
|
|
1979
|
-
switch (
|
|
1977
|
+
for (let n of Object.keys(e)) {
|
|
1978
|
+
let r = e[n];
|
|
1979
|
+
switch (n) {
|
|
1980
1980
|
case "jsonOptions":
|
|
1981
1981
|
t.jsonOptions = bi(s.jsonOptions, t.jsonOptions);
|
|
1982
1982
|
break;
|
|
@@ -1987,7 +1987,7 @@ function xi(s, e) {
|
|
|
1987
1987
|
t.meta = {}, un(s.meta, t.meta), un(e.meta, t.meta);
|
|
1988
1988
|
break;
|
|
1989
1989
|
case "interceptors":
|
|
1990
|
-
t.interceptors = s.interceptors ? s.interceptors.concat(
|
|
1990
|
+
t.interceptors = s.interceptors ? s.interceptors.concat(r) : r.concat();
|
|
1991
1991
|
break;
|
|
1992
1992
|
}
|
|
1993
1993
|
}
|
|
@@ -1997,8 +1997,8 @@ function un(s, e) {
|
|
|
1997
1997
|
if (!s)
|
|
1998
1998
|
return;
|
|
1999
1999
|
let t = e;
|
|
2000
|
-
for (let [
|
|
2001
|
-
|
|
2000
|
+
for (let [n, r] of Object.entries(s))
|
|
2001
|
+
r instanceof Date ? t[n] = new Date(r.getTime()) : Array.isArray(r) ? t[n] = r.concat() : t[n] = r;
|
|
2002
2002
|
}
|
|
2003
2003
|
var qe;
|
|
2004
2004
|
(function(s) {
|
|
@@ -2018,8 +2018,8 @@ class vt {
|
|
|
2018
2018
|
* others.
|
|
2019
2019
|
*/
|
|
2020
2020
|
constructor(e = !0) {
|
|
2021
|
-
this._state = qe.PENDING, this._promise = new Promise((t,
|
|
2022
|
-
this._resolve = t, this._reject =
|
|
2021
|
+
this._state = qe.PENDING, this._promise = new Promise((t, n) => {
|
|
2022
|
+
this._resolve = t, this._reject = n;
|
|
2023
2023
|
}), e && this._promise.catch((t) => {
|
|
2024
2024
|
});
|
|
2025
2025
|
}
|
|
@@ -2088,8 +2088,8 @@ class _i {
|
|
|
2088
2088
|
}
|
|
2089
2089
|
addLis(e, t) {
|
|
2090
2090
|
return t.push(e), () => {
|
|
2091
|
-
let
|
|
2092
|
-
|
|
2091
|
+
let n = t.indexOf(e);
|
|
2092
|
+
n >= 0 && t.splice(n, 1);
|
|
2093
2093
|
};
|
|
2094
2094
|
}
|
|
2095
2095
|
// remove all listeners
|
|
@@ -2109,8 +2109,8 @@ class _i {
|
|
|
2109
2109
|
* at a time.
|
|
2110
2110
|
* Can be used to wrap a stream by using the other stream's `onNext`.
|
|
2111
2111
|
*/
|
|
2112
|
-
notifyNext(e, t,
|
|
2113
|
-
J((e ? 1 : 0) + (t ? 1 : 0) + (
|
|
2112
|
+
notifyNext(e, t, n) {
|
|
2113
|
+
J((e ? 1 : 0) + (t ? 1 : 0) + (n ? 1 : 0) <= 1, "only one emission at a time"), e && this.notifyMessage(e), t && this.notifyError(t), n && this.notifyComplete();
|
|
2114
2114
|
}
|
|
2115
2115
|
/**
|
|
2116
2116
|
* Emits a new message. Throws if stream is closed.
|
|
@@ -2165,14 +2165,14 @@ class _i {
|
|
|
2165
2165
|
let t = this._itState;
|
|
2166
2166
|
if (t)
|
|
2167
2167
|
if (t.p) {
|
|
2168
|
-
const
|
|
2169
|
-
J(
|
|
2168
|
+
const n = t.p;
|
|
2169
|
+
J(n.state == qe.PENDING, "iterator contract broken"), "value" in e ? n.resolve(e) : n.reject(e), delete t.p;
|
|
2170
2170
|
} else
|
|
2171
2171
|
t.q.push(e);
|
|
2172
2172
|
}
|
|
2173
2173
|
}
|
|
2174
|
-
var Bi = function(s, e, t,
|
|
2175
|
-
function
|
|
2174
|
+
var Bi = function(s, e, t, n) {
|
|
2175
|
+
function r(i) {
|
|
2176
2176
|
return i instanceof t ? i : new t(function(o) {
|
|
2177
2177
|
o(i);
|
|
2178
2178
|
});
|
|
@@ -2180,52 +2180,52 @@ var Bi = function(s, e, t, r) {
|
|
|
2180
2180
|
return new (t || (t = Promise))(function(i, o) {
|
|
2181
2181
|
function a(l) {
|
|
2182
2182
|
try {
|
|
2183
|
-
d(
|
|
2183
|
+
d(n.next(l));
|
|
2184
2184
|
} catch (u) {
|
|
2185
2185
|
o(u);
|
|
2186
2186
|
}
|
|
2187
2187
|
}
|
|
2188
2188
|
function c(l) {
|
|
2189
2189
|
try {
|
|
2190
|
-
d(
|
|
2190
|
+
d(n.throw(l));
|
|
2191
2191
|
} catch (u) {
|
|
2192
2192
|
o(u);
|
|
2193
2193
|
}
|
|
2194
2194
|
}
|
|
2195
2195
|
function d(l) {
|
|
2196
|
-
l.done ? i(l.value) :
|
|
2196
|
+
l.done ? i(l.value) : r(l.value).then(a, c);
|
|
2197
2197
|
}
|
|
2198
|
-
d((
|
|
2198
|
+
d((n = n.apply(s, e || [])).next());
|
|
2199
2199
|
});
|
|
2200
2200
|
};
|
|
2201
2201
|
class Oi {
|
|
2202
|
-
constructor(e, t,
|
|
2203
|
-
this.method = e, this.requestHeaders = t, this.request =
|
|
2202
|
+
constructor(e, t, n, r, i, o, a) {
|
|
2203
|
+
this.method = e, this.requestHeaders = t, this.request = n, this.headers = r, this.response = i, this.status = o, this.trailers = a;
|
|
2204
2204
|
}
|
|
2205
2205
|
/**
|
|
2206
2206
|
* If you are only interested in the final outcome of this call,
|
|
2207
2207
|
* you can await it to receive a `FinishedUnaryCall`.
|
|
2208
2208
|
*/
|
|
2209
2209
|
then(e, t) {
|
|
2210
|
-
return this.promiseFinished().then((
|
|
2210
|
+
return this.promiseFinished().then((n) => e ? Promise.resolve(e(n)) : n, (n) => t ? Promise.resolve(t(n)) : Promise.reject(n));
|
|
2211
2211
|
}
|
|
2212
2212
|
promiseFinished() {
|
|
2213
2213
|
return Bi(this, void 0, void 0, function* () {
|
|
2214
|
-
let [e, t,
|
|
2214
|
+
let [e, t, n, r] = yield Promise.all([this.headers, this.response, this.status, this.trailers]);
|
|
2215
2215
|
return {
|
|
2216
2216
|
method: this.method,
|
|
2217
2217
|
requestHeaders: this.requestHeaders,
|
|
2218
2218
|
request: this.request,
|
|
2219
2219
|
headers: e,
|
|
2220
2220
|
response: t,
|
|
2221
|
-
status:
|
|
2222
|
-
trailers:
|
|
2221
|
+
status: n,
|
|
2222
|
+
trailers: r
|
|
2223
2223
|
};
|
|
2224
2224
|
});
|
|
2225
2225
|
}
|
|
2226
2226
|
}
|
|
2227
|
-
var Si = function(s, e, t,
|
|
2228
|
-
function
|
|
2227
|
+
var Si = function(s, e, t, n) {
|
|
2228
|
+
function r(i) {
|
|
2229
2229
|
return i instanceof t ? i : new t(function(o) {
|
|
2230
2230
|
o(i);
|
|
2231
2231
|
});
|
|
@@ -2233,27 +2233,27 @@ var Si = function(s, e, t, r) {
|
|
|
2233
2233
|
return new (t || (t = Promise))(function(i, o) {
|
|
2234
2234
|
function a(l) {
|
|
2235
2235
|
try {
|
|
2236
|
-
d(
|
|
2236
|
+
d(n.next(l));
|
|
2237
2237
|
} catch (u) {
|
|
2238
2238
|
o(u);
|
|
2239
2239
|
}
|
|
2240
2240
|
}
|
|
2241
2241
|
function c(l) {
|
|
2242
2242
|
try {
|
|
2243
|
-
d(
|
|
2243
|
+
d(n.throw(l));
|
|
2244
2244
|
} catch (u) {
|
|
2245
2245
|
o(u);
|
|
2246
2246
|
}
|
|
2247
2247
|
}
|
|
2248
2248
|
function d(l) {
|
|
2249
|
-
l.done ? i(l.value) :
|
|
2249
|
+
l.done ? i(l.value) : r(l.value).then(a, c);
|
|
2250
2250
|
}
|
|
2251
|
-
d((
|
|
2251
|
+
d((n = n.apply(s, e || [])).next());
|
|
2252
2252
|
});
|
|
2253
2253
|
};
|
|
2254
2254
|
class Ri {
|
|
2255
|
-
constructor(e, t,
|
|
2256
|
-
this.method = e, this.requestHeaders = t, this.request =
|
|
2255
|
+
constructor(e, t, n, r, i, o, a) {
|
|
2256
|
+
this.method = e, this.requestHeaders = t, this.request = n, this.headers = r, this.responses = i, this.status = o, this.trailers = a;
|
|
2257
2257
|
}
|
|
2258
2258
|
/**
|
|
2259
2259
|
* Instead of awaiting the response status and trailers, you can
|
|
@@ -2262,39 +2262,39 @@ class Ri {
|
|
|
2262
2262
|
* see the actual messages the server replied with.
|
|
2263
2263
|
*/
|
|
2264
2264
|
then(e, t) {
|
|
2265
|
-
return this.promiseFinished().then((
|
|
2265
|
+
return this.promiseFinished().then((n) => e ? Promise.resolve(e(n)) : n, (n) => t ? Promise.resolve(t(n)) : Promise.reject(n));
|
|
2266
2266
|
}
|
|
2267
2267
|
promiseFinished() {
|
|
2268
2268
|
return Si(this, void 0, void 0, function* () {
|
|
2269
|
-
let [e, t,
|
|
2269
|
+
let [e, t, n] = yield Promise.all([this.headers, this.status, this.trailers]);
|
|
2270
2270
|
return {
|
|
2271
2271
|
method: this.method,
|
|
2272
2272
|
requestHeaders: this.requestHeaders,
|
|
2273
2273
|
request: this.request,
|
|
2274
2274
|
headers: e,
|
|
2275
2275
|
status: t,
|
|
2276
|
-
trailers:
|
|
2276
|
+
trailers: n
|
|
2277
2277
|
};
|
|
2278
2278
|
});
|
|
2279
2279
|
}
|
|
2280
2280
|
}
|
|
2281
|
-
function $e(s, e, t,
|
|
2281
|
+
function $e(s, e, t, n, r) {
|
|
2282
2282
|
var i;
|
|
2283
2283
|
{
|
|
2284
2284
|
let o = (a, c, d) => e.unary(a, c, d);
|
|
2285
|
-
for (const a of ((i =
|
|
2285
|
+
for (const a of ((i = n.interceptors) !== null && i !== void 0 ? i : []).filter((c) => c.interceptUnary).reverse()) {
|
|
2286
2286
|
const c = o;
|
|
2287
2287
|
o = (d, l, u) => a.interceptUnary(c, d, l, u);
|
|
2288
2288
|
}
|
|
2289
|
-
return o(t,
|
|
2289
|
+
return o(t, r, n);
|
|
2290
2290
|
}
|
|
2291
2291
|
}
|
|
2292
2292
|
var W;
|
|
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
|
})(W || (W = {}));
|
|
2296
|
-
var Di = function(s, e, t,
|
|
2297
|
-
function
|
|
2296
|
+
var Di = function(s, e, t, n) {
|
|
2297
|
+
function r(i) {
|
|
2298
2298
|
return i instanceof t ? i : new t(function(o) {
|
|
2299
2299
|
o(i);
|
|
2300
2300
|
});
|
|
@@ -2302,27 +2302,27 @@ var Di = function(s, e, t, r) {
|
|
|
2302
2302
|
return new (t || (t = Promise))(function(i, o) {
|
|
2303
2303
|
function a(l) {
|
|
2304
2304
|
try {
|
|
2305
|
-
d(
|
|
2305
|
+
d(n.next(l));
|
|
2306
2306
|
} catch (u) {
|
|
2307
2307
|
o(u);
|
|
2308
2308
|
}
|
|
2309
2309
|
}
|
|
2310
2310
|
function c(l) {
|
|
2311
2311
|
try {
|
|
2312
|
-
d(
|
|
2312
|
+
d(n.throw(l));
|
|
2313
2313
|
} catch (u) {
|
|
2314
2314
|
o(u);
|
|
2315
2315
|
}
|
|
2316
2316
|
}
|
|
2317
2317
|
function d(l) {
|
|
2318
|
-
l.done ? i(l.value) :
|
|
2318
|
+
l.done ? i(l.value) : r(l.value).then(a, c);
|
|
2319
2319
|
}
|
|
2320
|
-
d((
|
|
2320
|
+
d((n = n.apply(s, e || [])).next());
|
|
2321
2321
|
});
|
|
2322
2322
|
};
|
|
2323
|
-
function ar(s, e, t,
|
|
2324
|
-
if (
|
|
2325
|
-
for (let [i, o] of Object.entries(
|
|
2323
|
+
function ar(s, e, t, n, r) {
|
|
2324
|
+
if (n)
|
|
2325
|
+
for (let [i, o] of Object.entries(n))
|
|
2326
2326
|
if (typeof o == "string")
|
|
2327
2327
|
s.append(i, o);
|
|
2328
2328
|
else
|
|
@@ -2343,8 +2343,8 @@ function ar(s, e, t, r, n) {
|
|
|
2343
2343
|
function lr(s, e) {
|
|
2344
2344
|
let t = new Uint8Array(5 + s.length);
|
|
2345
2345
|
t[0] = Ye.DATA;
|
|
2346
|
-
for (let
|
|
2347
|
-
t[
|
|
2346
|
+
for (let n = s.length, r = 4; r > 0; r--)
|
|
2347
|
+
t[r] = n % 256, n >>>= 8;
|
|
2348
2348
|
return t.set(s, 5), e === "binary" ? t : Fr(t);
|
|
2349
2349
|
}
|
|
2350
2350
|
function Wn(s, e, t) {
|
|
@@ -2362,12 +2362,12 @@ function Wn(s, e, t) {
|
|
|
2362
2362
|
}
|
|
2363
2363
|
return Wn($i(c.headers), c.status, c.statusText);
|
|
2364
2364
|
}
|
|
2365
|
-
let
|
|
2366
|
-
return (o === void 0 || o === W.OK) && !
|
|
2365
|
+
let n = s, r = e >= 200 && e < 300, i = Br(n), [o, a] = _r(n);
|
|
2366
|
+
return (o === void 0 || o === W.OK) && !r && (o = Pi(e), a = t), [o, a, i];
|
|
2367
2367
|
}
|
|
2368
2368
|
function cr(s) {
|
|
2369
|
-
let e = Hi(s), [t,
|
|
2370
|
-
return [t ?? W.OK,
|
|
2369
|
+
let e = Hi(s), [t, n] = _r(e), r = Br(e);
|
|
2370
|
+
return [t ?? W.OK, n, r];
|
|
2371
2371
|
}
|
|
2372
2372
|
var Ye;
|
|
2373
2373
|
(function(s) {
|
|
@@ -2375,24 +2375,24 @@ var Ye;
|
|
|
2375
2375
|
})(Ye || (Ye = {}));
|
|
2376
2376
|
function dr(s, e, t) {
|
|
2377
2377
|
return Di(this, void 0, void 0, function* () {
|
|
2378
|
-
let
|
|
2378
|
+
let n, r = "", i = new Uint8Array(0), o = Vi(e);
|
|
2379
2379
|
if (Mi(s)) {
|
|
2380
2380
|
let a = s.getReader();
|
|
2381
|
-
|
|
2381
|
+
n = {
|
|
2382
2382
|
next: () => a.read()
|
|
2383
2383
|
};
|
|
2384
2384
|
} else
|
|
2385
|
-
|
|
2385
|
+
n = s[Symbol.asyncIterator]();
|
|
2386
2386
|
for (; ; ) {
|
|
2387
|
-
let a = yield
|
|
2387
|
+
let a = yield n.next();
|
|
2388
2388
|
if (a.value !== void 0) {
|
|
2389
2389
|
if (o === "text") {
|
|
2390
2390
|
for (let d = 0; d < a.value.length; d++)
|
|
2391
|
-
|
|
2392
|
-
let c =
|
|
2391
|
+
r += String.fromCharCode(a.value[d]);
|
|
2392
|
+
let c = r.length - r.length % 4;
|
|
2393
2393
|
if (c === 0)
|
|
2394
2394
|
continue;
|
|
2395
|
-
i = hr(i, kr(
|
|
2395
|
+
i = hr(i, kr(r.substring(0, c))), r = r.substring(c);
|
|
2396
2396
|
} else
|
|
2397
2397
|
i = hr(i, a.value);
|
|
2398
2398
|
for (; i.length >= 5 && i[0] === Ye.DATA; ) {
|
|
@@ -2437,31 +2437,31 @@ function Vi(s) {
|
|
|
2437
2437
|
}
|
|
2438
2438
|
}
|
|
2439
2439
|
function _r(s) {
|
|
2440
|
-
let e, t,
|
|
2441
|
-
if (r !== void 0) {
|
|
2442
|
-
if (Array.isArray(r))
|
|
2443
|
-
return [W.INTERNAL, "invalid grpc-web message"];
|
|
2444
|
-
t = r;
|
|
2445
|
-
}
|
|
2446
|
-
let n = s["grpc-status"];
|
|
2440
|
+
let e, t, n = s["grpc-message"];
|
|
2447
2441
|
if (n !== void 0) {
|
|
2448
2442
|
if (Array.isArray(n))
|
|
2443
|
+
return [W.INTERNAL, "invalid grpc-web message"];
|
|
2444
|
+
t = n;
|
|
2445
|
+
}
|
|
2446
|
+
let r = s["grpc-status"];
|
|
2447
|
+
if (r !== void 0) {
|
|
2448
|
+
if (Array.isArray(r))
|
|
2449
2449
|
return [W.INTERNAL, "invalid grpc-web status"];
|
|
2450
|
-
if (e = parseInt(
|
|
2450
|
+
if (e = parseInt(r, 10), W[e] === void 0)
|
|
2451
2451
|
return [W.INTERNAL, "invalid grpc-web status"];
|
|
2452
2452
|
}
|
|
2453
2453
|
return [e, t];
|
|
2454
2454
|
}
|
|
2455
2455
|
function Br(s) {
|
|
2456
2456
|
let e = {};
|
|
2457
|
-
for (let [t,
|
|
2457
|
+
for (let [t, n] of Object.entries(s))
|
|
2458
2458
|
switch (t) {
|
|
2459
2459
|
case "grpc-message":
|
|
2460
2460
|
case "grpc-status":
|
|
2461
2461
|
case "content-type":
|
|
2462
2462
|
break;
|
|
2463
2463
|
default:
|
|
2464
|
-
e[t] =
|
|
2464
|
+
e[t] = n;
|
|
2465
2465
|
}
|
|
2466
2466
|
return e;
|
|
2467
2467
|
}
|
|
@@ -2471,19 +2471,19 @@ function Hi(s) {
|
|
|
2471
2471
|
`)) {
|
|
2472
2472
|
if (t == "")
|
|
2473
2473
|
continue;
|
|
2474
|
-
let [
|
|
2475
|
-
const i =
|
|
2476
|
-
|
|
2477
|
-
let o = e[
|
|
2478
|
-
typeof o == "string" ? e[
|
|
2474
|
+
let [n, ...r] = t.split(":");
|
|
2475
|
+
const i = r.join(":").trim();
|
|
2476
|
+
n = n.trim();
|
|
2477
|
+
let o = e[n];
|
|
2478
|
+
typeof o == "string" ? e[n] = [o, i] : Array.isArray(o) ? o.push(i) : e[n] = i;
|
|
2479
2479
|
}
|
|
2480
2480
|
return e;
|
|
2481
2481
|
}
|
|
2482
2482
|
function $i(s) {
|
|
2483
2483
|
let e = {};
|
|
2484
|
-
return s.forEach((t,
|
|
2485
|
-
let
|
|
2486
|
-
typeof
|
|
2484
|
+
return s.forEach((t, n) => {
|
|
2485
|
+
let r = e[n];
|
|
2486
|
+
typeof r == "string" ? e[n] = [r, t] : Array.isArray(r) ? r.push(t) : e[n] = t;
|
|
2487
2487
|
}), e;
|
|
2488
2488
|
}
|
|
2489
2489
|
function Pi(s) {
|
|
@@ -2542,8 +2542,8 @@ class Wi {
|
|
|
2542
2542
|
* All names are used exactly like declared in .proto.
|
|
2543
2543
|
*/
|
|
2544
2544
|
makeUrl(e, t) {
|
|
2545
|
-
let
|
|
2546
|
-
return
|
|
2545
|
+
let n = t.baseUrl;
|
|
2546
|
+
return n.endsWith("/") && (n = n.substring(0, n.length - 1)), `${n}/${e.service.typeName}/${e.name}`;
|
|
2547
2547
|
}
|
|
2548
2548
|
clientStreaming(e) {
|
|
2549
2549
|
const t = new se("Client streaming is not supported by grpc-web", W[W.UNIMPLEMENTED]);
|
|
@@ -2553,14 +2553,14 @@ class Wi {
|
|
|
2553
2553
|
const t = new se("Duplex streaming is not supported by grpc-web", W[W.UNIMPLEMENTED]);
|
|
2554
2554
|
throw t.methodName = e.name, t.serviceName = e.service.typeName, t;
|
|
2555
2555
|
}
|
|
2556
|
-
serverStreaming(e, t,
|
|
2557
|
-
var
|
|
2558
|
-
let c =
|
|
2556
|
+
serverStreaming(e, t, n) {
|
|
2557
|
+
var r, i, o, a;
|
|
2558
|
+
let c = n, d = (r = c.format) !== null && r !== void 0 ? r : "text", l = (i = c.fetchInit) !== null && i !== void 0 ? i : {}, u = this.makeUrl(e, c), h = e.I.toBinary(t, c.binaryOptions), f = new vt(), y = new _i(), k = !0, T, C = new vt(), R, O = new vt();
|
|
2559
2559
|
return globalThis.fetch(u, Object.assign(Object.assign({}, l), {
|
|
2560
2560
|
method: "POST",
|
|
2561
2561
|
headers: ar(new globalThis.Headers(), d, c.timeout, c.meta),
|
|
2562
2562
|
body: lr(h, d),
|
|
2563
|
-
signal: (o =
|
|
2563
|
+
signal: (o = n.abort) !== null && o !== void 0 ? o : null
|
|
2564
2564
|
// node-fetch@3.0.0-beta.9 rejects `undefined`
|
|
2565
2565
|
})).then((F) => {
|
|
2566
2566
|
let [U, b, B] = Wn(F);
|
|
@@ -2600,14 +2600,14 @@ class Wi {
|
|
|
2600
2600
|
F instanceof se ? U = F : F instanceof Error && F.name === "AbortError" ? U = new se(F.message, W[W.CANCELLED]) : U = new se(F instanceof Error ? F.message : "" + F, W[W.INTERNAL]), U.methodName = e.name, U.serviceName = e.service.typeName, f.rejectPending(U), y.notifyError(U), C.rejectPending(U), O.rejectPending(U);
|
|
2601
2601
|
}), new Ri(e, (a = c.meta) !== null && a !== void 0 ? a : {}, t, f.promise, y, C.promise, O.promise);
|
|
2602
2602
|
}
|
|
2603
|
-
unary(e, t,
|
|
2604
|
-
var
|
|
2605
|
-
let c =
|
|
2603
|
+
unary(e, t, n) {
|
|
2604
|
+
var r, i, o, a;
|
|
2605
|
+
let c = n, d = (r = c.format) !== null && r !== void 0 ? r : "text", l = (i = c.fetchInit) !== null && i !== void 0 ? i : {}, u = this.makeUrl(e, c), h = e.I.toBinary(t, c.binaryOptions), f = new vt(), y, k = new vt(), T, C = new vt(), R, O = new vt();
|
|
2606
2606
|
return globalThis.fetch(u, Object.assign(Object.assign({}, l), {
|
|
2607
2607
|
method: "POST",
|
|
2608
2608
|
headers: ar(new globalThis.Headers(), d, c.timeout, c.meta),
|
|
2609
2609
|
body: lr(h, d),
|
|
2610
|
-
signal: (o =
|
|
2610
|
+
signal: (o = n.abort) !== null && o !== void 0 ? o : null
|
|
2611
2611
|
// node-fetch@3.0.0-beta.9 rejects `undefined`
|
|
2612
2612
|
})).then((F) => {
|
|
2613
2613
|
let [U, b, B] = Wn(F);
|
|
@@ -2685,8 +2685,8 @@ class ji extends Ie {
|
|
|
2685
2685
|
const t = globalThis.Object.create(this.messagePrototype);
|
|
2686
2686
|
return t.searchValue = "", t.cursor = "", t.limit = 0, e !== void 0 && ve(this, t, e), t;
|
|
2687
2687
|
}
|
|
2688
|
-
internalBinaryRead(e, t,
|
|
2689
|
-
let i =
|
|
2688
|
+
internalBinaryRead(e, t, n, r) {
|
|
2689
|
+
let i = r ?? this.create(), o = e.pos + t;
|
|
2690
2690
|
for (; e.pos < o; ) {
|
|
2691
2691
|
let [a, c] = e.tag();
|
|
2692
2692
|
switch (a) {
|
|
@@ -2703,7 +2703,7 @@ class ji extends Ie {
|
|
|
2703
2703
|
i.limit = e.int32();
|
|
2704
2704
|
break;
|
|
2705
2705
|
default:
|
|
2706
|
-
let d =
|
|
2706
|
+
let d = n.readUnknownField;
|
|
2707
2707
|
if (d === "throw")
|
|
2708
2708
|
throw new globalThis.Error(`Unknown field ${a} (wire type ${c}) for ${this.typeName}`);
|
|
2709
2709
|
let l = e.skip(c);
|
|
@@ -2712,10 +2712,10 @@ class ji extends Ie {
|
|
|
2712
2712
|
}
|
|
2713
2713
|
return i;
|
|
2714
2714
|
}
|
|
2715
|
-
internalBinaryWrite(e, t,
|
|
2715
|
+
internalBinaryWrite(e, t, n) {
|
|
2716
2716
|
e.searchValue !== "" && t.tag(1, j.LengthDelimited).string(e.searchValue), e.cursor !== "" && t.tag(2, j.LengthDelimited).string(e.cursor), e.limit !== 0 && t.tag(3, j.Varint).int32(e.limit);
|
|
2717
|
-
let
|
|
2718
|
-
return
|
|
2717
|
+
let r = n.writeUnknownFields;
|
|
2718
|
+
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
2719
2719
|
}
|
|
2720
2720
|
}
|
|
2721
2721
|
const Or = new ji();
|
|
@@ -2736,21 +2736,21 @@ class qi extends Ie {
|
|
|
2736
2736
|
const t = globalThis.Object.create(this.messagePrototype);
|
|
2737
2737
|
return t.items = [], t.nextPageCursor = "", e !== void 0 && ve(this, t, e), t;
|
|
2738
2738
|
}
|
|
2739
|
-
internalBinaryRead(e, t,
|
|
2740
|
-
let i =
|
|
2739
|
+
internalBinaryRead(e, t, n, r) {
|
|
2740
|
+
let i = r ?? this.create(), o = e.pos + t;
|
|
2741
2741
|
for (; e.pos < o; ) {
|
|
2742
2742
|
let [a, c] = e.tag();
|
|
2743
2743
|
switch (a) {
|
|
2744
2744
|
case /* repeated com.hamropatro.grpc.common.File items */
|
|
2745
2745
|
1:
|
|
2746
|
-
i.items.push(et.internalBinaryRead(e, e.uint32(),
|
|
2746
|
+
i.items.push(et.internalBinaryRead(e, e.uint32(), n));
|
|
2747
2747
|
break;
|
|
2748
2748
|
case /* string next_page_cursor */
|
|
2749
2749
|
2:
|
|
2750
2750
|
i.nextPageCursor = e.string();
|
|
2751
2751
|
break;
|
|
2752
2752
|
default:
|
|
2753
|
-
let d =
|
|
2753
|
+
let d = n.readUnknownField;
|
|
2754
2754
|
if (d === "throw")
|
|
2755
2755
|
throw new globalThis.Error(`Unknown field ${a} (wire type ${c}) for ${this.typeName}`);
|
|
2756
2756
|
let l = e.skip(c);
|
|
@@ -2759,12 +2759,12 @@ class qi extends Ie {
|
|
|
2759
2759
|
}
|
|
2760
2760
|
return i;
|
|
2761
2761
|
}
|
|
2762
|
-
internalBinaryWrite(e, t,
|
|
2762
|
+
internalBinaryWrite(e, t, n) {
|
|
2763
2763
|
for (let i = 0; i < e.items.length; i++)
|
|
2764
|
-
et.internalBinaryWrite(e.items[i], t.tag(1, j.LengthDelimited).fork(),
|
|
2764
|
+
et.internalBinaryWrite(e.items[i], t.tag(1, j.LengthDelimited).fork(), n).join();
|
|
2765
2765
|
e.nextPageCursor !== "" && t.tag(2, j.LengthDelimited).string(e.nextPageCursor);
|
|
2766
|
-
let
|
|
2767
|
-
return
|
|
2766
|
+
let r = n.writeUnknownFields;
|
|
2767
|
+
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
2768
2768
|
}
|
|
2769
2769
|
}
|
|
2770
2770
|
const Zi = new qi();
|
|
@@ -2813,8 +2813,8 @@ class Ki extends Ie {
|
|
|
2813
2813
|
const t = globalThis.Object.create(this.messagePrototype);
|
|
2814
2814
|
return t.name = "", t.folderName = "", t.nestedFolderName = "", t.url = "", t.type = 0, t.extension = "", e !== void 0 && ve(this, t, e), t;
|
|
2815
2815
|
}
|
|
2816
|
-
internalBinaryRead(e, t,
|
|
2817
|
-
let i =
|
|
2816
|
+
internalBinaryRead(e, t, n, r) {
|
|
2817
|
+
let i = r ?? this.create(), o = e.pos + t;
|
|
2818
2818
|
for (; e.pos < o; ) {
|
|
2819
2819
|
let [a, c] = e.tag();
|
|
2820
2820
|
switch (a) {
|
|
@@ -2843,7 +2843,7 @@ class Ki extends Ie {
|
|
|
2843
2843
|
i.extension = e.string();
|
|
2844
2844
|
break;
|
|
2845
2845
|
default:
|
|
2846
|
-
let d =
|
|
2846
|
+
let d = n.readUnknownField;
|
|
2847
2847
|
if (d === "throw")
|
|
2848
2848
|
throw new globalThis.Error(`Unknown field ${a} (wire type ${c}) for ${this.typeName}`);
|
|
2849
2849
|
let l = e.skip(c);
|
|
@@ -2852,10 +2852,10 @@ class Ki extends Ie {
|
|
|
2852
2852
|
}
|
|
2853
2853
|
return i;
|
|
2854
2854
|
}
|
|
2855
|
-
internalBinaryWrite(e, t,
|
|
2855
|
+
internalBinaryWrite(e, t, n) {
|
|
2856
2856
|
e.name !== "" && t.tag(1, j.LengthDelimited).string(e.name), e.folderName !== "" && t.tag(2, j.LengthDelimited).string(e.folderName), e.nestedFolderName !== "" && t.tag(3, j.LengthDelimited).string(e.nestedFolderName), e.url !== "" && t.tag(4, j.LengthDelimited).string(e.url), e.type !== 0 && t.tag(5, j.Varint).int32(e.type), e.extension !== "" && t.tag(6, j.LengthDelimited).string(e.extension);
|
|
2857
|
-
let
|
|
2858
|
-
return
|
|
2857
|
+
let r = n.writeUnknownFields;
|
|
2858
|
+
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
2859
2859
|
}
|
|
2860
2860
|
}
|
|
2861
2861
|
const Sr = new Ki();
|
|
@@ -2883,8 +2883,8 @@ class zi extends Ie {
|
|
|
2883
2883
|
const t = globalThis.Object.create(this.messagePrototype);
|
|
2884
2884
|
return t.url = "", t.type = 0, t.extension = "", e !== void 0 && ve(this, t, e), t;
|
|
2885
2885
|
}
|
|
2886
|
-
internalBinaryRead(e, t,
|
|
2887
|
-
let i =
|
|
2886
|
+
internalBinaryRead(e, t, n, r) {
|
|
2887
|
+
let i = r ?? this.create(), o = e.pos + t;
|
|
2888
2888
|
for (; e.pos < o; ) {
|
|
2889
2889
|
let [a, c] = e.tag();
|
|
2890
2890
|
switch (a) {
|
|
@@ -2901,7 +2901,7 @@ class zi extends Ie {
|
|
|
2901
2901
|
i.extension = e.string();
|
|
2902
2902
|
break;
|
|
2903
2903
|
default:
|
|
2904
|
-
let d =
|
|
2904
|
+
let d = n.readUnknownField;
|
|
2905
2905
|
if (d === "throw")
|
|
2906
2906
|
throw new globalThis.Error(`Unknown field ${a} (wire type ${c}) for ${this.typeName}`);
|
|
2907
2907
|
let l = e.skip(c);
|
|
@@ -2910,10 +2910,10 @@ class zi extends Ie {
|
|
|
2910
2910
|
}
|
|
2911
2911
|
return i;
|
|
2912
2912
|
}
|
|
2913
|
-
internalBinaryWrite(e, t,
|
|
2913
|
+
internalBinaryWrite(e, t, n) {
|
|
2914
2914
|
e.url !== "" && t.tag(1, j.LengthDelimited).string(e.url), e.type !== 0 && t.tag(2, j.Varint).int32(e.type), e.extension !== "" && t.tag(3, j.LengthDelimited).string(e.extension);
|
|
2915
|
-
let
|
|
2916
|
-
return
|
|
2915
|
+
let r = n.writeUnknownFields;
|
|
2916
|
+
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
2917
2917
|
}
|
|
2918
2918
|
}
|
|
2919
2919
|
const zn = new zi();
|
|
@@ -2977,8 +2977,8 @@ class Xi extends Ie {
|
|
|
2977
2977
|
const t = globalThis.Object.create(this.messagePrototype);
|
|
2978
2978
|
return t.key = "", t.name = "", t.folderName = "", t.nestedFolderName = "", t.url = "", t.thumborUrl = "", t.proxyUrl = "", t.type = 0, e !== void 0 && ve(this, t, e), t;
|
|
2979
2979
|
}
|
|
2980
|
-
internalBinaryRead(e, t,
|
|
2981
|
-
let i =
|
|
2980
|
+
internalBinaryRead(e, t, n, r) {
|
|
2981
|
+
let i = r ?? this.create(), o = e.pos + t;
|
|
2982
2982
|
for (; e.pos < o; ) {
|
|
2983
2983
|
let [a, c] = e.tag();
|
|
2984
2984
|
switch (a) {
|
|
@@ -3016,10 +3016,10 @@ class Xi extends Ie {
|
|
|
3016
3016
|
break;
|
|
3017
3017
|
case /* com.hamropatro.grpc.common.FileMetadata metadata */
|
|
3018
3018
|
9:
|
|
3019
|
-
i.metadata = xn.internalBinaryRead(e, e.uint32(),
|
|
3019
|
+
i.metadata = xn.internalBinaryRead(e, e.uint32(), n, i.metadata);
|
|
3020
3020
|
break;
|
|
3021
3021
|
default:
|
|
3022
|
-
let d =
|
|
3022
|
+
let d = n.readUnknownField;
|
|
3023
3023
|
if (d === "throw")
|
|
3024
3024
|
throw new globalThis.Error(`Unknown field ${a} (wire type ${c}) for ${this.typeName}`);
|
|
3025
3025
|
let l = e.skip(c);
|
|
@@ -3028,10 +3028,10 @@ class Xi extends Ie {
|
|
|
3028
3028
|
}
|
|
3029
3029
|
return i;
|
|
3030
3030
|
}
|
|
3031
|
-
internalBinaryWrite(e, t,
|
|
3032
|
-
e.key !== "" && t.tag(1, j.LengthDelimited).string(e.key), e.name !== "" && t.tag(2, j.LengthDelimited).string(e.name), e.folderName !== "" && t.tag(3, j.LengthDelimited).string(e.folderName), e.nestedFolderName !== "" && t.tag(4, j.LengthDelimited).string(e.nestedFolderName), e.url !== "" && t.tag(5, j.LengthDelimited).string(e.url), e.thumborUrl !== "" && t.tag(6, j.LengthDelimited).string(e.thumborUrl), e.proxyUrl !== "" && t.tag(7, j.LengthDelimited).string(e.proxyUrl), e.type !== 0 && t.tag(8, j.Varint).int32(e.type), e.metadata && xn.internalBinaryWrite(e.metadata, t.tag(9, j.LengthDelimited).fork(),
|
|
3033
|
-
let
|
|
3034
|
-
return
|
|
3031
|
+
internalBinaryWrite(e, t, n) {
|
|
3032
|
+
e.key !== "" && t.tag(1, j.LengthDelimited).string(e.key), e.name !== "" && t.tag(2, j.LengthDelimited).string(e.name), e.folderName !== "" && t.tag(3, j.LengthDelimited).string(e.folderName), e.nestedFolderName !== "" && t.tag(4, j.LengthDelimited).string(e.nestedFolderName), e.url !== "" && t.tag(5, j.LengthDelimited).string(e.url), e.thumborUrl !== "" && t.tag(6, j.LengthDelimited).string(e.thumborUrl), e.proxyUrl !== "" && t.tag(7, j.LengthDelimited).string(e.proxyUrl), e.type !== 0 && t.tag(8, j.Varint).int32(e.type), e.metadata && xn.internalBinaryWrite(e.metadata, t.tag(9, j.LengthDelimited).fork(), n).join();
|
|
3033
|
+
let r = n.writeUnknownFields;
|
|
3034
|
+
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
3035
3035
|
}
|
|
3036
3036
|
}
|
|
3037
3037
|
const et = new Xi();
|
|
@@ -3072,8 +3072,8 @@ class Gi extends Ie {
|
|
|
3072
3072
|
const t = globalThis.Object.create(this.messagePrototype);
|
|
3073
3073
|
return t.height = 0, t.width = 0, t.backgroundColor = "", t.aspectRatio = 0, e !== void 0 && ve(this, t, e), t;
|
|
3074
3074
|
}
|
|
3075
|
-
internalBinaryRead(e, t,
|
|
3076
|
-
let i =
|
|
3075
|
+
internalBinaryRead(e, t, n, r) {
|
|
3076
|
+
let i = r ?? this.create(), o = e.pos + t;
|
|
3077
3077
|
for (; e.pos < o; ) {
|
|
3078
3078
|
let [a, c] = e.tag();
|
|
3079
3079
|
switch (a) {
|
|
@@ -3094,7 +3094,7 @@ class Gi extends Ie {
|
|
|
3094
3094
|
i.aspectRatio = e.double();
|
|
3095
3095
|
break;
|
|
3096
3096
|
default:
|
|
3097
|
-
let d =
|
|
3097
|
+
let d = n.readUnknownField;
|
|
3098
3098
|
if (d === "throw")
|
|
3099
3099
|
throw new globalThis.Error(`Unknown field ${a} (wire type ${c}) for ${this.typeName}`);
|
|
3100
3100
|
let l = e.skip(c);
|
|
@@ -3103,10 +3103,10 @@ class Gi extends Ie {
|
|
|
3103
3103
|
}
|
|
3104
3104
|
return i;
|
|
3105
3105
|
}
|
|
3106
|
-
internalBinaryWrite(e, t,
|
|
3106
|
+
internalBinaryWrite(e, t, n) {
|
|
3107
3107
|
e.height !== 0 && t.tag(1, j.Varint).int32(e.height), e.width !== 0 && t.tag(2, j.Varint).int32(e.width), e.backgroundColor !== "" && t.tag(3, j.LengthDelimited).string(e.backgroundColor), e.aspectRatio !== 0 && t.tag(4, j.Bit64).double(e.aspectRatio);
|
|
3108
|
-
let
|
|
3109
|
-
return
|
|
3108
|
+
let r = n.writeUnknownFields;
|
|
3109
|
+
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
3110
3110
|
}
|
|
3111
3111
|
}
|
|
3112
3112
|
const xn = new Gi();
|
|
@@ -3126,8 +3126,8 @@ class Ji extends Ie {
|
|
|
3126
3126
|
const t = globalThis.Object.create(this.messagePrototype);
|
|
3127
3127
|
return t.key = "", e !== void 0 && ve(this, t, e), t;
|
|
3128
3128
|
}
|
|
3129
|
-
internalBinaryRead(e, t,
|
|
3130
|
-
let i =
|
|
3129
|
+
internalBinaryRead(e, t, n, r) {
|
|
3130
|
+
let i = r ?? this.create(), o = e.pos + t;
|
|
3131
3131
|
for (; e.pos < o; ) {
|
|
3132
3132
|
let [a, c] = e.tag();
|
|
3133
3133
|
switch (a) {
|
|
@@ -3136,7 +3136,7 @@ class Ji extends Ie {
|
|
|
3136
3136
|
i.key = e.string();
|
|
3137
3137
|
break;
|
|
3138
3138
|
default:
|
|
3139
|
-
let d =
|
|
3139
|
+
let d = n.readUnknownField;
|
|
3140
3140
|
if (d === "throw")
|
|
3141
3141
|
throw new globalThis.Error(`Unknown field ${a} (wire type ${c}) for ${this.typeName}`);
|
|
3142
3142
|
let l = e.skip(c);
|
|
@@ -3145,10 +3145,10 @@ class Ji extends Ie {
|
|
|
3145
3145
|
}
|
|
3146
3146
|
return i;
|
|
3147
3147
|
}
|
|
3148
|
-
internalBinaryWrite(e, t,
|
|
3148
|
+
internalBinaryWrite(e, t, n) {
|
|
3149
3149
|
e.key !== "" && t.tag(1, j.LengthDelimited).string(e.key);
|
|
3150
|
-
let
|
|
3151
|
-
return
|
|
3150
|
+
let r = n.writeUnknownFields;
|
|
3151
|
+
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
3152
3152
|
}
|
|
3153
3153
|
}
|
|
3154
3154
|
const Rr = new Ji();
|
|
@@ -3168,8 +3168,8 @@ class Qi extends Ie {
|
|
|
3168
3168
|
const t = globalThis.Object.create(this.messagePrototype);
|
|
3169
3169
|
return t.isDeleted = !1, e !== void 0 && ve(this, t, e), t;
|
|
3170
3170
|
}
|
|
3171
|
-
internalBinaryRead(e, t,
|
|
3172
|
-
let i =
|
|
3171
|
+
internalBinaryRead(e, t, n, r) {
|
|
3172
|
+
let i = r ?? this.create(), o = e.pos + t;
|
|
3173
3173
|
for (; e.pos < o; ) {
|
|
3174
3174
|
let [a, c] = e.tag();
|
|
3175
3175
|
switch (a) {
|
|
@@ -3178,7 +3178,7 @@ class Qi extends Ie {
|
|
|
3178
3178
|
i.isDeleted = e.bool();
|
|
3179
3179
|
break;
|
|
3180
3180
|
default:
|
|
3181
|
-
let d =
|
|
3181
|
+
let d = n.readUnknownField;
|
|
3182
3182
|
if (d === "throw")
|
|
3183
3183
|
throw new globalThis.Error(`Unknown field ${a} (wire type ${c}) for ${this.typeName}`);
|
|
3184
3184
|
let l = e.skip(c);
|
|
@@ -3187,10 +3187,10 @@ class Qi extends Ie {
|
|
|
3187
3187
|
}
|
|
3188
3188
|
return i;
|
|
3189
3189
|
}
|
|
3190
|
-
internalBinaryWrite(e, t,
|
|
3190
|
+
internalBinaryWrite(e, t, n) {
|
|
3191
3191
|
e.isDeleted !== !1 && t.tag(1, j.Varint).bool(e.isDeleted);
|
|
3192
|
-
let
|
|
3193
|
-
return
|
|
3192
|
+
let r = n.writeUnknownFields;
|
|
3193
|
+
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
3194
3194
|
}
|
|
3195
3195
|
}
|
|
3196
3196
|
const Yi = new Qi();
|
|
@@ -3224,8 +3224,8 @@ class es extends Ie {
|
|
|
3224
3224
|
const t = globalThis.Object.create(this.messagePrototype);
|
|
3225
3225
|
return t.folderName = "", t.cursor = "", t.limit = 0, e !== void 0 && ve(this, t, e), t;
|
|
3226
3226
|
}
|
|
3227
|
-
internalBinaryRead(e, t,
|
|
3228
|
-
let i =
|
|
3227
|
+
internalBinaryRead(e, t, n, r) {
|
|
3228
|
+
let i = r ?? this.create(), o = e.pos + t;
|
|
3229
3229
|
for (; e.pos < o; ) {
|
|
3230
3230
|
let [a, c] = e.tag();
|
|
3231
3231
|
switch (a) {
|
|
@@ -3242,7 +3242,7 @@ class es extends Ie {
|
|
|
3242
3242
|
i.limit = e.int32();
|
|
3243
3243
|
break;
|
|
3244
3244
|
default:
|
|
3245
|
-
let d =
|
|
3245
|
+
let d = n.readUnknownField;
|
|
3246
3246
|
if (d === "throw")
|
|
3247
3247
|
throw new globalThis.Error(`Unknown field ${a} (wire type ${c}) for ${this.typeName}`);
|
|
3248
3248
|
let l = e.skip(c);
|
|
@@ -3251,10 +3251,10 @@ class es extends Ie {
|
|
|
3251
3251
|
}
|
|
3252
3252
|
return i;
|
|
3253
3253
|
}
|
|
3254
|
-
internalBinaryWrite(e, t,
|
|
3254
|
+
internalBinaryWrite(e, t, n) {
|
|
3255
3255
|
e.folderName !== "" && t.tag(1, j.LengthDelimited).string(e.folderName), e.cursor !== "" && t.tag(2, j.LengthDelimited).string(e.cursor), e.limit !== 0 && t.tag(3, j.Varint).int32(e.limit);
|
|
3256
|
-
let
|
|
3257
|
-
return
|
|
3256
|
+
let r = n.writeUnknownFields;
|
|
3257
|
+
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
3258
3258
|
}
|
|
3259
3259
|
}
|
|
3260
3260
|
const Dr = new es();
|
|
@@ -3282,14 +3282,14 @@ class ts extends Ie {
|
|
|
3282
3282
|
const t = globalThis.Object.create(this.messagePrototype);
|
|
3283
3283
|
return t.files = [], t.nextCursor = "", t.hasMore = !1, e !== void 0 && ve(this, t, e), t;
|
|
3284
3284
|
}
|
|
3285
|
-
internalBinaryRead(e, t,
|
|
3286
|
-
let i =
|
|
3285
|
+
internalBinaryRead(e, t, n, r) {
|
|
3286
|
+
let i = r ?? this.create(), o = e.pos + t;
|
|
3287
3287
|
for (; e.pos < o; ) {
|
|
3288
3288
|
let [a, c] = e.tag();
|
|
3289
3289
|
switch (a) {
|
|
3290
3290
|
case /* repeated com.hamropatro.grpc.common.File files */
|
|
3291
3291
|
1:
|
|
3292
|
-
i.files.push(et.internalBinaryRead(e, e.uint32(),
|
|
3292
|
+
i.files.push(et.internalBinaryRead(e, e.uint32(), n));
|
|
3293
3293
|
break;
|
|
3294
3294
|
case /* string next_cursor */
|
|
3295
3295
|
2:
|
|
@@ -3300,7 +3300,7 @@ class ts extends Ie {
|
|
|
3300
3300
|
i.hasMore = e.bool();
|
|
3301
3301
|
break;
|
|
3302
3302
|
default:
|
|
3303
|
-
let d =
|
|
3303
|
+
let d = n.readUnknownField;
|
|
3304
3304
|
if (d === "throw")
|
|
3305
3305
|
throw new globalThis.Error(`Unknown field ${a} (wire type ${c}) for ${this.typeName}`);
|
|
3306
3306
|
let l = e.skip(c);
|
|
@@ -3309,12 +3309,12 @@ class ts extends Ie {
|
|
|
3309
3309
|
}
|
|
3310
3310
|
return i;
|
|
3311
3311
|
}
|
|
3312
|
-
internalBinaryWrite(e, t,
|
|
3312
|
+
internalBinaryWrite(e, t, n) {
|
|
3313
3313
|
for (let i = 0; i < e.files.length; i++)
|
|
3314
|
-
et.internalBinaryWrite(e.files[i], t.tag(1, j.LengthDelimited).fork(),
|
|
3314
|
+
et.internalBinaryWrite(e.files[i], t.tag(1, j.LengthDelimited).fork(), n).join();
|
|
3315
3315
|
e.nextCursor !== "" && t.tag(2, j.LengthDelimited).string(e.nextCursor), e.hasMore !== !1 && t.tag(3, j.Varint).bool(e.hasMore);
|
|
3316
|
-
let
|
|
3317
|
-
return
|
|
3316
|
+
let r = n.writeUnknownFields;
|
|
3317
|
+
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
3318
3318
|
}
|
|
3319
3319
|
}
|
|
3320
3320
|
const ns = new ts(), _n = new Kn("com.hamropatro.grpc.common.FileService", [
|
|
@@ -3336,29 +3336,29 @@ class Dt {
|
|
|
3336
3336
|
* @generated from protobuf rpc: createFile(com.hamropatro.grpc.common.CreateFileRequest) returns (com.hamropatro.grpc.common.File);
|
|
3337
3337
|
*/
|
|
3338
3338
|
createFile(e, t) {
|
|
3339
|
-
const
|
|
3340
|
-
return $e("unary", this._transport,
|
|
3339
|
+
const n = this.methods[0], r = this._transport.mergeOptions(t);
|
|
3340
|
+
return $e("unary", this._transport, n, r, 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
|
-
const
|
|
3347
|
-
return $e("unary", this._transport,
|
|
3346
|
+
const n = this.methods[1], r = this._transport.mergeOptions(t);
|
|
3347
|
+
return $e("unary", this._transport, n, r, 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
|
-
const
|
|
3354
|
-
return $e("unary", this._transport,
|
|
3353
|
+
const n = this.methods[2], r = this._transport.mergeOptions(t);
|
|
3354
|
+
return $e("unary", this._transport, n, r, 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
|
-
const
|
|
3361
|
-
return $e("unary", this._transport,
|
|
3360
|
+
const n = this.methods[3], r = this._transport.mergeOptions(t);
|
|
3361
|
+
return $e("unary", this._transport, n, r, e);
|
|
3362
3362
|
}
|
|
3363
3363
|
/**
|
|
3364
3364
|
* user sepecific file
|
|
@@ -3366,22 +3366,22 @@ class Dt {
|
|
|
3366
3366
|
* @generated from protobuf rpc: createUserFile(com.hamropatro.grpc.common.CreateUserFileRequest) returns (com.hamropatro.grpc.common.File);
|
|
3367
3367
|
*/
|
|
3368
3368
|
createUserFile(e, t) {
|
|
3369
|
-
const
|
|
3370
|
-
return $e("unary", this._transport,
|
|
3369
|
+
const n = this.methods[4], r = this._transport.mergeOptions(t);
|
|
3370
|
+
return $e("unary", this._transport, n, r, 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
|
-
const
|
|
3377
|
-
return $e("unary", this._transport,
|
|
3376
|
+
const n = this.methods[5], r = this._transport.mergeOptions(t);
|
|
3377
|
+
return $e("unary", this._transport, n, r, e);
|
|
3378
3378
|
}
|
|
3379
3379
|
}
|
|
3380
|
-
const rs = async (s, e, t,
|
|
3380
|
+
const rs = async (s, e, t, n, r, i) => {
|
|
3381
3381
|
var o;
|
|
3382
3382
|
try {
|
|
3383
3383
|
const a = (o = window.ImageSalonSDK) == null ? void 0 : o.grpcConfig, c = new Dt(a), d = Sr.create();
|
|
3384
|
-
return d.name = s, d.nestedFolderName = e, d.url = t, d.type =
|
|
3384
|
+
return d.name = s, d.nestedFolderName = e, d.url = t, d.type = n, d.folderName = r, await c.createFile(
|
|
3385
3385
|
d,
|
|
3386
3386
|
i
|
|
3387
3387
|
);
|
|
@@ -3389,59 +3389,59 @@ const rs = async (s, e, t, r, n, i) => {
|
|
|
3389
3389
|
throw a;
|
|
3390
3390
|
}
|
|
3391
3391
|
}, is = async (s, e, t) => {
|
|
3392
|
-
var
|
|
3392
|
+
var n;
|
|
3393
3393
|
try {
|
|
3394
|
-
const
|
|
3394
|
+
const r = (n = window.ImageSalonSDK) == null ? void 0 : n.grpcConfig, i = new Dt(r), o = zn.create();
|
|
3395
3395
|
return o.url = s, o.type = e, await i.createUserFile(
|
|
3396
3396
|
o,
|
|
3397
3397
|
t
|
|
3398
3398
|
);
|
|
3399
|
-
} catch (
|
|
3400
|
-
throw
|
|
3399
|
+
} catch (r) {
|
|
3400
|
+
throw r;
|
|
3401
3401
|
}
|
|
3402
|
-
}, ss = async (s, e, t,
|
|
3403
|
-
var
|
|
3402
|
+
}, ss = async (s, e, t, n) => {
|
|
3403
|
+
var r;
|
|
3404
3404
|
try {
|
|
3405
|
-
const i = (
|
|
3405
|
+
const i = (r = window.ImageSalonSDK) == null ? void 0 : r.grpcConfig, o = new Dt(i), a = zn.create();
|
|
3406
3406
|
return a.url = s, a.type = e, await o.createUserFile(
|
|
3407
3407
|
a,
|
|
3408
3408
|
{
|
|
3409
3409
|
meta: {
|
|
3410
3410
|
Authorization: t,
|
|
3411
|
-
"app-id":
|
|
3411
|
+
"app-id": n === "production" ? "hamropatro" : "hamropatro-android"
|
|
3412
3412
|
}
|
|
3413
3413
|
}
|
|
3414
3414
|
);
|
|
3415
3415
|
} catch (i) {
|
|
3416
3416
|
throw i;
|
|
3417
3417
|
}
|
|
3418
|
-
}, os = async (s, e, t,
|
|
3419
|
-
var
|
|
3418
|
+
}, os = async (s, e, t, n) => {
|
|
3419
|
+
var r;
|
|
3420
3420
|
try {
|
|
3421
|
-
const i = (
|
|
3421
|
+
const i = (r = window.ImageSalonSDK) == null ? void 0 : r.grpcConfig, o = new Dt(i), a = Dr.create();
|
|
3422
3422
|
return a.folderName = s, a.cursor = e, a.limit = t, await o.getFilesByFolder(
|
|
3423
3423
|
a,
|
|
3424
|
-
|
|
3424
|
+
n
|
|
3425
3425
|
);
|
|
3426
3426
|
} catch (i) {
|
|
3427
3427
|
throw i;
|
|
3428
3428
|
}
|
|
3429
|
-
}, as = async (s, e, t = 20,
|
|
3430
|
-
var
|
|
3429
|
+
}, as = async (s, e, t = 20, n) => {
|
|
3430
|
+
var r;
|
|
3431
3431
|
try {
|
|
3432
|
-
const i = (
|
|
3432
|
+
const i = (r = window.ImageSalonSDK) == null ? void 0 : r.grpcConfig, o = new Dt(i), a = Or.create();
|
|
3433
3433
|
return a.searchValue = s, a.cursor = e, a.limit = t, await o.search(
|
|
3434
3434
|
a,
|
|
3435
|
-
|
|
3435
|
+
n
|
|
3436
3436
|
);
|
|
3437
3437
|
} catch (i) {
|
|
3438
3438
|
throw i;
|
|
3439
3439
|
}
|
|
3440
|
-
}, ls = async (s, e, t,
|
|
3440
|
+
}, ls = async (s, e, t, n, r, i, o, a, c) => {
|
|
3441
3441
|
var d;
|
|
3442
3442
|
try {
|
|
3443
3443
|
const l = (d = window.ImageSalonSDK) == null ? void 0 : d.grpcConfig, u = new Dt(l), h = et.create();
|
|
3444
|
-
return h.key = s, h.name = e, h.nestedFolderName = t, h.url =
|
|
3444
|
+
return h.key = s, h.name = e, h.nestedFolderName = t, h.url = n, h.thumborUrl = r, h.proxyUrl = i, h.type = o, h.folderName = a, await u.updateFile(
|
|
3445
3445
|
h,
|
|
3446
3446
|
c
|
|
3447
3447
|
);
|
|
@@ -3451,13 +3451,13 @@ const rs = async (s, e, t, r, n, i) => {
|
|
|
3451
3451
|
}, cs = async (s, e) => {
|
|
3452
3452
|
var t;
|
|
3453
3453
|
try {
|
|
3454
|
-
const
|
|
3455
|
-
return i.key = s, await
|
|
3454
|
+
const n = (t = window.ImageSalonSDK) == null ? void 0 : t.grpcConfig, r = new Dt(n), i = Rr.create();
|
|
3455
|
+
return i.key = s, await r.deleteFile(
|
|
3456
3456
|
i,
|
|
3457
3457
|
e
|
|
3458
3458
|
);
|
|
3459
|
-
} catch (
|
|
3460
|
-
throw
|
|
3459
|
+
} catch (n) {
|
|
3460
|
+
throw n;
|
|
3461
3461
|
}
|
|
3462
3462
|
};
|
|
3463
3463
|
class ds extends Ie {
|
|
@@ -3476,8 +3476,8 @@ class ds extends Ie {
|
|
|
3476
3476
|
const t = globalThis.Object.create(this.messagePrototype);
|
|
3477
3477
|
return t.key = "", e !== void 0 && ve(this, t, e), t;
|
|
3478
3478
|
}
|
|
3479
|
-
internalBinaryRead(e, t,
|
|
3480
|
-
let i =
|
|
3479
|
+
internalBinaryRead(e, t, n, r) {
|
|
3480
|
+
let i = r ?? this.create(), o = e.pos + t;
|
|
3481
3481
|
for (; e.pos < o; ) {
|
|
3482
3482
|
let [a, c] = e.tag();
|
|
3483
3483
|
switch (a) {
|
|
@@ -3486,7 +3486,7 @@ class ds extends Ie {
|
|
|
3486
3486
|
i.key = e.string();
|
|
3487
3487
|
break;
|
|
3488
3488
|
default:
|
|
3489
|
-
let d =
|
|
3489
|
+
let d = n.readUnknownField;
|
|
3490
3490
|
if (d === "throw")
|
|
3491
3491
|
throw new globalThis.Error(`Unknown field ${a} (wire type ${c}) for ${this.typeName}`);
|
|
3492
3492
|
let l = e.skip(c);
|
|
@@ -3495,10 +3495,10 @@ class ds extends Ie {
|
|
|
3495
3495
|
}
|
|
3496
3496
|
return i;
|
|
3497
3497
|
}
|
|
3498
|
-
internalBinaryWrite(e, t,
|
|
3498
|
+
internalBinaryWrite(e, t, n) {
|
|
3499
3499
|
e.key !== "" && t.tag(1, j.LengthDelimited).string(e.key);
|
|
3500
|
-
let
|
|
3501
|
-
return
|
|
3500
|
+
let r = n.writeUnknownFields;
|
|
3501
|
+
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
3502
3502
|
}
|
|
3503
3503
|
}
|
|
3504
3504
|
const Mr = new ds();
|
|
@@ -3532,8 +3532,8 @@ class hs extends Ie {
|
|
|
3532
3532
|
const t = globalThis.Object.create(this.messagePrototype);
|
|
3533
3533
|
return t.name = "", t.nestedFolderName = "", t.createdBy = "", e !== void 0 && ve(this, t, e), t;
|
|
3534
3534
|
}
|
|
3535
|
-
internalBinaryRead(e, t,
|
|
3536
|
-
let i =
|
|
3535
|
+
internalBinaryRead(e, t, n, r) {
|
|
3536
|
+
let i = r ?? this.create(), o = e.pos + t;
|
|
3537
3537
|
for (; e.pos < o; ) {
|
|
3538
3538
|
let [a, c] = e.tag();
|
|
3539
3539
|
switch (a) {
|
|
@@ -3550,7 +3550,7 @@ class hs extends Ie {
|
|
|
3550
3550
|
i.createdBy = e.string();
|
|
3551
3551
|
break;
|
|
3552
3552
|
default:
|
|
3553
|
-
let d =
|
|
3553
|
+
let d = n.readUnknownField;
|
|
3554
3554
|
if (d === "throw")
|
|
3555
3555
|
throw new globalThis.Error(`Unknown field ${a} (wire type ${c}) for ${this.typeName}`);
|
|
3556
3556
|
let l = e.skip(c);
|
|
@@ -3559,10 +3559,10 @@ class hs extends Ie {
|
|
|
3559
3559
|
}
|
|
3560
3560
|
return i;
|
|
3561
3561
|
}
|
|
3562
|
-
internalBinaryWrite(e, t,
|
|
3562
|
+
internalBinaryWrite(e, t, n) {
|
|
3563
3563
|
e.name !== "" && t.tag(1, j.LengthDelimited).string(e.name), e.nestedFolderName !== "" && t.tag(2, j.LengthDelimited).string(e.nestedFolderName), e.createdBy !== "" && t.tag(3, j.LengthDelimited).string(e.createdBy);
|
|
3564
|
-
let
|
|
3565
|
-
return
|
|
3564
|
+
let r = n.writeUnknownFields;
|
|
3565
|
+
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
3566
3566
|
}
|
|
3567
3567
|
}
|
|
3568
3568
|
const Vr = new hs();
|
|
@@ -3589,8 +3589,8 @@ class us extends Ie {
|
|
|
3589
3589
|
const t = globalThis.Object.create(this.messagePrototype);
|
|
3590
3590
|
return t.cursor = "", t.limit = 0, e !== void 0 && ve(this, t, e), t;
|
|
3591
3591
|
}
|
|
3592
|
-
internalBinaryRead(e, t,
|
|
3593
|
-
let i =
|
|
3592
|
+
internalBinaryRead(e, t, n, r) {
|
|
3593
|
+
let i = r ?? this.create(), o = e.pos + t;
|
|
3594
3594
|
for (; e.pos < o; ) {
|
|
3595
3595
|
let [a, c] = e.tag();
|
|
3596
3596
|
switch (a) {
|
|
@@ -3603,7 +3603,7 @@ class us extends Ie {
|
|
|
3603
3603
|
i.limit = e.int32();
|
|
3604
3604
|
break;
|
|
3605
3605
|
default:
|
|
3606
|
-
let d =
|
|
3606
|
+
let d = n.readUnknownField;
|
|
3607
3607
|
if (d === "throw")
|
|
3608
3608
|
throw new globalThis.Error(`Unknown field ${a} (wire type ${c}) for ${this.typeName}`);
|
|
3609
3609
|
let l = e.skip(c);
|
|
@@ -3612,10 +3612,10 @@ class us extends Ie {
|
|
|
3612
3612
|
}
|
|
3613
3613
|
return i;
|
|
3614
3614
|
}
|
|
3615
|
-
internalBinaryWrite(e, t,
|
|
3615
|
+
internalBinaryWrite(e, t, n) {
|
|
3616
3616
|
e.cursor !== "" && t.tag(1, j.LengthDelimited).string(e.cursor), e.limit !== 0 && t.tag(2, j.Varint).int32(e.limit);
|
|
3617
|
-
let
|
|
3618
|
-
return
|
|
3617
|
+
let r = n.writeUnknownFields;
|
|
3618
|
+
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
3619
3619
|
}
|
|
3620
3620
|
}
|
|
3621
3621
|
const Hr = new us();
|
|
@@ -3643,14 +3643,14 @@ class fs extends Ie {
|
|
|
3643
3643
|
const t = globalThis.Object.create(this.messagePrototype);
|
|
3644
3644
|
return t.folder = [], t.nextCursor = "", t.hasMore = !1, e !== void 0 && ve(this, t, e), t;
|
|
3645
3645
|
}
|
|
3646
|
-
internalBinaryRead(e, t,
|
|
3647
|
-
let i =
|
|
3646
|
+
internalBinaryRead(e, t, n, r) {
|
|
3647
|
+
let i = r ?? this.create(), o = e.pos + t;
|
|
3648
3648
|
for (; e.pos < o; ) {
|
|
3649
3649
|
let [a, c] = e.tag();
|
|
3650
3650
|
switch (a) {
|
|
3651
3651
|
case /* repeated com.hamropatro.grpc.common.Folder folder */
|
|
3652
3652
|
1:
|
|
3653
|
-
i.folder.push(bt.internalBinaryRead(e, e.uint32(),
|
|
3653
|
+
i.folder.push(bt.internalBinaryRead(e, e.uint32(), n));
|
|
3654
3654
|
break;
|
|
3655
3655
|
case /* string next_cursor */
|
|
3656
3656
|
2:
|
|
@@ -3661,7 +3661,7 @@ class fs extends Ie {
|
|
|
3661
3661
|
i.hasMore = e.bool();
|
|
3662
3662
|
break;
|
|
3663
3663
|
default:
|
|
3664
|
-
let d =
|
|
3664
|
+
let d = n.readUnknownField;
|
|
3665
3665
|
if (d === "throw")
|
|
3666
3666
|
throw new globalThis.Error(`Unknown field ${a} (wire type ${c}) for ${this.typeName}`);
|
|
3667
3667
|
let l = e.skip(c);
|
|
@@ -3670,12 +3670,12 @@ class fs extends Ie {
|
|
|
3670
3670
|
}
|
|
3671
3671
|
return i;
|
|
3672
3672
|
}
|
|
3673
|
-
internalBinaryWrite(e, t,
|
|
3673
|
+
internalBinaryWrite(e, t, n) {
|
|
3674
3674
|
for (let i = 0; i < e.folder.length; i++)
|
|
3675
|
-
bt.internalBinaryWrite(e.folder[i], t.tag(1, j.LengthDelimited).fork(),
|
|
3675
|
+
bt.internalBinaryWrite(e.folder[i], t.tag(1, j.LengthDelimited).fork(), n).join();
|
|
3676
3676
|
e.nextCursor !== "" && t.tag(2, j.LengthDelimited).string(e.nextCursor), e.hasMore !== !1 && t.tag(3, j.Varint).bool(e.hasMore);
|
|
3677
|
-
let
|
|
3678
|
-
return
|
|
3677
|
+
let r = n.writeUnknownFields;
|
|
3678
|
+
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
3679
3679
|
}
|
|
3680
3680
|
}
|
|
3681
3681
|
const ps = new fs();
|
|
@@ -3716,8 +3716,8 @@ class ms extends Ie {
|
|
|
3716
3716
|
const t = globalThis.Object.create(this.messagePrototype);
|
|
3717
3717
|
return t.key = "", t.name = "", t.nestedFolderName = "", t.createdBy = "", e !== void 0 && ve(this, t, e), t;
|
|
3718
3718
|
}
|
|
3719
|
-
internalBinaryRead(e, t,
|
|
3720
|
-
let i =
|
|
3719
|
+
internalBinaryRead(e, t, n, r) {
|
|
3720
|
+
let i = r ?? this.create(), o = e.pos + t;
|
|
3721
3721
|
for (; e.pos < o; ) {
|
|
3722
3722
|
let [a, c] = e.tag();
|
|
3723
3723
|
switch (a) {
|
|
@@ -3738,7 +3738,7 @@ class ms extends Ie {
|
|
|
3738
3738
|
i.createdBy = e.string();
|
|
3739
3739
|
break;
|
|
3740
3740
|
default:
|
|
3741
|
-
let d =
|
|
3741
|
+
let d = n.readUnknownField;
|
|
3742
3742
|
if (d === "throw")
|
|
3743
3743
|
throw new globalThis.Error(`Unknown field ${a} (wire type ${c}) for ${this.typeName}`);
|
|
3744
3744
|
let l = e.skip(c);
|
|
@@ -3747,10 +3747,10 @@ class ms extends Ie {
|
|
|
3747
3747
|
}
|
|
3748
3748
|
return i;
|
|
3749
3749
|
}
|
|
3750
|
-
internalBinaryWrite(e, t,
|
|
3750
|
+
internalBinaryWrite(e, t, n) {
|
|
3751
3751
|
e.key !== "" && t.tag(1, j.LengthDelimited).string(e.key), e.name !== "" && t.tag(2, j.LengthDelimited).string(e.name), e.nestedFolderName !== "" && t.tag(3, j.LengthDelimited).string(e.nestedFolderName), e.createdBy !== "" && t.tag(4, j.LengthDelimited).string(e.createdBy);
|
|
3752
|
-
let
|
|
3753
|
-
return
|
|
3752
|
+
let r = n.writeUnknownFields;
|
|
3753
|
+
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
3754
3754
|
}
|
|
3755
3755
|
}
|
|
3756
3756
|
const bt = new ms();
|
|
@@ -3777,8 +3777,8 @@ class gs extends Ie {
|
|
|
3777
3777
|
const t = globalThis.Object.create(this.messagePrototype);
|
|
3778
3778
|
return t.folderKey = "", t.nestedFolderName = "", e !== void 0 && ve(this, t, e), t;
|
|
3779
3779
|
}
|
|
3780
|
-
internalBinaryRead(e, t,
|
|
3781
|
-
let i =
|
|
3780
|
+
internalBinaryRead(e, t, n, r) {
|
|
3781
|
+
let i = r ?? this.create(), o = e.pos + t;
|
|
3782
3782
|
for (; e.pos < o; ) {
|
|
3783
3783
|
let [a, c] = e.tag();
|
|
3784
3784
|
switch (a) {
|
|
@@ -3791,7 +3791,7 @@ class gs extends Ie {
|
|
|
3791
3791
|
i.nestedFolderName = e.string();
|
|
3792
3792
|
break;
|
|
3793
3793
|
default:
|
|
3794
|
-
let d =
|
|
3794
|
+
let d = n.readUnknownField;
|
|
3795
3795
|
if (d === "throw")
|
|
3796
3796
|
throw new globalThis.Error(`Unknown field ${a} (wire type ${c}) for ${this.typeName}`);
|
|
3797
3797
|
let l = e.skip(c);
|
|
@@ -3800,10 +3800,10 @@ class gs extends Ie {
|
|
|
3800
3800
|
}
|
|
3801
3801
|
return i;
|
|
3802
3802
|
}
|
|
3803
|
-
internalBinaryWrite(e, t,
|
|
3803
|
+
internalBinaryWrite(e, t, n) {
|
|
3804
3804
|
e.folderKey !== "" && t.tag(1, j.LengthDelimited).string(e.folderKey), e.nestedFolderName !== "" && t.tag(2, j.LengthDelimited).string(e.nestedFolderName);
|
|
3805
|
-
let
|
|
3806
|
-
return
|
|
3805
|
+
let r = n.writeUnknownFields;
|
|
3806
|
+
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
3807
3807
|
}
|
|
3808
3808
|
}
|
|
3809
3809
|
const ws = new gs(), Bn = new Kn("com.hamropatro.grpc.common.FolderService", [
|
|
@@ -3824,67 +3824,67 @@ class Tn {
|
|
|
3824
3824
|
* @generated from protobuf rpc: createFolder(com.hamropatro.grpc.common.CreateFolderRequest) returns (com.hamropatro.grpc.common.Folder);
|
|
3825
3825
|
*/
|
|
3826
3826
|
createFolder(e, t) {
|
|
3827
|
-
const
|
|
3828
|
-
return $e("unary", this._transport,
|
|
3827
|
+
const n = this.methods[0], r = this._transport.mergeOptions(t);
|
|
3828
|
+
return $e("unary", this._transport, n, r, e);
|
|
3829
3829
|
}
|
|
3830
3830
|
/**
|
|
3831
3831
|
* @generated from protobuf rpc: getFolders(com.hamropatro.grpc.common.GetAllFoldersRequest) returns (com.hamropatro.grpc.common.GetAllFoldersResponse);
|
|
3832
3832
|
*/
|
|
3833
3833
|
getFolders(e, t) {
|
|
3834
|
-
const
|
|
3835
|
-
return $e("unary", this._transport,
|
|
3834
|
+
const n = this.methods[1], r = this._transport.mergeOptions(t);
|
|
3835
|
+
return $e("unary", this._transport, n, r, e);
|
|
3836
3836
|
}
|
|
3837
3837
|
/**
|
|
3838
3838
|
* @generated from protobuf rpc: updateFolder(com.hamropatro.grpc.common.Folder) returns (com.hamropatro.grpc.common.Folder);
|
|
3839
3839
|
*/
|
|
3840
3840
|
updateFolder(e, t) {
|
|
3841
|
-
const
|
|
3842
|
-
return $e("unary", this._transport,
|
|
3841
|
+
const n = this.methods[2], r = this._transport.mergeOptions(t);
|
|
3842
|
+
return $e("unary", this._transport, n, r, e);
|
|
3843
3843
|
}
|
|
3844
3844
|
/**
|
|
3845
3845
|
* @generated from protobuf rpc: deleteFolder(com.hamropatro.grpc.common.DeleteFolderRequest) returns (com.hamropatro.grpc.common.Folder);
|
|
3846
3846
|
*/
|
|
3847
3847
|
deleteFolder(e, t) {
|
|
3848
|
-
const
|
|
3849
|
-
return $e("unary", this._transport,
|
|
3848
|
+
const n = this.methods[3], r = this._transport.mergeOptions(t);
|
|
3849
|
+
return $e("unary", this._transport, n, r, e);
|
|
3850
3850
|
}
|
|
3851
3851
|
/**
|
|
3852
3852
|
* @generated from protobuf rpc: ChangeNestedFolderName(com.hamropatro.grpc.common.ChangeNestedFolderRequest) returns (com.hamropatro.grpc.common.Folder);
|
|
3853
3853
|
*/
|
|
3854
3854
|
changeNestedFolderName(e, t) {
|
|
3855
|
-
const
|
|
3856
|
-
return $e("unary", this._transport,
|
|
3855
|
+
const n = this.methods[4], r = this._transport.mergeOptions(t);
|
|
3856
|
+
return $e("unary", this._transport, n, r, e);
|
|
3857
3857
|
}
|
|
3858
3858
|
}
|
|
3859
3859
|
const ys = async (s, e = 20, t) => {
|
|
3860
3860
|
var o;
|
|
3861
|
-
const
|
|
3861
|
+
const n = (o = window.ImageSalonSDK) == null ? void 0 : o.grpcConfig, r = new Tn(n), i = Hr.create();
|
|
3862
3862
|
try {
|
|
3863
|
-
return i.cursor = s, i.limit = e, await
|
|
3863
|
+
return i.cursor = s, i.limit = e, await r.getFolders(
|
|
3864
3864
|
i,
|
|
3865
3865
|
t
|
|
3866
3866
|
);
|
|
3867
3867
|
} catch (a) {
|
|
3868
3868
|
throw a;
|
|
3869
3869
|
}
|
|
3870
|
-
}, bs = async (s, e, t,
|
|
3871
|
-
var
|
|
3870
|
+
}, bs = async (s, e, t, n) => {
|
|
3871
|
+
var r;
|
|
3872
3872
|
try {
|
|
3873
|
-
const i = (
|
|
3873
|
+
const i = (r = window.ImageSalonSDK) == null ? void 0 : r.grpcConfig, o = new Tn(i), a = Vr.create();
|
|
3874
3874
|
return a.name = s, a.nestedFolderName = e, a.createdBy = t, await o.createFolder(
|
|
3875
3875
|
a,
|
|
3876
|
-
|
|
3876
|
+
n
|
|
3877
3877
|
);
|
|
3878
3878
|
} catch (i) {
|
|
3879
3879
|
throw i;
|
|
3880
3880
|
}
|
|
3881
|
-
}, Cs = async (s, e, t,
|
|
3881
|
+
}, Cs = async (s, e, t, n, r) => {
|
|
3882
3882
|
var i;
|
|
3883
3883
|
try {
|
|
3884
3884
|
const o = (i = window.ImageSalonSDK) == null ? void 0 : i.grpcConfig, a = new Tn(o), c = bt.create();
|
|
3885
|
-
return c.name = e, c.key = s, c.nestedFolderName = t, c.createdBy =
|
|
3885
|
+
return c.name = e, c.key = s, c.nestedFolderName = t, c.createdBy = n, await a.updateFolder(
|
|
3886
3886
|
c,
|
|
3887
|
-
|
|
3887
|
+
r
|
|
3888
3888
|
);
|
|
3889
3889
|
} catch (o) {
|
|
3890
3890
|
throw o;
|
|
@@ -3892,26 +3892,26 @@ const ys = async (s, e = 20, t) => {
|
|
|
3892
3892
|
}, Es = async (s, e) => {
|
|
3893
3893
|
var t;
|
|
3894
3894
|
try {
|
|
3895
|
-
const
|
|
3896
|
-
return i.key = s, await
|
|
3895
|
+
const n = (t = window.ImageSalonSDK) == null ? void 0 : t.grpcConfig, r = new Tn(n), i = Mr.create();
|
|
3896
|
+
return i.key = s, await r.deleteFolder(
|
|
3897
3897
|
i,
|
|
3898
3898
|
e
|
|
3899
3899
|
);
|
|
3900
|
-
} catch (
|
|
3901
|
-
throw
|
|
3900
|
+
} catch (n) {
|
|
3901
|
+
throw n;
|
|
3902
3902
|
}
|
|
3903
3903
|
}, On = (s, e, t) => {
|
|
3904
|
-
const
|
|
3905
|
-
|
|
3906
|
-
const
|
|
3904
|
+
const n = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
3905
|
+
n.setAttribute("xmlns", "http://www.w3.org/2000/svg"), n.setAttribute("width", s || "20"), n.setAttribute("height", e || "20"), n.setAttribute("viewBox", "0 0 24 24"), n.setAttribute("fill", "none"), n.setAttribute("stroke", t || "#ee3f3f"), n.setAttribute("stroke-width", "2"), n.setAttribute("stroke-linecap", "round"), n.setAttribute("stroke-linejoin", "round"), n.classList.add("lucide", "lucide-circle-alert");
|
|
3906
|
+
const r = document.createElementNS(
|
|
3907
3907
|
"http://www.w3.org/2000/svg",
|
|
3908
3908
|
"circle"
|
|
3909
3909
|
);
|
|
3910
|
-
|
|
3910
|
+
r.setAttribute("cx", "12"), r.setAttribute("cy", "12"), r.setAttribute("r", "10");
|
|
3911
3911
|
const i = document.createElementNS("http://www.w3.org/2000/svg", "line");
|
|
3912
3912
|
i.setAttribute("x1", "12"), i.setAttribute("x2", "12"), i.setAttribute("y1", "8"), i.setAttribute("y2", "12");
|
|
3913
3913
|
const o = document.createElementNS("http://www.w3.org/2000/svg", "line");
|
|
3914
|
-
return o.setAttribute("x1", "12"), o.setAttribute("x2", "12.01"), o.setAttribute("y1", "16"), o.setAttribute("y2", "16"),
|
|
3914
|
+
return o.setAttribute("x1", "12"), o.setAttribute("x2", "12.01"), o.setAttribute("y1", "16"), o.setAttribute("y2", "16"), n.appendChild(r), n.appendChild(i), n.appendChild(o), n;
|
|
3915
3915
|
};
|
|
3916
3916
|
function ur() {
|
|
3917
3917
|
const s = document.createElementNS(
|
|
@@ -3932,16 +3932,16 @@ function vs() {
|
|
|
3932
3932
|
e.setAttribute("d", "M9 18V5l12-2v13");
|
|
3933
3933
|
const t = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
3934
3934
|
t.setAttribute("d", "m9 9 12-2");
|
|
3935
|
-
const
|
|
3935
|
+
const n = document.createElementNS(
|
|
3936
3936
|
"http://www.w3.org/2000/svg",
|
|
3937
3937
|
"circle"
|
|
3938
3938
|
);
|
|
3939
|
-
|
|
3940
|
-
const
|
|
3939
|
+
n.setAttribute("cx", "6"), n.setAttribute("cy", "18"), n.setAttribute("r", "3");
|
|
3940
|
+
const r = document.createElementNS(
|
|
3941
3941
|
"http://www.w3.org/2000/svg",
|
|
3942
3942
|
"circle"
|
|
3943
3943
|
);
|
|
3944
|
-
return
|
|
3944
|
+
return r.setAttribute("cx", "18"), r.setAttribute("cy", "16"), r.setAttribute("r", "3"), s.appendChild(e), s.appendChild(t), s.appendChild(n), s.appendChild(r), document.body.appendChild(s), s;
|
|
3945
3945
|
}
|
|
3946
3946
|
const fr = (s) => {
|
|
3947
3947
|
const e = document.createElementNS(
|
|
@@ -3951,8 +3951,8 @@ const fr = (s) => {
|
|
|
3951
3951
|
e.setAttribute("xmlns", "http://www.w3.org/2000/svg"), e.setAttribute("width", "20"), e.setAttribute("height", "20"), e.setAttribute("viewBox", "0 0 24 24"), e.setAttribute("fill", "none"), e.setAttribute("stroke", s || "currentColor"), e.setAttribute("stroke-width", "2"), e.setAttribute("stroke-linecap", "round"), e.setAttribute("stroke-linejoin", "round"), e.classList.add("lucide", "lucide-circle-check-big");
|
|
3952
3952
|
const t = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
3953
3953
|
t.setAttribute("d", "M21.801 10A10 10 0 1 1 17 3.335");
|
|
3954
|
-
const
|
|
3955
|
-
return
|
|
3954
|
+
const n = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
3955
|
+
return n.setAttribute("d", "m9 11 3 3L22 4"), e.appendChild(t), e.appendChild(n), e;
|
|
3956
3956
|
};
|
|
3957
3957
|
function jn(s = "#333") {
|
|
3958
3958
|
const e = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
@@ -3993,10 +3993,10 @@ function As() {
|
|
|
3993
3993
|
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");
|
|
3994
3994
|
const t = document.createElementNS(s, "rect");
|
|
3995
3995
|
t.setAttribute("width", "18"), t.setAttribute("height", "18"), t.setAttribute("x", "3"), t.setAttribute("y", "3"), t.setAttribute("rx", "2"), t.setAttribute("ry", "2");
|
|
3996
|
-
const
|
|
3997
|
-
|
|
3998
|
-
const
|
|
3999
|
-
return
|
|
3996
|
+
const n = document.createElementNS(s, "circle");
|
|
3997
|
+
n.setAttribute("cx", "9"), n.setAttribute("cy", "9"), n.setAttribute("r", "2");
|
|
3998
|
+
const r = document.createElementNS(s, "path");
|
|
3999
|
+
return r.setAttribute("d", "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"), e.appendChild(t), e.appendChild(n), e.appendChild(r), document.body.appendChild(e), e;
|
|
4000
4000
|
}
|
|
4001
4001
|
function ks() {
|
|
4002
4002
|
const s = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
@@ -4024,8 +4024,8 @@ function Fs() {
|
|
|
4024
4024
|
"d",
|
|
4025
4025
|
"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"
|
|
4026
4026
|
), e.appendChild(t);
|
|
4027
|
-
const
|
|
4028
|
-
return
|
|
4027
|
+
const n = document.createElementNS(s, "circle");
|
|
4028
|
+
return n.setAttribute("cx", "12"), n.setAttribute("cy", "12"), n.setAttribute("r", "3"), e.appendChild(n), document.body.appendChild(e), e;
|
|
4029
4029
|
}
|
|
4030
4030
|
function Ns() {
|
|
4031
4031
|
const s = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
@@ -4043,12 +4043,12 @@ function gr() {
|
|
|
4043
4043
|
e.setAttribute("d", "M3 6h18");
|
|
4044
4044
|
const t = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
4045
4045
|
t.setAttribute("d", "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6");
|
|
4046
|
-
const
|
|
4047
|
-
|
|
4048
|
-
const
|
|
4049
|
-
|
|
4046
|
+
const n = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
4047
|
+
n.setAttribute("d", "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2");
|
|
4048
|
+
const r = document.createElementNS("http://www.w3.org/2000/svg", "line");
|
|
4049
|
+
r.setAttribute("x1", "10"), r.setAttribute("x2", "10"), r.setAttribute("y1", "11"), r.setAttribute("y2", "17");
|
|
4050
4050
|
const i = document.createElementNS("http://www.w3.org/2000/svg", "line");
|
|
4051
|
-
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(
|
|
4051
|
+
return i.setAttribute("x1", "14"), i.setAttribute("x2", "14"), i.setAttribute("y1", "11"), i.setAttribute("y2", "17"), s.appendChild(e), s.appendChild(t), s.appendChild(n), s.appendChild(r), s.appendChild(i), document.body.appendChild(s), s;
|
|
4052
4052
|
}
|
|
4053
4053
|
function Sn() {
|
|
4054
4054
|
const s = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
@@ -4060,8 +4060,8 @@ function Sn() {
|
|
|
4060
4060
|
"polyline"
|
|
4061
4061
|
);
|
|
4062
4062
|
t.setAttribute("points", "17 8 12 3 7 8");
|
|
4063
|
-
const
|
|
4064
|
-
return
|
|
4063
|
+
const n = document.createElementNS("http://www.w3.org/2000/svg", "line");
|
|
4064
|
+
return n.setAttribute("x1", "12"), n.setAttribute("x2", "12"), n.setAttribute("y1", "3"), n.setAttribute("y2", "15"), s.appendChild(e), s.appendChild(t), s.appendChild(n), s;
|
|
4065
4065
|
}
|
|
4066
4066
|
function Is() {
|
|
4067
4067
|
const s = "http://www.w3.org/2000/svg", e = document.createElementNS(s, "svg");
|
|
@@ -4071,12 +4071,12 @@ function Is() {
|
|
|
4071
4071
|
"d",
|
|
4072
4072
|
"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5"
|
|
4073
4073
|
);
|
|
4074
|
-
const
|
|
4075
|
-
return
|
|
4074
|
+
const n = document.createElementNS(s, "rect");
|
|
4075
|
+
return n.setAttribute("x", "2"), n.setAttribute("y", "6"), n.setAttribute("width", "14"), n.setAttribute("height", "12"), n.setAttribute("rx", "2"), e.appendChild(t), e.appendChild(n), document.body.appendChild(e), e;
|
|
4076
4076
|
}
|
|
4077
|
-
function Q(s, e, t,
|
|
4077
|
+
function Q(s, e, t, n, r) {
|
|
4078
4078
|
let i = document.createElement(s);
|
|
4079
|
-
return e && (i.className += e), t && (i.style.cssText = t),
|
|
4079
|
+
return e && (i.className += e), t && (i.style.cssText = t), n && (i.textContent = n), r && r.appendChild(i), i;
|
|
4080
4080
|
}
|
|
4081
4081
|
var ft, ze, Pt;
|
|
4082
4082
|
class Ts {
|
|
@@ -4158,20 +4158,20 @@ class $r {
|
|
|
4158
4158
|
"",
|
|
4159
4159
|
this.dialogFooter
|
|
4160
4160
|
), this.cancelButton.type = "button", e.showCloseBtn) {
|
|
4161
|
-
const
|
|
4161
|
+
const n = Q(
|
|
4162
4162
|
"button",
|
|
4163
4163
|
"dialog-close-btn",
|
|
4164
4164
|
"",
|
|
4165
4165
|
"",
|
|
4166
4166
|
this.dialogContent
|
|
4167
4167
|
);
|
|
4168
|
-
|
|
4168
|
+
n.appendChild(jn()), n.onclick = () => this.hide();
|
|
4169
4169
|
}
|
|
4170
|
-
return e.header && this._setHeader(e), this._setBody(e), this._setFooter(e), this.confirmButton.textContent = e.confirmButtonText || "Upload", this.cancelButton.textContent = e.cancelButtonText || "Cancel", fn.style.overflow = "hidden", this.confirmButton.textContent = e.confirmButtonText || "Upload", this.cancelButton.textContent = e.cancelButtonText || "Cancel", fn.classList.add("dialog-visible"), new Promise((
|
|
4171
|
-
const
|
|
4172
|
-
this.hide(),
|
|
4170
|
+
return e.header && this._setHeader(e), this._setBody(e), this._setFooter(e), this.confirmButton.textContent = e.confirmButtonText || "Upload", this.cancelButton.textContent = e.cancelButtonText || "Cancel", fn.style.overflow = "hidden", this.confirmButton.textContent = e.confirmButtonText || "Upload", this.cancelButton.textContent = e.cancelButtonText || "Cancel", fn.classList.add("dialog-visible"), new Promise((n) => {
|
|
4171
|
+
const r = (i) => () => {
|
|
4172
|
+
this.hide(), n(i === "confirm");
|
|
4173
4173
|
};
|
|
4174
|
-
this.confirmCallback = e.onConfirm ||
|
|
4174
|
+
this.confirmCallback = e.onConfirm || r("confirm"), this.confirmButton.addEventListener("click", this.confirmCallback), this.cancelCallback = e.onCancel || r("cancel"), this.cancelButton.addEventListener("click", this.cancelCallback);
|
|
4175
4175
|
});
|
|
4176
4176
|
}
|
|
4177
4177
|
_setHeader(e) {
|
|
@@ -4264,29 +4264,29 @@ function Rn(s) {
|
|
|
4264
4264
|
}
|
|
4265
4265
|
function Us(s) {
|
|
4266
4266
|
const e = {};
|
|
4267
|
-
s.forEach((
|
|
4268
|
-
e[
|
|
4267
|
+
s.forEach((r) => {
|
|
4268
|
+
e[r.key] = { ...r, children: {} };
|
|
4269
4269
|
});
|
|
4270
|
-
const t = (
|
|
4271
|
-
(o) => o.nestedFolderName ==
|
|
4270
|
+
const t = (r) => (Object.values(e).filter(
|
|
4271
|
+
(o) => o.nestedFolderName == r.key
|
|
4272
4272
|
).forEach((o) => {
|
|
4273
|
-
|
|
4274
|
-
}),
|
|
4275
|
-
return s.reduce((
|
|
4273
|
+
r.children[o.key] = t(o);
|
|
4274
|
+
}), r);
|
|
4275
|
+
return s.reduce((r, i) => (i.nestedFolderName || r.push(t(e[i.key])), r), []);
|
|
4276
4276
|
}
|
|
4277
4277
|
function xs(s, e) {
|
|
4278
|
-
const t = (
|
|
4279
|
-
if (
|
|
4280
|
-
return
|
|
4281
|
-
for (const
|
|
4282
|
-
const i =
|
|
4278
|
+
const t = (n) => {
|
|
4279
|
+
if (n.key === e.nestedFolderName)
|
|
4280
|
+
return n.children[e.key] = { ...e, children: {} }, !0;
|
|
4281
|
+
for (const r in n.children) {
|
|
4282
|
+
const i = n.children[r];
|
|
4283
4283
|
if (t(i))
|
|
4284
4284
|
return !0;
|
|
4285
4285
|
}
|
|
4286
4286
|
return !1;
|
|
4287
4287
|
};
|
|
4288
|
-
for (const
|
|
4289
|
-
if (t(
|
|
4288
|
+
for (const n of s)
|
|
4289
|
+
if (t(n))
|
|
4290
4290
|
break;
|
|
4291
4291
|
return s;
|
|
4292
4292
|
}
|
|
@@ -4297,8 +4297,8 @@ const _s = async (s, e) => {
|
|
|
4297
4297
|
Authorization: s,
|
|
4298
4298
|
"app-id": e === "production" ? "hamropatro" : "hamropatro-android"
|
|
4299
4299
|
});
|
|
4300
|
-
} catch (
|
|
4301
|
-
if (
|
|
4300
|
+
} catch (r) {
|
|
4301
|
+
if (r) throw r;
|
|
4302
4302
|
}
|
|
4303
4303
|
return {
|
|
4304
4304
|
meta: t
|
|
@@ -4309,61 +4309,61 @@ function K(s, e) {
|
|
|
4309
4309
|
return s && (t.className = s), e && (t.id = e), t;
|
|
4310
4310
|
}
|
|
4311
4311
|
function en(s, e, t) {
|
|
4312
|
-
const
|
|
4313
|
-
return e && (
|
|
4312
|
+
const n = document.createElement("p");
|
|
4313
|
+
return e && (n.className = e), t && (n.id = t), s && (n.textContent = s), n;
|
|
4314
4314
|
}
|
|
4315
4315
|
function ie(s, e) {
|
|
4316
4316
|
const t = document.createElement("span");
|
|
4317
4317
|
return e && (t.className = e), s && (t.textContent = s), t;
|
|
4318
4318
|
}
|
|
4319
|
-
function yr(s, e, t,
|
|
4320
|
-
const
|
|
4321
|
-
return e && (
|
|
4319
|
+
function yr(s, e, t, n) {
|
|
4320
|
+
const r = document.createElement("img");
|
|
4321
|
+
return e && (r.className = e), r.src = s, r;
|
|
4322
4322
|
}
|
|
4323
4323
|
function Bs(s, e, t) {
|
|
4324
|
-
const
|
|
4325
|
-
return
|
|
4324
|
+
const n = document.createElement("video"), r = document.createElement("source");
|
|
4325
|
+
return n.className = e, r.src = s, n.appendChild(r), n;
|
|
4326
4326
|
}
|
|
4327
4327
|
function Os(s, e, t) {
|
|
4328
|
-
const
|
|
4329
|
-
return
|
|
4328
|
+
const n = document.createElement("audio"), r = document.createElement("source");
|
|
4329
|
+
return n.className = e, n.controls = !0, r.src = s, n.appendChild(r), n;
|
|
4330
4330
|
}
|
|
4331
|
-
function Ve(s, e, t,
|
|
4331
|
+
function Ve(s, e, t, n, r) {
|
|
4332
4332
|
const i = document.createElement("button");
|
|
4333
|
-
return e && (i.className = e), t && (i.id = t), s && (i.textContent = s),
|
|
4333
|
+
return e && (i.className = e), t && (i.id = t), s && (i.textContent = s), r && (i.innerHTML = r), i.disabled = n, i;
|
|
4334
4334
|
}
|
|
4335
4335
|
function Dn(s, e, t) {
|
|
4336
|
-
const
|
|
4337
|
-
return
|
|
4336
|
+
const n = document.createElement("input");
|
|
4337
|
+
return n.className = e, n.defaultValue = t, s && (n.type = s), n;
|
|
4338
4338
|
}
|
|
4339
4339
|
function Ss(s, e) {
|
|
4340
4340
|
return e.forEach(function(t) {
|
|
4341
|
-
t && typeof t != "string" && !Array.isArray(t) && Object.keys(t).forEach(function(
|
|
4342
|
-
if (
|
|
4343
|
-
var
|
|
4344
|
-
Object.defineProperty(s,
|
|
4345
|
-
return t[
|
|
4341
|
+
t && typeof t != "string" && !Array.isArray(t) && Object.keys(t).forEach(function(n) {
|
|
4342
|
+
if (n !== "default" && !(n in s)) {
|
|
4343
|
+
var r = Object.getOwnPropertyDescriptor(t, n);
|
|
4344
|
+
Object.defineProperty(s, n, r.get ? r : { enumerable: !0, get: function() {
|
|
4345
|
+
return t[n];
|
|
4346
4346
|
} });
|
|
4347
4347
|
}
|
|
4348
4348
|
});
|
|
4349
4349
|
}), Object.freeze(s);
|
|
4350
4350
|
}
|
|
4351
4351
|
function Pr(s, e) {
|
|
4352
|
-
return new Promise(function(t,
|
|
4353
|
-
let
|
|
4352
|
+
return new Promise(function(t, n) {
|
|
4353
|
+
let r;
|
|
4354
4354
|
return Rs(s).then(function(i) {
|
|
4355
4355
|
try {
|
|
4356
|
-
return
|
|
4356
|
+
return r = i, t(new Blob([e.slice(0, 2), r, e.slice(2)], { type: "image/jpeg" }));
|
|
4357
4357
|
} catch (o) {
|
|
4358
|
-
return
|
|
4358
|
+
return n(o);
|
|
4359
4359
|
}
|
|
4360
|
-
},
|
|
4360
|
+
}, n);
|
|
4361
4361
|
});
|
|
4362
4362
|
}
|
|
4363
4363
|
const Rs = (s) => new Promise((e, t) => {
|
|
4364
|
-
const
|
|
4365
|
-
|
|
4366
|
-
const i = new DataView(
|
|
4364
|
+
const n = new FileReader();
|
|
4365
|
+
n.addEventListener("load", ({ target: { result: r } }) => {
|
|
4366
|
+
const i = new DataView(r);
|
|
4367
4367
|
let o = 0;
|
|
4368
4368
|
if (i.getUint16(o) !== 65496) return t("not a valid JPEG");
|
|
4369
4369
|
for (o += 2; ; ) {
|
|
@@ -4392,12 +4392,12 @@ const Rs = (s) => new Promise((e, t) => {
|
|
|
4392
4392
|
i.setUint16(f + 8, 1, l);
|
|
4393
4393
|
break;
|
|
4394
4394
|
}
|
|
4395
|
-
return e(
|
|
4395
|
+
return e(r.slice(o, o + 2 + c));
|
|
4396
4396
|
}
|
|
4397
4397
|
o += 2 + c;
|
|
4398
4398
|
}
|
|
4399
4399
|
return e(new Blob());
|
|
4400
|
-
}),
|
|
4400
|
+
}), n.readAsArrayBuffer(s);
|
|
4401
4401
|
});
|
|
4402
4402
|
var Cn = {}, Ds = { get exports() {
|
|
4403
4403
|
return Cn;
|
|
@@ -4405,9 +4405,9 @@ var Cn = {}, Ds = { get exports() {
|
|
|
4405
4405
|
Cn = s;
|
|
4406
4406
|
} };
|
|
4407
4407
|
(function(s) {
|
|
4408
|
-
var e, t,
|
|
4409
|
-
Ds.exports =
|
|
4410
|
-
for (var o =
|
|
4408
|
+
var e, t, n = {};
|
|
4409
|
+
Ds.exports = n, n.parse = function(r, i) {
|
|
4410
|
+
for (var o = n.bin.readUshort, a = n.bin.readUint, c = 0, d = {}, l = new Uint8Array(r), u = l.length - 4; a(l, u) != 101010256; ) u--;
|
|
4411
4411
|
c = u, c += 4;
|
|
4412
4412
|
var h = o(l, c += 4);
|
|
4413
4413
|
o(l, c += 2);
|
|
@@ -4418,121 +4418,121 @@ var Cn = {}, Ds = { get exports() {
|
|
|
4418
4418
|
var T = a(l, c += 4), C = o(l, c += 4), R = o(l, c + 2), O = o(l, c + 4);
|
|
4419
4419
|
c += 6;
|
|
4420
4420
|
var F = a(l, c += 8);
|
|
4421
|
-
c += 4, c += C + R + O,
|
|
4421
|
+
c += 4, c += C + R + O, n._readLocal(l, F, d, f, T, i);
|
|
4422
4422
|
}
|
|
4423
4423
|
return d;
|
|
4424
|
-
},
|
|
4425
|
-
var l =
|
|
4426
|
-
u(
|
|
4427
|
-
var h = l(
|
|
4428
|
-
u(
|
|
4429
|
-
var f = l(
|
|
4424
|
+
}, n._readLocal = function(r, i, o, a, c, d) {
|
|
4425
|
+
var l = n.bin.readUshort, u = n.bin.readUint;
|
|
4426
|
+
u(r, i), l(r, i += 4), l(r, i += 2);
|
|
4427
|
+
var h = l(r, i += 2);
|
|
4428
|
+
u(r, i += 2), u(r, i += 4), i += 4;
|
|
4429
|
+
var f = l(r, i += 8), y = l(r, i += 2);
|
|
4430
4430
|
i += 2;
|
|
4431
|
-
var k =
|
|
4431
|
+
var k = n.bin.readUTF8(r, i, f);
|
|
4432
4432
|
if (i += f, i += y, d) o[k] = { size: c, csize: a };
|
|
4433
4433
|
else {
|
|
4434
|
-
var T = new Uint8Array(
|
|
4434
|
+
var T = new Uint8Array(r.buffer, i);
|
|
4435
4435
|
if (h == 0) o[k] = new Uint8Array(T.buffer.slice(i, i + a));
|
|
4436
4436
|
else {
|
|
4437
4437
|
if (h != 8) throw "unknown compression method: " + h;
|
|
4438
4438
|
var C = new Uint8Array(c);
|
|
4439
|
-
|
|
4439
|
+
n.inflateRaw(T, C), o[k] = C;
|
|
4440
4440
|
}
|
|
4441
4441
|
}
|
|
4442
|
-
},
|
|
4443
|
-
return
|
|
4444
|
-
},
|
|
4445
|
-
return
|
|
4446
|
-
},
|
|
4442
|
+
}, n.inflateRaw = function(r, i) {
|
|
4443
|
+
return n.F.inflate(r, i);
|
|
4444
|
+
}, n.inflate = function(r, i) {
|
|
4445
|
+
return r[0], r[1], n.inflateRaw(new Uint8Array(r.buffer, r.byteOffset + 2, r.length - 6), i);
|
|
4446
|
+
}, n.deflate = function(r, i) {
|
|
4447
4447
|
i == null && (i = { level: 6 });
|
|
4448
|
-
var o = 0, a = new Uint8Array(50 + Math.floor(1.1 *
|
|
4449
|
-
a[o] = 120, a[o + 1] = 156, o += 2, o =
|
|
4450
|
-
var c =
|
|
4448
|
+
var o = 0, a = new Uint8Array(50 + Math.floor(1.1 * r.length));
|
|
4449
|
+
a[o] = 120, a[o + 1] = 156, o += 2, o = n.F.deflateRaw(r, a, o, i.level);
|
|
4450
|
+
var c = n.adler(r, 0, r.length);
|
|
4451
4451
|
return a[o + 0] = c >>> 24 & 255, a[o + 1] = c >>> 16 & 255, a[o + 2] = c >>> 8 & 255, a[o + 3] = c >>> 0 & 255, new Uint8Array(a.buffer, 0, o + 4);
|
|
4452
|
-
},
|
|
4452
|
+
}, n.deflateRaw = function(r, i) {
|
|
4453
4453
|
i == null && (i = { level: 6 });
|
|
4454
|
-
var o = new Uint8Array(50 + Math.floor(1.1 *
|
|
4454
|
+
var o = new Uint8Array(50 + Math.floor(1.1 * r.length)), a = n.F.deflateRaw(r, o, a, i.level);
|
|
4455
4455
|
return new Uint8Array(o.buffer, 0, a);
|
|
4456
|
-
},
|
|
4456
|
+
}, n.encode = function(r, i) {
|
|
4457
4457
|
i == null && (i = !1);
|
|
4458
|
-
var o = 0, a =
|
|
4459
|
-
for (var l in
|
|
4460
|
-
var u = !
|
|
4461
|
-
d[l] = { cpr: u, usize: h.length, crc: f, file: u ?
|
|
4458
|
+
var o = 0, a = n.bin.writeUint, c = n.bin.writeUshort, d = {};
|
|
4459
|
+
for (var l in r) {
|
|
4460
|
+
var u = !n._noNeed(l) && !i, h = r[l], f = n.crc.crc(h, 0, h.length);
|
|
4461
|
+
d[l] = { cpr: u, usize: h.length, crc: f, file: u ? n.deflateRaw(h) : h };
|
|
4462
4462
|
}
|
|
4463
|
-
for (var l in d) o += d[l].file.length + 30 + 46 + 2 *
|
|
4463
|
+
for (var l in d) o += d[l].file.length + 30 + 46 + 2 * n.bin.sizeUTF8(l);
|
|
4464
4464
|
o += 22;
|
|
4465
4465
|
var y = new Uint8Array(o), k = 0, T = [];
|
|
4466
4466
|
for (var l in d) {
|
|
4467
4467
|
var C = d[l];
|
|
4468
|
-
T.push(k), k =
|
|
4468
|
+
T.push(k), k = n._writeHeader(y, k, l, C, 0);
|
|
4469
4469
|
}
|
|
4470
4470
|
var R = 0, O = k;
|
|
4471
4471
|
for (var l in d)
|
|
4472
|
-
C = d[l], T.push(k), k =
|
|
4472
|
+
C = d[l], T.push(k), k = n._writeHeader(y, k, l, C, 1, T[R++]);
|
|
4473
4473
|
var F = k - O;
|
|
4474
4474
|
return a(y, k, 101010256), k += 4, c(y, k += 4, R), c(y, k += 2, R), a(y, k += 2, F), a(y, k += 4, O), k += 4, k += 2, y.buffer;
|
|
4475
|
-
},
|
|
4476
|
-
var i =
|
|
4475
|
+
}, n._noNeed = function(r) {
|
|
4476
|
+
var i = r.split(".").pop().toLowerCase();
|
|
4477
4477
|
return "png,jpg,jpeg,zip".indexOf(i) != -1;
|
|
4478
|
-
},
|
|
4479
|
-
var l =
|
|
4480
|
-
return l(
|
|
4481
|
-
},
|
|
4482
|
-
for (var
|
|
4478
|
+
}, n._writeHeader = function(r, i, o, a, c, d) {
|
|
4479
|
+
var l = n.bin.writeUint, u = n.bin.writeUshort, h = a.file;
|
|
4480
|
+
return l(r, i, c == 0 ? 67324752 : 33639248), i += 4, c == 1 && (i += 2), u(r, i, 20), u(r, i += 2, 0), u(r, i += 2, a.cpr ? 8 : 0), l(r, i += 2, 0), l(r, i += 4, a.crc), l(r, i += 4, h.length), l(r, i += 4, a.usize), u(r, i += 4, n.bin.sizeUTF8(o)), u(r, i += 2, 0), i += 2, c == 1 && (i += 2, i += 2, l(r, i += 6, d), i += 4), i += n.bin.writeUTF8(r, i, o), c == 0 && (r.set(h, i), i += h.length), i;
|
|
4481
|
+
}, n.crc = { table: function() {
|
|
4482
|
+
for (var r = new Uint32Array(256), i = 0; i < 256; i++) {
|
|
4483
4483
|
for (var o = i, a = 0; a < 8; a++) 1 & o ? o = 3988292384 ^ o >>> 1 : o >>>= 1;
|
|
4484
|
-
|
|
4484
|
+
r[i] = o;
|
|
4485
4485
|
}
|
|
4486
|
-
return
|
|
4487
|
-
}(), update: function(
|
|
4488
|
-
for (var c = 0; c < a; c++)
|
|
4489
|
-
return
|
|
4490
|
-
}, crc: function(
|
|
4491
|
-
return 4294967295 ^
|
|
4492
|
-
} },
|
|
4486
|
+
return r;
|
|
4487
|
+
}(), update: function(r, i, o, a) {
|
|
4488
|
+
for (var c = 0; c < a; c++) r = n.crc.table[255 & (r ^ i[o + c])] ^ r >>> 8;
|
|
4489
|
+
return r;
|
|
4490
|
+
}, crc: function(r, i, o) {
|
|
4491
|
+
return 4294967295 ^ n.crc.update(4294967295, r, i, o);
|
|
4492
|
+
} }, n.adler = function(r, i, o) {
|
|
4493
4493
|
for (var a = 1, c = 0, d = i, l = i + o; d < l; ) {
|
|
4494
|
-
for (var u = Math.min(d + 5552, l); d < u; ) c += a +=
|
|
4494
|
+
for (var u = Math.min(d + 5552, l); d < u; ) c += a += r[d++];
|
|
4495
4495
|
a %= 65521, c %= 65521;
|
|
4496
4496
|
}
|
|
4497
4497
|
return c << 16 | a;
|
|
4498
|
-
},
|
|
4499
|
-
return
|
|
4500
|
-
}, writeUshort: function(
|
|
4501
|
-
|
|
4502
|
-
}, readUint: function(
|
|
4503
|
-
return 16777216 *
|
|
4504
|
-
}, writeUint: function(
|
|
4505
|
-
|
|
4506
|
-
}, readASCII: function(
|
|
4507
|
-
for (var a = "", c = 0; c < o; c++) a += String.fromCharCode(
|
|
4498
|
+
}, n.bin = { readUshort: function(r, i) {
|
|
4499
|
+
return r[i] | r[i + 1] << 8;
|
|
4500
|
+
}, writeUshort: function(r, i, o) {
|
|
4501
|
+
r[i] = 255 & o, r[i + 1] = o >> 8 & 255;
|
|
4502
|
+
}, readUint: function(r, i) {
|
|
4503
|
+
return 16777216 * r[i + 3] + (r[i + 2] << 16 | r[i + 1] << 8 | r[i]);
|
|
4504
|
+
}, writeUint: function(r, i, o) {
|
|
4505
|
+
r[i] = 255 & o, r[i + 1] = o >> 8 & 255, r[i + 2] = o >> 16 & 255, r[i + 3] = o >> 24 & 255;
|
|
4506
|
+
}, readASCII: function(r, i, o) {
|
|
4507
|
+
for (var a = "", c = 0; c < o; c++) a += String.fromCharCode(r[i + c]);
|
|
4508
4508
|
return a;
|
|
4509
|
-
}, writeASCII: function(
|
|
4510
|
-
for (var a = 0; a < o.length; a++)
|
|
4511
|
-
}, pad: function(
|
|
4512
|
-
return
|
|
4513
|
-
}, readUTF8: function(
|
|
4514
|
-
for (var a, c = "", d = 0; d < o; d++) c += "%" +
|
|
4509
|
+
}, writeASCII: function(r, i, o) {
|
|
4510
|
+
for (var a = 0; a < o.length; a++) r[i + a] = o.charCodeAt(a);
|
|
4511
|
+
}, pad: function(r) {
|
|
4512
|
+
return r.length < 2 ? "0" + r : r;
|
|
4513
|
+
}, readUTF8: function(r, i, o) {
|
|
4514
|
+
for (var a, c = "", d = 0; d < o; d++) c += "%" + n.bin.pad(r[i + d].toString(16));
|
|
4515
4515
|
try {
|
|
4516
4516
|
a = decodeURIComponent(c);
|
|
4517
4517
|
} catch {
|
|
4518
|
-
return
|
|
4518
|
+
return n.bin.readASCII(r, i, o);
|
|
4519
4519
|
}
|
|
4520
4520
|
return a;
|
|
4521
|
-
}, writeUTF8: function(
|
|
4521
|
+
}, writeUTF8: function(r, i, o) {
|
|
4522
4522
|
for (var a = o.length, c = 0, d = 0; d < a; d++) {
|
|
4523
4523
|
var l = o.charCodeAt(d);
|
|
4524
|
-
if (!(4294967168 & l))
|
|
4525
|
-
else if (!(4294965248 & l))
|
|
4526
|
-
else if (!(4294901760 & l))
|
|
4524
|
+
if (!(4294967168 & l)) r[i + c] = l, c++;
|
|
4525
|
+
else if (!(4294965248 & l)) r[i + c] = 192 | l >> 6, r[i + c + 1] = 128 | l >> 0 & 63, c += 2;
|
|
4526
|
+
else if (!(4294901760 & l)) r[i + c] = 224 | l >> 12, r[i + c + 1] = 128 | l >> 6 & 63, r[i + c + 2] = 128 | l >> 0 & 63, c += 3;
|
|
4527
4527
|
else {
|
|
4528
4528
|
if (4292870144 & l) throw "e";
|
|
4529
|
-
|
|
4529
|
+
r[i + c] = 240 | l >> 18, r[i + c + 1] = 128 | l >> 12 & 63, r[i + c + 2] = 128 | l >> 6 & 63, r[i + c + 3] = 128 | l >> 0 & 63, c += 4;
|
|
4530
4530
|
}
|
|
4531
4531
|
}
|
|
4532
4532
|
return c;
|
|
4533
|
-
}, sizeUTF8: function(
|
|
4534
|
-
for (var i =
|
|
4535
|
-
var c =
|
|
4533
|
+
}, sizeUTF8: function(r) {
|
|
4534
|
+
for (var i = r.length, o = 0, a = 0; a < i; a++) {
|
|
4535
|
+
var c = r.charCodeAt(a);
|
|
4536
4536
|
if (!(4294967168 & c)) o++;
|
|
4537
4537
|
else if (!(4294965248 & c)) o += 2;
|
|
4538
4538
|
else if (!(4294901760 & c)) o += 3;
|
|
@@ -4542,26 +4542,26 @@ var Cn = {}, Ds = { get exports() {
|
|
|
4542
4542
|
}
|
|
4543
4543
|
}
|
|
4544
4544
|
return o;
|
|
4545
|
-
} },
|
|
4546
|
-
var c = [[0, 0, 0, 0, 0], [4, 4, 8, 4, 0], [4, 5, 16, 8, 0], [4, 6, 16, 16, 0], [4, 10, 16, 32, 0], [8, 16, 32, 32, 0], [8, 16, 128, 128, 0], [8, 32, 128, 256, 0], [32, 128, 258, 1024, 1], [32, 258, 258, 4096, 1]][a], d =
|
|
4547
|
-
|
|
4548
|
-
var u =
|
|
4545
|
+
} }, n.F = {}, n.F.deflateRaw = function(r, i, o, a) {
|
|
4546
|
+
var c = [[0, 0, 0, 0, 0], [4, 4, 8, 4, 0], [4, 5, 16, 8, 0], [4, 6, 16, 16, 0], [4, 10, 16, 32, 0], [8, 16, 32, 32, 0], [8, 16, 128, 128, 0], [8, 32, 128, 256, 0], [32, 128, 258, 1024, 1], [32, 258, 258, 4096, 1]][a], d = n.F.U, l = n.F._goodIndex;
|
|
4547
|
+
n.F._hash;
|
|
4548
|
+
var u = n.F._putsE, h = 0, f = o << 3, y = 0, k = r.length;
|
|
4549
4549
|
if (a == 0) {
|
|
4550
4550
|
for (; h < k; )
|
|
4551
|
-
u(i, f, h + (I = Math.min(65535, k - h)) == k ? 1 : 0), f =
|
|
4551
|
+
u(i, f, h + (I = Math.min(65535, k - h)) == k ? 1 : 0), f = n.F._copyExact(r, h, I, i, f + 8), h += I;
|
|
4552
4552
|
return f >>> 3;
|
|
4553
4553
|
}
|
|
4554
4554
|
var T = d.lits, C = d.strt, R = d.prev, O = 0, F = 0, U = 0, b = 0, B = 0, m = 0;
|
|
4555
|
-
for (k > 2 && (C[m =
|
|
4555
|
+
for (k > 2 && (C[m = n.F._hash(r, 0)] = 0), h = 0; h < k; h++) {
|
|
4556
4556
|
if (B = m, h + 1 < k - 2) {
|
|
4557
|
-
m =
|
|
4557
|
+
m = n.F._hash(r, h + 1);
|
|
4558
4558
|
var g = h + 1 & 32767;
|
|
4559
4559
|
R[g] = C[m], C[m] = g;
|
|
4560
4560
|
}
|
|
4561
4561
|
if (y <= h) {
|
|
4562
|
-
(O > 14e3 || F > 26697) && k - h > 100 && (y < h && (T[O] = h - y, O += 2, y = h), f =
|
|
4562
|
+
(O > 14e3 || F > 26697) && k - h > 100 && (y < h && (T[O] = h - y, O += 2, y = h), f = n.F._writeBlock(h == k - 1 || y == k ? 1 : 0, T, O, b, r, U, h - U, i, f), O = F = b = 0, U = h);
|
|
4563
4563
|
var A = 0;
|
|
4564
|
-
h < k - 2 && (A =
|
|
4564
|
+
h < k - 2 && (A = n.F._bestMatch(r, h, R, B, Math.min(c[2], k - h), c[3]));
|
|
4565
4565
|
var I = A >>> 16, N = 65535 & A;
|
|
4566
4566
|
if (A != 0) {
|
|
4567
4567
|
N = 65535 & A;
|
|
@@ -4569,18 +4569,18 @@ var Cn = {}, Ds = { get exports() {
|
|
|
4569
4569
|
d.lhst[257 + L]++;
|
|
4570
4570
|
var v = l(N, d.df0);
|
|
4571
4571
|
d.dhst[v]++, b += d.exb[L] + d.dxb[v], T[O] = I << 23 | h - y, T[O + 1] = N << 16 | L << 8 | v, O += 2, y = h + I;
|
|
4572
|
-
} else d.lhst[
|
|
4572
|
+
} else d.lhst[r[h]]++;
|
|
4573
4573
|
F++;
|
|
4574
4574
|
}
|
|
4575
4575
|
}
|
|
4576
|
-
for (U == h &&
|
|
4576
|
+
for (U == h && r.length != 0 || (y < h && (T[O] = h - y, O += 2, y = h), f = n.F._writeBlock(1, T, O, b, r, U, h - U, i, f), O = 0, F = 0, O = F = b = 0, U = h); 7 & f; ) f++;
|
|
4577
4577
|
return f >>> 3;
|
|
4578
|
-
},
|
|
4578
|
+
}, n.F._bestMatch = function(r, i, o, a, c, d) {
|
|
4579
4579
|
var l = 32767 & i, u = o[l], h = l - u + 32768 & 32767;
|
|
4580
|
-
if (u == l || a !=
|
|
4580
|
+
if (u == l || a != n.F._hash(r, i - h)) return 0;
|
|
4581
4581
|
for (var f = 0, y = 0, k = Math.min(32767, i); h <= k && --d != 0 && u != l; ) {
|
|
4582
|
-
if (f == 0 ||
|
|
4583
|
-
var T =
|
|
4582
|
+
if (f == 0 || r[i + f] == r[i + f - h]) {
|
|
4583
|
+
var T = n.F._howLong(r, i, h);
|
|
4584
4584
|
if (T > f) {
|
|
4585
4585
|
if (y = h, (f = T) >= c) break;
|
|
4586
4586
|
h + 2 < T && (T = h + 2);
|
|
@@ -4593,85 +4593,85 @@ var Cn = {}, Ds = { get exports() {
|
|
|
4593
4593
|
h += (l = u) - (u = o[l]) + 32768 & 32767;
|
|
4594
4594
|
}
|
|
4595
4595
|
return f << 16 | y;
|
|
4596
|
-
},
|
|
4597
|
-
if (
|
|
4598
|
-
var a = i, c = Math.min(
|
|
4599
|
-
for (i += 3; i < c &&
|
|
4596
|
+
}, n.F._howLong = function(r, i, o) {
|
|
4597
|
+
if (r[i] != r[i - o] || r[i + 1] != r[i + 1 - o] || r[i + 2] != r[i + 2 - o]) return 0;
|
|
4598
|
+
var a = i, c = Math.min(r.length, i + 258);
|
|
4599
|
+
for (i += 3; i < c && r[i] == r[i - o]; ) i++;
|
|
4600
4600
|
return i - a;
|
|
4601
|
-
},
|
|
4602
|
-
return (
|
|
4603
|
-
},
|
|
4604
|
-
var f, y, k, T, C, R, O, F, U, b =
|
|
4605
|
-
b.lhst[256]++, y = (f =
|
|
4606
|
-
var g = 32 + (h + 3 & 7 ? 8 - (h + 3 & 7) : 0) + (l << 3), A = a +
|
|
4607
|
-
I += 14 + 3 * O +
|
|
4601
|
+
}, n.F._hash = function(r, i) {
|
|
4602
|
+
return (r[i] << 8 | r[i + 1]) + (r[i + 2] << 4) & 65535;
|
|
4603
|
+
}, n.saved = 0, n.F._writeBlock = function(r, i, o, a, c, d, l, u, h) {
|
|
4604
|
+
var f, y, k, T, C, R, O, F, U, b = n.F.U, B = n.F._putsF, m = n.F._putsE;
|
|
4605
|
+
b.lhst[256]++, y = (f = n.F.getTrees())[0], k = f[1], T = f[2], C = f[3], R = f[4], O = f[5], F = f[6], U = f[7];
|
|
4606
|
+
var g = 32 + (h + 3 & 7 ? 8 - (h + 3 & 7) : 0) + (l << 3), A = a + n.F.contSize(b.fltree, b.lhst) + n.F.contSize(b.fdtree, b.dhst), I = a + n.F.contSize(b.ltree, b.lhst) + n.F.contSize(b.dtree, b.dhst);
|
|
4607
|
+
I += 14 + 3 * O + n.F.contSize(b.itree, b.ihst) + (2 * b.ihst[16] + 3 * b.ihst[17] + 7 * b.ihst[18]);
|
|
4608
4608
|
for (var N = 0; N < 286; N++) b.lhst[N] = 0;
|
|
4609
4609
|
for (N = 0; N < 30; N++) b.dhst[N] = 0;
|
|
4610
4610
|
for (N = 0; N < 19; N++) b.ihst[N] = 0;
|
|
4611
4611
|
var L = g < A && g < I ? 0 : A < I ? 1 : 2;
|
|
4612
|
-
if (B(u, h,
|
|
4612
|
+
if (B(u, h, r), B(u, h + 1, L), h += 3, L == 0) {
|
|
4613
4613
|
for (; 7 & h; ) h++;
|
|
4614
|
-
h =
|
|
4614
|
+
h = n.F._copyExact(c, d, l, u, h);
|
|
4615
4615
|
} else {
|
|
4616
4616
|
var v, _;
|
|
4617
4617
|
if (L == 1 && (v = b.fltree, _ = b.fdtree), L == 2) {
|
|
4618
|
-
|
|
4618
|
+
n.F.makeCodes(b.ltree, y), n.F.revCodes(b.ltree, y), n.F.makeCodes(b.dtree, k), n.F.revCodes(b.dtree, k), n.F.makeCodes(b.itree, T), n.F.revCodes(b.itree, T), v = b.ltree, _ = b.dtree, m(u, h, C - 257), m(u, h += 5, R - 1), m(u, h += 5, O - 4), h += 4;
|
|
4619
4619
|
for (var w = 0; w < O; w++) m(u, h + 3 * w, b.itree[1 + (b.ordr[w] << 1)]);
|
|
4620
|
-
h += 3 * O, h =
|
|
4620
|
+
h += 3 * O, h = n.F._codeTiny(F, b.itree, u, h), h = n.F._codeTiny(U, b.itree, u, h);
|
|
4621
4621
|
}
|
|
4622
4622
|
for (var p = d, M = 0; M < o; M += 2) {
|
|
4623
|
-
for (var x = i[M], V = x >>> 23, Z = p + (8388607 & x); p < Z; ) h =
|
|
4623
|
+
for (var x = i[M], V = x >>> 23, Z = p + (8388607 & x); p < Z; ) h = n.F._writeLit(c[p++], v, u, h);
|
|
4624
4624
|
if (V != 0) {
|
|
4625
4625
|
var P = i[M + 1], q = P >> 16, $ = P >> 8 & 255, S = 255 & P;
|
|
4626
|
-
m(u, h =
|
|
4626
|
+
m(u, h = n.F._writeLit(257 + $, v, u, h), V - b.of0[$]), h += b.exb[$], B(u, h = n.F._writeLit(S, _, u, h), q - b.df0[S]), h += b.dxb[S], p += V;
|
|
4627
4627
|
}
|
|
4628
4628
|
}
|
|
4629
|
-
h =
|
|
4629
|
+
h = n.F._writeLit(256, v, u, h);
|
|
4630
4630
|
}
|
|
4631
4631
|
return h;
|
|
4632
|
-
},
|
|
4632
|
+
}, n.F._copyExact = function(r, i, o, a, c) {
|
|
4633
4633
|
var d = c >>> 3;
|
|
4634
|
-
return a[d] = o, a[d + 1] = o >>> 8, a[d + 2] = 255 - a[d], a[d + 3] = 255 - a[d + 1], d += 4, a.set(new Uint8Array(
|
|
4635
|
-
},
|
|
4636
|
-
for (var
|
|
4637
|
-
for (u = 0; u < d.length; u += 2)
|
|
4638
|
-
for (var h =
|
|
4634
|
+
return a[d] = o, a[d + 1] = o >>> 8, a[d + 2] = 255 - a[d], a[d + 3] = 255 - a[d + 1], d += 4, a.set(new Uint8Array(r.buffer, i, o), d), c + (o + 4 << 3);
|
|
4635
|
+
}, n.F.getTrees = function() {
|
|
4636
|
+
for (var r = n.F.U, i = n.F._hufTree(r.lhst, r.ltree, 15), o = n.F._hufTree(r.dhst, r.dtree, 15), a = [], c = n.F._lenCodes(r.ltree, a), d = [], l = n.F._lenCodes(r.dtree, d), u = 0; u < a.length; u += 2) r.ihst[a[u]]++;
|
|
4637
|
+
for (u = 0; u < d.length; u += 2) r.ihst[d[u]]++;
|
|
4638
|
+
for (var h = n.F._hufTree(r.ihst, r.itree, 7), f = 19; f > 4 && r.itree[1 + (r.ordr[f - 1] << 1)] == 0; ) f--;
|
|
4639
4639
|
return [i, o, h, c, l, f, a, d];
|
|
4640
|
-
},
|
|
4641
|
-
for (var i = [], o = 0; o <
|
|
4640
|
+
}, n.F.getSecond = function(r) {
|
|
4641
|
+
for (var i = [], o = 0; o < r.length; o += 2) i.push(r[o + 1]);
|
|
4642
4642
|
return i;
|
|
4643
|
-
},
|
|
4644
|
-
for (var i = "", o = 0; o <
|
|
4643
|
+
}, n.F.nonZero = function(r) {
|
|
4644
|
+
for (var i = "", o = 0; o < r.length; o += 2) r[o + 1] != 0 && (i += (o >> 1) + ",");
|
|
4645
4645
|
return i;
|
|
4646
|
-
},
|
|
4647
|
-
for (var o = 0, a = 0; a < i.length; a++) o += i[a] *
|
|
4646
|
+
}, n.F.contSize = function(r, i) {
|
|
4647
|
+
for (var o = 0, a = 0; a < i.length; a++) o += i[a] * r[1 + (a << 1)];
|
|
4648
4648
|
return o;
|
|
4649
|
-
},
|
|
4650
|
-
for (var c = 0; c <
|
|
4651
|
-
var d =
|
|
4652
|
-
a =
|
|
4649
|
+
}, n.F._codeTiny = function(r, i, o, a) {
|
|
4650
|
+
for (var c = 0; c < r.length; c += 2) {
|
|
4651
|
+
var d = r[c], l = r[c + 1];
|
|
4652
|
+
a = n.F._writeLit(d, i, o, a);
|
|
4653
4653
|
var u = d == 16 ? 2 : d == 17 ? 3 : 7;
|
|
4654
|
-
d > 15 && (
|
|
4654
|
+
d > 15 && (n.F._putsE(o, a, l, u), a += u);
|
|
4655
4655
|
}
|
|
4656
4656
|
return a;
|
|
4657
|
-
},
|
|
4658
|
-
for (var o =
|
|
4657
|
+
}, n.F._lenCodes = function(r, i) {
|
|
4658
|
+
for (var o = r.length; o != 2 && r[o - 1] == 0; ) o -= 2;
|
|
4659
4659
|
for (var a = 0; a < o; a += 2) {
|
|
4660
|
-
var c =
|
|
4660
|
+
var c = r[a + 1], d = a + 3 < o ? r[a + 3] : -1, l = a + 5 < o ? r[a + 5] : -1, u = a == 0 ? -1 : r[a - 1];
|
|
4661
4661
|
if (c == 0 && d == c && l == c) {
|
|
4662
|
-
for (var h = a + 5; h + 2 < o &&
|
|
4662
|
+
for (var h = a + 5; h + 2 < o && r[h + 2] == c; ) h += 2;
|
|
4663
4663
|
(f = Math.min(h + 1 - a >>> 1, 138)) < 11 ? i.push(17, f - 3) : i.push(18, f - 11), a += 2 * f - 2;
|
|
4664
4664
|
} else if (c == u && d == c && l == c) {
|
|
4665
|
-
for (h = a + 5; h + 2 < o &&
|
|
4665
|
+
for (h = a + 5; h + 2 < o && r[h + 2] == c; ) h += 2;
|
|
4666
4666
|
var f = Math.min(h + 1 - a >>> 1, 6);
|
|
4667
4667
|
i.push(16, f - 3), a += 2 * f - 2;
|
|
4668
4668
|
} else i.push(c, 0);
|
|
4669
4669
|
}
|
|
4670
4670
|
return o >>> 1;
|
|
4671
|
-
},
|
|
4672
|
-
var a = [], c =
|
|
4671
|
+
}, n.F._hufTree = function(r, i, o) {
|
|
4672
|
+
var a = [], c = r.length, d = i.length, l = 0;
|
|
4673
4673
|
for (l = 0; l < d; l += 2) i[l] = 0, i[l + 1] = 0;
|
|
4674
|
-
for (l = 0; l < c; l++)
|
|
4674
|
+
for (l = 0; l < c; l++) r[l] != 0 && a.push({ lit: l, f: r[l] });
|
|
4675
4675
|
var u = a.length, h = a.slice(0);
|
|
4676
4676
|
if (u == 0) return 0;
|
|
4677
4677
|
if (u == 1) {
|
|
@@ -4683,50 +4683,50 @@ var Cn = {}, Ds = { get exports() {
|
|
|
4683
4683
|
});
|
|
4684
4684
|
var y = a[0], k = a[1], T = 0, C = 1, R = 2;
|
|
4685
4685
|
for (a[0] = { lit: -1, f: y.f + k.f, l: y, r: k, d: 0 }; C != u - 1; ) y = T != C && (R == u || a[T].f < a[R].f) ? a[T++] : a[R++], k = T != C && (R == u || a[T].f < a[R].f) ? a[T++] : a[R++], a[C++] = { lit: -1, f: y.f + k.f, l: y, r: k };
|
|
4686
|
-
var O =
|
|
4687
|
-
for (O > o && (
|
|
4686
|
+
var O = n.F.setDepth(a[C - 1], 0);
|
|
4687
|
+
for (O > o && (n.F.restrictDepth(h, o, O), O = o), l = 0; l < u; l++) i[1 + (h[l].lit << 1)] = h[l].d;
|
|
4688
4688
|
return O;
|
|
4689
|
-
},
|
|
4690
|
-
return
|
|
4691
|
-
},
|
|
4689
|
+
}, n.F.setDepth = function(r, i) {
|
|
4690
|
+
return r.lit != -1 ? (r.d = i, i) : Math.max(n.F.setDepth(r.l, i + 1), n.F.setDepth(r.r, i + 1));
|
|
4691
|
+
}, n.F.restrictDepth = function(r, i, o) {
|
|
4692
4692
|
var a = 0, c = 1 << o - i, d = 0;
|
|
4693
|
-
for (
|
|
4693
|
+
for (r.sort(function(u, h) {
|
|
4694
4694
|
return h.d == u.d ? u.f - h.f : h.d - u.d;
|
|
4695
|
-
}), a = 0; a <
|
|
4696
|
-
var l =
|
|
4697
|
-
|
|
4695
|
+
}), a = 0; a < r.length && r[a].d > i; a++) {
|
|
4696
|
+
var l = r[a].d;
|
|
4697
|
+
r[a].d = i, d += c - (1 << o - l);
|
|
4698
4698
|
}
|
|
4699
4699
|
for (d >>>= o - i; d > 0; )
|
|
4700
|
-
(l =
|
|
4701
|
-
for (; a >= 0; a--)
|
|
4700
|
+
(l = r[a].d) < i ? (r[a].d++, d -= 1 << i - l - 1) : a++;
|
|
4701
|
+
for (; a >= 0; a--) r[a].d == i && d < 0 && (r[a].d--, d++);
|
|
4702
4702
|
d != 0 && console.log("debt left");
|
|
4703
|
-
},
|
|
4703
|
+
}, n.F._goodIndex = function(r, i) {
|
|
4704
4704
|
var o = 0;
|
|
4705
|
-
return i[16 | o] <=
|
|
4706
|
-
},
|
|
4707
|
-
return
|
|
4708
|
-
},
|
|
4705
|
+
return i[16 | o] <= r && (o |= 16), i[8 | o] <= r && (o |= 8), i[4 | o] <= r && (o |= 4), i[2 | o] <= r && (o |= 2), i[1 | o] <= r && (o |= 1), o;
|
|
4706
|
+
}, n.F._writeLit = function(r, i, o, a) {
|
|
4707
|
+
return n.F._putsF(o, a, i[r << 1]), a + i[1 + (r << 1)];
|
|
4708
|
+
}, n.F.inflate = function(r, i) {
|
|
4709
4709
|
var o = Uint8Array;
|
|
4710
|
-
if (
|
|
4711
|
-
var a =
|
|
4712
|
-
k && (i = new o(
|
|
4713
|
-
for (var T, C, R = 0, O = 0, F = 0, U = 0, b = 0, B = 0, m = 0, g = 0, A = 0; R == 0; ) if (R = c(
|
|
4714
|
-
if (k && (i =
|
|
4715
|
-
F = d(
|
|
4710
|
+
if (r[0] == 3 && r[1] == 0) return i || new o(0);
|
|
4711
|
+
var a = n.F, c = a._bitsF, d = a._bitsE, l = a._decodeTiny, u = a.makeCodes, h = a.codes2map, f = a._get17, y = a.U, k = i == null;
|
|
4712
|
+
k && (i = new o(r.length >>> 2 << 3));
|
|
4713
|
+
for (var T, C, R = 0, O = 0, F = 0, U = 0, b = 0, B = 0, m = 0, g = 0, A = 0; R == 0; ) if (R = c(r, A, 1), O = c(r, A + 1, 2), A += 3, O != 0) {
|
|
4714
|
+
if (k && (i = n.F._check(i, g + (1 << 17))), O == 1 && (T = y.flmap, C = y.fdmap, B = 511, m = 31), O == 2) {
|
|
4715
|
+
F = d(r, A, 5) + 257, U = d(r, A + 5, 5) + 1, b = d(r, A + 10, 4) + 4, A += 14;
|
|
4716
4716
|
for (var I = 0; I < 38; I += 2) y.itree[I] = 0, y.itree[I + 1] = 0;
|
|
4717
4717
|
var N = 1;
|
|
4718
4718
|
for (I = 0; I < b; I++) {
|
|
4719
|
-
var L = d(
|
|
4719
|
+
var L = d(r, A + 3 * I, 3);
|
|
4720
4720
|
y.itree[1 + (y.ordr[I] << 1)] = L, L > N && (N = L);
|
|
4721
4721
|
}
|
|
4722
|
-
A += 3 * b, u(y.itree, N), h(y.itree, N, y.imap), T = y.lmap, C = y.dmap, A = l(y.imap, (1 << N) - 1, F + U,
|
|
4722
|
+
A += 3 * b, u(y.itree, N), h(y.itree, N, y.imap), T = y.lmap, C = y.dmap, A = l(y.imap, (1 << N) - 1, F + U, r, A, y.ttree);
|
|
4723
4723
|
var v = a._copyOut(y.ttree, 0, F, y.ltree);
|
|
4724
4724
|
B = (1 << v) - 1;
|
|
4725
4725
|
var _ = a._copyOut(y.ttree, F, U, y.dtree);
|
|
4726
4726
|
m = (1 << _) - 1, u(y.ltree, v), h(y.ltree, v, T), u(y.dtree, _), h(y.dtree, _, C);
|
|
4727
4727
|
}
|
|
4728
4728
|
for (; ; ) {
|
|
4729
|
-
var w = T[f(
|
|
4729
|
+
var w = T[f(r, A) & B];
|
|
4730
4730
|
A += 15 & w;
|
|
4731
4731
|
var p = w >>> 4;
|
|
4732
4732
|
if (!(p >>> 8)) i[g++] = p;
|
|
@@ -4735,29 +4735,29 @@ var Cn = {}, Ds = { get exports() {
|
|
|
4735
4735
|
var M = g + p - 254;
|
|
4736
4736
|
if (p > 264) {
|
|
4737
4737
|
var x = y.ldef[p - 257];
|
|
4738
|
-
M = g + (x >>> 3) + d(
|
|
4738
|
+
M = g + (x >>> 3) + d(r, A, 7 & x), A += 7 & x;
|
|
4739
4739
|
}
|
|
4740
|
-
var V = C[f(
|
|
4740
|
+
var V = C[f(r, A) & m];
|
|
4741
4741
|
A += 15 & V;
|
|
4742
|
-
var Z = V >>> 4, P = y.ddef[Z], q = (P >>> 4) + c(
|
|
4743
|
-
for (A += 15 & P, k && (i =
|
|
4742
|
+
var Z = V >>> 4, P = y.ddef[Z], q = (P >>> 4) + c(r, A, 15 & P);
|
|
4743
|
+
for (A += 15 & P, k && (i = n.F._check(i, g + (1 << 17))); g < M; ) i[g] = i[g++ - q], i[g] = i[g++ - q], i[g] = i[g++ - q], i[g] = i[g++ - q];
|
|
4744
4744
|
g = M;
|
|
4745
4745
|
}
|
|
4746
4746
|
}
|
|
4747
4747
|
} else {
|
|
4748
4748
|
7 & A && (A += 8 - (7 & A));
|
|
4749
|
-
var $ = 4 + (A >>> 3), S =
|
|
4750
|
-
k && (i =
|
|
4749
|
+
var $ = 4 + (A >>> 3), S = r[$ - 4] | r[$ - 3] << 8;
|
|
4750
|
+
k && (i = n.F._check(i, g + S)), i.set(new o(r.buffer, r.byteOffset + $, S), g), A = $ + S << 3, g += S;
|
|
4751
4751
|
}
|
|
4752
4752
|
return i.length == g ? i : i.slice(0, g);
|
|
4753
|
-
},
|
|
4754
|
-
var o =
|
|
4755
|
-
if (i <= o) return
|
|
4753
|
+
}, n.F._check = function(r, i) {
|
|
4754
|
+
var o = r.length;
|
|
4755
|
+
if (i <= o) return r;
|
|
4756
4756
|
var a = new Uint8Array(Math.max(o << 1, i));
|
|
4757
|
-
return a.set(
|
|
4758
|
-
},
|
|
4759
|
-
for (var l =
|
|
4760
|
-
var f =
|
|
4757
|
+
return a.set(r, 0), a;
|
|
4758
|
+
}, n.F._decodeTiny = function(r, i, o, a, c, d) {
|
|
4759
|
+
for (var l = n.F._bitsE, u = n.F._get17, h = 0; h < o; ) {
|
|
4760
|
+
var f = r[u(a, c) & i];
|
|
4761
4761
|
c += 15 & f;
|
|
4762
4762
|
var y = f >>> 4;
|
|
4763
4763
|
if (y <= 15) d[h] = y, h++;
|
|
@@ -4768,53 +4768,53 @@ var Cn = {}, Ds = { get exports() {
|
|
|
4768
4768
|
}
|
|
4769
4769
|
}
|
|
4770
4770
|
return c;
|
|
4771
|
-
},
|
|
4771
|
+
}, n.F._copyOut = function(r, i, o, a) {
|
|
4772
4772
|
for (var c = 0, d = 0, l = a.length >>> 1; d < o; ) {
|
|
4773
|
-
var u =
|
|
4773
|
+
var u = r[d + i];
|
|
4774
4774
|
a[d << 1] = 0, a[1 + (d << 1)] = u, u > c && (c = u), d++;
|
|
4775
4775
|
}
|
|
4776
4776
|
for (; d < l; ) a[d << 1] = 0, a[1 + (d << 1)] = 0, d++;
|
|
4777
4777
|
return c;
|
|
4778
|
-
},
|
|
4779
|
-
for (var o, a, c, d, l =
|
|
4780
|
-
for (f = 1; f < u; f += 2) h[
|
|
4778
|
+
}, n.F.makeCodes = function(r, i) {
|
|
4779
|
+
for (var o, a, c, d, l = n.F.U, u = r.length, h = l.bl_count, f = 0; f <= i; f++) h[f] = 0;
|
|
4780
|
+
for (f = 1; f < u; f += 2) h[r[f]]++;
|
|
4781
4781
|
var y = l.next_code;
|
|
4782
4782
|
for (o = 0, h[0] = 0, a = 1; a <= i; a++) o = o + h[a - 1] << 1, y[a] = o;
|
|
4783
|
-
for (c = 0; c < u; c += 2) (d =
|
|
4784
|
-
},
|
|
4785
|
-
for (var a =
|
|
4783
|
+
for (c = 0; c < u; c += 2) (d = r[c + 1]) != 0 && (r[c] = y[d], y[d]++);
|
|
4784
|
+
}, n.F.codes2map = function(r, i, o) {
|
|
4785
|
+
for (var a = r.length, c = n.F.U.rev15, d = 0; d < a; d += 2) if (r[d + 1] != 0) for (var l = d >> 1, u = r[d + 1], h = l << 4 | u, f = i - u, y = r[d] << f, k = y + (1 << f); y != k; )
|
|
4786
4786
|
o[c[y] >>> 15 - i] = h, y++;
|
|
4787
|
-
},
|
|
4788
|
-
for (var o =
|
|
4789
|
-
var d =
|
|
4790
|
-
|
|
4787
|
+
}, n.F.revCodes = function(r, i) {
|
|
4788
|
+
for (var o = n.F.U.rev15, a = 15 - i, c = 0; c < r.length; c += 2) {
|
|
4789
|
+
var d = r[c] << i - r[c + 1];
|
|
4790
|
+
r[c] = o[d] >>> a;
|
|
4791
4791
|
}
|
|
4792
|
-
},
|
|
4792
|
+
}, n.F._putsE = function(r, i, o) {
|
|
4793
4793
|
o <<= 7 & i;
|
|
4794
4794
|
var a = i >>> 3;
|
|
4795
|
-
|
|
4796
|
-
},
|
|
4795
|
+
r[a] |= o, r[a + 1] |= o >>> 8;
|
|
4796
|
+
}, n.F._putsF = function(r, i, o) {
|
|
4797
4797
|
o <<= 7 & i;
|
|
4798
4798
|
var a = i >>> 3;
|
|
4799
|
-
|
|
4800
|
-
},
|
|
4801
|
-
return (
|
|
4802
|
-
},
|
|
4803
|
-
return (
|
|
4804
|
-
},
|
|
4805
|
-
return (
|
|
4806
|
-
},
|
|
4807
|
-
return (
|
|
4808
|
-
},
|
|
4809
|
-
for (var
|
|
4799
|
+
r[a] |= o, r[a + 1] |= o >>> 8, r[a + 2] |= o >>> 16;
|
|
4800
|
+
}, n.F._bitsE = function(r, i, o) {
|
|
4801
|
+
return (r[i >>> 3] | r[1 + (i >>> 3)] << 8) >>> (7 & i) & (1 << o) - 1;
|
|
4802
|
+
}, n.F._bitsF = function(r, i, o) {
|
|
4803
|
+
return (r[i >>> 3] | r[1 + (i >>> 3)] << 8 | r[2 + (i >>> 3)] << 16) >>> (7 & i) & (1 << o) - 1;
|
|
4804
|
+
}, n.F._get17 = function(r, i) {
|
|
4805
|
+
return (r[i >>> 3] | r[1 + (i >>> 3)] << 8 | r[2 + (i >>> 3)] << 16) >>> (7 & i);
|
|
4806
|
+
}, n.F._get25 = function(r, i) {
|
|
4807
|
+
return (r[i >>> 3] | r[1 + (i >>> 3)] << 8 | r[2 + (i >>> 3)] << 16 | r[3 + (i >>> 3)] << 24) >>> (7 & i);
|
|
4808
|
+
}, n.F.U = (e = Uint16Array, t = Uint32Array, { next_code: new e(16), bl_count: new e(16), ordr: [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15], of0: [3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 999, 999, 999], exb: [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 0, 0, 0], ldef: new e(32), df0: [1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 65535, 65535], dxb: [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 0, 0], ddef: new t(32), flmap: new e(512), fltree: [], fdmap: new e(32), fdtree: [], lmap: new e(32768), ltree: [], ttree: [], dmap: new e(32768), dtree: [], imap: new e(512), itree: [], rev15: new e(32768), lhst: new t(286), dhst: new t(30), ihst: new t(19), lits: new t(15e3), strt: new e(65536), prev: new e(32768) }), function() {
|
|
4809
|
+
for (var r = n.F.U, i = 0; i < 32768; i++) {
|
|
4810
4810
|
var o = i;
|
|
4811
|
-
o = (4278255360 & (o = (4042322160 & (o = (3435973836 & (o = (2863311530 & o) >>> 1 | (1431655765 & o) << 1)) >>> 2 | (858993459 & o) << 2)) >>> 4 | (252645135 & o) << 4)) >>> 8 | (16711935 & o) << 8,
|
|
4811
|
+
o = (4278255360 & (o = (4042322160 & (o = (3435973836 & (o = (2863311530 & o) >>> 1 | (1431655765 & o) << 1)) >>> 2 | (858993459 & o) << 2)) >>> 4 | (252645135 & o) << 4)) >>> 8 | (16711935 & o) << 8, r.rev15[i] = (o >>> 16 | o << 16) >>> 17;
|
|
4812
4812
|
}
|
|
4813
4813
|
function a(c, d, l) {
|
|
4814
4814
|
for (; d-- != 0; ) c.push(0, l);
|
|
4815
4815
|
}
|
|
4816
|
-
for (i = 0; i < 32; i++)
|
|
4817
|
-
a(
|
|
4816
|
+
for (i = 0; i < 32; i++) r.ldef[i] = r.of0[i] << 3 | r.exb[i], r.ddef[i] = r.df0[i] << 4 | r.dxb[i];
|
|
4817
|
+
a(r.fltree, 144, 8), a(r.fltree, 112, 9), a(r.fltree, 24, 7), a(r.fltree, 8, 8), n.F.makeCodes(r.fltree, 9), n.F.codes2map(r.fltree, 9, r.flmap), n.F.revCodes(r.fltree, 9), a(r.fdtree, 32, 5), n.F.makeCodes(r.fdtree, 5), n.F.codes2map(r.fdtree, 5, r.fdmap), n.F.revCodes(r.fdtree, 5), a(r.itree, 19, 0), a(r.ltree, 286, 0), a(r.dtree, 30, 0), a(r.ttree, 320, 0);
|
|
4818
4818
|
}();
|
|
4819
4819
|
})();
|
|
4820
4820
|
var Ms = Ss({ __proto__: null, default: Cn }, [Cn]);
|
|
@@ -4918,7 +4918,7 @@ const Ke = function() {
|
|
|
4918
4918
|
}
|
|
4919
4919
|
function t(l, u, h, f) {
|
|
4920
4920
|
const y = i(l), k = Math.ceil(h * y / 8), T = new Uint8Array((k + 1 + l.interlace) * f);
|
|
4921
|
-
return u = l.tabs.CgBI ?
|
|
4921
|
+
return u = l.tabs.CgBI ? r(u, T) : n(u, T), l.interlace == 0 ? u = o(u, l, 0, h, f) : l.interlace == 1 && (u = function(R, O) {
|
|
4922
4922
|
const F = O.width, U = O.height, b = i(O), B = b >> 3, m = Math.ceil(F * b / 8), g = new Uint8Array(U * m);
|
|
4923
4923
|
let A = 0;
|
|
4924
4924
|
const I = [0, 0, 4, 0, 2, 0, 1], N = [0, 4, 0, 2, 0, 1, 0], L = [8, 8, 8, 4, 4, 2, 2], v = [8, 8, 4, 4, 2, 2, 1];
|
|
@@ -4949,10 +4949,10 @@ const Ke = function() {
|
|
|
4949
4949
|
return g;
|
|
4950
4950
|
}(u, l)), u;
|
|
4951
4951
|
}
|
|
4952
|
-
function
|
|
4953
|
-
return
|
|
4952
|
+
function n(l, u) {
|
|
4953
|
+
return r(new Uint8Array(l.buffer, 2, l.length - 6), u);
|
|
4954
4954
|
}
|
|
4955
|
-
var
|
|
4955
|
+
var r = function() {
|
|
4956
4956
|
const l = { H: {} };
|
|
4957
4957
|
return l.H.N = function(u, h) {
|
|
4958
4958
|
const f = Uint8Array;
|
|
@@ -5152,9 +5152,9 @@ const Ke = function() {
|
|
|
5152
5152
|
const p = h.slice(m + 2, f + _);
|
|
5153
5153
|
let M = null;
|
|
5154
5154
|
try {
|
|
5155
|
-
M = r(p);
|
|
5156
|
-
} catch {
|
|
5157
5155
|
M = n(p);
|
|
5156
|
+
} catch {
|
|
5157
|
+
M = r(p);
|
|
5158
5158
|
}
|
|
5159
5159
|
C.tabs[w] = M;
|
|
5160
5160
|
} else if (w == "CgBI") C.tabs[w] = h.slice(f, f + 4);
|
|
@@ -5180,7 +5180,7 @@ const Ke = function() {
|
|
|
5180
5180
|
var g = y.nextZero(h, f), A = y.readASCII(h, f, g - f), I = f + _ - g - 1;
|
|
5181
5181
|
if (w == "tEXt") L = y.readASCII(h, g + 1, I);
|
|
5182
5182
|
else {
|
|
5183
|
-
var N =
|
|
5183
|
+
var N = n(h.slice(g + 2, g + 2 + I));
|
|
5184
5184
|
L = y.readUTF8(N, 0, N.length);
|
|
5185
5185
|
}
|
|
5186
5186
|
C.tabs[w][A] = L;
|
|
@@ -5188,7 +5188,7 @@ const Ke = function() {
|
|
|
5188
5188
|
C.tabs[w] == null && (C.tabs[w] = {}), g = 0, m = f, g = y.nextZero(h, m), A = y.readASCII(h, m, g - m);
|
|
5189
5189
|
const p = h[m = g + 1];
|
|
5190
5190
|
var L;
|
|
5191
|
-
h[m + 1], m += 2, g = y.nextZero(h, m), y.readASCII(h, m, g - m), m = g + 1, g = y.nextZero(h, m), y.readUTF8(h, m, g - m), I = _ - ((m = g + 1) - f), p == 0 ? L = y.readUTF8(h, m, I) : (N =
|
|
5191
|
+
h[m + 1], m += 2, g = y.nextZero(h, m), y.readASCII(h, m, g - m), m = g + 1, g = y.nextZero(h, m), y.readUTF8(h, m, g - m), I = _ - ((m = g + 1) - f), p == 0 ? L = y.readUTF8(h, m, I) : (N = n(h.slice(m, m + I)), L = y.readUTF8(N, 0, N.length)), C.tabs[w][A] = L;
|
|
5192
5192
|
} else if (w == "PLTE") C.tabs[w] = y.readBytes(h, f, _);
|
|
5193
5193
|
else if (w == "hIST") {
|
|
5194
5194
|
const p = C.tabs.PLTE.length / 3;
|
|
@@ -5221,7 +5221,7 @@ const Ke = function() {
|
|
|
5221
5221
|
}();
|
|
5222
5222
|
(function() {
|
|
5223
5223
|
const { _copyTile: s } = Ke, { _bin: e } = Ke, t = Ke._paeth;
|
|
5224
|
-
var
|
|
5224
|
+
var n = { table: function() {
|
|
5225
5225
|
const m = new Uint32Array(256);
|
|
5226
5226
|
for (let g = 0; g < 256; g++) {
|
|
5227
5227
|
let A = g;
|
|
@@ -5230,10 +5230,10 @@ const Ke = function() {
|
|
|
5230
5230
|
}
|
|
5231
5231
|
return m;
|
|
5232
5232
|
}(), update(m, g, A, I) {
|
|
5233
|
-
for (let N = 0; N < I; N++) m =
|
|
5233
|
+
for (let N = 0; N < I; N++) m = n.table[255 & (m ^ g[A + N])] ^ m >>> 8;
|
|
5234
5234
|
return m;
|
|
5235
|
-
}, crc: (m, g, A) => 4294967295 ^
|
|
5236
|
-
function
|
|
5235
|
+
}, crc: (m, g, A) => 4294967295 ^ n.update(4294967295, m, g, A) };
|
|
5236
|
+
function r(m, g, A, I) {
|
|
5237
5237
|
g[A] += m[0] * I >> 4, g[A + 1] += m[1] * I >> 4, g[A + 2] += m[2] * I >> 4, g[A + 3] += m[3] * I >> 4;
|
|
5238
5238
|
}
|
|
5239
5239
|
function i(m) {
|
|
@@ -5268,12 +5268,12 @@ const Ke = function() {
|
|
|
5268
5268
|
re < ae && (ae = re, M = x);
|
|
5269
5269
|
}
|
|
5270
5270
|
const te = w[M], Y = [$[0] - te[0], $[1] - te[1], $[2] - te[2], $[3] - te[3]];
|
|
5271
|
-
v == 1 && (X != g - 1 &&
|
|
5271
|
+
v == 1 && (X != g - 1 && r(Y, P, p + 4, 7), S != A - 1 && (X != 0 && r(Y, P, p + 4 * g - 4, 3), r(Y, P, p + 4 * g, 5), X != g - 1 && r(Y, P, p + 4 * g + 4, 1))), L[p >> 2] = M, Z[p >> 2] = I[M];
|
|
5272
5272
|
}
|
|
5273
5273
|
}
|
|
5274
5274
|
function c(m, g, A, I, N) {
|
|
5275
5275
|
N == null && (N = {});
|
|
5276
|
-
const { crc: L } =
|
|
5276
|
+
const { crc: L } = n, v = e.writeUint, _ = e.writeUshort, w = e.writeASCII;
|
|
5277
5277
|
let p = 8;
|
|
5278
5278
|
const M = m.frames.length > 1;
|
|
5279
5279
|
let x, V = !1, Z = 33 + (M ? 20 : 0);
|
|
@@ -5583,7 +5583,7 @@ const Ke = function() {
|
|
|
5583
5583
|
}, Ke.encode.compress = l, Ke.encode.dither = a, Ke.quantize = k, Ke.quantize.getKDtree = T, Ke.quantize.getNearest = C;
|
|
5584
5584
|
})();
|
|
5585
5585
|
const Wr = { toArrayBuffer(s, e) {
|
|
5586
|
-
const t = s.width,
|
|
5586
|
+
const t = s.width, n = s.height, r = t << 2, i = s.getContext("2d").getImageData(0, 0, t, n), o = new Uint32Array(i.data.buffer), a = (32 * t + 31) / 32 << 2, c = a * n, d = 122 + c, l = new ArrayBuffer(d), u = new DataView(l), h = 1 << 20;
|
|
5587
5587
|
let f, y, k, T, C = h, R = 0, O = 0, F = 0;
|
|
5588
5588
|
function U(m) {
|
|
5589
5589
|
u.setUint16(O, m, !0), O += 2;
|
|
@@ -5594,9 +5594,9 @@ const Wr = { toArrayBuffer(s, e) {
|
|
|
5594
5594
|
function B(m) {
|
|
5595
5595
|
O += m;
|
|
5596
5596
|
}
|
|
5597
|
-
U(19778), b(d), B(4), b(122), b(108), b(t), b(-
|
|
5598
|
-
for (; R <
|
|
5599
|
-
for (T = 122 + R * a, f = 0; f <
|
|
5597
|
+
U(19778), b(d), B(4), b(122), b(108), b(t), b(-n >>> 0), U(1), U(32), b(3), b(c), b(2835), b(2835), B(8), b(16711680), b(65280), b(255), b(4278190080), b(1466527264), function m() {
|
|
5598
|
+
for (; R < n && C > 0; ) {
|
|
5599
|
+
for (T = 122 + R * a, f = 0; f < r; ) C--, y = o[F++], k = y >>> 24, u.setUint32(T + f, y << 8 | k), f += 4;
|
|
5600
5600
|
R++;
|
|
5601
5601
|
}
|
|
5602
5602
|
F < o.length ? (C = h, setTimeout(m, Wr._dly)) : e(l);
|
|
@@ -5609,25 +5609,25 @@ const Wr = { toArrayBuffer(s, e) {
|
|
|
5609
5609
|
var Me = { CHROME: "CHROME", FIREFOX: "FIREFOX", DESKTOP_SAFARI: "DESKTOP_SAFARI", IE: "IE", IOS: "IOS", ETC: "ETC" }, Vs = { [Me.CHROME]: 16384, [Me.FIREFOX]: 11180, [Me.DESKTOP_SAFARI]: 16384, [Me.IE]: 8192, [Me.IOS]: 4096, [Me.ETC]: 8192 };
|
|
5610
5610
|
const Xn = typeof window < "u", jr = typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope, En = Xn && window.cordova && window.cordova.require && window.cordova.require("cordova/modulemapper"), Hs = (Xn || jr) && (En && En.getOriginalSymbol(window, "File") || typeof File < "u" && File), qr = (Xn || jr) && (En && En.getOriginalSymbol(window, "FileReader") || typeof FileReader < "u" && FileReader);
|
|
5611
5611
|
function Gn(s, e, t = Date.now()) {
|
|
5612
|
-
return new Promise((
|
|
5613
|
-
const
|
|
5612
|
+
return new Promise((n) => {
|
|
5613
|
+
const r = s.split(","), i = r[0].match(/:(.*?);/)[1], o = globalThis.atob(r[1]);
|
|
5614
5614
|
let a = o.length;
|
|
5615
5615
|
const c = new Uint8Array(a);
|
|
5616
5616
|
for (; a--; ) c[a] = o.charCodeAt(a);
|
|
5617
5617
|
const d = new Blob([c], { type: i });
|
|
5618
|
-
d.name = e, d.lastModified = t,
|
|
5618
|
+
d.name = e, d.lastModified = t, n(d);
|
|
5619
5619
|
});
|
|
5620
5620
|
}
|
|
5621
5621
|
function Zr(s) {
|
|
5622
5622
|
return new Promise((e, t) => {
|
|
5623
|
-
const
|
|
5624
|
-
|
|
5623
|
+
const n = new qr();
|
|
5624
|
+
n.onload = () => e(n.result), n.onerror = (r) => t(r), n.readAsDataURL(s);
|
|
5625
5625
|
});
|
|
5626
5626
|
}
|
|
5627
5627
|
function Kr(s) {
|
|
5628
5628
|
return new Promise((e, t) => {
|
|
5629
|
-
const
|
|
5630
|
-
|
|
5629
|
+
const n = new Image();
|
|
5630
|
+
n.onload = () => e(n), n.onerror = (r) => t(r), n.src = s;
|
|
5631
5631
|
});
|
|
5632
5632
|
}
|
|
5633
5633
|
function Ot() {
|
|
@@ -5637,39 +5637,39 @@ function Ot() {
|
|
|
5637
5637
|
return /Chrom(e|ium)/i.test(e) ? s = Me.CHROME : /iP(ad|od|hone)/i.test(e) && /WebKit/i.test(e) ? s = Me.IOS : /Safari/i.test(e) ? s = Me.DESKTOP_SAFARI : /Firefox/i.test(e) ? s = Me.FIREFOX : (/MSIE/i.test(e) || document.documentMode) && (s = Me.IE), Ot.cachedResult = s, Ot.cachedResult;
|
|
5638
5638
|
}
|
|
5639
5639
|
function zr(s, e) {
|
|
5640
|
-
const t = Ot(),
|
|
5641
|
-
let
|
|
5642
|
-
const a =
|
|
5643
|
-
for (; o >
|
|
5644
|
-
const c = (
|
|
5645
|
-
c < d ? (i = d,
|
|
5640
|
+
const t = Ot(), n = Vs[t];
|
|
5641
|
+
let r = s, i = e, o = r * i;
|
|
5642
|
+
const a = r > i ? i / r : r / i;
|
|
5643
|
+
for (; o > n * n; ) {
|
|
5644
|
+
const c = (n + r) / 2, d = (n + i) / 2;
|
|
5645
|
+
c < d ? (i = d, r = d * a) : (i = c * a, r = c), o = r * i;
|
|
5646
5646
|
}
|
|
5647
|
-
return { width:
|
|
5647
|
+
return { width: r, height: i };
|
|
5648
5648
|
}
|
|
5649
5649
|
function Ln(s, e) {
|
|
5650
|
-
let t,
|
|
5650
|
+
let t, n;
|
|
5651
5651
|
try {
|
|
5652
|
-
if (t = new OffscreenCanvas(s, e),
|
|
5652
|
+
if (t = new OffscreenCanvas(s, e), n = t.getContext("2d"), n === null) throw new Error("getContext of OffscreenCanvas returns null");
|
|
5653
5653
|
} catch {
|
|
5654
|
-
t = document.createElement("canvas"),
|
|
5654
|
+
t = document.createElement("canvas"), n = t.getContext("2d");
|
|
5655
5655
|
}
|
|
5656
|
-
return t.width = s, t.height = e, [t,
|
|
5656
|
+
return t.width = s, t.height = e, [t, n];
|
|
5657
5657
|
}
|
|
5658
5658
|
function Xr(s, e) {
|
|
5659
|
-
const { width: t, height:
|
|
5660
|
-
return e && /jpe?g/.test(e) && (i.fillStyle = "white", i.fillRect(0, 0,
|
|
5659
|
+
const { width: t, height: n } = zr(s.width, s.height), [r, i] = Ln(t, n);
|
|
5660
|
+
return e && /jpe?g/.test(e) && (i.fillStyle = "white", i.fillRect(0, 0, r.width, r.height)), i.drawImage(s, 0, 0, r.width, r.height), r;
|
|
5661
5661
|
}
|
|
5662
5662
|
function gn() {
|
|
5663
5663
|
return gn.cachedResult !== void 0 || (gn.cachedResult = ["iPad Simulator", "iPhone Simulator", "iPod Simulator", "iPad", "iPhone", "iPod"].includes(navigator.platform) || navigator.userAgent.includes("Mac") && typeof document < "u" && "ontouchend" in document), gn.cachedResult;
|
|
5664
5664
|
}
|
|
5665
5665
|
function vn(s, e = {}) {
|
|
5666
|
-
return new Promise(function(t,
|
|
5667
|
-
let
|
|
5666
|
+
return new Promise(function(t, n) {
|
|
5667
|
+
let r, i;
|
|
5668
5668
|
var o = function() {
|
|
5669
5669
|
try {
|
|
5670
|
-
return i = Xr(
|
|
5670
|
+
return i = Xr(r, e.fileType || s.type), t([r, i]);
|
|
5671
5671
|
} catch (c) {
|
|
5672
|
-
return
|
|
5672
|
+
return n(c);
|
|
5673
5673
|
}
|
|
5674
5674
|
}, a = function(c) {
|
|
5675
5675
|
try {
|
|
@@ -5677,7 +5677,7 @@ function vn(s, e = {}) {
|
|
|
5677
5677
|
try {
|
|
5678
5678
|
throw l;
|
|
5679
5679
|
} catch (u) {
|
|
5680
|
-
return
|
|
5680
|
+
return n(u);
|
|
5681
5681
|
}
|
|
5682
5682
|
};
|
|
5683
5683
|
try {
|
|
@@ -5686,11 +5686,11 @@ function vn(s, e = {}) {
|
|
|
5686
5686
|
try {
|
|
5687
5687
|
return l = u, Kr(l).then(function(h) {
|
|
5688
5688
|
try {
|
|
5689
|
-
return
|
|
5689
|
+
return r = h, function() {
|
|
5690
5690
|
try {
|
|
5691
5691
|
return o();
|
|
5692
5692
|
} catch (f) {
|
|
5693
|
-
return
|
|
5693
|
+
return n(f);
|
|
5694
5694
|
}
|
|
5695
5695
|
}();
|
|
5696
5696
|
} catch (f) {
|
|
@@ -5705,14 +5705,14 @@ function vn(s, e = {}) {
|
|
|
5705
5705
|
d(l);
|
|
5706
5706
|
}
|
|
5707
5707
|
} catch (l) {
|
|
5708
|
-
return
|
|
5708
|
+
return n(l);
|
|
5709
5709
|
}
|
|
5710
5710
|
};
|
|
5711
5711
|
try {
|
|
5712
5712
|
if (gn() || [Me.DESKTOP_SAFARI, Me.MOBILE_SAFARI].includes(Ot())) throw new Error("Skip createImageBitmap on IOS and Safari");
|
|
5713
5713
|
return createImageBitmap(s).then(function(c) {
|
|
5714
5714
|
try {
|
|
5715
|
-
return
|
|
5715
|
+
return r = c, o();
|
|
5716
5716
|
} catch {
|
|
5717
5717
|
return a();
|
|
5718
5718
|
}
|
|
@@ -5722,12 +5722,12 @@ function vn(s, e = {}) {
|
|
|
5722
5722
|
}
|
|
5723
5723
|
});
|
|
5724
5724
|
}
|
|
5725
|
-
function An(s, e, t,
|
|
5725
|
+
function An(s, e, t, n, r = 1) {
|
|
5726
5726
|
return new Promise(function(i, o) {
|
|
5727
5727
|
let a;
|
|
5728
5728
|
if (e === "image/png") {
|
|
5729
5729
|
let d, l, u;
|
|
5730
|
-
return d = s.getContext("2d"), { data: l } = d.getImageData(0, 0, s.width, s.height), u = Ke.encode([l.buffer], s.width, s.height, 4096 *
|
|
5730
|
+
return d = s.getContext("2d"), { data: l } = d.getImageData(0, 0, s.width, s.height), u = Ke.encode([l.buffer], s.width, s.height, 4096 * r), a = new Blob([u], { type: e }), a.name = t, a.lastModified = n, c.call(this);
|
|
5731
5731
|
}
|
|
5732
5732
|
{
|
|
5733
5733
|
let d = function() {
|
|
@@ -5735,7 +5735,7 @@ function An(s, e, t, r, n = 1) {
|
|
|
5735
5735
|
};
|
|
5736
5736
|
if (e === "image/bmp") return new Promise((l) => Wr.toBlob(s, l)).then((function(l) {
|
|
5737
5737
|
try {
|
|
5738
|
-
return a = l, a.name = t, a.lastModified =
|
|
5738
|
+
return a = l, a.name = t, a.lastModified = n, d.call(this);
|
|
5739
5739
|
} catch (u) {
|
|
5740
5740
|
return o(u);
|
|
5741
5741
|
}
|
|
@@ -5744,16 +5744,16 @@ function An(s, e, t, r, n = 1) {
|
|
|
5744
5744
|
let l = function() {
|
|
5745
5745
|
return d.call(this);
|
|
5746
5746
|
};
|
|
5747
|
-
if (typeof OffscreenCanvas == "function" && s instanceof OffscreenCanvas) return s.convertToBlob({ type: e, quality:
|
|
5747
|
+
if (typeof OffscreenCanvas == "function" && s instanceof OffscreenCanvas) return s.convertToBlob({ type: e, quality: r }).then((function(u) {
|
|
5748
5748
|
try {
|
|
5749
|
-
return a = u, a.name = t, a.lastModified =
|
|
5749
|
+
return a = u, a.name = t, a.lastModified = n, l.call(this);
|
|
5750
5750
|
} catch (h) {
|
|
5751
5751
|
return o(h);
|
|
5752
5752
|
}
|
|
5753
5753
|
}).bind(this), o);
|
|
5754
5754
|
{
|
|
5755
5755
|
let u;
|
|
5756
|
-
return u = s.toDataURL(e,
|
|
5756
|
+
return u = s.toDataURL(e, r), Gn(u, t, n).then((function(h) {
|
|
5757
5757
|
try {
|
|
5758
5758
|
return a = h, l.call(this);
|
|
5759
5759
|
} catch (f) {
|
|
@@ -5773,14 +5773,14 @@ function dt(s) {
|
|
|
5773
5773
|
}
|
|
5774
5774
|
function $t() {
|
|
5775
5775
|
return new Promise(function(s, e) {
|
|
5776
|
-
let t,
|
|
5776
|
+
let t, n, r, i;
|
|
5777
5777
|
return $t.cachedResult !== void 0 ? s($t.cachedResult) : Gn("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==", "test.jpg", Date.now()).then(function(o) {
|
|
5778
5778
|
try {
|
|
5779
5779
|
return t = o, vn(t).then(function(a) {
|
|
5780
5780
|
try {
|
|
5781
|
-
return
|
|
5781
|
+
return n = a[1], An(n, t.type, t.name, t.lastModified).then(function(c) {
|
|
5782
5782
|
try {
|
|
5783
|
-
return
|
|
5783
|
+
return r = c, dt(n), vn(r).then(function(d) {
|
|
5784
5784
|
try {
|
|
5785
5785
|
return i = d[0], $t.cachedResult = i.width === 1 && i.height === 2, s($t.cachedResult);
|
|
5786
5786
|
} catch (l) {
|
|
@@ -5803,9 +5803,9 @@ function $t() {
|
|
|
5803
5803
|
}
|
|
5804
5804
|
function Gr(s) {
|
|
5805
5805
|
return new Promise((e, t) => {
|
|
5806
|
-
const
|
|
5807
|
-
|
|
5808
|
-
const i = new DataView(
|
|
5806
|
+
const n = new qr();
|
|
5807
|
+
n.onload = (r) => {
|
|
5808
|
+
const i = new DataView(r.target.result);
|
|
5809
5809
|
if (i.getUint16(0, !1) != 65496) return e(-2);
|
|
5810
5810
|
const o = i.byteLength;
|
|
5811
5811
|
let a = 2;
|
|
@@ -5825,42 +5825,42 @@ function Gr(s) {
|
|
|
5825
5825
|
}
|
|
5826
5826
|
}
|
|
5827
5827
|
return e(-1);
|
|
5828
|
-
},
|
|
5828
|
+
}, n.onerror = (r) => t(r), n.readAsArrayBuffer(s);
|
|
5829
5829
|
});
|
|
5830
5830
|
}
|
|
5831
5831
|
function Jr(s, e) {
|
|
5832
|
-
const { width: t } = s, { height:
|
|
5832
|
+
const { width: t } = s, { height: n } = s, { maxWidthOrHeight: r } = e;
|
|
5833
5833
|
let i, o = s;
|
|
5834
|
-
return isFinite(
|
|
5834
|
+
return isFinite(r) && (t > r || n > r) && ([o, i] = Ln(t, n), t > n ? (o.width = r, o.height = n / t * r) : (o.width = t / n * r, o.height = r), i.drawImage(s, 0, 0, o.width, o.height), dt(s)), o;
|
|
5835
5835
|
}
|
|
5836
5836
|
function Qr(s, e) {
|
|
5837
|
-
const { width: t } = s, { height:
|
|
5838
|
-
switch (e > 4 && e < 9 ? (
|
|
5837
|
+
const { width: t } = s, { height: n } = s, [r, i] = Ln(t, n);
|
|
5838
|
+
switch (e > 4 && e < 9 ? (r.width = n, r.height = t) : (r.width = t, r.height = n), e) {
|
|
5839
5839
|
case 2:
|
|
5840
5840
|
i.transform(-1, 0, 0, 1, t, 0);
|
|
5841
5841
|
break;
|
|
5842
5842
|
case 3:
|
|
5843
|
-
i.transform(-1, 0, 0, -1, t,
|
|
5843
|
+
i.transform(-1, 0, 0, -1, t, n);
|
|
5844
5844
|
break;
|
|
5845
5845
|
case 4:
|
|
5846
|
-
i.transform(1, 0, 0, -1, 0,
|
|
5846
|
+
i.transform(1, 0, 0, -1, 0, n);
|
|
5847
5847
|
break;
|
|
5848
5848
|
case 5:
|
|
5849
5849
|
i.transform(0, 1, 1, 0, 0, 0);
|
|
5850
5850
|
break;
|
|
5851
5851
|
case 6:
|
|
5852
|
-
i.transform(0, 1, -1, 0,
|
|
5852
|
+
i.transform(0, 1, -1, 0, n, 0);
|
|
5853
5853
|
break;
|
|
5854
5854
|
case 7:
|
|
5855
|
-
i.transform(0, -1, -1, 0,
|
|
5855
|
+
i.transform(0, -1, -1, 0, n, t);
|
|
5856
5856
|
break;
|
|
5857
5857
|
case 8:
|
|
5858
5858
|
i.transform(0, -1, 1, 0, 0, t);
|
|
5859
5859
|
}
|
|
5860
|
-
return i.drawImage(s, 0, 0, t,
|
|
5860
|
+
return i.drawImage(s, 0, 0, t, n), dt(s), r;
|
|
5861
5861
|
}
|
|
5862
5862
|
function br(s, e, t = 0) {
|
|
5863
|
-
return new Promise(function(
|
|
5863
|
+
return new Promise(function(n, r) {
|
|
5864
5864
|
let i, o, a, c, d, l, u, h, f, y, k, T, C, R, O, F, U, b, B, m;
|
|
5865
5865
|
function g(I = 5) {
|
|
5866
5866
|
if (e.signal && e.signal.aborted) throw e.signal.reason;
|
|
@@ -5899,46 +5899,46 @@ function br(s, e, t = 0) {
|
|
|
5899
5899
|
try {
|
|
5900
5900
|
return F = V, dt(B), B = U, O = F.size, A(Math.min(99, Math.floor((R - O) / (R - a) * 100))), w;
|
|
5901
5901
|
} catch (Z) {
|
|
5902
|
-
return
|
|
5902
|
+
return r(Z);
|
|
5903
5903
|
}
|
|
5904
|
-
},
|
|
5904
|
+
}, r);
|
|
5905
5905
|
}
|
|
5906
5906
|
return [1];
|
|
5907
5907
|
}, p = function() {
|
|
5908
|
-
return dt(B), dt(U), dt(d), dt(u), dt(c), A(100),
|
|
5908
|
+
return dt(B), dt(U), dt(d), dt(u), dt(c), A(100), n(F);
|
|
5909
5909
|
};
|
|
5910
|
-
if (y = v, g(), k = y.size > a, T = y.size > s.size, !k && !T) return A(100),
|
|
5910
|
+
if (y = v, g(), k = y.size > a, T = y.size > s.size, !k && !T) return A(100), n(y);
|
|
5911
5911
|
var _;
|
|
5912
5912
|
return C = s.size, R = y.size, O = R, B = u, m = !e.alwaysKeepResolution && k, (_ = (function(M) {
|
|
5913
5913
|
for (; M; ) {
|
|
5914
|
-
if (M.then) return void M.then(_,
|
|
5914
|
+
if (M.then) return void M.then(_, r);
|
|
5915
5915
|
try {
|
|
5916
5916
|
if (M.pop) {
|
|
5917
5917
|
if (M.length) return M.pop() ? p.call(this) : M;
|
|
5918
5918
|
M = w;
|
|
5919
5919
|
} else M = M.call(this);
|
|
5920
5920
|
} catch (x) {
|
|
5921
|
-
return
|
|
5921
|
+
return r(x);
|
|
5922
5922
|
}
|
|
5923
5923
|
}
|
|
5924
5924
|
}).bind(this))(w);
|
|
5925
5925
|
}
|
|
5926
5926
|
} catch (w) {
|
|
5927
|
-
return
|
|
5927
|
+
return r(w);
|
|
5928
5928
|
}
|
|
5929
|
-
}).bind(this),
|
|
5929
|
+
}).bind(this), r);
|
|
5930
5930
|
} catch (v) {
|
|
5931
|
-
return
|
|
5931
|
+
return r(v);
|
|
5932
5932
|
}
|
|
5933
|
-
}).bind(this),
|
|
5933
|
+
}).bind(this), r);
|
|
5934
5934
|
} catch (L) {
|
|
5935
|
-
return
|
|
5935
|
+
return r(L);
|
|
5936
5936
|
}
|
|
5937
|
-
}).bind(this),
|
|
5937
|
+
}).bind(this), r);
|
|
5938
5938
|
} catch (N) {
|
|
5939
|
-
return
|
|
5939
|
+
return r(N);
|
|
5940
5940
|
}
|
|
5941
|
-
}).bind(this),
|
|
5941
|
+
}).bind(this), r);
|
|
5942
5942
|
});
|
|
5943
5943
|
}
|
|
5944
5944
|
const $s = `
|
|
@@ -5963,58 +5963,58 @@ self.addEventListener('message', async (e) => {
|
|
|
5963
5963
|
`;
|
|
5964
5964
|
let Mn;
|
|
5965
5965
|
function Ps(s, e) {
|
|
5966
|
-
return new Promise((t,
|
|
5966
|
+
return new Promise((t, n) => {
|
|
5967
5967
|
Mn || (Mn = function(o) {
|
|
5968
5968
|
const a = [];
|
|
5969
5969
|
return a.push(o), URL.createObjectURL(new Blob(a));
|
|
5970
5970
|
}($s));
|
|
5971
|
-
const
|
|
5972
|
-
|
|
5973
|
-
if (e.signal && e.signal.aborted)
|
|
5971
|
+
const r = new Worker(Mn);
|
|
5972
|
+
r.addEventListener("message", function(o) {
|
|
5973
|
+
if (e.signal && e.signal.aborted) r.terminate();
|
|
5974
5974
|
else if (o.data.progress === void 0) {
|
|
5975
|
-
if (o.data.error) return
|
|
5976
|
-
t(o.data.file),
|
|
5975
|
+
if (o.data.error) return n(new Error(o.data.error)), void r.terminate();
|
|
5976
|
+
t(o.data.file), r.terminate();
|
|
5977
5977
|
} else e.onProgress(o.data.progress);
|
|
5978
|
-
}),
|
|
5979
|
-
|
|
5980
|
-
}),
|
|
5978
|
+
}), r.addEventListener("error", n), e.signal && e.signal.addEventListener("abort", () => {
|
|
5979
|
+
n(e.signal.reason), r.terminate();
|
|
5980
|
+
}), r.postMessage({ file: s, imageCompressionLibUrl: e.libURL, options: { ...e, onProgress: void 0, signal: void 0 } });
|
|
5981
5981
|
});
|
|
5982
5982
|
}
|
|
5983
5983
|
function Be(s, e) {
|
|
5984
|
-
return new Promise(function(t,
|
|
5985
|
-
let
|
|
5986
|
-
if (
|
|
5984
|
+
return new Promise(function(t, n) {
|
|
5985
|
+
let r, i, o, a, c, d;
|
|
5986
|
+
if (r = { ...e }, o = 0, { onProgress: a } = r, r.maxSizeMB = r.maxSizeMB || Number.POSITIVE_INFINITY, c = typeof r.useWebWorker != "boolean" || r.useWebWorker, delete r.useWebWorker, r.onProgress = (f) => {
|
|
5987
5987
|
o = f, typeof a == "function" && a(o);
|
|
5988
|
-
}, !(s instanceof Blob || s instanceof Hs)) return
|
|
5989
|
-
if (!/^image/.test(s.type)) return
|
|
5990
|
-
if (d = typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope, !c || typeof Worker != "function" || d) return br(s,
|
|
5988
|
+
}, !(s instanceof Blob || s instanceof Hs)) return n(new Error("The file given is not an instance of Blob or File"));
|
|
5989
|
+
if (!/^image/.test(s.type)) return n(new Error("The file given is not an image"));
|
|
5990
|
+
if (d = typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope, !c || typeof Worker != "function" || d) return br(s, r).then((function(f) {
|
|
5991
5991
|
try {
|
|
5992
5992
|
return i = f, h.call(this);
|
|
5993
5993
|
} catch (y) {
|
|
5994
|
-
return
|
|
5994
|
+
return n(y);
|
|
5995
5995
|
}
|
|
5996
|
-
}).bind(this),
|
|
5996
|
+
}).bind(this), n);
|
|
5997
5997
|
var l = (function() {
|
|
5998
5998
|
try {
|
|
5999
5999
|
return h.call(this);
|
|
6000
6000
|
} catch (f) {
|
|
6001
|
-
return
|
|
6001
|
+
return n(f);
|
|
6002
6002
|
}
|
|
6003
6003
|
}).bind(this), u = function(f) {
|
|
6004
6004
|
try {
|
|
6005
|
-
return br(s,
|
|
6005
|
+
return br(s, r).then(function(y) {
|
|
6006
6006
|
try {
|
|
6007
6007
|
return i = y, l();
|
|
6008
6008
|
} catch (k) {
|
|
6009
|
-
return
|
|
6009
|
+
return n(k);
|
|
6010
6010
|
}
|
|
6011
|
-
},
|
|
6011
|
+
}, n);
|
|
6012
6012
|
} catch (y) {
|
|
6013
|
-
return
|
|
6013
|
+
return n(y);
|
|
6014
6014
|
}
|
|
6015
6015
|
};
|
|
6016
6016
|
try {
|
|
6017
|
-
return
|
|
6017
|
+
return r.libURL = r.libURL || "https://cdn.jsdelivr.net/npm/browser-image-compression@2.0.2/dist/browser-image-compression.js", Ps(s, r).then(function(f) {
|
|
6018
6018
|
try {
|
|
6019
6019
|
return i = f, l();
|
|
6020
6020
|
} catch {
|
|
@@ -6030,7 +6030,7 @@ function Be(s, e) {
|
|
|
6030
6030
|
} catch {
|
|
6031
6031
|
}
|
|
6032
6032
|
try {
|
|
6033
|
-
|
|
6033
|
+
r.preserveExif && s.type === "image/jpeg" && (!r.fileType || r.fileType && r.fileType === s.type) && (i = Pr(s, i));
|
|
6034
6034
|
} catch {
|
|
6035
6035
|
}
|
|
6036
6036
|
return t(i);
|
|
@@ -6054,8 +6054,8 @@ class Ws extends Ie {
|
|
|
6054
6054
|
const t = globalThis.Object.create(this.messagePrototype);
|
|
6055
6055
|
return t.mimeType = "", e !== void 0 && ve(this, t, e), t;
|
|
6056
6056
|
}
|
|
6057
|
-
internalBinaryRead(e, t,
|
|
6058
|
-
let i =
|
|
6057
|
+
internalBinaryRead(e, t, n, r) {
|
|
6058
|
+
let i = r ?? this.create(), o = e.pos + t;
|
|
6059
6059
|
for (; e.pos < o; ) {
|
|
6060
6060
|
let [a, c] = e.tag();
|
|
6061
6061
|
switch (a) {
|
|
@@ -6064,7 +6064,7 @@ class Ws extends Ie {
|
|
|
6064
6064
|
i.mimeType = e.string();
|
|
6065
6065
|
break;
|
|
6066
6066
|
default:
|
|
6067
|
-
let d =
|
|
6067
|
+
let d = n.readUnknownField;
|
|
6068
6068
|
if (d === "throw")
|
|
6069
6069
|
throw new globalThis.Error(`Unknown field ${a} (wire type ${c}) for ${this.typeName}`);
|
|
6070
6070
|
let l = e.skip(c);
|
|
@@ -6073,10 +6073,10 @@ class Ws extends Ie {
|
|
|
6073
6073
|
}
|
|
6074
6074
|
return i;
|
|
6075
6075
|
}
|
|
6076
|
-
internalBinaryWrite(e, t,
|
|
6076
|
+
internalBinaryWrite(e, t, n) {
|
|
6077
6077
|
e.mimeType !== "" && t.tag(1, j.LengthDelimited).string(e.mimeType);
|
|
6078
|
-
let
|
|
6079
|
-
return
|
|
6078
|
+
let r = n.writeUnknownFields;
|
|
6079
|
+
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
6080
6080
|
}
|
|
6081
6081
|
}
|
|
6082
6082
|
const kn = new Ws();
|
|
@@ -6110,8 +6110,8 @@ class js extends Ie {
|
|
|
6110
6110
|
const t = globalThis.Object.create(this.messagePrototype);
|
|
6111
6111
|
return t.key = "", t.uploadUrl = "", t.accessUrl = "", e !== void 0 && ve(this, t, e), t;
|
|
6112
6112
|
}
|
|
6113
|
-
internalBinaryRead(e, t,
|
|
6114
|
-
let i =
|
|
6113
|
+
internalBinaryRead(e, t, n, r) {
|
|
6114
|
+
let i = r ?? this.create(), o = e.pos + t;
|
|
6115
6115
|
for (; e.pos < o; ) {
|
|
6116
6116
|
let [a, c] = e.tag();
|
|
6117
6117
|
switch (a) {
|
|
@@ -6128,7 +6128,7 @@ class js extends Ie {
|
|
|
6128
6128
|
i.accessUrl = e.string();
|
|
6129
6129
|
break;
|
|
6130
6130
|
default:
|
|
6131
|
-
let d =
|
|
6131
|
+
let d = n.readUnknownField;
|
|
6132
6132
|
if (d === "throw")
|
|
6133
6133
|
throw new globalThis.Error(`Unknown field ${a} (wire type ${c}) for ${this.typeName}`);
|
|
6134
6134
|
let l = e.skip(c);
|
|
@@ -6137,10 +6137,10 @@ class js extends Ie {
|
|
|
6137
6137
|
}
|
|
6138
6138
|
return i;
|
|
6139
6139
|
}
|
|
6140
|
-
internalBinaryWrite(e, t,
|
|
6140
|
+
internalBinaryWrite(e, t, n) {
|
|
6141
6141
|
e.key !== "" && t.tag(1, j.LengthDelimited).string(e.key), e.uploadUrl !== "" && t.tag(2, j.LengthDelimited).string(e.uploadUrl), e.accessUrl !== "" && t.tag(3, j.LengthDelimited).string(e.accessUrl);
|
|
6142
|
-
let
|
|
6143
|
-
return
|
|
6142
|
+
let r = n.writeUnknownFields;
|
|
6143
|
+
return r !== !1 && (r == !0 ? G.onWrite : r)(this.typeName, e, t), t;
|
|
6144
6144
|
}
|
|
6145
6145
|
}
|
|
6146
6146
|
const Cr = new js(), Vn = new Kn("com.hamropatro.grpc.common.ImageUploadService", [
|
|
@@ -6158,74 +6158,76 @@ class Yr {
|
|
|
6158
6158
|
* @generated from protobuf rpc: Upload(com.hamropatro.grpc.common.ImageUploadRequest) returns (com.hamropatro.grpc.common.ImageUploadResponse);
|
|
6159
6159
|
*/
|
|
6160
6160
|
upload(e, t) {
|
|
6161
|
-
const
|
|
6162
|
-
return $e("unary", this._transport,
|
|
6161
|
+
const n = this.methods[0], r = this._transport.mergeOptions(t);
|
|
6162
|
+
return $e("unary", this._transport, n, r, e);
|
|
6163
6163
|
}
|
|
6164
6164
|
/**
|
|
6165
6165
|
* @generated from protobuf rpc: UploadUserImage(com.hamropatro.grpc.common.ImageUploadRequest) returns (com.hamropatro.grpc.common.ImageUploadResponse);
|
|
6166
6166
|
*/
|
|
6167
6167
|
uploadUserImage(e, t) {
|
|
6168
|
-
const
|
|
6169
|
-
return $e("unary", this._transport,
|
|
6168
|
+
const n = this.methods[1], r = this._transport.mergeOptions(t);
|
|
6169
|
+
return $e("unary", this._transport, n, r, e);
|
|
6170
6170
|
}
|
|
6171
6171
|
}
|
|
6172
6172
|
const qs = async (s, e, t = !0) => {
|
|
6173
6173
|
var o;
|
|
6174
|
-
const
|
|
6174
|
+
const n = (o = window.ImageSalonSDK) == null ? void 0 : o.grpcConfig, r = new Yr(n), i = kn.create();
|
|
6175
6175
|
try {
|
|
6176
|
-
return i.mimeType = s, t ? await
|
|
6176
|
+
return i.mimeType = s, t ? await r.upload(i, e) : await r.uploadUserImage(
|
|
6177
6177
|
i,
|
|
6178
6178
|
e
|
|
6179
6179
|
);
|
|
6180
6180
|
} catch (a) {
|
|
6181
6181
|
throw a;
|
|
6182
6182
|
}
|
|
6183
|
-
}, Zs = async (s, e, t = !0,
|
|
6183
|
+
}, Zs = async (s, e, t = !0, n) => {
|
|
6184
6184
|
var a;
|
|
6185
|
-
const
|
|
6185
|
+
const r = (a = window.ImageSalonSDK) == null ? void 0 : a.grpcConfig, i = new Yr(r), o = kn.create();
|
|
6186
6186
|
try {
|
|
6187
6187
|
o.mimeType = s;
|
|
6188
6188
|
const c = t;
|
|
6189
6189
|
return await i.uploadUserImage(o, {
|
|
6190
6190
|
meta: {
|
|
6191
6191
|
Authorization: e,
|
|
6192
|
-
"app-id":
|
|
6192
|
+
"app-id": n === "production" ? "hamropatro" : "hamropatro-android"
|
|
6193
6193
|
}
|
|
6194
6194
|
}), c;
|
|
6195
6195
|
} catch (c) {
|
|
6196
6196
|
throw c;
|
|
6197
6197
|
}
|
|
6198
|
-
}, Er = async (s, e, t,
|
|
6199
|
-
var
|
|
6198
|
+
}, Er = async (s, e, t, n = !0) => {
|
|
6199
|
+
var r, i;
|
|
6200
6200
|
try {
|
|
6201
|
-
const o = await qs(e == null ? void 0 : e.type, t,
|
|
6201
|
+
const o = await qs(e == null ? void 0 : e.type, t, n), a = (r = o.response) == null ? void 0 : r.uploadUrl, c = (i = o == null ? void 0 : o.response) == null ? void 0 : i.accessUrl;
|
|
6202
6202
|
return await ei(s, a, e), c;
|
|
6203
6203
|
} catch (o) {
|
|
6204
6204
|
throw o;
|
|
6205
6205
|
}
|
|
6206
6206
|
}, ei = async (s, e, t) => {
|
|
6207
|
-
const
|
|
6207
|
+
const n = zs(s, t);
|
|
6208
|
+
console.log("buff 31", n);
|
|
6208
6209
|
try {
|
|
6209
6210
|
await fetch(e, {
|
|
6210
6211
|
method: "PUT",
|
|
6211
6212
|
headers: {
|
|
6212
6213
|
"Content-Type": t == null ? void 0 : t.type
|
|
6213
6214
|
},
|
|
6214
|
-
body:
|
|
6215
|
+
body: n
|
|
6215
6216
|
});
|
|
6216
|
-
} catch (
|
|
6217
|
-
throw
|
|
6217
|
+
} catch (r) {
|
|
6218
|
+
throw r;
|
|
6218
6219
|
}
|
|
6219
|
-
}, Ks = async (s, e, t,
|
|
6220
|
+
}, Ks = async (s, e, t, n = !1, r) => {
|
|
6220
6221
|
var i, o;
|
|
6221
6222
|
try {
|
|
6223
|
+
console.log("reader base 64 line 53", s), console.log("file", e), console.log("access token", t), console.log("isAdmin", n), console.log("mode", r);
|
|
6222
6224
|
const a = await Zs(
|
|
6223
6225
|
e == null ? void 0 : e.type,
|
|
6224
6226
|
t,
|
|
6225
|
-
|
|
6226
|
-
|
|
6227
|
+
n,
|
|
6228
|
+
r
|
|
6227
6229
|
);
|
|
6228
|
-
console.log("upload response", a);
|
|
6230
|
+
console.log("upload response line 60", a);
|
|
6229
6231
|
const c = (i = a.response) == null ? void 0 : i.uploadUrl, d = (o = a == null ? void 0 : a.response) == null ? void 0 : o.accessUrl;
|
|
6230
6232
|
return await ei(s, c, e), d;
|
|
6231
6233
|
} catch (a) {
|
|
@@ -6234,12 +6236,12 @@ const qs = async (s, e, t = !0) => {
|
|
|
6234
6236
|
}, zs = (s, e) => {
|
|
6235
6237
|
const t = e.type.split("/")[0];
|
|
6236
6238
|
console.log("file type", t), console.log("base 64 image", s);
|
|
6237
|
-
let
|
|
6238
|
-
t === "video" ?
|
|
6239
|
-
const
|
|
6240
|
-
for (let o = 0; o <
|
|
6241
|
-
i[o] =
|
|
6242
|
-
return i;
|
|
6239
|
+
let n = "";
|
|
6240
|
+
t === "video" ? n = s == null ? void 0 : s.replace(/^data:video\/\w+;base64,/, "") : t === "image" ? n = s == null ? void 0 : s.replace(/^data:image\/\w+;base64,/, "") : t === "audio" && (n = s == null ? void 0 : s.replace(/^data:audio\/\w+;base64,/, "")), console.log("base 64 string", n);
|
|
6241
|
+
const r = atob(n), i = new Uint8Array(r.length);
|
|
6242
|
+
for (let o = 0; o < r.length; o++)
|
|
6243
|
+
i[o] = r.charCodeAt(o);
|
|
6244
|
+
return console.log("buffer", i), i;
|
|
6243
6245
|
};
|
|
6244
6246
|
async function vr(s) {
|
|
6245
6247
|
const e = {
|
|
@@ -6316,25 +6318,25 @@ class Gs {
|
|
|
6316
6318
|
return e.isAdmin === !0;
|
|
6317
6319
|
}
|
|
6318
6320
|
_renderView(e) {
|
|
6319
|
-
var t,
|
|
6320
|
-
return this._isAdminOptions(e) ? (H(this, He, !1), H(this, St, !1), H(this, Nt, 0), H(this, at, ""), H(this, gt, !1), H(this, xt, e.mode), H(this, Tt, !1), H(this, Ut, ""), H(this, wt, null), this._removeToastContainer(), this._renderAdminView(e)) : (H(this, qt, ""), H(this, Zt, e == null ? void 0 : e.restrictedFileSize), H(this, Kt, e == null ? void 0 : e.localizedFileRestrictedMessage), H(this, Xt, e == null ? void 0 : e.localizedSuccessMessage), H(this, zt, e == null ? void 0 : e.localizedErrorMessage), H(this, ct, e == null ? void 0 : e.imagePreviewWidth), H(this, Jt, e == null ? void 0 : e.imagePreviewHeight), H(this, an, (t = e == null ? void 0 : e.removeImageConfirm) == null ? void 0 : t.bind(this)), H(this, ln, (
|
|
6321
|
+
var t, n, r;
|
|
6322
|
+
return this._isAdminOptions(e) ? (H(this, He, !1), H(this, St, !1), H(this, Nt, 0), H(this, at, ""), H(this, gt, !1), H(this, xt, e.mode), H(this, Tt, !1), H(this, Ut, ""), H(this, wt, null), this._removeToastContainer(), this._renderAdminView(e)) : (H(this, qt, ""), H(this, Zt, e == null ? void 0 : e.restrictedFileSize), H(this, Kt, e == null ? void 0 : e.localizedFileRestrictedMessage), H(this, Xt, e == null ? void 0 : e.localizedSuccessMessage), H(this, zt, e == null ? void 0 : e.localizedErrorMessage), H(this, ct, e == null ? void 0 : e.imagePreviewWidth), H(this, Jt, e == null ? void 0 : e.imagePreviewHeight), H(this, an, (t = e == null ? void 0 : e.removeImageConfirm) == null ? void 0 : t.bind(this)), H(this, ln, (n = e == null ? void 0 : e.removeImagePreviewCB) == null ? void 0 : n.bind(this)), H(this, Gt, (r = e == null ? void 0 : e.getUploadingState) == null ? void 0 : r.bind(this)), this._removeUserToast(), this._renderUserView(e));
|
|
6321
6323
|
}
|
|
6322
6324
|
_renderAdminView(e) {
|
|
6323
6325
|
if (!E(this, sn)) return;
|
|
6324
6326
|
const { parentContainerId: t } = e;
|
|
6325
6327
|
if (e.isAdmin === !0)
|
|
6326
|
-
var { buttonProps:
|
|
6328
|
+
var { buttonProps: n } = e;
|
|
6327
6329
|
H(this, At, document.getElementById(t));
|
|
6328
|
-
const
|
|
6329
|
-
|
|
6330
|
-
|
|
6330
|
+
const r = document.createElement("button");
|
|
6331
|
+
r.className = n != null && n.buttonClass ? n == null ? void 0 : n.buttonClass : "browse-image-button", r.addEventListener("focus", () => {
|
|
6332
|
+
r.blur();
|
|
6331
6333
|
});
|
|
6332
6334
|
const i = document.createElement("span");
|
|
6333
|
-
i.textContent =
|
|
6335
|
+
i.textContent = n != null && n.buttonText ? n == null ? void 0 : n.buttonText : "Browse Files";
|
|
6334
6336
|
const o = document.createElement("span");
|
|
6335
|
-
o.innerHTML =
|
|
6337
|
+
o.innerHTML = n != null && n.buttonIcon ? n == null ? void 0 : n.buttonIcon : "", r.type = "button", r.append(i, o), n != null && n.buttonStyle && Object.assign(r.style, n == null ? void 0 : n.buttonStyle), r.addEventListener("click", () => {
|
|
6336
6338
|
this._selectedImageContainer();
|
|
6337
|
-
}), E(this, At).appendChild(
|
|
6339
|
+
}), E(this, At).appendChild(r);
|
|
6338
6340
|
}
|
|
6339
6341
|
async _grpcOptionInitializer() {
|
|
6340
6342
|
H(this, Oe, await _s(
|
|
@@ -6358,10 +6360,10 @@ class Gs {
|
|
|
6358
6360
|
).addEventListener("click", () => {
|
|
6359
6361
|
pn.hide(), H(this, ge, []), H(this, ke, []);
|
|
6360
6362
|
}), H(this, be, K("browse-container"));
|
|
6361
|
-
const
|
|
6362
|
-
|
|
6363
|
-
const
|
|
6364
|
-
i.append(mr()), this._createUpdateFolderDialog(i, "create"),
|
|
6363
|
+
const n = K();
|
|
6364
|
+
n.style.display = "flex", n.style.alignItems = "center", n.style.justifyContent = "space-between", n.style.padding = "10px 20px";
|
|
6365
|
+
const r = en("Folders", "folder-title"), i = Ve("", "add-folder-btn");
|
|
6366
|
+
i.append(mr()), this._createUpdateFolderDialog(i, "create"), n.append(r, i), E(this, It).append(n, E(this, mt));
|
|
6365
6367
|
const o = this._renderSearchField(), a = this._createBrowseMoreContainer(), c = this._createBrowseImageMain(), d = K("footer");
|
|
6366
6368
|
e.onclick = () => {
|
|
6367
6369
|
pn.hide(), H(this, ke, []), H(this, ge, []);
|
|
@@ -6374,29 +6376,29 @@ class Gs {
|
|
|
6374
6376
|
});
|
|
6375
6377
|
}
|
|
6376
6378
|
_renderUserView(e) {
|
|
6377
|
-
const { parentContainerId: t, restrictedFileSize:
|
|
6379
|
+
const { parentContainerId: t, restrictedFileSize: n, imagePreview: r } = e;
|
|
6378
6380
|
H(this, At, document.getElementById(t)), H(this, lt, Q("div", "user-view-container"));
|
|
6379
6381
|
const i = K(
|
|
6380
6382
|
"user-view-browse-wrapper",
|
|
6381
6383
|
"user-view-browse-wrapper"
|
|
6382
6384
|
), o = Q("span", "", "", ""), a = this._renderUserViewBrowseButton(), c = Q("p", "", "margin-block: 0px; font-size:14px");
|
|
6383
|
-
if (c.append(o, a),
|
|
6385
|
+
if (c.append(o, a), n) {
|
|
6384
6386
|
const d = Q(
|
|
6385
6387
|
"p",
|
|
6386
6388
|
"",
|
|
6387
6389
|
"margin-block: 0px; font-size: 13px; color: #777",
|
|
6388
|
-
`Max File size: ${
|
|
6390
|
+
`Max File size: ${n}MB`
|
|
6389
6391
|
);
|
|
6390
6392
|
i.append(Sn(), c, d);
|
|
6391
6393
|
} else
|
|
6392
6394
|
i.append(Sn(), c);
|
|
6393
|
-
return E(this, lt).append(i),
|
|
6395
|
+
return E(this, lt).append(i), r && this._renderImagePreview(r, "", i, !0), E(this, At).appendChild(E(this, lt)), E(this, At);
|
|
6394
6396
|
}
|
|
6395
|
-
_renderImagePreview(e, t,
|
|
6397
|
+
_renderImagePreview(e, t, n, r = !1) {
|
|
6396
6398
|
var T;
|
|
6397
6399
|
const i = document.getElementById(
|
|
6398
6400
|
"user-view-browse-wrapper"
|
|
6399
|
-
), o = i ||
|
|
6401
|
+
), o = i || n;
|
|
6400
6402
|
o && (o.style.display = "none");
|
|
6401
6403
|
const a = document.getElementById("user-image-preview");
|
|
6402
6404
|
a && a.remove();
|
|
@@ -6412,7 +6414,7 @@ class Gs {
|
|
|
6412
6414
|
l.src = e, l.alt = t || "";
|
|
6413
6415
|
const u = this._renderImageErrorContainer();
|
|
6414
6416
|
c.appendChild(u), l.onload = () => {
|
|
6415
|
-
f.style.display = "none", d.style.display = "none", d.remove(), u.style.display = "none", u.remove(), l.style.display = "block", f.style.display =
|
|
6417
|
+
f.style.display = "none", d.style.display = "none", d.remove(), u.style.display = "none", u.remove(), l.style.display = "block", f.style.display = r ? "flex" : "none";
|
|
6416
6418
|
}, l.onerror = (C) => {
|
|
6417
6419
|
d.style.display = "none", d.remove(), u.style.display = "flex", l.style.display = "none", f.style.display = "none";
|
|
6418
6420
|
};
|
|
@@ -6475,36 +6477,36 @@ class Gs {
|
|
|
6475
6477
|
}
|
|
6476
6478
|
H(this, Xe, !0), E(this, Gt).call(this, !0);
|
|
6477
6479
|
try {
|
|
6478
|
-
const
|
|
6480
|
+
const n = await vr(e);
|
|
6479
6481
|
this._removeUserToast();
|
|
6480
|
-
const
|
|
6481
|
-
|
|
6482
|
+
const r = new FileReader();
|
|
6483
|
+
r.readAsDataURL(n), r.onload = () => {
|
|
6482
6484
|
this._userViewUploadAndAddSelectedImageList(
|
|
6483
|
-
|
|
6485
|
+
r.result,
|
|
6484
6486
|
e
|
|
6485
6487
|
);
|
|
6486
|
-
},
|
|
6487
|
-
console.error("Error reading file:",
|
|
6488
|
+
}, r.onerror = () => {
|
|
6489
|
+
console.error("Error reading file:", r.error);
|
|
6488
6490
|
};
|
|
6489
|
-
} catch (
|
|
6490
|
-
this._renderUserToast(
|
|
6491
|
+
} catch (n) {
|
|
6492
|
+
this._renderUserToast(n == null ? void 0 : n.message, "error");
|
|
6491
6493
|
}
|
|
6492
6494
|
}
|
|
6493
6495
|
_renderUserToast(e, t = "success") {
|
|
6494
|
-
const
|
|
6496
|
+
const n = Q(
|
|
6495
6497
|
"div",
|
|
6496
6498
|
"",
|
|
6497
6499
|
"display:flex;align-items:center;gap:5px;margin-top:5px;"
|
|
6498
6500
|
);
|
|
6499
|
-
|
|
6500
|
-
const
|
|
6501
|
+
n.id = "user-toast-container";
|
|
6502
|
+
const r = Q(
|
|
6501
6503
|
"p",
|
|
6502
6504
|
"",
|
|
6503
6505
|
"margin-block:0px;font-size:14px;padding-top:3px"
|
|
6504
6506
|
);
|
|
6505
|
-
|
|
6507
|
+
r.textContent = e, r.style.color = t === "success" ? "#4caf50" : "#ee3f3f";
|
|
6506
6508
|
const i = t === "success" ? fr("#4caf50") : On();
|
|
6507
|
-
i.style.width = "15px", i.style.height = "15px",
|
|
6509
|
+
i.style.width = "15px", i.style.height = "15px", n.append(i, r), E(this, lt).appendChild(n);
|
|
6508
6510
|
}
|
|
6509
6511
|
_removeUserToast() {
|
|
6510
6512
|
const e = document.getElementById("user-toast-container");
|
|
@@ -6522,8 +6524,8 @@ class Gs {
|
|
|
6522
6524
|
return t.classList.add("user-upload-btn"), t.role = "button", t.addEventListener("click", () => {
|
|
6523
6525
|
this._removeUserToast(), e.click();
|
|
6524
6526
|
}), e.addEventListener("change", () => {
|
|
6525
|
-
const
|
|
6526
|
-
|
|
6527
|
+
const n = e.files[0];
|
|
6528
|
+
n && this._readFileAsBase64(n), e.value = "";
|
|
6527
6529
|
}), t;
|
|
6528
6530
|
}
|
|
6529
6531
|
_renderUserUploading() {
|
|
@@ -6548,8 +6550,8 @@ class Gs {
|
|
|
6548
6550
|
this._renderUserUploading();
|
|
6549
6551
|
try {
|
|
6550
6552
|
this._renderImagePreview(e, t.name);
|
|
6551
|
-
const
|
|
6552
|
-
await this._uploadForUser(
|
|
6553
|
+
const n = await Er(e, t, E(this, Oe), !1);
|
|
6554
|
+
await this._uploadForUser(n, t), E(this, Xt) && this._renderUserToast(E(this, Xt), "success");
|
|
6553
6555
|
} catch {
|
|
6554
6556
|
this._renderUserToast(
|
|
6555
6557
|
E(this, zt) ? E(this, zt) : "Error uploading. Please try again later.",
|
|
@@ -6560,30 +6562,30 @@ class Gs {
|
|
|
6560
6562
|
}
|
|
6561
6563
|
}
|
|
6562
6564
|
async _uploadForUser(e, t) {
|
|
6563
|
-
var
|
|
6565
|
+
var n;
|
|
6564
6566
|
try {
|
|
6565
|
-
const
|
|
6567
|
+
const r = await is(
|
|
6566
6568
|
e,
|
|
6567
|
-
Je[Rn((
|
|
6569
|
+
Je[Rn((n = t.type) == null ? void 0 : n.split("/")[0])],
|
|
6568
6570
|
E(this, Oe)
|
|
6569
6571
|
);
|
|
6570
|
-
H(this, qt,
|
|
6571
|
-
} catch (
|
|
6572
|
-
throw Error(
|
|
6572
|
+
H(this, qt, r == null ? void 0 : r.response), E(this, Wt).call(this);
|
|
6573
|
+
} catch (r) {
|
|
6574
|
+
throw Error(r);
|
|
6573
6575
|
}
|
|
6574
6576
|
}
|
|
6575
6577
|
_createAllAndSelectedTab(e) {
|
|
6576
|
-
const t = K("select-options"),
|
|
6578
|
+
const t = K("select-options"), n = en("Browse", "select"), r = en(
|
|
6577
6579
|
"Selected",
|
|
6578
6580
|
"select",
|
|
6579
6581
|
"selected-images-tab"
|
|
6580
6582
|
);
|
|
6581
|
-
|
|
6583
|
+
n.classList.add("selected"), [n, r].forEach((o, a) => {
|
|
6582
6584
|
o.addEventListener("click", () => {
|
|
6583
6585
|
var c;
|
|
6584
6586
|
H(this, Nt, a), (c = document.querySelector(".select.selected")) == null || c.classList.remove("selected"), o.classList.add("selected"), this._updateSelectedImageListContainerUI();
|
|
6585
6587
|
});
|
|
6586
|
-
}), t.append(
|
|
6588
|
+
}), t.append(n, r), e.appendChild(t);
|
|
6587
6589
|
}
|
|
6588
6590
|
_renderUploadButton() {
|
|
6589
6591
|
const e = Dn("file");
|
|
@@ -6593,18 +6595,18 @@ class Gs {
|
|
|
6593
6595
|
"click",
|
|
6594
6596
|
() => e.click()
|
|
6595
6597
|
), e.addEventListener("change", async () => {
|
|
6596
|
-
const
|
|
6598
|
+
const n = e.files[0];
|
|
6597
6599
|
try {
|
|
6598
6600
|
H(this, Xe, !0);
|
|
6599
|
-
const
|
|
6600
|
-
|
|
6601
|
+
const r = new FileReader();
|
|
6602
|
+
r.readAsDataURL(n), r.onload = async () => {
|
|
6601
6603
|
await this._uploadAndAddSelectedImageList(
|
|
6602
|
-
|
|
6603
|
-
|
|
6604
|
+
r.result,
|
|
6605
|
+
n
|
|
6604
6606
|
);
|
|
6605
6607
|
};
|
|
6606
|
-
} catch (
|
|
6607
|
-
this._renderToastContainer(
|
|
6608
|
+
} catch (r) {
|
|
6609
|
+
this._renderToastContainer(r, "error", E(this, be));
|
|
6608
6610
|
}
|
|
6609
6611
|
e.value = "";
|
|
6610
6612
|
}), E(this, pt);
|
|
@@ -6617,7 +6619,7 @@ class Gs {
|
|
|
6617
6619
|
}
|
|
6618
6620
|
_renderSearchField() {
|
|
6619
6621
|
let e;
|
|
6620
|
-
const t = K("search-browse-container"),
|
|
6622
|
+
const t = K("search-browse-container"), n = K(
|
|
6621
6623
|
"search-input-wrapper",
|
|
6622
6624
|
"search-input-wrapper"
|
|
6623
6625
|
);
|
|
@@ -6632,19 +6634,19 @@ class Gs {
|
|
|
6632
6634
|
H(this, gt, !0), H(this, jt, o.value), this._search(E(this, jt));
|
|
6633
6635
|
}, 750);
|
|
6634
6636
|
}), E(this, Lt).setAttribute("placeholder", "Search");
|
|
6635
|
-
const
|
|
6636
|
-
return
|
|
6637
|
+
const r = Ns();
|
|
6638
|
+
return r.style.position = "absolute", r.style.top = "50%", r.style.left = "5%", r.style.transform = "translate(-5%, -50%)", n.append(r, E(this, Lt)), t.append(n), t;
|
|
6637
6639
|
}
|
|
6638
6640
|
_createBrowseMoreContainer() {
|
|
6639
6641
|
H(this, Rt, K("browse-more-btn-container")), this._createAllAndSelectedTab(E(this, Rt));
|
|
6640
|
-
const e = this._renderUploadButton(), t = this._renderCreateFolderBtn(),
|
|
6641
|
-
return
|
|
6642
|
+
const e = this._renderUploadButton(), t = this._renderCreateFolderBtn(), n = document.createElement("div");
|
|
6643
|
+
return n.style.display = "flex", n.style.alignItems = "center", n.style.gap = "10px", n.append(e, t), E(this, Rt).appendChild(n), E(this, Rt);
|
|
6642
6644
|
}
|
|
6643
6645
|
_createBrowseImageMain() {
|
|
6644
6646
|
const e = K("browse-image-main");
|
|
6645
6647
|
return H(this, Ce, K("selected-image-container")), E(this, Ce).addEventListener("scroll", () => {
|
|
6646
|
-
const t = E(this, Ce).clientHeight,
|
|
6647
|
-
t +
|
|
6648
|
+
const t = E(this, Ce).clientHeight, n = E(this, Ce).scrollTop, r = E(this, Ce).scrollHeight;
|
|
6649
|
+
t + n >= r - 5 && E(this, Tt) && (E(this, gt) ? this._search(E(this, jt)) : this._fetchFilesFromFolder(E(this, kt)));
|
|
6648
6650
|
}), e.appendChild(E(this, Ce)), e;
|
|
6649
6651
|
}
|
|
6650
6652
|
_renderFetchingSkeletonUI() {
|
|
@@ -6655,7 +6657,7 @@ class Gs {
|
|
|
6655
6657
|
}
|
|
6656
6658
|
_renderEmptyImageContainer() {
|
|
6657
6659
|
if (E(this, He) || E(this, Xe)) return;
|
|
6658
|
-
const e = K(), t = K(),
|
|
6660
|
+
const e = K(), t = K(), n = document.createElement("p");
|
|
6659
6661
|
E(this, gt) && E(this, Nt) === 0 ? (t.innerHTML = `
|
|
6660
6662
|
<svg width="300" height="300" viewBox="0 0 1000 1000" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
6661
6663
|
<g clip-path="url(#clip0_2304_257)">
|
|
@@ -6692,7 +6694,7 @@ class Gs {
|
|
|
6692
6694
|
</clipPath>
|
|
6693
6695
|
</defs>
|
|
6694
6696
|
</svg>
|
|
6695
|
-
`,
|
|
6697
|
+
`, n.textContent = "Oops! No Result Found.") : (t.innerHTML = `
|
|
6696
6698
|
<svg width="300" height="300" viewBox="0 0 1000 1000" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
6697
6699
|
<g clip-path="url(#clip0_2301_2)">
|
|
6698
6700
|
<path d="M564.829 772.4H336.658V948.386H564.829V772.4Z" fill="#EBEBEB"/>
|
|
@@ -6740,7 +6742,7 @@ class Gs {
|
|
|
6740
6742
|
</clipPath>
|
|
6741
6743
|
</defs>
|
|
6742
6744
|
</svg>
|
|
6743
|
-
`,
|
|
6745
|
+
`, n.textContent = "Looks Empty!"), e.append(t, n), E(this, Ce).appendChild(e);
|
|
6744
6746
|
}
|
|
6745
6747
|
_renderLoadingUI() {
|
|
6746
6748
|
const e = K("skeleton");
|
|
@@ -6748,7 +6750,7 @@ class Gs {
|
|
|
6748
6750
|
}
|
|
6749
6751
|
_fileCardBody(e) {
|
|
6750
6752
|
var rt, Mt, cn, Vt;
|
|
6751
|
-
const t = K("selected-image-content"),
|
|
6753
|
+
const t = K("selected-image-content"), n = K("selected-image-top-bar"), r = Ve(
|
|
6752
6754
|
"",
|
|
6753
6755
|
"selected-image-btn",
|
|
6754
6756
|
"",
|
|
@@ -6760,9 +6762,9 @@ class Gs {
|
|
|
6760
6762
|
const a = K("selected-image-wrapper");
|
|
6761
6763
|
a.setAttribute("data-key", e == null ? void 0 : e.key);
|
|
6762
6764
|
const c = en(e == null ? void 0 : e.name, "selected-image-name"), d = ie("", "selected-image-type");
|
|
6763
|
-
d.append(o),
|
|
6765
|
+
d.append(o), n.append(d, r);
|
|
6764
6766
|
const l = K();
|
|
6765
|
-
l.style.marginTop = "10px", l.style.display = "flex", l.style.justifyContent = "space-between", l.style.alignItems = "center", l.append(c), t.append(
|
|
6767
|
+
l.style.marginTop = "10px", l.style.display = "flex", l.style.justifyContent = "space-between", l.style.alignItems = "center", l.append(c), t.append(n, i), a.append(t, l);
|
|
6766
6768
|
const u = K("action-wrapper"), h = Ve("", "action-option preview"), f = ie("Preview", ""), y = Fs();
|
|
6767
6769
|
h.append(y, f);
|
|
6768
6770
|
const k = Ve("", "action-option move"), T = ie("Move", ""), C = ks();
|
|
@@ -6940,10 +6942,10 @@ class Gs {
|
|
|
6940
6942
|
this._deleteFile(e.key);
|
|
6941
6943
|
}
|
|
6942
6944
|
});
|
|
6943
|
-
},
|
|
6945
|
+
}, r.addEventListener("click", (ce) => {
|
|
6944
6946
|
ce.stopPropagation(), je.hide(), je.show({
|
|
6945
6947
|
content: u,
|
|
6946
|
-
mainContainer:
|
|
6948
|
+
mainContainer: n,
|
|
6947
6949
|
divId: e.key
|
|
6948
6950
|
}), H(this, wt, e.key);
|
|
6949
6951
|
}), i.addEventListener("click", () => {
|
|
@@ -6976,8 +6978,8 @@ class Gs {
|
|
|
6976
6978
|
}
|
|
6977
6979
|
_renderImageListContainer() {
|
|
6978
6980
|
var e, t;
|
|
6979
|
-
((e = E(this, ke)) == null ? void 0 : e.length) > 0 && ((t = E(this, ke)) == null || t.forEach((
|
|
6980
|
-
this._renderImageCard(
|
|
6981
|
+
((e = E(this, ke)) == null ? void 0 : e.length) > 0 && ((t = E(this, ke)) == null || t.forEach((n) => {
|
|
6982
|
+
this._renderImageCard(n);
|
|
6981
6983
|
}));
|
|
6982
6984
|
}
|
|
6983
6985
|
_renderSelectedImageListContainer() {
|
|
@@ -6990,8 +6992,8 @@ class Gs {
|
|
|
6990
6992
|
const e = document.createElement("div");
|
|
6991
6993
|
e.style.paddingInline = "20px";
|
|
6992
6994
|
for (let t = 0; t < 4; t++) {
|
|
6993
|
-
const
|
|
6994
|
-
|
|
6995
|
+
const n = K("skeleton");
|
|
6996
|
+
n.className = "skeleton folder", n.innerHTML = "", e.appendChild(n);
|
|
6995
6997
|
}
|
|
6996
6998
|
return e;
|
|
6997
6999
|
}
|
|
@@ -6999,12 +7001,12 @@ class Gs {
|
|
|
6999
7001
|
var o;
|
|
7000
7002
|
const t = document.createElement("li");
|
|
7001
7003
|
t.className = "folder";
|
|
7002
|
-
const
|
|
7003
|
-
|
|
7004
|
-
const
|
|
7005
|
-
if (i.className = "folder-name", i.textContent = e == null ? void 0 : e.name,
|
|
7004
|
+
const n = document.createElement("div");
|
|
7005
|
+
n.style.position = "relative", n.style.display = "flex", n.style.alignItems = "center", n.style.gap = "2px";
|
|
7006
|
+
const r = document.createElement("span"), i = document.createElement("span");
|
|
7007
|
+
if (i.className = "folder-name", i.textContent = e == null ? void 0 : e.name, r.appendChild(Yt()), n.append(r, i), t.append(n), e.children && Object.keys(e.children).length > 0) {
|
|
7006
7008
|
const a = document.createElement("button");
|
|
7007
|
-
a.classList.add("expand-icon"), a.appendChild(ur()),
|
|
7009
|
+
a.classList.add("expand-icon"), a.appendChild(ur()), n.prepend(a);
|
|
7008
7010
|
const c = document.createElement("ul");
|
|
7009
7011
|
c.className = "folders nested", t.appendChild(c), a.addEventListener("click", (d) => {
|
|
7010
7012
|
d.stopPropagation(), t.classList.toggle("active"), c.classList.toggle("visible");
|
|
@@ -7056,10 +7058,10 @@ class Gs {
|
|
|
7056
7058
|
const U = document.querySelector(`#${e.key}`);
|
|
7057
7059
|
H(this, wt, null), E(this, wt) === e.key && U !== null ? je.hide() : (je.hide(), je.show({
|
|
7058
7060
|
content: c,
|
|
7059
|
-
mainContainer:
|
|
7061
|
+
mainContainer: n,
|
|
7060
7062
|
divId: e.key
|
|
7061
7063
|
}), H(this, wt, e.key));
|
|
7062
|
-
}),
|
|
7064
|
+
}), n.appendChild(a);
|
|
7063
7065
|
}
|
|
7064
7066
|
return t.addEventListener("click", (a) => {
|
|
7065
7067
|
var c;
|
|
@@ -7070,12 +7072,12 @@ class Gs {
|
|
|
7070
7072
|
var o;
|
|
7071
7073
|
const t = document.createElement("li");
|
|
7072
7074
|
t.className = "folder-move";
|
|
7073
|
-
const
|
|
7074
|
-
|
|
7075
|
-
const
|
|
7076
|
-
if (i.className = "folder-name", i.textContent = e == null ? void 0 : e.name,
|
|
7075
|
+
const n = document.createElement("div");
|
|
7076
|
+
n.style.position = "relative", n.style.display = "flex", n.style.alignItems = "center", n.style.gap = "2px";
|
|
7077
|
+
const r = document.createElement("span"), i = document.createElement("span");
|
|
7078
|
+
if (i.className = "folder-name", i.textContent = e == null ? void 0 : e.name, r.appendChild(Yt()), n.append(r, i), t.append(n), e.children && Object.keys(e.children).length > 0) {
|
|
7077
7079
|
const a = document.createElement("button");
|
|
7078
|
-
a.classList.add("expand-icon"), a.appendChild(ur()),
|
|
7080
|
+
a.classList.add("expand-icon"), a.appendChild(ur()), n.prepend(a);
|
|
7079
7081
|
const c = document.createElement("ul");
|
|
7080
7082
|
c.className = "folders nested", t.appendChild(c), a.addEventListener("click", (d) => {
|
|
7081
7083
|
d.stopPropagation(), t.classList.toggle("active"), c.classList.toggle("visible");
|
|
@@ -7101,20 +7103,20 @@ class Gs {
|
|
|
7101
7103
|
} else {
|
|
7102
7104
|
const e = document.createElement("ul");
|
|
7103
7105
|
e.className = "folders", E(this, mt).appendChild(e), E(this, st).forEach((t) => {
|
|
7104
|
-
const
|
|
7105
|
-
e.appendChild(
|
|
7106
|
+
const n = this._renderFolderListContainer(t);
|
|
7107
|
+
e.appendChild(n);
|
|
7106
7108
|
}), E(this, It).appendChild(E(this, mt));
|
|
7107
7109
|
}
|
|
7108
7110
|
}
|
|
7109
|
-
_renderToastContainer(e, t,
|
|
7111
|
+
_renderToastContainer(e, t, n) {
|
|
7110
7112
|
this._removeToastContainer(), H(this, ot, document.createElement("div")), E(this, ot).className = `message-container ${t}`;
|
|
7111
|
-
const
|
|
7113
|
+
const r = en(e, "message"), i = t === "success" ? fr() : On(), o = Ve("");
|
|
7112
7114
|
o.style.cursor = "pointer", o.style.border = "0", o.style.outline = "none", o.style.background = "transparent", o.appendChild(
|
|
7113
7115
|
jn(t === "error" ? "#ee3f3f" : "#4caf50")
|
|
7114
7116
|
), o.setAttribute(
|
|
7115
7117
|
"fill",
|
|
7116
7118
|
t === "error" ? "#ee3f3f" : "#4caf50"
|
|
7117
|
-
), o.onclick = () => this._removeToastContainer(), E(this, ot).append(i,
|
|
7119
|
+
), o.onclick = () => this._removeToastContainer(), E(this, ot).append(i, r, o), n.appendChild(E(this, ot)), setTimeout(() => {
|
|
7118
7120
|
this._removeToastContainer();
|
|
7119
7121
|
}, 5e3);
|
|
7120
7122
|
}
|
|
@@ -7122,7 +7124,7 @@ class Gs {
|
|
|
7122
7124
|
E(this, ot) && (E(this, ot).remove(), H(this, ot, null));
|
|
7123
7125
|
}
|
|
7124
7126
|
_updateSelectedImageListContainerUI() {
|
|
7125
|
-
var t,
|
|
7127
|
+
var t, n;
|
|
7126
7128
|
if (!E(this, Ce)) return;
|
|
7127
7129
|
E(this, Ce).innerHTML = "", E(this, Xe) && this._renderLoadingUI(), E(this, He) && this._renderFetchingSkeletonUI();
|
|
7128
7130
|
const e = document.getElementById(
|
|
@@ -7132,27 +7134,27 @@ class Gs {
|
|
|
7132
7134
|
"no-selected-image-container"
|
|
7133
7135
|
), this._renderEmptyImageContainer()) : (E(this, Ce).classList.remove(
|
|
7134
7136
|
"no-selected-image-container"
|
|
7135
|
-
), this._renderImageListContainer())) : (e && (e.style.visibility = "hidden"), ((
|
|
7137
|
+
), this._renderImageListContainer())) : (e && (e.style.visibility = "hidden"), ((n = E(this, ge)) == null ? void 0 : n.length) === 0 ? (E(this, Ce).classList.add(
|
|
7136
7138
|
"no-selected-image-container"
|
|
7137
7139
|
), this._renderEmptyImageContainer()) : (E(this, Ce).classList.remove(
|
|
7138
7140
|
"no-selected-image-container"
|
|
7139
7141
|
), this._renderSelectedImageListContainer())), this._updateContent();
|
|
7140
7142
|
}
|
|
7141
7143
|
_updateContent() {
|
|
7142
|
-
var t,
|
|
7144
|
+
var t, n, r;
|
|
7143
7145
|
const e = document.getElementById("selected-images-tab");
|
|
7144
|
-
e && (e.textContent = `Selected (${(t = E(this, ge)) == null ? void 0 : t.length})`), E(this, Ft).textContent = `Save (${(
|
|
7146
|
+
e && (e.textContent = `Selected (${(t = E(this, ge)) == null ? void 0 : t.length})`), E(this, Ft).textContent = `Save (${(n = E(this, ge)) == null ? void 0 : n.length})`, E(this, Ft).disabled = ((r = E(this, ge)) == null ? void 0 : r.length) === 0;
|
|
7145
7147
|
}
|
|
7146
7148
|
async _uploadAndAddSelectedImageList(e, t) {
|
|
7147
|
-
var
|
|
7149
|
+
var n, r;
|
|
7148
7150
|
this._updateSelectedImageListContainerUI();
|
|
7149
7151
|
try {
|
|
7150
7152
|
const i = await Er(e, t, E(this, Oe)), o = await rs(
|
|
7151
7153
|
t == null ? void 0 : t.name,
|
|
7152
7154
|
"",
|
|
7153
7155
|
i,
|
|
7154
|
-
Je[Rn((
|
|
7155
|
-
(
|
|
7156
|
+
Je[Rn((n = t.type) == null ? void 0 : n.split("/")[0])],
|
|
7157
|
+
(r = E(this, Ge)) == null ? void 0 : r.name,
|
|
7156
7158
|
E(this, Oe)
|
|
7157
7159
|
);
|
|
7158
7160
|
E(this, ke).unshift(o == null ? void 0 : o.response), this._renderToastContainer(
|
|
@@ -7173,7 +7175,7 @@ class Gs {
|
|
|
7173
7175
|
async _updateFile(e, t) {
|
|
7174
7176
|
ye.updateUploadBtn(!0);
|
|
7175
7177
|
try {
|
|
7176
|
-
const
|
|
7178
|
+
const n = await ls(
|
|
7177
7179
|
t.key,
|
|
7178
7180
|
e,
|
|
7179
7181
|
t.nestedFolderName,
|
|
@@ -7183,10 +7185,10 @@ class Gs {
|
|
|
7183
7185
|
t.type,
|
|
7184
7186
|
E(this, Ut),
|
|
7185
7187
|
E(this, Oe)
|
|
7186
|
-
),
|
|
7187
|
-
(i) => i.key ===
|
|
7188
|
+
), r = E(this, ke).find(
|
|
7189
|
+
(i) => i.key === n.response.key
|
|
7188
7190
|
);
|
|
7189
|
-
|
|
7191
|
+
r.name = e, this._fetchFilesFromFolder(E(this, Ge).name), H(this, ke, []), H(this, ge, []), this._renderToastContainer(
|
|
7190
7192
|
"File Updated Successfully",
|
|
7191
7193
|
"success",
|
|
7192
7194
|
E(this, be)
|
|
@@ -7220,17 +7222,17 @@ class Gs {
|
|
|
7220
7222
|
}
|
|
7221
7223
|
}
|
|
7222
7224
|
async _createFolder(e, t = 2) {
|
|
7223
|
-
var
|
|
7225
|
+
var n;
|
|
7224
7226
|
try {
|
|
7225
|
-
const
|
|
7227
|
+
const r = await bs(
|
|
7226
7228
|
e,
|
|
7227
|
-
(
|
|
7229
|
+
(n = E(this, Ge)) == null ? void 0 : n.name,
|
|
7228
7230
|
"",
|
|
7229
7231
|
E(this, Oe)
|
|
7230
7232
|
);
|
|
7231
7233
|
H(this, ge, []), H(this, ke, []);
|
|
7232
|
-
const i = xs(E(this, st),
|
|
7233
|
-
H(this, st, i), H(this, kt, e), H(this, Ge, { ...
|
|
7234
|
+
const i = xs(E(this, st), r == null ? void 0 : r.response);
|
|
7235
|
+
H(this, st, i), H(this, kt, e), H(this, Ge, { ...r == null ? void 0 : r.response, children: {} }), this._fetchFilesFromFolder(e), this._renderToastContainer(
|
|
7234
7236
|
`Folder ${e} created successfully`,
|
|
7235
7237
|
"success",
|
|
7236
7238
|
E(this, be)
|
|
@@ -7255,23 +7257,25 @@ class Gs {
|
|
|
7255
7257
|
}
|
|
7256
7258
|
async _uploadFromSource(e, t) {
|
|
7257
7259
|
this._removeUserToast();
|
|
7258
|
-
const
|
|
7260
|
+
const n = 200 * 1024;
|
|
7259
7261
|
try {
|
|
7260
|
-
const
|
|
7262
|
+
const r = e.size > n ? await vr(e) : e;
|
|
7261
7263
|
return await new Promise((o, a) => {
|
|
7262
7264
|
const c = new FileReader();
|
|
7263
|
-
|
|
7265
|
+
c.readAsDataURL(r), c.onerror = () => {
|
|
7266
|
+
a(c.error), console.log("error", c.error);
|
|
7267
|
+
}, console.log("base 64 line 1859", c.result), c.onload = async () => {
|
|
7264
7268
|
var d;
|
|
7265
7269
|
try {
|
|
7266
7270
|
const l = await Ks(
|
|
7267
7271
|
c.result,
|
|
7268
|
-
|
|
7272
|
+
r,
|
|
7269
7273
|
t,
|
|
7270
7274
|
!1,
|
|
7271
7275
|
E(this, xt)
|
|
7272
7276
|
), u = await ss(
|
|
7273
7277
|
l,
|
|
7274
|
-
Je[Rn((d =
|
|
7278
|
+
Je[Rn((d = r.type) == null ? void 0 : d.split("/")[0])],
|
|
7275
7279
|
t,
|
|
7276
7280
|
E(this, xt)
|
|
7277
7281
|
);
|
|
@@ -7279,19 +7283,17 @@ class Gs {
|
|
|
7279
7283
|
} catch (l) {
|
|
7280
7284
|
a(l);
|
|
7281
7285
|
}
|
|
7282
|
-
}
|
|
7283
|
-
a(c.error), console.log("error", c.error);
|
|
7284
|
-
}, c.readAsDataURL(n);
|
|
7286
|
+
};
|
|
7285
7287
|
});
|
|
7286
|
-
} catch (
|
|
7287
|
-
throw console.log("error",
|
|
7288
|
+
} catch (r) {
|
|
7289
|
+
throw console.log("error", r), r;
|
|
7288
7290
|
}
|
|
7289
7291
|
}
|
|
7290
7292
|
_uploadingState() {
|
|
7291
7293
|
return E(this, Xe);
|
|
7292
7294
|
}
|
|
7293
7295
|
async _fetchFilesFromFolder(e) {
|
|
7294
|
-
var t,
|
|
7296
|
+
var t, n, r;
|
|
7295
7297
|
H(this, He, !0), this._updateSelectedImageListContainerUI();
|
|
7296
7298
|
try {
|
|
7297
7299
|
const i = await os(
|
|
@@ -7300,7 +7302,7 @@ class Gs {
|
|
|
7300
7302
|
20,
|
|
7301
7303
|
E(this, Oe)
|
|
7302
7304
|
), o = (t = i.response) == null ? void 0 : t.files;
|
|
7303
|
-
E(this, ke).push(...o), H(this, at, (
|
|
7305
|
+
E(this, ke).push(...o), H(this, at, (n = i.response) == null ? void 0 : n.nextCursor), H(this, Tt, (r = i.response) == null ? void 0 : r.hasMore);
|
|
7304
7306
|
} catch {
|
|
7305
7307
|
throw this._renderToastContainer(
|
|
7306
7308
|
"Error while fetching files from folder" + e,
|
|
@@ -7317,7 +7319,7 @@ class Gs {
|
|
|
7317
7319
|
var e, t;
|
|
7318
7320
|
H(this, He, !0), H(this, St, !0), this._updateSelectedImageListContainerUI(), this._updateFolderListContainer(), this._removeToastContainer();
|
|
7319
7321
|
try {
|
|
7320
|
-
const
|
|
7322
|
+
const r = (await ys("", 200, E(this, Oe))).response.folder, i = Us(r);
|
|
7321
7323
|
H(this, kt, (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, st, i);
|
|
7322
7324
|
} catch {
|
|
7323
7325
|
H(this, He, !1), this._renderToastContainer(
|
|
@@ -7330,16 +7332,16 @@ class Gs {
|
|
|
7330
7332
|
}
|
|
7331
7333
|
}
|
|
7332
7334
|
async _search(e) {
|
|
7333
|
-
var t,
|
|
7335
|
+
var t, n;
|
|
7334
7336
|
H(this, He, !0), this._updateSelectedImageListContainerUI(), this._removeToastContainer();
|
|
7335
7337
|
try {
|
|
7336
|
-
const
|
|
7338
|
+
const r = await as(
|
|
7337
7339
|
e,
|
|
7338
7340
|
E(this, at),
|
|
7339
7341
|
10,
|
|
7340
7342
|
E(this, Oe)
|
|
7341
|
-
), i = (t =
|
|
7342
|
-
E(this, ke).push(...i), H(this, at, (
|
|
7343
|
+
), i = (t = r.response) == null ? void 0 : t.items;
|
|
7344
|
+
E(this, ke).push(...i), H(this, at, (n = r.response) == null ? void 0 : n.nextPageCursor);
|
|
7343
7345
|
} catch {
|
|
7344
7346
|
this._renderToastContainer(
|
|
7345
7347
|
"Error while searching files",
|
|
@@ -7353,7 +7355,7 @@ class Gs {
|
|
|
7353
7355
|
async _updateFolder(e, t) {
|
|
7354
7356
|
ye.updateUploadBtn(!0);
|
|
7355
7357
|
try {
|
|
7356
|
-
const
|
|
7358
|
+
const n = await Cs(
|
|
7357
7359
|
t.key,
|
|
7358
7360
|
e,
|
|
7359
7361
|
t.nestedFolderName,
|
|
@@ -7388,16 +7390,16 @@ class Gs {
|
|
|
7388
7390
|
ye.updateUploadBtn(!1), ye.hide(), this._updateFolderListContainer();
|
|
7389
7391
|
}
|
|
7390
7392
|
}
|
|
7391
|
-
_createUpdateFolderDialog(e, t,
|
|
7392
|
-
e.addEventListener("click", (
|
|
7393
|
-
|
|
7393
|
+
_createUpdateFolderDialog(e, t, n) {
|
|
7394
|
+
e.addEventListener("click", (r) => {
|
|
7395
|
+
r.stopPropagation(), je.hide();
|
|
7394
7396
|
let i;
|
|
7395
7397
|
const o = K("edit-form-wrapper"), a = K("form-control"), c = ie("Folder Name", "input-label"), d = K();
|
|
7396
7398
|
d.style.position = "relative";
|
|
7397
7399
|
const l = document.createElement("input");
|
|
7398
7400
|
l.style.paddingLeft = "40px";
|
|
7399
7401
|
const u = ie();
|
|
7400
|
-
u.appendChild(Yt()), u.style.position = "absolute", u.style.top = "50%", u.style.left = "5%", u.style.transform = "translate(-40%, -40%)", l.classList.add("input-field"), d.append(l, u), t === "update" && (l.value =
|
|
7402
|
+
u.appendChild(Yt()), u.style.position = "absolute", u.style.top = "50%", u.style.left = "5%", u.style.transform = "translate(-40%, -40%)", l.classList.add("input-field"), d.append(l, u), t === "update" && (l.value = n.name), l.onchange = (h) => {
|
|
7401
7403
|
i = h.target.value;
|
|
7402
7404
|
}, a.append(c, d), o.append(a), ye.show({
|
|
7403
7405
|
content: o,
|
|
@@ -7410,7 +7412,7 @@ class Gs {
|
|
|
7410
7412
|
showFooter: !0,
|
|
7411
7413
|
showCloseBtn: !0,
|
|
7412
7414
|
onConfirm: () => {
|
|
7413
|
-
t === "create" ? this._createFolder(i) : this._updateFolder(i,
|
|
7415
|
+
t === "create" ? this._createFolder(i) : this._updateFolder(i, n), ye.hide();
|
|
7414
7416
|
}
|
|
7415
7417
|
});
|
|
7416
7418
|
});
|
|
@@ -7422,12 +7424,12 @@ class Gs {
|
|
|
7422
7424
|
};
|
|
7423
7425
|
}
|
|
7424
7426
|
_initializeGrpcConfig(e, t) {
|
|
7425
|
-
let
|
|
7426
|
-
t && (e === "production" || e === "development") ?
|
|
7427
|
-
const
|
|
7428
|
-
baseUrl:
|
|
7427
|
+
let n = "https://hamro-cms-backend-grpc.hamrostack.com";
|
|
7428
|
+
t && (e === "production" || e === "development") ? n = t : e === "production" && (n = "https://page-api-grpc.hamropatro.com");
|
|
7429
|
+
const r = new Wi({
|
|
7430
|
+
baseUrl: n
|
|
7429
7431
|
});
|
|
7430
|
-
this.updateWindowObject({ grpcConfig:
|
|
7432
|
+
this.updateWindowObject({ grpcConfig: r });
|
|
7431
7433
|
}
|
|
7432
7434
|
}
|
|
7433
7435
|
At = new WeakMap(), be = new WeakMap(), Ce = new WeakMap(), pt = new WeakMap(), ge = new WeakMap(), ke = new WeakMap(), Xe = new WeakMap(), He = new WeakMap(), St = new WeakMap(), kt = new WeakMap(), st = new WeakMap(), Ge = new WeakMap(), Ft = new WeakMap(), Wt = new WeakMap(), qn = new WeakMap(), Nt = new WeakMap(), It = new WeakMap(), mt = new WeakMap(), Rt = new WeakMap(), ot = new WeakMap(), at = new WeakMap(), Tt = new WeakMap(), Lt = new WeakMap(), gt = new WeakMap(), jt = new WeakMap(), rn = new WeakMap(), Oe = new WeakMap(), wt = new WeakMap(), sn = new WeakMap(), Fn = new WeakMap(), on = new WeakMap(), lt = new WeakMap(), qt = new WeakMap(), Ut = new WeakMap(), xt = new WeakMap(), Zt = new WeakMap(), Kt = new WeakMap(), zt = new WeakMap(), Xt = new WeakMap(), an = new WeakMap(), ln = new WeakMap(), Gt = new WeakMap(), ct = new WeakMap(), Jt = new WeakMap();
|