image-salon-sdk 1.0.32 → 1.0.34

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.
@@ -1,12 +1,12 @@
1
1
  import './style.css';
2
- var Gn = Object.defineProperty;
3
- var Ht = (i) => {
2
+ var Jn = Object.defineProperty;
3
+ var $t = (i) => {
4
4
  throw TypeError(i);
5
5
  };
6
- var Jn = (i, e, t) => e in i ? Gn(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
7
- var B = (i, e, t) => Jn(i, typeof e != "symbol" ? e + "" : e, t), $t = (i, e, t) => e.has(i) || Ht("Cannot " + t);
8
- var d = (i, e, t) => ($t(i, e, "read from private field"), t ? t.call(i) : e.get(i)), k = (i, e, t) => e.has(i) ? Ht("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(i) : e.set(i, t), p = (i, e, t, n) => ($t(i, e, "write to private field"), n ? n.call(i, t) : e.set(i, t), t);
9
- function cn(i) {
6
+ var zn = (i, e, t) => e in i ? Jn(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
7
+ var B = (i, e, t) => zn(i, typeof e != "symbol" ? e + "" : e, t), Wt = (i, e, t) => e.has(i) || $t("Cannot " + t);
8
+ var d = (i, e, t) => (Wt(i, e, "read from private field"), t ? t.call(i) : e.get(i)), k = (i, e, t) => e.has(i) ? $t("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(i) : e.set(i, t), p = (i, e, t, n) => (Wt(i, e, "write to private field"), n ? n.call(i, t) : e.set(i, t), t);
9
+ function dn(i) {
10
10
  let e = typeof i;
11
11
  if (e == "object") {
12
12
  if (Array.isArray(i))
@@ -16,20 +16,20 @@ function cn(i) {
16
16
  }
17
17
  return e;
18
18
  }
19
- function zn(i) {
19
+ function Yn(i) {
20
20
  return i !== null && typeof i == "object" && !Array.isArray(i);
21
21
  }
22
- let pe = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""), tt = [];
22
+ let pe = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""), nt = [];
23
23
  for (let i = 0; i < pe.length; i++)
24
- tt[pe[i].charCodeAt(0)] = i;
25
- tt[45] = pe.indexOf("+");
26
- tt[95] = pe.indexOf("/");
27
- function dn(i) {
24
+ nt[pe[i].charCodeAt(0)] = i;
25
+ nt[45] = pe.indexOf("+");
26
+ nt[95] = pe.indexOf("/");
27
+ function hn(i) {
28
28
  let e = i.length * 3 / 4;
29
29
  i[i.length - 2] == "=" ? e -= 2 : i[i.length - 1] == "=" && (e -= 1);
30
30
  let t = new Uint8Array(e), n = 0, r = 0, s, o = 0;
31
31
  for (let a = 0; a < i.length; a++) {
32
- if (s = tt[i.charCodeAt(a)], s === void 0)
32
+ if (s = nt[i.charCodeAt(a)], s === void 0)
33
33
  switch (i[a]) {
34
34
  case "=":
35
35
  r = 0;
@@ -61,7 +61,7 @@ function dn(i) {
61
61
  throw Error("invalid base64 string.");
62
62
  return t.subarray(0, n);
63
63
  }
64
- function hn(i) {
64
+ function un(i) {
65
65
  let e = "", t = 0, n, r = 0;
66
66
  for (let s = 0; s < i.length; s++)
67
67
  switch (n = i[s], t) {
@@ -93,14 +93,14 @@ var N;
93
93
  }, i.last = (t, n) => i.list(t, n).slice(-1)[0];
94
94
  const e = (t) => t && Array.isArray(t[i.symbol]);
95
95
  })(N || (N = {}));
96
- function Yn(i, e) {
96
+ function Qn(i, e) {
97
97
  return Object.assign(Object.assign({}, i), e);
98
98
  }
99
99
  var m;
100
100
  (function(i) {
101
101
  i[i.Varint = 0] = "Varint", i[i.Bit64 = 1] = "Bit64", i[i.LengthDelimited = 2] = "LengthDelimited", i[i.StartGroup = 3] = "StartGroup", i[i.EndGroup = 4] = "EndGroup", i[i.Bit32 = 5] = "Bit32";
102
102
  })(m || (m = {}));
103
- function Qn() {
103
+ function ei() {
104
104
  let i = 0, e = 0;
105
105
  for (let n = 0; n < 28; n += 7) {
106
106
  let r = this.buf[this.pos++];
@@ -117,7 +117,7 @@ function Qn() {
117
117
  }
118
118
  throw new Error("invalid varint");
119
119
  }
120
- function ot(i, e, t) {
120
+ function at(i, e, t) {
121
121
  for (let s = 0; s < 28; s = s + 7) {
122
122
  const o = i >>> s, a = !(!(o >>> 7) && e == 0), l = (a ? o | 128 : o) & 255;
123
123
  if (t.push(l), !a)
@@ -133,21 +133,21 @@ function ot(i, e, t) {
133
133
  t.push(e >>> 31 & 1);
134
134
  }
135
135
  }
136
- const ze = 65536 * 65536;
137
- function un(i) {
136
+ const Ye = 65536 * 65536;
137
+ function pn(i) {
138
138
  let e = i[0] == "-";
139
139
  e && (i = i.slice(1));
140
140
  const t = 1e6;
141
141
  let n = 0, r = 0;
142
142
  function s(o, a) {
143
143
  const l = Number(i.slice(o, a));
144
- r *= t, n = n * t + l, n >= ze && (r = r + (n / ze | 0), n = n % ze);
144
+ r *= t, n = n * t + l, n >= Ye && (r = r + (n / Ye | 0), n = n % Ye);
145
145
  }
146
146
  return s(-24, -18), s(-18, -12), s(-12, -6), s(-6), [e, n, r];
147
147
  }
148
- function ht(i, e) {
148
+ function ut(i, e) {
149
149
  if (e >>> 0 <= 2097151)
150
- return "" + (ze * e + (i >>> 0));
150
+ return "" + (Ye * e + (i >>> 0));
151
151
  let t = i & 16777215, n = (i >>> 24 | e << 8) >>> 0 & 16777215, r = e >> 16 & 65535, s = t + n * 6777216 + r * 6710656, o = n + r * 8147497, a = r * 2, l = 1e7;
152
152
  s >= l && (o += Math.floor(s / l), s %= l), o >= l && (a += Math.floor(o / l), o %= l);
153
153
  function c(h, g) {
@@ -170,7 +170,7 @@ function ht(i, e) {
170
170
  1
171
171
  );
172
172
  }
173
- function Wt(i, e) {
173
+ function Pt(i, e) {
174
174
  if (i >= 0) {
175
175
  for (; i > 127; )
176
176
  e.push(i & 127 | 128), i = i >>> 7;
@@ -181,7 +181,7 @@ function Wt(i, e) {
181
181
  e.push(1);
182
182
  }
183
183
  }
184
- function ei() {
184
+ function ti() {
185
185
  let i = this.buf[this.pos++], e = i & 127;
186
186
  if (!(i & 128))
187
187
  return this.assertBounds(), e;
@@ -199,7 +199,7 @@ function ei() {
199
199
  return this.assertBounds(), e >>> 0;
200
200
  }
201
201
  let T;
202
- function ti() {
202
+ function ni() {
203
203
  const i = new DataView(new ArrayBuffer(8));
204
204
  T = globalThis.BigInt !== void 0 && typeof i.getBigInt64 == "function" && typeof i.getBigUint64 == "function" && typeof i.setBigInt64 == "function" && typeof i.setBigUint64 == "function" ? {
205
205
  MIN: BigInt("-9223372036854775808"),
@@ -210,13 +210,13 @@ function ti() {
210
210
  V: i
211
211
  } : void 0;
212
212
  }
213
- ti();
214
- function pn(i) {
213
+ ni();
214
+ function fn(i) {
215
215
  if (!i)
216
216
  throw new Error("BigInt unavailable, see https://github.com/timostamm/protobuf-ts/blob/v1.0.8/MANUAL.md#bigint-support");
217
217
  }
218
- const fn = /^-?[0-9]+$/, Ye = 4294967296, qe = 2147483648;
219
- class mn {
218
+ const mn = /^-?[0-9]+$/, Qe = 4294967296, Ke = 2147483648;
219
+ class gn {
220
220
  /**
221
221
  * Create a new instance with the given bits.
222
222
  */
@@ -233,13 +233,13 @@ class mn {
233
233
  * Convert to a native number.
234
234
  */
235
235
  toNumber() {
236
- let e = this.hi * Ye + (this.lo >>> 0);
236
+ let e = this.hi * Qe + (this.lo >>> 0);
237
237
  if (!Number.isSafeInteger(e))
238
238
  throw new Error("cannot convert to safe number");
239
239
  return e;
240
240
  }
241
241
  }
242
- class P extends mn {
242
+ class P extends gn {
243
243
  /**
244
244
  * Create instance from a `string`, `number` or `bigint`.
245
245
  */
@@ -270,9 +270,9 @@ class P extends mn {
270
270
  case "string":
271
271
  if (e == "0")
272
272
  return this.ZERO;
273
- if (e = e.trim(), !fn.test(e))
273
+ if (e = e.trim(), !mn.test(e))
274
274
  throw new Error("string is no integer");
275
- let [t, n, r] = un(e);
275
+ let [t, n, r] = pn(e);
276
276
  if (t)
277
277
  throw new Error("signed value for ulong");
278
278
  return new P(n, r);
@@ -283,7 +283,7 @@ class P extends mn {
283
283
  throw new Error("number is no integer");
284
284
  if (e < 0)
285
285
  throw new Error("signed value for ulong");
286
- return new P(e, e / Ye);
286
+ return new P(e, e / Qe);
287
287
  }
288
288
  throw new Error("unknown value " + typeof e);
289
289
  }
@@ -291,17 +291,17 @@ class P extends mn {
291
291
  * Convert to decimal string.
292
292
  */
293
293
  toString() {
294
- return T ? this.toBigInt().toString() : ht(this.lo, this.hi);
294
+ return T ? this.toBigInt().toString() : ut(this.lo, this.hi);
295
295
  }
296
296
  /**
297
297
  * Convert to native bigint.
298
298
  */
299
299
  toBigInt() {
300
- return pn(T), T.V.setInt32(0, this.lo, !0), T.V.setInt32(4, this.hi, !0), T.V.getBigUint64(0, !0);
300
+ return fn(T), T.V.setInt32(0, this.lo, !0), T.V.setInt32(4, this.hi, !0), T.V.getBigUint64(0, !0);
301
301
  }
302
302
  }
303
303
  P.ZERO = new P(0, 0);
304
- class U extends mn {
304
+ class U extends gn {
305
305
  /**
306
306
  * Create instance from a `string`, `number` or `bigint`.
307
307
  */
@@ -332,13 +332,13 @@ class U extends mn {
332
332
  case "string":
333
333
  if (e == "0")
334
334
  return this.ZERO;
335
- if (e = e.trim(), !fn.test(e))
335
+ if (e = e.trim(), !mn.test(e))
336
336
  throw new Error("string is no integer");
337
- let [t, n, r] = un(e);
337
+ let [t, n, r] = pn(e);
338
338
  if (t) {
339
- if (r > qe || r == qe && n != 0)
339
+ if (r > Ke || r == Ke && n != 0)
340
340
  throw new Error("signed long too small");
341
- } else if (r >= qe)
341
+ } else if (r >= Ke)
342
342
  throw new Error("signed long too large");
343
343
  let s = new U(n, r);
344
344
  return t ? s.negate() : s;
@@ -347,7 +347,7 @@ class U extends mn {
347
347
  return this.ZERO;
348
348
  if (!Number.isSafeInteger(e))
349
349
  throw new Error("number is no integer");
350
- return e > 0 ? new U(e, e / Ye) : new U(-e, -e / Ye).negate();
350
+ return e > 0 ? new U(e, e / Qe) : new U(-e, -e / Qe).negate();
351
351
  }
352
352
  throw new Error("unknown value " + typeof e);
353
353
  }
@@ -355,7 +355,7 @@ class U extends mn {
355
355
  * Do we have a minus sign?
356
356
  */
357
357
  isNegative() {
358
- return (this.hi & qe) !== 0;
358
+ return (this.hi & Ke) !== 0;
359
359
  }
360
360
  /**
361
361
  * Negate two's complement.
@@ -373,28 +373,28 @@ class U extends mn {
373
373
  return this.toBigInt().toString();
374
374
  if (this.isNegative()) {
375
375
  let e = this.negate();
376
- return "-" + ht(e.lo, e.hi);
376
+ return "-" + ut(e.lo, e.hi);
377
377
  }
378
- return ht(this.lo, this.hi);
378
+ return ut(this.lo, this.hi);
379
379
  }
380
380
  /**
381
381
  * Convert to native bigint.
382
382
  */
383
383
  toBigInt() {
384
- return pn(T), T.V.setInt32(0, this.lo, !0), T.V.setInt32(4, this.hi, !0), T.V.getBigInt64(0, !0);
384
+ return fn(T), T.V.setInt32(0, this.lo, !0), T.V.setInt32(4, this.hi, !0), T.V.getBigInt64(0, !0);
385
385
  }
386
386
  }
387
387
  U.ZERO = new U(0, 0);
388
- const Pt = {
388
+ const Zt = {
389
389
  readUnknownField: !0,
390
- readerFactory: (i) => new ii(i)
390
+ readerFactory: (i) => new ri(i)
391
391
  };
392
- function ni(i) {
393
- return i ? Object.assign(Object.assign({}, Pt), i) : Pt;
392
+ function ii(i) {
393
+ return i ? Object.assign(Object.assign({}, Zt), i) : Zt;
394
394
  }
395
- class ii {
395
+ class ri {
396
396
  constructor(e, t) {
397
- this.varint64 = Qn, this.uint32 = ei, this.buf = e, this.len = e.length, this.pos = 0, this.view = new DataView(e.buffer, e.byteOffset, e.byteLength), this.textDecoder = t ?? new TextDecoder("utf-8", {
397
+ this.varint64 = ei, this.uint32 = ti, this.buf = e, this.len = e.length, this.pos = 0, this.view = new DataView(e.buffer, e.byteOffset, e.byteLength), this.textDecoder = t ?? new TextDecoder("utf-8", {
398
398
  fatal: !0,
399
399
  ignoreBOM: !0
400
400
  });
@@ -538,33 +538,33 @@ function E(i, e) {
538
538
  if (!i)
539
539
  throw new Error(e);
540
540
  }
541
- const ri = 34028234663852886e22, si = -34028234663852886e22, oi = 4294967295, ai = 2147483647, li = -2147483648;
541
+ const si = 34028234663852886e22, oi = -34028234663852886e22, ai = 4294967295, li = 2147483647, ci = -2147483648;
542
542
  function Ve(i) {
543
543
  if (typeof i != "number")
544
544
  throw new Error("invalid int 32: " + typeof i);
545
- if (!Number.isInteger(i) || i > ai || i < li)
545
+ if (!Number.isInteger(i) || i > li || i < ci)
546
546
  throw new Error("invalid int 32: " + i);
547
547
  }
548
- function Qe(i) {
548
+ function et(i) {
549
549
  if (typeof i != "number")
550
550
  throw new Error("invalid uint 32: " + typeof i);
551
- if (!Number.isInteger(i) || i > oi || i < 0)
551
+ if (!Number.isInteger(i) || i > ai || i < 0)
552
552
  throw new Error("invalid uint 32: " + i);
553
553
  }
554
- function mt(i) {
554
+ function gt(i) {
555
555
  if (typeof i != "number")
556
556
  throw new Error("invalid float 32: " + typeof i);
557
- if (Number.isFinite(i) && (i > ri || i < si))
557
+ if (Number.isFinite(i) && (i > si || i < oi))
558
558
  throw new Error("invalid float 32: " + i);
559
559
  }
560
- const Zt = {
560
+ const jt = {
561
561
  writeUnknownFields: !0,
562
- writerFactory: () => new di()
562
+ writerFactory: () => new hi()
563
563
  };
564
- function ci(i) {
565
- return i ? Object.assign(Object.assign({}, Zt), i) : Zt;
564
+ function di(i) {
565
+ return i ? Object.assign(Object.assign({}, jt), i) : jt;
566
566
  }
567
- class di {
567
+ class hi {
568
568
  constructor(e) {
569
569
  this.stack = [], this.textEncoder = e ?? new TextEncoder(), this.chunks = [], this.buf = [];
570
570
  }
@@ -620,7 +620,7 @@ class di {
620
620
  * Write a `uint32` value, an unsigned 32 bit varint.
621
621
  */
622
622
  uint32(e) {
623
- for (Qe(e); e > 127; )
623
+ for (et(e); e > 127; )
624
624
  this.buf.push(e & 127 | 128), e = e >>> 7;
625
625
  return this.buf.push(e), this;
626
626
  }
@@ -628,7 +628,7 @@ class di {
628
628
  * Write a `int32` value, a signed 32 bit varint.
629
629
  */
630
630
  int32(e) {
631
- return Ve(e), Wt(e, this.buf), this;
631
+ return Ve(e), Pt(e, this.buf), this;
632
632
  }
633
633
  /**
634
634
  * Write a `bool` value, a variant.
@@ -653,7 +653,7 @@ class di {
653
653
  * Write a `float` value, 32-bit floating point number.
654
654
  */
655
655
  float(e) {
656
- mt(e);
656
+ gt(e);
657
657
  let t = new Uint8Array(4);
658
658
  return new DataView(t.buffer).setFloat32(0, e, !0), this.raw(t);
659
659
  }
@@ -668,7 +668,7 @@ class di {
668
668
  * Write a `fixed32` value, an unsigned, fixed-length 32-bit integer.
669
669
  */
670
670
  fixed32(e) {
671
- Qe(e);
671
+ et(e);
672
672
  let t = new Uint8Array(4);
673
673
  return new DataView(t.buffer).setUint32(0, e, !0), this.raw(t);
674
674
  }
@@ -684,7 +684,7 @@ class di {
684
684
  * Write a `sint32` value, a signed, zigzag-encoded 32-bit varint.
685
685
  */
686
686
  sint32(e) {
687
- return Ve(e), e = (e << 1 ^ e >> 31) >>> 0, Wt(e, this.buf), this;
687
+ return Ve(e), e = (e << 1 ^ e >> 31) >>> 0, Pt(e, this.buf), this;
688
688
  }
689
689
  /**
690
690
  * Write a `fixed64` value, a signed, fixed-length 64-bit integer.
@@ -705,44 +705,44 @@ class di {
705
705
  */
706
706
  int64(e) {
707
707
  let t = U.from(e);
708
- return ot(t.lo, t.hi, this.buf), this;
708
+ return at(t.lo, t.hi, this.buf), this;
709
709
  }
710
710
  /**
711
711
  * Write a `sint64` value, a signed, zig-zag-encoded 64-bit varint.
712
712
  */
713
713
  sint64(e) {
714
714
  let t = U.from(e), n = t.hi >> 31, r = t.lo << 1 ^ n, s = (t.hi << 1 | t.lo >>> 31) ^ n;
715
- return ot(r, s, this.buf), this;
715
+ return at(r, s, this.buf), this;
716
716
  }
717
717
  /**
718
718
  * Write a `uint64` value, an unsigned 64-bit varint.
719
719
  */
720
720
  uint64(e) {
721
721
  let t = P.from(e);
722
- return ot(t.lo, t.hi, this.buf), this;
722
+ return at(t.lo, t.hi, this.buf), this;
723
723
  }
724
724
  }
725
- const jt = {
725
+ const qt = {
726
726
  emitDefaultValues: !1,
727
727
  enumAsInteger: !1,
728
728
  useProtoFieldName: !1,
729
729
  prettySpaces: 0
730
- }, qt = {
730
+ }, Kt = {
731
731
  ignoreUnknownFields: !1
732
732
  };
733
- function hi(i) {
734
- return i ? Object.assign(Object.assign({}, qt), i) : qt;
735
- }
736
733
  function ui(i) {
737
- return i ? Object.assign(Object.assign({}, jt), i) : jt;
734
+ return i ? Object.assign(Object.assign({}, Kt), i) : Kt;
735
+ }
736
+ function pi(i) {
737
+ return i ? Object.assign(Object.assign({}, qt), i) : qt;
738
738
  }
739
- function pi(i, e) {
739
+ function fi(i, e) {
740
740
  var t, n;
741
741
  let r = Object.assign(Object.assign({}, i), e);
742
742
  return r.typeRegistry = [...(t = i == null ? void 0 : i.typeRegistry) !== null && t !== void 0 ? t : [], ...(n = e == null ? void 0 : e.typeRegistry) !== null && n !== void 0 ? n : []], r;
743
743
  }
744
- const gn = Symbol.for("protobuf-ts/message-type");
745
- function ut(i) {
744
+ const wn = Symbol.for("protobuf-ts/message-type");
745
+ function pt(i) {
746
746
  let e = !1;
747
747
  const t = [];
748
748
  for (let n = 0; n < i.length; n++) {
@@ -759,15 +759,15 @@ var oe;
759
759
  (function(i) {
760
760
  i[i.BIGINT = 0] = "BIGINT", i[i.STRING = 1] = "STRING", i[i.NUMBER = 2] = "NUMBER";
761
761
  })(oe || (oe = {}));
762
- var et;
762
+ var tt;
763
763
  (function(i) {
764
764
  i[i.NO = 0] = "NO", i[i.PACKED = 1] = "PACKED", i[i.UNPACKED = 2] = "UNPACKED";
765
- })(et || (et = {}));
766
- function fi(i) {
765
+ })(tt || (tt = {}));
766
+ function mi(i) {
767
767
  var e, t, n, r;
768
- return i.localName = (e = i.localName) !== null && e !== void 0 ? e : ut(i.name), i.jsonName = (t = i.jsonName) !== null && t !== void 0 ? t : ut(i.name), i.repeat = (n = i.repeat) !== null && n !== void 0 ? n : et.NO, i.opt = (r = i.opt) !== null && r !== void 0 ? r : i.repeat || i.oneof ? !1 : i.kind == "message", i;
768
+ return i.localName = (e = i.localName) !== null && e !== void 0 ? e : pt(i.name), i.jsonName = (t = i.jsonName) !== null && t !== void 0 ? t : pt(i.name), i.repeat = (n = i.repeat) !== null && n !== void 0 ? n : tt.NO, i.opt = (r = i.opt) !== null && r !== void 0 ? r : i.repeat || i.oneof ? !1 : i.kind == "message", i;
769
769
  }
770
- function mi(i) {
770
+ function gi(i) {
771
771
  if (typeof i != "object" || i === null || !i.hasOwnProperty("oneofKind"))
772
772
  return !1;
773
773
  switch (typeof i.oneofKind) {
@@ -779,7 +779,7 @@ function mi(i) {
779
779
  return !1;
780
780
  }
781
781
  }
782
- class gi {
782
+ class wi {
783
783
  constructor(e) {
784
784
  var t;
785
785
  this.fields = (t = e.fields) !== null && t !== void 0 ? t : [];
@@ -839,7 +839,7 @@ class gi {
839
839
  return !0;
840
840
  for (const o of s.oneofs) {
841
841
  const a = e[o];
842
- if (!mi(a))
842
+ if (!gi(a))
843
843
  return !1;
844
844
  if (a.oneofKind === void 0)
845
845
  continue;
@@ -965,7 +965,7 @@ function ee(i, e) {
965
965
  return i.toString();
966
966
  }
967
967
  }
968
- class wi {
968
+ class bi {
969
969
  constructor(e) {
970
970
  this.info = e;
971
971
  }
@@ -981,7 +981,7 @@ class wi {
981
981
  // Cannot parse JSON <type of jsonValue> for <type name>#<fieldName>.
982
982
  assert(e, t, n) {
983
983
  if (!e) {
984
- let r = cn(n);
984
+ let r = dn(n);
985
985
  throw (r == "number" || r == "boolean") && (r = n.toString()), new Error(`Cannot parse JSON ${r} for ${this.info.typeName}#${t}`);
986
986
  }
987
987
  }
@@ -1019,7 +1019,7 @@ class wi {
1019
1019
  if (a.kind == "map") {
1020
1020
  if (o === null)
1021
1021
  continue;
1022
- this.assert(zn(o), a.name, o);
1022
+ this.assert(Yn(o), a.name, o);
1023
1023
  const h = c[l];
1024
1024
  for (const [g, w] of Object.entries(o)) {
1025
1025
  this.assert(w !== null, a.name + " map value", null);
@@ -1135,7 +1135,7 @@ class wi {
1135
1135
  s = "too large or small";
1136
1136
  break;
1137
1137
  }
1138
- return t == u.FLOAT && mt(o), o;
1138
+ return t == u.FLOAT && gt(o), o;
1139
1139
  case u.INT32:
1140
1140
  case u.FIXED32:
1141
1141
  case u.SFIXED32:
@@ -1146,7 +1146,7 @@ class wi {
1146
1146
  let a;
1147
1147
  if (typeof e == "number" ? a = e : e === "" ? s = "empty string" : typeof e == "string" && (e.trim().length !== e.length ? s = "extra whitespace" : a = Number(e)), a === void 0)
1148
1148
  break;
1149
- return t == u.UINT32 ? Qe(a) : Ve(a), a;
1149
+ return t == u.UINT32 ? et(a) : Ve(a), a;
1150
1150
  case u.INT64:
1151
1151
  case u.SFIXED64:
1152
1152
  case u.SINT64:
@@ -1187,7 +1187,7 @@ class wi {
1187
1187
  return new Uint8Array(0);
1188
1188
  if (typeof e != "string")
1189
1189
  break;
1190
- return dn(e);
1190
+ return hn(e);
1191
1191
  }
1192
1192
  } catch (o) {
1193
1193
  s = o.message;
@@ -1195,7 +1195,7 @@ class wi {
1195
1195
  this.assert(!1, r + (s ? " - " + s : ""), e);
1196
1196
  }
1197
1197
  }
1198
- class bi {
1198
+ class yi {
1199
1199
  constructor(e) {
1200
1200
  var t;
1201
1201
  this.fields = (t = e.fields) !== null && t !== void 0 ? t : [];
@@ -1319,9 +1319,9 @@ class bi {
1319
1319
  return t === 0 ? o ? 0 : void 0 : (Ve(t), t);
1320
1320
  case u.FIXED32:
1321
1321
  case u.UINT32:
1322
- return t === 0 ? o ? 0 : void 0 : (Qe(t), t);
1322
+ return t === 0 ? o ? 0 : void 0 : (et(t), t);
1323
1323
  case u.FLOAT:
1324
- mt(t);
1324
+ gt(t);
1325
1325
  case u.DOUBLE:
1326
1326
  return t === 0 ? o ? 0 : void 0 : (E(typeof t == "number"), Number.isNaN(t) ? "NaN" : t === Number.POSITIVE_INFINITY ? "Infinity" : t === Number.NEGATIVE_INFINITY ? "-Infinity" : t);
1327
1327
  case u.STRING:
@@ -1340,11 +1340,11 @@ class bi {
1340
1340
  let l = U.from(t);
1341
1341
  return l.isZero() && !o ? void 0 : l.toString();
1342
1342
  case u.BYTES:
1343
- return E(t instanceof Uint8Array), t.byteLength ? hn(t) : o ? "" : void 0;
1343
+ return E(t instanceof Uint8Array), t.byteLength ? un(t) : o ? "" : void 0;
1344
1344
  }
1345
1345
  }
1346
1346
  }
1347
- function pt(i, e = oe.STRING) {
1347
+ function ft(i, e = oe.STRING) {
1348
1348
  switch (i) {
1349
1349
  case u.BOOL:
1350
1350
  return !1;
@@ -1366,7 +1366,7 @@ function pt(i, e = oe.STRING) {
1366
1366
  return 0;
1367
1367
  }
1368
1368
  }
1369
- class yi {
1369
+ class Ci {
1370
1370
  constructor(e) {
1371
1371
  this.info = e;
1372
1372
  }
@@ -1460,13 +1460,13 @@ class yi {
1460
1460
  }
1461
1461
  }
1462
1462
  if (o === void 0) {
1463
- let l = pt(e.K);
1463
+ let l = ft(e.K);
1464
1464
  o = e.K == u.BOOL ? l.toString() : l;
1465
1465
  }
1466
1466
  if (a === void 0)
1467
1467
  switch (e.V.kind) {
1468
1468
  case "scalar":
1469
- a = pt(e.V.T, e.V.L);
1469
+ a = ft(e.V.T, e.V.L);
1470
1470
  break;
1471
1471
  case "enum":
1472
1472
  a = 0;
@@ -1512,7 +1512,7 @@ class yi {
1512
1512
  }
1513
1513
  }
1514
1514
  }
1515
- class Ci {
1515
+ class Ei {
1516
1516
  constructor(e) {
1517
1517
  this.info = e;
1518
1518
  }
@@ -1541,7 +1541,7 @@ class Ci {
1541
1541
  case "enum":
1542
1542
  let h = s.kind == "enum" ? u.INT32 : s.T;
1543
1543
  if (l)
1544
- if (E(Array.isArray(o)), l == et.PACKED)
1544
+ if (E(Array.isArray(o)), l == tt.PACKED)
1545
1545
  this.packed(t, h, s.no, o);
1546
1546
  else
1547
1547
  for (const g of o)
@@ -1678,8 +1678,8 @@ class Ci {
1678
1678
  return [n, r, s || o];
1679
1679
  }
1680
1680
  }
1681
- function Ei(i) {
1682
- const e = i.messagePrototype ? Object.create(i.messagePrototype) : Object.defineProperty({}, gn, { value: i });
1681
+ function Ni(i) {
1682
+ const e = i.messagePrototype ? Object.create(i.messagePrototype) : Object.defineProperty({}, wn, { value: i });
1683
1683
  for (let t of i.fields) {
1684
1684
  let n = t.localName;
1685
1685
  if (!t.opt)
@@ -1690,7 +1690,7 @@ function Ei(i) {
1690
1690
  else
1691
1691
  switch (t.kind) {
1692
1692
  case "scalar":
1693
- e[n] = pt(t.T, t.L);
1693
+ e[n] = ft(t.T, t.L);
1694
1694
  break;
1695
1695
  case "enum":
1696
1696
  e[n] = 0;
@@ -1748,7 +1748,7 @@ function M(i, e, t) {
1748
1748
  }
1749
1749
  }
1750
1750
  }
1751
- function Ni(i, e, t) {
1751
+ function ki(i, e, t) {
1752
1752
  if (e === t)
1753
1753
  return !0;
1754
1754
  if (!e || !t)
@@ -1759,24 +1759,24 @@ function Ni(i, e, t) {
1759
1759
  case "enum":
1760
1760
  case "scalar":
1761
1761
  let a = n.kind == "enum" ? u.INT32 : n.T;
1762
- if (!(n.repeat ? Kt(a, s, o) : wn(a, s, o)))
1762
+ if (!(n.repeat ? Xt(a, s, o) : bn(a, s, o)))
1763
1763
  return !1;
1764
1764
  break;
1765
1765
  case "map":
1766
- if (!(n.V.kind == "message" ? Xt(n.V.T(), Ke(s), Ke(o)) : Kt(n.V.kind == "enum" ? u.INT32 : n.V.T, Ke(s), Ke(o))))
1766
+ if (!(n.V.kind == "message" ? Gt(n.V.T(), Xe(s), Xe(o)) : Xt(n.V.kind == "enum" ? u.INT32 : n.V.T, Xe(s), Xe(o))))
1767
1767
  return !1;
1768
1768
  break;
1769
1769
  case "message":
1770
1770
  let l = n.T();
1771
- if (!(n.repeat ? Xt(l, s, o) : l.equals(s, o)))
1771
+ if (!(n.repeat ? Gt(l, s, o) : l.equals(s, o)))
1772
1772
  return !1;
1773
1773
  break;
1774
1774
  }
1775
1775
  }
1776
1776
  return !0;
1777
1777
  }
1778
- const Ke = Object.values;
1779
- function wn(i, e, t) {
1778
+ const Xe = Object.values;
1779
+ function bn(i, e, t) {
1780
1780
  if (e === t)
1781
1781
  return !0;
1782
1782
  if (i !== u.BYTES)
@@ -1789,15 +1789,15 @@ function wn(i, e, t) {
1789
1789
  return !1;
1790
1790
  return !0;
1791
1791
  }
1792
- function Kt(i, e, t) {
1792
+ function Xt(i, e, t) {
1793
1793
  if (e.length !== t.length)
1794
1794
  return !1;
1795
1795
  for (let n = 0; n < e.length; n++)
1796
- if (!wn(i, e[n], t[n]))
1796
+ if (!bn(i, e[n], t[n]))
1797
1797
  return !1;
1798
1798
  return !0;
1799
1799
  }
1800
- function Xt(i, e, t) {
1800
+ function Gt(i, e, t) {
1801
1801
  if (e.length !== t.length)
1802
1802
  return !1;
1803
1803
  for (let n = 0; n < e.length; n++)
@@ -1805,13 +1805,13 @@ function Xt(i, e, t) {
1805
1805
  return !1;
1806
1806
  return !0;
1807
1807
  }
1808
- const ki = Object.getOwnPropertyDescriptors(Object.getPrototypeOf({}));
1808
+ const Fi = Object.getOwnPropertyDescriptors(Object.getPrototypeOf({}));
1809
1809
  class Z {
1810
1810
  constructor(e, t, n) {
1811
- this.defaultCheckDepth = 16, this.typeName = e, this.fields = t.map(fi), this.options = n ?? {}, this.messagePrototype = Object.create(null, Object.assign(Object.assign({}, ki), { [gn]: { value: this } })), this.refTypeCheck = new gi(this), this.refJsonReader = new wi(this), this.refJsonWriter = new bi(this), this.refBinReader = new yi(this), this.refBinWriter = new Ci(this);
1811
+ this.defaultCheckDepth = 16, this.typeName = e, this.fields = t.map(mi), this.options = n ?? {}, this.messagePrototype = Object.create(null, Object.assign(Object.assign({}, Fi), { [wn]: { value: this } })), this.refTypeCheck = new wi(this), this.refJsonReader = new bi(this), this.refJsonWriter = new yi(this), this.refBinReader = new Ci(this), this.refBinWriter = new Ei(this);
1812
1812
  }
1813
1813
  create(e) {
1814
- let t = Ei(this);
1814
+ let t = Ni(this);
1815
1815
  return e !== void 0 && M(this, t, e), t;
1816
1816
  }
1817
1817
  /**
@@ -1830,7 +1830,7 @@ class Z {
1830
1830
  * Will also return true if both messages are `undefined`.
1831
1831
  */
1832
1832
  equals(e, t) {
1833
- return Ni(this, e, t);
1833
+ return ki(this, e, t);
1834
1834
  }
1835
1835
  /**
1836
1836
  * Is the given value assignable to our message type
@@ -1856,14 +1856,14 @@ class Z {
1856
1856
  * Create a new message from binary format.
1857
1857
  */
1858
1858
  fromBinary(e, t) {
1859
- let n = ni(t);
1859
+ let n = ii(t);
1860
1860
  return this.internalBinaryRead(n.readerFactory(e), e.byteLength, n);
1861
1861
  }
1862
1862
  /**
1863
1863
  * Read a new message from a JSON value.
1864
1864
  */
1865
1865
  fromJson(e, t) {
1866
- return this.internalJsonRead(e, hi(t));
1866
+ return this.internalJsonRead(e, ui(t));
1867
1867
  }
1868
1868
  /**
1869
1869
  * Read a new message from a JSON string.
@@ -1877,7 +1877,7 @@ class Z {
1877
1877
  * Write the message to canonical JSON value.
1878
1878
  */
1879
1879
  toJson(e, t) {
1880
- return this.internalJsonWrite(e, ui(t));
1880
+ return this.internalJsonWrite(e, pi(t));
1881
1881
  }
1882
1882
  /**
1883
1883
  * Convert the message to canonical JSON string.
@@ -1892,7 +1892,7 @@ class Z {
1892
1892
  * Write the message to binary format.
1893
1893
  */
1894
1894
  toBinary(e, t) {
1895
- let n = ci(t);
1895
+ let n = di(t);
1896
1896
  return this.internalBinaryWrite(e, n.writerFactory(), n).finish();
1897
1897
  }
1898
1898
  /**
@@ -1908,7 +1908,7 @@ class Z {
1908
1908
  let r = n ?? this.create();
1909
1909
  return this.refJsonReader.read(e, r, t), r;
1910
1910
  }
1911
- throw new Error(`Unable to parse message ${this.typeName} from JSON ${cn(e)}.`);
1911
+ throw new Error(`Unable to parse message ${this.typeName} from JSON ${dn(e)}.`);
1912
1912
  }
1913
1913
  /**
1914
1914
  * This is an internal method. If you just want to write a message
@@ -1942,14 +1942,14 @@ class Z {
1942
1942
  return this.refBinReader.read(e, s, n, t), s;
1943
1943
  }
1944
1944
  }
1945
- function Fi(i, e) {
1945
+ function Ii(i, e) {
1946
1946
  var t, n, r;
1947
1947
  let s = i;
1948
- return s.service = e, s.localName = (t = s.localName) !== null && t !== void 0 ? t : ut(s.name), s.serverStreaming = !!s.serverStreaming, s.clientStreaming = !!s.clientStreaming, s.options = (n = s.options) !== null && n !== void 0 ? n : {}, s.idempotency = (r = s.idempotency) !== null && r !== void 0 ? r : void 0, s;
1948
+ return s.service = e, s.localName = (t = s.localName) !== null && t !== void 0 ? t : pt(s.name), s.serverStreaming = !!s.serverStreaming, s.clientStreaming = !!s.clientStreaming, s.options = (n = s.options) !== null && n !== void 0 ? n : {}, s.idempotency = (r = s.idempotency) !== null && r !== void 0 ? r : void 0, s;
1949
1949
  }
1950
- class gt {
1950
+ class wt {
1951
1951
  constructor(e, t, n) {
1952
- this.typeName = e, this.methods = t.map((r) => Fi(r, this)), this.options = n ?? {};
1952
+ this.typeName = e, this.methods = t.map((r) => Ii(r, this)), this.options = n ?? {};
1953
1953
  }
1954
1954
  }
1955
1955
  class A extends Error {
@@ -1969,22 +1969,22 @@ class A extends Error {
1969
1969
  `);
1970
1970
  }
1971
1971
  }
1972
- function Ii(i, e) {
1972
+ function Li(i, e) {
1973
1973
  if (!e)
1974
1974
  return i;
1975
1975
  let t = {};
1976
- Xe(i, t), Xe(e, t);
1976
+ Ge(i, t), Ge(e, t);
1977
1977
  for (let n of Object.keys(e)) {
1978
1978
  let r = e[n];
1979
1979
  switch (n) {
1980
1980
  case "jsonOptions":
1981
- t.jsonOptions = pi(i.jsonOptions, t.jsonOptions);
1981
+ t.jsonOptions = fi(i.jsonOptions, t.jsonOptions);
1982
1982
  break;
1983
1983
  case "binaryOptions":
1984
- t.binaryOptions = Yn(i.binaryOptions, t.binaryOptions);
1984
+ t.binaryOptions = Qn(i.binaryOptions, t.binaryOptions);
1985
1985
  break;
1986
1986
  case "meta":
1987
- t.meta = {}, Xe(i.meta, t.meta), Xe(e.meta, t.meta);
1987
+ t.meta = {}, Ge(i.meta, t.meta), Ge(e.meta, t.meta);
1988
1988
  break;
1989
1989
  case "interceptors":
1990
1990
  t.interceptors = i.interceptors ? i.interceptors.concat(r) : r.concat();
@@ -1993,7 +1993,7 @@ function Ii(i, e) {
1993
1993
  }
1994
1994
  return t;
1995
1995
  }
1996
- function Xe(i, e) {
1996
+ function Ge(i, e) {
1997
1997
  if (!i)
1998
1998
  return;
1999
1999
  let t = e;
@@ -2064,7 +2064,7 @@ class ge {
2064
2064
  this._state === J.PENDING && this.reject(e);
2065
2065
  }
2066
2066
  }
2067
- class Li {
2067
+ class Ai {
2068
2068
  constructor() {
2069
2069
  this._lis = {
2070
2070
  nxt: [],
@@ -2171,7 +2171,7 @@ class Li {
2171
2171
  t.q.push(e);
2172
2172
  }
2173
2173
  }
2174
- var Ai = function(i, e, t, n) {
2174
+ var Ti = function(i, e, t, n) {
2175
2175
  function r(s) {
2176
2176
  return s instanceof t ? s : new t(function(o) {
2177
2177
  o(s);
@@ -2198,7 +2198,7 @@ var Ai = function(i, e, t, n) {
2198
2198
  c((n = n.apply(i, e || [])).next());
2199
2199
  });
2200
2200
  };
2201
- class Ti {
2201
+ class vi {
2202
2202
  constructor(e, t, n, r, s, o, a) {
2203
2203
  this.method = e, this.requestHeaders = t, this.request = n, this.headers = r, this.response = s, this.status = o, this.trailers = a;
2204
2204
  }
@@ -2210,7 +2210,7 @@ class Ti {
2210
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
- return Ai(this, void 0, void 0, function* () {
2213
+ return Ti(this, void 0, void 0, function* () {
2214
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,
@@ -2224,7 +2224,7 @@ class Ti {
2224
2224
  });
2225
2225
  }
2226
2226
  }
2227
- var vi = function(i, e, t, n) {
2227
+ var Bi = function(i, e, t, n) {
2228
2228
  function r(s) {
2229
2229
  return s instanceof t ? s : new t(function(o) {
2230
2230
  o(s);
@@ -2251,7 +2251,7 @@ var vi = function(i, e, t, n) {
2251
2251
  c((n = n.apply(i, e || [])).next());
2252
2252
  });
2253
2253
  };
2254
- class Bi {
2254
+ class xi {
2255
2255
  constructor(e, t, n, r, s, o, a) {
2256
2256
  this.method = e, this.requestHeaders = t, this.request = n, this.headers = r, this.responses = s, this.status = o, this.trailers = a;
2257
2257
  }
@@ -2265,7 +2265,7 @@ class Bi {
2265
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
- return vi(this, void 0, void 0, function* () {
2268
+ return Bi(this, void 0, void 0, function* () {
2269
2269
  let [e, t, n] = yield Promise.all([this.headers, this.status, this.trailers]);
2270
2270
  return {
2271
2271
  method: this.method,
@@ -2293,7 +2293,7 @@ var f;
2293
2293
  (function(i) {
2294
2294
  i[i.OK = 0] = "OK", i[i.CANCELLED = 1] = "CANCELLED", i[i.UNKNOWN = 2] = "UNKNOWN", i[i.INVALID_ARGUMENT = 3] = "INVALID_ARGUMENT", i[i.DEADLINE_EXCEEDED = 4] = "DEADLINE_EXCEEDED", i[i.NOT_FOUND = 5] = "NOT_FOUND", i[i.ALREADY_EXISTS = 6] = "ALREADY_EXISTS", i[i.PERMISSION_DENIED = 7] = "PERMISSION_DENIED", i[i.UNAUTHENTICATED = 16] = "UNAUTHENTICATED", i[i.RESOURCE_EXHAUSTED = 8] = "RESOURCE_EXHAUSTED", i[i.FAILED_PRECONDITION = 9] = "FAILED_PRECONDITION", i[i.ABORTED = 10] = "ABORTED", i[i.OUT_OF_RANGE = 11] = "OUT_OF_RANGE", i[i.UNIMPLEMENTED = 12] = "UNIMPLEMENTED", i[i.INTERNAL = 13] = "INTERNAL", i[i.UNAVAILABLE = 14] = "UNAVAILABLE", i[i.DATA_LOSS = 15] = "DATA_LOSS";
2295
2295
  })(f || (f = {}));
2296
- var xi = function(i, e, t, n) {
2296
+ var Oi = function(i, e, t, n) {
2297
2297
  function r(s) {
2298
2298
  return s instanceof t ? s : new t(function(o) {
2299
2299
  o(s);
@@ -2320,7 +2320,7 @@ var xi = function(i, e, t, n) {
2320
2320
  c((n = n.apply(i, e || [])).next());
2321
2321
  });
2322
2322
  };
2323
- function Gt(i, e, t, n, r) {
2323
+ function Jt(i, e, t, n, r) {
2324
2324
  if (n)
2325
2325
  for (let [s, o] of Object.entries(n))
2326
2326
  if (typeof o == "string")
@@ -2340,14 +2340,14 @@ function Gt(i, e, t, n, r) {
2340
2340
  }
2341
2341
  return i;
2342
2342
  }
2343
- function Jt(i, e) {
2343
+ function zt(i, e) {
2344
2344
  let t = new Uint8Array(5 + i.length);
2345
2345
  t[0] = te.DATA;
2346
2346
  for (let n = i.length, r = 4; r > 0; r--)
2347
2347
  t[r] = n % 256, n >>>= 8;
2348
- return t.set(i, 5), e === "binary" ? t : hn(t);
2348
+ return t.set(i, 5), e === "binary" ? t : un(t);
2349
2349
  }
2350
- function ft(i, e, t) {
2350
+ function mt(i, e, t) {
2351
2351
  if (arguments.length === 1) {
2352
2352
  let l = i, c;
2353
2353
  try {
@@ -2360,23 +2360,23 @@ function ft(i, e, t) {
2360
2360
  case "opaqueredirect":
2361
2361
  throw new A(`fetch response type ${l.type}`, f[f.UNKNOWN]);
2362
2362
  }
2363
- return ft(Si(l.headers), l.status, l.statusText);
2363
+ return mt(Ui(l.headers), l.status, l.statusText);
2364
2364
  }
2365
- let n = i, r = e >= 200 && e < 300, s = yn(n), [o, a] = bn(n);
2366
- return (o === void 0 || o === f.OK) && !r && (o = Ui(e), a = t), [o, a, s];
2365
+ let n = i, r = e >= 200 && e < 300, s = Cn(n), [o, a] = yn(n);
2366
+ return (o === void 0 || o === f.OK) && !r && (o = Ri(e), a = t), [o, a, s];
2367
2367
  }
2368
- function zt(i) {
2369
- let e = Di(i), [t, n] = bn(e), r = yn(e);
2368
+ function Yt(i) {
2369
+ let e = Si(i), [t, n] = yn(e), r = Cn(e);
2370
2370
  return [t ?? f.OK, n, r];
2371
2371
  }
2372
2372
  var te;
2373
2373
  (function(i) {
2374
2374
  i[i.DATA = 0] = "DATA", i[i.TRAILER = 128] = "TRAILER";
2375
2375
  })(te || (te = {}));
2376
- function Yt(i, e, t) {
2377
- return xi(this, void 0, void 0, function* () {
2378
- let n, r = "", s = new Uint8Array(0), o = _i(e);
2379
- if (Oi(i)) {
2376
+ function Qt(i, e, t) {
2377
+ return Oi(this, void 0, void 0, function* () {
2378
+ let n, r = "", s = new Uint8Array(0), o = Di(e);
2379
+ if (_i(i)) {
2380
2380
  let a = i.getReader();
2381
2381
  n = {
2382
2382
  next: () => a.read()
@@ -2392,9 +2392,9 @@ function Yt(i, e, t) {
2392
2392
  let l = r.length - r.length % 4;
2393
2393
  if (l === 0)
2394
2394
  continue;
2395
- s = Qt(s, dn(r.substring(0, l))), r = r.substring(l);
2395
+ s = en(s, hn(r.substring(0, l))), r = r.substring(l);
2396
2396
  } else
2397
- s = Qt(s, a.value);
2397
+ s = en(s, a.value);
2398
2398
  for (; s.length >= 5 && s[0] === te.DATA; ) {
2399
2399
  let l = 0;
2400
2400
  for (let c = 1; c < 5; c++)
@@ -2416,12 +2416,12 @@ function Yt(i, e, t) {
2416
2416
  }
2417
2417
  });
2418
2418
  }
2419
- const Oi = (i) => typeof i.getReader == "function";
2420
- function Qt(i, e) {
2419
+ const _i = (i) => typeof i.getReader == "function";
2420
+ function en(i, e) {
2421
2421
  let t = new Uint8Array(i.length + e.length);
2422
2422
  return t.set(i), t.set(e, i.length), t;
2423
2423
  }
2424
- function _i(i) {
2424
+ function Di(i) {
2425
2425
  switch (i) {
2426
2426
  case "application/grpc-web-text":
2427
2427
  case "application/grpc-web-text+proto":
@@ -2436,7 +2436,7 @@ function _i(i) {
2436
2436
  throw new A("unexpected response content type: " + i, f[f.INTERNAL]);
2437
2437
  }
2438
2438
  }
2439
- function bn(i) {
2439
+ function yn(i) {
2440
2440
  let e, t, n = i["grpc-message"];
2441
2441
  if (n !== void 0) {
2442
2442
  if (Array.isArray(n))
@@ -2452,7 +2452,7 @@ function bn(i) {
2452
2452
  }
2453
2453
  return [e, t];
2454
2454
  }
2455
- function yn(i) {
2455
+ function Cn(i) {
2456
2456
  let e = {};
2457
2457
  for (let [t, n] of Object.entries(i))
2458
2458
  switch (t) {
@@ -2465,7 +2465,7 @@ function yn(i) {
2465
2465
  }
2466
2466
  return e;
2467
2467
  }
2468
- function Di(i) {
2468
+ function Si(i) {
2469
2469
  let e = {};
2470
2470
  for (let t of String.fromCharCode.apply(String, i).trim().split(`\r
2471
2471
  `)) {
@@ -2479,14 +2479,14 @@ function Di(i) {
2479
2479
  }
2480
2480
  return e;
2481
2481
  }
2482
- function Si(i) {
2482
+ function Ui(i) {
2483
2483
  let e = {};
2484
2484
  return i.forEach((t, n) => {
2485
2485
  let r = e[n];
2486
2486
  typeof r == "string" ? e[n] = [r, t] : Array.isArray(r) ? r.push(t) : e[n] = t;
2487
2487
  }), e;
2488
2488
  }
2489
- function Ui(i) {
2489
+ function Ri(i) {
2490
2490
  switch (i) {
2491
2491
  case 200:
2492
2492
  return f.OK;
@@ -2518,12 +2518,12 @@ function Ui(i) {
2518
2518
  return f.UNKNOWN;
2519
2519
  }
2520
2520
  }
2521
- class Ri {
2521
+ class Mi {
2522
2522
  constructor(e) {
2523
2523
  this.defaultOptions = e;
2524
2524
  }
2525
2525
  mergeOptions(e) {
2526
- return Ii(this.defaultOptions, e);
2526
+ return Li(this.defaultOptions, e);
2527
2527
  }
2528
2528
  /**
2529
2529
  * Create an URI for a gRPC web call.
@@ -2555,15 +2555,15 @@ class Ri {
2555
2555
  }
2556
2556
  serverStreaming(e, t, n) {
2557
2557
  var r, s, o, a;
2558
- let l = n, c = (r = l.format) !== null && r !== void 0 ? r : "text", h = (s = l.fetchInit) !== null && s !== void 0 ? s : {}, g = this.makeUrl(e, l), w = e.I.toBinary(t, l.binaryOptions), F = new ge(), v = new Li(), H = !0, I, $ = new ge(), W, z = new ge();
2558
+ let l = n, c = (r = l.format) !== null && r !== void 0 ? r : "text", h = (s = l.fetchInit) !== null && s !== void 0 ? s : {}, g = this.makeUrl(e, l), w = e.I.toBinary(t, l.binaryOptions), F = new ge(), v = new Ai(), H = !0, I, $ = new ge(), W, z = new ge();
2559
2559
  return globalThis.fetch(g, Object.assign(Object.assign({}, h), {
2560
2560
  method: "POST",
2561
- headers: Gt(new globalThis.Headers(), c, l.timeout, l.meta),
2562
- body: Jt(w, c),
2561
+ headers: Jt(new globalThis.Headers(), c, l.timeout, l.meta),
2562
+ body: zt(w, c),
2563
2563
  signal: (o = n.abort) !== null && o !== void 0 ? o : null
2564
2564
  // node-fetch@3.0.0-beta.9 rejects `undefined`
2565
2565
  })).then((C) => {
2566
- let [y, _, j] = ft(C);
2566
+ let [y, _, j] = mt(C);
2567
2567
  if (F.resolve(j), y != null && y !== f.OK)
2568
2568
  throw new A(_ ?? f[y], f[y], j);
2569
2569
  return y != null && (I = {
@@ -2573,14 +2573,14 @@ class Ri {
2573
2573
  }).then((C) => {
2574
2574
  if (!C.body)
2575
2575
  throw new A("missing response body", f[f.INTERNAL]);
2576
- return Yt(C.body, C.headers.get("content-type"), (y, _) => {
2576
+ return Qt(C.body, C.headers.get("content-type"), (y, _) => {
2577
2577
  switch (y) {
2578
2578
  case te.DATA:
2579
2579
  v.notifyMessage(e.O.fromBinary(_, l.binaryOptions)), H = !1;
2580
2580
  break;
2581
2581
  case te.TRAILER:
2582
2582
  let j, Y;
2583
- [j, Y, W] = zt(_), I = {
2583
+ [j, Y, W] = Yt(_), I = {
2584
2584
  code: f[j],
2585
2585
  detail: Y ?? f[j]
2586
2586
  };
@@ -2598,19 +2598,19 @@ class Ri {
2598
2598
  }).catch((C) => {
2599
2599
  let y;
2600
2600
  C instanceof A ? y = C : C instanceof Error && C.name === "AbortError" ? y = new A(C.message, f[f.CANCELLED]) : y = new A(C instanceof Error ? C.message : "" + C, f[f.INTERNAL]), y.methodName = e.name, y.serviceName = e.service.typeName, F.rejectPending(y), v.notifyError(y), $.rejectPending(y), z.rejectPending(y);
2601
- }), new Bi(e, (a = l.meta) !== null && a !== void 0 ? a : {}, t, F.promise, v, $.promise, z.promise);
2601
+ }), new xi(e, (a = l.meta) !== null && a !== void 0 ? a : {}, t, F.promise, v, $.promise, z.promise);
2602
2602
  }
2603
2603
  unary(e, t, n) {
2604
2604
  var r, s, o, a;
2605
2605
  let l = n, c = (r = l.format) !== null && r !== void 0 ? r : "text", h = (s = l.fetchInit) !== null && s !== void 0 ? s : {}, g = this.makeUrl(e, l), w = e.I.toBinary(t, l.binaryOptions), F = new ge(), v, H = new ge(), I, $ = new ge(), W, z = new ge();
2606
2606
  return globalThis.fetch(g, Object.assign(Object.assign({}, h), {
2607
2607
  method: "POST",
2608
- headers: Gt(new globalThis.Headers(), c, l.timeout, l.meta),
2609
- body: Jt(w, c),
2608
+ headers: Jt(new globalThis.Headers(), c, l.timeout, l.meta),
2609
+ body: zt(w, c),
2610
2610
  signal: (o = n.abort) !== null && o !== void 0 ? o : null
2611
2611
  // node-fetch@3.0.0-beta.9 rejects `undefined`
2612
2612
  })).then((C) => {
2613
- let [y, _, j] = ft(C);
2613
+ let [y, _, j] = mt(C);
2614
2614
  if (F.resolve(j), y != null && y !== f.OK)
2615
2615
  throw new A(_ ?? f[y], f[y], j);
2616
2616
  return y != null && (I = {
@@ -2620,7 +2620,7 @@ class Ri {
2620
2620
  }).then((C) => {
2621
2621
  if (!C.body)
2622
2622
  throw new A("missing response body", f[f.INTERNAL]);
2623
- return Yt(C.body, C.headers.get("content-type"), (y, _) => {
2623
+ return Qt(C.body, C.headers.get("content-type"), (y, _) => {
2624
2624
  switch (y) {
2625
2625
  case te.DATA:
2626
2626
  if (v)
@@ -2629,7 +2629,7 @@ class Ri {
2629
2629
  break;
2630
2630
  case te.TRAILER:
2631
2631
  let j, Y;
2632
- [j, Y, W] = zt(_), I = {
2632
+ [j, Y, W] = Yt(_), I = {
2633
2633
  code: f[j],
2634
2634
  detail: Y ?? f[j]
2635
2635
  };
@@ -2651,11 +2651,11 @@ class Ri {
2651
2651
  }).catch((C) => {
2652
2652
  let y;
2653
2653
  C instanceof A ? y = C : C instanceof Error && C.name === "AbortError" ? y = new A(C.message, f[f.CANCELLED]) : y = new A(C instanceof Error ? C.message : "" + C, f[f.INTERNAL]), y.methodName = e.name, y.serviceName = e.service.typeName, F.rejectPending(y), H.rejectPending(y), $.rejectPending(y), z.rejectPending(y);
2654
- }), new Ti(e, (a = l.meta) !== null && a !== void 0 ? a : {}, t, F.promise, H.promise, $.promise, z.promise);
2654
+ }), new vi(e, (a = l.meta) !== null && a !== void 0 ? a : {}, t, F.promise, H.promise, $.promise, z.promise);
2655
2655
  }
2656
2656
  }
2657
- var wt = /* @__PURE__ */ ((i) => (i[i.IMAGE = 0] = "IMAGE", i[i.AUDIO = 1] = "AUDIO", i[i.VIDEO = 2] = "VIDEO", i[i.ALL = 3] = "ALL", i[i.FOLDER = 4] = "FOLDER", i))(wt || {});
2658
- class Mi extends Z {
2657
+ var bt = /* @__PURE__ */ ((i) => (i[i.IMAGE = 0] = "IMAGE", i[i.AUDIO = 1] = "AUDIO", i[i.VIDEO = 2] = "VIDEO", i[i.ALL = 3] = "ALL", i[i.FOLDER = 4] = "FOLDER", i))(bt || {});
2658
+ class Vi extends Z {
2659
2659
  constructor() {
2660
2660
  super("com.hamropatro.grpc.cms.SearchRequest", [
2661
2661
  {
@@ -2718,8 +2718,8 @@ class Mi extends Z {
2718
2718
  return r !== !1 && (r == !0 ? N.onWrite : r)(this.typeName, e, t), t;
2719
2719
  }
2720
2720
  }
2721
- const Cn = new Mi();
2722
- class Vi extends Z {
2721
+ const En = new Vi();
2722
+ class Hi extends Z {
2723
2723
  constructor() {
2724
2724
  super("com.hamropatro.grpc.cms.SearchResult", [
2725
2725
  { no: 1, name: "items", kind: "message", repeat: 1, T: () => ae },
@@ -2767,8 +2767,8 @@ class Vi extends Z {
2767
2767
  return r !== !1 && (r == !0 ? N.onWrite : r)(this.typeName, e, t), t;
2768
2768
  }
2769
2769
  }
2770
- const Hi = new Vi();
2771
- class $i extends Z {
2770
+ const $i = new Hi();
2771
+ class Wi extends Z {
2772
2772
  constructor() {
2773
2773
  super("com.hamropatro.grpc.cms.CreateFileRequest", [
2774
2774
  {
@@ -2799,7 +2799,7 @@ class $i extends Z {
2799
2799
  T: 9
2800
2800
  /*ScalarType.STRING*/
2801
2801
  },
2802
- { no: 5, name: "type", kind: "enum", T: () => ["com.hamropatro.grpc.cms.FileType", wt] }
2802
+ { no: 5, name: "type", kind: "enum", T: () => ["com.hamropatro.grpc.cms.FileType", bt] }
2803
2803
  ]);
2804
2804
  }
2805
2805
  create(e) {
@@ -2847,8 +2847,8 @@ class $i extends Z {
2847
2847
  return r !== !1 && (r == !0 ? N.onWrite : r)(this.typeName, e, t), t;
2848
2848
  }
2849
2849
  }
2850
- const En = new $i();
2851
- class Wi extends Z {
2850
+ const Nn = new Wi();
2851
+ class Pi extends Z {
2852
2852
  constructor() {
2853
2853
  super("com.hamropatro.grpc.cms.File", [
2854
2854
  {
@@ -2900,8 +2900,8 @@ class Wi extends Z {
2900
2900
  T: 9
2901
2901
  /*ScalarType.STRING*/
2902
2902
  },
2903
- { no: 8, name: "type", kind: "enum", T: () => ["com.hamropatro.grpc.cms.FileType", wt] },
2904
- { no: 9, name: "metadata", kind: "message", T: () => at }
2903
+ { no: 8, name: "type", kind: "enum", T: () => ["com.hamropatro.grpc.cms.FileType", bt] },
2904
+ { no: 9, name: "metadata", kind: "message", T: () => lt }
2905
2905
  ]);
2906
2906
  }
2907
2907
  create(e) {
@@ -2947,7 +2947,7 @@ class Wi extends Z {
2947
2947
  break;
2948
2948
  case /* com.hamropatro.grpc.cms.FileMetadata metadata */
2949
2949
  9:
2950
- s.metadata = at.internalBinaryRead(e, e.uint32(), n, s.metadata);
2950
+ s.metadata = lt.internalBinaryRead(e, e.uint32(), n, s.metadata);
2951
2951
  break;
2952
2952
  default:
2953
2953
  let c = n.readUnknownField;
@@ -2960,13 +2960,13 @@ class Wi extends Z {
2960
2960
  return s;
2961
2961
  }
2962
2962
  internalBinaryWrite(e, t, n) {
2963
- e.key !== "" && t.tag(1, m.LengthDelimited).string(e.key), e.name !== "" && t.tag(2, m.LengthDelimited).string(e.name), e.folderName !== "" && t.tag(3, m.LengthDelimited).string(e.folderName), e.nestedFolderName !== "" && t.tag(4, m.LengthDelimited).string(e.nestedFolderName), e.url !== "" && t.tag(5, m.LengthDelimited).string(e.url), e.thumborUrl !== "" && t.tag(6, m.LengthDelimited).string(e.thumborUrl), e.proxyUrl !== "" && t.tag(7, m.LengthDelimited).string(e.proxyUrl), e.type !== 0 && t.tag(8, m.Varint).int32(e.type), e.metadata && at.internalBinaryWrite(e.metadata, t.tag(9, m.LengthDelimited).fork(), n).join();
2963
+ e.key !== "" && t.tag(1, m.LengthDelimited).string(e.key), e.name !== "" && t.tag(2, m.LengthDelimited).string(e.name), e.folderName !== "" && t.tag(3, m.LengthDelimited).string(e.folderName), e.nestedFolderName !== "" && t.tag(4, m.LengthDelimited).string(e.nestedFolderName), e.url !== "" && t.tag(5, m.LengthDelimited).string(e.url), e.thumborUrl !== "" && t.tag(6, m.LengthDelimited).string(e.thumborUrl), e.proxyUrl !== "" && t.tag(7, m.LengthDelimited).string(e.proxyUrl), e.type !== 0 && t.tag(8, m.Varint).int32(e.type), e.metadata && lt.internalBinaryWrite(e.metadata, t.tag(9, m.LengthDelimited).fork(), n).join();
2964
2964
  let r = n.writeUnknownFields;
2965
2965
  return r !== !1 && (r == !0 ? N.onWrite : r)(this.typeName, e, t), t;
2966
2966
  }
2967
2967
  }
2968
- const ae = new Wi();
2969
- class Pi extends Z {
2968
+ const ae = new Pi();
2969
+ class Zi extends Z {
2970
2970
  constructor() {
2971
2971
  super("com.hamropatro.grpc.cms.FileMetadata", [
2972
2972
  {
@@ -3040,8 +3040,8 @@ class Pi extends Z {
3040
3040
  return r !== !1 && (r == !0 ? N.onWrite : r)(this.typeName, e, t), t;
3041
3041
  }
3042
3042
  }
3043
- const at = new Pi();
3044
- class Zi extends Z {
3043
+ const lt = new Zi();
3044
+ class ji extends Z {
3045
3045
  constructor() {
3046
3046
  super("com.hamropatro.grpc.cms.DeleteFileRequest", [
3047
3047
  {
@@ -3082,8 +3082,8 @@ class Zi extends Z {
3082
3082
  return r !== !1 && (r == !0 ? N.onWrite : r)(this.typeName, e, t), t;
3083
3083
  }
3084
3084
  }
3085
- const Nn = new Zi();
3086
- class ji extends Z {
3085
+ const kn = new ji();
3086
+ class qi extends Z {
3087
3087
  constructor() {
3088
3088
  super("com.hamropatro.grpc.cms.DeleteFileResponse", [
3089
3089
  {
@@ -3124,8 +3124,8 @@ class ji extends Z {
3124
3124
  return r !== !1 && (r == !0 ? N.onWrite : r)(this.typeName, e, t), t;
3125
3125
  }
3126
3126
  }
3127
- const qi = new ji();
3128
- class Ki extends Z {
3127
+ const Ki = new qi();
3128
+ class Xi extends Z {
3129
3129
  constructor() {
3130
3130
  super("com.hamropatro.grpc.cms.GetFilesByFolderRequest", [
3131
3131
  {
@@ -3188,8 +3188,8 @@ class Ki extends Z {
3188
3188
  return r !== !1 && (r == !0 ? N.onWrite : r)(this.typeName, e, t), t;
3189
3189
  }
3190
3190
  }
3191
- const kn = new Ki();
3192
- class Xi extends Z {
3191
+ const Fn = new Xi();
3192
+ class Gi extends Z {
3193
3193
  constructor() {
3194
3194
  super("com.hamropatro.grpc.cms.GetFilesByFolderResponse", [
3195
3195
  { no: 1, name: "files", kind: "message", repeat: 1, T: () => ae },
@@ -3248,18 +3248,18 @@ class Xi extends Z {
3248
3248
  return r !== !1 && (r == !0 ? N.onWrite : r)(this.typeName, e, t), t;
3249
3249
  }
3250
3250
  }
3251
- const Gi = new Xi(), lt = new gt("com.hamropatro.grpc.cms.FileService", [
3252
- { name: "createFile", options: {}, I: En, O: ae },
3251
+ const Ji = new Gi(), ct = new wt("com.hamropatro.grpc.cms.FileService", [
3252
+ { name: "createFile", options: {}, I: Nn, O: ae },
3253
3253
  { name: "updateFile", options: {}, I: ae, O: ae },
3254
- { name: "deleteFile", options: {}, I: Nn, O: qi },
3255
- { name: "getFilesByFolder", options: {}, I: kn, O: Gi },
3256
- { name: "search", options: {}, I: Cn, O: Hi }
3254
+ { name: "deleteFile", options: {}, I: kn, O: Ki },
3255
+ { name: "getFilesByFolder", options: {}, I: Fn, O: Ji },
3256
+ { name: "search", options: {}, I: En, O: $i }
3257
3257
  ]);
3258
- class Ze {
3258
+ class je {
3259
3259
  constructor(e) {
3260
- B(this, "typeName", lt.typeName);
3261
- B(this, "methods", lt.methods);
3262
- B(this, "options", lt.options);
3260
+ B(this, "typeName", ct.typeName);
3261
+ B(this, "methods", ct.methods);
3262
+ B(this, "options", ct.options);
3263
3263
  this._transport = e;
3264
3264
  }
3265
3265
  /**
@@ -3298,10 +3298,10 @@ class Ze {
3298
3298
  return se("unary", this._transport, n, r, e);
3299
3299
  }
3300
3300
  }
3301
- const Ji = async (i, e, t, n, r, s) => {
3301
+ const zi = async (i, e, t, n, r, s) => {
3302
3302
  var o;
3303
3303
  try {
3304
- const a = (o = window.ImageSalonSDK) == null ? void 0 : o.grpcConfig, l = new Ze(a), c = En.create();
3304
+ const a = (o = window.ImageSalonSDK) == null ? void 0 : o.grpcConfig, l = new je(a), c = Nn.create();
3305
3305
  return c.name = i, c.nestedFolderName = e, c.url = t, c.type = n, c.folderName = r, await l.createFile(
3306
3306
  c,
3307
3307
  s
@@ -3309,10 +3309,10 @@ const Ji = async (i, e, t, n, r, s) => {
3309
3309
  } catch (a) {
3310
3310
  throw a;
3311
3311
  }
3312
- }, zi = async (i, e, t, n) => {
3312
+ }, Yi = async (i, e, t, n) => {
3313
3313
  var r;
3314
3314
  try {
3315
- const s = (r = window.ImageSalonSDK) == null ? void 0 : r.grpcConfig, o = new Ze(s), a = kn.create();
3315
+ const s = (r = window.ImageSalonSDK) == null ? void 0 : r.grpcConfig, o = new je(s), a = Fn.create();
3316
3316
  return a.folderName = i, a.cursor = e, a.limit = t, await o.getFilesByFolder(
3317
3317
  a,
3318
3318
  n
@@ -3320,10 +3320,10 @@ const Ji = async (i, e, t, n, r, s) => {
3320
3320
  } catch (s) {
3321
3321
  throw s;
3322
3322
  }
3323
- }, Yi = async (i, e, t = 20, n) => {
3323
+ }, Qi = async (i, e, t = 20, n) => {
3324
3324
  var r;
3325
3325
  try {
3326
- const s = (r = window.ImageSalonSDK) == null ? void 0 : r.grpcConfig, o = new Ze(s), a = Cn.create();
3326
+ const s = (r = window.ImageSalonSDK) == null ? void 0 : r.grpcConfig, o = new je(s), a = En.create();
3327
3327
  return a.searchValue = i, a.cursor = e, a.limit = t, await o.search(
3328
3328
  a,
3329
3329
  n
@@ -3331,10 +3331,10 @@ const Ji = async (i, e, t, n, r, s) => {
3331
3331
  } catch (s) {
3332
3332
  throw s;
3333
3333
  }
3334
- }, Qi = async (i, e, t, n, r, s, o, a, l) => {
3334
+ }, er = async (i, e, t, n, r, s, o, a, l) => {
3335
3335
  var c;
3336
3336
  try {
3337
- const h = (c = window.ImageSalonSDK) == null ? void 0 : c.grpcConfig, g = new Ze(h), w = ae.create();
3337
+ const h = (c = window.ImageSalonSDK) == null ? void 0 : c.grpcConfig, g = new je(h), w = ae.create();
3338
3338
  return w.key = i, w.name = e, w.nestedFolderName = t, w.url = n, w.thumborUrl = r, w.proxyUrl = s, w.type = o, w.folderName = a, await g.updateFile(
3339
3339
  w,
3340
3340
  l
@@ -3342,10 +3342,10 @@ const Ji = async (i, e, t, n, r, s) => {
3342
3342
  } catch (h) {
3343
3343
  throw h;
3344
3344
  }
3345
- }, er = async (i, e) => {
3345
+ }, tr = async (i, e) => {
3346
3346
  var t;
3347
3347
  try {
3348
- const n = (t = window.ImageSalonSDK) == null ? void 0 : t.grpcConfig, r = new Ze(n), s = Nn.create();
3348
+ const n = (t = window.ImageSalonSDK) == null ? void 0 : t.grpcConfig, r = new je(n), s = kn.create();
3349
3349
  return s.key = i, await r.deleteFile(
3350
3350
  s,
3351
3351
  e
@@ -3354,7 +3354,7 @@ const Ji = async (i, e, t, n, r, s) => {
3354
3354
  throw n;
3355
3355
  }
3356
3356
  };
3357
- class tr extends Z {
3357
+ class nr extends Z {
3358
3358
  constructor() {
3359
3359
  super("com.hamropatro.grpc.cms.DeleteFolderRequest", [
3360
3360
  {
@@ -3395,8 +3395,8 @@ class tr extends Z {
3395
3395
  return r !== !1 && (r == !0 ? N.onWrite : r)(this.typeName, e, t), t;
3396
3396
  }
3397
3397
  }
3398
- const Fn = new tr();
3399
- class nr extends Z {
3398
+ const In = new nr();
3399
+ class ir extends Z {
3400
3400
  constructor() {
3401
3401
  super("com.hamropatro.grpc.cms.CreateFolderRequest", [
3402
3402
  {
@@ -3459,8 +3459,8 @@ class nr extends Z {
3459
3459
  return r !== !1 && (r == !0 ? N.onWrite : r)(this.typeName, e, t), t;
3460
3460
  }
3461
3461
  }
3462
- const In = new nr();
3463
- class ir extends Z {
3462
+ const Ln = new ir();
3463
+ class rr extends Z {
3464
3464
  constructor() {
3465
3465
  super("com.hamropatro.grpc.cms.GetAllFoldersRequest", [
3466
3466
  {
@@ -3512,8 +3512,8 @@ class ir extends Z {
3512
3512
  return r !== !1 && (r == !0 ? N.onWrite : r)(this.typeName, e, t), t;
3513
3513
  }
3514
3514
  }
3515
- const Ln = new ir();
3516
- class rr extends Z {
3515
+ const An = new rr();
3516
+ class sr extends Z {
3517
3517
  constructor() {
3518
3518
  super("com.hamropatro.grpc.cms.GetAllFoldersResponse", [
3519
3519
  { no: 1, name: "folder", kind: "message", repeat: 1, T: () => Ie },
@@ -3572,8 +3572,8 @@ class rr extends Z {
3572
3572
  return r !== !1 && (r == !0 ? N.onWrite : r)(this.typeName, e, t), t;
3573
3573
  }
3574
3574
  }
3575
- const sr = new rr();
3576
- class or extends Z {
3575
+ const or = new sr();
3576
+ class ar extends Z {
3577
3577
  constructor() {
3578
3578
  super("com.hamropatro.grpc.cms.Folder", [
3579
3579
  {
@@ -3647,17 +3647,17 @@ class or extends Z {
3647
3647
  return r !== !1 && (r == !0 ? N.onWrite : r)(this.typeName, e, t), t;
3648
3648
  }
3649
3649
  }
3650
- const Ie = new or(), ct = new gt("com.hamropatro.grpc.cms.FolderService", [
3651
- { name: "createFolder", options: {}, I: In, O: Ie },
3652
- { name: "getFolders", options: {}, I: Ln, O: sr },
3650
+ const Ie = new ar(), dt = new wt("com.hamropatro.grpc.cms.FolderService", [
3651
+ { name: "createFolder", options: {}, I: Ln, O: Ie },
3652
+ { name: "getFolders", options: {}, I: An, O: or },
3653
3653
  { name: "updateFolder", options: {}, I: Ie, O: Ie },
3654
- { name: "deleteFolder", options: {}, I: Fn, O: Ie }
3654
+ { name: "deleteFolder", options: {}, I: In, O: Ie }
3655
3655
  ]);
3656
- class nt {
3656
+ class it {
3657
3657
  constructor(e) {
3658
- B(this, "typeName", ct.typeName);
3659
- B(this, "methods", ct.methods);
3660
- B(this, "options", ct.options);
3658
+ B(this, "typeName", dt.typeName);
3659
+ B(this, "methods", dt.methods);
3660
+ B(this, "options", dt.options);
3661
3661
  this._transport = e;
3662
3662
  }
3663
3663
  /**
@@ -3689,9 +3689,9 @@ class nt {
3689
3689
  return se("unary", this._transport, n, r, e);
3690
3690
  }
3691
3691
  }
3692
- const ar = async (i, e = 20, t) => {
3692
+ const lr = async (i, e = 20, t) => {
3693
3693
  var o;
3694
- const n = (o = window.ImageSalonSDK) == null ? void 0 : o.grpcConfig, r = new nt(n), s = Ln.create();
3694
+ const n = (o = window.ImageSalonSDK) == null ? void 0 : o.grpcConfig, r = new it(n), s = An.create();
3695
3695
  try {
3696
3696
  return s.cursor = i, s.limit = e, await r.getFolders(
3697
3697
  s,
@@ -3700,10 +3700,10 @@ const ar = async (i, e = 20, t) => {
3700
3700
  } catch (a) {
3701
3701
  throw a;
3702
3702
  }
3703
- }, lr = async (i, e, t, n) => {
3703
+ }, cr = async (i, e, t, n) => {
3704
3704
  var r;
3705
3705
  try {
3706
- const s = (r = window.ImageSalonSDK) == null ? void 0 : r.grpcConfig, o = new nt(s), a = In.create();
3706
+ const s = (r = window.ImageSalonSDK) == null ? void 0 : r.grpcConfig, o = new it(s), a = Ln.create();
3707
3707
  return a.name = i, a.nestedFolderName = e, a.createdBy = t, await o.createFolder(
3708
3708
  a,
3709
3709
  n
@@ -3711,10 +3711,10 @@ const ar = async (i, e = 20, t) => {
3711
3711
  } catch (s) {
3712
3712
  throw s;
3713
3713
  }
3714
- }, cr = async (i, e, t, n, r) => {
3714
+ }, dr = async (i, e, t, n, r) => {
3715
3715
  var s;
3716
3716
  try {
3717
- const o = (s = window.ImageSalonSDK) == null ? void 0 : s.grpcConfig, a = new nt(o), l = Ie.create();
3717
+ const o = (s = window.ImageSalonSDK) == null ? void 0 : s.grpcConfig, a = new it(o), l = Ie.create();
3718
3718
  return l.name = e, l.key = i, l.nestedFolderName = t, l.createdBy = n, await a.updateFolder(
3719
3719
  l,
3720
3720
  r
@@ -3722,10 +3722,10 @@ const ar = async (i, e = 20, t) => {
3722
3722
  } catch (o) {
3723
3723
  throw o;
3724
3724
  }
3725
- }, dr = async (i, e) => {
3725
+ }, hr = async (i, e) => {
3726
3726
  var t;
3727
3727
  try {
3728
- const n = (t = window.ImageSalonSDK) == null ? void 0 : t.grpcConfig, r = new nt(n), s = Fn.create();
3728
+ const n = (t = window.ImageSalonSDK) == null ? void 0 : t.grpcConfig, r = new it(n), s = In.create();
3729
3729
  return s.key = i, await r.deleteFolder(
3730
3730
  s,
3731
3731
  e
@@ -3733,7 +3733,7 @@ const ar = async (i, e = 20, t) => {
3733
3733
  } catch (n) {
3734
3734
  throw n;
3735
3735
  }
3736
- }, en = (i, e, t) => {
3736
+ }, tn = (i, e, t) => {
3737
3737
  const n = document.createElementNS("http://www.w3.org/2000/svg", "svg");
3738
3738
  n.setAttribute("xmlns", "http://www.w3.org/2000/svg"), n.setAttribute("width", i || "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");
3739
3739
  const r = document.createElementNS(
@@ -3746,7 +3746,7 @@ const ar = async (i, e = 20, t) => {
3746
3746
  const o = document.createElementNS("http://www.w3.org/2000/svg", "line");
3747
3747
  return o.setAttribute("x1", "12"), o.setAttribute("x2", "12.01"), o.setAttribute("y1", "16"), o.setAttribute("y2", "16"), n.appendChild(r), n.appendChild(s), n.appendChild(o), n;
3748
3748
  };
3749
- function tn() {
3749
+ function nn() {
3750
3750
  const i = document.createElementNS(
3751
3751
  "http://www.w3.org/2000/svg",
3752
3752
  "svg"
@@ -3758,7 +3758,7 @@ function tn() {
3758
3758
  "M504-480 320-664l56-56 240 240-240 240-56-56 184-184Z"
3759
3759
  ), i.appendChild(e), i;
3760
3760
  }
3761
- function hr() {
3761
+ function ur() {
3762
3762
  const i = document.createElementNS("http://www.w3.org/2000/svg", "svg");
3763
3763
  i.setAttribute("xmlns", "http://www.w3.org/2000/svg"), i.setAttribute("width", "12"), i.setAttribute("height", "12"), i.setAttribute("viewBox", "0 0 24 24"), i.setAttribute("fill", "none"), i.setAttribute("stroke", "currentColor"), i.setAttribute("stroke-width", "2"), i.setAttribute("stroke-linecap", "round"), i.setAttribute("stroke-linejoin", "round"), i.classList.add("lucide", "lucide-music-4");
3764
3764
  const e = document.createElementNS("http://www.w3.org/2000/svg", "path");
@@ -3776,7 +3776,7 @@ function hr() {
3776
3776
  );
3777
3777
  return r.setAttribute("cx", "18"), r.setAttribute("cy", "16"), r.setAttribute("r", "3"), i.appendChild(e), i.appendChild(t), i.appendChild(n), i.appendChild(r), document.body.appendChild(i), i;
3778
3778
  }
3779
- const ur = () => {
3779
+ const pr = () => {
3780
3780
  const i = document.createElementNS(
3781
3781
  "http://www.w3.org/2000/svg",
3782
3782
  "svg"
@@ -3787,7 +3787,7 @@ const ur = () => {
3787
3787
  const t = document.createElementNS("http://www.w3.org/2000/svg", "path");
3788
3788
  return t.setAttribute("d", "m9 11 3 3L22 4"), i.appendChild(e), i.appendChild(t), i;
3789
3789
  };
3790
- function An(i = "#333") {
3790
+ function Tn(i = "#333") {
3791
3791
  const e = document.createElementNS("http://www.w3.org/2000/svg", "svg");
3792
3792
  e.setAttribute("xmlns", "http://www.w3.org/2000/svg"), e.setAttribute("x", "0px"), e.setAttribute("y", "0px"), e.setAttribute("width", "18"), e.setAttribute("height", "18"), e.setAttribute("viewBox", "0 0 50 50"), e.setAttribute("fill", i);
3793
3793
  const t = document.createElementNS("http://www.w3.org/2000/svg", "path");
@@ -3796,7 +3796,7 @@ function An(i = "#333") {
3796
3796
  "M 9.15625 6.3125 L 6.3125 9.15625 L 22.15625 25 L 6.21875 40.96875 L 9.03125 43.78125 L 25 27.84375 L 40.9375 43.78125 L 43.78125 40.9375 L 27.84375 25 L 43.6875 9.15625 L 40.84375 6.3125 L 25 22.15625 Z"
3797
3797
  ), e.appendChild(t), e;
3798
3798
  }
3799
- function nn() {
3799
+ function rn() {
3800
3800
  const i = document.createElementNS("http://www.w3.org/2000/svg", "svg");
3801
3801
  i.setAttribute("xmlns", "http://www.w3.org/2000/svg"), i.setAttribute("width", "16"), i.setAttribute("height", "16"), i.setAttribute("viewBox", "0 0 24 24"), i.setAttribute("fill", "none"), i.setAttribute("stroke", "#2c96f8"), i.setAttribute("stroke-width", "2"), i.setAttribute("stroke-linecap", "round"), i.setAttribute("stroke-linejoin", "round"), i.classList.add("lucide", "lucide-pencil");
3802
3802
  const e = document.createElementNS("http://www.w3.org/2000/svg", "path");
@@ -3821,7 +3821,7 @@ function Ue() {
3821
3821
  "M40,12H8c-2.2,0-4,1.8-4,4v20c0,2.2,1.8,4,4,4h32c2.2,0,4-1.8,4-4V16C44,13.8,42.2,12,40,12z"
3822
3822
  ), i.appendChild(e), i.appendChild(t), i;
3823
3823
  }
3824
- function pr() {
3824
+ function fr() {
3825
3825
  const i = "http://www.w3.org/2000/svg", e = document.createElementNS(i, "svg");
3826
3826
  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");
3827
3827
  const t = document.createElementNS(i, "rect");
@@ -3831,7 +3831,7 @@ function pr() {
3831
3831
  const r = document.createElementNS(i, "path");
3832
3832
  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;
3833
3833
  }
3834
- function fr() {
3834
+ function mr() {
3835
3835
  const i = document.createElementNS("http://www.w3.org/2000/svg", "svg");
3836
3836
  i.setAttribute("xmlns", "http://www.w3.org/2000/svg"), i.setAttribute("height", "24px"), i.setAttribute("viewBox", "0 -960 960 960"), i.setAttribute("width", "24px"), i.setAttribute("fill", "currentColor");
3837
3837
  const e = document.createElementNS(
@@ -3843,13 +3843,13 @@ function fr() {
3843
3843
  "m488-400-65 65 56 56 161-161-161-161-56 56 65 65H320v80h168ZM160-160q-33 0-56.5-23.5T80-240v-480q0-33 23.5-56.5T160-800h240l80 80h320q33 0 56.5 23.5T880-640v400q0 33-23.5 56.5T800-160H160Zm0-80h640v-400H447l-80-80H160v480Zm0 0v-480 480Z"
3844
3844
  ), i.appendChild(e), i;
3845
3845
  }
3846
- function rn() {
3846
+ function sn() {
3847
3847
  const i = document.createElementNS("http://www.w3.org/2000/svg", "svg");
3848
3848
  i.setAttribute("xmlns", "http://www.w3.org/2000/svg"), i.setAttribute("fill", "none"), i.setAttribute("width", "20"), i.setAttribute("height", "20"), i.setAttribute("viewBox", "0 0 24 24"), i.setAttribute("stroke-width", "1.5"), i.setAttribute("stroke", "currentColor"), i.setAttribute("class", "size-2");
3849
3849
  const e = document.createElementNS("http://www.w3.org/2000/svg", "path");
3850
3850
  return e.setAttribute("stroke-linecap", "round"), e.setAttribute("stroke-linejoin", "round"), e.setAttribute("d", "M12 4.5v15m7.5-7.5h-15"), i.appendChild(e), i;
3851
3851
  }
3852
- function mr() {
3852
+ function gr() {
3853
3853
  const i = "http://www.w3.org/2000/svg", e = document.createElementNS(i, "svg");
3854
3854
  e.setAttribute("width", "16"), e.setAttribute("height", "16"), e.setAttribute("viewBox", "0 0 24 24"), e.setAttribute("fill", "none"), e.setAttribute("stroke", "currentColor"), e.setAttribute("stroke-width", "2"), e.setAttribute("stroke-linecap", "round"), e.setAttribute("stroke-linejoin", "round"), e.classList.add("lucide", "lucide-eye");
3855
3855
  const t = document.createElementNS(i, "path");
@@ -3860,7 +3860,7 @@ function mr() {
3860
3860
  const n = document.createElementNS(i, "circle");
3861
3861
  return n.setAttribute("cx", "12"), n.setAttribute("cy", "12"), n.setAttribute("r", "3"), e.appendChild(n), document.body.appendChild(e), e;
3862
3862
  }
3863
- function gr() {
3863
+ function wr() {
3864
3864
  const i = document.createElementNS("http://www.w3.org/2000/svg", "svg");
3865
3865
  i.setAttribute("xmlns", "http://www.w3.org/2000/svg"), i.setAttribute("height", "24px"), i.setAttribute("width", "24px"), i.setAttribute("viewBox", "0 0 30 30"), i.setAttribute("fill", "#999");
3866
3866
  const e = document.createElementNS("http://www.w3.org/2000/svg", "path");
@@ -3869,7 +3869,7 @@ function gr() {
3869
3869
  "M 13 3 C 7.4889971 3 3 7.4889971 3 13 C 3 18.511003 7.4889971 23 13 23 C 15.396508 23 17.597385 22.148986 19.322266 20.736328 L 25.292969 26.707031 A 1.0001 1.0001 0 1 0 26.707031 25.292969 L 20.736328 19.322266 C 22.148986 17.597385 23 15.396508 23 13 C 23 7.4889971 18.511003 3 13 3 z M 13 5 C 17.430123 5 21 8.5698774 21 13 C 21 17.430123 17.430123 21 13 21 C 8.5698774 21 5 17.430123 5 13 C 5 8.5698774 8.5698774 5 13 5 z"
3870
3870
  ), i.appendChild(e), i;
3871
3871
  }
3872
- function sn() {
3872
+ function on() {
3873
3873
  const i = document.createElementNS("http://www.w3.org/2000/svg", "svg");
3874
3874
  i.setAttribute("xmlns", "http://www.w3.org/2000/svg"), i.setAttribute("width", "16"), i.setAttribute("height", "16"), i.setAttribute("viewBox", "0 0 24 24"), i.setAttribute("fill", "none"), i.setAttribute("stroke", "#f14b4b"), i.setAttribute("stroke-width", "2"), i.setAttribute("stroke-linecap", "round"), i.setAttribute("stroke-linejoin", "round"), i.classList.add("lucide", "lucide-trash-2");
3875
3875
  const e = document.createElementNS("http://www.w3.org/2000/svg", "path");
@@ -3883,7 +3883,7 @@ function sn() {
3883
3883
  const s = document.createElementNS("http://www.w3.org/2000/svg", "line");
3884
3884
  return s.setAttribute("x1", "14"), s.setAttribute("x2", "14"), s.setAttribute("y1", "11"), s.setAttribute("y2", "17"), i.appendChild(e), i.appendChild(t), i.appendChild(n), i.appendChild(r), i.appendChild(s), document.body.appendChild(i), i;
3885
3885
  }
3886
- function wr() {
3886
+ function br() {
3887
3887
  const i = "http://www.w3.org/2000/svg", e = document.createElementNS(i, "svg");
3888
3888
  e.setAttribute("xmlns", i), e.setAttribute("height", "20px"), e.setAttribute("viewBox", "0 -960 960 960"), e.setAttribute("width", "20px"), e.setAttribute("fill", "#fff");
3889
3889
  const t = document.createElementNS(i, "path");
@@ -3892,7 +3892,7 @@ function wr() {
3892
3892
  "M440-320v-326L336-542l-56-58 200-200 200 200-56 58-104-104v326h-80ZM240-160q-33 0-56.5-23.5T160-240v-120h80v120h480v-120h80v120q0 33-23.5 56.5T720-160H240Z"
3893
3893
  ), e.appendChild(t), e;
3894
3894
  }
3895
- function br() {
3895
+ function yr() {
3896
3896
  const i = "http://www.w3.org/2000/svg", e = document.createElementNS(i, "svg");
3897
3897
  e.setAttribute("width", "12"), e.setAttribute("height", "12"), e.setAttribute("viewBox", "0 0 24 24"), e.setAttribute("fill", "none"), e.setAttribute("stroke", "currentColor"), e.setAttribute("stroke-width", "3"), e.setAttribute("stroke-linecap", "round"), e.setAttribute("stroke-linejoin", "round"), e.classList.add("lucide", "lucide-video");
3898
3898
  const t = document.createElementNS(i, "path");
@@ -3908,7 +3908,7 @@ function V(i, e, t) {
3908
3908
  return n.className += e, t && t.appendChild(n), n;
3909
3909
  }
3910
3910
  var le;
3911
- class yr {
3911
+ class Cr {
3912
3912
  constructor() {
3913
3913
  k(this, le);
3914
3914
  p(this, le, document.createElementNS(
@@ -3929,8 +3929,8 @@ class yr {
3929
3929
  }
3930
3930
  }
3931
3931
  le = new WeakMap();
3932
- const on = new yr(), Ge = document.body;
3933
- class Tn {
3932
+ const an = new Cr(), Je = document.body;
3933
+ class vn {
3934
3934
  constructor() {
3935
3935
  B(this, "main");
3936
3936
  B(this, "dialogContainer");
@@ -3947,7 +3947,7 @@ class Tn {
3947
3947
  this.main = V("div"), this.dialog = V("div"), this.confirmCallback = void 0, this.cancelCallback = void 0;
3948
3948
  }
3949
3949
  _init(e) {
3950
- this.main = V("div", "dialog-presentation", Ge), this.main.setAttribute("role", "presentation"), this.dialogContainer = V("div", "dialog-container", this.main), this.dialogBackdrop = V(
3950
+ this.main = V("div", "dialog-presentation", Je), this.main.setAttribute("role", "presentation"), this.dialogContainer = V("div", "dialog-container", this.main), this.dialogBackdrop = V(
3951
3951
  "div",
3952
3952
  "dialog-backdrop",
3953
3953
  this.dialogContainer
@@ -3967,9 +3967,9 @@ class Tn {
3967
3967
  "dialog-close-btn",
3968
3968
  this.dialogContent
3969
3969
  );
3970
- n.appendChild(An()), n.onclick = () => this.hide();
3970
+ n.appendChild(Tn()), n.onclick = () => this.hide();
3971
3971
  }
3972
- return e.header && this._setHeader(e), this._setBody(e), this._setFooter(e), this.confirmButton.textContent = e.confirmButtonText || "Upload", this.cancelButton.textContent = e.cancelButtonText || "Cancel", Ge.style.overflow = "hidden", this.confirmButton.textContent = e.confirmButtonText || "Upload", this.cancelButton.textContent = e.cancelButtonText || "Cancel", Ge.classList.add("dialog-visible"), new Promise((n) => {
3972
+ return e.header && this._setHeader(e), this._setBody(e), this._setFooter(e), this.confirmButton.textContent = e.confirmButtonText || "Upload", this.cancelButton.textContent = e.cancelButtonText || "Cancel", Je.style.overflow = "hidden", this.confirmButton.textContent = e.confirmButtonText || "Upload", this.cancelButton.textContent = e.cancelButtonText || "Cancel", Je.classList.add("dialog-visible"), new Promise((n) => {
3973
3973
  const r = (s) => () => {
3974
3974
  this.hide(), n(s === "confirm");
3975
3975
  };
@@ -4009,16 +4009,16 @@ class Tn {
4009
4009
  }, 150);
4010
4010
  }
4011
4011
  hide() {
4012
- this.main || Ge.style.removeProperty("overflow"), this.dialog.style.transform = "scale(0.8)", this.dialog.style.transition = "transform 150ms ease-out", this.dialogBackdrop.style.opacity = "0", setTimeout(() => {
4012
+ this.main || Je.style.removeProperty("overflow"), this.dialog.style.transform = "scale(0.8)", this.dialog.style.transition = "transform 150ms ease-out", this.dialogBackdrop.style.opacity = "0", setTimeout(() => {
4013
4013
  this.dialogContainer.style.opacity = "0", this.dialog.style.opacity = "0", this.dialogContent.style.opacity = "0", this.main.remove();
4014
4014
  }, 150);
4015
4015
  }
4016
4016
  updateUploadBtn(e) {
4017
- e ? (on.show(this.confirmButton), this.confirmButton.disabled = !0) : (on.hide(), this.confirmButton.disabled = !1);
4017
+ e ? (an.show(this.confirmButton), this.confirmButton.disabled = !0) : (an.hide(), this.confirmButton.disabled = !1);
4018
4018
  }
4019
4019
  }
4020
- const Je = new Tn(), D = new Tn();
4021
- class Cr {
4020
+ const ze = new vn(), D = new vn();
4021
+ class Er {
4022
4022
  constructor() {
4023
4023
  B(this, "main");
4024
4024
  B(this, "dialogBody");
@@ -4031,7 +4031,7 @@ class Cr {
4031
4031
  this.main.remove();
4032
4032
  }
4033
4033
  }
4034
- const G = new Cr();
4034
+ const G = new Er();
4035
4035
  var fe = /* @__PURE__ */ ((i) => (i[i.IMAGE = 0] = "IMAGE", i[i.AUDIO = 1] = "AUDIO", i[i.VIDEO = 2] = "VIDEO", i[i.ALL = 3] = "ALL", i[i.FOLDER = 4] = "FOLDER", i))(fe || {});
4036
4036
  const Me = {
4037
4037
  0: "IMAGE",
@@ -4040,7 +4040,7 @@ const Me = {
4040
4040
  3: "ALL",
4041
4041
  4: "FOLDER"
4042
4042
  };
4043
- function Er(i) {
4043
+ function Nr(i) {
4044
4044
  switch (i) {
4045
4045
  case "image":
4046
4046
  return Me[fe.IMAGE];
@@ -4052,7 +4052,7 @@ function Er(i) {
4052
4052
  return Me[fe.ALL];
4053
4053
  }
4054
4054
  }
4055
- function Nr(i) {
4055
+ function kr(i) {
4056
4056
  const e = {};
4057
4057
  i.forEach((r) => {
4058
4058
  e[r.key] = { ...r, children: {} };
@@ -4064,7 +4064,7 @@ function Nr(i) {
4064
4064
  }), r);
4065
4065
  return i.reduce((r, s) => (s.nestedFolderName || r.push(t(e[s.key])), r), []);
4066
4066
  }
4067
- function kr(i, e) {
4067
+ function Fr(i, e) {
4068
4068
  const t = (n) => {
4069
4069
  if (n.key === e.nestedFolderName)
4070
4070
  return n.children[e.key] = { ...e, children: {} }, !0;
@@ -4080,17 +4080,18 @@ function kr(i, e) {
4080
4080
  break;
4081
4081
  return i;
4082
4082
  }
4083
- const Fr = async (i) => {
4084
- let e;
4083
+ const Ir = async (i, e) => {
4084
+ let t;
4085
4085
  try {
4086
- i && (e = {
4087
- Authorization: i
4086
+ i && (t = {
4087
+ Authorization: i,
4088
+ "app-id": e === "production" ? "hamropatro" : "hamropatro-android"
4088
4089
  });
4089
- } catch (n) {
4090
- if (n) throw n;
4090
+ } catch (r) {
4091
+ if (r) throw r;
4091
4092
  }
4092
4093
  return {
4093
- meta: e
4094
+ meta: t
4094
4095
  };
4095
4096
  };
4096
4097
  function b(i, e) {
@@ -4105,15 +4106,15 @@ function L(i, e) {
4105
4106
  const t = document.createElement("span");
4106
4107
  return e && (t.className = e), i && (t.textContent = i), t;
4107
4108
  }
4108
- function an(i, e, t, n) {
4109
+ function ln(i, e, t, n) {
4109
4110
  const r = document.createElement("img");
4110
4111
  return e && (r.className = e), r.src = i, r;
4111
4112
  }
4112
- function Ir(i, e, t) {
4113
+ function Lr(i, e, t) {
4113
4114
  const n = document.createElement("video"), r = document.createElement("source");
4114
4115
  return n.className = e, r.src = i, n.appendChild(r), n;
4115
4116
  }
4116
- function Lr(i, e, t) {
4117
+ function Ar(i, e, t) {
4117
4118
  const n = document.createElement("audio"), r = document.createElement("source");
4118
4119
  return n.className = e, n.controls = !0, r.src = i, n.appendChild(r), n;
4119
4120
  }
@@ -4121,11 +4122,11 @@ function q(i, e, t, n, r) {
4121
4122
  const s = document.createElement("button");
4122
4123
  return e && (s.className = e), t && (s.id = t), i && (s.textContent = i), r && (s.innerHTML = r), s.disabled = n, s;
4123
4124
  }
4124
- function ln(i, e, t) {
4125
+ function cn(i, e, t) {
4125
4126
  const n = document.createElement("input");
4126
4127
  return n.className = e, n.defaultValue = t, i && (n.type = i), n;
4127
4128
  }
4128
- class Ar extends Z {
4129
+ class Tr extends Z {
4129
4130
  constructor() {
4130
4131
  super("com.hamropatro.grpc.cms.ImageUploadRequest", []);
4131
4132
  }
@@ -4141,8 +4142,8 @@ class Ar extends Z {
4141
4142
  return r !== !1 && (r == !0 ? N.onWrite : r)(this.typeName, e, t), t;
4142
4143
  }
4143
4144
  }
4144
- const vn = new Ar();
4145
- class Tr extends Z {
4145
+ const Bn = new Tr();
4146
+ class vr extends Z {
4146
4147
  constructor() {
4147
4148
  super("com.hamropatro.grpc.cms.ImageUploadResponse", [
4148
4149
  {
@@ -4194,14 +4195,14 @@ class Tr extends Z {
4194
4195
  return r !== !1 && (r == !0 ? N.onWrite : r)(this.typeName, e, t), t;
4195
4196
  }
4196
4197
  }
4197
- const vr = new Tr(), dt = new gt("com.hamropatro.grpc.cms.ImageUploadService", [
4198
- { name: "Upload", options: {}, I: vn, O: vr }
4198
+ const Br = new vr(), ht = new wt("com.hamropatro.grpc.cms.ImageUploadService", [
4199
+ { name: "Upload", options: {}, I: Bn, O: Br }
4199
4200
  ]);
4200
- class Br {
4201
+ class xr {
4201
4202
  constructor(e) {
4202
- B(this, "typeName", dt.typeName);
4203
- B(this, "methods", dt.methods);
4204
- B(this, "options", dt.options);
4203
+ B(this, "typeName", ht.typeName);
4204
+ B(this, "methods", ht.methods);
4205
+ B(this, "options", ht.options);
4205
4206
  this._transport = e;
4206
4207
  }
4207
4208
  /**
@@ -4212,25 +4213,25 @@ class Br {
4212
4213
  return se("unary", this._transport, n, r, e);
4213
4214
  }
4214
4215
  }
4215
- const xr = async () => {
4216
+ const Or = async () => {
4216
4217
  var i;
4217
4218
  try {
4218
- const e = (i = window.ImageSalonSDK) == null ? void 0 : i.grpcConfig, t = new Br(
4219
+ const e = (i = window.ImageSalonSDK) == null ? void 0 : i.grpcConfig, t = new xr(
4219
4220
  e
4220
- ), n = vn.create();
4221
+ ), n = Bn.create();
4221
4222
  return await t.upload(
4222
4223
  n
4223
4224
  );
4224
4225
  } catch (e) {
4225
4226
  throw e;
4226
4227
  }
4227
- }, Or = async (i, e) => {
4228
+ }, _r = async (i, e) => {
4228
4229
  try {
4229
- const t = _r(i, e), r = (await xr()).response.url;
4230
+ const t = Dr(i, e), r = (await Or()).response.url;
4230
4231
  return await fetch(r, {
4231
4232
  method: "PUT",
4232
4233
  headers: {
4233
- "Content-Type": e.type.includes("image/") ? e.type : "image/*",
4234
+ "Content-Type": e == null ? void 0 : e.type,
4234
4235
  "x-amz-acl": "public-read"
4235
4236
  },
4236
4237
  body: t
@@ -4238,7 +4239,7 @@ const xr = async () => {
4238
4239
  } catch (t) {
4239
4240
  throw t;
4240
4241
  }
4241
- }, _r = (i, e) => {
4242
+ }, Dr = (i, e) => {
4242
4243
  const t = e.type.split("/")[0];
4243
4244
  let n = "";
4244
4245
  t === "video" ? n = i == null ? void 0 : i.replace(/^data:video\/\w+;base64,/, "") : t === "image" && (n = i == null ? void 0 : i.replace(/^data:image\/\w+;base64,/, ""));
@@ -4247,8 +4248,8 @@ const xr = async () => {
4247
4248
  s[o] = r.charCodeAt(o);
4248
4249
  return s;
4249
4250
  };
4250
- var Ae, Te, S, ce, O, R, we, K, ve, be, ne, Q, ye, He, Ce, Ee, de, Be, ie, re, Ne, ke, he, De, $e, X, ue, We, Pe, Fe;
4251
- class Ur {
4251
+ var Ae, Te, S, ce, O, R, we, K, ve, be, ne, Q, ye, He, Ce, Ee, de, Be, ie, re, Ne, ke, he, De, $e, X, ue, We, Pe, Fe, Ze;
4252
+ class Rr {
4252
4253
  constructor(e) {
4253
4254
  k(this, Ae);
4254
4255
  k(this, Te);
@@ -4280,7 +4281,8 @@ class Ur {
4280
4281
  k(this, We, !1);
4281
4282
  k(this, Pe);
4282
4283
  k(this, Fe);
4283
- p(this, we, !1), p(this, K, !1), p(this, ve, !1), p(this, He, e.handleUpload.bind(this)), p(this, Ce, 0), p(this, re, ""), p(this, Ne, !1), p(this, he, !1), p(this, $e, e.accessToken), p(this, ue, null), p(this, Fe, ""), this._removeToastContainer(), this._grpcOptionInitializer(), this._init(e).then(() => {
4284
+ k(this, Ze);
4285
+ p(this, we, !1), p(this, K, !1), p(this, ve, !1), p(this, He, e.handleUpload.bind(this)), p(this, Ce, 0), p(this, re, ""), p(this, Ne, !1), p(this, he, !1), p(this, Ze, e.mode), p(this, $e, e.accessToken), p(this, ue, null), p(this, Fe, ""), this._removeToastContainer(), this._grpcOptionInitializer(), this._init(e).then(() => {
4284
4286
  p(this, We, !0), this._create(e), this.updateWindowObject({ initialized: !0 }), this._initializeGrpcConfig(e.mode, e.endPoint);
4285
4287
  }), p(this, Pe, e.enableMultiSelect);
4286
4288
  }
@@ -4308,7 +4310,10 @@ class Ur {
4308
4310
  }), d(this, Ae) && d(this, Ae).appendChild(r), d(this, Ae);
4309
4311
  }
4310
4312
  async _grpcOptionInitializer() {
4311
- p(this, X, await Fr(d(this, $e)));
4313
+ p(this, X, await Ir(
4314
+ d(this, $e),
4315
+ d(this, Ze)
4316
+ ));
4312
4317
  }
4313
4318
  _selectedImageContainer() {
4314
4319
  var g;
@@ -4324,20 +4329,20 @@ class Ur {
4324
4329
  !1,
4325
4330
  '<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" width="24" height="24" viewBox="0 0 50 50"> <path d="M 9.15625 6.3125 L 6.3125 9.15625 L 22.15625 25 L 6.21875 40.96875 L 9.03125 43.78125 L 25 27.84375 L 40.9375 43.78125 L 43.78125 40.9375 L 27.84375 25 L 43.6875 9.15625 L 40.84375 6.3125 L 25 22.15625 Z"></path> </svg>'
4326
4331
  ).addEventListener("click", () => {
4327
- Je.hide(), p(this, O, []), p(this, R, []);
4332
+ ze.hide(), p(this, O, []), p(this, R, []);
4328
4333
  }), p(this, Te, b("browse-container"));
4329
4334
  const n = b();
4330
4335
  n.style.display = "flex", n.style.alignItems = "center", n.style.justifyContent = "space-between", n.style.padding = "10px 20px";
4331
4336
  const r = Re("Folders", "folder-title"), s = q("", "add-folder-btn");
4332
- s.append(rn()), this._createUpdateFolderDialog(s, "create"), n.append(r, s), d(this, Ee).append(n, d(this, de));
4337
+ s.append(sn()), this._createUpdateFolderDialog(s, "create"), n.append(r, s), d(this, Ee).append(n, d(this, de));
4333
4338
  const o = this._renderSearchField(), a = this._createBrowseMoreContainer(), l = this._createBrowseImageMain(), c = b("footer");
4334
4339
  e.onclick = () => {
4335
- Je.hide(), p(this, R, []), p(this, O, []);
4340
+ ze.hide(), p(this, R, []), p(this, O, []);
4336
4341
  }, d(this, ye).onclick = () => {
4337
- d(this, He).call(this), Je.hide(), p(this, O, []), p(this, R, []);
4342
+ d(this, He).call(this), ze.hide(), p(this, O, []), p(this, R, []);
4338
4343
  }, c.append(e, d(this, ye));
4339
4344
  const h = b("container-right-main");
4340
- h.append(o, a, l, c), d(this, Te).append(d(this, Ee), h), Je.show({
4345
+ h.append(o, a, l, c), d(this, Te).append(d(this, Ee), h), ze.show({
4341
4346
  content: d(this, Te)
4342
4347
  });
4343
4348
  }
@@ -4355,10 +4360,10 @@ class Ur {
4355
4360
  }), t.append(n, r), e.appendChild(t);
4356
4361
  }
4357
4362
  _renderUploadButton() {
4358
- const e = ln("file");
4363
+ const e = cn("file");
4359
4364
  e.style.display = "none", e.setAttribute("multiple", "true"), e.setAttribute("accept", "image/*,video/*,audio/*,.gif"), p(this, ce, document.createElement("button")), d(this, ce).className = "browse-more-btn";
4360
4365
  const t = document.createElement("span");
4361
- return t.textContent = "Upload", d(this, ce).append(wr(), t), d(this, ce).type = "button", d(this, ce).addEventListener(
4366
+ return t.textContent = "Upload", d(this, ce).append(br(), t), d(this, ce).type = "button", d(this, ce).addEventListener(
4362
4367
  "click",
4363
4368
  () => e.click()
4364
4369
  ), e.addEventListener("change", () => {
@@ -4378,7 +4383,7 @@ class Ur {
4378
4383
  const e = document.createElement("button");
4379
4384
  e.className = "create-folder-btn";
4380
4385
  const t = document.createElement("span");
4381
- return t.textContent = "Create", e.append(rn(), t), this._createUpdateFolderDialog(e, "create"), e;
4386
+ return t.textContent = "Create", e.append(sn(), t), this._createUpdateFolderDialog(e, "create"), e;
4382
4387
  }
4383
4388
  _renderSearchField() {
4384
4389
  let e;
@@ -4386,7 +4391,7 @@ class Ur {
4386
4391
  "search-input-wrapper",
4387
4392
  "search-input-wrapper"
4388
4393
  );
4389
- p(this, ke, ln("search")), d(this, ke).value = "", d(this, ke).addEventListener("input", (s) => {
4394
+ p(this, ke, cn("search")), d(this, ke).value = "", d(this, ke).addEventListener("input", (s) => {
4390
4395
  p(this, R, []);
4391
4396
  const o = s.target;
4392
4397
  e && clearTimeout(e), e = setTimeout(() => {
@@ -4397,7 +4402,7 @@ class Ur {
4397
4402
  p(this, he, !0), p(this, De, o.value), this._search(d(this, De));
4398
4403
  }, 750);
4399
4404
  }), d(this, ke).setAttribute("placeholder", "Search");
4400
- const r = gr();
4405
+ const r = wr();
4401
4406
  return r.style.position = "absolute", r.style.top = "50%", r.style.left = "5%", r.style.transform = "translate(-5%, -50%)", n.append(r, d(this, ke)), t.append(n), t;
4402
4407
  }
4403
4408
  _createBrowseMoreContainer() {
@@ -4512,7 +4517,7 @@ class Ur {
4512
4517
  e.innerHTML = "", d(this, S).appendChild(e);
4513
4518
  }
4514
4519
  _fileCardBody(e) {
4515
- var Ut, Rt, Mt, Vt;
4520
+ var Rt, Mt, Vt, Ht;
4516
4521
  const t = b("selected-image-content"), n = b("selected-image-top-bar"), r = q(
4517
4522
  "",
4518
4523
  "selected-image-btn",
@@ -4521,125 +4526,125 @@ class Ur {
4521
4526
  '<svg width="20px" height="20px" viewBox="0 0 20 20" focusable="false" fill="currentColor"><path fill="none" d="M0 0h20v20H0V0z"></path><path d="M10 6c.82 0 1.5-.68 1.5-1.5S10.82 3 10 3s-1.5.67-1.5 1.5S9.18 6 10 6zm0 5.5c.82 0 1.5-.68 1.5-1.5s-.68-1.5-1.5-1.5-1.5.68-1.5 1.5.68 1.5 1.5 1.5zm0 5.5c.82 0 1.5-.67 1.5-1.5 0-.82-.68-1.5-1.5-1.5s-1.5.68-1.5 1.5c0 .83.68 1.5 1.5 1.5z"></path></svg>'
4522
4527
  );
4523
4528
  let s, o;
4524
- (e == null ? void 0 : e.type) === fe.IMAGE && (s = an(e == null ? void 0 : e.url, "selected-image"), o = pr()), (e == null ? void 0 : e.type) === fe.VIDEO && (s = Ir(e == null ? void 0 : e.url, "uploaded-video"), o = br()), (e == null ? void 0 : e.type) === fe.AUDIO && (s = Lr(e == null ? void 0 : e.url, "uploaded-audio"), o = hr());
4529
+ (e == null ? void 0 : e.type) === fe.IMAGE && (s = ln(e == null ? void 0 : e.url, "selected-image"), o = fr()), (e == null ? void 0 : e.type) === fe.VIDEO && (s = Lr(e == null ? void 0 : e.url, "uploaded-video"), o = yr()), (e == null ? void 0 : e.type) === fe.AUDIO && (s = Ar(e == null ? void 0 : e.url, "uploaded-audio"), o = ur());
4525
4530
  const a = b("selected-image-wrapper");
4526
4531
  a.setAttribute("data-key", e == null ? void 0 : e.key);
4527
4532
  const l = Re(e == null ? void 0 : e.name, "selected-image-name"), c = L("", "selected-image-type");
4528
4533
  c.append(o), n.append(c, r);
4529
4534
  const h = b();
4530
4535
  h.style.marginTop = "10px", h.style.display = "flex", h.style.justifyContent = "space-between", h.style.alignItems = "center", h.append(l), t.append(n, s), a.append(t, h);
4531
- const g = b("action-wrapper"), w = q("", "action-option preview"), F = L("Preview", ""), v = mr();
4536
+ const g = b("action-wrapper"), w = q("", "action-option preview"), F = L("Preview", ""), v = gr();
4532
4537
  w.append(v, F);
4533
- const H = q("", "action-option move"), I = L("Move", ""), $ = fr();
4538
+ const H = q("", "action-option move"), I = L("Move", ""), $ = mr();
4534
4539
  H.append($, I);
4535
- const W = q("", "action-option rename"), z = L("Rename", ""), C = nn();
4540
+ const W = q("", "action-option rename"), z = L("Rename", ""), C = rn();
4536
4541
  W.append(C, z);
4537
- const y = q("", "action-option delete"), _ = L("Delete", ""), j = sn();
4542
+ const y = q("", "action-option delete"), _ = L("Delete", ""), j = on();
4538
4543
  y.append(j, _);
4539
- const Y = e.name.split(".")[0], Bn = e.name.split(".")[1], xn = Me[e.type], bt = b("edit-form-wrapper"), yt = b("move-form-wrapper"), Ct = b("preview-details-container"), Et = b("preview-details-wrapper"), Nt = b(
4544
+ const Y = e.name.split(".")[0], xn = e.name.split(".")[1], On = Me[e.type], yt = b("edit-form-wrapper"), Ct = b("move-form-wrapper"), Et = b("preview-details-container"), Nt = b("preview-details-wrapper"), kt = b(
4540
4545
  "preview-option-image-wrapper"
4541
- ), kt = b("preview-option-wrapper"), Ft = b("preview-option-wrapper"), It = b(
4546
+ ), Ft = b("preview-option-wrapper"), It = b("preview-option-wrapper"), Lt = b(
4542
4547
  "preview-option-wrapper"
4543
- ), Lt = b("preview-option-wrapper"), At = b(
4548
+ ), At = b("preview-option-wrapper"), Tt = b(
4544
4549
  "preview-option-wrapper"
4545
- ), Tt = b("preview-option-wrapper"), vt = b(
4550
+ ), vt = b("preview-option-wrapper"), Bt = b(
4546
4551
  "preview-option-wrapper"
4547
- ), On = an(e.url, "preview-option-image");
4548
- Nt.append(On);
4549
- const _n = L("File name", "preview-title"), Bt = b("preview-option-name");
4550
- Bt.innerHTML = e.name, kt.append(_n, Bt);
4551
- const Dn = L("Folder name", "preview-title"), Sn = L(
4552
+ ), _n = ln(e.url, "preview-option-image");
4553
+ kt.append(_n);
4554
+ const Dn = L("File name", "preview-title"), xt = b("preview-option-name");
4555
+ xt.innerHTML = e.name, Ft.append(Dn, xt);
4556
+ const Sn = L("Folder name", "preview-title"), Un = L(
4552
4557
  e.folderName,
4553
4558
  "preview-option-name"
4554
4559
  );
4555
- Ft.append(
4556
- Dn,
4557
- Sn
4560
+ It.append(
4561
+ Sn,
4562
+ Un
4558
4563
  );
4559
- const Un = L(
4564
+ const Rn = L(
4560
4565
  "File Extension",
4561
4566
  "preview-title"
4562
- ), Rn = L(
4563
- Bn,
4567
+ ), Mn = L(
4568
+ xn,
4564
4569
  "preview-option-name extension"
4565
4570
  );
4566
- It.append(
4567
- Un,
4568
- Rn
4569
- );
4570
- const Mn = L("File type", "preview-title"), Vn = L(xn, "preview-option-name");
4571
4571
  Lt.append(
4572
- Mn,
4573
- Vn
4572
+ Rn,
4573
+ Mn
4574
+ );
4575
+ const Vn = L("File type", "preview-title"), Hn = L(On, "preview-option-name");
4576
+ At.append(
4577
+ Vn,
4578
+ Hn
4574
4579
  );
4575
- const Hn = L("Dimension", "preview-title"), $n = L(
4576
- `${(Ut = e == null ? void 0 : e.metadata) == null ? void 0 : Ut.width} * ${(Rt = e == null ? void 0 : e.metadata) == null ? void 0 : Rt.height}`,
4580
+ const $n = L("Dimension", "preview-title"), Wn = L(
4581
+ `${(Rt = e == null ? void 0 : e.metadata) == null ? void 0 : Rt.width} * ${(Mt = e == null ? void 0 : e.metadata) == null ? void 0 : Mt.height}`,
4577
4582
  "preview-option-name"
4578
4583
  );
4579
- At.append(
4580
- Hn,
4581
- $n
4584
+ Tt.append(
4585
+ $n,
4586
+ Wn
4582
4587
  );
4583
- const Wn = L("URL", "preview-title"), Pn = L(
4588
+ const Pn = L("URL", "preview-title"), Zn = L(
4584
4589
  e.url,
4585
4590
  "preview-option-name url"
4586
4591
  );
4587
- Tt.append(
4588
- Wn,
4589
- Pn
4592
+ vt.append(
4593
+ Pn,
4594
+ Zn
4590
4595
  );
4591
- const Zn = L(
4596
+ const jn = L(
4592
4597
  "Parent folder",
4593
4598
  "preview-title"
4594
- ), jn = L(
4599
+ ), qn = L(
4595
4600
  e.nestedFolderName,
4596
4601
  "preview-option-name"
4597
4602
  );
4598
- vt.append(
4599
- Zn,
4600
- jn
4601
- ), Et.append(
4602
- Ft,
4603
- kt,
4603
+ Bt.append(
4604
+ jn,
4605
+ qn
4606
+ ), Nt.append(
4604
4607
  It,
4608
+ Ft,
4605
4609
  Lt,
4606
- ((Mt = e == null ? void 0 : e.metadata) == null ? void 0 : Mt.width) > 0 && ((Vt = e == null ? void 0 : e.metadata) == null ? void 0 : Vt.height) > 0 ? At : "",
4607
- Tt,
4608
- e.nestedFolderName ? vt : ""
4609
- ), Ct.append(
4610
- Nt,
4611
- Et
4610
+ At,
4611
+ ((Vt = e == null ? void 0 : e.metadata) == null ? void 0 : Vt.width) > 0 && ((Ht = e == null ? void 0 : e.metadata) == null ? void 0 : Ht.height) > 0 ? Tt : "",
4612
+ vt,
4613
+ e.nestedFolderName ? Bt : ""
4614
+ ), Et.append(
4615
+ kt,
4616
+ Nt
4612
4617
  );
4613
- const xt = b("form-control"), je = document.createElement("input");
4614
- xt.appendChild(je), je.classList.add("input-field"), je.value = e.name;
4615
- const Ot = b("form-control"), qn = L("Current Folder:", "input-label"), it = b("folder-field current");
4616
- it.textContent = e.folderName, it.prepend(Ue()), Ot.append(qn, it);
4617
- const _t = b("form-control"), xe = b();
4618
+ const Ot = b("form-control"), qe = document.createElement("input");
4619
+ Ot.appendChild(qe), qe.classList.add("input-field"), qe.value = e.name;
4620
+ const _t = b("form-control"), Kn = L("Current Folder:", "input-label"), rt = b("folder-field current");
4621
+ rt.textContent = e.folderName, rt.prepend(Ue()), _t.append(Kn, rt);
4622
+ const Dt = b("form-control"), xe = b();
4618
4623
  xe.style.width = "100%", xe.style.display = "flex", xe.style.alignItems = "center", xe.style.justifyContent = "space-between";
4619
- const Kn = L(
4624
+ const Xn = L(
4620
4625
  "Suggested Folder List:",
4621
4626
  "input-label"
4622
4627
  ), Le = L();
4623
- Le.style.display = "flex", Le.style.alignItems = "center", Le.style.gap = "5px", Le.style.fontSize = "14px", Le.textContent = "Move the file in selected folder", Le.appendChild(en("14px", "14px", "#333")), xe.append(Kn, Le);
4628
+ Le.style.display = "flex", Le.style.alignItems = "center", Le.style.gap = "5px", Le.style.fontSize = "14px", Le.textContent = "Move the file in selected folder", Le.appendChild(tn("14px", "14px", "#333")), xe.append(Xn, Le);
4624
4629
  const Se = b();
4625
4630
  Se.style.width = "100%", Se.style.maxHeight = "250px", Se.style.overflowY = "auto";
4626
- const rt = document.createElement("ul");
4627
- rt.className = "folders", Se.append(rt), _t.append(xe, Se), d(this, ne).forEach((x) => {
4631
+ const st = document.createElement("ul");
4632
+ st.className = "folders", Se.append(st), Dt.append(xe, Se), d(this, ne).forEach((x) => {
4628
4633
  const _e = this._renderEditFolderListContainer(x);
4629
- rt.appendChild(_e);
4634
+ st.appendChild(_e);
4630
4635
  });
4631
- const Dt = b("form-control"), Xn = L("Destination Folder:", "input-label"), St = b(
4636
+ const St = b("form-control"), Gn = L("Destination Folder:", "input-label"), Ut = b(
4632
4637
  "folder-field source",
4633
4638
  "source-folder-wrapper"
4634
- ), st = document.createElement("span");
4635
- st.id = "source-folder-name", st.textContent = d(this, Fe) ? d(this, Fe) : e.folderName, St.append(Ue(), st);
4639
+ ), ot = document.createElement("span");
4640
+ ot.id = "source-folder-name", ot.textContent = d(this, Fe) ? d(this, Fe) : e.folderName, Ut.append(Ue(), ot);
4636
4641
  let Oe = "";
4637
- Dt.append(Xn, St), je.onchange = (x) => {
4642
+ St.append(Gn, Ut), qe.onchange = (x) => {
4638
4643
  Oe = x.target.value;
4639
- }, Oe = Oe !== "" ? Oe : e.name, bt.append(xt), yt.append(
4640
- Ot,
4644
+ }, Oe = Oe !== "" ? Oe : e.name, yt.append(Ot), Ct.append(
4641
4645
  _t,
4642
- Dt
4646
+ Dt,
4647
+ St
4643
4648
  ), g.append(
4644
4649
  w,
4645
4650
  H,
@@ -4647,7 +4652,7 @@ class Ur {
4647
4652
  y
4648
4653
  ), w.onclick = (x) => {
4649
4654
  x.stopPropagation(), G.hide(), D.show({
4650
- content: Ct,
4655
+ content: Et,
4651
4656
  header: Y,
4652
4657
  dialogContentStyle: {
4653
4658
  minWidth: "60rem",
@@ -4657,7 +4662,7 @@ class Ur {
4657
4662
  });
4658
4663
  }, H.onclick = (x) => {
4659
4664
  x.stopPropagation(), G.hide(), D.show({
4660
- content: yt,
4665
+ content: Ct,
4661
4666
  header: `Move "${e.name}"`,
4662
4667
  confirmButtonText: "Move",
4663
4668
  dialogContentStyle: {
@@ -4675,7 +4680,7 @@ class Ur {
4675
4680
  });
4676
4681
  }, W.onclick = (x) => {
4677
4682
  x.stopPropagation(), G.hide(), D.show({
4678
- content: bt,
4683
+ content: yt,
4679
4684
  header: "Rename",
4680
4685
  confirmButtonText: "Update",
4681
4686
  dialogContentStyle: {
@@ -4769,7 +4774,7 @@ class Ur {
4769
4774
  const r = document.createElement("span"), s = document.createElement("span");
4770
4775
  if (s.className = "folder-name", s.textContent = e == null ? void 0 : e.name, r.appendChild(Ue()), n.append(r, s), t.append(n), e.children && Object.keys(e.children).length > 0) {
4771
4776
  const a = document.createElement("button");
4772
- a.classList.add("expand-icon"), a.appendChild(tn()), n.prepend(a);
4777
+ a.classList.add("expand-icon"), a.appendChild(nn()), n.prepend(a);
4773
4778
  const l = document.createElement("ul");
4774
4779
  l.className = "folders nested", t.appendChild(l), a.addEventListener("click", (c) => {
4775
4780
  c.stopPropagation(), t.classList.toggle("active"), l.classList.toggle("visible");
@@ -4787,7 +4792,7 @@ class Ur {
4787
4792
  "moveToInputField.disabled",
4788
4793
  !1,
4789
4794
  '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-ellipsis"><circle cx="12" cy="12" r="1"/><circle cx="19" cy="12" r="1"/><circle cx="5" cy="12" r="1"/></svg>'
4790
- ), l = b("action-wrapper"), c = q("", "action-option edit"), h = L("Edit", ""), g = nn();
4795
+ ), l = b("action-wrapper"), c = q("", "action-option edit"), h = L("Edit", ""), g = rn();
4791
4796
  c.append(g, h);
4792
4797
  const w = b("edit-form-wrapper"), F = b("name-field-wrapper"), v = L("Name", "input-label"), H = document.createElement("input");
4793
4798
  H.classList.add("input-field"), H.value = e.name, H.onchange = (C) => {
@@ -4800,7 +4805,7 @@ class Ur {
4800
4805
  createdBy: e.createdBy
4801
4806
  };
4802
4807
  this._createUpdateFolderDialog(c, "update", I);
4803
- const $ = q("", "action-option delete"), W = L("Delete", ""), z = sn();
4808
+ const $ = q("", "action-option delete"), W = L("Delete", ""), z = on();
4804
4809
  $.append(z, W), l.append(c, $), $.onclick = (C) => {
4805
4810
  C.stopPropagation(), G.hide(), D.show({
4806
4811
  content: "",
@@ -4840,7 +4845,7 @@ class Ur {
4840
4845
  const r = document.createElement("span"), s = document.createElement("span");
4841
4846
  if (s.className = "folder-name", s.textContent = e == null ? void 0 : e.name, r.appendChild(Ue()), n.append(r, s), t.append(n), e.children && Object.keys(e.children).length > 0) {
4842
4847
  const a = document.createElement("button");
4843
- a.classList.add("expand-icon"), a.appendChild(tn()), n.prepend(a);
4848
+ a.classList.add("expand-icon"), a.appendChild(nn()), n.prepend(a);
4844
4849
  const l = document.createElement("ul");
4845
4850
  l.className = "folders nested", t.appendChild(l), a.addEventListener("click", (c) => {
4846
4851
  c.stopPropagation(), t.classList.toggle("active"), l.classList.toggle("visible");
@@ -4873,9 +4878,9 @@ class Ur {
4873
4878
  }
4874
4879
  _renderToastContainer(e, t) {
4875
4880
  this._removeToastContainer(), p(this, ie, document.createElement("div")), d(this, ie).className = `message-container ${t}`;
4876
- const n = Re(e, "message"), r = t === "success" ? ur() : en(), s = q("");
4881
+ const n = Re(e, "message"), r = t === "success" ? pr() : tn(), s = q("");
4877
4882
  s.style.cursor = "pointer", s.style.border = "0", s.style.outline = "none", s.style.background = "transparent", s.appendChild(
4878
- An(t === "error" ? "#ee3f3f" : "#4caf50")
4883
+ Tn(t === "error" ? "#ee3f3f" : "#4caf50")
4879
4884
  ), s.setAttribute(
4880
4885
  "fill",
4881
4886
  t === "error" ? "#ee3f3f" : "#4caf50"
@@ -4912,11 +4917,11 @@ class Ur {
4912
4917
  var n, r;
4913
4918
  p(this, we, !0), this._updateSelectedImageListContainerUI();
4914
4919
  try {
4915
- const s = await Or(e, t), o = await Ji(
4920
+ const s = await _r(e, t), o = await zi(
4916
4921
  t == null ? void 0 : t.name,
4917
4922
  "",
4918
4923
  s,
4919
- fe[Er((n = t.type) == null ? void 0 : n.split("/")[0])],
4924
+ fe[Nr((n = t.type) == null ? void 0 : n.split("/")[0])],
4920
4925
  (r = d(this, Q)) == null ? void 0 : r.name,
4921
4926
  d(this, X)
4922
4927
  );
@@ -4933,7 +4938,7 @@ class Ur {
4933
4938
  async _updateFile(e, t) {
4934
4939
  D.updateUploadBtn(!0);
4935
4940
  try {
4936
- const n = await Qi(
4941
+ const n = await er(
4937
4942
  t.key,
4938
4943
  e,
4939
4944
  t.nestedFolderName,
@@ -4959,7 +4964,7 @@ class Ur {
4959
4964
  async _deleteFile(e) {
4960
4965
  D.updateUploadBtn(!0);
4961
4966
  try {
4962
- await er(e, d(this, X)), p(this, R, d(this, R).filter((t) => e !== t.key)), this._renderToastContainer("File Deleted Successfully", "success");
4967
+ await tr(e, d(this, X)), p(this, R, d(this, R).filter((t) => e !== t.key)), this._renderToastContainer("File Deleted Successfully", "success");
4963
4968
  } catch {
4964
4969
  this._renderToastContainer(
4965
4970
  "Something went wrong while deleting the file. Please try again later.",
@@ -4972,14 +4977,14 @@ class Ur {
4972
4977
  async _createFolder(e, t = 2) {
4973
4978
  var n;
4974
4979
  try {
4975
- const r = await lr(
4980
+ const r = await cr(
4976
4981
  e,
4977
4982
  (n = d(this, Q)) == null ? void 0 : n.name,
4978
4983
  "",
4979
4984
  d(this, X)
4980
4985
  );
4981
4986
  p(this, O, []), p(this, R, []);
4982
- const s = kr(d(this, ne), r == null ? void 0 : r.response);
4987
+ const s = Fr(d(this, ne), r == null ? void 0 : r.response);
4983
4988
  p(this, ne, s), p(this, be, e), p(this, Q, { ...r == null ? void 0 : r.response, children: {} }), this._fetchFilesFromFolder(e), this._renderToastContainer(
4984
4989
  `Folder ${e} created successfully`,
4985
4990
  "success"
@@ -5005,7 +5010,7 @@ class Ur {
5005
5010
  var t, n, r;
5006
5011
  p(this, K, !0), this._updateSelectedImageListContainerUI();
5007
5012
  try {
5008
- const s = await zi(
5013
+ const s = await Yi(
5009
5014
  e,
5010
5015
  d(this, re),
5011
5016
  20,
@@ -5027,7 +5032,7 @@ class Ur {
5027
5032
  var e, t;
5028
5033
  p(this, K, !0), p(this, ve, !0), this._updateSelectedImageListContainerUI(), this._updateFolderListContainer(), this._removeToastContainer();
5029
5034
  try {
5030
- const r = (await ar("", 100, d(this, X))).response.folder, s = Nr(r);
5035
+ const r = (await lr("", 100, d(this, X))).response.folder, s = kr(r);
5031
5036
  p(this, be, (e = s[0]) == null ? void 0 : e.name), this._fetchFilesFromFolder((t = s[0]) == null ? void 0 : t.name), p(this, Q, s[0]), p(this, ne, s);
5032
5037
  } catch {
5033
5038
  p(this, K, !1), this._renderToastContainer(
@@ -5042,7 +5047,7 @@ class Ur {
5042
5047
  var t, n;
5043
5048
  p(this, K, !0), this._updateSelectedImageListContainerUI(), this._removeToastContainer();
5044
5049
  try {
5045
- const r = await Yi(
5050
+ const r = await Qi(
5046
5051
  e,
5047
5052
  d(this, re),
5048
5053
  10,
@@ -5058,7 +5063,7 @@ class Ur {
5058
5063
  async _updateFolder(e, t) {
5059
5064
  D.updateUploadBtn(!0);
5060
5065
  try {
5061
- const n = await cr(
5066
+ const n = await dr(
5062
5067
  t.key,
5063
5068
  e,
5064
5069
  t.nestedFolderName,
@@ -5077,7 +5082,7 @@ class Ur {
5077
5082
  async _deleteFolder(e) {
5078
5083
  D.updateUploadBtn(!0);
5079
5084
  try {
5080
- await dr(e, d(this, X)), p(this, ne, d(this, ne).filter((t) => t.key !== e)), this._renderToastContainer("Folder Deleted Successfully", "success");
5085
+ await hr(e, d(this, X)), p(this, ne, d(this, ne).filter((t) => t.key !== e)), this._renderToastContainer("Folder Deleted Successfully", "success");
5081
5086
  } catch {
5082
5087
  throw this._renderToastContainer(
5083
5088
  "Something went wrong while deleting the folder. Please try again later.",
@@ -5123,13 +5128,13 @@ class Ur {
5123
5128
  _initializeGrpcConfig(e, t) {
5124
5129
  let n = "https://hamro-cms-backend-grpc.hamrostack.com";
5125
5130
  t && (e === "production" || e === "development") ? n = t : e === "production" && (n = "https://page-api-grpc.hamropatro.com");
5126
- const r = new Ri({
5131
+ const r = new Mi({
5127
5132
  baseUrl: n
5128
5133
  });
5129
5134
  this.updateWindowObject({ grpcConfig: r });
5130
5135
  }
5131
5136
  }
5132
- Ae = new WeakMap(), Te = new WeakMap(), S = new WeakMap(), ce = new WeakMap(), O = new WeakMap(), R = new WeakMap(), we = new WeakMap(), K = new WeakMap(), ve = new WeakMap(), be = new WeakMap(), ne = new WeakMap(), Q = new WeakMap(), ye = new WeakMap(), He = new WeakMap(), Ce = new WeakMap(), Ee = new WeakMap(), de = new WeakMap(), Be = new WeakMap(), ie = new WeakMap(), re = new WeakMap(), Ne = new WeakMap(), ke = new WeakMap(), he = new WeakMap(), De = new WeakMap(), $e = new WeakMap(), X = new WeakMap(), ue = new WeakMap(), We = new WeakMap(), Pe = new WeakMap(), Fe = new WeakMap();
5137
+ Ae = new WeakMap(), Te = new WeakMap(), S = new WeakMap(), ce = new WeakMap(), O = new WeakMap(), R = new WeakMap(), we = new WeakMap(), K = new WeakMap(), ve = new WeakMap(), be = new WeakMap(), ne = new WeakMap(), Q = new WeakMap(), ye = new WeakMap(), He = new WeakMap(), Ce = new WeakMap(), Ee = new WeakMap(), de = new WeakMap(), Be = new WeakMap(), ie = new WeakMap(), re = new WeakMap(), Ne = new WeakMap(), ke = new WeakMap(), he = new WeakMap(), De = new WeakMap(), $e = new WeakMap(), X = new WeakMap(), ue = new WeakMap(), We = new WeakMap(), Pe = new WeakMap(), Fe = new WeakMap(), Ze = new WeakMap();
5133
5138
  export {
5134
- Ur as default
5139
+ Rr as default
5135
5140
  };