image-salon-sdk 1.0.69 → 1.0.71

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.
@@ -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, r) => (Yn(s, e, "write to private field"), r ? r.call(s, t) : e.set(s, t), 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), r = 0, n = 0, i, o = 0;
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
- n = 0;
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 (n) {
45
+ switch (r) {
46
46
  case 0:
47
- o = i, n = 1;
47
+ o = i, r = 1;
48
48
  break;
49
49
  case 1:
50
- t[r++] = o << 2 | (i & 48) >> 4, o = i, n = 2;
50
+ t[n++] = o << 2 | (i & 48) >> 4, o = i, r = 2;
51
51
  break;
52
52
  case 2:
53
- t[r++] = (o & 15) << 4 | (i & 60) >> 2, o = i, n = 3;
53
+ t[n++] = (o & 15) << 4 | (i & 60) >> 2, o = i, r = 3;
54
54
  break;
55
55
  case 3:
56
- t[r++] = (o & 3) << 6 | i, n = 0;
56
+ t[n++] = (o & 3) << 6 | i, r = 0;
57
57
  break;
58
58
  }
59
59
  }
60
- if (n == 1)
60
+ if (r == 1)
61
61
  throw Error("invalid base64 string.");
62
- return t.subarray(0, r);
62
+ return t.subarray(0, n);
63
63
  }
64
64
  function Fr(s) {
65
- let e = "", t = 0, r, n = 0;
65
+ let e = "", t = 0, n, r = 0;
66
66
  for (let i = 0; i < s.length; i++)
67
- switch (r = s[i], t) {
67
+ switch (n = s[i], t) {
68
68
  case 0:
69
- e += yt[r >> 2], n = (r & 3) << 4, t = 1;
69
+ e += yt[n >> 2], r = (n & 3) << 4, t = 1;
70
70
  break;
71
71
  case 1:
72
- e += yt[n | r >> 4], n = (r & 15) << 2, t = 2;
72
+ e += yt[r | n >> 4], r = (n & 15) << 2, t = 2;
73
73
  break;
74
74
  case 2:
75
- e += yt[n | r >> 6], e += yt[r & 63], t = 0;
75
+ e += yt[r | n >> 6], e += yt[n & 63], t = 0;
76
76
  break;
77
77
  }
78
- return t && (e += yt[n], e += "=", t == 1 && (e += "=")), e;
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, r, n, i, o) => {
83
- (e(r) ? r[s.symbol] : r[s.symbol] = []).push({ no: n, wireType: i, data: o });
84
- }, s.onWrite = (t, r, n) => {
85
- for (let { no: i, wireType: o, data: a } of s.list(r))
86
- n.tag(i, o).raw(a);
87
- }, s.list = (t, r) => {
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 n = t[s.symbol];
90
- return r ? n.filter((i) => i.no == r) : n;
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, r) => s.list(t, r).slice(-1)[0];
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 r = 0; r < 28; r += 7) {
106
- let n = this.buf[this.pos++];
107
- if (s |= (n & 127) << r, !(n & 128))
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 r = 3; r <= 31; r += 7) {
114
- let n = this.buf[this.pos++];
115
- if (e |= (n & 127) << r, !(n & 128))
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 r = s >>> 28 & 15 | (e & 7) << 4, n = !!(e >> 3);
127
- if (t.push((n ? r | 128 : r) & 255), !!n) {
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 r = 0, n = 0;
141
+ let n = 0, r = 0;
142
142
  function i(o, a) {
143
143
  const c = Number(s.slice(o, a));
144
- n *= t, r = r * t + c, r >= mn && (n = n + (r / mn | 0), r = r % mn);
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, r, n];
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, r = (s >>> 24 | e << 8) >>> 0 & 16777215, n = e >> 16 & 65535, i = t + r * 6777216 + n * 6710656, o = r + n * 8147497, a = n * 2, c = 1e7;
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, r, n] = Nr(e);
275
+ let [t, n, r] = Nr(e);
276
276
  if (t)
277
277
  throw new Error("signed value for ulong");
278
- return new Se(r, n);
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, r, n] = Nr(e);
337
+ let [t, n, r] = Nr(e);
338
338
  if (t) {
339
- if (n > dn || n == dn && r != 0)
339
+ if (r > dn || r == dn && n != 0)
340
340
  throw new Error("signed long too small");
341
- } else if (n >= dn)
341
+ } else if (r >= dn)
342
342
  throw new Error("signed long too large");
343
- let i = new Ee(r, n);
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, r = e & 7;
407
- if (t <= 0 || r < 0 || r > 5)
408
- throw new Error("illegal tag: field no " + t + " wire type " + r);
409
- return [t, r];
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 r = this.uint32();
429
- this.pos += r;
428
+ let n = this.uint32();
429
+ this.pos += n;
430
430
  break;
431
431
  case j.StartGroup:
432
- let n;
433
- for (; (n = this.tag()[1]) !== j.EndGroup; )
434
- this.skip(n);
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(), r = -(e & 1);
478
- return e = (e >>> 1 | (t & 1) << 31) ^ r, t = t >>> 1 ^ r, new Ee(e, t);
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 n = 0; n < this.chunks.length; n++)
578
- e += this.chunks[n].length;
579
- let t = new Uint8Array(e), r = 0;
580
- for (let n = 0; n < this.chunks.length; n++)
581
- t.set(this.chunks[n], r), r += this.chunks[n].length;
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), r = new DataView(t.buffer), n = Ee.from(e);
694
- return r.setInt32(0, n.lo, !0), r.setInt32(4, n.hi, !0), this.raw(t);
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), r = new DataView(t.buffer), n = Se.from(e);
701
- return r.setInt32(0, n.lo, !0), r.setInt32(4, n.hi, !0), this.raw(t);
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), r = t.hi >> 31, n = t.lo << 1 ^ r, i = (t.hi << 1 | t.lo >>> 31) ^ r;
715
- return Un(n, i, this.buf), this;
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, r;
741
- let n = Object.assign(Object.assign({}, s), e);
742
- return n.typeRegistry = [...(t = s == null ? void 0 : s.typeRegistry) !== null && t !== void 0 ? t : [], ...(r = e == null ? void 0 : e.typeRegistry) !== null && r !== void 0 ? r : []], n;
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 r = 0; r < s.length; r++) {
749
- let n = s.charAt(r);
750
- n == "_" ? e = !0 : /\d/.test(n) ? (t.push(n), e = !0) : e ? (t.push(n.toUpperCase()), e = !1) : r == 0 ? t.push(n.toLowerCase()) : t.push(n);
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, r, n;
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 = (r = s.repeat) !== null && r !== void 0 ? r : bn.NO, s.opt = (n = s.opt) !== null && n !== void 0 ? n : s.repeat || s.oneof ? !1 : s.kind == "message", s;
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 = [], r = [];
791
- for (let n of this.fields)
792
- if (n.oneof)
793
- r.includes(n.oneof) || (r.push(n.oneof), e.push(n.oneof), t.push(n.oneof));
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(n.localName), n.kind) {
795
+ switch (t.push(r.localName), r.kind) {
796
796
  case "scalar":
797
797
  case "enum":
798
- (!n.opt || n.repeat) && e.push(n.localName);
798
+ (!r.opt || r.repeat) && e.push(r.localName);
799
799
  break;
800
800
  case "message":
801
- n.repeat && e.push(n.localName);
801
+ r.repeat && e.push(r.localName);
802
802
  break;
803
803
  case "map":
804
- e.push(n.localName);
804
+ e.push(r.localName);
805
805
  break;
806
806
  }
807
- this.data = { req: e, known: t, oneofs: Object.values(r) };
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, r = !1) {
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 n = Object.keys(e), i = this.data;
836
- if (n.length < i.req.length || i.req.some((o) => !n.includes(o)) || !r && n.some((o) => !i.known.includes(o)))
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, r, t))
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, r, t))
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, r, n) {
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, n, t.L) : this.scalar(e, t.T, t.L);
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, n) : this.scalar(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(), r, n) : this.message(e, t.T(), r, n);
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 (n < 2)
867
+ if (r < 2)
868
868
  return !0;
869
- if (!this.mapKeys(e, t.K, n))
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, n, t.V.L);
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, n);
875
+ return this.scalars(Object.values(e), D.INT32, r);
876
876
  case "message":
877
- return this.messages(Object.values(e), t.V.T(), r, n);
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, r, n) {
884
- return r ? t.isAssignable(e, n) : t.is(e, n);
883
+ message(e, t, n, r) {
884
+ return n ? t.isAssignable(e, r) : t.is(e, r);
885
885
  }
886
- messages(e, t, r, n) {
886
+ messages(e, t, n, r) {
887
887
  if (!Array.isArray(e))
888
888
  return !1;
889
- if (n < 2)
889
+ if (r < 2)
890
890
  return !0;
891
- if (r) {
892
- for (let i = 0; i < e.length && i < n; i++)
893
- if (!t.isAssignable(e[i], n - 1))
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 < n; i++)
897
- if (!t.is(e[i], n - 1))
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, r) {
902
- let n = typeof e;
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 (r) {
909
+ switch (n) {
910
910
  case ht.BIGINT:
911
- return n == "bigint";
911
+ return r == "bigint";
912
912
  case ht.NUMBER:
913
- return n == "number" && !isNaN(e);
913
+ return r == "number" && !isNaN(e);
914
914
  default:
915
- return n == "string";
915
+ return r == "string";
916
916
  }
917
917
  case D.BOOL:
918
- return n == "boolean";
918
+ return r == "boolean";
919
919
  case D.STRING:
920
- return n == "string";
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 n == "number" && !isNaN(e);
925
+ return r == "number" && !isNaN(e);
926
926
  default:
927
- return n == "number" && Number.isInteger(e);
927
+ return r == "number" && Number.isInteger(e);
928
928
  }
929
929
  }
930
- scalars(e, t, r, n) {
930
+ scalars(e, t, n, r) {
931
931
  if (!Array.isArray(e))
932
932
  return !1;
933
- if (r < 2)
933
+ if (n < 2)
934
934
  return !0;
935
935
  if (Array.isArray(e)) {
936
- for (let i = 0; i < e.length && i < r; i++)
937
- if (!this.scalar(e[i], t, n))
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, r) {
943
- let n = Object.keys(e);
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(n.slice(0, r).map((i) => parseInt(i)), t, r);
950
+ return this.scalars(r.slice(0, n).map((i) => parseInt(i)), t, n);
951
951
  case D.BOOL:
952
- return this.scalars(n.slice(0, r).map((i) => i == "true" ? !0 : i == "false" ? !1 : i), t, r);
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(n, t, r, ht.STRING);
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 r of t)
978
- this.fMap[r.name] = r, this.fMap[r.jsonName] = r, this.fMap[r.localName] = r;
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, r) {
982
+ assert(e, t, n) {
983
983
  if (!e) {
984
- let n = Ar(r);
985
- throw (n == "number" || n == "boolean") && (n = r.toString()), new Error(`Cannot parse JSON ${n} for ${this.info.typeName}#${t}`);
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, r) {
997
+ read(e, t, n) {
998
998
  this.prepare();
999
- const n = [];
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 (!r.ignoreUnknownFields)
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 (n.includes(a.oneof))
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
- n.push(a.oneof), d = t[a.oneof] = {
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, r);
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, r.ignoreUnknownFields), f === !1)
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, r);
1053
+ h = a.T().internalJsonRead(u, n);
1054
1054
  break;
1055
1055
  case "enum":
1056
- if (h = this.enum(a.T(), u, a.name, r.ignoreUnknownFields), h === !1)
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, r, d[c]);
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, r.ignoreUnknownFields);
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, r, n) {
1092
- if (e[0] == "google.protobuf.NullValue" && J(t === null || t === "NULL_VALUE", `Unable to parse field ${this.info.typeName}#${r}, enum ${e[0]} only accepts null.`), t === null)
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}#${r}, enum can only be integral number, got ${t}.`), t;
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" && n ? !1 : (J(typeof o == "number", `Unable to parse field ${this.info.typeName}#${r}, enum ${e[0]} has no value for "${t}".`), o);
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}#${r}, cannot parse enum value from ${typeof t}".`);
1103
+ J(!1, `Unable to parse field ${this.info.typeName}#${n}, cannot parse enum value from ${typeof t}".`);
1104
1104
  }
1105
- scalar(e, t, r, n) {
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, r);
1154
+ return Qe(Ee.ZERO, n);
1155
1155
  if (typeof e != "number" && typeof e != "string")
1156
1156
  break;
1157
- return Qe(Ee.from(e), r);
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, r);
1161
+ return Qe(Se.ZERO, n);
1162
1162
  if (typeof e != "number" && typeof e != "string")
1163
1163
  break;
1164
- return Qe(Se.from(e), r);
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, n + (i ? " - " + i : ""), e);
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 r = {}, n = e;
1207
+ const n = {}, r = e;
1208
1208
  for (const i of this.fields) {
1209
1209
  if (!i.oneof) {
1210
- let d = this.field(i, n[i.localName], t);
1211
- d !== void 0 && (r[t.useProtoFieldName ? i.name : i.jsonName] = d);
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 = n[i.oneof];
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), r[t.useProtoFieldName ? i.name : i.jsonName] = c;
1219
+ J(c !== void 0), n[t.useProtoFieldName ? i.name : i.jsonName] = c;
1220
1220
  }
1221
- return r;
1221
+ return n;
1222
1222
  }
1223
- field(e, t, r) {
1224
- let n;
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, r);
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, r.enumAsInteger);
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
- (r.emitDefaultValues || Object.keys(i).length > 0) && (n = i);
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, r.enumAsInteger);
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, r);
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
- (r.emitDefaultValues || i.length > 0 || r.emitDefaultValues) && (n = i);
1278
+ (n.emitDefaultValues || i.length > 0 || n.emitDefaultValues) && (r = i);
1279
1279
  } else
1280
1280
  switch (e.kind) {
1281
1281
  case "scalar":
1282
- n = this.scalar(e.T, t, e.name, e.opt, r.emitDefaultValues);
1282
+ r = this.scalar(e.T, t, e.name, e.opt, n.emitDefaultValues);
1283
1283
  break;
1284
1284
  case "enum":
1285
- n = this.enum(e.T(), t, e.name, e.opt, r.emitDefaultValues, r.enumAsInteger);
1285
+ r = this.enum(e.T(), t, e.name, e.opt, n.emitDefaultValues, n.enumAsInteger);
1286
1286
  break;
1287
1287
  case "message":
1288
- n = this.message(e.T(), t, e.name, r);
1288
+ r = this.message(e.T(), t, e.name, n);
1289
1289
  break;
1290
1290
  }
1291
- return n;
1291
+ return r;
1292
1292
  }
1293
1293
  /**
1294
1294
  * Returns `null` as the default for google.protobuf.NullValue.
1295
1295
  */
1296
- enum(e, t, r, n, i, o) {
1296
+ enum(e, t, n, r, i, o) {
1297
1297
  if (e[0] == "google.protobuf.NullValue")
1298
- return !i && !n ? void 0 : null;
1298
+ return !i && !r ? void 0 : null;
1299
1299
  if (t === void 0) {
1300
- J(n);
1300
+ J(r);
1301
1301
  return;
1302
1302
  }
1303
- if (!(t === 0 && !i && !n))
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, r, n) {
1307
- return t === void 0 ? n.emitDefaultValues ? null : void 0 : e.internalJsonWrite(t, n);
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, r, n, i) {
1309
+ scalar(e, t, n, r, i) {
1310
1310
  if (t === void 0) {
1311
- J(n);
1311
+ J(r);
1312
1312
  return;
1313
1313
  }
1314
- const o = i || n;
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((r) => [r.no, r]));
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, r, n) {
1389
+ read(e, t, n, r) {
1390
1390
  this.prepare();
1391
- const i = n === void 0 ? e.len : e.pos + n;
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 = r.readUnknownField;
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(), r);
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(), r, d[u]);
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, r);
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, r) {
1438
- let n = t.uint32(), i = t.pos + n, o, a;
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(), r);
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, r) {
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(), r);
1493
+ return Qe(e.int64(), n);
1494
1494
  case D.UINT64:
1495
- return Qe(e.uint64(), r);
1495
+ return Qe(e.uint64(), n);
1496
1496
  case D.FIXED64:
1497
- return Qe(e.fixed64(), r);
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(), r);
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(), r);
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, r) => t.no - r.no);
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, r) {
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, r, i.T(), i.no, u);
1555
+ this.message(t, n, i.T(), i.no, u);
1556
1556
  } else
1557
- this.message(t, r, i.T(), i.no, o);
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, r, i, u, h);
1562
+ this.mapEntry(t, n, i, u, h);
1563
1563
  break;
1564
1564
  }
1565
1565
  }
1566
- let n = r.writeUnknownFields;
1567
- n !== !1 && (n === !0 ? G.onWrite : n)(this.info.typeName, e, t);
1566
+ let r = n.writeUnknownFields;
1567
+ r !== !1 && (r === !0 ? G.onWrite : r)(this.info.typeName, e, t);
1568
1568
  }
1569
- mapEntry(e, t, r, n, i) {
1570
- e.tag(r.no, j.LengthDelimited), e.fork();
1571
- let o = n;
1572
- switch (r.K) {
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(n);
1578
+ o = Number.parseInt(r);
1579
1579
  break;
1580
1580
  case D.BOOL:
1581
- J(n == "true" || n == "false"), o = n == "true";
1581
+ J(r == "true" || r == "false"), o = r == "true";
1582
1582
  break;
1583
1583
  }
1584
- switch (this.scalar(e, r.K, 1, o, !0), r.V.kind) {
1584
+ switch (this.scalar(e, n.K, 1, o, !0), n.V.kind) {
1585
1585
  case "scalar":
1586
- this.scalar(e, r.V.T, 2, i, !0);
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, r.V.T(), 2, i);
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, r, n, i) {
1598
- i !== void 0 && (r.internalBinaryWrite(i, e.tag(n, j.LengthDelimited).fork(), t), e.join());
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, r, n, i) {
1604
- let [o, a, c] = this.scalarInfo(t, n);
1605
- (!c || i) && (e.tag(r, o), e[a](n));
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, r, n) {
1611
- if (!n.length)
1610
+ packed(e, t, n, r) {
1611
+ if (!r.length)
1612
1612
  return;
1613
- J(t !== D.BYTES && t !== D.STRING), e.tag(r, j.LengthDelimited), e.fork();
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 < n.length; o++)
1616
- e[i](n[o]);
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 r = j.Varint, n, i = t === void 0, o = t === 0;
1630
+ let n = j.Varint, r, i = t === void 0, o = t === 0;
1631
1631
  switch (e) {
1632
1632
  case D.INT32:
1633
- n = "int32";
1633
+ r = "int32";
1634
1634
  break;
1635
1635
  case D.STRING:
1636
- o = i || !t.length, r = j.LengthDelimited, n = "string";
1636
+ o = i || !t.length, n = j.LengthDelimited, r = "string";
1637
1637
  break;
1638
1638
  case D.BOOL:
1639
- o = t === !1, n = "bool";
1639
+ o = t === !1, r = "bool";
1640
1640
  break;
1641
1641
  case D.UINT32:
1642
- n = "uint32";
1642
+ r = "uint32";
1643
1643
  break;
1644
1644
  case D.DOUBLE:
1645
- r = j.Bit64, n = "double";
1645
+ n = j.Bit64, r = "double";
1646
1646
  break;
1647
1647
  case D.FLOAT:
1648
- r = j.Bit32, n = "float";
1648
+ n = j.Bit32, r = "float";
1649
1649
  break;
1650
1650
  case D.INT64:
1651
- o = i || Ee.from(t).isZero(), n = "int64";
1651
+ o = i || Ee.from(t).isZero(), r = "int64";
1652
1652
  break;
1653
1653
  case D.UINT64:
1654
- o = i || Se.from(t).isZero(), n = "uint64";
1654
+ o = i || Se.from(t).isZero(), r = "uint64";
1655
1655
  break;
1656
1656
  case D.FIXED64:
1657
- o = i || Se.from(t).isZero(), r = j.Bit64, n = "fixed64";
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, r = j.LengthDelimited, n = "bytes";
1660
+ o = i || !t.byteLength, n = j.LengthDelimited, r = "bytes";
1661
1661
  break;
1662
1662
  case D.FIXED32:
1663
- r = j.Bit32, n = "fixed32";
1663
+ n = j.Bit32, r = "fixed32";
1664
1664
  break;
1665
1665
  case D.SFIXED32:
1666
- r = j.Bit32, n = "sfixed32";
1666
+ n = j.Bit32, r = "sfixed32";
1667
1667
  break;
1668
1668
  case D.SFIXED64:
1669
- o = i || Ee.from(t).isZero(), r = j.Bit64, n = "sfixed64";
1669
+ o = i || Ee.from(t).isZero(), n = j.Bit64, r = "sfixed64";
1670
1670
  break;
1671
1671
  case D.SINT32:
1672
- n = "sint32";
1672
+ r = "sint32";
1673
1673
  break;
1674
1674
  case D.SINT64:
1675
- o = i || Ee.from(t).isZero(), n = "sint64";
1675
+ o = i || Ee.from(t).isZero(), r = "sint64";
1676
1676
  break;
1677
1677
  }
1678
- return [r, n, i || o];
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 r = t.localName;
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[r] = [];
1689
+ e[n] = [];
1690
1690
  else
1691
1691
  switch (t.kind) {
1692
1692
  case "scalar":
1693
- e[r] = Pn(t.T, t.L);
1693
+ e[n] = Pn(t.T, t.L);
1694
1694
  break;
1695
1695
  case "enum":
1696
- e[r] = 0;
1696
+ e[n] = 0;
1697
1697
  break;
1698
1698
  case "map":
1699
- e[r] = {};
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 r, n = t, i;
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 = n[o.oneof];
1710
+ const c = r[o.oneof];
1711
1711
  if ((c == null ? void 0 : c.oneofKind) == null)
1712
1712
  continue;
1713
- if (r = c[a], i = e[o.oneof], i.oneofKind = c.oneofKind, r == null) {
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 (r = n[a], i = e, r == null)
1717
+ } else if (n = r[a], i = e, n == null)
1718
1718
  continue;
1719
- switch (o.repeat && (i[a].length = r.length), o.kind) {
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 < r.length; d++)
1724
- i[a][d] = r[d];
1723
+ for (let d = 0; d < n.length; d++)
1724
+ i[a][d] = n[d];
1725
1725
  else
1726
- i[a] = r;
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 < r.length; d++)
1732
- i[a][d] = c.create(r[d]);
1733
- else i[a] === void 0 ? i[a] = c.create(r) : c.mergePartial(i[a], r);
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], r);
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(r))
1744
- i[a][l] = d.create(r[l]);
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 r of s.fields) {
1757
- let n = r.localName, i = r.oneof ? e[r.oneof][n] : e[n], o = r.oneof ? t[r.oneof][n] : t[n];
1758
- switch (r.kind) {
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 = r.kind == "enum" ? D.INT32 : r.T;
1762
- if (!(r.repeat ? sr(a, i, o) : xr(a, i, o)))
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 (!(r.V.kind == "message" ? or(r.V.T(), hn(i), hn(o)) : sr(r.V.kind == "enum" ? D.INT32 : r.V.T, hn(i), hn(o))))
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 = r.T();
1771
- if (!(r.repeat ? or(c, i, o) : c.equals(i, o)))
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 r = e, n = t;
1785
- if (r.length !== n.length)
1784
+ let n = e, r = t;
1785
+ if (n.length !== r.length)
1786
1786
  return !1;
1787
- for (let i = 0; i < r.length; i++)
1788
- if (r[i] != n[i])
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 r = 0; r < e.length; r++)
1796
- if (!xr(s, e[r], t[r]))
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 r = 0; r < e.length; r++)
1804
- if (!s.equals(e[r], t[r]))
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, r) {
1811
- this.defaultCheckDepth = 16, this.typeName = e, this.fields = t.map(Ci), this.options = r ?? {}, 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);
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 r = li(t);
1860
- return this.internalBinaryRead(r.readerFactory(e), e.byteLength, r);
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 r = JSON.parse(e);
1874
- return this.fromJson(r, t);
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 r;
1888
- let n = this.toJson(e, t);
1889
- return JSON.stringify(n, null, (r = t == null ? void 0 : t.prettySpaces) !== null && r !== void 0 ? r : 0);
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 r = mi(t);
1896
- return this.internalBinaryWrite(e, r.writerFactory(), r).finish();
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, r) {
1906
+ internalJsonRead(e, t, n) {
1907
1907
  if (e !== null && typeof e == "object" && !Array.isArray(e)) {
1908
- let n = r ?? this.create();
1909
- return this.refJsonReader.read(e, n, t), n;
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, r) {
1930
- return this.refBinWriter.write(e, t, r), 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, r, n) {
1941
- let i = n ?? this.create();
1942
- return this.refBinReader.read(e, i, r, t), 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, r, n;
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 = (r = i.options) !== null && r !== void 0 ? r : {}, i.idempotency = (n = i.idempotency) !== null && n !== void 0 ? n : void 0, i;
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, r) {
1952
- this.typeName = e, this.methods = t.map((n) => Ui(n, this)), this.options = r ?? {};
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", r) {
1957
- super(e), this.name = "RpcError", Object.setPrototypeOf(this, new.target.prototype), this.code = t, this.meta = r ?? {};
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 [r, n] of t)
1966
- e.push(` ${r}: ${n}`);
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 r of Object.keys(e)) {
1978
- let n = e[r];
1979
- switch (r) {
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(n) : n.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 [r, n] of Object.entries(s))
2001
- n instanceof Date ? t[r] = new Date(n.getTime()) : Array.isArray(n) ? t[r] = n.concat() : t[r] = n;
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, r) => {
2022
- this._resolve = t, this._reject = r;
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 r = t.indexOf(e);
2092
- r >= 0 && t.splice(r, 1);
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, r) {
2113
- J((e ? 1 : 0) + (t ? 1 : 0) + (r ? 1 : 0) <= 1, "only one emission at a time"), e && this.notifyMessage(e), t && this.notifyError(t), r && this.notifyComplete();
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 r = t.p;
2169
- J(r.state == qe.PENDING, "iterator contract broken"), "value" in e ? r.resolve(e) : r.reject(e), delete t.p;
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, r) {
2175
- function n(i) {
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(r.next(l));
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(r.throw(l));
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) : n(l.value).then(a, c);
2196
+ l.done ? i(l.value) : r(l.value).then(a, c);
2197
2197
  }
2198
- d((r = r.apply(s, e || [])).next());
2198
+ d((n = n.apply(s, e || [])).next());
2199
2199
  });
2200
2200
  };
2201
2201
  class Oi {
2202
- constructor(e, t, r, n, i, o, a) {
2203
- this.method = e, this.requestHeaders = t, this.request = r, this.headers = n, this.response = i, this.status = o, this.trailers = a;
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((r) => e ? Promise.resolve(e(r)) : r, (r) => t ? Promise.resolve(t(r)) : Promise.reject(r));
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, r, n] = yield Promise.all([this.headers, this.response, this.status, this.trailers]);
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: r,
2222
- trailers: n
2221
+ status: n,
2222
+ trailers: r
2223
2223
  };
2224
2224
  });
2225
2225
  }
2226
2226
  }
2227
- var Si = function(s, e, t, r) {
2228
- function n(i) {
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(r.next(l));
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(r.throw(l));
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) : n(l.value).then(a, c);
2249
+ l.done ? i(l.value) : r(l.value).then(a, c);
2250
2250
  }
2251
- d((r = r.apply(s, e || [])).next());
2251
+ d((n = n.apply(s, e || [])).next());
2252
2252
  });
2253
2253
  };
2254
2254
  class Ri {
2255
- constructor(e, t, r, n, i, o, a) {
2256
- this.method = e, this.requestHeaders = t, this.request = r, this.headers = n, this.responses = i, this.status = o, this.trailers = a;
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((r) => e ? Promise.resolve(e(r)) : r, (r) => t ? Promise.resolve(t(r)) : Promise.reject(r));
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, r] = yield Promise.all([this.headers, this.status, this.trailers]);
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: r
2276
+ trailers: n
2277
2277
  };
2278
2278
  });
2279
2279
  }
2280
2280
  }
2281
- function $e(s, e, t, r, n) {
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 = r.interceptors) !== null && i !== void 0 ? i : []).filter((c) => c.interceptUnary).reverse()) {
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, n, r);
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, r) {
2297
- function n(i) {
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(r.next(l));
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(r.throw(l));
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) : n(l.value).then(a, c);
2318
+ l.done ? i(l.value) : r(l.value).then(a, c);
2319
2319
  }
2320
- d((r = r.apply(s, e || [])).next());
2320
+ d((n = n.apply(s, e || [])).next());
2321
2321
  });
2322
2322
  };
2323
- function ar(s, e, t, r, n) {
2324
- if (r)
2325
- for (let [i, o] of Object.entries(r))
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 r = s.length, n = 4; n > 0; n--)
2347
- t[n] = r % 256, r >>>= 8;
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 r = s, n = e >= 200 && e < 300, i = Br(r), [o, a] = _r(r);
2366
- return (o === void 0 || o === W.OK) && !n && (o = Pi(e), a = t), [o, a, i];
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, r] = _r(e), n = Br(e);
2370
- return [t ?? W.OK, r, n];
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 r, n = "", i = new Uint8Array(0), o = Vi(e);
2378
+ let n, r = "", i = new Uint8Array(0), o = Vi(e);
2379
2379
  if (Mi(s)) {
2380
2380
  let a = s.getReader();
2381
- r = {
2381
+ n = {
2382
2382
  next: () => a.read()
2383
2383
  };
2384
2384
  } else
2385
- r = s[Symbol.asyncIterator]();
2385
+ n = s[Symbol.asyncIterator]();
2386
2386
  for (; ; ) {
2387
- let a = yield r.next();
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
- n += String.fromCharCode(a.value[d]);
2392
- let c = n.length - n.length % 4;
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(n.substring(0, c))), n = n.substring(c);
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, r = s["grpc-message"];
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(n, 10), W[e] === void 0)
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, r] of Object.entries(s))
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] = r;
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 [r, ...n] = t.split(":");
2475
- const i = n.join(":").trim();
2476
- r = r.trim();
2477
- let o = e[r];
2478
- typeof o == "string" ? e[r] = [o, i] : Array.isArray(o) ? o.push(i) : e[r] = i;
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, r) => {
2485
- let n = e[r];
2486
- typeof n == "string" ? e[r] = [n, t] : Array.isArray(n) ? n.push(t) : e[r] = t;
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 r = t.baseUrl;
2546
- return r.endsWith("/") && (r = r.substring(0, r.length - 1)), `${r}/${e.service.typeName}/${e.name}`;
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, r) {
2557
- var n, i, o, a;
2558
- let c = r, d = (n = c.format) !== null && n !== void 0 ? n : "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();
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 = r.abort) !== null && o !== void 0 ? o : null
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, r) {
2604
- var n, i, o, a;
2605
- let c = r, d = (n = c.format) !== null && n !== void 0 ? n : "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();
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 = r.abort) !== null && o !== void 0 ? o : null
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, r, n) {
2689
- let i = n ?? this.create(), o = e.pos + t;
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 = r.readUnknownField;
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, r) {
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 n = r.writeUnknownFields;
2718
- return n !== !1 && (n == !0 ? G.onWrite : n)(this.typeName, e, t), t;
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, r, n) {
2740
- let i = n ?? this.create(), o = e.pos + t;
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(), r));
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 = r.readUnknownField;
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, r) {
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(), r).join();
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 n = r.writeUnknownFields;
2767
- return n !== !1 && (n == !0 ? G.onWrite : n)(this.typeName, e, t), t;
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, r, n) {
2817
- let i = n ?? this.create(), o = e.pos + t;
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 = r.readUnknownField;
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, r) {
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 n = r.writeUnknownFields;
2858
- return n !== !1 && (n == !0 ? G.onWrite : n)(this.typeName, e, t), t;
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, r, n) {
2887
- let i = n ?? this.create(), o = e.pos + t;
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 = r.readUnknownField;
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, r) {
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 n = r.writeUnknownFields;
2916
- return n !== !1 && (n == !0 ? G.onWrite : n)(this.typeName, e, t), t;
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, r, n) {
2981
- let i = n ?? this.create(), o = e.pos + t;
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(), r, i.metadata);
3019
+ i.metadata = xn.internalBinaryRead(e, e.uint32(), n, i.metadata);
3020
3020
  break;
3021
3021
  default:
3022
- let d = r.readUnknownField;
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, r) {
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(), r).join();
3033
- let n = r.writeUnknownFields;
3034
- return n !== !1 && (n == !0 ? G.onWrite : n)(this.typeName, e, t), t;
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, r, n) {
3076
- let i = n ?? this.create(), o = e.pos + t;
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 = r.readUnknownField;
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, r) {
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 n = r.writeUnknownFields;
3109
- return n !== !1 && (n == !0 ? G.onWrite : n)(this.typeName, e, t), t;
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, r, n) {
3130
- let i = n ?? this.create(), o = e.pos + t;
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 = r.readUnknownField;
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, r) {
3148
+ internalBinaryWrite(e, t, n) {
3149
3149
  e.key !== "" && t.tag(1, j.LengthDelimited).string(e.key);
3150
- let n = r.writeUnknownFields;
3151
- return n !== !1 && (n == !0 ? G.onWrite : n)(this.typeName, e, t), t;
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, r, n) {
3172
- let i = n ?? this.create(), o = e.pos + t;
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 = r.readUnknownField;
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, r) {
3190
+ internalBinaryWrite(e, t, n) {
3191
3191
  e.isDeleted !== !1 && t.tag(1, j.Varint).bool(e.isDeleted);
3192
- let n = r.writeUnknownFields;
3193
- return n !== !1 && (n == !0 ? G.onWrite : n)(this.typeName, e, t), t;
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, r, n) {
3228
- let i = n ?? this.create(), o = e.pos + t;
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 = r.readUnknownField;
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, r) {
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 n = r.writeUnknownFields;
3257
- return n !== !1 && (n == !0 ? G.onWrite : n)(this.typeName, e, t), t;
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, r, n) {
3286
- let i = n ?? this.create(), o = e.pos + t;
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(), r));
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 = r.readUnknownField;
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, r) {
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(), r).join();
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 n = r.writeUnknownFields;
3317
- return n !== !1 && (n == !0 ? G.onWrite : n)(this.typeName, e, t), t;
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 r = this.methods[0], n = this._transport.mergeOptions(t);
3340
- return $e("unary", this._transport, r, n, e);
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 r = this.methods[1], n = this._transport.mergeOptions(t);
3347
- return $e("unary", this._transport, r, n, e);
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 r = this.methods[2], n = this._transport.mergeOptions(t);
3354
- return $e("unary", this._transport, r, n, e);
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 r = this.methods[3], n = this._transport.mergeOptions(t);
3361
- return $e("unary", this._transport, r, n, e);
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 r = this.methods[4], n = this._transport.mergeOptions(t);
3370
- return $e("unary", this._transport, r, n, e);
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 r = this.methods[5], n = this._transport.mergeOptions(t);
3377
- return $e("unary", this._transport, r, n, e);
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, r, n, i) => {
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 = r, d.folderName = n, await c.createFile(
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 r;
3392
+ var n;
3393
3393
  try {
3394
- const n = (r = window.ImageSalonSDK) == null ? void 0 : r.grpcConfig, i = new Dt(n), o = zn.create();
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 (n) {
3400
- throw n;
3399
+ } catch (r) {
3400
+ throw r;
3401
3401
  }
3402
- }, ss = async (s, e, t, r) => {
3403
- var n;
3402
+ }, ss = async (s, e, t, n) => {
3403
+ var r;
3404
3404
  try {
3405
- const i = (n = window.ImageSalonSDK) == null ? void 0 : n.grpcConfig, o = new Dt(i), a = zn.create();
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": r === "production" ? "hamropatro" : "hamropatro-android"
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, r) => {
3419
- var n;
3418
+ }, os = async (s, e, t, n) => {
3419
+ var r;
3420
3420
  try {
3421
- const i = (n = window.ImageSalonSDK) == null ? void 0 : n.grpcConfig, o = new Dt(i), a = Dr.create();
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
- r
3424
+ n
3425
3425
  );
3426
3426
  } catch (i) {
3427
3427
  throw i;
3428
3428
  }
3429
- }, as = async (s, e, t = 20, r) => {
3430
- var n;
3429
+ }, as = async (s, e, t = 20, n) => {
3430
+ var r;
3431
3431
  try {
3432
- const i = (n = window.ImageSalonSDK) == null ? void 0 : n.grpcConfig, o = new Dt(i), a = Or.create();
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
- r
3435
+ n
3436
3436
  );
3437
3437
  } catch (i) {
3438
3438
  throw i;
3439
3439
  }
3440
- }, ls = async (s, e, t, r, n, i, o, a, c) => {
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 = r, h.thumborUrl = n, h.proxyUrl = i, h.type = o, h.folderName = a, await u.updateFile(
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 r = (t = window.ImageSalonSDK) == null ? void 0 : t.grpcConfig, n = new Dt(r), i = Rr.create();
3455
- return i.key = s, await n.deleteFile(
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 (r) {
3460
- throw r;
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, r, n) {
3480
- let i = n ?? this.create(), o = e.pos + t;
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 = r.readUnknownField;
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, r) {
3498
+ internalBinaryWrite(e, t, n) {
3499
3499
  e.key !== "" && t.tag(1, j.LengthDelimited).string(e.key);
3500
- let n = r.writeUnknownFields;
3501
- return n !== !1 && (n == !0 ? G.onWrite : n)(this.typeName, e, t), t;
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, r, n) {
3536
- let i = n ?? this.create(), o = e.pos + t;
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 = r.readUnknownField;
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, r) {
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 n = r.writeUnknownFields;
3565
- return n !== !1 && (n == !0 ? G.onWrite : n)(this.typeName, e, t), t;
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, r, n) {
3593
- let i = n ?? this.create(), o = e.pos + t;
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 = r.readUnknownField;
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, r) {
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 n = r.writeUnknownFields;
3618
- return n !== !1 && (n == !0 ? G.onWrite : n)(this.typeName, e, t), t;
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, r, n) {
3647
- let i = n ?? this.create(), o = e.pos + t;
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(), r));
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 = r.readUnknownField;
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, r) {
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(), r).join();
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 n = r.writeUnknownFields;
3678
- return n !== !1 && (n == !0 ? G.onWrite : n)(this.typeName, e, t), t;
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, r, n) {
3720
- let i = n ?? this.create(), o = e.pos + t;
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 = r.readUnknownField;
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, r) {
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 n = r.writeUnknownFields;
3753
- return n !== !1 && (n == !0 ? G.onWrite : n)(this.typeName, e, t), t;
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, r, n) {
3781
- let i = n ?? this.create(), o = e.pos + t;
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 = r.readUnknownField;
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, r) {
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 n = r.writeUnknownFields;
3806
- return n !== !1 && (n == !0 ? G.onWrite : n)(this.typeName, e, t), t;
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 r = this.methods[0], n = this._transport.mergeOptions(t);
3828
- return $e("unary", this._transport, r, n, e);
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 r = this.methods[1], n = this._transport.mergeOptions(t);
3835
- return $e("unary", this._transport, r, n, e);
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 r = this.methods[2], n = this._transport.mergeOptions(t);
3842
- return $e("unary", this._transport, r, n, e);
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 r = this.methods[3], n = this._transport.mergeOptions(t);
3849
- return $e("unary", this._transport, r, n, e);
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 r = this.methods[4], n = this._transport.mergeOptions(t);
3856
- return $e("unary", this._transport, r, n, e);
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 r = (o = window.ImageSalonSDK) == null ? void 0 : o.grpcConfig, n = new Tn(r), i = Hr.create();
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 n.getFolders(
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, r) => {
3871
- var n;
3870
+ }, bs = async (s, e, t, n) => {
3871
+ var r;
3872
3872
  try {
3873
- const i = (n = window.ImageSalonSDK) == null ? void 0 : n.grpcConfig, o = new Tn(i), a = Vr.create();
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
- r
3876
+ n
3877
3877
  );
3878
3878
  } catch (i) {
3879
3879
  throw i;
3880
3880
  }
3881
- }, Cs = async (s, e, t, r, n) => {
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 = r, await a.updateFolder(
3885
+ return c.name = e, c.key = s, c.nestedFolderName = t, c.createdBy = n, await a.updateFolder(
3886
3886
  c,
3887
- n
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 r = (t = window.ImageSalonSDK) == null ? void 0 : t.grpcConfig, n = new Tn(r), i = Mr.create();
3896
- return i.key = s, await n.deleteFolder(
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 (r) {
3901
- throw r;
3900
+ } catch (n) {
3901
+ throw n;
3902
3902
  }
3903
3903
  }, On = (s, e, t) => {
3904
- const r = document.createElementNS("http://www.w3.org/2000/svg", "svg");
3905
- r.setAttribute("xmlns", "http://www.w3.org/2000/svg"), r.setAttribute("width", s || "20"), r.setAttribute("height", e || "20"), r.setAttribute("viewBox", "0 0 24 24"), r.setAttribute("fill", "none"), r.setAttribute("stroke", t || "#ee3f3f"), r.setAttribute("stroke-width", "2"), r.setAttribute("stroke-linecap", "round"), r.setAttribute("stroke-linejoin", "round"), r.classList.add("lucide", "lucide-circle-alert");
3906
- const n = document.createElementNS(
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
- n.setAttribute("cx", "12"), n.setAttribute("cy", "12"), n.setAttribute("r", "10");
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"), r.appendChild(n), r.appendChild(i), r.appendChild(o), r;
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 r = document.createElementNS(
3935
+ const n = document.createElementNS(
3936
3936
  "http://www.w3.org/2000/svg",
3937
3937
  "circle"
3938
3938
  );
3939
- r.setAttribute("cx", "6"), r.setAttribute("cy", "18"), r.setAttribute("r", "3");
3940
- const n = document.createElementNS(
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 n.setAttribute("cx", "18"), n.setAttribute("cy", "16"), n.setAttribute("r", "3"), s.appendChild(e), s.appendChild(t), s.appendChild(r), s.appendChild(n), document.body.appendChild(s), s;
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 r = document.createElementNS("http://www.w3.org/2000/svg", "path");
3955
- return r.setAttribute("d", "m9 11 3 3L22 4"), e.appendChild(t), e.appendChild(r), e;
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 r = document.createElementNS(s, "circle");
3997
- r.setAttribute("cx", "9"), r.setAttribute("cy", "9"), r.setAttribute("r", "2");
3998
- const n = document.createElementNS(s, "path");
3999
- return n.setAttribute("d", "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"), e.appendChild(t), e.appendChild(r), e.appendChild(n), document.body.appendChild(e), e;
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 r = document.createElementNS(s, "circle");
4028
- return r.setAttribute("cx", "12"), r.setAttribute("cy", "12"), r.setAttribute("r", "3"), e.appendChild(r), document.body.appendChild(e), e;
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 r = document.createElementNS("http://www.w3.org/2000/svg", "path");
4047
- r.setAttribute("d", "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2");
4048
- const n = document.createElementNS("http://www.w3.org/2000/svg", "line");
4049
- n.setAttribute("x1", "10"), n.setAttribute("x2", "10"), n.setAttribute("y1", "11"), n.setAttribute("y2", "17");
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(r), s.appendChild(n), s.appendChild(i), document.body.appendChild(s), s;
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 r = document.createElementNS("http://www.w3.org/2000/svg", "line");
4064
- return r.setAttribute("x1", "12"), r.setAttribute("x2", "12"), r.setAttribute("y1", "3"), r.setAttribute("y2", "15"), s.appendChild(e), s.appendChild(t), s.appendChild(r), s;
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 r = document.createElementNS(s, "rect");
4075
- return r.setAttribute("x", "2"), r.setAttribute("y", "6"), r.setAttribute("width", "14"), r.setAttribute("height", "12"), r.setAttribute("rx", "2"), e.appendChild(t), e.appendChild(r), document.body.appendChild(e), e;
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, r, n) {
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), r && (i.textContent = r), n && n.appendChild(i), i;
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 r = Q(
4161
+ const n = Q(
4162
4162
  "button",
4163
4163
  "dialog-close-btn",
4164
4164
  "",
4165
4165
  "",
4166
4166
  this.dialogContent
4167
4167
  );
4168
- r.appendChild(jn()), r.onclick = () => this.hide();
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((r) => {
4171
- const n = (i) => () => {
4172
- this.hide(), r(i === "confirm");
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 || n("confirm"), this.confirmButton.addEventListener("click", this.confirmCallback), this.cancelCallback = e.onCancel || n("cancel"), this.cancelButton.addEventListener("click", this.cancelCallback);
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((n) => {
4268
- e[n.key] = { ...n, children: {} };
4267
+ s.forEach((r) => {
4268
+ e[r.key] = { ...r, children: {} };
4269
4269
  });
4270
- const t = (n) => (Object.values(e).filter(
4271
- (o) => o.nestedFolderName == n.key
4270
+ const t = (r) => (Object.values(e).filter(
4271
+ (o) => o.nestedFolderName == r.key
4272
4272
  ).forEach((o) => {
4273
- n.children[o.key] = t(o);
4274
- }), n);
4275
- return s.reduce((n, i) => (i.nestedFolderName || n.push(t(e[i.key])), n), []);
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 = (r) => {
4279
- if (r.key === e.nestedFolderName)
4280
- return r.children[e.key] = { ...e, children: {} }, !0;
4281
- for (const n in r.children) {
4282
- const i = r.children[n];
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 r of s)
4289
- if (t(r))
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 (n) {
4301
- if (n) throw n;
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 r = document.createElement("p");
4313
- return e && (r.className = e), t && (r.id = t), s && (r.textContent = s), r;
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, r) {
4320
- const n = document.createElement("img");
4321
- return e && (n.className = e), n.src = s, n;
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 r = document.createElement("video"), n = document.createElement("source");
4325
- return r.className = e, n.src = s, r.appendChild(n), r;
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 r = document.createElement("audio"), n = document.createElement("source");
4329
- return r.className = e, r.controls = !0, n.src = s, r.appendChild(n), r;
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, r, n) {
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), n && (i.innerHTML = n), i.disabled = r, i;
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 r = document.createElement("input");
4337
- return r.className = e, r.defaultValue = t, s && (r.type = s), r;
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(r) {
4342
- if (r !== "default" && !(r in s)) {
4343
- var n = Object.getOwnPropertyDescriptor(t, r);
4344
- Object.defineProperty(s, r, n.get ? n : { enumerable: !0, get: function() {
4345
- return t[r];
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, r) {
4353
- let n;
4352
+ return new Promise(function(t, n) {
4353
+ let r;
4354
4354
  return Rs(s).then(function(i) {
4355
4355
  try {
4356
- return n = i, t(new Blob([e.slice(0, 2), n, e.slice(2)], { type: "image/jpeg" }));
4356
+ return r = i, t(new Blob([e.slice(0, 2), r, e.slice(2)], { type: "image/jpeg" }));
4357
4357
  } catch (o) {
4358
- return r(o);
4358
+ return n(o);
4359
4359
  }
4360
- }, r);
4360
+ }, n);
4361
4361
  });
4362
4362
  }
4363
4363
  const Rs = (s) => new Promise((e, t) => {
4364
- const r = new FileReader();
4365
- r.addEventListener("load", ({ target: { result: n } }) => {
4366
- const i = new DataView(n);
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(n.slice(o, o + 2 + c));
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
- }), r.readAsArrayBuffer(s);
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, r = {};
4409
- Ds.exports = r, r.parse = function(n, i) {
4410
- for (var o = r.bin.readUshort, a = r.bin.readUint, c = 0, d = {}, l = new Uint8Array(n), u = l.length - 4; a(l, u) != 101010256; ) u--;
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, r._readLocal(l, F, d, f, T, i);
4421
+ c += 4, c += C + R + O, n._readLocal(l, F, d, f, T, i);
4422
4422
  }
4423
4423
  return d;
4424
- }, r._readLocal = function(n, i, o, a, c, d) {
4425
- var l = r.bin.readUshort, u = r.bin.readUint;
4426
- u(n, i), l(n, i += 4), l(n, i += 2);
4427
- var h = l(n, i += 2);
4428
- u(n, i += 2), u(n, i += 4), i += 4;
4429
- var f = l(n, i += 8), y = l(n, i += 2);
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 = r.bin.readUTF8(n, i, f);
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(n.buffer, i);
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
- r.inflateRaw(T, C), o[k] = C;
4439
+ n.inflateRaw(T, C), o[k] = C;
4440
4440
  }
4441
4441
  }
4442
- }, r.inflateRaw = function(n, i) {
4443
- return r.F.inflate(n, i);
4444
- }, r.inflate = function(n, i) {
4445
- return n[0], n[1], r.inflateRaw(new Uint8Array(n.buffer, n.byteOffset + 2, n.length - 6), i);
4446
- }, r.deflate = function(n, i) {
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 * n.length));
4449
- a[o] = 120, a[o + 1] = 156, o += 2, o = r.F.deflateRaw(n, a, o, i.level);
4450
- var c = r.adler(n, 0, n.length);
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
- }, r.deflateRaw = function(n, i) {
4452
+ }, n.deflateRaw = function(r, i) {
4453
4453
  i == null && (i = { level: 6 });
4454
- var o = new Uint8Array(50 + Math.floor(1.1 * n.length)), a = r.F.deflateRaw(n, o, a, i.level);
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
- }, r.encode = function(n, i) {
4456
+ }, n.encode = function(r, i) {
4457
4457
  i == null && (i = !1);
4458
- var o = 0, a = r.bin.writeUint, c = r.bin.writeUshort, d = {};
4459
- for (var l in n) {
4460
- var u = !r._noNeed(l) && !i, h = n[l], f = r.crc.crc(h, 0, h.length);
4461
- d[l] = { cpr: u, usize: h.length, crc: f, file: u ? r.deflateRaw(h) : h };
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 * r.bin.sizeUTF8(l);
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 = r._writeHeader(y, k, l, C, 0);
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 = r._writeHeader(y, k, l, C, 1, T[R++]);
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
- }, r._noNeed = function(n) {
4476
- var i = n.split(".").pop().toLowerCase();
4475
+ }, n._noNeed = function(r) {
4476
+ var i = r.split(".").pop().toLowerCase();
4477
4477
  return "png,jpg,jpeg,zip".indexOf(i) != -1;
4478
- }, r._writeHeader = function(n, i, o, a, c, d) {
4479
- var l = r.bin.writeUint, u = r.bin.writeUshort, h = a.file;
4480
- return l(n, i, c == 0 ? 67324752 : 33639248), i += 4, c == 1 && (i += 2), u(n, i, 20), u(n, i += 2, 0), u(n, i += 2, a.cpr ? 8 : 0), l(n, i += 2, 0), l(n, i += 4, a.crc), l(n, i += 4, h.length), l(n, i += 4, a.usize), u(n, i += 4, r.bin.sizeUTF8(o)), u(n, i += 2, 0), i += 2, c == 1 && (i += 2, i += 2, l(n, i += 6, d), i += 4), i += r.bin.writeUTF8(n, i, o), c == 0 && (n.set(h, i), i += h.length), i;
4481
- }, r.crc = { table: function() {
4482
- for (var n = new Uint32Array(256), i = 0; i < 256; i++) {
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
- n[i] = o;
4484
+ r[i] = o;
4485
4485
  }
4486
- return n;
4487
- }(), update: function(n, i, o, a) {
4488
- for (var c = 0; c < a; c++) n = r.crc.table[255 & (n ^ i[o + c])] ^ n >>> 8;
4489
- return n;
4490
- }, crc: function(n, i, o) {
4491
- return 4294967295 ^ r.crc.update(4294967295, n, i, o);
4492
- } }, r.adler = function(n, i, o) {
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 += n[d++];
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
- }, r.bin = { readUshort: function(n, i) {
4499
- return n[i] | n[i + 1] << 8;
4500
- }, writeUshort: function(n, i, o) {
4501
- n[i] = 255 & o, n[i + 1] = o >> 8 & 255;
4502
- }, readUint: function(n, i) {
4503
- return 16777216 * n[i + 3] + (n[i + 2] << 16 | n[i + 1] << 8 | n[i]);
4504
- }, writeUint: function(n, i, o) {
4505
- n[i] = 255 & o, n[i + 1] = o >> 8 & 255, n[i + 2] = o >> 16 & 255, n[i + 3] = o >> 24 & 255;
4506
- }, readASCII: function(n, i, o) {
4507
- for (var a = "", c = 0; c < o; c++) a += String.fromCharCode(n[i + c]);
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(n, i, o) {
4510
- for (var a = 0; a < o.length; a++) n[i + a] = o.charCodeAt(a);
4511
- }, pad: function(n) {
4512
- return n.length < 2 ? "0" + n : n;
4513
- }, readUTF8: function(n, i, o) {
4514
- for (var a, c = "", d = 0; d < o; d++) c += "%" + r.bin.pad(n[i + d].toString(16));
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 r.bin.readASCII(n, i, o);
4518
+ return n.bin.readASCII(r, i, o);
4519
4519
  }
4520
4520
  return a;
4521
- }, writeUTF8: function(n, i, o) {
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)) n[i + c] = l, c++;
4525
- else if (!(4294965248 & l)) n[i + c] = 192 | l >> 6, n[i + c + 1] = 128 | l >> 0 & 63, c += 2;
4526
- else if (!(4294901760 & l)) n[i + c] = 224 | l >> 12, n[i + c + 1] = 128 | l >> 6 & 63, n[i + c + 2] = 128 | l >> 0 & 63, c += 3;
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
- n[i + c] = 240 | l >> 18, n[i + c + 1] = 128 | l >> 12 & 63, n[i + c + 2] = 128 | l >> 6 & 63, n[i + c + 3] = 128 | l >> 0 & 63, c += 4;
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(n) {
4534
- for (var i = n.length, o = 0, a = 0; a < i; a++) {
4535
- var c = n.charCodeAt(a);
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
- } }, r.F = {}, r.F.deflateRaw = function(n, 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 = r.F.U, l = r.F._goodIndex;
4547
- r.F._hash;
4548
- var u = r.F._putsE, h = 0, f = o << 3, y = 0, k = n.length;
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 = r.F._copyExact(n, h, I, i, f + 8), h += I;
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 = r.F._hash(n, 0)] = 0), h = 0; h < k; h++) {
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 = r.F._hash(n, h + 1);
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 = r.F._writeBlock(h == k - 1 || y == k ? 1 : 0, T, O, b, n, U, h - U, i, f), O = F = b = 0, U = h);
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 = r.F._bestMatch(n, h, R, B, Math.min(c[2], k - h), c[3]));
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[n[h]]++;
4572
+ } else d.lhst[r[h]]++;
4573
4573
  F++;
4574
4574
  }
4575
4575
  }
4576
- for (U == h && n.length != 0 || (y < h && (T[O] = h - y, O += 2, y = h), f = r.F._writeBlock(1, T, O, b, n, U, h - U, i, f), O = 0, F = 0, O = F = b = 0, U = h); 7 & f; ) f++;
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
- }, r.F._bestMatch = function(n, i, o, a, c, d) {
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 != r.F._hash(n, i - h)) return 0;
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 || n[i + f] == n[i + f - h]) {
4583
- var T = r.F._howLong(n, i, h);
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
- }, r.F._howLong = function(n, i, o) {
4597
- if (n[i] != n[i - o] || n[i + 1] != n[i + 1 - o] || n[i + 2] != n[i + 2 - o]) return 0;
4598
- var a = i, c = Math.min(n.length, i + 258);
4599
- for (i += 3; i < c && n[i] == n[i - o]; ) i++;
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
- }, r.F._hash = function(n, i) {
4602
- return (n[i] << 8 | n[i + 1]) + (n[i + 2] << 4) & 65535;
4603
- }, r.saved = 0, r.F._writeBlock = function(n, i, o, a, c, d, l, u, h) {
4604
- var f, y, k, T, C, R, O, F, U, b = r.F.U, B = r.F._putsF, m = r.F._putsE;
4605
- b.lhst[256]++, y = (f = r.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 + r.F.contSize(b.fltree, b.lhst) + r.F.contSize(b.fdtree, b.dhst), I = a + r.F.contSize(b.ltree, b.lhst) + r.F.contSize(b.dtree, b.dhst);
4607
- I += 14 + 3 * O + r.F.contSize(b.itree, b.ihst) + (2 * b.ihst[16] + 3 * b.ihst[17] + 7 * b.ihst[18]);
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, n), B(u, h + 1, L), h += 3, L == 0) {
4612
+ if (B(u, h, r), B(u, h + 1, L), h += 3, L == 0) {
4613
4613
  for (; 7 & h; ) h++;
4614
- h = r.F._copyExact(c, d, l, u, 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
- r.F.makeCodes(b.ltree, y), r.F.revCodes(b.ltree, y), r.F.makeCodes(b.dtree, k), r.F.revCodes(b.dtree, k), r.F.makeCodes(b.itree, T), r.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;
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 = r.F._codeTiny(F, b.itree, u, h), h = r.F._codeTiny(U, b.itree, u, 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 = r.F._writeLit(c[p++], v, u, 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 = r.F._writeLit(257 + $, v, u, h), V - b.of0[$]), h += b.exb[$], B(u, h = r.F._writeLit(S, _, u, h), q - b.df0[S]), h += b.dxb[S], p += V;
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 = r.F._writeLit(256, v, u, h);
4629
+ h = n.F._writeLit(256, v, u, h);
4630
4630
  }
4631
4631
  return h;
4632
- }, r.F._copyExact = function(n, i, o, a, c) {
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(n.buffer, i, o), d), c + (o + 4 << 3);
4635
- }, r.F.getTrees = function() {
4636
- for (var n = r.F.U, i = r.F._hufTree(n.lhst, n.ltree, 15), o = r.F._hufTree(n.dhst, n.dtree, 15), a = [], c = r.F._lenCodes(n.ltree, a), d = [], l = r.F._lenCodes(n.dtree, d), u = 0; u < a.length; u += 2) n.ihst[a[u]]++;
4637
- for (u = 0; u < d.length; u += 2) n.ihst[d[u]]++;
4638
- for (var h = r.F._hufTree(n.ihst, n.itree, 7), f = 19; f > 4 && n.itree[1 + (n.ordr[f - 1] << 1)] == 0; ) f--;
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
- }, r.F.getSecond = function(n) {
4641
- for (var i = [], o = 0; o < n.length; o += 2) i.push(n[o + 1]);
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
- }, r.F.nonZero = function(n) {
4644
- for (var i = "", o = 0; o < n.length; o += 2) n[o + 1] != 0 && (i += (o >> 1) + ",");
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
- }, r.F.contSize = function(n, i) {
4647
- for (var o = 0, a = 0; a < i.length; a++) o += i[a] * n[1 + (a << 1)];
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
- }, r.F._codeTiny = function(n, i, o, a) {
4650
- for (var c = 0; c < n.length; c += 2) {
4651
- var d = n[c], l = n[c + 1];
4652
- a = r.F._writeLit(d, i, o, 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 && (r.F._putsE(o, a, l, u), a += u);
4654
+ d > 15 && (n.F._putsE(o, a, l, u), a += u);
4655
4655
  }
4656
4656
  return a;
4657
- }, r.F._lenCodes = function(n, i) {
4658
- for (var o = n.length; o != 2 && n[o - 1] == 0; ) o -= 2;
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 = n[a + 1], d = a + 3 < o ? n[a + 3] : -1, l = a + 5 < o ? n[a + 5] : -1, u = a == 0 ? -1 : n[a - 1];
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 && n[h + 2] == c; ) h += 2;
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 && n[h + 2] == c; ) h += 2;
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
- }, r.F._hufTree = function(n, i, o) {
4672
- var a = [], c = n.length, d = i.length, l = 0;
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++) n[l] != 0 && a.push({ lit: l, f: n[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 = r.F.setDepth(a[C - 1], 0);
4687
- for (O > o && (r.F.restrictDepth(h, o, O), O = o), l = 0; l < u; l++) i[1 + (h[l].lit << 1)] = h[l].d;
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
- }, r.F.setDepth = function(n, i) {
4690
- return n.lit != -1 ? (n.d = i, i) : Math.max(r.F.setDepth(n.l, i + 1), r.F.setDepth(n.r, i + 1));
4691
- }, r.F.restrictDepth = function(n, i, o) {
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 (n.sort(function(u, h) {
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 < n.length && n[a].d > i; a++) {
4696
- var l = n[a].d;
4697
- n[a].d = i, d += c - (1 << o - l);
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 = n[a].d) < i ? (n[a].d++, d -= 1 << i - l - 1) : a++;
4701
- for (; a >= 0; a--) n[a].d == i && d < 0 && (n[a].d--, d++);
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
- }, r.F._goodIndex = function(n, i) {
4703
+ }, n.F._goodIndex = function(r, i) {
4704
4704
  var o = 0;
4705
- return i[16 | o] <= n && (o |= 16), i[8 | o] <= n && (o |= 8), i[4 | o] <= n && (o |= 4), i[2 | o] <= n && (o |= 2), i[1 | o] <= n && (o |= 1), o;
4706
- }, r.F._writeLit = function(n, i, o, a) {
4707
- return r.F._putsF(o, a, i[n << 1]), a + i[1 + (n << 1)];
4708
- }, r.F.inflate = function(n, i) {
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 (n[0] == 3 && n[1] == 0) return i || new o(0);
4711
- var a = r.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(n.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(n, A, 1), O = c(n, A + 1, 2), A += 3, O != 0) {
4714
- if (k && (i = r.F._check(i, g + (1 << 17))), O == 1 && (T = y.flmap, C = y.fdmap, B = 511, m = 31), O == 2) {
4715
- F = d(n, A, 5) + 257, U = d(n, A + 5, 5) + 1, b = d(n, A + 10, 4) + 4, A += 14;
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(n, A + 3 * I, 3);
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, n, A, y.ttree);
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(n, A) & B];
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(n, A, 7 & x), A += 7 & x;
4738
+ M = g + (x >>> 3) + d(r, A, 7 & x), A += 7 & x;
4739
4739
  }
4740
- var V = C[f(n, A) & m];
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(n, A, 15 & P);
4743
- for (A += 15 & P, k && (i = r.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];
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 = n[$ - 4] | n[$ - 3] << 8;
4750
- k && (i = r.F._check(i, g + S)), i.set(new o(n.buffer, n.byteOffset + $, S), g), A = $ + S << 3, g += S;
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
- }, r.F._check = function(n, i) {
4754
- var o = n.length;
4755
- if (i <= o) return n;
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(n, 0), a;
4758
- }, r.F._decodeTiny = function(n, i, o, a, c, d) {
4759
- for (var l = r.F._bitsE, u = r.F._get17, h = 0; h < o; ) {
4760
- var f = n[u(a, c) & i];
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
- }, r.F._copyOut = function(n, i, o, a) {
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 = n[d + i];
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
- }, r.F.makeCodes = function(n, i) {
4779
- for (var o, a, c, d, l = r.F.U, u = n.length, h = l.bl_count, f = 0; f <= i; f++) h[f] = 0;
4780
- for (f = 1; f < u; f += 2) h[n[f]]++;
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 = n[c + 1]) != 0 && (n[c] = y[d], y[d]++);
4784
- }, r.F.codes2map = function(n, i, o) {
4785
- for (var a = n.length, c = r.F.U.rev15, d = 0; d < a; d += 2) if (n[d + 1] != 0) for (var l = d >> 1, u = n[d + 1], h = l << 4 | u, f = i - u, y = n[d] << f, k = y + (1 << f); y != k; )
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
- }, r.F.revCodes = function(n, i) {
4788
- for (var o = r.F.U.rev15, a = 15 - i, c = 0; c < n.length; c += 2) {
4789
- var d = n[c] << i - n[c + 1];
4790
- n[c] = o[d] >>> a;
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
- }, r.F._putsE = function(n, i, o) {
4792
+ }, n.F._putsE = function(r, i, o) {
4793
4793
  o <<= 7 & i;
4794
4794
  var a = i >>> 3;
4795
- n[a] |= o, n[a + 1] |= o >>> 8;
4796
- }, r.F._putsF = function(n, i, o) {
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
- n[a] |= o, n[a + 1] |= o >>> 8, n[a + 2] |= o >>> 16;
4800
- }, r.F._bitsE = function(n, i, o) {
4801
- return (n[i >>> 3] | n[1 + (i >>> 3)] << 8) >>> (7 & i) & (1 << o) - 1;
4802
- }, r.F._bitsF = function(n, i, o) {
4803
- return (n[i >>> 3] | n[1 + (i >>> 3)] << 8 | n[2 + (i >>> 3)] << 16) >>> (7 & i) & (1 << o) - 1;
4804
- }, r.F._get17 = function(n, i) {
4805
- return (n[i >>> 3] | n[1 + (i >>> 3)] << 8 | n[2 + (i >>> 3)] << 16) >>> (7 & i);
4806
- }, r.F._get25 = function(n, i) {
4807
- return (n[i >>> 3] | n[1 + (i >>> 3)] << 8 | n[2 + (i >>> 3)] << 16 | n[3 + (i >>> 3)] << 24) >>> (7 & i);
4808
- }, r.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 n = r.F.U, i = 0; i < 32768; i++) {
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, n.rev15[i] = (o >>> 16 | o << 16) >>> 17;
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++) n.ldef[i] = n.of0[i] << 3 | n.exb[i], n.ddef[i] = n.df0[i] << 4 | n.dxb[i];
4817
- a(n.fltree, 144, 8), a(n.fltree, 112, 9), a(n.fltree, 24, 7), a(n.fltree, 8, 8), r.F.makeCodes(n.fltree, 9), r.F.codes2map(n.fltree, 9, n.flmap), r.F.revCodes(n.fltree, 9), a(n.fdtree, 32, 5), r.F.makeCodes(n.fdtree, 5), r.F.codes2map(n.fdtree, 5, n.fdmap), r.F.revCodes(n.fdtree, 5), a(n.itree, 19, 0), a(n.ltree, 286, 0), a(n.dtree, 30, 0), a(n.ttree, 320, 0);
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 ? n(u, T) : r(u, T), l.interlace == 0 ? u = o(u, l, 0, h, f) : l.interlace == 1 && (u = function(R, O) {
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 r(l, u) {
4953
- return n(new Uint8Array(l.buffer, 2, l.length - 6), u);
4952
+ function n(l, u) {
4953
+ return r(new Uint8Array(l.buffer, 2, l.length - 6), u);
4954
4954
  }
4955
- var n = function() {
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 = r(h.slice(g + 2, g + 2 + I));
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 = r(h.slice(m, m + I)), L = y.readUTF8(N, 0, N.length)), C.tabs[w][A] = 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 = 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 r = { table: function() {
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 = r.table[255 & (m ^ g[A + N])] ^ m >>> 8;
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 ^ r.update(4294967295, m, g, A) };
5236
- function n(m, g, A, I) {
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 && n(Y, P, p + 4, 7), S != A - 1 && (X != 0 && n(Y, P, p + 4 * g - 4, 3), n(Y, P, p + 4 * g, 5), X != g - 1 && n(Y, P, p + 4 * g + 4, 1))), L[p >> 2] = M, Z[p >> 2] = I[M];
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 } = r, v = e.writeUint, _ = e.writeUshort, w = e.writeASCII;
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, r = s.height, n = t << 2, i = s.getContext("2d").getImageData(0, 0, t, r), o = new Uint32Array(i.data.buffer), a = (32 * t + 31) / 32 << 2, c = a * r, d = 122 + c, l = new ArrayBuffer(d), u = new DataView(l), h = 1 << 20;
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(-r >>> 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 < r && C > 0; ) {
5599
- for (T = 122 + R * a, f = 0; f < n; ) C--, y = o[F++], k = y >>> 24, u.setUint32(T + f, y << 8 | k), f += 4;
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((r) => {
5613
- const n = s.split(","), i = n[0].match(/:(.*?);/)[1], o = globalThis.atob(n[1]);
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, r(d);
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 r = new qr();
5624
- r.onload = () => e(r.result), r.onerror = (n) => t(n), r.readAsDataURL(s);
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 r = new Image();
5630
- r.onload = () => e(r), r.onerror = (n) => t(n), r.src = s;
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(), r = Vs[t];
5641
- let n = s, i = e, o = n * i;
5642
- const a = n > i ? i / n : n / i;
5643
- for (; o > r * r; ) {
5644
- const c = (r + n) / 2, d = (r + i) / 2;
5645
- c < d ? (i = d, n = d * a) : (i = c * a, n = c), o = n * i;
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: n, height: i };
5647
+ return { width: r, height: i };
5648
5648
  }
5649
5649
  function Ln(s, e) {
5650
- let t, r;
5650
+ let t, n;
5651
5651
  try {
5652
- if (t = new OffscreenCanvas(s, e), r = t.getContext("2d"), r === null) throw new Error("getContext of OffscreenCanvas returns null");
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"), r = t.getContext("2d");
5654
+ t = document.createElement("canvas"), n = t.getContext("2d");
5655
5655
  }
5656
- return t.width = s, t.height = e, [t, r];
5656
+ return t.width = s, t.height = e, [t, n];
5657
5657
  }
5658
5658
  function Xr(s, e) {
5659
- const { width: t, height: r } = zr(s.width, s.height), [n, i] = Ln(t, r);
5660
- return e && /jpe?g/.test(e) && (i.fillStyle = "white", i.fillRect(0, 0, n.width, n.height)), i.drawImage(s, 0, 0, n.width, n.height), n;
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, r) {
5667
- let n, i;
5666
+ return new Promise(function(t, n) {
5667
+ let r, i;
5668
5668
  var o = function() {
5669
5669
  try {
5670
- return i = Xr(n, e.fileType || s.type), t([n, i]);
5670
+ return i = Xr(r, e.fileType || s.type), t([r, i]);
5671
5671
  } catch (c) {
5672
- return r(c);
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 r(u);
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 n = h, function() {
5689
+ return r = h, function() {
5690
5690
  try {
5691
5691
  return o();
5692
5692
  } catch (f) {
5693
- return r(f);
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 r(l);
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 n = c, o();
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, r, n = 1) {
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 * n), a = new Blob([u], { type: e }), a.name = t, a.lastModified = r, c.call(this);
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 = r, d.call(this);
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: n }).then((function(u) {
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 = r, l.call(this);
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, n), Gn(u, t, r).then((function(h) {
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, r, n, i;
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 r = a[1], An(r, t.type, t.name, t.lastModified).then(function(c) {
5781
+ return n = a[1], An(n, t.type, t.name, t.lastModified).then(function(c) {
5782
5782
  try {
5783
- return n = c, dt(r), vn(n).then(function(d) {
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 r = new qr();
5807
- r.onload = (n) => {
5808
- const i = new DataView(n.target.result);
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
- }, r.onerror = (n) => t(n), r.readAsArrayBuffer(s);
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: r } = s, { maxWidthOrHeight: n } = e;
5832
+ const { width: t } = s, { height: n } = s, { maxWidthOrHeight: r } = e;
5833
5833
  let i, o = s;
5834
- return isFinite(n) && (t > n || r > n) && ([o, i] = Ln(t, r), t > r ? (o.width = n, o.height = r / t * n) : (o.width = t / r * n, o.height = n), i.drawImage(s, 0, 0, o.width, o.height), dt(s)), o;
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: r } = s, [n, i] = Ln(t, r);
5838
- switch (e > 4 && e < 9 ? (n.width = r, n.height = t) : (n.width = t, n.height = r), e) {
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, r);
5843
+ i.transform(-1, 0, 0, -1, t, n);
5844
5844
  break;
5845
5845
  case 4:
5846
- i.transform(1, 0, 0, -1, 0, r);
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, r, 0);
5852
+ i.transform(0, 1, -1, 0, n, 0);
5853
5853
  break;
5854
5854
  case 7:
5855
- i.transform(0, -1, -1, 0, r, t);
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, r), dt(s), n;
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(r, n) {
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 n(Z);
5902
+ return r(Z);
5903
5903
  }
5904
- }, n);
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), r(F);
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), r(y);
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(_, n);
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 n(x);
5921
+ return r(x);
5922
5922
  }
5923
5923
  }
5924
5924
  }).bind(this))(w);
5925
5925
  }
5926
5926
  } catch (w) {
5927
- return n(w);
5927
+ return r(w);
5928
5928
  }
5929
- }).bind(this), n);
5929
+ }).bind(this), r);
5930
5930
  } catch (v) {
5931
- return n(v);
5931
+ return r(v);
5932
5932
  }
5933
- }).bind(this), n);
5933
+ }).bind(this), r);
5934
5934
  } catch (L) {
5935
- return n(L);
5935
+ return r(L);
5936
5936
  }
5937
- }).bind(this), n);
5937
+ }).bind(this), r);
5938
5938
  } catch (N) {
5939
- return n(N);
5939
+ return r(N);
5940
5940
  }
5941
- }).bind(this), n);
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, r) => {
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 n = new Worker(Mn);
5972
- n.addEventListener("message", function(o) {
5973
- if (e.signal && e.signal.aborted) n.terminate();
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 r(new Error(o.data.error)), void n.terminate();
5976
- t(o.data.file), n.terminate();
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
- }), n.addEventListener("error", r), e.signal && e.signal.addEventListener("abort", () => {
5979
- r(e.signal.reason), n.terminate();
5980
- }), n.postMessage({ file: s, imageCompressionLibUrl: e.libURL, options: { ...e, onProgress: void 0, signal: void 0 } });
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, r) {
5985
- let n, i, o, a, c, d;
5986
- if (n = { ...e }, o = 0, { onProgress: a } = n, n.maxSizeMB = n.maxSizeMB || Number.POSITIVE_INFINITY, c = typeof n.useWebWorker != "boolean" || n.useWebWorker, delete n.useWebWorker, n.onProgress = (f) => {
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 r(new Error("The file given is not an instance of Blob or File"));
5989
- if (!/^image/.test(s.type)) return r(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, n).then((function(f) {
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 r(y);
5994
+ return n(y);
5995
5995
  }
5996
- }).bind(this), r);
5996
+ }).bind(this), n);
5997
5997
  var l = (function() {
5998
5998
  try {
5999
5999
  return h.call(this);
6000
6000
  } catch (f) {
6001
- return r(f);
6001
+ return n(f);
6002
6002
  }
6003
6003
  }).bind(this), u = function(f) {
6004
6004
  try {
6005
- return br(s, n).then(function(y) {
6005
+ return br(s, r).then(function(y) {
6006
6006
  try {
6007
6007
  return i = y, l();
6008
6008
  } catch (k) {
6009
- return r(k);
6009
+ return n(k);
6010
6010
  }
6011
- }, r);
6011
+ }, n);
6012
6012
  } catch (y) {
6013
- return r(y);
6013
+ return n(y);
6014
6014
  }
6015
6015
  };
6016
6016
  try {
6017
- return n.libURL = n.libURL || "https://cdn.jsdelivr.net/npm/browser-image-compression@2.0.2/dist/browser-image-compression.js", Ps(s, n).then(function(f) {
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
- n.preserveExif && s.type === "image/jpeg" && (!n.fileType || n.fileType && n.fileType === s.type) && (i = Pr(s, i));
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, r, n) {
6058
- let i = n ?? this.create(), o = e.pos + t;
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 = r.readUnknownField;
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, r) {
6076
+ internalBinaryWrite(e, t, n) {
6077
6077
  e.mimeType !== "" && t.tag(1, j.LengthDelimited).string(e.mimeType);
6078
- let n = r.writeUnknownFields;
6079
- return n !== !1 && (n == !0 ? G.onWrite : n)(this.typeName, e, t), t;
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, r, n) {
6114
- let i = n ?? this.create(), o = e.pos + t;
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 = r.readUnknownField;
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, r) {
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 n = r.writeUnknownFields;
6143
- return n !== !1 && (n == !0 ? G.onWrite : n)(this.typeName, e, t), t;
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,85 +6158,88 @@ 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 r = this.methods[0], n = this._transport.mergeOptions(t);
6162
- return $e("unary", this._transport, r, n, e);
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 r = this.methods[1], n = this._transport.mergeOptions(t);
6169
- return $e("unary", this._transport, r, n, e);
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 r = (o = window.ImageSalonSDK) == null ? void 0 : o.grpcConfig, n = new Yr(r), i = kn.create();
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 n.upload(i, e) : await n.uploadUserImage(
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, r) => {
6183
+ }, Zs = async (s, e, t = !0, n) => {
6184
6184
  var a;
6185
- const n = (a = window.ImageSalonSDK) == null ? void 0 : a.grpcConfig, i = new Yr(n), o = kn.create();
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": r === "production" ? "hamropatro" : "hamropatro-android"
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, r = !0) => {
6199
- var n, i;
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, r), a = (n = o.response) == null ? void 0 : n.uploadUrl, c = (i = o == null ? void 0 : o.response) == null ? void 0 : i.accessUrl;
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 r = zs(s, t);
6207
+ const n = zs(s, t);
6208
6208
  try {
6209
6209
  await fetch(e, {
6210
6210
  method: "PUT",
6211
6211
  headers: {
6212
6212
  "Content-Type": t == null ? void 0 : t.type
6213
6213
  },
6214
- body: r
6214
+ body: n
6215
6215
  });
6216
- } catch (n) {
6217
- throw n;
6216
+ } catch (r) {
6217
+ throw r;
6218
6218
  }
6219
- }, Ks = async (s, e, t, r = !1, n) => {
6219
+ }, Ks = async (s, e, t, n = !1, r) => {
6220
6220
  var i, o;
6221
6221
  try {
6222
6222
  const a = await Zs(
6223
6223
  e == null ? void 0 : e.type,
6224
6224
  t,
6225
- r,
6226
- n
6227
- ), c = (i = a.response) == null ? void 0 : i.uploadUrl, d = (o = a == null ? void 0 : a.response) == null ? void 0 : o.accessUrl;
6225
+ n,
6226
+ r
6227
+ );
6228
+ console.log("upload response", a);
6229
+ const c = (i = a.response) == null ? void 0 : i.uploadUrl, d = (o = a == null ? void 0 : a.response) == null ? void 0 : o.accessUrl;
6228
6230
  return await ei(s, c, e), d;
6229
6231
  } catch (a) {
6230
6232
  throw a;
6231
6233
  }
6232
6234
  }, zs = (s, e) => {
6233
6235
  const t = e.type.split("/")[0];
6234
- let r = "";
6235
- t === "video" ? r = s == null ? void 0 : s.replace(/^data:video\/\w+;base64,/, "") : t === "image" ? r = s == null ? void 0 : s.replace(/^data:image\/\w+;base64,/, "") : t === "audio" && (r = s == null ? void 0 : s.replace(/^data:audio\/\w+;base64,/, ""));
6236
- const n = atob(r), i = new Uint8Array(n.length);
6237
- for (let o = 0; o < n.length; o++)
6238
- i[o] = n.charCodeAt(o);
6239
- return i;
6236
+ console.log("file type", t), console.log("base 64 image", s);
6237
+ let n = "";
6238
+ 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);
6239
+ const r = atob(n), i = new Uint8Array(r.length);
6240
+ for (let o = 0; o < r.length; o++)
6241
+ i[o] = r.charCodeAt(o);
6242
+ return console.log("buffer", i), i;
6240
6243
  };
6241
6244
  async function vr(s) {
6242
6245
  const e = {
@@ -6247,7 +6250,7 @@ async function vr(s) {
6247
6250
  try {
6248
6251
  return await Be(s, e);
6249
6252
  } catch (t) {
6250
- throw console.log("error", t), t;
6253
+ throw t;
6251
6254
  }
6252
6255
  }
6253
6256
  var At, be, Ce, pt, ge, ke, Xe, He, St, kt, st, Ge, Ft, Wt, qn, Nt, It, mt, Rt, ot, at, Tt, Lt, gt, jt, rn, Oe, wt, sn, Fn, on, lt, qt, Ut, xt, Zt, Kt, zt, Xt, an, ln, Gt, ct, Jt;
@@ -6313,25 +6316,25 @@ class Gs {
6313
6316
  return e.isAdmin === !0;
6314
6317
  }
6315
6318
  _renderView(e) {
6316
- var t, r, n;
6317
- 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, (r = e == null ? void 0 : e.removeImagePreviewCB) == null ? void 0 : r.bind(this)), H(this, Gt, (n = e == null ? void 0 : e.getUploadingState) == null ? void 0 : n.bind(this)), this._removeUserToast(), this._renderUserView(e));
6319
+ var t, n, r;
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, (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));
6318
6321
  }
6319
6322
  _renderAdminView(e) {
6320
6323
  if (!E(this, sn)) return;
6321
6324
  const { parentContainerId: t } = e;
6322
6325
  if (e.isAdmin === !0)
6323
- var { buttonProps: r } = e;
6326
+ var { buttonProps: n } = e;
6324
6327
  H(this, At, document.getElementById(t));
6325
- const n = document.createElement("button");
6326
- n.className = r != null && r.buttonClass ? r == null ? void 0 : r.buttonClass : "browse-image-button", n.addEventListener("focus", () => {
6327
- n.blur();
6328
+ const r = document.createElement("button");
6329
+ r.className = n != null && n.buttonClass ? n == null ? void 0 : n.buttonClass : "browse-image-button", r.addEventListener("focus", () => {
6330
+ r.blur();
6328
6331
  });
6329
6332
  const i = document.createElement("span");
6330
- i.textContent = r != null && r.buttonText ? r == null ? void 0 : r.buttonText : "Browse Files";
6333
+ i.textContent = n != null && n.buttonText ? n == null ? void 0 : n.buttonText : "Browse Files";
6331
6334
  const o = document.createElement("span");
6332
- o.innerHTML = r != null && r.buttonIcon ? r == null ? void 0 : r.buttonIcon : "", n.type = "button", n.append(i, o), r != null && r.buttonStyle && Object.assign(n.style, r == null ? void 0 : r.buttonStyle), n.addEventListener("click", () => {
6335
+ 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", () => {
6333
6336
  this._selectedImageContainer();
6334
- }), E(this, At).appendChild(n);
6337
+ }), E(this, At).appendChild(r);
6335
6338
  }
6336
6339
  async _grpcOptionInitializer() {
6337
6340
  H(this, Oe, await _s(
@@ -6355,10 +6358,10 @@ class Gs {
6355
6358
  ).addEventListener("click", () => {
6356
6359
  pn.hide(), H(this, ge, []), H(this, ke, []);
6357
6360
  }), H(this, be, K("browse-container"));
6358
- const r = K();
6359
- r.style.display = "flex", r.style.alignItems = "center", r.style.justifyContent = "space-between", r.style.padding = "10px 20px";
6360
- const n = en("Folders", "folder-title"), i = Ve("", "add-folder-btn");
6361
- i.append(mr()), this._createUpdateFolderDialog(i, "create"), r.append(n, i), E(this, It).append(r, E(this, mt));
6361
+ const n = K();
6362
+ n.style.display = "flex", n.style.alignItems = "center", n.style.justifyContent = "space-between", n.style.padding = "10px 20px";
6363
+ const r = en("Folders", "folder-title"), i = Ve("", "add-folder-btn");
6364
+ i.append(mr()), this._createUpdateFolderDialog(i, "create"), n.append(r, i), E(this, It).append(n, E(this, mt));
6362
6365
  const o = this._renderSearchField(), a = this._createBrowseMoreContainer(), c = this._createBrowseImageMain(), d = K("footer");
6363
6366
  e.onclick = () => {
6364
6367
  pn.hide(), H(this, ke, []), H(this, ge, []);
@@ -6371,29 +6374,29 @@ class Gs {
6371
6374
  });
6372
6375
  }
6373
6376
  _renderUserView(e) {
6374
- const { parentContainerId: t, restrictedFileSize: r, imagePreview: n } = e;
6377
+ const { parentContainerId: t, restrictedFileSize: n, imagePreview: r } = e;
6375
6378
  H(this, At, document.getElementById(t)), H(this, lt, Q("div", "user-view-container"));
6376
6379
  const i = K(
6377
6380
  "user-view-browse-wrapper",
6378
6381
  "user-view-browse-wrapper"
6379
6382
  ), o = Q("span", "", "", ""), a = this._renderUserViewBrowseButton(), c = Q("p", "", "margin-block: 0px; font-size:14px");
6380
- if (c.append(o, a), r) {
6383
+ if (c.append(o, a), n) {
6381
6384
  const d = Q(
6382
6385
  "p",
6383
6386
  "",
6384
6387
  "margin-block: 0px; font-size: 13px; color: #777",
6385
- `Max File size: ${r}MB`
6388
+ `Max File size: ${n}MB`
6386
6389
  );
6387
6390
  i.append(Sn(), c, d);
6388
6391
  } else
6389
6392
  i.append(Sn(), c);
6390
- return E(this, lt).append(i), n && this._renderImagePreview(n, "", i, !0), E(this, At).appendChild(E(this, lt)), E(this, At);
6393
+ return E(this, lt).append(i), r && this._renderImagePreview(r, "", i, !0), E(this, At).appendChild(E(this, lt)), E(this, At);
6391
6394
  }
6392
- _renderImagePreview(e, t, r, n = !1) {
6395
+ _renderImagePreview(e, t, n, r = !1) {
6393
6396
  var T;
6394
6397
  const i = document.getElementById(
6395
6398
  "user-view-browse-wrapper"
6396
- ), o = i || r;
6399
+ ), o = i || n;
6397
6400
  o && (o.style.display = "none");
6398
6401
  const a = document.getElementById("user-image-preview");
6399
6402
  a && a.remove();
@@ -6409,7 +6412,7 @@ class Gs {
6409
6412
  l.src = e, l.alt = t || "";
6410
6413
  const u = this._renderImageErrorContainer();
6411
6414
  c.appendChild(u), l.onload = () => {
6412
- f.style.display = "none", d.style.display = "none", d.remove(), u.style.display = "none", u.remove(), l.style.display = "block", f.style.display = n ? "flex" : "none";
6415
+ 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";
6413
6416
  }, l.onerror = (C) => {
6414
6417
  d.style.display = "none", d.remove(), u.style.display = "flex", l.style.display = "none", f.style.display = "none";
6415
6418
  };
@@ -6472,36 +6475,36 @@ class Gs {
6472
6475
  }
6473
6476
  H(this, Xe, !0), E(this, Gt).call(this, !0);
6474
6477
  try {
6475
- const r = await vr(e);
6478
+ const n = await vr(e);
6476
6479
  this._removeUserToast();
6477
- const n = new FileReader();
6478
- n.readAsDataURL(r), n.onload = () => {
6480
+ const r = new FileReader();
6481
+ r.readAsDataURL(n), r.onload = () => {
6479
6482
  this._userViewUploadAndAddSelectedImageList(
6480
- n.result,
6483
+ r.result,
6481
6484
  e
6482
6485
  );
6483
- }, n.onerror = () => {
6484
- console.error("Error reading file:", n.error);
6486
+ }, r.onerror = () => {
6487
+ console.error("Error reading file:", r.error);
6485
6488
  };
6486
- } catch (r) {
6487
- this._renderUserToast(r == null ? void 0 : r.message, "error");
6489
+ } catch (n) {
6490
+ this._renderUserToast(n == null ? void 0 : n.message, "error");
6488
6491
  }
6489
6492
  }
6490
6493
  _renderUserToast(e, t = "success") {
6491
- const r = Q(
6494
+ const n = Q(
6492
6495
  "div",
6493
6496
  "",
6494
6497
  "display:flex;align-items:center;gap:5px;margin-top:5px;"
6495
6498
  );
6496
- r.id = "user-toast-container";
6497
- const n = Q(
6499
+ n.id = "user-toast-container";
6500
+ const r = Q(
6498
6501
  "p",
6499
6502
  "",
6500
6503
  "margin-block:0px;font-size:14px;padding-top:3px"
6501
6504
  );
6502
- n.textContent = e, n.style.color = t === "success" ? "#4caf50" : "#ee3f3f";
6505
+ r.textContent = e, r.style.color = t === "success" ? "#4caf50" : "#ee3f3f";
6503
6506
  const i = t === "success" ? fr("#4caf50") : On();
6504
- i.style.width = "15px", i.style.height = "15px", r.append(i, n), E(this, lt).appendChild(r);
6507
+ i.style.width = "15px", i.style.height = "15px", n.append(i, r), E(this, lt).appendChild(n);
6505
6508
  }
6506
6509
  _removeUserToast() {
6507
6510
  const e = document.getElementById("user-toast-container");
@@ -6519,8 +6522,8 @@ class Gs {
6519
6522
  return t.classList.add("user-upload-btn"), t.role = "button", t.addEventListener("click", () => {
6520
6523
  this._removeUserToast(), e.click();
6521
6524
  }), e.addEventListener("change", () => {
6522
- const r = e.files[0];
6523
- r && this._readFileAsBase64(r), e.value = "";
6525
+ const n = e.files[0];
6526
+ n && this._readFileAsBase64(n), e.value = "";
6524
6527
  }), t;
6525
6528
  }
6526
6529
  _renderUserUploading() {
@@ -6545,8 +6548,8 @@ class Gs {
6545
6548
  this._renderUserUploading();
6546
6549
  try {
6547
6550
  this._renderImagePreview(e, t.name);
6548
- const r = await Er(e, t, E(this, Oe), !1);
6549
- await this._uploadForUser(r, t), E(this, Xt) && this._renderUserToast(E(this, Xt), "success");
6551
+ const n = await Er(e, t, E(this, Oe), !1);
6552
+ await this._uploadForUser(n, t), E(this, Xt) && this._renderUserToast(E(this, Xt), "success");
6550
6553
  } catch {
6551
6554
  this._renderUserToast(
6552
6555
  E(this, zt) ? E(this, zt) : "Error uploading. Please try again later.",
@@ -6557,30 +6560,30 @@ class Gs {
6557
6560
  }
6558
6561
  }
6559
6562
  async _uploadForUser(e, t) {
6560
- var r;
6563
+ var n;
6561
6564
  try {
6562
- const n = await is(
6565
+ const r = await is(
6563
6566
  e,
6564
- Je[Rn((r = t.type) == null ? void 0 : r.split("/")[0])],
6567
+ Je[Rn((n = t.type) == null ? void 0 : n.split("/")[0])],
6565
6568
  E(this, Oe)
6566
6569
  );
6567
- H(this, qt, n == null ? void 0 : n.response), E(this, Wt).call(this);
6568
- } catch (n) {
6569
- throw Error(n);
6570
+ H(this, qt, r == null ? void 0 : r.response), E(this, Wt).call(this);
6571
+ } catch (r) {
6572
+ throw Error(r);
6570
6573
  }
6571
6574
  }
6572
6575
  _createAllAndSelectedTab(e) {
6573
- const t = K("select-options"), r = en("Browse", "select"), n = en(
6576
+ const t = K("select-options"), n = en("Browse", "select"), r = en(
6574
6577
  "Selected",
6575
6578
  "select",
6576
6579
  "selected-images-tab"
6577
6580
  );
6578
- r.classList.add("selected"), [r, n].forEach((o, a) => {
6581
+ n.classList.add("selected"), [n, r].forEach((o, a) => {
6579
6582
  o.addEventListener("click", () => {
6580
6583
  var c;
6581
6584
  H(this, Nt, a), (c = document.querySelector(".select.selected")) == null || c.classList.remove("selected"), o.classList.add("selected"), this._updateSelectedImageListContainerUI();
6582
6585
  });
6583
- }), t.append(r, n), e.appendChild(t);
6586
+ }), t.append(n, r), e.appendChild(t);
6584
6587
  }
6585
6588
  _renderUploadButton() {
6586
6589
  const e = Dn("file");
@@ -6590,18 +6593,18 @@ class Gs {
6590
6593
  "click",
6591
6594
  () => e.click()
6592
6595
  ), e.addEventListener("change", async () => {
6593
- const r = e.files[0];
6596
+ const n = e.files[0];
6594
6597
  try {
6595
6598
  H(this, Xe, !0);
6596
- const n = new FileReader();
6597
- n.readAsDataURL(r), n.onload = async () => {
6599
+ const r = new FileReader();
6600
+ r.readAsDataURL(n), r.onload = async () => {
6598
6601
  await this._uploadAndAddSelectedImageList(
6599
- n.result,
6600
- r
6602
+ r.result,
6603
+ n
6601
6604
  );
6602
6605
  };
6603
- } catch (n) {
6604
- this._renderToastContainer(n, "error", E(this, be));
6606
+ } catch (r) {
6607
+ this._renderToastContainer(r, "error", E(this, be));
6605
6608
  }
6606
6609
  e.value = "";
6607
6610
  }), E(this, pt);
@@ -6614,7 +6617,7 @@ class Gs {
6614
6617
  }
6615
6618
  _renderSearchField() {
6616
6619
  let e;
6617
- const t = K("search-browse-container"), r = K(
6620
+ const t = K("search-browse-container"), n = K(
6618
6621
  "search-input-wrapper",
6619
6622
  "search-input-wrapper"
6620
6623
  );
@@ -6629,19 +6632,19 @@ class Gs {
6629
6632
  H(this, gt, !0), H(this, jt, o.value), this._search(E(this, jt));
6630
6633
  }, 750);
6631
6634
  }), E(this, Lt).setAttribute("placeholder", "Search");
6632
- const n = Ns();
6633
- return n.style.position = "absolute", n.style.top = "50%", n.style.left = "5%", n.style.transform = "translate(-5%, -50%)", r.append(n, E(this, Lt)), t.append(r), t;
6635
+ const r = Ns();
6636
+ 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;
6634
6637
  }
6635
6638
  _createBrowseMoreContainer() {
6636
6639
  H(this, Rt, K("browse-more-btn-container")), this._createAllAndSelectedTab(E(this, Rt));
6637
- const e = this._renderUploadButton(), t = this._renderCreateFolderBtn(), r = document.createElement("div");
6638
- return r.style.display = "flex", r.style.alignItems = "center", r.style.gap = "10px", r.append(e, t), E(this, Rt).appendChild(r), E(this, Rt);
6640
+ const e = this._renderUploadButton(), t = this._renderCreateFolderBtn(), n = document.createElement("div");
6641
+ 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);
6639
6642
  }
6640
6643
  _createBrowseImageMain() {
6641
6644
  const e = K("browse-image-main");
6642
6645
  return H(this, Ce, K("selected-image-container")), E(this, Ce).addEventListener("scroll", () => {
6643
- const t = E(this, Ce).clientHeight, r = E(this, Ce).scrollTop, n = E(this, Ce).scrollHeight;
6644
- t + r >= n - 5 && E(this, Tt) && (E(this, gt) ? this._search(E(this, jt)) : this._fetchFilesFromFolder(E(this, kt)));
6646
+ const t = E(this, Ce).clientHeight, n = E(this, Ce).scrollTop, r = E(this, Ce).scrollHeight;
6647
+ t + n >= r - 5 && E(this, Tt) && (E(this, gt) ? this._search(E(this, jt)) : this._fetchFilesFromFolder(E(this, kt)));
6645
6648
  }), e.appendChild(E(this, Ce)), e;
6646
6649
  }
6647
6650
  _renderFetchingSkeletonUI() {
@@ -6652,7 +6655,7 @@ class Gs {
6652
6655
  }
6653
6656
  _renderEmptyImageContainer() {
6654
6657
  if (E(this, He) || E(this, Xe)) return;
6655
- const e = K(), t = K(), r = document.createElement("p");
6658
+ const e = K(), t = K(), n = document.createElement("p");
6656
6659
  E(this, gt) && E(this, Nt) === 0 ? (t.innerHTML = `
6657
6660
  <svg width="300" height="300" viewBox="0 0 1000 1000" fill="none" xmlns="http://www.w3.org/2000/svg">
6658
6661
  <g clip-path="url(#clip0_2304_257)">
@@ -6689,7 +6692,7 @@ class Gs {
6689
6692
  </clipPath>
6690
6693
  </defs>
6691
6694
  </svg>
6692
- `, r.textContent = "Oops! No Result Found.") : (t.innerHTML = `
6695
+ `, n.textContent = "Oops! No Result Found.") : (t.innerHTML = `
6693
6696
  <svg width="300" height="300" viewBox="0 0 1000 1000" fill="none" xmlns="http://www.w3.org/2000/svg">
6694
6697
  <g clip-path="url(#clip0_2301_2)">
6695
6698
  <path d="M564.829 772.4H336.658V948.386H564.829V772.4Z" fill="#EBEBEB"/>
@@ -6737,7 +6740,7 @@ class Gs {
6737
6740
  </clipPath>
6738
6741
  </defs>
6739
6742
  </svg>
6740
- `, r.textContent = "Looks Empty!"), e.append(t, r), E(this, Ce).appendChild(e);
6743
+ `, n.textContent = "Looks Empty!"), e.append(t, n), E(this, Ce).appendChild(e);
6741
6744
  }
6742
6745
  _renderLoadingUI() {
6743
6746
  const e = K("skeleton");
@@ -6745,7 +6748,7 @@ class Gs {
6745
6748
  }
6746
6749
  _fileCardBody(e) {
6747
6750
  var rt, Mt, cn, Vt;
6748
- const t = K("selected-image-content"), r = K("selected-image-top-bar"), n = Ve(
6751
+ const t = K("selected-image-content"), n = K("selected-image-top-bar"), r = Ve(
6749
6752
  "",
6750
6753
  "selected-image-btn",
6751
6754
  "",
@@ -6757,9 +6760,9 @@ class Gs {
6757
6760
  const a = K("selected-image-wrapper");
6758
6761
  a.setAttribute("data-key", e == null ? void 0 : e.key);
6759
6762
  const c = en(e == null ? void 0 : e.name, "selected-image-name"), d = ie("", "selected-image-type");
6760
- d.append(o), r.append(d, n);
6763
+ d.append(o), n.append(d, r);
6761
6764
  const l = K();
6762
- l.style.marginTop = "10px", l.style.display = "flex", l.style.justifyContent = "space-between", l.style.alignItems = "center", l.append(c), t.append(r, i), a.append(t, l);
6765
+ 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);
6763
6766
  const u = K("action-wrapper"), h = Ve("", "action-option preview"), f = ie("Preview", ""), y = Fs();
6764
6767
  h.append(y, f);
6765
6768
  const k = Ve("", "action-option move"), T = ie("Move", ""), C = ks();
@@ -6937,10 +6940,10 @@ class Gs {
6937
6940
  this._deleteFile(e.key);
6938
6941
  }
6939
6942
  });
6940
- }, n.addEventListener("click", (ce) => {
6943
+ }, r.addEventListener("click", (ce) => {
6941
6944
  ce.stopPropagation(), je.hide(), je.show({
6942
6945
  content: u,
6943
- mainContainer: r,
6946
+ mainContainer: n,
6944
6947
  divId: e.key
6945
6948
  }), H(this, wt, e.key);
6946
6949
  }), i.addEventListener("click", () => {
@@ -6973,8 +6976,8 @@ class Gs {
6973
6976
  }
6974
6977
  _renderImageListContainer() {
6975
6978
  var e, t;
6976
- ((e = E(this, ke)) == null ? void 0 : e.length) > 0 && ((t = E(this, ke)) == null || t.forEach((r) => {
6977
- this._renderImageCard(r);
6979
+ ((e = E(this, ke)) == null ? void 0 : e.length) > 0 && ((t = E(this, ke)) == null || t.forEach((n) => {
6980
+ this._renderImageCard(n);
6978
6981
  }));
6979
6982
  }
6980
6983
  _renderSelectedImageListContainer() {
@@ -6987,8 +6990,8 @@ class Gs {
6987
6990
  const e = document.createElement("div");
6988
6991
  e.style.paddingInline = "20px";
6989
6992
  for (let t = 0; t < 4; t++) {
6990
- const r = K("skeleton");
6991
- r.className = "skeleton folder", r.innerHTML = "", e.appendChild(r);
6993
+ const n = K("skeleton");
6994
+ n.className = "skeleton folder", n.innerHTML = "", e.appendChild(n);
6992
6995
  }
6993
6996
  return e;
6994
6997
  }
@@ -6996,12 +6999,12 @@ class Gs {
6996
6999
  var o;
6997
7000
  const t = document.createElement("li");
6998
7001
  t.className = "folder";
6999
- const r = document.createElement("div");
7000
- r.style.position = "relative", r.style.display = "flex", r.style.alignItems = "center", r.style.gap = "2px";
7001
- const n = document.createElement("span"), i = document.createElement("span");
7002
- if (i.className = "folder-name", i.textContent = e == null ? void 0 : e.name, n.appendChild(Yt()), r.append(n, i), t.append(r), e.children && Object.keys(e.children).length > 0) {
7002
+ const n = document.createElement("div");
7003
+ n.style.position = "relative", n.style.display = "flex", n.style.alignItems = "center", n.style.gap = "2px";
7004
+ const r = document.createElement("span"), i = document.createElement("span");
7005
+ 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) {
7003
7006
  const a = document.createElement("button");
7004
- a.classList.add("expand-icon"), a.appendChild(ur()), r.prepend(a);
7007
+ a.classList.add("expand-icon"), a.appendChild(ur()), n.prepend(a);
7005
7008
  const c = document.createElement("ul");
7006
7009
  c.className = "folders nested", t.appendChild(c), a.addEventListener("click", (d) => {
7007
7010
  d.stopPropagation(), t.classList.toggle("active"), c.classList.toggle("visible");
@@ -7053,10 +7056,10 @@ class Gs {
7053
7056
  const U = document.querySelector(`#${e.key}`);
7054
7057
  H(this, wt, null), E(this, wt) === e.key && U !== null ? je.hide() : (je.hide(), je.show({
7055
7058
  content: c,
7056
- mainContainer: r,
7059
+ mainContainer: n,
7057
7060
  divId: e.key
7058
7061
  }), H(this, wt, e.key));
7059
- }), r.appendChild(a);
7062
+ }), n.appendChild(a);
7060
7063
  }
7061
7064
  return t.addEventListener("click", (a) => {
7062
7065
  var c;
@@ -7067,12 +7070,12 @@ class Gs {
7067
7070
  var o;
7068
7071
  const t = document.createElement("li");
7069
7072
  t.className = "folder-move";
7070
- const r = document.createElement("div");
7071
- r.style.position = "relative", r.style.display = "flex", r.style.alignItems = "center", r.style.gap = "2px";
7072
- const n = document.createElement("span"), i = document.createElement("span");
7073
- if (i.className = "folder-name", i.textContent = e == null ? void 0 : e.name, n.appendChild(Yt()), r.append(n, i), t.append(r), e.children && Object.keys(e.children).length > 0) {
7073
+ const n = document.createElement("div");
7074
+ n.style.position = "relative", n.style.display = "flex", n.style.alignItems = "center", n.style.gap = "2px";
7075
+ const r = document.createElement("span"), i = document.createElement("span");
7076
+ 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) {
7074
7077
  const a = document.createElement("button");
7075
- a.classList.add("expand-icon"), a.appendChild(ur()), r.prepend(a);
7078
+ a.classList.add("expand-icon"), a.appendChild(ur()), n.prepend(a);
7076
7079
  const c = document.createElement("ul");
7077
7080
  c.className = "folders nested", t.appendChild(c), a.addEventListener("click", (d) => {
7078
7081
  d.stopPropagation(), t.classList.toggle("active"), c.classList.toggle("visible");
@@ -7098,20 +7101,20 @@ class Gs {
7098
7101
  } else {
7099
7102
  const e = document.createElement("ul");
7100
7103
  e.className = "folders", E(this, mt).appendChild(e), E(this, st).forEach((t) => {
7101
- const r = this._renderFolderListContainer(t);
7102
- e.appendChild(r);
7104
+ const n = this._renderFolderListContainer(t);
7105
+ e.appendChild(n);
7103
7106
  }), E(this, It).appendChild(E(this, mt));
7104
7107
  }
7105
7108
  }
7106
- _renderToastContainer(e, t, r) {
7109
+ _renderToastContainer(e, t, n) {
7107
7110
  this._removeToastContainer(), H(this, ot, document.createElement("div")), E(this, ot).className = `message-container ${t}`;
7108
- const n = en(e, "message"), i = t === "success" ? fr() : On(), o = Ve("");
7111
+ const r = en(e, "message"), i = t === "success" ? fr() : On(), o = Ve("");
7109
7112
  o.style.cursor = "pointer", o.style.border = "0", o.style.outline = "none", o.style.background = "transparent", o.appendChild(
7110
7113
  jn(t === "error" ? "#ee3f3f" : "#4caf50")
7111
7114
  ), o.setAttribute(
7112
7115
  "fill",
7113
7116
  t === "error" ? "#ee3f3f" : "#4caf50"
7114
- ), o.onclick = () => this._removeToastContainer(), E(this, ot).append(i, n, o), r.appendChild(E(this, ot)), setTimeout(() => {
7117
+ ), o.onclick = () => this._removeToastContainer(), E(this, ot).append(i, r, o), n.appendChild(E(this, ot)), setTimeout(() => {
7115
7118
  this._removeToastContainer();
7116
7119
  }, 5e3);
7117
7120
  }
@@ -7119,7 +7122,7 @@ class Gs {
7119
7122
  E(this, ot) && (E(this, ot).remove(), H(this, ot, null));
7120
7123
  }
7121
7124
  _updateSelectedImageListContainerUI() {
7122
- var t, r;
7125
+ var t, n;
7123
7126
  if (!E(this, Ce)) return;
7124
7127
  E(this, Ce).innerHTML = "", E(this, Xe) && this._renderLoadingUI(), E(this, He) && this._renderFetchingSkeletonUI();
7125
7128
  const e = document.getElementById(
@@ -7129,27 +7132,27 @@ class Gs {
7129
7132
  "no-selected-image-container"
7130
7133
  ), this._renderEmptyImageContainer()) : (E(this, Ce).classList.remove(
7131
7134
  "no-selected-image-container"
7132
- ), this._renderImageListContainer())) : (e && (e.style.visibility = "hidden"), ((r = E(this, ge)) == null ? void 0 : r.length) === 0 ? (E(this, Ce).classList.add(
7135
+ ), this._renderImageListContainer())) : (e && (e.style.visibility = "hidden"), ((n = E(this, ge)) == null ? void 0 : n.length) === 0 ? (E(this, Ce).classList.add(
7133
7136
  "no-selected-image-container"
7134
7137
  ), this._renderEmptyImageContainer()) : (E(this, Ce).classList.remove(
7135
7138
  "no-selected-image-container"
7136
7139
  ), this._renderSelectedImageListContainer())), this._updateContent();
7137
7140
  }
7138
7141
  _updateContent() {
7139
- var t, r, n;
7142
+ var t, n, r;
7140
7143
  const e = document.getElementById("selected-images-tab");
7141
- e && (e.textContent = `Selected (${(t = E(this, ge)) == null ? void 0 : t.length})`), E(this, Ft).textContent = `Save (${(r = E(this, ge)) == null ? void 0 : r.length})`, E(this, Ft).disabled = ((n = E(this, ge)) == null ? void 0 : n.length) === 0;
7144
+ 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;
7142
7145
  }
7143
7146
  async _uploadAndAddSelectedImageList(e, t) {
7144
- var r, n;
7147
+ var n, r;
7145
7148
  this._updateSelectedImageListContainerUI();
7146
7149
  try {
7147
7150
  const i = await Er(e, t, E(this, Oe)), o = await rs(
7148
7151
  t == null ? void 0 : t.name,
7149
7152
  "",
7150
7153
  i,
7151
- Je[Rn((r = t.type) == null ? void 0 : r.split("/")[0])],
7152
- (n = E(this, Ge)) == null ? void 0 : n.name,
7154
+ Je[Rn((n = t.type) == null ? void 0 : n.split("/")[0])],
7155
+ (r = E(this, Ge)) == null ? void 0 : r.name,
7153
7156
  E(this, Oe)
7154
7157
  );
7155
7158
  E(this, ke).unshift(o == null ? void 0 : o.response), this._renderToastContainer(
@@ -7170,7 +7173,7 @@ class Gs {
7170
7173
  async _updateFile(e, t) {
7171
7174
  ye.updateUploadBtn(!0);
7172
7175
  try {
7173
- const r = await ls(
7176
+ const n = await ls(
7174
7177
  t.key,
7175
7178
  e,
7176
7179
  t.nestedFolderName,
@@ -7180,10 +7183,10 @@ class Gs {
7180
7183
  t.type,
7181
7184
  E(this, Ut),
7182
7185
  E(this, Oe)
7183
- ), n = E(this, ke).find(
7184
- (i) => i.key === r.response.key
7186
+ ), r = E(this, ke).find(
7187
+ (i) => i.key === n.response.key
7185
7188
  );
7186
- n.name = e, this._fetchFilesFromFolder(E(this, Ge).name), H(this, ke, []), H(this, ge, []), this._renderToastContainer(
7189
+ r.name = e, this._fetchFilesFromFolder(E(this, Ge).name), H(this, ke, []), H(this, ge, []), this._renderToastContainer(
7187
7190
  "File Updated Successfully",
7188
7191
  "success",
7189
7192
  E(this, be)
@@ -7217,17 +7220,17 @@ class Gs {
7217
7220
  }
7218
7221
  }
7219
7222
  async _createFolder(e, t = 2) {
7220
- var r;
7223
+ var n;
7221
7224
  try {
7222
- const n = await bs(
7225
+ const r = await bs(
7223
7226
  e,
7224
- (r = E(this, Ge)) == null ? void 0 : r.name,
7227
+ (n = E(this, Ge)) == null ? void 0 : n.name,
7225
7228
  "",
7226
7229
  E(this, Oe)
7227
7230
  );
7228
7231
  H(this, ge, []), H(this, ke, []);
7229
- const i = xs(E(this, st), n == null ? void 0 : n.response);
7230
- H(this, st, i), H(this, kt, e), H(this, Ge, { ...n == null ? void 0 : n.response, children: {} }), this._fetchFilesFromFolder(e), this._renderToastContainer(
7232
+ const i = xs(E(this, st), r == null ? void 0 : r.response);
7233
+ H(this, st, i), H(this, kt, e), H(this, Ge, { ...r == null ? void 0 : r.response, children: {} }), this._fetchFilesFromFolder(e), this._renderToastContainer(
7231
7234
  `Folder ${e} created successfully`,
7232
7235
  "success",
7233
7236
  E(this, be)
@@ -7252,23 +7255,23 @@ class Gs {
7252
7255
  }
7253
7256
  async _uploadFromSource(e, t) {
7254
7257
  this._removeUserToast();
7255
- const r = 200 * 1024;
7258
+ const n = 200 * 1024;
7256
7259
  try {
7257
- const n = e.size > r ? await vr(e) : e;
7260
+ const r = e.size > n ? await vr(e) : e;
7258
7261
  return await new Promise((o, a) => {
7259
7262
  const c = new FileReader();
7260
- c.onload = async () => {
7263
+ console.log("base 64", c.result), c.onload = async () => {
7261
7264
  var d;
7262
7265
  try {
7263
7266
  const l = await Ks(
7264
7267
  c.result,
7265
- n,
7268
+ r,
7266
7269
  t,
7267
7270
  !1,
7268
7271
  E(this, xt)
7269
7272
  ), u = await ss(
7270
7273
  l,
7271
- Je[Rn((d = n.type) == null ? void 0 : d.split("/")[0])],
7274
+ Je[Rn((d = r.type) == null ? void 0 : d.split("/")[0])],
7272
7275
  t,
7273
7276
  E(this, xt)
7274
7277
  );
@@ -7276,17 +7279,19 @@ class Gs {
7276
7279
  } catch (l) {
7277
7280
  a(l);
7278
7281
  }
7279
- }, c.onerror = () => a(c.error), c.readAsDataURL(n);
7282
+ }, c.onerror = () => {
7283
+ a(c.error), console.log("error", c.error);
7284
+ }, c.readAsDataURL(r);
7280
7285
  });
7281
- } catch (n) {
7282
- throw console.log("error", n), n;
7286
+ } catch (r) {
7287
+ throw console.log("error", r), r;
7283
7288
  }
7284
7289
  }
7285
7290
  _uploadingState() {
7286
7291
  return E(this, Xe);
7287
7292
  }
7288
7293
  async _fetchFilesFromFolder(e) {
7289
- var t, r, n;
7294
+ var t, n, r;
7290
7295
  H(this, He, !0), this._updateSelectedImageListContainerUI();
7291
7296
  try {
7292
7297
  const i = await os(
@@ -7295,7 +7300,7 @@ class Gs {
7295
7300
  20,
7296
7301
  E(this, Oe)
7297
7302
  ), o = (t = i.response) == null ? void 0 : t.files;
7298
- E(this, ke).push(...o), H(this, at, (r = i.response) == null ? void 0 : r.nextCursor), H(this, Tt, (n = i.response) == null ? void 0 : n.hasMore);
7303
+ 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);
7299
7304
  } catch {
7300
7305
  throw this._renderToastContainer(
7301
7306
  "Error while fetching files from folder" + e,
@@ -7312,7 +7317,7 @@ class Gs {
7312
7317
  var e, t;
7313
7318
  H(this, He, !0), H(this, St, !0), this._updateSelectedImageListContainerUI(), this._updateFolderListContainer(), this._removeToastContainer();
7314
7319
  try {
7315
- const n = (await ys("", 200, E(this, Oe))).response.folder, i = Us(n);
7320
+ const r = (await ys("", 200, E(this, Oe))).response.folder, i = Us(r);
7316
7321
  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);
7317
7322
  } catch {
7318
7323
  H(this, He, !1), this._renderToastContainer(
@@ -7325,16 +7330,16 @@ class Gs {
7325
7330
  }
7326
7331
  }
7327
7332
  async _search(e) {
7328
- var t, r;
7333
+ var t, n;
7329
7334
  H(this, He, !0), this._updateSelectedImageListContainerUI(), this._removeToastContainer();
7330
7335
  try {
7331
- const n = await as(
7336
+ const r = await as(
7332
7337
  e,
7333
7338
  E(this, at),
7334
7339
  10,
7335
7340
  E(this, Oe)
7336
- ), i = (t = n.response) == null ? void 0 : t.items;
7337
- E(this, ke).push(...i), H(this, at, (r = n.response) == null ? void 0 : r.nextPageCursor);
7341
+ ), i = (t = r.response) == null ? void 0 : t.items;
7342
+ E(this, ke).push(...i), H(this, at, (n = r.response) == null ? void 0 : n.nextPageCursor);
7338
7343
  } catch {
7339
7344
  this._renderToastContainer(
7340
7345
  "Error while searching files",
@@ -7348,7 +7353,7 @@ class Gs {
7348
7353
  async _updateFolder(e, t) {
7349
7354
  ye.updateUploadBtn(!0);
7350
7355
  try {
7351
- const r = await Cs(
7356
+ const n = await Cs(
7352
7357
  t.key,
7353
7358
  e,
7354
7359
  t.nestedFolderName,
@@ -7383,16 +7388,16 @@ class Gs {
7383
7388
  ye.updateUploadBtn(!1), ye.hide(), this._updateFolderListContainer();
7384
7389
  }
7385
7390
  }
7386
- _createUpdateFolderDialog(e, t, r) {
7387
- e.addEventListener("click", (n) => {
7388
- n.stopPropagation(), je.hide();
7391
+ _createUpdateFolderDialog(e, t, n) {
7392
+ e.addEventListener("click", (r) => {
7393
+ r.stopPropagation(), je.hide();
7389
7394
  let i;
7390
7395
  const o = K("edit-form-wrapper"), a = K("form-control"), c = ie("Folder Name", "input-label"), d = K();
7391
7396
  d.style.position = "relative";
7392
7397
  const l = document.createElement("input");
7393
7398
  l.style.paddingLeft = "40px";
7394
7399
  const u = ie();
7395
- 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 = r.name), l.onchange = (h) => {
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 = n.name), l.onchange = (h) => {
7396
7401
  i = h.target.value;
7397
7402
  }, a.append(c, d), o.append(a), ye.show({
7398
7403
  content: o,
@@ -7405,7 +7410,7 @@ class Gs {
7405
7410
  showFooter: !0,
7406
7411
  showCloseBtn: !0,
7407
7412
  onConfirm: () => {
7408
- t === "create" ? this._createFolder(i) : this._updateFolder(i, r), ye.hide();
7413
+ t === "create" ? this._createFolder(i) : this._updateFolder(i, n), ye.hide();
7409
7414
  }
7410
7415
  });
7411
7416
  });
@@ -7417,12 +7422,12 @@ class Gs {
7417
7422
  };
7418
7423
  }
7419
7424
  _initializeGrpcConfig(e, t) {
7420
- let r = "https://hamro-cms-backend-grpc.hamrostack.com";
7421
- t && (e === "production" || e === "development") ? r = t : e === "production" && (r = "https://page-api-grpc.hamropatro.com");
7422
- const n = new Wi({
7423
- baseUrl: r
7425
+ let n = "https://hamro-cms-backend-grpc.hamrostack.com";
7426
+ t && (e === "production" || e === "development") ? n = t : e === "production" && (n = "https://page-api-grpc.hamropatro.com");
7427
+ const r = new Wi({
7428
+ baseUrl: n
7424
7429
  });
7425
- this.updateWindowObject({ grpcConfig: n });
7430
+ this.updateWindowObject({ grpcConfig: r });
7426
7431
  }
7427
7432
  }
7428
7433
  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();