image-salon-sdk 1.0.22 → 1.0.23

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,70 +1,70 @@
1
1
  import './style.css';
2
- var Gt = Object.defineProperty;
3
- var ct = (r) => {
4
- throw TypeError(r);
2
+ var Yt = Object.defineProperty;
3
+ var ft = (i) => {
4
+ throw TypeError(i);
5
5
  };
6
- var Jt = (r, e, t) => e in r ? Gt(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
7
- var C = (r, e, t) => Jt(r, typeof e != "symbol" ? e + "" : e, t), ht = (r, e, t) => e.has(r) || ct("Cannot " + t);
8
- var u = (r, e, t) => (ht(r, e, "read from private field"), t ? t.call(r) : e.get(r)), E = (r, e, t) => e.has(r) ? ct("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(r) : e.set(r, t), p = (r, e, t, n) => (ht(r, e, "write to private field"), n ? n.call(r, t) : e.set(r, t), t);
9
- function K(r, e, t) {
10
- let n = document.createElement(r);
6
+ var zt = (i, e, t) => e in i ? Yt(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
7
+ var _ = (i, e, t) => zt(i, typeof e != "symbol" ? e + "" : e, t), mt = (i, e, t) => e.has(i) || ft("Cannot " + t);
8
+ var u = (i, e, t) => (mt(i, e, "read from private field"), t ? t.call(i) : e.get(i)), E = (i, e, t) => e.has(i) ? ft("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(i) : e.set(i, t), m = (i, e, t, n) => (mt(i, e, "write to private field"), n ? n.call(i, t) : e.set(i, t), t);
9
+ function S(i, e, t) {
10
+ let n = document.createElement(i);
11
11
  return n.className += e, t && t.appendChild(n), n;
12
12
  }
13
- var ee;
14
- class Zt {
13
+ var te;
14
+ class Qt {
15
15
  constructor() {
16
- E(this, ee);
17
- p(this, ee, document.createElementNS(
16
+ E(this, te);
17
+ m(this, te, document.createElementNS(
18
18
  "http://www.w3.org/2000/svg",
19
19
  "svg"
20
- )), u(this, ee).setAttribute("viewBox", "25 25 50 50"), u(this, ee).classList.add("loader-svg");
20
+ )), u(this, te).setAttribute("viewBox", "25 25 50 50"), u(this, te).classList.add("loader-svg");
21
21
  const e = document.createElementNS(
22
22
  "http://www.w3.org/2000/svg",
23
23
  "circle"
24
24
  );
25
- e.setAttribute("r", "20"), e.setAttribute("cy", "50"), e.setAttribute("cx", "50"), e.classList.add("loader-circle"), u(this, ee).appendChild(e);
25
+ e.setAttribute("r", "20"), e.setAttribute("cy", "50"), e.setAttribute("cx", "50"), e.classList.add("loader-circle"), u(this, te).appendChild(e);
26
26
  }
27
27
  show(e) {
28
- e.appendChild(u(this, ee));
28
+ e.appendChild(u(this, te));
29
29
  }
30
30
  hide() {
31
- u(this, ee).remove();
31
+ u(this, te).remove();
32
32
  }
33
33
  }
34
- ee = new WeakMap();
35
- const ut = new Zt(), He = document.body;
36
- class Yt {
34
+ te = new WeakMap();
35
+ const pt = new Qt(), Ze = document.body;
36
+ class en {
37
37
  constructor() {
38
- C(this, "main");
39
- C(this, "dialogHeader");
40
- C(this, "dialogBody");
41
- C(this, "dialogFooter");
42
- C(this, "confirmButton");
43
- C(this, "cancelButton");
44
- C(this, "confirmCallback");
45
- C(this, "cancelCallback");
46
- this.main = K("div"), this.dialogHeader = K("div"), this.dialogBody = K("div"), this.dialogFooter = K("div"), this.confirmButton = document.createElement("button"), this.cancelButton = document.createElement("button"), this.confirmCallback = void 0, this.cancelCallback = void 0;
38
+ _(this, "main");
39
+ _(this, "dialogHeader");
40
+ _(this, "dialogBody");
41
+ _(this, "dialogFooter");
42
+ _(this, "confirmButton");
43
+ _(this, "cancelButton");
44
+ _(this, "confirmCallback");
45
+ _(this, "cancelCallback");
46
+ this.main = S("div"), this.dialogHeader = S("div"), this.dialogBody = S("div"), this.dialogFooter = S("div"), this.confirmButton = document.createElement("button"), this.cancelButton = document.createElement("button"), this.confirmCallback = void 0, this.cancelCallback = void 0;
47
47
  }
48
48
  show(e) {
49
- this.main = K("div", "dialog", He);
50
- const t = K("div", "dialog-content", this.main);
51
- return this.dialogHeader = K("div", "dialog-header", t), this.dialogBody = K("div", "dialog-body", t), this.dialogFooter = K("div", "dialog-footer", t), this.confirmButton = K(
49
+ this.main = S("div", "dialog", Ze);
50
+ const t = S("div", "dialog-content", this.main);
51
+ return this.dialogHeader = S("div", "dialog-header", t), this.dialogBody = S("div", "dialog-body", t), this.dialogFooter = S("div", "dialog-footer", t), this.confirmButton = S(
52
52
  "button",
53
53
  "dialog-btn confirm",
54
54
  this.dialogFooter
55
- ), this.confirmButton.type = "button", this.confirmButton.disabled = !0, this.cancelButton = K(
55
+ ), this.confirmButton.type = "button", this.confirmButton.disabled = !0, this.cancelButton = S(
56
56
  "button",
57
57
  "dialog-btn cancel",
58
58
  this.dialogFooter
59
- ), this.cancelButton.type = "button", e.header ? typeof e.header == "string" ? this.dialogHeader.innerHTML = e.header : (this.dialogHeader.innerHTML = "", this.dialogHeader.appendChild(e.header)) : this.dialogHeader.innerHTML = "", typeof e.content == "string" ? this.dialogBody.innerHTML = e.content : (this.dialogBody.innerHTML = "", this.dialogBody.appendChild(e.content)), e.showFooter ? this.dialogFooter.append(this.confirmButton, this.cancelButton) : (this.dialogFooter.innerHTML = "", this.dialogFooter.remove()), this.confirmButton.textContent = e.confirmButtonText || "Upload", this.cancelButton.textContent = e.cancelButtonText || "Cancel", He.classList.add("dialog-visible"), new Promise((n) => {
60
- const i = (s) => () => {
59
+ ), this.cancelButton.type = "button", e.header ? typeof e.header == "string" ? this.dialogHeader.innerHTML = e.header : (this.dialogHeader.innerHTML = "", this.dialogHeader.appendChild(e.header)) : this.dialogHeader.innerHTML = "", typeof e.content == "string" ? this.dialogBody.innerHTML = e.content : (this.dialogBody.innerHTML = "", this.dialogBody.appendChild(e.content)), e.showFooter ? this.dialogFooter.append(this.confirmButton, this.cancelButton) : (this.dialogFooter.innerHTML = "", this.dialogFooter.remove()), this.confirmButton.textContent = e.confirmButtonText || "Upload", this.cancelButton.textContent = e.cancelButtonText || "Cancel", Ze.classList.add("dialog-visible"), new Promise((n) => {
60
+ const r = (s) => () => {
61
61
  this.hide(), n(s === "confirm");
62
62
  };
63
- this.confirmCallback = e.onConfirm || i("confirm"), this.confirmButton.addEventListener("click", this.confirmCallback), this.cancelCallback = e.onCancel || i("cancel"), this.cancelButton.addEventListener("click", this.cancelCallback);
63
+ this.confirmCallback = e.onConfirm || r("confirm"), this.confirmButton.addEventListener("click", this.confirmCallback), this.cancelCallback = e.onCancel || r("cancel"), this.cancelButton.addEventListener("click", this.cancelCallback);
64
64
  });
65
65
  }
66
66
  hide() {
67
- He.classList.remove("dialog-visible"), this.main.remove();
67
+ Ze.classList.remove("dialog-visible"), this.main.remove();
68
68
  }
69
69
  updateUploadBtnText(e) {
70
70
  this.confirmButton && (this.confirmButton.textContent = e);
@@ -73,65 +73,69 @@ class Yt {
73
73
  this.confirmButton && (this.confirmButton.disabled = e);
74
74
  }
75
75
  updateUploadBtn(e) {
76
- e ? (ut.show(this.confirmButton), this.disableConfirmButton(!0)) : (ut.hide(), this.disableConfirmButton(!1));
76
+ e ? (pt.show(this.confirmButton), this.disableConfirmButton(!0)) : (pt.hide(), this.disableConfirmButton(!1));
77
77
  }
78
78
  }
79
- const Re = new Yt();
80
- function U(r, e) {
79
+ const Re = new en();
80
+ function F(i, e) {
81
81
  const t = document.createElement("div");
82
- return r && (t.className = r), e && (t.id = e), t;
82
+ return i && (t.className = i), e && (t.id = e), t;
83
83
  }
84
- function pe(r, e, t) {
84
+ function Oe(i, e, t) {
85
85
  const n = document.createElement("p");
86
- return e && n.classList.add(e), t && (n.id = t), r && (n.textContent = r), n;
86
+ return e && n.classList.add(e), t && (n.id = t), i && (n.textContent = i), n;
87
+ }
88
+ function Ye(i, e) {
89
+ const t = document.createElement("span");
90
+ return e && t.classList.add(e), i && (t.textContent = i), t;
87
91
  }
88
- function zt(r, e, t, n) {
89
- const i = document.createElement("img");
90
- return i.classList.add(e), i.src = r, i;
92
+ function tn(i, e, t, n) {
93
+ const r = document.createElement("img");
94
+ return r.classList.add(e), r.src = i, r;
91
95
  }
92
- function Qt(r, e, t) {
93
- const n = document.createElement("video"), i = document.createElement("source");
94
- return n.classList.add(e), i.src = r, n.appendChild(i), n;
96
+ function nn(i, e, t) {
97
+ const n = document.createElement("video"), r = document.createElement("source");
98
+ return n.classList.add(e), r.src = i, n.appendChild(r), n;
95
99
  }
96
- function en(r, e, t) {
97
- const n = document.createElement("audio"), i = document.createElement("source");
98
- return n.classList.add(e), n.controls = !0, i.src = r, n.appendChild(i), n;
100
+ function rn(i, e, t) {
101
+ const n = document.createElement("audio"), r = document.createElement("source");
102
+ return n.classList.add(e), n.controls = !0, r.src = i, n.appendChild(r), n;
99
103
  }
100
- function Fe(r, e, t, n, i) {
104
+ function Be(i, e, t, n, r) {
101
105
  const s = document.createElement("button");
102
- return e && (s.className = e), t && (s.id = t), r && (s.textContent = r), i && (s.innerHTML = i), s.disabled = n, s;
106
+ return e && (s.className = e), t && (s.id = t), i && (s.textContent = i), r && (s.innerHTML = r), s.disabled = n, s;
103
107
  }
104
- function dt(r) {
108
+ function gt(i) {
105
109
  const e = document.createElement("input");
106
- return r && (e.type = r), e;
110
+ return i && (e.type = i), e;
107
111
  }
108
- function Ft(r) {
109
- let e = typeof r;
112
+ function Ct(i) {
113
+ let e = typeof i;
110
114
  if (e == "object") {
111
- if (Array.isArray(r))
115
+ if (Array.isArray(i))
112
116
  return "array";
113
- if (r === null)
117
+ if (i === null)
114
118
  return "null";
115
119
  }
116
120
  return e;
117
121
  }
118
- function tn(r) {
119
- return r !== null && typeof r == "object" && !Array.isArray(r);
122
+ function sn(i) {
123
+ return i !== null && typeof i == "object" && !Array.isArray(i);
120
124
  }
121
- let ie = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""), Ke = [];
122
- for (let r = 0; r < ie.length; r++)
123
- Ke[ie[r].charCodeAt(0)] = r;
124
- Ke[45] = ie.indexOf("+");
125
- Ke[95] = ie.indexOf("/");
126
- function Lt(r) {
127
- let e = r.length * 3 / 4;
128
- r[r.length - 2] == "=" ? e -= 2 : r[r.length - 1] == "=" && (e -= 1);
129
- let t = new Uint8Array(e), n = 0, i = 0, s, o = 0;
130
- for (let a = 0; a < r.length; a++) {
131
- if (s = Ke[r.charCodeAt(a)], s === void 0)
132
- switch (r[a]) {
125
+ let ae = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""), Ge = [];
126
+ for (let i = 0; i < ae.length; i++)
127
+ Ge[ae[i].charCodeAt(0)] = i;
128
+ Ge[45] = ae.indexOf("+");
129
+ Ge[95] = ae.indexOf("/");
130
+ function vt(i) {
131
+ let e = i.length * 3 / 4;
132
+ i[i.length - 2] == "=" ? e -= 2 : i[i.length - 1] == "=" && (e -= 1);
133
+ let t = new Uint8Array(e), n = 0, r = 0, s, o = 0;
134
+ for (let a = 0; a < i.length; a++) {
135
+ if (s = Ge[i.charCodeAt(a)], s === void 0)
136
+ switch (i[a]) {
133
137
  case "=":
134
- i = 0;
138
+ r = 0;
135
139
  case `
136
140
  `:
137
141
  case "\r":
@@ -141,89 +145,89 @@ function Lt(r) {
141
145
  default:
142
146
  throw Error("invalid base64 string.");
143
147
  }
144
- switch (i) {
148
+ switch (r) {
145
149
  case 0:
146
- o = s, i = 1;
150
+ o = s, r = 1;
147
151
  break;
148
152
  case 1:
149
- t[n++] = o << 2 | (s & 48) >> 4, o = s, i = 2;
153
+ t[n++] = o << 2 | (s & 48) >> 4, o = s, r = 2;
150
154
  break;
151
155
  case 2:
152
- t[n++] = (o & 15) << 4 | (s & 60) >> 2, o = s, i = 3;
156
+ t[n++] = (o & 15) << 4 | (s & 60) >> 2, o = s, r = 3;
153
157
  break;
154
158
  case 3:
155
- t[n++] = (o & 3) << 6 | s, i = 0;
159
+ t[n++] = (o & 3) << 6 | s, r = 0;
156
160
  break;
157
161
  }
158
162
  }
159
- if (i == 1)
163
+ if (r == 1)
160
164
  throw Error("invalid base64 string.");
161
165
  return t.subarray(0, n);
162
166
  }
163
- function Ot(r) {
164
- let e = "", t = 0, n, i = 0;
165
- for (let s = 0; s < r.length; s++)
166
- switch (n = r[s], t) {
167
+ function _t(i) {
168
+ let e = "", t = 0, n, r = 0;
169
+ for (let s = 0; s < i.length; s++)
170
+ switch (n = i[s], t) {
167
171
  case 0:
168
- e += ie[n >> 2], i = (n & 3) << 4, t = 1;
172
+ e += ae[n >> 2], r = (n & 3) << 4, t = 1;
169
173
  break;
170
174
  case 1:
171
- e += ie[i | n >> 4], i = (n & 15) << 2, t = 2;
175
+ e += ae[r | n >> 4], r = (n & 15) << 2, t = 2;
172
176
  break;
173
177
  case 2:
174
- e += ie[i | n >> 6], e += ie[n & 63], t = 0;
178
+ e += ae[r | n >> 6], e += ae[n & 63], t = 0;
175
179
  break;
176
180
  }
177
- return t && (e += ie[i], e += "=", t == 1 && (e += "=")), e;
181
+ return t && (e += ae[r], e += "=", t == 1 && (e += "=")), e;
178
182
  }
179
- var N;
180
- (function(r) {
181
- r.symbol = Symbol.for("protobuf-ts/unknown"), r.onRead = (t, n, i, s, o) => {
182
- (e(n) ? n[r.symbol] : n[r.symbol] = []).push({ no: i, wireType: s, data: o });
183
- }, r.onWrite = (t, n, i) => {
184
- for (let { no: s, wireType: o, data: a } of r.list(n))
185
- i.tag(s, o).raw(a);
186
- }, r.list = (t, n) => {
183
+ var k;
184
+ (function(i) {
185
+ i.symbol = Symbol.for("protobuf-ts/unknown"), i.onRead = (t, n, r, s, o) => {
186
+ (e(n) ? n[i.symbol] : n[i.symbol] = []).push({ no: r, wireType: s, data: o });
187
+ }, i.onWrite = (t, n, r) => {
188
+ for (let { no: s, wireType: o, data: a } of i.list(n))
189
+ r.tag(s, o).raw(a);
190
+ }, i.list = (t, n) => {
187
191
  if (e(t)) {
188
- let i = t[r.symbol];
189
- return n ? i.filter((s) => s.no == n) : i;
192
+ let r = t[i.symbol];
193
+ return n ? r.filter((s) => s.no == n) : r;
190
194
  }
191
195
  return [];
192
- }, r.last = (t, n) => r.list(t, n).slice(-1)[0];
193
- const e = (t) => t && Array.isArray(t[r.symbol]);
194
- })(N || (N = {}));
195
- function nn(r, e) {
196
- return Object.assign(Object.assign({}, r), e);
196
+ }, i.last = (t, n) => i.list(t, n).slice(-1)[0];
197
+ const e = (t) => t && Array.isArray(t[i.symbol]);
198
+ })(k || (k = {}));
199
+ function on(i, e) {
200
+ return Object.assign(Object.assign({}, i), e);
197
201
  }
198
- var m;
199
- (function(r) {
200
- r[r.Varint = 0] = "Varint", r[r.Bit64 = 1] = "Bit64", r[r.LengthDelimited = 2] = "LengthDelimited", r[r.StartGroup = 3] = "StartGroup", r[r.EndGroup = 4] = "EndGroup", r[r.Bit32 = 5] = "Bit32";
201
- })(m || (m = {}));
202
- function rn() {
203
- let r = 0, e = 0;
202
+ var p;
203
+ (function(i) {
204
+ 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";
205
+ })(p || (p = {}));
206
+ function an() {
207
+ let i = 0, e = 0;
204
208
  for (let n = 0; n < 28; n += 7) {
205
- let i = this.buf[this.pos++];
206
- if (r |= (i & 127) << n, !(i & 128))
207
- return this.assertBounds(), [r, e];
209
+ let r = this.buf[this.pos++];
210
+ if (i |= (r & 127) << n, !(r & 128))
211
+ return this.assertBounds(), [i, e];
208
212
  }
209
213
  let t = this.buf[this.pos++];
210
- if (r |= (t & 15) << 28, e = (t & 112) >> 4, !(t & 128))
211
- return this.assertBounds(), [r, e];
214
+ if (i |= (t & 15) << 28, e = (t & 112) >> 4, !(t & 128))
215
+ return this.assertBounds(), [i, e];
212
216
  for (let n = 3; n <= 31; n += 7) {
213
- let i = this.buf[this.pos++];
214
- if (e |= (i & 127) << n, !(i & 128))
215
- return this.assertBounds(), [r, e];
217
+ let r = this.buf[this.pos++];
218
+ if (e |= (r & 127) << n, !(r & 128))
219
+ return this.assertBounds(), [i, e];
216
220
  }
217
221
  throw new Error("invalid varint");
218
222
  }
219
- function Ge(r, e, t) {
223
+ function ze(i, e, t) {
220
224
  for (let s = 0; s < 28; s = s + 7) {
221
- const o = r >>> s, a = !(!(o >>> 7) && e == 0), l = (a ? o | 128 : o) & 255;
225
+ const o = i >>> s, a = !(!(o >>> 7) && e == 0), l = (a ? o | 128 : o) & 255;
222
226
  if (t.push(l), !a)
223
227
  return;
224
228
  }
225
- const n = r >>> 28 & 15 | (e & 7) << 4, i = !!(e >> 3);
226
- if (t.push((i ? n | 128 : n) & 255), !!i) {
229
+ const n = i >>> 28 & 15 | (e & 7) << 4, r = !!(e >> 3);
230
+ if (t.push((r ? n | 128 : n) & 255), !!r) {
227
231
  for (let s = 3; s < 31; s = s + 7) {
228
232
  const o = e >>> s, a = !!(o >>> 7), l = (a ? o | 128 : o) & 255;
229
233
  if (t.push(l), !a)
@@ -232,26 +236,26 @@ function Ge(r, e, t) {
232
236
  t.push(e >>> 31 & 1);
233
237
  }
234
238
  }
235
- const Pe = 65536 * 65536;
236
- function Bt(r) {
237
- let e = r[0] == "-";
238
- e && (r = r.slice(1));
239
+ const qe = 65536 * 65536;
240
+ function xt(i) {
241
+ let e = i[0] == "-";
242
+ e && (i = i.slice(1));
239
243
  const t = 1e6;
240
- let n = 0, i = 0;
244
+ let n = 0, r = 0;
241
245
  function s(o, a) {
242
- const l = Number(r.slice(o, a));
243
- i *= t, n = n * t + l, n >= Pe && (i = i + (n / Pe | 0), n = n % Pe);
246
+ const l = Number(i.slice(o, a));
247
+ r *= t, n = n * t + l, n >= qe && (r = r + (n / qe | 0), n = n % qe);
244
248
  }
245
- return s(-24, -18), s(-18, -12), s(-12, -6), s(-6), [e, n, i];
249
+ return s(-24, -18), s(-18, -12), s(-12, -6), s(-6), [e, n, r];
246
250
  }
247
- function et(r, e) {
251
+ function rt(i, e) {
248
252
  if (e >>> 0 <= 2097151)
249
- return "" + (Pe * e + (r >>> 0));
250
- let t = r & 16777215, n = (r >>> 24 | e << 8) >>> 0 & 16777215, i = e >> 16 & 65535, s = t + n * 6777216 + i * 6710656, o = n + i * 8147497, a = i * 2, l = 1e7;
253
+ return "" + (qe * e + (i >>> 0));
254
+ 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;
251
255
  s >= l && (o += Math.floor(s / l), s %= l), o >= l && (a += Math.floor(o / l), o %= l);
252
256
  function c(d, g) {
253
- let y = d ? String(d) : "";
254
- return g ? "0000000".slice(y.length) + y : y;
257
+ let N = d ? String(d) : "";
258
+ return g ? "0000000".slice(N.length) + N : N;
255
259
  }
256
260
  return c(
257
261
  a,
@@ -269,53 +273,53 @@ function et(r, e) {
269
273
  1
270
274
  );
271
275
  }
272
- function ft(r, e) {
273
- if (r >= 0) {
274
- for (; r > 127; )
275
- e.push(r & 127 | 128), r = r >>> 7;
276
- e.push(r);
276
+ function wt(i, e) {
277
+ if (i >= 0) {
278
+ for (; i > 127; )
279
+ e.push(i & 127 | 128), i = i >>> 7;
280
+ e.push(i);
277
281
  } else {
278
282
  for (let t = 0; t < 9; t++)
279
- e.push(r & 127 | 128), r = r >> 7;
283
+ e.push(i & 127 | 128), i = i >> 7;
280
284
  e.push(1);
281
285
  }
282
286
  }
283
- function sn() {
284
- let r = this.buf[this.pos++], e = r & 127;
285
- if (!(r & 128))
287
+ function ln() {
288
+ let i = this.buf[this.pos++], e = i & 127;
289
+ if (!(i & 128))
286
290
  return this.assertBounds(), e;
287
- if (r = this.buf[this.pos++], e |= (r & 127) << 7, !(r & 128))
291
+ if (i = this.buf[this.pos++], e |= (i & 127) << 7, !(i & 128))
288
292
  return this.assertBounds(), e;
289
- if (r = this.buf[this.pos++], e |= (r & 127) << 14, !(r & 128))
293
+ if (i = this.buf[this.pos++], e |= (i & 127) << 14, !(i & 128))
290
294
  return this.assertBounds(), e;
291
- if (r = this.buf[this.pos++], e |= (r & 127) << 21, !(r & 128))
295
+ if (i = this.buf[this.pos++], e |= (i & 127) << 21, !(i & 128))
292
296
  return this.assertBounds(), e;
293
- r = this.buf[this.pos++], e |= (r & 15) << 28;
294
- for (let t = 5; r & 128 && t < 10; t++)
295
- r = this.buf[this.pos++];
296
- if (r & 128)
297
+ i = this.buf[this.pos++], e |= (i & 15) << 28;
298
+ for (let t = 5; i & 128 && t < 10; t++)
299
+ i = this.buf[this.pos++];
300
+ if (i & 128)
297
301
  throw new Error("invalid varint");
298
302
  return this.assertBounds(), e >>> 0;
299
303
  }
300
- let T;
301
- function on() {
302
- const r = new DataView(new ArrayBuffer(8));
303
- T = globalThis.BigInt !== void 0 && typeof r.getBigInt64 == "function" && typeof r.getBigUint64 == "function" && typeof r.setBigInt64 == "function" && typeof r.setBigUint64 == "function" ? {
304
+ let A;
305
+ function cn() {
306
+ const i = new DataView(new ArrayBuffer(8));
307
+ A = globalThis.BigInt !== void 0 && typeof i.getBigInt64 == "function" && typeof i.getBigUint64 == "function" && typeof i.setBigInt64 == "function" && typeof i.setBigUint64 == "function" ? {
304
308
  MIN: BigInt("-9223372036854775808"),
305
309
  MAX: BigInt("9223372036854775807"),
306
310
  UMIN: BigInt("0"),
307
311
  UMAX: BigInt("18446744073709551615"),
308
312
  C: BigInt,
309
- V: r
313
+ V: i
310
314
  } : void 0;
311
315
  }
312
- on();
313
- function _t(r) {
314
- if (!r)
316
+ cn();
317
+ function Dt(i) {
318
+ if (!i)
315
319
  throw new Error("BigInt unavailable, see https://github.com/timostamm/protobuf-ts/blob/v1.0.8/MANUAL.md#bigint-support");
316
320
  }
317
- const Dt = /^-?[0-9]+$/, je = 4294967296, xe = 2147483648;
318
- class Ct {
321
+ const Rt = /^-?[0-9]+$/, Ke = 4294967296, Ue = 2147483648;
322
+ class Ut {
319
323
  /**
320
324
  * Create a new instance with the given bits.
321
325
  */
@@ -332,49 +336,49 @@ class Ct {
332
336
  * Convert to a native number.
333
337
  */
334
338
  toNumber() {
335
- let e = this.hi * je + (this.lo >>> 0);
339
+ let e = this.hi * Ke + (this.lo >>> 0);
336
340
  if (!Number.isSafeInteger(e))
337
341
  throw new Error("cannot convert to safe number");
338
342
  return e;
339
343
  }
340
344
  }
341
- class S extends Ct {
345
+ class U extends Ut {
342
346
  /**
343
347
  * Create instance from a `string`, `number` or `bigint`.
344
348
  */
345
349
  static from(e) {
346
- if (T)
350
+ if (A)
347
351
  switch (typeof e) {
348
352
  case "string":
349
353
  if (e == "0")
350
354
  return this.ZERO;
351
355
  if (e == "")
352
356
  throw new Error("string is no integer");
353
- e = T.C(e);
357
+ e = A.C(e);
354
358
  case "number":
355
359
  if (e === 0)
356
360
  return this.ZERO;
357
- e = T.C(e);
361
+ e = A.C(e);
358
362
  case "bigint":
359
363
  if (!e)
360
364
  return this.ZERO;
361
- if (e < T.UMIN)
365
+ if (e < A.UMIN)
362
366
  throw new Error("signed value for ulong");
363
- if (e > T.UMAX)
367
+ if (e > A.UMAX)
364
368
  throw new Error("ulong too large");
365
- return T.V.setBigUint64(0, e, !0), new S(T.V.getInt32(0, !0), T.V.getInt32(4, !0));
369
+ return A.V.setBigUint64(0, e, !0), new U(A.V.getInt32(0, !0), A.V.getInt32(4, !0));
366
370
  }
367
371
  else
368
372
  switch (typeof e) {
369
373
  case "string":
370
374
  if (e == "0")
371
375
  return this.ZERO;
372
- if (e = e.trim(), !Dt.test(e))
376
+ if (e = e.trim(), !Rt.test(e))
373
377
  throw new Error("string is no integer");
374
- let [t, n, i] = Bt(e);
378
+ let [t, n, r] = xt(e);
375
379
  if (t)
376
380
  throw new Error("signed value for ulong");
377
- return new S(n, i);
381
+ return new U(n, r);
378
382
  case "number":
379
383
  if (e == 0)
380
384
  return this.ZERO;
@@ -382,7 +386,7 @@ class S extends Ct {
382
386
  throw new Error("number is no integer");
383
387
  if (e < 0)
384
388
  throw new Error("signed value for ulong");
385
- return new S(e, e / je);
389
+ return new U(e, e / Ke);
386
390
  }
387
391
  throw new Error("unknown value " + typeof e);
388
392
  }
@@ -390,63 +394,63 @@ class S extends Ct {
390
394
  * Convert to decimal string.
391
395
  */
392
396
  toString() {
393
- return T ? this.toBigInt().toString() : et(this.lo, this.hi);
397
+ return A ? this.toBigInt().toString() : rt(this.lo, this.hi);
394
398
  }
395
399
  /**
396
400
  * Convert to native bigint.
397
401
  */
398
402
  toBigInt() {
399
- return _t(T), T.V.setInt32(0, this.lo, !0), T.V.setInt32(4, this.hi, !0), T.V.getBigUint64(0, !0);
403
+ return Dt(A), A.V.setInt32(0, this.lo, !0), A.V.setInt32(4, this.hi, !0), A.V.getBigUint64(0, !0);
400
404
  }
401
405
  }
402
- S.ZERO = new S(0, 0);
403
- class B extends Ct {
406
+ U.ZERO = new U(0, 0);
407
+ class C extends Ut {
404
408
  /**
405
409
  * Create instance from a `string`, `number` or `bigint`.
406
410
  */
407
411
  static from(e) {
408
- if (T)
412
+ if (A)
409
413
  switch (typeof e) {
410
414
  case "string":
411
415
  if (e == "0")
412
416
  return this.ZERO;
413
417
  if (e == "")
414
418
  throw new Error("string is no integer");
415
- e = T.C(e);
419
+ e = A.C(e);
416
420
  case "number":
417
421
  if (e === 0)
418
422
  return this.ZERO;
419
- e = T.C(e);
423
+ e = A.C(e);
420
424
  case "bigint":
421
425
  if (!e)
422
426
  return this.ZERO;
423
- if (e < T.MIN)
427
+ if (e < A.MIN)
424
428
  throw new Error("signed long too small");
425
- if (e > T.MAX)
429
+ if (e > A.MAX)
426
430
  throw new Error("signed long too large");
427
- return T.V.setBigInt64(0, e, !0), new B(T.V.getInt32(0, !0), T.V.getInt32(4, !0));
431
+ return A.V.setBigInt64(0, e, !0), new C(A.V.getInt32(0, !0), A.V.getInt32(4, !0));
428
432
  }
429
433
  else
430
434
  switch (typeof e) {
431
435
  case "string":
432
436
  if (e == "0")
433
437
  return this.ZERO;
434
- if (e = e.trim(), !Dt.test(e))
438
+ if (e = e.trim(), !Rt.test(e))
435
439
  throw new Error("string is no integer");
436
- let [t, n, i] = Bt(e);
440
+ let [t, n, r] = xt(e);
437
441
  if (t) {
438
- if (i > xe || i == xe && n != 0)
442
+ if (r > Ue || r == Ue && n != 0)
439
443
  throw new Error("signed long too small");
440
- } else if (i >= xe)
444
+ } else if (r >= Ue)
441
445
  throw new Error("signed long too large");
442
- let s = new B(n, i);
446
+ let s = new C(n, r);
443
447
  return t ? s.negate() : s;
444
448
  case "number":
445
449
  if (e == 0)
446
450
  return this.ZERO;
447
451
  if (!Number.isSafeInteger(e))
448
452
  throw new Error("number is no integer");
449
- return e > 0 ? new B(e, e / je) : new B(-e, -e / je).negate();
453
+ return e > 0 ? new C(e, e / Ke) : new C(-e, -e / Ke).negate();
450
454
  }
451
455
  throw new Error("unknown value " + typeof e);
452
456
  }
@@ -454,7 +458,7 @@ class B extends Ct {
454
458
  * Do we have a minus sign?
455
459
  */
456
460
  isNegative() {
457
- return (this.hi & xe) !== 0;
461
+ return (this.hi & Ue) !== 0;
458
462
  }
459
463
  /**
460
464
  * Negate two's complement.
@@ -462,38 +466,38 @@ class B extends Ct {
462
466
  */
463
467
  negate() {
464
468
  let e = ~this.hi, t = this.lo;
465
- return t ? t = ~t + 1 : e += 1, new B(t, e);
469
+ return t ? t = ~t + 1 : e += 1, new C(t, e);
466
470
  }
467
471
  /**
468
472
  * Convert to decimal string.
469
473
  */
470
474
  toString() {
471
- if (T)
475
+ if (A)
472
476
  return this.toBigInt().toString();
473
477
  if (this.isNegative()) {
474
478
  let e = this.negate();
475
- return "-" + et(e.lo, e.hi);
479
+ return "-" + rt(e.lo, e.hi);
476
480
  }
477
- return et(this.lo, this.hi);
481
+ return rt(this.lo, this.hi);
478
482
  }
479
483
  /**
480
484
  * Convert to native bigint.
481
485
  */
482
486
  toBigInt() {
483
- return _t(T), T.V.setInt32(0, this.lo, !0), T.V.setInt32(4, this.hi, !0), T.V.getBigInt64(0, !0);
487
+ return Dt(A), A.V.setInt32(0, this.lo, !0), A.V.setInt32(4, this.hi, !0), A.V.getBigInt64(0, !0);
484
488
  }
485
489
  }
486
- B.ZERO = new B(0, 0);
487
- const mt = {
490
+ C.ZERO = new C(0, 0);
491
+ const bt = {
488
492
  readUnknownField: !0,
489
- readerFactory: (r) => new ln(r)
493
+ readerFactory: (i) => new un(i)
490
494
  };
491
- function an(r) {
492
- return r ? Object.assign(Object.assign({}, mt), r) : mt;
495
+ function hn(i) {
496
+ return i ? Object.assign(Object.assign({}, bt), i) : bt;
493
497
  }
494
- class ln {
498
+ class un {
495
499
  constructor(e, t) {
496
- this.varint64 = rn, this.uint32 = sn, 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", {
500
+ this.varint64 = an, this.uint32 = ln, 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", {
497
501
  fatal: !0,
498
502
  ignoreBOM: !0
499
503
  });
@@ -514,23 +518,23 @@ class ln {
514
518
  skip(e) {
515
519
  let t = this.pos;
516
520
  switch (e) {
517
- case m.Varint:
521
+ case p.Varint:
518
522
  for (; this.buf[this.pos++] & 128; )
519
523
  ;
520
524
  break;
521
- case m.Bit64:
525
+ case p.Bit64:
522
526
  this.pos += 4;
523
- case m.Bit32:
527
+ case p.Bit32:
524
528
  this.pos += 4;
525
529
  break;
526
- case m.LengthDelimited:
530
+ case p.LengthDelimited:
527
531
  let n = this.uint32();
528
532
  this.pos += n;
529
533
  break;
530
- case m.StartGroup:
531
- let i;
532
- for (; (i = this.tag()[1]) !== m.EndGroup; )
533
- this.skip(i);
534
+ case p.StartGroup:
535
+ let r;
536
+ for (; (r = this.tag()[1]) !== p.EndGroup; )
537
+ this.skip(r);
534
538
  break;
535
539
  default:
536
540
  throw new Error("cant skip wire type " + e);
@@ -561,20 +565,20 @@ class ln {
561
565
  * Read a `int64` field, a signed 64-bit varint.
562
566
  */
563
567
  int64() {
564
- return new B(...this.varint64());
568
+ return new C(...this.varint64());
565
569
  }
566
570
  /**
567
571
  * Read a `uint64` field, an unsigned 64-bit varint.
568
572
  */
569
573
  uint64() {
570
- return new S(...this.varint64());
574
+ return new U(...this.varint64());
571
575
  }
572
576
  /**
573
577
  * Read a `sint64` field, a signed, zig-zag-encoded 64-bit varint.
574
578
  */
575
579
  sint64() {
576
580
  let [e, t] = this.varint64(), n = -(e & 1);
577
- return e = (e >>> 1 | (t & 1) << 31) ^ n, t = t >>> 1 ^ n, new B(e, t);
581
+ return e = (e >>> 1 | (t & 1) << 31) ^ n, t = t >>> 1 ^ n, new C(e, t);
578
582
  }
579
583
  /**
580
584
  * Read a `bool` field, a variant.
@@ -599,13 +603,13 @@ class ln {
599
603
  * Read a `fixed64` field, an unsigned, fixed-length 64 bit integer.
600
604
  */
601
605
  fixed64() {
602
- return new S(this.sfixed32(), this.sfixed32());
606
+ return new U(this.sfixed32(), this.sfixed32());
603
607
  }
604
608
  /**
605
609
  * Read a `fixed64` field, a signed, fixed-length 64-bit integer.
606
610
  */
607
611
  sfixed64() {
608
- return new B(this.sfixed32(), this.sfixed32());
612
+ return new C(this.sfixed32(), this.sfixed32());
609
613
  }
610
614
  /**
611
615
  * Read a `float` field, 32-bit floating point number.
@@ -633,37 +637,37 @@ class ln {
633
637
  return this.textDecoder.decode(this.bytes());
634
638
  }
635
639
  }
636
- function w(r, e) {
637
- if (!r)
640
+ function y(i, e) {
641
+ if (!i)
638
642
  throw new Error(e);
639
643
  }
640
- const cn = 34028234663852886e22, hn = -34028234663852886e22, un = 4294967295, dn = 2147483647, fn = -2147483648;
641
- function Oe(r) {
642
- if (typeof r != "number")
643
- throw new Error("invalid int 32: " + typeof r);
644
- if (!Number.isInteger(r) || r > dn || r < fn)
645
- throw new Error("invalid int 32: " + r);
644
+ const dn = 34028234663852886e22, fn = -34028234663852886e22, mn = 4294967295, pn = 2147483647, gn = -2147483648;
645
+ function Ce(i) {
646
+ if (typeof i != "number")
647
+ throw new Error("invalid int 32: " + typeof i);
648
+ if (!Number.isInteger(i) || i > pn || i < gn)
649
+ throw new Error("invalid int 32: " + i);
646
650
  }
647
- function We(r) {
648
- if (typeof r != "number")
649
- throw new Error("invalid uint 32: " + typeof r);
650
- if (!Number.isInteger(r) || r > un || r < 0)
651
- throw new Error("invalid uint 32: " + r);
651
+ function Xe(i) {
652
+ if (typeof i != "number")
653
+ throw new Error("invalid uint 32: " + typeof i);
654
+ if (!Number.isInteger(i) || i > mn || i < 0)
655
+ throw new Error("invalid uint 32: " + i);
652
656
  }
653
- function it(r) {
654
- if (typeof r != "number")
655
- throw new Error("invalid float 32: " + typeof r);
656
- if (Number.isFinite(r) && (r > cn || r < hn))
657
- throw new Error("invalid float 32: " + r);
657
+ function lt(i) {
658
+ if (typeof i != "number")
659
+ throw new Error("invalid float 32: " + typeof i);
660
+ if (Number.isFinite(i) && (i > dn || i < fn))
661
+ throw new Error("invalid float 32: " + i);
658
662
  }
659
- const pt = {
663
+ const yt = {
660
664
  writeUnknownFields: !0,
661
- writerFactory: () => new pn()
665
+ writerFactory: () => new bn()
662
666
  };
663
- function mn(r) {
664
- return r ? Object.assign(Object.assign({}, pt), r) : pt;
667
+ function wn(i) {
668
+ return i ? Object.assign(Object.assign({}, yt), i) : yt;
665
669
  }
666
- class pn {
670
+ class bn {
667
671
  constructor(e) {
668
672
  this.stack = [], this.textEncoder = e ?? new TextEncoder(), this.chunks = [], this.buf = [];
669
673
  }
@@ -673,11 +677,11 @@ class pn {
673
677
  finish() {
674
678
  this.chunks.push(new Uint8Array(this.buf));
675
679
  let e = 0;
676
- for (let i = 0; i < this.chunks.length; i++)
677
- e += this.chunks[i].length;
680
+ for (let r = 0; r < this.chunks.length; r++)
681
+ e += this.chunks[r].length;
678
682
  let t = new Uint8Array(e), n = 0;
679
- for (let i = 0; i < this.chunks.length; i++)
680
- t.set(this.chunks[i], n), n += this.chunks[i].length;
683
+ for (let r = 0; r < this.chunks.length; r++)
684
+ t.set(this.chunks[r], n), n += this.chunks[r].length;
681
685
  return this.chunks = [], t;
682
686
  }
683
687
  /**
@@ -719,7 +723,7 @@ class pn {
719
723
  * Write a `uint32` value, an unsigned 32 bit varint.
720
724
  */
721
725
  uint32(e) {
722
- for (We(e); e > 127; )
726
+ for (Xe(e); e > 127; )
723
727
  this.buf.push(e & 127 | 128), e = e >>> 7;
724
728
  return this.buf.push(e), this;
725
729
  }
@@ -727,7 +731,7 @@ class pn {
727
731
  * Write a `int32` value, a signed 32 bit varint.
728
732
  */
729
733
  int32(e) {
730
- return Oe(e), ft(e, this.buf), this;
734
+ return Ce(e), wt(e, this.buf), this;
731
735
  }
732
736
  /**
733
737
  * Write a `bool` value, a variant.
@@ -752,7 +756,7 @@ class pn {
752
756
  * Write a `float` value, 32-bit floating point number.
753
757
  */
754
758
  float(e) {
755
- it(e);
759
+ lt(e);
756
760
  let t = new Uint8Array(4);
757
761
  return new DataView(t.buffer).setFloat32(0, e, !0), this.raw(t);
758
762
  }
@@ -767,7 +771,7 @@ class pn {
767
771
  * Write a `fixed32` value, an unsigned, fixed-length 32-bit integer.
768
772
  */
769
773
  fixed32(e) {
770
- We(e);
774
+ Xe(e);
771
775
  let t = new Uint8Array(4);
772
776
  return new DataView(t.buffer).setUint32(0, e, !0), this.raw(t);
773
777
  }
@@ -775,7 +779,7 @@ class pn {
775
779
  * Write a `sfixed32` value, a signed, fixed-length 32-bit integer.
776
780
  */
777
781
  sfixed32(e) {
778
- Oe(e);
782
+ Ce(e);
779
783
  let t = new Uint8Array(4);
780
784
  return new DataView(t.buffer).setInt32(0, e, !0), this.raw(t);
781
785
  }
@@ -783,102 +787,102 @@ class pn {
783
787
  * Write a `sint32` value, a signed, zigzag-encoded 32-bit varint.
784
788
  */
785
789
  sint32(e) {
786
- return Oe(e), e = (e << 1 ^ e >> 31) >>> 0, ft(e, this.buf), this;
790
+ return Ce(e), e = (e << 1 ^ e >> 31) >>> 0, wt(e, this.buf), this;
787
791
  }
788
792
  /**
789
793
  * Write a `fixed64` value, a signed, fixed-length 64-bit integer.
790
794
  */
791
795
  sfixed64(e) {
792
- let t = new Uint8Array(8), n = new DataView(t.buffer), i = B.from(e);
793
- return n.setInt32(0, i.lo, !0), n.setInt32(4, i.hi, !0), this.raw(t);
796
+ let t = new Uint8Array(8), n = new DataView(t.buffer), r = C.from(e);
797
+ return n.setInt32(0, r.lo, !0), n.setInt32(4, r.hi, !0), this.raw(t);
794
798
  }
795
799
  /**
796
800
  * Write a `fixed64` value, an unsigned, fixed-length 64 bit integer.
797
801
  */
798
802
  fixed64(e) {
799
- let t = new Uint8Array(8), n = new DataView(t.buffer), i = S.from(e);
800
- return n.setInt32(0, i.lo, !0), n.setInt32(4, i.hi, !0), this.raw(t);
803
+ let t = new Uint8Array(8), n = new DataView(t.buffer), r = U.from(e);
804
+ return n.setInt32(0, r.lo, !0), n.setInt32(4, r.hi, !0), this.raw(t);
801
805
  }
802
806
  /**
803
807
  * Write a `int64` value, a signed 64-bit varint.
804
808
  */
805
809
  int64(e) {
806
- let t = B.from(e);
807
- return Ge(t.lo, t.hi, this.buf), this;
810
+ let t = C.from(e);
811
+ return ze(t.lo, t.hi, this.buf), this;
808
812
  }
809
813
  /**
810
814
  * Write a `sint64` value, a signed, zig-zag-encoded 64-bit varint.
811
815
  */
812
816
  sint64(e) {
813
- let t = B.from(e), n = t.hi >> 31, i = t.lo << 1 ^ n, s = (t.hi << 1 | t.lo >>> 31) ^ n;
814
- return Ge(i, s, this.buf), this;
817
+ let t = C.from(e), n = t.hi >> 31, r = t.lo << 1 ^ n, s = (t.hi << 1 | t.lo >>> 31) ^ n;
818
+ return ze(r, s, this.buf), this;
815
819
  }
816
820
  /**
817
821
  * Write a `uint64` value, an unsigned 64-bit varint.
818
822
  */
819
823
  uint64(e) {
820
- let t = S.from(e);
821
- return Ge(t.lo, t.hi, this.buf), this;
824
+ let t = U.from(e);
825
+ return ze(t.lo, t.hi, this.buf), this;
822
826
  }
823
827
  }
824
- const gt = {
828
+ const Nt = {
825
829
  emitDefaultValues: !1,
826
830
  enumAsInteger: !1,
827
831
  useProtoFieldName: !1,
828
832
  prettySpaces: 0
829
- }, bt = {
833
+ }, kt = {
830
834
  ignoreUnknownFields: !1
831
835
  };
832
- function gn(r) {
833
- return r ? Object.assign(Object.assign({}, bt), r) : bt;
836
+ function yn(i) {
837
+ return i ? Object.assign(Object.assign({}, kt), i) : kt;
834
838
  }
835
- function bn(r) {
836
- return r ? Object.assign(Object.assign({}, gt), r) : gt;
839
+ function Nn(i) {
840
+ return i ? Object.assign(Object.assign({}, Nt), i) : Nt;
837
841
  }
838
- function wn(r, e) {
842
+ function kn(i, e) {
839
843
  var t, n;
840
- let i = Object.assign(Object.assign({}, r), e);
841
- return i.typeRegistry = [...(t = r == null ? void 0 : r.typeRegistry) !== null && t !== void 0 ? t : [], ...(n = e == null ? void 0 : e.typeRegistry) !== null && n !== void 0 ? n : []], i;
844
+ let r = Object.assign(Object.assign({}, i), e);
845
+ 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;
842
846
  }
843
- const Ut = Symbol.for("protobuf-ts/message-type");
844
- function tt(r) {
847
+ const St = Symbol.for("protobuf-ts/message-type");
848
+ function st(i) {
845
849
  let e = !1;
846
850
  const t = [];
847
- for (let n = 0; n < r.length; n++) {
848
- let i = r.charAt(n);
849
- i == "_" ? e = !0 : /\d/.test(i) ? (t.push(i), e = !0) : e ? (t.push(i.toUpperCase()), e = !1) : n == 0 ? t.push(i.toLowerCase()) : t.push(i);
851
+ for (let n = 0; n < i.length; n++) {
852
+ let r = i.charAt(n);
853
+ r == "_" ? e = !0 : /\d/.test(r) ? (t.push(r), e = !0) : e ? (t.push(r.toUpperCase()), e = !1) : n == 0 ? t.push(r.toLowerCase()) : t.push(r);
850
854
  }
851
855
  return t.join("");
852
856
  }
853
857
  var h;
854
- (function(r) {
855
- r[r.DOUBLE = 1] = "DOUBLE", r[r.FLOAT = 2] = "FLOAT", r[r.INT64 = 3] = "INT64", r[r.UINT64 = 4] = "UINT64", r[r.INT32 = 5] = "INT32", r[r.FIXED64 = 6] = "FIXED64", r[r.FIXED32 = 7] = "FIXED32", r[r.BOOL = 8] = "BOOL", r[r.STRING = 9] = "STRING", r[r.BYTES = 12] = "BYTES", r[r.UINT32 = 13] = "UINT32", r[r.SFIXED32 = 15] = "SFIXED32", r[r.SFIXED64 = 16] = "SFIXED64", r[r.SINT32 = 17] = "SINT32", r[r.SINT64 = 18] = "SINT64";
858
+ (function(i) {
859
+ i[i.DOUBLE = 1] = "DOUBLE", i[i.FLOAT = 2] = "FLOAT", i[i.INT64 = 3] = "INT64", i[i.UINT64 = 4] = "UINT64", i[i.INT32 = 5] = "INT32", i[i.FIXED64 = 6] = "FIXED64", i[i.FIXED32 = 7] = "FIXED32", i[i.BOOL = 8] = "BOOL", i[i.STRING = 9] = "STRING", i[i.BYTES = 12] = "BYTES", i[i.UINT32 = 13] = "UINT32", i[i.SFIXED32 = 15] = "SFIXED32", i[i.SFIXED64 = 16] = "SFIXED64", i[i.SINT32 = 17] = "SINT32", i[i.SINT64 = 18] = "SINT64";
856
860
  })(h || (h = {}));
857
- var z;
858
- (function(r) {
859
- r[r.BIGINT = 0] = "BIGINT", r[r.STRING = 1] = "STRING", r[r.NUMBER = 2] = "NUMBER";
860
- })(z || (z = {}));
861
- var qe;
862
- (function(r) {
863
- r[r.NO = 0] = "NO", r[r.PACKED = 1] = "PACKED", r[r.UNPACKED = 2] = "UNPACKED";
864
- })(qe || (qe = {}));
865
- function yn(r) {
866
- var e, t, n, i;
867
- return r.localName = (e = r.localName) !== null && e !== void 0 ? e : tt(r.name), r.jsonName = (t = r.jsonName) !== null && t !== void 0 ? t : tt(r.name), r.repeat = (n = r.repeat) !== null && n !== void 0 ? n : qe.NO, r.opt = (i = r.opt) !== null && i !== void 0 ? i : r.repeat || r.oneof ? !1 : r.kind == "message", r;
861
+ var Q;
862
+ (function(i) {
863
+ i[i.BIGINT = 0] = "BIGINT", i[i.STRING = 1] = "STRING", i[i.NUMBER = 2] = "NUMBER";
864
+ })(Q || (Q = {}));
865
+ var He;
866
+ (function(i) {
867
+ i[i.NO = 0] = "NO", i[i.PACKED = 1] = "PACKED", i[i.UNPACKED = 2] = "UNPACKED";
868
+ })(He || (He = {}));
869
+ function En(i) {
870
+ var e, t, n, r;
871
+ return i.localName = (e = i.localName) !== null && e !== void 0 ? e : st(i.name), i.jsonName = (t = i.jsonName) !== null && t !== void 0 ? t : st(i.name), i.repeat = (n = i.repeat) !== null && n !== void 0 ? n : He.NO, i.opt = (r = i.opt) !== null && r !== void 0 ? r : i.repeat || i.oneof ? !1 : i.kind == "message", i;
868
872
  }
869
- function Nn(r) {
870
- if (typeof r != "object" || r === null || !r.hasOwnProperty("oneofKind"))
873
+ function In(i) {
874
+ if (typeof i != "object" || i === null || !i.hasOwnProperty("oneofKind"))
871
875
  return !1;
872
- switch (typeof r.oneofKind) {
876
+ switch (typeof i.oneofKind) {
873
877
  case "string":
874
- return r[r.oneofKind] === void 0 ? !1 : Object.keys(r).length == 2;
878
+ return i[i.oneofKind] === void 0 ? !1 : Object.keys(i).length == 2;
875
879
  case "undefined":
876
- return Object.keys(r).length == 1;
880
+ return Object.keys(i).length == 1;
877
881
  default:
878
882
  return !1;
879
883
  }
880
884
  }
881
- class kn {
885
+ class An {
882
886
  constructor(e) {
883
887
  var t;
884
888
  this.fields = (t = e.fields) !== null && t !== void 0 ? t : [];
@@ -887,20 +891,20 @@ class kn {
887
891
  if (this.data)
888
892
  return;
889
893
  const e = [], t = [], n = [];
890
- for (let i of this.fields)
891
- if (i.oneof)
892
- n.includes(i.oneof) || (n.push(i.oneof), e.push(i.oneof), t.push(i.oneof));
894
+ for (let r of this.fields)
895
+ if (r.oneof)
896
+ n.includes(r.oneof) || (n.push(r.oneof), e.push(r.oneof), t.push(r.oneof));
893
897
  else
894
- switch (t.push(i.localName), i.kind) {
898
+ switch (t.push(r.localName), r.kind) {
895
899
  case "scalar":
896
900
  case "enum":
897
- (!i.opt || i.repeat) && e.push(i.localName);
901
+ (!r.opt || r.repeat) && e.push(r.localName);
898
902
  break;
899
903
  case "message":
900
- i.repeat && e.push(i.localName);
904
+ r.repeat && e.push(r.localName);
901
905
  break;
902
906
  case "map":
903
- e.push(i.localName);
907
+ e.push(r.localName);
904
908
  break;
905
909
  }
906
910
  this.data = { req: e, known: t, oneofs: Object.values(n) };
@@ -931,14 +935,14 @@ class kn {
931
935
  if (e == null || typeof e != "object")
932
936
  return !1;
933
937
  this.prepare();
934
- let i = Object.keys(e), s = this.data;
935
- if (i.length < s.req.length || s.req.some((o) => !i.includes(o)) || !n && i.some((o) => !s.known.includes(o)))
938
+ let r = Object.keys(e), s = this.data;
939
+ if (r.length < s.req.length || s.req.some((o) => !r.includes(o)) || !n && r.some((o) => !s.known.includes(o)))
936
940
  return !1;
937
941
  if (t < 1)
938
942
  return !0;
939
943
  for (const o of s.oneofs) {
940
944
  const a = e[o];
941
- if (!Nn(a))
945
+ if (!In(a))
942
946
  return !1;
943
947
  if (a.oneofKind === void 0)
944
948
  continue;
@@ -951,54 +955,54 @@ class kn {
951
955
  return !1;
952
956
  return !0;
953
957
  }
954
- field(e, t, n, i) {
958
+ field(e, t, n, r) {
955
959
  let s = t.repeat;
956
960
  switch (t.kind) {
957
961
  case "scalar":
958
- return e === void 0 ? t.opt : s ? this.scalars(e, t.T, i, t.L) : this.scalar(e, t.T, t.L);
962
+ return e === void 0 ? t.opt : s ? this.scalars(e, t.T, r, t.L) : this.scalar(e, t.T, t.L);
959
963
  case "enum":
960
- return e === void 0 ? t.opt : s ? this.scalars(e, h.INT32, i) : this.scalar(e, h.INT32);
964
+ return e === void 0 ? t.opt : s ? this.scalars(e, h.INT32, r) : this.scalar(e, h.INT32);
961
965
  case "message":
962
- return e === void 0 ? !0 : s ? this.messages(e, t.T(), n, i) : this.message(e, t.T(), n, i);
966
+ return e === void 0 ? !0 : s ? this.messages(e, t.T(), n, r) : this.message(e, t.T(), n, r);
963
967
  case "map":
964
968
  if (typeof e != "object" || e === null)
965
969
  return !1;
966
- if (i < 2)
970
+ if (r < 2)
967
971
  return !0;
968
- if (!this.mapKeys(e, t.K, i))
972
+ if (!this.mapKeys(e, t.K, r))
969
973
  return !1;
970
974
  switch (t.V.kind) {
971
975
  case "scalar":
972
- return this.scalars(Object.values(e), t.V.T, i, t.V.L);
976
+ return this.scalars(Object.values(e), t.V.T, r, t.V.L);
973
977
  case "enum":
974
- return this.scalars(Object.values(e), h.INT32, i);
978
+ return this.scalars(Object.values(e), h.INT32, r);
975
979
  case "message":
976
- return this.messages(Object.values(e), t.V.T(), n, i);
980
+ return this.messages(Object.values(e), t.V.T(), n, r);
977
981
  }
978
982
  break;
979
983
  }
980
984
  return !0;
981
985
  }
982
- message(e, t, n, i) {
983
- return n ? t.isAssignable(e, i) : t.is(e, i);
986
+ message(e, t, n, r) {
987
+ return n ? t.isAssignable(e, r) : t.is(e, r);
984
988
  }
985
- messages(e, t, n, i) {
989
+ messages(e, t, n, r) {
986
990
  if (!Array.isArray(e))
987
991
  return !1;
988
- if (i < 2)
992
+ if (r < 2)
989
993
  return !0;
990
994
  if (n) {
991
- for (let s = 0; s < e.length && s < i; s++)
992
- if (!t.isAssignable(e[s], i - 1))
995
+ for (let s = 0; s < e.length && s < r; s++)
996
+ if (!t.isAssignable(e[s], r - 1))
993
997
  return !1;
994
998
  } else
995
- for (let s = 0; s < e.length && s < i; s++)
996
- if (!t.is(e[s], i - 1))
999
+ for (let s = 0; s < e.length && s < r; s++)
1000
+ if (!t.is(e[s], r - 1))
997
1001
  return !1;
998
1002
  return !0;
999
1003
  }
1000
1004
  scalar(e, t, n) {
1001
- let i = typeof e;
1005
+ let r = typeof e;
1002
1006
  switch (t) {
1003
1007
  case h.UINT64:
1004
1008
  case h.FIXED64:
@@ -1006,65 +1010,65 @@ class kn {
1006
1010
  case h.SFIXED64:
1007
1011
  case h.SINT64:
1008
1012
  switch (n) {
1009
- case z.BIGINT:
1010
- return i == "bigint";
1011
- case z.NUMBER:
1012
- return i == "number" && !isNaN(e);
1013
+ case Q.BIGINT:
1014
+ return r == "bigint";
1015
+ case Q.NUMBER:
1016
+ return r == "number" && !isNaN(e);
1013
1017
  default:
1014
- return i == "string";
1018
+ return r == "string";
1015
1019
  }
1016
1020
  case h.BOOL:
1017
- return i == "boolean";
1021
+ return r == "boolean";
1018
1022
  case h.STRING:
1019
- return i == "string";
1023
+ return r == "string";
1020
1024
  case h.BYTES:
1021
1025
  return e instanceof Uint8Array;
1022
1026
  case h.DOUBLE:
1023
1027
  case h.FLOAT:
1024
- return i == "number" && !isNaN(e);
1028
+ return r == "number" && !isNaN(e);
1025
1029
  default:
1026
- return i == "number" && Number.isInteger(e);
1030
+ return r == "number" && Number.isInteger(e);
1027
1031
  }
1028
1032
  }
1029
- scalars(e, t, n, i) {
1033
+ scalars(e, t, n, r) {
1030
1034
  if (!Array.isArray(e))
1031
1035
  return !1;
1032
1036
  if (n < 2)
1033
1037
  return !0;
1034
1038
  if (Array.isArray(e)) {
1035
1039
  for (let s = 0; s < e.length && s < n; s++)
1036
- if (!this.scalar(e[s], t, i))
1040
+ if (!this.scalar(e[s], t, r))
1037
1041
  return !1;
1038
1042
  }
1039
1043
  return !0;
1040
1044
  }
1041
1045
  mapKeys(e, t, n) {
1042
- let i = Object.keys(e);
1046
+ let r = Object.keys(e);
1043
1047
  switch (t) {
1044
1048
  case h.INT32:
1045
1049
  case h.FIXED32:
1046
1050
  case h.SFIXED32:
1047
1051
  case h.SINT32:
1048
1052
  case h.UINT32:
1049
- return this.scalars(i.slice(0, n).map((s) => parseInt(s)), t, n);
1053
+ return this.scalars(r.slice(0, n).map((s) => parseInt(s)), t, n);
1050
1054
  case h.BOOL:
1051
- return this.scalars(i.slice(0, n).map((s) => s == "true" ? !0 : s == "false" ? !1 : s), t, n);
1055
+ return this.scalars(r.slice(0, n).map((s) => s == "true" ? !0 : s == "false" ? !1 : s), t, n);
1052
1056
  default:
1053
- return this.scalars(i, t, n, z.STRING);
1057
+ return this.scalars(r, t, n, Q.STRING);
1054
1058
  }
1055
1059
  }
1056
1060
  }
1057
- function X(r, e) {
1061
+ function X(i, e) {
1058
1062
  switch (e) {
1059
- case z.BIGINT:
1060
- return r.toBigInt();
1061
- case z.NUMBER:
1062
- return r.toNumber();
1063
+ case Q.BIGINT:
1064
+ return i.toBigInt();
1065
+ case Q.NUMBER:
1066
+ return i.toNumber();
1063
1067
  default:
1064
- return r.toString();
1068
+ return i.toString();
1065
1069
  }
1066
1070
  }
1067
- class En {
1071
+ class Tn {
1068
1072
  constructor(e) {
1069
1073
  this.info = e;
1070
1074
  }
@@ -1080,8 +1084,8 @@ class En {
1080
1084
  // Cannot parse JSON <type of jsonValue> for <type name>#<fieldName>.
1081
1085
  assert(e, t, n) {
1082
1086
  if (!e) {
1083
- let i = Ft(n);
1084
- throw (i == "number" || i == "boolean") && (i = n.toString()), new Error(`Cannot parse JSON ${i} for ${this.info.typeName}#${t}`);
1087
+ let r = Ct(n);
1088
+ throw (r == "number" || r == "boolean") && (r = n.toString()), new Error(`Cannot parse JSON ${r} for ${this.info.typeName}#${t}`);
1085
1089
  }
1086
1090
  }
1087
1091
  /**
@@ -1095,7 +1099,7 @@ class En {
1095
1099
  */
1096
1100
  read(e, t, n) {
1097
1101
  this.prepare();
1098
- const i = [];
1102
+ const r = [];
1099
1103
  for (const [s, o] of Object.entries(e)) {
1100
1104
  const a = this.fMap[s];
1101
1105
  if (!a) {
@@ -1108,9 +1112,9 @@ class En {
1108
1112
  if (a.oneof) {
1109
1113
  if (o === null && (a.kind !== "enum" || a.T()[0] !== "google.protobuf.NullValue"))
1110
1114
  continue;
1111
- if (i.includes(a.oneof))
1115
+ if (r.includes(a.oneof))
1112
1116
  throw new Error(`Multiple members of the oneof group "${a.oneof}" of ${this.info.typeName} are present in JSON.`);
1113
- i.push(a.oneof), c = t[a.oneof] = {
1117
+ r.push(a.oneof), c = t[a.oneof] = {
1114
1118
  oneofKind: l
1115
1119
  };
1116
1120
  } else
@@ -1118,26 +1122,26 @@ class En {
1118
1122
  if (a.kind == "map") {
1119
1123
  if (o === null)
1120
1124
  continue;
1121
- this.assert(tn(o), a.name, o);
1125
+ this.assert(sn(o), a.name, o);
1122
1126
  const d = c[l];
1123
- for (const [g, y] of Object.entries(o)) {
1124
- this.assert(y !== null, a.name + " map value", null);
1125
- let O;
1127
+ for (const [g, N] of Object.entries(o)) {
1128
+ this.assert(N !== null, a.name + " map value", null);
1129
+ let L;
1126
1130
  switch (a.V.kind) {
1127
1131
  case "message":
1128
- O = a.V.T().internalJsonRead(y, n);
1132
+ L = a.V.T().internalJsonRead(N, n);
1129
1133
  break;
1130
1134
  case "enum":
1131
- if (O = this.enum(a.V.T(), y, a.name, n.ignoreUnknownFields), O === !1)
1135
+ if (L = this.enum(a.V.T(), N, a.name, n.ignoreUnknownFields), L === !1)
1132
1136
  continue;
1133
1137
  break;
1134
1138
  case "scalar":
1135
- O = this.scalar(y, a.V.T, a.V.L, a.name);
1139
+ L = this.scalar(N, a.V.T, a.V.L, a.name);
1136
1140
  break;
1137
1141
  }
1138
- this.assert(O !== void 0, a.name + " map value", y);
1139
- let F = g;
1140
- a.K == h.BOOL && (F = F == "true" ? !0 : F == "false" ? !1 : F), F = this.scalar(F, a.K, z.STRING, a.name).toString(), d[F] = O;
1142
+ this.assert(L !== void 0, a.name + " map value", N);
1143
+ let O = g;
1144
+ a.K == h.BOOL && (O = O == "true" ? !0 : O == "false" ? !1 : O), O = this.scalar(O, a.K, Q.STRING, a.name).toString(), d[O] = L;
1141
1145
  }
1142
1146
  } else if (a.repeat) {
1143
1147
  if (o === null)
@@ -1146,20 +1150,20 @@ class En {
1146
1150
  const d = c[l];
1147
1151
  for (const g of o) {
1148
1152
  this.assert(g !== null, a.name, null);
1149
- let y;
1153
+ let N;
1150
1154
  switch (a.kind) {
1151
1155
  case "message":
1152
- y = a.T().internalJsonRead(g, n);
1156
+ N = a.T().internalJsonRead(g, n);
1153
1157
  break;
1154
1158
  case "enum":
1155
- if (y = this.enum(a.T(), g, a.name, n.ignoreUnknownFields), y === !1)
1159
+ if (N = this.enum(a.T(), g, a.name, n.ignoreUnknownFields), N === !1)
1156
1160
  continue;
1157
1161
  break;
1158
1162
  case "scalar":
1159
- y = this.scalar(g, a.T, a.L, a.name);
1163
+ N = this.scalar(g, a.T, a.L, a.name);
1160
1164
  break;
1161
1165
  }
1162
- this.assert(y !== void 0, a.name, o), d.push(y);
1166
+ this.assert(N !== void 0, a.name, o), d.push(N);
1163
1167
  }
1164
1168
  } else
1165
1169
  switch (a.kind) {
@@ -1187,21 +1191,21 @@ class En {
1187
1191
  *
1188
1192
  * google.protobuf.NullValue accepts only JSON `null` (or the old `"NULL_VALUE"`).
1189
1193
  */
1190
- enum(e, t, n, i) {
1191
- if (e[0] == "google.protobuf.NullValue" && w(t === null || t === "NULL_VALUE", `Unable to parse field ${this.info.typeName}#${n}, enum ${e[0]} only accepts null.`), t === null)
1194
+ enum(e, t, n, r) {
1195
+ if (e[0] == "google.protobuf.NullValue" && y(t === null || t === "NULL_VALUE", `Unable to parse field ${this.info.typeName}#${n}, enum ${e[0]} only accepts null.`), t === null)
1192
1196
  return 0;
1193
1197
  switch (typeof t) {
1194
1198
  case "number":
1195
- return w(Number.isInteger(t), `Unable to parse field ${this.info.typeName}#${n}, enum can only be integral number, got ${t}.`), t;
1199
+ return y(Number.isInteger(t), `Unable to parse field ${this.info.typeName}#${n}, enum can only be integral number, got ${t}.`), t;
1196
1200
  case "string":
1197
1201
  let s = t;
1198
1202
  e[2] && t.substring(0, e[2].length) === e[2] && (s = t.substring(e[2].length));
1199
1203
  let o = e[1][s];
1200
- return typeof o > "u" && i ? !1 : (w(typeof o == "number", `Unable to parse field ${this.info.typeName}#${n}, enum ${e[0]} has no value for "${t}".`), o);
1204
+ return typeof o > "u" && r ? !1 : (y(typeof o == "number", `Unable to parse field ${this.info.typeName}#${n}, enum ${e[0]} has no value for "${t}".`), o);
1201
1205
  }
1202
- w(!1, `Unable to parse field ${this.info.typeName}#${n}, cannot parse enum value from ${typeof t}".`);
1206
+ y(!1, `Unable to parse field ${this.info.typeName}#${n}, cannot parse enum value from ${typeof t}".`);
1203
1207
  }
1204
- scalar(e, t, n, i) {
1208
+ scalar(e, t, n, r) {
1205
1209
  let s;
1206
1210
  try {
1207
1211
  switch (t) {
@@ -1234,7 +1238,7 @@ class En {
1234
1238
  s = "too large or small";
1235
1239
  break;
1236
1240
  }
1237
- return t == h.FLOAT && it(o), o;
1241
+ return t == h.FLOAT && lt(o), o;
1238
1242
  case h.INT32:
1239
1243
  case h.FIXED32:
1240
1244
  case h.SFIXED32:
@@ -1245,22 +1249,22 @@ class En {
1245
1249
  let a;
1246
1250
  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)
1247
1251
  break;
1248
- return t == h.UINT32 ? We(a) : Oe(a), a;
1252
+ return t == h.UINT32 ? Xe(a) : Ce(a), a;
1249
1253
  case h.INT64:
1250
1254
  case h.SFIXED64:
1251
1255
  case h.SINT64:
1252
1256
  if (e === null)
1253
- return X(B.ZERO, n);
1257
+ return X(C.ZERO, n);
1254
1258
  if (typeof e != "number" && typeof e != "string")
1255
1259
  break;
1256
- return X(B.from(e), n);
1260
+ return X(C.from(e), n);
1257
1261
  case h.FIXED64:
1258
1262
  case h.UINT64:
1259
1263
  if (e === null)
1260
- return X(S.ZERO, n);
1264
+ return X(U.ZERO, n);
1261
1265
  if (typeof e != "number" && typeof e != "string")
1262
1266
  break;
1263
- return X(S.from(e), n);
1267
+ return X(U.from(e), n);
1264
1268
  case h.BOOL:
1265
1269
  if (e === null)
1266
1270
  return !1;
@@ -1286,15 +1290,15 @@ class En {
1286
1290
  return new Uint8Array(0);
1287
1291
  if (typeof e != "string")
1288
1292
  break;
1289
- return Lt(e);
1293
+ return vt(e);
1290
1294
  }
1291
1295
  } catch (o) {
1292
1296
  s = o.message;
1293
1297
  }
1294
- this.assert(!1, i + (s ? " - " + s : ""), e);
1298
+ this.assert(!1, r + (s ? " - " + s : ""), e);
1295
1299
  }
1296
1300
  }
1297
- class In {
1301
+ class Fn {
1298
1302
  constructor(e) {
1299
1303
  var t;
1300
1304
  this.fields = (t = e.fields) !== null && t !== void 0 ? t : [];
@@ -1303,157 +1307,157 @@ class In {
1303
1307
  * Converts the message to a JSON object, based on the field descriptors.
1304
1308
  */
1305
1309
  write(e, t) {
1306
- const n = {}, i = e;
1310
+ const n = {}, r = e;
1307
1311
  for (const s of this.fields) {
1308
1312
  if (!s.oneof) {
1309
- let c = this.field(s, i[s.localName], t);
1313
+ let c = this.field(s, r[s.localName], t);
1310
1314
  c !== void 0 && (n[t.useProtoFieldName ? s.name : s.jsonName] = c);
1311
1315
  continue;
1312
1316
  }
1313
- const o = i[s.oneof];
1317
+ const o = r[s.oneof];
1314
1318
  if (o.oneofKind !== s.localName)
1315
1319
  continue;
1316
1320
  const a = s.kind == "scalar" || s.kind == "enum" ? Object.assign(Object.assign({}, t), { emitDefaultValues: !0 }) : t;
1317
1321
  let l = this.field(s, o[s.localName], a);
1318
- w(l !== void 0), n[t.useProtoFieldName ? s.name : s.jsonName] = l;
1322
+ y(l !== void 0), n[t.useProtoFieldName ? s.name : s.jsonName] = l;
1319
1323
  }
1320
1324
  return n;
1321
1325
  }
1322
1326
  field(e, t, n) {
1323
- let i;
1327
+ let r;
1324
1328
  if (e.kind == "map") {
1325
- w(typeof t == "object" && t !== null);
1329
+ y(typeof t == "object" && t !== null);
1326
1330
  const s = {};
1327
1331
  switch (e.V.kind) {
1328
1332
  case "scalar":
1329
1333
  for (const [l, c] of Object.entries(t)) {
1330
1334
  const d = this.scalar(e.V.T, c, e.name, !1, !0);
1331
- w(d !== void 0), s[l.toString()] = d;
1335
+ y(d !== void 0), s[l.toString()] = d;
1332
1336
  }
1333
1337
  break;
1334
1338
  case "message":
1335
1339
  const o = e.V.T();
1336
1340
  for (const [l, c] of Object.entries(t)) {
1337
1341
  const d = this.message(o, c, e.name, n);
1338
- w(d !== void 0), s[l.toString()] = d;
1342
+ y(d !== void 0), s[l.toString()] = d;
1339
1343
  }
1340
1344
  break;
1341
1345
  case "enum":
1342
1346
  const a = e.V.T();
1343
1347
  for (const [l, c] of Object.entries(t)) {
1344
- w(c === void 0 || typeof c == "number");
1348
+ y(c === void 0 || typeof c == "number");
1345
1349
  const d = this.enum(a, c, e.name, !1, !0, n.enumAsInteger);
1346
- w(d !== void 0), s[l.toString()] = d;
1350
+ y(d !== void 0), s[l.toString()] = d;
1347
1351
  }
1348
1352
  break;
1349
1353
  }
1350
- (n.emitDefaultValues || Object.keys(s).length > 0) && (i = s);
1354
+ (n.emitDefaultValues || Object.keys(s).length > 0) && (r = s);
1351
1355
  } else if (e.repeat) {
1352
- w(Array.isArray(t));
1356
+ y(Array.isArray(t));
1353
1357
  const s = [];
1354
1358
  switch (e.kind) {
1355
1359
  case "scalar":
1356
1360
  for (let l = 0; l < t.length; l++) {
1357
1361
  const c = this.scalar(e.T, t[l], e.name, e.opt, !0);
1358
- w(c !== void 0), s.push(c);
1362
+ y(c !== void 0), s.push(c);
1359
1363
  }
1360
1364
  break;
1361
1365
  case "enum":
1362
1366
  const o = e.T();
1363
1367
  for (let l = 0; l < t.length; l++) {
1364
- w(t[l] === void 0 || typeof t[l] == "number");
1368
+ y(t[l] === void 0 || typeof t[l] == "number");
1365
1369
  const c = this.enum(o, t[l], e.name, e.opt, !0, n.enumAsInteger);
1366
- w(c !== void 0), s.push(c);
1370
+ y(c !== void 0), s.push(c);
1367
1371
  }
1368
1372
  break;
1369
1373
  case "message":
1370
1374
  const a = e.T();
1371
1375
  for (let l = 0; l < t.length; l++) {
1372
1376
  const c = this.message(a, t[l], e.name, n);
1373
- w(c !== void 0), s.push(c);
1377
+ y(c !== void 0), s.push(c);
1374
1378
  }
1375
1379
  break;
1376
1380
  }
1377
- (n.emitDefaultValues || s.length > 0 || n.emitDefaultValues) && (i = s);
1381
+ (n.emitDefaultValues || s.length > 0 || n.emitDefaultValues) && (r = s);
1378
1382
  } else
1379
1383
  switch (e.kind) {
1380
1384
  case "scalar":
1381
- i = this.scalar(e.T, t, e.name, e.opt, n.emitDefaultValues);
1385
+ r = this.scalar(e.T, t, e.name, e.opt, n.emitDefaultValues);
1382
1386
  break;
1383
1387
  case "enum":
1384
- i = this.enum(e.T(), t, e.name, e.opt, n.emitDefaultValues, n.enumAsInteger);
1388
+ r = this.enum(e.T(), t, e.name, e.opt, n.emitDefaultValues, n.enumAsInteger);
1385
1389
  break;
1386
1390
  case "message":
1387
- i = this.message(e.T(), t, e.name, n);
1391
+ r = this.message(e.T(), t, e.name, n);
1388
1392
  break;
1389
1393
  }
1390
- return i;
1394
+ return r;
1391
1395
  }
1392
1396
  /**
1393
1397
  * Returns `null` as the default for google.protobuf.NullValue.
1394
1398
  */
1395
- enum(e, t, n, i, s, o) {
1399
+ enum(e, t, n, r, s, o) {
1396
1400
  if (e[0] == "google.protobuf.NullValue")
1397
- return !s && !i ? void 0 : null;
1401
+ return !s && !r ? void 0 : null;
1398
1402
  if (t === void 0) {
1399
- w(i);
1403
+ y(r);
1400
1404
  return;
1401
1405
  }
1402
- if (!(t === 0 && !s && !i))
1403
- return w(typeof t == "number"), w(Number.isInteger(t)), o || !e[1].hasOwnProperty(t) ? t : e[2] ? e[2] + e[1][t] : e[1][t];
1406
+ if (!(t === 0 && !s && !r))
1407
+ return y(typeof t == "number"), y(Number.isInteger(t)), o || !e[1].hasOwnProperty(t) ? t : e[2] ? e[2] + e[1][t] : e[1][t];
1404
1408
  }
1405
- message(e, t, n, i) {
1406
- return t === void 0 ? i.emitDefaultValues ? null : void 0 : e.internalJsonWrite(t, i);
1409
+ message(e, t, n, r) {
1410
+ return t === void 0 ? r.emitDefaultValues ? null : void 0 : e.internalJsonWrite(t, r);
1407
1411
  }
1408
- scalar(e, t, n, i, s) {
1412
+ scalar(e, t, n, r, s) {
1409
1413
  if (t === void 0) {
1410
- w(i);
1414
+ y(r);
1411
1415
  return;
1412
1416
  }
1413
- const o = s || i;
1417
+ const o = s || r;
1414
1418
  switch (e) {
1415
1419
  case h.INT32:
1416
1420
  case h.SFIXED32:
1417
1421
  case h.SINT32:
1418
- return t === 0 ? o ? 0 : void 0 : (Oe(t), t);
1422
+ return t === 0 ? o ? 0 : void 0 : (Ce(t), t);
1419
1423
  case h.FIXED32:
1420
1424
  case h.UINT32:
1421
- return t === 0 ? o ? 0 : void 0 : (We(t), t);
1425
+ return t === 0 ? o ? 0 : void 0 : (Xe(t), t);
1422
1426
  case h.FLOAT:
1423
- it(t);
1427
+ lt(t);
1424
1428
  case h.DOUBLE:
1425
- return t === 0 ? o ? 0 : void 0 : (w(typeof t == "number"), Number.isNaN(t) ? "NaN" : t === Number.POSITIVE_INFINITY ? "Infinity" : t === Number.NEGATIVE_INFINITY ? "-Infinity" : t);
1429
+ return t === 0 ? o ? 0 : void 0 : (y(typeof t == "number"), Number.isNaN(t) ? "NaN" : t === Number.POSITIVE_INFINITY ? "Infinity" : t === Number.NEGATIVE_INFINITY ? "-Infinity" : t);
1426
1430
  case h.STRING:
1427
- return t === "" ? o ? "" : void 0 : (w(typeof t == "string"), t);
1431
+ return t === "" ? o ? "" : void 0 : (y(typeof t == "string"), t);
1428
1432
  case h.BOOL:
1429
- return t === !1 ? o ? !1 : void 0 : (w(typeof t == "boolean"), t);
1433
+ return t === !1 ? o ? !1 : void 0 : (y(typeof t == "boolean"), t);
1430
1434
  case h.UINT64:
1431
1435
  case h.FIXED64:
1432
- w(typeof t == "number" || typeof t == "string" || typeof t == "bigint");
1433
- let a = S.from(t);
1436
+ y(typeof t == "number" || typeof t == "string" || typeof t == "bigint");
1437
+ let a = U.from(t);
1434
1438
  return a.isZero() && !o ? void 0 : a.toString();
1435
1439
  case h.INT64:
1436
1440
  case h.SFIXED64:
1437
1441
  case h.SINT64:
1438
- w(typeof t == "number" || typeof t == "string" || typeof t == "bigint");
1439
- let l = B.from(t);
1442
+ y(typeof t == "number" || typeof t == "string" || typeof t == "bigint");
1443
+ let l = C.from(t);
1440
1444
  return l.isZero() && !o ? void 0 : l.toString();
1441
1445
  case h.BYTES:
1442
- return w(t instanceof Uint8Array), t.byteLength ? Ot(t) : o ? "" : void 0;
1446
+ return y(t instanceof Uint8Array), t.byteLength ? _t(t) : o ? "" : void 0;
1443
1447
  }
1444
1448
  }
1445
1449
  }
1446
- function nt(r, e = z.STRING) {
1447
- switch (r) {
1450
+ function ot(i, e = Q.STRING) {
1451
+ switch (i) {
1448
1452
  case h.BOOL:
1449
1453
  return !1;
1450
1454
  case h.UINT64:
1451
1455
  case h.FIXED64:
1452
- return X(S.ZERO, e);
1456
+ return X(U.ZERO, e);
1453
1457
  case h.INT64:
1454
1458
  case h.SFIXED64:
1455
1459
  case h.SINT64:
1456
- return X(B.ZERO, e);
1460
+ return X(C.ZERO, e);
1457
1461
  case h.DOUBLE:
1458
1462
  case h.FLOAT:
1459
1463
  return 0;
@@ -1465,7 +1469,7 @@ function nt(r, e = z.STRING) {
1465
1469
  return 0;
1466
1470
  }
1467
1471
  }
1468
- class Tn {
1472
+ class Ln {
1469
1473
  constructor(e) {
1470
1474
  this.info = e;
1471
1475
  }
@@ -1485,17 +1489,17 @@ class Tn {
1485
1489
  * If a message field is already present, it will be merged with the
1486
1490
  * new data.
1487
1491
  */
1488
- read(e, t, n, i) {
1492
+ read(e, t, n, r) {
1489
1493
  this.prepare();
1490
- const s = i === void 0 ? e.len : e.pos + i;
1494
+ const s = r === void 0 ? e.len : e.pos + r;
1491
1495
  for (; e.pos < s; ) {
1492
1496
  const [o, a] = e.tag(), l = this.fieldNoToField.get(o);
1493
1497
  if (!l) {
1494
- let y = n.readUnknownField;
1495
- if (y == "throw")
1498
+ let N = n.readUnknownField;
1499
+ if (N == "throw")
1496
1500
  throw new Error(`Unknown field ${o} (wire type ${a}) for ${this.info.typeName}`);
1497
- let O = e.skip(a);
1498
- y !== !1 && (y === !0 ? N.onRead : y)(this.info.typeName, t, o, a, O);
1501
+ let L = e.skip(a);
1502
+ N !== !1 && (N === !0 ? k.onRead : N)(this.info.typeName, t, o, a, L);
1499
1503
  continue;
1500
1504
  }
1501
1505
  let c = t, d = l.repeat, g = l.localName;
@@ -1504,28 +1508,28 @@ class Tn {
1504
1508
  })), l.kind) {
1505
1509
  case "scalar":
1506
1510
  case "enum":
1507
- let y = l.kind == "enum" ? h.INT32 : l.T, O = l.kind == "scalar" ? l.L : void 0;
1511
+ let N = l.kind == "enum" ? h.INT32 : l.T, L = l.kind == "scalar" ? l.L : void 0;
1508
1512
  if (d) {
1509
- let A = c[g];
1510
- if (a == m.LengthDelimited && y != h.STRING && y != h.BYTES) {
1511
- let _ = e.uint32() + e.pos;
1512
- for (; e.pos < _; )
1513
- A.push(this.scalar(e, y, O));
1513
+ let T = c[g];
1514
+ if (a == p.LengthDelimited && N != h.STRING && N != h.BYTES) {
1515
+ let $ = e.uint32() + e.pos;
1516
+ for (; e.pos < $; )
1517
+ T.push(this.scalar(e, N, L));
1514
1518
  } else
1515
- A.push(this.scalar(e, y, O));
1519
+ T.push(this.scalar(e, N, L));
1516
1520
  } else
1517
- c[g] = this.scalar(e, y, O);
1521
+ c[g] = this.scalar(e, N, L);
1518
1522
  break;
1519
1523
  case "message":
1520
1524
  if (d) {
1521
- let A = c[g], _ = l.T().internalBinaryRead(e, e.uint32(), n);
1522
- A.push(_);
1525
+ let T = c[g], $ = l.T().internalBinaryRead(e, e.uint32(), n);
1526
+ T.push($);
1523
1527
  } else
1524
1528
  c[g] = l.T().internalBinaryRead(e, e.uint32(), n, c[g]);
1525
1529
  break;
1526
1530
  case "map":
1527
- let [F, q] = this.mapEntry(l, e, n);
1528
- c[g][F] = q;
1531
+ let [O, J] = this.mapEntry(l, e, n);
1532
+ c[g][O] = J;
1529
1533
  break;
1530
1534
  }
1531
1535
  }
@@ -1534,12 +1538,12 @@ class Tn {
1534
1538
  * Read a map field, expecting key field = 1, value field = 2
1535
1539
  */
1536
1540
  mapEntry(e, t, n) {
1537
- let i = t.uint32(), s = t.pos + i, o, a;
1541
+ let r = t.uint32(), s = t.pos + r, o, a;
1538
1542
  for (; t.pos < s; ) {
1539
1543
  let [l, c] = t.tag();
1540
1544
  switch (l) {
1541
1545
  case 1:
1542
- e.K == h.BOOL ? o = t.bool().toString() : o = this.scalar(t, e.K, z.STRING);
1546
+ e.K == h.BOOL ? o = t.bool().toString() : o = this.scalar(t, e.K, Q.STRING);
1543
1547
  break;
1544
1548
  case 2:
1545
1549
  switch (e.V.kind) {
@@ -1559,13 +1563,13 @@ class Tn {
1559
1563
  }
1560
1564
  }
1561
1565
  if (o === void 0) {
1562
- let l = nt(e.K);
1566
+ let l = ot(e.K);
1563
1567
  o = e.K == h.BOOL ? l.toString() : l;
1564
1568
  }
1565
1569
  if (a === void 0)
1566
1570
  switch (e.V.kind) {
1567
1571
  case "scalar":
1568
- a = nt(e.V.T, e.V.L);
1572
+ a = ot(e.V.T, e.V.L);
1569
1573
  break;
1570
1574
  case "enum":
1571
1575
  a = 0;
@@ -1611,7 +1615,7 @@ class Tn {
1611
1615
  }
1612
1616
  }
1613
1617
  }
1614
- class An {
1618
+ class On {
1615
1619
  constructor(e) {
1616
1620
  this.info = e;
1617
1621
  }
@@ -1640,44 +1644,44 @@ class An {
1640
1644
  case "enum":
1641
1645
  let d = s.kind == "enum" ? h.INT32 : s.T;
1642
1646
  if (l)
1643
- if (w(Array.isArray(o)), l == qe.PACKED)
1647
+ if (y(Array.isArray(o)), l == He.PACKED)
1644
1648
  this.packed(t, d, s.no, o);
1645
1649
  else
1646
1650
  for (const g of o)
1647
1651
  this.scalar(t, d, s.no, g, !0);
1648
- else o === void 0 ? w(s.opt) : this.scalar(t, d, s.no, o, a || s.opt);
1652
+ else o === void 0 ? y(s.opt) : this.scalar(t, d, s.no, o, a || s.opt);
1649
1653
  break;
1650
1654
  case "message":
1651
1655
  if (l) {
1652
- w(Array.isArray(o));
1656
+ y(Array.isArray(o));
1653
1657
  for (const g of o)
1654
1658
  this.message(t, n, s.T(), s.no, g);
1655
1659
  } else
1656
1660
  this.message(t, n, s.T(), s.no, o);
1657
1661
  break;
1658
1662
  case "map":
1659
- w(typeof o == "object" && o !== null);
1660
- for (const [g, y] of Object.entries(o))
1661
- this.mapEntry(t, n, s, g, y);
1663
+ y(typeof o == "object" && o !== null);
1664
+ for (const [g, N] of Object.entries(o))
1665
+ this.mapEntry(t, n, s, g, N);
1662
1666
  break;
1663
1667
  }
1664
1668
  }
1665
- let i = n.writeUnknownFields;
1666
- i !== !1 && (i === !0 ? N.onWrite : i)(this.info.typeName, e, t);
1669
+ let r = n.writeUnknownFields;
1670
+ r !== !1 && (r === !0 ? k.onWrite : r)(this.info.typeName, e, t);
1667
1671
  }
1668
- mapEntry(e, t, n, i, s) {
1669
- e.tag(n.no, m.LengthDelimited), e.fork();
1670
- let o = i;
1672
+ mapEntry(e, t, n, r, s) {
1673
+ e.tag(n.no, p.LengthDelimited), e.fork();
1674
+ let o = r;
1671
1675
  switch (n.K) {
1672
1676
  case h.INT32:
1673
1677
  case h.FIXED32:
1674
1678
  case h.UINT32:
1675
1679
  case h.SFIXED32:
1676
1680
  case h.SINT32:
1677
- o = Number.parseInt(i);
1681
+ o = Number.parseInt(r);
1678
1682
  break;
1679
1683
  case h.BOOL:
1680
- w(i == "true" || i == "false"), o = i == "true";
1684
+ y(r == "true" || r == "false"), o = r == "true";
1681
1685
  break;
1682
1686
  }
1683
1687
  switch (this.scalar(e, n.K, 1, o, !0), n.V.kind) {
@@ -1693,26 +1697,26 @@ class An {
1693
1697
  }
1694
1698
  e.join();
1695
1699
  }
1696
- message(e, t, n, i, s) {
1697
- s !== void 0 && (n.internalBinaryWrite(s, e.tag(i, m.LengthDelimited).fork(), t), e.join());
1700
+ message(e, t, n, r, s) {
1701
+ s !== void 0 && (n.internalBinaryWrite(s, e.tag(r, p.LengthDelimited).fork(), t), e.join());
1698
1702
  }
1699
1703
  /**
1700
1704
  * Write a single scalar value.
1701
1705
  */
1702
- scalar(e, t, n, i, s) {
1703
- let [o, a, l] = this.scalarInfo(t, i);
1704
- (!l || s) && (e.tag(n, o), e[a](i));
1706
+ scalar(e, t, n, r, s) {
1707
+ let [o, a, l] = this.scalarInfo(t, r);
1708
+ (!l || s) && (e.tag(n, o), e[a](r));
1705
1709
  }
1706
1710
  /**
1707
1711
  * Write an array of scalar values in packed format.
1708
1712
  */
1709
- packed(e, t, n, i) {
1710
- if (!i.length)
1713
+ packed(e, t, n, r) {
1714
+ if (!r.length)
1711
1715
  return;
1712
- w(t !== h.BYTES && t !== h.STRING), e.tag(n, m.LengthDelimited), e.fork();
1716
+ y(t !== h.BYTES && t !== h.STRING), e.tag(n, p.LengthDelimited), e.fork();
1713
1717
  let [, s] = this.scalarInfo(t);
1714
- for (let o = 0; o < i.length; o++)
1715
- e[s](i[o]);
1718
+ for (let o = 0; o < r.length; o++)
1719
+ e[s](r[o]);
1716
1720
  e.join();
1717
1721
  }
1718
1722
  /**
@@ -1726,60 +1730,60 @@ class An {
1726
1730
  * If argument `value` is omitted, [2] is always false.
1727
1731
  */
1728
1732
  scalarInfo(e, t) {
1729
- let n = m.Varint, i, s = t === void 0, o = t === 0;
1733
+ let n = p.Varint, r, s = t === void 0, o = t === 0;
1730
1734
  switch (e) {
1731
1735
  case h.INT32:
1732
- i = "int32";
1736
+ r = "int32";
1733
1737
  break;
1734
1738
  case h.STRING:
1735
- o = s || !t.length, n = m.LengthDelimited, i = "string";
1739
+ o = s || !t.length, n = p.LengthDelimited, r = "string";
1736
1740
  break;
1737
1741
  case h.BOOL:
1738
- o = t === !1, i = "bool";
1742
+ o = t === !1, r = "bool";
1739
1743
  break;
1740
1744
  case h.UINT32:
1741
- i = "uint32";
1745
+ r = "uint32";
1742
1746
  break;
1743
1747
  case h.DOUBLE:
1744
- n = m.Bit64, i = "double";
1748
+ n = p.Bit64, r = "double";
1745
1749
  break;
1746
1750
  case h.FLOAT:
1747
- n = m.Bit32, i = "float";
1751
+ n = p.Bit32, r = "float";
1748
1752
  break;
1749
1753
  case h.INT64:
1750
- o = s || B.from(t).isZero(), i = "int64";
1754
+ o = s || C.from(t).isZero(), r = "int64";
1751
1755
  break;
1752
1756
  case h.UINT64:
1753
- o = s || S.from(t).isZero(), i = "uint64";
1757
+ o = s || U.from(t).isZero(), r = "uint64";
1754
1758
  break;
1755
1759
  case h.FIXED64:
1756
- o = s || S.from(t).isZero(), n = m.Bit64, i = "fixed64";
1760
+ o = s || U.from(t).isZero(), n = p.Bit64, r = "fixed64";
1757
1761
  break;
1758
1762
  case h.BYTES:
1759
- o = s || !t.byteLength, n = m.LengthDelimited, i = "bytes";
1763
+ o = s || !t.byteLength, n = p.LengthDelimited, r = "bytes";
1760
1764
  break;
1761
1765
  case h.FIXED32:
1762
- n = m.Bit32, i = "fixed32";
1766
+ n = p.Bit32, r = "fixed32";
1763
1767
  break;
1764
1768
  case h.SFIXED32:
1765
- n = m.Bit32, i = "sfixed32";
1769
+ n = p.Bit32, r = "sfixed32";
1766
1770
  break;
1767
1771
  case h.SFIXED64:
1768
- o = s || B.from(t).isZero(), n = m.Bit64, i = "sfixed64";
1772
+ o = s || C.from(t).isZero(), n = p.Bit64, r = "sfixed64";
1769
1773
  break;
1770
1774
  case h.SINT32:
1771
- i = "sint32";
1775
+ r = "sint32";
1772
1776
  break;
1773
1777
  case h.SINT64:
1774
- o = s || B.from(t).isZero(), i = "sint64";
1778
+ o = s || C.from(t).isZero(), r = "sint64";
1775
1779
  break;
1776
1780
  }
1777
- return [n, i, s || o];
1781
+ return [n, r, s || o];
1778
1782
  }
1779
1783
  }
1780
- function Fn(r) {
1781
- const e = r.messagePrototype ? Object.create(r.messagePrototype) : Object.defineProperty({}, Ut, { value: r });
1782
- for (let t of r.fields) {
1784
+ function Bn(i) {
1785
+ const e = i.messagePrototype ? Object.create(i.messagePrototype) : Object.defineProperty({}, St, { value: i });
1786
+ for (let t of i.fields) {
1783
1787
  let n = t.localName;
1784
1788
  if (!t.opt)
1785
1789
  if (t.oneof)
@@ -1789,7 +1793,7 @@ function Fn(r) {
1789
1793
  else
1790
1794
  switch (t.kind) {
1791
1795
  case "scalar":
1792
- e[n] = nt(t.T, t.L);
1796
+ e[n] = ot(t.T, t.L);
1793
1797
  break;
1794
1798
  case "enum":
1795
1799
  e[n] = 0;
@@ -1801,19 +1805,19 @@ function Fn(r) {
1801
1805
  }
1802
1806
  return e;
1803
1807
  }
1804
- function R(r, e, t) {
1805
- let n, i = t, s;
1806
- for (let o of r.fields) {
1808
+ function D(i, e, t) {
1809
+ let n, r = t, s;
1810
+ for (let o of i.fields) {
1807
1811
  let a = o.localName;
1808
1812
  if (o.oneof) {
1809
- const l = i[o.oneof];
1813
+ const l = r[o.oneof];
1810
1814
  if ((l == null ? void 0 : l.oneofKind) == null)
1811
1815
  continue;
1812
1816
  if (n = l[a], s = e[o.oneof], s.oneofKind = l.oneofKind, n == null) {
1813
1817
  delete s[a];
1814
1818
  continue;
1815
1819
  }
1816
- } else if (n = i[a], s = e, n == null)
1820
+ } else if (n = r[a], s = e, n == null)
1817
1821
  continue;
1818
1822
  switch (o.repeat && (s[a].length = n.length), o.kind) {
1819
1823
  case "scalar":
@@ -1847,71 +1851,71 @@ function R(r, e, t) {
1847
1851
  }
1848
1852
  }
1849
1853
  }
1850
- function Ln(r, e, t) {
1854
+ function Cn(i, e, t) {
1851
1855
  if (e === t)
1852
1856
  return !0;
1853
1857
  if (!e || !t)
1854
1858
  return !1;
1855
- for (let n of r.fields) {
1856
- let i = n.localName, s = n.oneof ? e[n.oneof][i] : e[i], o = n.oneof ? t[n.oneof][i] : t[i];
1859
+ for (let n of i.fields) {
1860
+ let r = n.localName, s = n.oneof ? e[n.oneof][r] : e[r], o = n.oneof ? t[n.oneof][r] : t[r];
1857
1861
  switch (n.kind) {
1858
1862
  case "enum":
1859
1863
  case "scalar":
1860
1864
  let a = n.kind == "enum" ? h.INT32 : n.T;
1861
- if (!(n.repeat ? wt(a, s, o) : Rt(a, s, o)))
1865
+ if (!(n.repeat ? Et(a, s, o) : Mt(a, s, o)))
1862
1866
  return !1;
1863
1867
  break;
1864
1868
  case "map":
1865
- if (!(n.V.kind == "message" ? yt(n.V.T(), ve(s), ve(o)) : wt(n.V.kind == "enum" ? h.INT32 : n.V.T, ve(s), ve(o))))
1869
+ if (!(n.V.kind == "message" ? It(n.V.T(), Se(s), Se(o)) : Et(n.V.kind == "enum" ? h.INT32 : n.V.T, Se(s), Se(o))))
1866
1870
  return !1;
1867
1871
  break;
1868
1872
  case "message":
1869
1873
  let l = n.T();
1870
- if (!(n.repeat ? yt(l, s, o) : l.equals(s, o)))
1874
+ if (!(n.repeat ? It(l, s, o) : l.equals(s, o)))
1871
1875
  return !1;
1872
1876
  break;
1873
1877
  }
1874
1878
  }
1875
1879
  return !0;
1876
1880
  }
1877
- const ve = Object.values;
1878
- function Rt(r, e, t) {
1881
+ const Se = Object.values;
1882
+ function Mt(i, e, t) {
1879
1883
  if (e === t)
1880
1884
  return !0;
1881
- if (r !== h.BYTES)
1885
+ if (i !== h.BYTES)
1882
1886
  return !1;
1883
- let n = e, i = t;
1884
- if (n.length !== i.length)
1887
+ let n = e, r = t;
1888
+ if (n.length !== r.length)
1885
1889
  return !1;
1886
1890
  for (let s = 0; s < n.length; s++)
1887
- if (n[s] != i[s])
1891
+ if (n[s] != r[s])
1888
1892
  return !1;
1889
1893
  return !0;
1890
1894
  }
1891
- function wt(r, e, t) {
1895
+ function Et(i, e, t) {
1892
1896
  if (e.length !== t.length)
1893
1897
  return !1;
1894
1898
  for (let n = 0; n < e.length; n++)
1895
- if (!Rt(r, e[n], t[n]))
1899
+ if (!Mt(i, e[n], t[n]))
1896
1900
  return !1;
1897
1901
  return !0;
1898
1902
  }
1899
- function yt(r, e, t) {
1903
+ function It(i, e, t) {
1900
1904
  if (e.length !== t.length)
1901
1905
  return !1;
1902
1906
  for (let n = 0; n < e.length; n++)
1903
- if (!r.equals(e[n], t[n]))
1907
+ if (!i.equals(e[n], t[n]))
1904
1908
  return !1;
1905
1909
  return !0;
1906
1910
  }
1907
- const On = Object.getOwnPropertyDescriptors(Object.getPrototypeOf({}));
1911
+ const vn = Object.getOwnPropertyDescriptors(Object.getPrototypeOf({}));
1908
1912
  class M {
1909
1913
  constructor(e, t, n) {
1910
- this.defaultCheckDepth = 16, this.typeName = e, this.fields = t.map(yn), this.options = n ?? {}, this.messagePrototype = Object.create(null, Object.assign(Object.assign({}, On), { [Ut]: { value: this } })), this.refTypeCheck = new kn(this), this.refJsonReader = new En(this), this.refJsonWriter = new In(this), this.refBinReader = new Tn(this), this.refBinWriter = new An(this);
1914
+ this.defaultCheckDepth = 16, this.typeName = e, this.fields = t.map(En), this.options = n ?? {}, this.messagePrototype = Object.create(null, Object.assign(Object.assign({}, vn), { [St]: { value: this } })), this.refTypeCheck = new An(this), this.refJsonReader = new Tn(this), this.refJsonWriter = new Fn(this), this.refBinReader = new Ln(this), this.refBinWriter = new On(this);
1911
1915
  }
1912
1916
  create(e) {
1913
- let t = Fn(this);
1914
- return e !== void 0 && R(this, t, e), t;
1917
+ let t = Bn(this);
1918
+ return e !== void 0 && D(this, t, e), t;
1915
1919
  }
1916
1920
  /**
1917
1921
  * Clone the message.
@@ -1920,7 +1924,7 @@ class M {
1920
1924
  */
1921
1925
  clone(e) {
1922
1926
  let t = this.create();
1923
- return R(this, t, e), t;
1927
+ return D(this, t, e), t;
1924
1928
  }
1925
1929
  /**
1926
1930
  * Determines whether two message of the same type have the same field values.
@@ -1929,7 +1933,7 @@ class M {
1929
1933
  * Will also return true if both messages are `undefined`.
1930
1934
  */
1931
1935
  equals(e, t) {
1932
- return Ln(this, e, t);
1936
+ return Cn(this, e, t);
1933
1937
  }
1934
1938
  /**
1935
1939
  * Is the given value assignable to our message type
@@ -1949,20 +1953,20 @@ class M {
1949
1953
  * Copy partial data into the target message.
1950
1954
  */
1951
1955
  mergePartial(e, t) {
1952
- R(this, e, t);
1956
+ D(this, e, t);
1953
1957
  }
1954
1958
  /**
1955
1959
  * Create a new message from binary format.
1956
1960
  */
1957
1961
  fromBinary(e, t) {
1958
- let n = an(t);
1962
+ let n = hn(t);
1959
1963
  return this.internalBinaryRead(n.readerFactory(e), e.byteLength, n);
1960
1964
  }
1961
1965
  /**
1962
1966
  * Read a new message from a JSON value.
1963
1967
  */
1964
1968
  fromJson(e, t) {
1965
- return this.internalJsonRead(e, gn(t));
1969
+ return this.internalJsonRead(e, yn(t));
1966
1970
  }
1967
1971
  /**
1968
1972
  * Read a new message from a JSON string.
@@ -1976,7 +1980,7 @@ class M {
1976
1980
  * Write the message to canonical JSON value.
1977
1981
  */
1978
1982
  toJson(e, t) {
1979
- return this.internalJsonWrite(e, bn(t));
1983
+ return this.internalJsonWrite(e, Nn(t));
1980
1984
  }
1981
1985
  /**
1982
1986
  * Convert the message to canonical JSON string.
@@ -1984,14 +1988,14 @@ class M {
1984
1988
  */
1985
1989
  toJsonString(e, t) {
1986
1990
  var n;
1987
- let i = this.toJson(e, t);
1988
- return JSON.stringify(i, null, (n = t == null ? void 0 : t.prettySpaces) !== null && n !== void 0 ? n : 0);
1991
+ let r = this.toJson(e, t);
1992
+ return JSON.stringify(r, null, (n = t == null ? void 0 : t.prettySpaces) !== null && n !== void 0 ? n : 0);
1989
1993
  }
1990
1994
  /**
1991
1995
  * Write the message to binary format.
1992
1996
  */
1993
1997
  toBinary(e, t) {
1994
- let n = mn(t);
1998
+ let n = wn(t);
1995
1999
  return this.internalBinaryWrite(e, n.writerFactory(), n).finish();
1996
2000
  }
1997
2001
  /**
@@ -2004,10 +2008,10 @@ class M {
2004
2008
  */
2005
2009
  internalJsonRead(e, t, n) {
2006
2010
  if (e !== null && typeof e == "object" && !Array.isArray(e)) {
2007
- let i = n ?? this.create();
2008
- return this.refJsonReader.read(e, i, t), i;
2011
+ let r = n ?? this.create();
2012
+ return this.refJsonReader.read(e, r, t), r;
2009
2013
  }
2010
- throw new Error(`Unable to parse message ${this.typeName} from JSON ${Ft(e)}.`);
2014
+ throw new Error(`Unable to parse message ${this.typeName} from JSON ${Ct(e)}.`);
2011
2015
  }
2012
2016
  /**
2013
2017
  * This is an internal method. If you just want to write a message
@@ -2036,19 +2040,19 @@ class M {
2036
2040
  * the target according to protobuf rules. If the target is
2037
2041
  * omitted, a new instance is created first.
2038
2042
  */
2039
- internalBinaryRead(e, t, n, i) {
2040
- let s = i ?? this.create();
2043
+ internalBinaryRead(e, t, n, r) {
2044
+ let s = r ?? this.create();
2041
2045
  return this.refBinReader.read(e, s, n, t), s;
2042
2046
  }
2043
2047
  }
2044
- function Bn(r, e) {
2045
- var t, n, i;
2046
- let s = r;
2047
- return s.service = e, s.localName = (t = s.localName) !== null && t !== void 0 ? t : tt(s.name), s.serverStreaming = !!s.serverStreaming, s.clientStreaming = !!s.clientStreaming, s.options = (n = s.options) !== null && n !== void 0 ? n : {}, s.idempotency = (i = s.idempotency) !== null && i !== void 0 ? i : void 0, s;
2048
+ function _n(i, e) {
2049
+ var t, n, r;
2050
+ let s = i;
2051
+ return s.service = e, s.localName = (t = s.localName) !== null && t !== void 0 ? t : st(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;
2048
2052
  }
2049
- class st {
2053
+ class ct {
2050
2054
  constructor(e, t, n) {
2051
- this.typeName = e, this.methods = t.map((i) => Bn(i, this)), this.options = n ?? {};
2055
+ this.typeName = e, this.methods = t.map((r) => _n(r, this)), this.options = n ?? {};
2052
2056
  }
2053
2057
  }
2054
2058
  class I extends Error {
@@ -2061,49 +2065,49 @@ class I extends Error {
2061
2065
  let t = Object.entries(this.meta);
2062
2066
  if (t.length) {
2063
2067
  e.push(""), e.push("Meta:");
2064
- for (let [n, i] of t)
2065
- e.push(` ${n}: ${i}`);
2068
+ for (let [n, r] of t)
2069
+ e.push(` ${n}: ${r}`);
2066
2070
  }
2067
2071
  return e.join(`
2068
2072
  `);
2069
2073
  }
2070
2074
  }
2071
- function _n(r, e) {
2075
+ function xn(i, e) {
2072
2076
  if (!e)
2073
- return r;
2077
+ return i;
2074
2078
  let t = {};
2075
- Se(r, t), Se(e, t);
2079
+ Me(i, t), Me(e, t);
2076
2080
  for (let n of Object.keys(e)) {
2077
- let i = e[n];
2081
+ let r = e[n];
2078
2082
  switch (n) {
2079
2083
  case "jsonOptions":
2080
- t.jsonOptions = wn(r.jsonOptions, t.jsonOptions);
2084
+ t.jsonOptions = kn(i.jsonOptions, t.jsonOptions);
2081
2085
  break;
2082
2086
  case "binaryOptions":
2083
- t.binaryOptions = nn(r.binaryOptions, t.binaryOptions);
2087
+ t.binaryOptions = on(i.binaryOptions, t.binaryOptions);
2084
2088
  break;
2085
2089
  case "meta":
2086
- t.meta = {}, Se(r.meta, t.meta), Se(e.meta, t.meta);
2090
+ t.meta = {}, Me(i.meta, t.meta), Me(e.meta, t.meta);
2087
2091
  break;
2088
2092
  case "interceptors":
2089
- t.interceptors = r.interceptors ? r.interceptors.concat(i) : i.concat();
2093
+ t.interceptors = i.interceptors ? i.interceptors.concat(r) : r.concat();
2090
2094
  break;
2091
2095
  }
2092
2096
  }
2093
2097
  return t;
2094
2098
  }
2095
- function Se(r, e) {
2096
- if (!r)
2099
+ function Me(i, e) {
2100
+ if (!i)
2097
2101
  return;
2098
2102
  let t = e;
2099
- for (let [n, i] of Object.entries(r))
2100
- i instanceof Date ? t[n] = new Date(i.getTime()) : Array.isArray(i) ? t[n] = i.concat() : t[n] = i;
2103
+ for (let [n, r] of Object.entries(i))
2104
+ r instanceof Date ? t[n] = new Date(r.getTime()) : Array.isArray(r) ? t[n] = r.concat() : t[n] = r;
2101
2105
  }
2102
- var j;
2103
- (function(r) {
2104
- r[r.PENDING = 0] = "PENDING", r[r.REJECTED = 1] = "REJECTED", r[r.RESOLVED = 2] = "RESOLVED";
2105
- })(j || (j = {}));
2106
- class le {
2106
+ var q;
2107
+ (function(i) {
2108
+ i[i.PENDING = 0] = "PENDING", i[i.REJECTED = 1] = "REJECTED", i[i.RESOLVED = 2] = "RESOLVED";
2109
+ })(q || (q = {}));
2110
+ class ue {
2107
2111
  /**
2108
2112
  * @param preventUnhandledRejectionWarning - prevents the warning
2109
2113
  * "Unhandled Promise rejection" by adding a noop rejection handler.
@@ -2117,7 +2121,7 @@ class le {
2117
2121
  * others.
2118
2122
  */
2119
2123
  constructor(e = !0) {
2120
- this._state = j.PENDING, this._promise = new Promise((t, n) => {
2124
+ this._state = q.PENDING, this._promise = new Promise((t, n) => {
2121
2125
  this._resolve = t, this._reject = n;
2122
2126
  }), e && this._promise.catch((t) => {
2123
2127
  });
@@ -2138,29 +2142,29 @@ class le {
2138
2142
  * Resolve the promise. Throws if the promise is already resolved or rejected.
2139
2143
  */
2140
2144
  resolve(e) {
2141
- if (this.state !== j.PENDING)
2142
- throw new Error(`cannot resolve ${j[this.state].toLowerCase()}`);
2143
- this._resolve(e), this._state = j.RESOLVED;
2145
+ if (this.state !== q.PENDING)
2146
+ throw new Error(`cannot resolve ${q[this.state].toLowerCase()}`);
2147
+ this._resolve(e), this._state = q.RESOLVED;
2144
2148
  }
2145
2149
  /**
2146
2150
  * Reject the promise. Throws if the promise is already resolved or rejected.
2147
2151
  */
2148
2152
  reject(e) {
2149
- if (this.state !== j.PENDING)
2150
- throw new Error(`cannot reject ${j[this.state].toLowerCase()}`);
2151
- this._reject(e), this._state = j.REJECTED;
2153
+ if (this.state !== q.PENDING)
2154
+ throw new Error(`cannot reject ${q[this.state].toLowerCase()}`);
2155
+ this._reject(e), this._state = q.REJECTED;
2152
2156
  }
2153
2157
  /**
2154
2158
  * Resolve the promise. Ignore if not pending.
2155
2159
  */
2156
2160
  resolvePending(e) {
2157
- this._state === j.PENDING && this.resolve(e);
2161
+ this._state === q.PENDING && this.resolve(e);
2158
2162
  }
2159
2163
  /**
2160
2164
  * Reject the promise. Ignore if not pending.
2161
2165
  */
2162
2166
  rejectPending(e) {
2163
- this._state === j.PENDING && this.reject(e);
2167
+ this._state === q.PENDING && this.reject(e);
2164
2168
  }
2165
2169
  }
2166
2170
  class Dn {
@@ -2209,7 +2213,7 @@ class Dn {
2209
2213
  * Can be used to wrap a stream by using the other stream's `onNext`.
2210
2214
  */
2211
2215
  notifyNext(e, t, n) {
2212
- w((e ? 1 : 0) + (t ? 1 : 0) + (n ? 1 : 0) <= 1, "only one emission at a time"), e && this.notifyMessage(e), t && this.notifyError(t), n && this.notifyComplete();
2216
+ y((e ? 1 : 0) + (t ? 1 : 0) + (n ? 1 : 0) <= 1, "only one emission at a time"), e && this.notifyMessage(e), t && this.notifyError(t), n && this.notifyComplete();
2213
2217
  }
2214
2218
  /**
2215
2219
  * Emits a new message. Throws if stream is closed.
@@ -2217,7 +2221,7 @@ class Dn {
2217
2221
  * Triggers onNext and onMessage callbacks.
2218
2222
  */
2219
2223
  notifyMessage(e) {
2220
- w(!this.closed, "stream is closed"), this.pushIt({ value: e, done: !1 }), this._lis.msg.forEach((t) => t(e)), this._lis.nxt.forEach((t) => t(e, void 0, !1));
2224
+ y(!this.closed, "stream is closed"), this.pushIt({ value: e, done: !1 }), this._lis.msg.forEach((t) => t(e)), this._lis.nxt.forEach((t) => t(e, void 0, !1));
2221
2225
  }
2222
2226
  /**
2223
2227
  * Closes the stream with an error. Throws if stream is closed.
@@ -2225,7 +2229,7 @@ class Dn {
2225
2229
  * Triggers onNext and onError callbacks.
2226
2230
  */
2227
2231
  notifyError(e) {
2228
- w(!this.closed, "stream is closed"), this._closed = e, this.pushIt(e), this._lis.err.forEach((t) => t(e)), this._lis.nxt.forEach((t) => t(void 0, e, !1)), this.clearLis();
2232
+ y(!this.closed, "stream is closed"), this._closed = e, this.pushIt(e), this._lis.err.forEach((t) => t(e)), this._lis.nxt.forEach((t) => t(void 0, e, !1)), this.clearLis();
2229
2233
  }
2230
2234
  /**
2231
2235
  * Closes the stream successfully. Throws if stream is closed.
@@ -2233,7 +2237,7 @@ class Dn {
2233
2237
  * Triggers onNext and onComplete callbacks.
2234
2238
  */
2235
2239
  notifyComplete() {
2236
- w(!this.closed, "stream is closed"), this._closed = !0, this.pushIt({ value: null, done: !0 }), this._lis.cmp.forEach((e) => e()), this._lis.nxt.forEach((e) => e(void 0, void 0, !0)), this.clearLis();
2240
+ y(!this.closed, "stream is closed"), this._closed = !0, this.pushIt({ value: null, done: !0 }), this._lis.cmp.forEach((e) => e()), this._lis.nxt.forEach((e) => e(void 0, void 0, !0)), this.clearLis();
2237
2241
  }
2238
2242
  /**
2239
2243
  * Creates an async iterator (that can be used with `for await {...}`)
@@ -2252,9 +2256,9 @@ class Dn {
2252
2256
  return this._itState || (this._itState = { q: [] }), this._closed === !0 ? this.pushIt({ value: null, done: !0 }) : this._closed !== !1 && this.pushIt(this._closed), {
2253
2257
  next: () => {
2254
2258
  let e = this._itState;
2255
- w(e, "bad state"), w(!e.p, "iterator contract broken");
2259
+ y(e, "bad state"), y(!e.p, "iterator contract broken");
2256
2260
  let t = e.q.shift();
2257
- return t ? "value" in t ? Promise.resolve(t) : Promise.reject(t) : (e.p = new le(), e.p.promise);
2261
+ return t ? "value" in t ? Promise.resolve(t) : Promise.reject(t) : (e.p = new ue(), e.p.promise);
2258
2262
  }
2259
2263
  };
2260
2264
  }
@@ -2265,13 +2269,13 @@ class Dn {
2265
2269
  if (t)
2266
2270
  if (t.p) {
2267
2271
  const n = t.p;
2268
- w(n.state == j.PENDING, "iterator contract broken"), "value" in e ? n.resolve(e) : n.reject(e), delete t.p;
2272
+ y(n.state == q.PENDING, "iterator contract broken"), "value" in e ? n.resolve(e) : n.reject(e), delete t.p;
2269
2273
  } else
2270
2274
  t.q.push(e);
2271
2275
  }
2272
2276
  }
2273
- var Cn = function(r, e, t, n) {
2274
- function i(s) {
2277
+ var Rn = function(i, e, t, n) {
2278
+ function r(s) {
2275
2279
  return s instanceof t ? s : new t(function(o) {
2276
2280
  o(s);
2277
2281
  });
@@ -2292,14 +2296,14 @@ var Cn = function(r, e, t, n) {
2292
2296
  }
2293
2297
  }
2294
2298
  function c(d) {
2295
- d.done ? s(d.value) : i(d.value).then(a, l);
2299
+ d.done ? s(d.value) : r(d.value).then(a, l);
2296
2300
  }
2297
- c((n = n.apply(r, e || [])).next());
2301
+ c((n = n.apply(i, e || [])).next());
2298
2302
  });
2299
2303
  };
2300
2304
  class Un {
2301
- constructor(e, t, n, i, s, o, a) {
2302
- this.method = e, this.requestHeaders = t, this.request = n, this.headers = i, this.response = s, this.status = o, this.trailers = a;
2305
+ constructor(e, t, n, r, s, o, a) {
2306
+ this.method = e, this.requestHeaders = t, this.request = n, this.headers = r, this.response = s, this.status = o, this.trailers = a;
2303
2307
  }
2304
2308
  /**
2305
2309
  * If you are only interested in the final outcome of this call,
@@ -2309,8 +2313,8 @@ class Un {
2309
2313
  return this.promiseFinished().then((n) => e ? Promise.resolve(e(n)) : n, (n) => t ? Promise.resolve(t(n)) : Promise.reject(n));
2310
2314
  }
2311
2315
  promiseFinished() {
2312
- return Cn(this, void 0, void 0, function* () {
2313
- let [e, t, n, i] = yield Promise.all([this.headers, this.response, this.status, this.trailers]);
2316
+ return Rn(this, void 0, void 0, function* () {
2317
+ let [e, t, n, r] = yield Promise.all([this.headers, this.response, this.status, this.trailers]);
2314
2318
  return {
2315
2319
  method: this.method,
2316
2320
  requestHeaders: this.requestHeaders,
@@ -2318,13 +2322,13 @@ class Un {
2318
2322
  headers: e,
2319
2323
  response: t,
2320
2324
  status: n,
2321
- trailers: i
2325
+ trailers: r
2322
2326
  };
2323
2327
  });
2324
2328
  }
2325
2329
  }
2326
- var Rn = function(r, e, t, n) {
2327
- function i(s) {
2330
+ var Sn = function(i, e, t, n) {
2331
+ function r(s) {
2328
2332
  return s instanceof t ? s : new t(function(o) {
2329
2333
  o(s);
2330
2334
  });
@@ -2345,14 +2349,14 @@ var Rn = function(r, e, t, n) {
2345
2349
  }
2346
2350
  }
2347
2351
  function c(d) {
2348
- d.done ? s(d.value) : i(d.value).then(a, l);
2352
+ d.done ? s(d.value) : r(d.value).then(a, l);
2349
2353
  }
2350
- c((n = n.apply(r, e || [])).next());
2354
+ c((n = n.apply(i, e || [])).next());
2351
2355
  });
2352
2356
  };
2353
- class xn {
2354
- constructor(e, t, n, i, s, o, a) {
2355
- this.method = e, this.requestHeaders = t, this.request = n, this.headers = i, this.responses = s, this.status = o, this.trailers = a;
2357
+ class Mn {
2358
+ constructor(e, t, n, r, s, o, a) {
2359
+ this.method = e, this.requestHeaders = t, this.request = n, this.headers = r, this.responses = s, this.status = o, this.trailers = a;
2356
2360
  }
2357
2361
  /**
2358
2362
  * Instead of awaiting the response status and trailers, you can
@@ -2364,7 +2368,7 @@ class xn {
2364
2368
  return this.promiseFinished().then((n) => e ? Promise.resolve(e(n)) : n, (n) => t ? Promise.resolve(t(n)) : Promise.reject(n));
2365
2369
  }
2366
2370
  promiseFinished() {
2367
- return Rn(this, void 0, void 0, function* () {
2371
+ return Sn(this, void 0, void 0, function* () {
2368
2372
  let [e, t, n] = yield Promise.all([this.headers, this.status, this.trailers]);
2369
2373
  return {
2370
2374
  method: this.method,
@@ -2377,7 +2381,7 @@ class xn {
2377
2381
  });
2378
2382
  }
2379
2383
  }
2380
- function se(r, e, t, n, i) {
2384
+ function le(i, e, t, n, r) {
2381
2385
  var s;
2382
2386
  {
2383
2387
  let o = (a, l, c) => e.unary(a, l, c);
@@ -2385,15 +2389,15 @@ function se(r, e, t, n, i) {
2385
2389
  const l = o;
2386
2390
  o = (c, d, g) => a.interceptUnary(l, c, d, g);
2387
2391
  }
2388
- return o(t, i, n);
2392
+ return o(t, r, n);
2389
2393
  }
2390
2394
  }
2391
2395
  var f;
2392
- (function(r) {
2393
- r[r.OK = 0] = "OK", r[r.CANCELLED = 1] = "CANCELLED", r[r.UNKNOWN = 2] = "UNKNOWN", r[r.INVALID_ARGUMENT = 3] = "INVALID_ARGUMENT", r[r.DEADLINE_EXCEEDED = 4] = "DEADLINE_EXCEEDED", r[r.NOT_FOUND = 5] = "NOT_FOUND", r[r.ALREADY_EXISTS = 6] = "ALREADY_EXISTS", r[r.PERMISSION_DENIED = 7] = "PERMISSION_DENIED", r[r.UNAUTHENTICATED = 16] = "UNAUTHENTICATED", r[r.RESOURCE_EXHAUSTED = 8] = "RESOURCE_EXHAUSTED", r[r.FAILED_PRECONDITION = 9] = "FAILED_PRECONDITION", r[r.ABORTED = 10] = "ABORTED", r[r.OUT_OF_RANGE = 11] = "OUT_OF_RANGE", r[r.UNIMPLEMENTED = 12] = "UNIMPLEMENTED", r[r.INTERNAL = 13] = "INTERNAL", r[r.UNAVAILABLE = 14] = "UNAVAILABLE", r[r.DATA_LOSS = 15] = "DATA_LOSS";
2396
+ (function(i) {
2397
+ 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";
2394
2398
  })(f || (f = {}));
2395
- var vn = function(r, e, t, n) {
2396
- function i(s) {
2399
+ var Vn = function(i, e, t, n) {
2400
+ function r(s) {
2397
2401
  return s instanceof t ? s : new t(function(o) {
2398
2402
  o(s);
2399
2403
  });
@@ -2414,41 +2418,41 @@ var vn = function(r, e, t, n) {
2414
2418
  }
2415
2419
  }
2416
2420
  function c(d) {
2417
- d.done ? s(d.value) : i(d.value).then(a, l);
2421
+ d.done ? s(d.value) : r(d.value).then(a, l);
2418
2422
  }
2419
- c((n = n.apply(r, e || [])).next());
2423
+ c((n = n.apply(i, e || [])).next());
2420
2424
  });
2421
2425
  };
2422
- function Nt(r, e, t, n, i) {
2426
+ function At(i, e, t, n, r) {
2423
2427
  if (n)
2424
2428
  for (let [s, o] of Object.entries(n))
2425
2429
  if (typeof o == "string")
2426
- r.append(s, o);
2430
+ i.append(s, o);
2427
2431
  else
2428
2432
  for (let a of o)
2429
- r.append(s, a);
2430
- if (r.set("Content-Type", e === "text" ? "application/grpc-web-text" : "application/grpc-web+proto"), e == "text" && r.set("Accept", "application/grpc-web-text"), r.set("X-Grpc-Web", "1"), typeof t == "number") {
2433
+ i.append(s, a);
2434
+ if (i.set("Content-Type", e === "text" ? "application/grpc-web-text" : "application/grpc-web+proto"), e == "text" && i.set("Accept", "application/grpc-web-text"), i.set("X-Grpc-Web", "1"), typeof t == "number") {
2431
2435
  if (t <= 0)
2432
2436
  throw new I(`timeout ${t} ms exceeded`, f[f.DEADLINE_EXCEEDED]);
2433
- r.set("grpc-timeout", `${t}m`);
2437
+ i.set("grpc-timeout", `${t}m`);
2434
2438
  } else if (t) {
2435
2439
  const s = t.getTime(), o = Date.now();
2436
2440
  if (s <= o)
2437
2441
  throw new I(`deadline ${t} exceeded`, f[f.DEADLINE_EXCEEDED]);
2438
- r.set("grpc-timeout", `${s - o}m`);
2442
+ i.set("grpc-timeout", `${s - o}m`);
2439
2443
  }
2440
- return r;
2444
+ return i;
2441
2445
  }
2442
- function kt(r, e) {
2443
- let t = new Uint8Array(5 + r.length);
2446
+ function Tt(i, e) {
2447
+ let t = new Uint8Array(5 + i.length);
2444
2448
  t[0] = H.DATA;
2445
- for (let n = r.length, i = 4; i > 0; i--)
2446
- t[i] = n % 256, n >>>= 8;
2447
- return t.set(r, 5), e === "binary" ? t : Ot(t);
2449
+ for (let n = i.length, r = 4; r > 0; r--)
2450
+ t[r] = n % 256, n >>>= 8;
2451
+ return t.set(i, 5), e === "binary" ? t : _t(t);
2448
2452
  }
2449
- function rt(r, e, t) {
2453
+ function at(i, e, t) {
2450
2454
  if (arguments.length === 1) {
2451
- let l = r, c;
2455
+ let l = i, c;
2452
2456
  try {
2453
2457
  c = l.type;
2454
2458
  } catch {
@@ -2459,41 +2463,41 @@ function rt(r, e, t) {
2459
2463
  case "opaqueredirect":
2460
2464
  throw new I(`fetch response type ${l.type}`, f[f.UNKNOWN]);
2461
2465
  }
2462
- return rt($n(l.headers), l.status, l.statusText);
2466
+ return at(Wn(l.headers), l.status, l.statusText);
2463
2467
  }
2464
- let n = r, i = e >= 200 && e < 300, s = vt(n), [o, a] = xt(n);
2465
- return (o === void 0 || o === f.OK) && !i && (o = Pn(e), a = t), [o, a, s];
2468
+ let n = i, r = e >= 200 && e < 300, s = $t(n), [o, a] = Vt(n);
2469
+ return (o === void 0 || o === f.OK) && !r && (o = qn(e), a = t), [o, a, s];
2466
2470
  }
2467
- function Et(r) {
2468
- let e = Vn(r), [t, n] = xt(e), i = vt(e);
2469
- return [t ?? f.OK, n, i];
2471
+ function Ft(i) {
2472
+ let e = jn(i), [t, n] = Vt(e), r = $t(e);
2473
+ return [t ?? f.OK, n, r];
2470
2474
  }
2471
2475
  var H;
2472
- (function(r) {
2473
- r[r.DATA = 0] = "DATA", r[r.TRAILER = 128] = "TRAILER";
2476
+ (function(i) {
2477
+ i[i.DATA = 0] = "DATA", i[i.TRAILER = 128] = "TRAILER";
2474
2478
  })(H || (H = {}));
2475
- function It(r, e, t) {
2476
- return vn(this, void 0, void 0, function* () {
2477
- let n, i = "", s = new Uint8Array(0), o = Mn(e);
2478
- if (Sn(r)) {
2479
- let a = r.getReader();
2479
+ function Lt(i, e, t) {
2480
+ return Vn(this, void 0, void 0, function* () {
2481
+ let n, r = "", s = new Uint8Array(0), o = Pn(e);
2482
+ if ($n(i)) {
2483
+ let a = i.getReader();
2480
2484
  n = {
2481
2485
  next: () => a.read()
2482
2486
  };
2483
2487
  } else
2484
- n = r[Symbol.asyncIterator]();
2488
+ n = i[Symbol.asyncIterator]();
2485
2489
  for (; ; ) {
2486
2490
  let a = yield n.next();
2487
2491
  if (a.value !== void 0) {
2488
2492
  if (o === "text") {
2489
2493
  for (let c = 0; c < a.value.length; c++)
2490
- i += String.fromCharCode(a.value[c]);
2491
- let l = i.length - i.length % 4;
2494
+ r += String.fromCharCode(a.value[c]);
2495
+ let l = r.length - r.length % 4;
2492
2496
  if (l === 0)
2493
2497
  continue;
2494
- s = Tt(s, Lt(i.substring(0, l))), i = i.substring(l);
2498
+ s = Ot(s, vt(r.substring(0, l))), r = r.substring(l);
2495
2499
  } else
2496
- s = Tt(s, a.value);
2500
+ s = Ot(s, a.value);
2497
2501
  for (; s.length >= 5 && s[0] === H.DATA; ) {
2498
2502
  let l = 0;
2499
2503
  for (let c = 1; c < 5; c++)
@@ -2515,13 +2519,13 @@ function It(r, e, t) {
2515
2519
  }
2516
2520
  });
2517
2521
  }
2518
- const Sn = (r) => typeof r.getReader == "function";
2519
- function Tt(r, e) {
2520
- let t = new Uint8Array(r.length + e.length);
2521
- return t.set(r), t.set(e, r.length), t;
2522
+ const $n = (i) => typeof i.getReader == "function";
2523
+ function Ot(i, e) {
2524
+ let t = new Uint8Array(i.length + e.length);
2525
+ return t.set(i), t.set(e, i.length), t;
2522
2526
  }
2523
- function Mn(r) {
2524
- switch (r) {
2527
+ function Pn(i) {
2528
+ switch (i) {
2525
2529
  case "application/grpc-web-text":
2526
2530
  case "application/grpc-web-text+proto":
2527
2531
  return "text";
@@ -2532,28 +2536,28 @@ function Mn(r) {
2532
2536
  case null:
2533
2537
  throw new I("missing response content type", f[f.INTERNAL]);
2534
2538
  default:
2535
- throw new I("unexpected response content type: " + r, f[f.INTERNAL]);
2539
+ throw new I("unexpected response content type: " + i, f[f.INTERNAL]);
2536
2540
  }
2537
2541
  }
2538
- function xt(r) {
2539
- let e, t, n = r["grpc-message"];
2542
+ function Vt(i) {
2543
+ let e, t, n = i["grpc-message"];
2540
2544
  if (n !== void 0) {
2541
2545
  if (Array.isArray(n))
2542
2546
  return [f.INTERNAL, "invalid grpc-web message"];
2543
2547
  t = n;
2544
2548
  }
2545
- let i = r["grpc-status"];
2546
- if (i !== void 0) {
2547
- if (Array.isArray(i))
2549
+ let r = i["grpc-status"];
2550
+ if (r !== void 0) {
2551
+ if (Array.isArray(r))
2548
2552
  return [f.INTERNAL, "invalid grpc-web status"];
2549
- if (e = parseInt(i, 10), f[e] === void 0)
2553
+ if (e = parseInt(r, 10), f[e] === void 0)
2550
2554
  return [f.INTERNAL, "invalid grpc-web status"];
2551
2555
  }
2552
2556
  return [e, t];
2553
2557
  }
2554
- function vt(r) {
2558
+ function $t(i) {
2555
2559
  let e = {};
2556
- for (let [t, n] of Object.entries(r))
2560
+ for (let [t, n] of Object.entries(i))
2557
2561
  switch (t) {
2558
2562
  case "grpc-message":
2559
2563
  case "grpc-status":
@@ -2564,29 +2568,29 @@ function vt(r) {
2564
2568
  }
2565
2569
  return e;
2566
2570
  }
2567
- function Vn(r) {
2571
+ function jn(i) {
2568
2572
  let e = {};
2569
- for (let t of String.fromCharCode.apply(String, r).trim().split(`\r
2573
+ for (let t of String.fromCharCode.apply(String, i).trim().split(`\r
2570
2574
  `)) {
2571
2575
  if (t == "")
2572
2576
  continue;
2573
- let [n, ...i] = t.split(":");
2574
- const s = i.join(":").trim();
2577
+ let [n, ...r] = t.split(":");
2578
+ const s = r.join(":").trim();
2575
2579
  n = n.trim();
2576
2580
  let o = e[n];
2577
2581
  typeof o == "string" ? e[n] = [o, s] : Array.isArray(o) ? o.push(s) : e[n] = s;
2578
2582
  }
2579
2583
  return e;
2580
2584
  }
2581
- function $n(r) {
2585
+ function Wn(i) {
2582
2586
  let e = {};
2583
- return r.forEach((t, n) => {
2584
- let i = e[n];
2585
- typeof i == "string" ? e[n] = [i, t] : Array.isArray(i) ? i.push(t) : e[n] = t;
2587
+ return i.forEach((t, n) => {
2588
+ let r = e[n];
2589
+ typeof r == "string" ? e[n] = [r, t] : Array.isArray(r) ? r.push(t) : e[n] = t;
2586
2590
  }), e;
2587
2591
  }
2588
- function Pn(r) {
2589
- switch (r) {
2592
+ function qn(i) {
2593
+ switch (i) {
2590
2594
  case 200:
2591
2595
  return f.OK;
2592
2596
  case 400:
@@ -2617,12 +2621,12 @@ function Pn(r) {
2617
2621
  return f.UNKNOWN;
2618
2622
  }
2619
2623
  }
2620
- class jn {
2624
+ class Kn {
2621
2625
  constructor(e) {
2622
2626
  this.defaultOptions = e;
2623
2627
  }
2624
2628
  mergeOptions(e) {
2625
- return _n(this.defaultOptions, e);
2629
+ return xn(this.defaultOptions, e);
2626
2630
  }
2627
2631
  /**
2628
2632
  * Create an URI for a gRPC web call.
@@ -2653,107 +2657,107 @@ class jn {
2653
2657
  throw t.methodName = e.name, t.serviceName = e.service.typeName, t;
2654
2658
  }
2655
2659
  serverStreaming(e, t, n) {
2656
- var i, s, o, a;
2657
- let l = n, c = (i = l.format) !== null && i !== void 0 ? i : "text", d = (s = l.fetchInit) !== null && s !== void 0 ? s : {}, g = this.makeUrl(e, l), y = e.I.toBinary(t, l.binaryOptions), O = new le(), F = new Dn(), q = !0, A, _ = new le(), J, me = new le();
2660
+ var r, s, o, a;
2661
+ let l = n, c = (r = l.format) !== null && r !== void 0 ? r : "text", d = (s = l.fetchInit) !== null && s !== void 0 ? s : {}, g = this.makeUrl(e, l), N = e.I.toBinary(t, l.binaryOptions), L = new ue(), O = new Dn(), J = !0, T, $ = new ue(), W, Z = new ue();
2658
2662
  return globalThis.fetch(g, Object.assign(Object.assign({}, d), {
2659
2663
  method: "POST",
2660
- headers: Nt(new globalThis.Headers(), c, l.timeout, l.meta),
2661
- body: kt(y, c),
2664
+ headers: At(new globalThis.Headers(), c, l.timeout, l.meta),
2665
+ body: Tt(N, c),
2662
2666
  signal: (o = n.abort) !== null && o !== void 0 ? o : null
2663
2667
  // node-fetch@3.0.0-beta.9 rejects `undefined`
2664
- })).then((k) => {
2665
- let [b, D, $] = rt(k);
2666
- if (O.resolve($), b != null && b !== f.OK)
2667
- throw new I(D ?? f[b], f[b], $);
2668
- return b != null && (A = {
2668
+ })).then((w) => {
2669
+ let [b, v, P] = at(w);
2670
+ if (L.resolve(P), b != null && b !== f.OK)
2671
+ throw new I(v ?? f[b], f[b], P);
2672
+ return b != null && (T = {
2669
2673
  code: f[b],
2670
- detail: D ?? f[b]
2671
- }), k;
2672
- }).then((k) => {
2673
- if (!k.body)
2674
+ detail: v ?? f[b]
2675
+ }), w;
2676
+ }).then((w) => {
2677
+ if (!w.body)
2674
2678
  throw new I("missing response body", f[f.INTERNAL]);
2675
- return It(k.body, k.headers.get("content-type"), (b, D) => {
2679
+ return Lt(w.body, w.headers.get("content-type"), (b, v) => {
2676
2680
  switch (b) {
2677
2681
  case H.DATA:
2678
- F.notifyMessage(e.O.fromBinary(D, l.binaryOptions)), q = !1;
2682
+ O.notifyMessage(e.O.fromBinary(v, l.binaryOptions)), J = !1;
2679
2683
  break;
2680
2684
  case H.TRAILER:
2681
- let $, Q;
2682
- [$, Q, J] = Et(D), A = {
2683
- code: f[$],
2684
- detail: Q ?? f[$]
2685
+ let P, ee;
2686
+ [P, ee, W] = Ft(v), T = {
2687
+ code: f[P],
2688
+ detail: ee ?? f[P]
2685
2689
  };
2686
2690
  break;
2687
2691
  }
2688
2692
  });
2689
2693
  }).then(() => {
2690
- if (!J && !q)
2694
+ if (!W && !J)
2691
2695
  throw new I("missing trailers", f[f.DATA_LOSS]);
2692
- if (!A)
2696
+ if (!T)
2693
2697
  throw new I("missing status", f[f.INTERNAL]);
2694
- if (A.code !== "OK")
2695
- throw new I(A.detail, A.code, J);
2696
- F.notifyComplete(), _.resolve(A), me.resolve(J || {});
2697
- }).catch((k) => {
2698
+ if (T.code !== "OK")
2699
+ throw new I(T.detail, T.code, W);
2700
+ O.notifyComplete(), $.resolve(T), Z.resolve(W || {});
2701
+ }).catch((w) => {
2698
2702
  let b;
2699
- k instanceof I ? b = k : k instanceof Error && k.name === "AbortError" ? b = new I(k.message, f[f.CANCELLED]) : b = new I(k instanceof Error ? k.message : "" + k, f[f.INTERNAL]), b.methodName = e.name, b.serviceName = e.service.typeName, O.rejectPending(b), F.notifyError(b), _.rejectPending(b), me.rejectPending(b);
2700
- }), new xn(e, (a = l.meta) !== null && a !== void 0 ? a : {}, t, O.promise, F, _.promise, me.promise);
2703
+ w instanceof I ? b = w : w instanceof Error && w.name === "AbortError" ? b = new I(w.message, f[f.CANCELLED]) : b = new I(w instanceof Error ? w.message : "" + w, f[f.INTERNAL]), b.methodName = e.name, b.serviceName = e.service.typeName, L.rejectPending(b), O.notifyError(b), $.rejectPending(b), Z.rejectPending(b);
2704
+ }), new Mn(e, (a = l.meta) !== null && a !== void 0 ? a : {}, t, L.promise, O, $.promise, Z.promise);
2701
2705
  }
2702
2706
  unary(e, t, n) {
2703
- var i, s, o, a;
2704
- let l = n, c = (i = l.format) !== null && i !== void 0 ? i : "text", d = (s = l.fetchInit) !== null && s !== void 0 ? s : {}, g = this.makeUrl(e, l), y = e.I.toBinary(t, l.binaryOptions), O = new le(), F, q = new le(), A, _ = new le(), J, me = new le();
2707
+ var r, s, o, a;
2708
+ let l = n, c = (r = l.format) !== null && r !== void 0 ? r : "text", d = (s = l.fetchInit) !== null && s !== void 0 ? s : {}, g = this.makeUrl(e, l), N = e.I.toBinary(t, l.binaryOptions), L = new ue(), O, J = new ue(), T, $ = new ue(), W, Z = new ue();
2705
2709
  return globalThis.fetch(g, Object.assign(Object.assign({}, d), {
2706
2710
  method: "POST",
2707
- headers: Nt(new globalThis.Headers(), c, l.timeout, l.meta),
2708
- body: kt(y, c),
2711
+ headers: At(new globalThis.Headers(), c, l.timeout, l.meta),
2712
+ body: Tt(N, c),
2709
2713
  signal: (o = n.abort) !== null && o !== void 0 ? o : null
2710
2714
  // node-fetch@3.0.0-beta.9 rejects `undefined`
2711
- })).then((k) => {
2712
- let [b, D, $] = rt(k);
2713
- if (O.resolve($), b != null && b !== f.OK)
2714
- throw new I(D ?? f[b], f[b], $);
2715
- return b != null && (A = {
2715
+ })).then((w) => {
2716
+ let [b, v, P] = at(w);
2717
+ if (L.resolve(P), b != null && b !== f.OK)
2718
+ throw new I(v ?? f[b], f[b], P);
2719
+ return b != null && (T = {
2716
2720
  code: f[b],
2717
- detail: D ?? f[b]
2718
- }), k;
2719
- }).then((k) => {
2720
- if (!k.body)
2721
+ detail: v ?? f[b]
2722
+ }), w;
2723
+ }).then((w) => {
2724
+ if (!w.body)
2721
2725
  throw new I("missing response body", f[f.INTERNAL]);
2722
- return It(k.body, k.headers.get("content-type"), (b, D) => {
2726
+ return Lt(w.body, w.headers.get("content-type"), (b, v) => {
2723
2727
  switch (b) {
2724
2728
  case H.DATA:
2725
- if (F)
2729
+ if (O)
2726
2730
  throw new I("unary call received 2nd message", f[f.DATA_LOSS]);
2727
- F = e.O.fromBinary(D, l.binaryOptions);
2731
+ O = e.O.fromBinary(v, l.binaryOptions);
2728
2732
  break;
2729
2733
  case H.TRAILER:
2730
- let $, Q;
2731
- [$, Q, J] = Et(D), A = {
2732
- code: f[$],
2733
- detail: Q ?? f[$]
2734
+ let P, ee;
2735
+ [P, ee, W] = Ft(v), T = {
2736
+ code: f[P],
2737
+ detail: ee ?? f[P]
2734
2738
  };
2735
2739
  break;
2736
2740
  }
2737
2741
  });
2738
2742
  }).then(() => {
2739
- if (!J && F)
2743
+ if (!W && O)
2740
2744
  throw new I("missing trailers", f[f.DATA_LOSS]);
2741
- if (!A)
2745
+ if (!T)
2742
2746
  throw new I("missing status", f[f.INTERNAL]);
2743
- if (!F && A.code === "OK")
2747
+ if (!O && T.code === "OK")
2744
2748
  throw new I("expected error status", f[f.DATA_LOSS]);
2745
- if (!F)
2746
- throw new I(A.detail, A.code, J);
2747
- if (q.resolve(F), A.code !== "OK")
2748
- throw new I(A.detail, A.code, J);
2749
- _.resolve(A), me.resolve(J || {});
2750
- }).catch((k) => {
2749
+ if (!O)
2750
+ throw new I(T.detail, T.code, W);
2751
+ if (J.resolve(O), T.code !== "OK")
2752
+ throw new I(T.detail, T.code, W);
2753
+ $.resolve(T), Z.resolve(W || {});
2754
+ }).catch((w) => {
2751
2755
  let b;
2752
- k instanceof I ? b = k : k instanceof Error && k.name === "AbortError" ? b = new I(k.message, f[f.CANCELLED]) : b = new I(k instanceof Error ? k.message : "" + k, f[f.INTERNAL]), b.methodName = e.name, b.serviceName = e.service.typeName, O.rejectPending(b), q.rejectPending(b), _.rejectPending(b), me.rejectPending(b);
2753
- }), new Un(e, (a = l.meta) !== null && a !== void 0 ? a : {}, t, O.promise, q.promise, _.promise, me.promise);
2756
+ w instanceof I ? b = w : w instanceof Error && w.name === "AbortError" ? b = new I(w.message, f[f.CANCELLED]) : b = new I(w instanceof Error ? w.message : "" + w, f[f.INTERNAL]), b.methodName = e.name, b.serviceName = e.service.typeName, L.rejectPending(b), J.rejectPending(b), $.rejectPending(b), Z.rejectPending(b);
2757
+ }), new Un(e, (a = l.meta) !== null && a !== void 0 ? a : {}, t, L.promise, J.promise, $.promise, Z.promise);
2754
2758
  }
2755
2759
  }
2756
- class Wn extends M {
2760
+ class Xn extends M {
2757
2761
  constructor() {
2758
2762
  super("com.hamropatro.grpc.cms.CreateFolderRequest", [
2759
2763
  {
@@ -2781,10 +2785,10 @@ class Wn extends M {
2781
2785
  }
2782
2786
  create(e) {
2783
2787
  const t = globalThis.Object.create(this.messagePrototype);
2784
- return t.name = "", t.nestedFolderName = "", t.createdBy = "", e !== void 0 && R(this, t, e), t;
2788
+ return t.name = "", t.nestedFolderName = "", t.createdBy = "", e !== void 0 && D(this, t, e), t;
2785
2789
  }
2786
- internalBinaryRead(e, t, n, i) {
2787
- let s = i ?? this.create(), o = e.pos + t;
2790
+ internalBinaryRead(e, t, n, r) {
2791
+ let s = r ?? this.create(), o = e.pos + t;
2788
2792
  for (; e.pos < o; ) {
2789
2793
  let [a, l] = e.tag();
2790
2794
  switch (a) {
@@ -2805,19 +2809,19 @@ class Wn extends M {
2805
2809
  if (c === "throw")
2806
2810
  throw new globalThis.Error(`Unknown field ${a} (wire type ${l}) for ${this.typeName}`);
2807
2811
  let d = e.skip(l);
2808
- c !== !1 && (c === !0 ? N.onRead : c)(this.typeName, s, a, l, d);
2812
+ c !== !1 && (c === !0 ? k.onRead : c)(this.typeName, s, a, l, d);
2809
2813
  }
2810
2814
  }
2811
2815
  return s;
2812
2816
  }
2813
2817
  internalBinaryWrite(e, t, n) {
2814
- e.name !== "" && t.tag(1, m.LengthDelimited).string(e.name), e.nestedFolderName !== "" && t.tag(2, m.LengthDelimited).string(e.nestedFolderName), e.createdBy !== "" && t.tag(3, m.LengthDelimited).string(e.createdBy);
2815
- let i = n.writeUnknownFields;
2816
- return i !== !1 && (i == !0 ? N.onWrite : i)(this.typeName, e, t), t;
2818
+ e.name !== "" && t.tag(1, p.LengthDelimited).string(e.name), e.nestedFolderName !== "" && t.tag(2, p.LengthDelimited).string(e.nestedFolderName), e.createdBy !== "" && t.tag(3, p.LengthDelimited).string(e.createdBy);
2819
+ let r = n.writeUnknownFields;
2820
+ return r !== !1 && (r == !0 ? k.onWrite : r)(this.typeName, e, t), t;
2817
2821
  }
2818
2822
  }
2819
- const St = new Wn();
2820
- class qn extends M {
2823
+ const Pt = new Xn();
2824
+ class Hn extends M {
2821
2825
  constructor() {
2822
2826
  super("com.hamropatro.grpc.cms.GetAllFoldersRequest", [
2823
2827
  {
@@ -2838,10 +2842,10 @@ class qn extends M {
2838
2842
  }
2839
2843
  create(e) {
2840
2844
  const t = globalThis.Object.create(this.messagePrototype);
2841
- return t.cursor = "", t.limit = 0, e !== void 0 && R(this, t, e), t;
2845
+ return t.cursor = "", t.limit = 0, e !== void 0 && D(this, t, e), t;
2842
2846
  }
2843
- internalBinaryRead(e, t, n, i) {
2844
- let s = i ?? this.create(), o = e.pos + t;
2847
+ internalBinaryRead(e, t, n, r) {
2848
+ let s = r ?? this.create(), o = e.pos + t;
2845
2849
  for (; e.pos < o; ) {
2846
2850
  let [a, l] = e.tag();
2847
2851
  switch (a) {
@@ -2858,22 +2862,22 @@ class qn extends M {
2858
2862
  if (c === "throw")
2859
2863
  throw new globalThis.Error(`Unknown field ${a} (wire type ${l}) for ${this.typeName}`);
2860
2864
  let d = e.skip(l);
2861
- c !== !1 && (c === !0 ? N.onRead : c)(this.typeName, s, a, l, d);
2865
+ c !== !1 && (c === !0 ? k.onRead : c)(this.typeName, s, a, l, d);
2862
2866
  }
2863
2867
  }
2864
2868
  return s;
2865
2869
  }
2866
2870
  internalBinaryWrite(e, t, n) {
2867
- e.cursor !== "" && t.tag(1, m.LengthDelimited).string(e.cursor), e.limit !== 0 && t.tag(2, m.Varint).int32(e.limit);
2868
- let i = n.writeUnknownFields;
2869
- return i !== !1 && (i == !0 ? N.onWrite : i)(this.typeName, e, t), t;
2871
+ e.cursor !== "" && t.tag(1, p.LengthDelimited).string(e.cursor), e.limit !== 0 && t.tag(2, p.Varint).int32(e.limit);
2872
+ let r = n.writeUnknownFields;
2873
+ return r !== !1 && (r == !0 ? k.onWrite : r)(this.typeName, e, t), t;
2870
2874
  }
2871
2875
  }
2872
- const Mt = new qn();
2873
- class Kn extends M {
2876
+ const jt = new Hn();
2877
+ class Gn extends M {
2874
2878
  constructor() {
2875
2879
  super("com.hamropatro.grpc.cms.GetAllFoldersResponse", [
2876
- { no: 1, name: "folder", kind: "message", repeat: 1, T: () => Te },
2880
+ { no: 1, name: "folder", kind: "message", repeat: 1, T: () => Fe },
2877
2881
  {
2878
2882
  no: 2,
2879
2883
  name: "next_cursor",
@@ -2892,16 +2896,16 @@ class Kn extends M {
2892
2896
  }
2893
2897
  create(e) {
2894
2898
  const t = globalThis.Object.create(this.messagePrototype);
2895
- return t.folder = [], t.nextCursor = "", t.hasMore = !1, e !== void 0 && R(this, t, e), t;
2899
+ return t.folder = [], t.nextCursor = "", t.hasMore = !1, e !== void 0 && D(this, t, e), t;
2896
2900
  }
2897
- internalBinaryRead(e, t, n, i) {
2898
- let s = i ?? this.create(), o = e.pos + t;
2901
+ internalBinaryRead(e, t, n, r) {
2902
+ let s = r ?? this.create(), o = e.pos + t;
2899
2903
  for (; e.pos < o; ) {
2900
2904
  let [a, l] = e.tag();
2901
2905
  switch (a) {
2902
2906
  case /* repeated com.hamropatro.grpc.cms.Folder folder */
2903
2907
  1:
2904
- s.folder.push(Te.internalBinaryRead(e, e.uint32(), n));
2908
+ s.folder.push(Fe.internalBinaryRead(e, e.uint32(), n));
2905
2909
  break;
2906
2910
  case /* string next_cursor */
2907
2911
  2:
@@ -2916,21 +2920,21 @@ class Kn extends M {
2916
2920
  if (c === "throw")
2917
2921
  throw new globalThis.Error(`Unknown field ${a} (wire type ${l}) for ${this.typeName}`);
2918
2922
  let d = e.skip(l);
2919
- c !== !1 && (c === !0 ? N.onRead : c)(this.typeName, s, a, l, d);
2923
+ c !== !1 && (c === !0 ? k.onRead : c)(this.typeName, s, a, l, d);
2920
2924
  }
2921
2925
  }
2922
2926
  return s;
2923
2927
  }
2924
2928
  internalBinaryWrite(e, t, n) {
2925
2929
  for (let s = 0; s < e.folder.length; s++)
2926
- Te.internalBinaryWrite(e.folder[s], t.tag(1, m.LengthDelimited).fork(), n).join();
2927
- e.nextCursor !== "" && t.tag(2, m.LengthDelimited).string(e.nextCursor), e.hasMore !== !1 && t.tag(3, m.Varint).bool(e.hasMore);
2928
- let i = n.writeUnknownFields;
2929
- return i !== !1 && (i == !0 ? N.onWrite : i)(this.typeName, e, t), t;
2930
+ Fe.internalBinaryWrite(e.folder[s], t.tag(1, p.LengthDelimited).fork(), n).join();
2931
+ e.nextCursor !== "" && t.tag(2, p.LengthDelimited).string(e.nextCursor), e.hasMore !== !1 && t.tag(3, p.Varint).bool(e.hasMore);
2932
+ let r = n.writeUnknownFields;
2933
+ return r !== !1 && (r == !0 ? k.onWrite : r)(this.typeName, e, t), t;
2930
2934
  }
2931
2935
  }
2932
- const Xn = new Kn();
2933
- class Hn extends M {
2936
+ const Jn = new Gn();
2937
+ class Zn extends M {
2934
2938
  constructor() {
2935
2939
  super("com.hamropatro.grpc.cms.Folder", [
2936
2940
  {
@@ -2965,10 +2969,10 @@ class Hn extends M {
2965
2969
  }
2966
2970
  create(e) {
2967
2971
  const t = globalThis.Object.create(this.messagePrototype);
2968
- return t.key = "", t.name = "", t.nestedFolderName = "", t.createdBy = "", e !== void 0 && R(this, t, e), t;
2972
+ return t.key = "", t.name = "", t.nestedFolderName = "", t.createdBy = "", e !== void 0 && D(this, t, e), t;
2969
2973
  }
2970
- internalBinaryRead(e, t, n, i) {
2971
- let s = i ?? this.create(), o = e.pos + t;
2974
+ internalBinaryRead(e, t, n, r) {
2975
+ let s = r ?? this.create(), o = e.pos + t;
2972
2976
  for (; e.pos < o; ) {
2973
2977
  let [a, l] = e.tag();
2974
2978
  switch (a) {
@@ -2993,53 +2997,53 @@ class Hn extends M {
2993
2997
  if (c === "throw")
2994
2998
  throw new globalThis.Error(`Unknown field ${a} (wire type ${l}) for ${this.typeName}`);
2995
2999
  let d = e.skip(l);
2996
- c !== !1 && (c === !0 ? N.onRead : c)(this.typeName, s, a, l, d);
3000
+ c !== !1 && (c === !0 ? k.onRead : c)(this.typeName, s, a, l, d);
2997
3001
  }
2998
3002
  }
2999
3003
  return s;
3000
3004
  }
3001
3005
  internalBinaryWrite(e, t, n) {
3002
- e.key !== "" && t.tag(1, m.LengthDelimited).string(e.key), e.name !== "" && t.tag(2, m.LengthDelimited).string(e.name), e.nestedFolderName !== "" && t.tag(3, m.LengthDelimited).string(e.nestedFolderName), e.createdBy !== "" && t.tag(4, m.LengthDelimited).string(e.createdBy);
3003
- let i = n.writeUnknownFields;
3004
- return i !== !1 && (i == !0 ? N.onWrite : i)(this.typeName, e, t), t;
3006
+ e.key !== "" && t.tag(1, p.LengthDelimited).string(e.key), e.name !== "" && t.tag(2, p.LengthDelimited).string(e.name), e.nestedFolderName !== "" && t.tag(3, p.LengthDelimited).string(e.nestedFolderName), e.createdBy !== "" && t.tag(4, p.LengthDelimited).string(e.createdBy);
3007
+ let r = n.writeUnknownFields;
3008
+ return r !== !1 && (r == !0 ? k.onWrite : r)(this.typeName, e, t), t;
3005
3009
  }
3006
3010
  }
3007
- const Te = new Hn(), Je = new st("com.hamropatro.grpc.cms.FolderService", [
3008
- { name: "createFolder", options: {}, I: St, O: Te },
3009
- { name: "getFolders", options: {}, I: Mt, O: Xn },
3010
- { name: "updateFolder", options: {}, I: Te, O: Te }
3011
+ const Fe = new Zn(), Qe = new ct("com.hamropatro.grpc.cms.FolderService", [
3012
+ { name: "createFolder", options: {}, I: Pt, O: Fe },
3013
+ { name: "getFolders", options: {}, I: jt, O: Jn },
3014
+ { name: "updateFolder", options: {}, I: Fe, O: Fe }
3011
3015
  ]);
3012
- class Gn {
3016
+ class Yn {
3013
3017
  constructor(e) {
3014
- C(this, "typeName", Je.typeName);
3015
- C(this, "methods", Je.methods);
3016
- C(this, "options", Je.options);
3018
+ _(this, "typeName", Qe.typeName);
3019
+ _(this, "methods", Qe.methods);
3020
+ _(this, "options", Qe.options);
3017
3021
  this._transport = e;
3018
3022
  }
3019
3023
  /**
3020
3024
  * @generated from protobuf rpc: createFolder(com.hamropatro.grpc.cms.CreateFolderRequest) returns (com.hamropatro.grpc.cms.Folder);
3021
3025
  */
3022
3026
  createFolder(e, t) {
3023
- const n = this.methods[0], i = this._transport.mergeOptions(t);
3024
- return se("unary", this._transport, n, i, e);
3027
+ const n = this.methods[0], r = this._transport.mergeOptions(t);
3028
+ return le("unary", this._transport, n, r, e);
3025
3029
  }
3026
3030
  /**
3027
3031
  * @generated from protobuf rpc: getFolders(com.hamropatro.grpc.cms.GetAllFoldersRequest) returns (com.hamropatro.grpc.cms.GetAllFoldersResponse);
3028
3032
  */
3029
3033
  getFolders(e, t) {
3030
- const n = this.methods[1], i = this._transport.mergeOptions(t);
3031
- return se("unary", this._transport, n, i, e);
3034
+ const n = this.methods[1], r = this._transport.mergeOptions(t);
3035
+ return le("unary", this._transport, n, r, e);
3032
3036
  }
3033
3037
  /**
3034
3038
  * @generated from protobuf rpc: updateFolder(com.hamropatro.grpc.cms.Folder) returns (com.hamropatro.grpc.cms.Folder);
3035
3039
  */
3036
3040
  updateFolder(e, t) {
3037
- const n = this.methods[2], i = this._transport.mergeOptions(t);
3038
- return se("unary", this._transport, n, i, e);
3041
+ const n = this.methods[2], r = this._transport.mergeOptions(t);
3042
+ return le("unary", this._transport, n, r, e);
3039
3043
  }
3040
3044
  }
3041
- var ot = /* @__PURE__ */ ((r) => (r[r.IMAGE = 0] = "IMAGE", r[r.AUDIO = 1] = "AUDIO", r[r.VIDEO = 2] = "VIDEO", r[r.ALL = 3] = "ALL", r[r.FOLDER = 4] = "FOLDER", r))(ot || {});
3042
- class Jn extends M {
3045
+ var ht = /* @__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))(ht || {});
3046
+ class zn extends M {
3043
3047
  constructor() {
3044
3048
  super("com.hamropatro.grpc.cms.SearchRequest", [
3045
3049
  {
@@ -3067,10 +3071,10 @@ class Jn extends M {
3067
3071
  }
3068
3072
  create(e) {
3069
3073
  const t = globalThis.Object.create(this.messagePrototype);
3070
- return t.searchValue = "", t.cursor = "", t.limit = 0, e !== void 0 && R(this, t, e), t;
3074
+ return t.searchValue = "", t.cursor = "", t.limit = 0, e !== void 0 && D(this, t, e), t;
3071
3075
  }
3072
- internalBinaryRead(e, t, n, i) {
3073
- let s = i ?? this.create(), o = e.pos + t;
3076
+ internalBinaryRead(e, t, n, r) {
3077
+ let s = r ?? this.create(), o = e.pos + t;
3074
3078
  for (; e.pos < o; ) {
3075
3079
  let [a, l] = e.tag();
3076
3080
  switch (a) {
@@ -3091,22 +3095,22 @@ class Jn extends M {
3091
3095
  if (c === "throw")
3092
3096
  throw new globalThis.Error(`Unknown field ${a} (wire type ${l}) for ${this.typeName}`);
3093
3097
  let d = e.skip(l);
3094
- c !== !1 && (c === !0 ? N.onRead : c)(this.typeName, s, a, l, d);
3098
+ c !== !1 && (c === !0 ? k.onRead : c)(this.typeName, s, a, l, d);
3095
3099
  }
3096
3100
  }
3097
3101
  return s;
3098
3102
  }
3099
3103
  internalBinaryWrite(e, t, n) {
3100
- e.searchValue !== "" && t.tag(1, m.LengthDelimited).string(e.searchValue), e.cursor !== "" && t.tag(2, m.LengthDelimited).string(e.cursor), e.limit !== 0 && t.tag(3, m.Varint).int32(e.limit);
3101
- let i = n.writeUnknownFields;
3102
- return i !== !1 && (i == !0 ? N.onWrite : i)(this.typeName, e, t), t;
3104
+ e.searchValue !== "" && t.tag(1, p.LengthDelimited).string(e.searchValue), e.cursor !== "" && t.tag(2, p.LengthDelimited).string(e.cursor), e.limit !== 0 && t.tag(3, p.Varint).int32(e.limit);
3105
+ let r = n.writeUnknownFields;
3106
+ return r !== !1 && (r == !0 ? k.onWrite : r)(this.typeName, e, t), t;
3103
3107
  }
3104
3108
  }
3105
- const Vt = new Jn();
3106
- class Zn extends M {
3109
+ const Wt = new zn();
3110
+ class Qn extends M {
3107
3111
  constructor() {
3108
3112
  super("com.hamropatro.grpc.cms.SearchResult", [
3109
- { no: 1, name: "items", kind: "message", repeat: 1, T: () => ae },
3113
+ { no: 1, name: "items", kind: "message", repeat: 1, T: () => he },
3110
3114
  {
3111
3115
  no: 2,
3112
3116
  name: "next_page_cursor",
@@ -3118,16 +3122,16 @@ class Zn extends M {
3118
3122
  }
3119
3123
  create(e) {
3120
3124
  const t = globalThis.Object.create(this.messagePrototype);
3121
- return t.items = [], t.nextPageCursor = "", e !== void 0 && R(this, t, e), t;
3125
+ return t.items = [], t.nextPageCursor = "", e !== void 0 && D(this, t, e), t;
3122
3126
  }
3123
- internalBinaryRead(e, t, n, i) {
3124
- let s = i ?? this.create(), o = e.pos + t;
3127
+ internalBinaryRead(e, t, n, r) {
3128
+ let s = r ?? this.create(), o = e.pos + t;
3125
3129
  for (; e.pos < o; ) {
3126
3130
  let [a, l] = e.tag();
3127
3131
  switch (a) {
3128
3132
  case /* repeated com.hamropatro.grpc.cms.File items */
3129
3133
  1:
3130
- s.items.push(ae.internalBinaryRead(e, e.uint32(), n));
3134
+ s.items.push(he.internalBinaryRead(e, e.uint32(), n));
3131
3135
  break;
3132
3136
  case /* string next_page_cursor */
3133
3137
  2:
@@ -3138,21 +3142,21 @@ class Zn extends M {
3138
3142
  if (c === "throw")
3139
3143
  throw new globalThis.Error(`Unknown field ${a} (wire type ${l}) for ${this.typeName}`);
3140
3144
  let d = e.skip(l);
3141
- c !== !1 && (c === !0 ? N.onRead : c)(this.typeName, s, a, l, d);
3145
+ c !== !1 && (c === !0 ? k.onRead : c)(this.typeName, s, a, l, d);
3142
3146
  }
3143
3147
  }
3144
3148
  return s;
3145
3149
  }
3146
3150
  internalBinaryWrite(e, t, n) {
3147
3151
  for (let s = 0; s < e.items.length; s++)
3148
- ae.internalBinaryWrite(e.items[s], t.tag(1, m.LengthDelimited).fork(), n).join();
3149
- e.nextPageCursor !== "" && t.tag(2, m.LengthDelimited).string(e.nextPageCursor);
3150
- let i = n.writeUnknownFields;
3151
- return i !== !1 && (i == !0 ? N.onWrite : i)(this.typeName, e, t), t;
3152
+ he.internalBinaryWrite(e.items[s], t.tag(1, p.LengthDelimited).fork(), n).join();
3153
+ e.nextPageCursor !== "" && t.tag(2, p.LengthDelimited).string(e.nextPageCursor);
3154
+ let r = n.writeUnknownFields;
3155
+ return r !== !1 && (r == !0 ? k.onWrite : r)(this.typeName, e, t), t;
3152
3156
  }
3153
3157
  }
3154
- const Yn = new Zn();
3155
- class zn extends M {
3158
+ const ei = new Qn();
3159
+ class ti extends M {
3156
3160
  constructor() {
3157
3161
  super("com.hamropatro.grpc.cms.CreateFileRequest", [
3158
3162
  {
@@ -3183,15 +3187,15 @@ class zn extends M {
3183
3187
  T: 9
3184
3188
  /*ScalarType.STRING*/
3185
3189
  },
3186
- { no: 5, name: "type", kind: "enum", T: () => ["com.hamropatro.grpc.cms.FileType", ot] }
3190
+ { no: 5, name: "type", kind: "enum", T: () => ["com.hamropatro.grpc.cms.FileType", ht] }
3187
3191
  ]);
3188
3192
  }
3189
3193
  create(e) {
3190
3194
  const t = globalThis.Object.create(this.messagePrototype);
3191
- return t.name = "", t.folderName = "", t.nestedFolderName = "", t.url = "", t.type = 0, e !== void 0 && R(this, t, e), t;
3195
+ return t.name = "", t.folderName = "", t.nestedFolderName = "", t.url = "", t.type = 0, e !== void 0 && D(this, t, e), t;
3192
3196
  }
3193
- internalBinaryRead(e, t, n, i) {
3194
- let s = i ?? this.create(), o = e.pos + t;
3197
+ internalBinaryRead(e, t, n, r) {
3198
+ let s = r ?? this.create(), o = e.pos + t;
3195
3199
  for (; e.pos < o; ) {
3196
3200
  let [a, l] = e.tag();
3197
3201
  switch (a) {
@@ -3220,19 +3224,19 @@ class zn extends M {
3220
3224
  if (c === "throw")
3221
3225
  throw new globalThis.Error(`Unknown field ${a} (wire type ${l}) for ${this.typeName}`);
3222
3226
  let d = e.skip(l);
3223
- c !== !1 && (c === !0 ? N.onRead : c)(this.typeName, s, a, l, d);
3227
+ c !== !1 && (c === !0 ? k.onRead : c)(this.typeName, s, a, l, d);
3224
3228
  }
3225
3229
  }
3226
3230
  return s;
3227
3231
  }
3228
3232
  internalBinaryWrite(e, t, n) {
3229
- e.name !== "" && t.tag(1, m.LengthDelimited).string(e.name), e.folderName !== "" && t.tag(2, m.LengthDelimited).string(e.folderName), e.nestedFolderName !== "" && t.tag(3, m.LengthDelimited).string(e.nestedFolderName), e.url !== "" && t.tag(4, m.LengthDelimited).string(e.url), e.type !== 0 && t.tag(5, m.Varint).int32(e.type);
3230
- let i = n.writeUnknownFields;
3231
- return i !== !1 && (i == !0 ? N.onWrite : i)(this.typeName, e, t), t;
3233
+ e.name !== "" && t.tag(1, p.LengthDelimited).string(e.name), e.folderName !== "" && t.tag(2, p.LengthDelimited).string(e.folderName), e.nestedFolderName !== "" && t.tag(3, p.LengthDelimited).string(e.nestedFolderName), e.url !== "" && t.tag(4, p.LengthDelimited).string(e.url), e.type !== 0 && t.tag(5, p.Varint).int32(e.type);
3234
+ let r = n.writeUnknownFields;
3235
+ return r !== !1 && (r == !0 ? k.onWrite : r)(this.typeName, e, t), t;
3232
3236
  }
3233
3237
  }
3234
- const $t = new zn();
3235
- class Qn extends M {
3238
+ const qt = new ti();
3239
+ class ni extends M {
3236
3240
  constructor() {
3237
3241
  super("com.hamropatro.grpc.cms.File", [
3238
3242
  {
@@ -3284,16 +3288,16 @@ class Qn extends M {
3284
3288
  T: 9
3285
3289
  /*ScalarType.STRING*/
3286
3290
  },
3287
- { no: 8, name: "type", kind: "enum", T: () => ["com.hamropatro.grpc.cms.FileType", ot] },
3288
- { no: 9, name: "metadata", kind: "message", T: () => Ze }
3291
+ { no: 8, name: "type", kind: "enum", T: () => ["com.hamropatro.grpc.cms.FileType", ht] },
3292
+ { no: 9, name: "metadata", kind: "message", T: () => et }
3289
3293
  ]);
3290
3294
  }
3291
3295
  create(e) {
3292
3296
  const t = globalThis.Object.create(this.messagePrototype);
3293
- return t.key = "", t.name = "", t.folderName = "", t.nestedFolderName = "", t.url = "", t.thumborUrl = "", t.proxyUrl = "", t.type = 0, e !== void 0 && R(this, t, e), t;
3297
+ return t.key = "", t.name = "", t.folderName = "", t.nestedFolderName = "", t.url = "", t.thumborUrl = "", t.proxyUrl = "", t.type = 0, e !== void 0 && D(this, t, e), t;
3294
3298
  }
3295
- internalBinaryRead(e, t, n, i) {
3296
- let s = i ?? this.create(), o = e.pos + t;
3299
+ internalBinaryRead(e, t, n, r) {
3300
+ let s = r ?? this.create(), o = e.pos + t;
3297
3301
  for (; e.pos < o; ) {
3298
3302
  let [a, l] = e.tag();
3299
3303
  switch (a) {
@@ -3331,26 +3335,26 @@ class Qn extends M {
3331
3335
  break;
3332
3336
  case /* com.hamropatro.grpc.cms.FileMetadata metadata */
3333
3337
  9:
3334
- s.metadata = Ze.internalBinaryRead(e, e.uint32(), n, s.metadata);
3338
+ s.metadata = et.internalBinaryRead(e, e.uint32(), n, s.metadata);
3335
3339
  break;
3336
3340
  default:
3337
3341
  let c = n.readUnknownField;
3338
3342
  if (c === "throw")
3339
3343
  throw new globalThis.Error(`Unknown field ${a} (wire type ${l}) for ${this.typeName}`);
3340
3344
  let d = e.skip(l);
3341
- c !== !1 && (c === !0 ? N.onRead : c)(this.typeName, s, a, l, d);
3345
+ c !== !1 && (c === !0 ? k.onRead : c)(this.typeName, s, a, l, d);
3342
3346
  }
3343
3347
  }
3344
3348
  return s;
3345
3349
  }
3346
3350
  internalBinaryWrite(e, t, n) {
3347
- 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 && Ze.internalBinaryWrite(e.metadata, t.tag(9, m.LengthDelimited).fork(), n).join();
3348
- let i = n.writeUnknownFields;
3349
- return i !== !1 && (i == !0 ? N.onWrite : i)(this.typeName, e, t), t;
3351
+ e.key !== "" && t.tag(1, p.LengthDelimited).string(e.key), e.name !== "" && t.tag(2, p.LengthDelimited).string(e.name), e.folderName !== "" && t.tag(3, p.LengthDelimited).string(e.folderName), e.nestedFolderName !== "" && t.tag(4, p.LengthDelimited).string(e.nestedFolderName), e.url !== "" && t.tag(5, p.LengthDelimited).string(e.url), e.thumborUrl !== "" && t.tag(6, p.LengthDelimited).string(e.thumborUrl), e.proxyUrl !== "" && t.tag(7, p.LengthDelimited).string(e.proxyUrl), e.type !== 0 && t.tag(8, p.Varint).int32(e.type), e.metadata && et.internalBinaryWrite(e.metadata, t.tag(9, p.LengthDelimited).fork(), n).join();
3352
+ let r = n.writeUnknownFields;
3353
+ return r !== !1 && (r == !0 ? k.onWrite : r)(this.typeName, e, t), t;
3350
3354
  }
3351
3355
  }
3352
- const ae = new Qn();
3353
- class er extends M {
3356
+ const he = new ni();
3357
+ class ii extends M {
3354
3358
  constructor() {
3355
3359
  super("com.hamropatro.grpc.cms.FileMetadata", [
3356
3360
  {
@@ -3385,10 +3389,10 @@ class er extends M {
3385
3389
  }
3386
3390
  create(e) {
3387
3391
  const t = globalThis.Object.create(this.messagePrototype);
3388
- return t.height = 0, t.width = 0, t.backgroundColor = "", t.aspectRatio = 0, e !== void 0 && R(this, t, e), t;
3392
+ return t.height = 0, t.width = 0, t.backgroundColor = "", t.aspectRatio = 0, e !== void 0 && D(this, t, e), t;
3389
3393
  }
3390
- internalBinaryRead(e, t, n, i) {
3391
- let s = i ?? this.create(), o = e.pos + t;
3394
+ internalBinaryRead(e, t, n, r) {
3395
+ let s = r ?? this.create(), o = e.pos + t;
3392
3396
  for (; e.pos < o; ) {
3393
3397
  let [a, l] = e.tag();
3394
3398
  switch (a) {
@@ -3413,19 +3417,19 @@ class er extends M {
3413
3417
  if (c === "throw")
3414
3418
  throw new globalThis.Error(`Unknown field ${a} (wire type ${l}) for ${this.typeName}`);
3415
3419
  let d = e.skip(l);
3416
- c !== !1 && (c === !0 ? N.onRead : c)(this.typeName, s, a, l, d);
3420
+ c !== !1 && (c === !0 ? k.onRead : c)(this.typeName, s, a, l, d);
3417
3421
  }
3418
3422
  }
3419
3423
  return s;
3420
3424
  }
3421
3425
  internalBinaryWrite(e, t, n) {
3422
- e.height !== 0 && t.tag(1, m.Varint).int32(e.height), e.width !== 0 && t.tag(2, m.Varint).int32(e.width), e.backgroundColor !== "" && t.tag(3, m.LengthDelimited).string(e.backgroundColor), e.aspectRatio !== 0 && t.tag(4, m.Bit64).double(e.aspectRatio);
3423
- let i = n.writeUnknownFields;
3424
- return i !== !1 && (i == !0 ? N.onWrite : i)(this.typeName, e, t), t;
3426
+ e.height !== 0 && t.tag(1, p.Varint).int32(e.height), e.width !== 0 && t.tag(2, p.Varint).int32(e.width), e.backgroundColor !== "" && t.tag(3, p.LengthDelimited).string(e.backgroundColor), e.aspectRatio !== 0 && t.tag(4, p.Bit64).double(e.aspectRatio);
3427
+ let r = n.writeUnknownFields;
3428
+ return r !== !1 && (r == !0 ? k.onWrite : r)(this.typeName, e, t), t;
3425
3429
  }
3426
3430
  }
3427
- const Ze = new er();
3428
- class tr extends M {
3431
+ const et = new ii();
3432
+ class ri extends M {
3429
3433
  constructor() {
3430
3434
  super("com.hamropatro.grpc.cms.DeleteFileRequest", [
3431
3435
  {
@@ -3439,10 +3443,10 @@ class tr extends M {
3439
3443
  }
3440
3444
  create(e) {
3441
3445
  const t = globalThis.Object.create(this.messagePrototype);
3442
- return t.key = "", e !== void 0 && R(this, t, e), t;
3446
+ return t.key = "", e !== void 0 && D(this, t, e), t;
3443
3447
  }
3444
- internalBinaryRead(e, t, n, i) {
3445
- let s = i ?? this.create(), o = e.pos + t;
3448
+ internalBinaryRead(e, t, n, r) {
3449
+ let s = r ?? this.create(), o = e.pos + t;
3446
3450
  for (; e.pos < o; ) {
3447
3451
  let [a, l] = e.tag();
3448
3452
  switch (a) {
@@ -3455,19 +3459,19 @@ class tr extends M {
3455
3459
  if (c === "throw")
3456
3460
  throw new globalThis.Error(`Unknown field ${a} (wire type ${l}) for ${this.typeName}`);
3457
3461
  let d = e.skip(l);
3458
- c !== !1 && (c === !0 ? N.onRead : c)(this.typeName, s, a, l, d);
3462
+ c !== !1 && (c === !0 ? k.onRead : c)(this.typeName, s, a, l, d);
3459
3463
  }
3460
3464
  }
3461
3465
  return s;
3462
3466
  }
3463
3467
  internalBinaryWrite(e, t, n) {
3464
- e.key !== "" && t.tag(1, m.LengthDelimited).string(e.key);
3465
- let i = n.writeUnknownFields;
3466
- return i !== !1 && (i == !0 ? N.onWrite : i)(this.typeName, e, t), t;
3468
+ e.key !== "" && t.tag(1, p.LengthDelimited).string(e.key);
3469
+ let r = n.writeUnknownFields;
3470
+ return r !== !1 && (r == !0 ? k.onWrite : r)(this.typeName, e, t), t;
3467
3471
  }
3468
3472
  }
3469
- const nr = new tr();
3470
- class rr extends M {
3473
+ const si = new ri();
3474
+ class oi extends M {
3471
3475
  constructor() {
3472
3476
  super("com.hamropatro.grpc.cms.DeleteFileResponse", [
3473
3477
  {
@@ -3481,10 +3485,10 @@ class rr extends M {
3481
3485
  }
3482
3486
  create(e) {
3483
3487
  const t = globalThis.Object.create(this.messagePrototype);
3484
- return t.isDeleted = !1, e !== void 0 && R(this, t, e), t;
3488
+ return t.isDeleted = !1, e !== void 0 && D(this, t, e), t;
3485
3489
  }
3486
- internalBinaryRead(e, t, n, i) {
3487
- let s = i ?? this.create(), o = e.pos + t;
3490
+ internalBinaryRead(e, t, n, r) {
3491
+ let s = r ?? this.create(), o = e.pos + t;
3488
3492
  for (; e.pos < o; ) {
3489
3493
  let [a, l] = e.tag();
3490
3494
  switch (a) {
@@ -3497,19 +3501,19 @@ class rr extends M {
3497
3501
  if (c === "throw")
3498
3502
  throw new globalThis.Error(`Unknown field ${a} (wire type ${l}) for ${this.typeName}`);
3499
3503
  let d = e.skip(l);
3500
- c !== !1 && (c === !0 ? N.onRead : c)(this.typeName, s, a, l, d);
3504
+ c !== !1 && (c === !0 ? k.onRead : c)(this.typeName, s, a, l, d);
3501
3505
  }
3502
3506
  }
3503
3507
  return s;
3504
3508
  }
3505
3509
  internalBinaryWrite(e, t, n) {
3506
- e.isDeleted !== !1 && t.tag(1, m.Varint).bool(e.isDeleted);
3507
- let i = n.writeUnknownFields;
3508
- return i !== !1 && (i == !0 ? N.onWrite : i)(this.typeName, e, t), t;
3510
+ e.isDeleted !== !1 && t.tag(1, p.Varint).bool(e.isDeleted);
3511
+ let r = n.writeUnknownFields;
3512
+ return r !== !1 && (r == !0 ? k.onWrite : r)(this.typeName, e, t), t;
3509
3513
  }
3510
3514
  }
3511
- const ir = new rr();
3512
- class sr extends M {
3515
+ const ai = new oi();
3516
+ class li extends M {
3513
3517
  constructor() {
3514
3518
  super("com.hamropatro.grpc.cms.GetFilesByFolderRequest", [
3515
3519
  {
@@ -3537,10 +3541,10 @@ class sr extends M {
3537
3541
  }
3538
3542
  create(e) {
3539
3543
  const t = globalThis.Object.create(this.messagePrototype);
3540
- return t.folderName = "", t.cursor = "", t.limit = 0, e !== void 0 && R(this, t, e), t;
3544
+ return t.folderName = "", t.cursor = "", t.limit = 0, e !== void 0 && D(this, t, e), t;
3541
3545
  }
3542
- internalBinaryRead(e, t, n, i) {
3543
- let s = i ?? this.create(), o = e.pos + t;
3546
+ internalBinaryRead(e, t, n, r) {
3547
+ let s = r ?? this.create(), o = e.pos + t;
3544
3548
  for (; e.pos < o; ) {
3545
3549
  let [a, l] = e.tag();
3546
3550
  switch (a) {
@@ -3561,22 +3565,22 @@ class sr extends M {
3561
3565
  if (c === "throw")
3562
3566
  throw new globalThis.Error(`Unknown field ${a} (wire type ${l}) for ${this.typeName}`);
3563
3567
  let d = e.skip(l);
3564
- c !== !1 && (c === !0 ? N.onRead : c)(this.typeName, s, a, l, d);
3568
+ c !== !1 && (c === !0 ? k.onRead : c)(this.typeName, s, a, l, d);
3565
3569
  }
3566
3570
  }
3567
3571
  return s;
3568
3572
  }
3569
3573
  internalBinaryWrite(e, t, n) {
3570
- e.folderName !== "" && t.tag(1, m.LengthDelimited).string(e.folderName), e.cursor !== "" && t.tag(2, m.LengthDelimited).string(e.cursor), e.limit !== 0 && t.tag(3, m.Varint).int32(e.limit);
3571
- let i = n.writeUnknownFields;
3572
- return i !== !1 && (i == !0 ? N.onWrite : i)(this.typeName, e, t), t;
3574
+ e.folderName !== "" && t.tag(1, p.LengthDelimited).string(e.folderName), e.cursor !== "" && t.tag(2, p.LengthDelimited).string(e.cursor), e.limit !== 0 && t.tag(3, p.Varint).int32(e.limit);
3575
+ let r = n.writeUnknownFields;
3576
+ return r !== !1 && (r == !0 ? k.onWrite : r)(this.typeName, e, t), t;
3573
3577
  }
3574
3578
  }
3575
- const Pt = new sr();
3576
- class or extends M {
3579
+ const Kt = new li();
3580
+ class ci extends M {
3577
3581
  constructor() {
3578
3582
  super("com.hamropatro.grpc.cms.GetFilesByFolderResponse", [
3579
- { no: 1, name: "files", kind: "message", repeat: 1, T: () => ae },
3583
+ { no: 1, name: "files", kind: "message", repeat: 1, T: () => he },
3580
3584
  {
3581
3585
  no: 2,
3582
3586
  name: "next_cursor",
@@ -3595,16 +3599,16 @@ class or extends M {
3595
3599
  }
3596
3600
  create(e) {
3597
3601
  const t = globalThis.Object.create(this.messagePrototype);
3598
- return t.files = [], t.nextCursor = "", t.hasMore = !1, e !== void 0 && R(this, t, e), t;
3602
+ return t.files = [], t.nextCursor = "", t.hasMore = !1, e !== void 0 && D(this, t, e), t;
3599
3603
  }
3600
- internalBinaryRead(e, t, n, i) {
3601
- let s = i ?? this.create(), o = e.pos + t;
3604
+ internalBinaryRead(e, t, n, r) {
3605
+ let s = r ?? this.create(), o = e.pos + t;
3602
3606
  for (; e.pos < o; ) {
3603
3607
  let [a, l] = e.tag();
3604
3608
  switch (a) {
3605
3609
  case /* repeated com.hamropatro.grpc.cms.File files */
3606
3610
  1:
3607
- s.files.push(ae.internalBinaryRead(e, e.uint32(), n));
3611
+ s.files.push(he.internalBinaryRead(e, e.uint32(), n));
3608
3612
  break;
3609
3613
  case /* string next_cursor */
3610
3614
  2:
@@ -3619,87 +3623,87 @@ class or extends M {
3619
3623
  if (c === "throw")
3620
3624
  throw new globalThis.Error(`Unknown field ${a} (wire type ${l}) for ${this.typeName}`);
3621
3625
  let d = e.skip(l);
3622
- c !== !1 && (c === !0 ? N.onRead : c)(this.typeName, s, a, l, d);
3626
+ c !== !1 && (c === !0 ? k.onRead : c)(this.typeName, s, a, l, d);
3623
3627
  }
3624
3628
  }
3625
3629
  return s;
3626
3630
  }
3627
3631
  internalBinaryWrite(e, t, n) {
3628
3632
  for (let s = 0; s < e.files.length; s++)
3629
- ae.internalBinaryWrite(e.files[s], t.tag(1, m.LengthDelimited).fork(), n).join();
3630
- e.nextCursor !== "" && t.tag(2, m.LengthDelimited).string(e.nextCursor), e.hasMore !== !1 && t.tag(3, m.Varint).bool(e.hasMore);
3631
- let i = n.writeUnknownFields;
3632
- return i !== !1 && (i == !0 ? N.onWrite : i)(this.typeName, e, t), t;
3633
+ he.internalBinaryWrite(e.files[s], t.tag(1, p.LengthDelimited).fork(), n).join();
3634
+ e.nextCursor !== "" && t.tag(2, p.LengthDelimited).string(e.nextCursor), e.hasMore !== !1 && t.tag(3, p.Varint).bool(e.hasMore);
3635
+ let r = n.writeUnknownFields;
3636
+ return r !== !1 && (r == !0 ? k.onWrite : r)(this.typeName, e, t), t;
3633
3637
  }
3634
3638
  }
3635
- const ar = new or(), Ye = new st("com.hamropatro.grpc.cms.FileService", [
3636
- { name: "createFile", options: {}, I: $t, O: ae },
3637
- { name: "updateFile", options: {}, I: ae, O: ae },
3638
- { name: "deleteFile", options: {}, I: nr, O: ir },
3639
- { name: "getFilesByFolder", options: {}, I: Pt, O: ar },
3640
- { name: "search", options: {}, I: Vt, O: Yn }
3639
+ const hi = new ci(), tt = new ct("com.hamropatro.grpc.cms.FileService", [
3640
+ { name: "createFile", options: {}, I: qt, O: he },
3641
+ { name: "updateFile", options: {}, I: he, O: he },
3642
+ { name: "deleteFile", options: {}, I: si, O: ai },
3643
+ { name: "getFilesByFolder", options: {}, I: Kt, O: hi },
3644
+ { name: "search", options: {}, I: Wt, O: ei }
3641
3645
  ]);
3642
- class lr {
3646
+ class ui {
3643
3647
  constructor(e) {
3644
- C(this, "typeName", Ye.typeName);
3645
- C(this, "methods", Ye.methods);
3646
- C(this, "options", Ye.options);
3648
+ _(this, "typeName", tt.typeName);
3649
+ _(this, "methods", tt.methods);
3650
+ _(this, "options", tt.options);
3647
3651
  this._transport = e;
3648
3652
  }
3649
3653
  /**
3650
3654
  * @generated from protobuf rpc: createFile(com.hamropatro.grpc.cms.CreateFileRequest) returns (com.hamropatro.grpc.cms.File);
3651
3655
  */
3652
3656
  createFile(e, t) {
3653
- const n = this.methods[0], i = this._transport.mergeOptions(t);
3654
- return se("unary", this._transport, n, i, e);
3657
+ const n = this.methods[0], r = this._transport.mergeOptions(t);
3658
+ return le("unary", this._transport, n, r, e);
3655
3659
  }
3656
3660
  /**
3657
3661
  * @generated from protobuf rpc: updateFile(com.hamropatro.grpc.cms.File) returns (com.hamropatro.grpc.cms.File);
3658
3662
  */
3659
3663
  updateFile(e, t) {
3660
- const n = this.methods[1], i = this._transport.mergeOptions(t);
3661
- return se("unary", this._transport, n, i, e);
3664
+ const n = this.methods[1], r = this._transport.mergeOptions(t);
3665
+ return le("unary", this._transport, n, r, e);
3662
3666
  }
3663
3667
  /**
3664
3668
  * @generated from protobuf rpc: deleteFile(com.hamropatro.grpc.cms.DeleteFileRequest) returns (com.hamropatro.grpc.cms.DeleteFileResponse);
3665
3669
  */
3666
3670
  deleteFile(e, t) {
3667
- const n = this.methods[2], i = this._transport.mergeOptions(t);
3668
- return se("unary", this._transport, n, i, e);
3671
+ const n = this.methods[2], r = this._transport.mergeOptions(t);
3672
+ return le("unary", this._transport, n, r, e);
3669
3673
  }
3670
3674
  /**
3671
3675
  * @generated from protobuf rpc: getFilesByFolder(com.hamropatro.grpc.cms.GetFilesByFolderRequest) returns (com.hamropatro.grpc.cms.GetFilesByFolderResponse);
3672
3676
  */
3673
3677
  getFilesByFolder(e, t) {
3674
- const n = this.methods[3], i = this._transport.mergeOptions(t);
3675
- return se("unary", this._transport, n, i, e);
3678
+ const n = this.methods[3], r = this._transport.mergeOptions(t);
3679
+ return le("unary", this._transport, n, r, e);
3676
3680
  }
3677
3681
  /**
3678
3682
  * @generated from protobuf rpc: search(com.hamropatro.grpc.cms.SearchRequest) returns (com.hamropatro.grpc.cms.SearchResult);
3679
3683
  */
3680
3684
  search(e, t) {
3681
- const n = this.methods[4], i = this._transport.mergeOptions(t);
3682
- return se("unary", this._transport, n, i, e);
3685
+ const n = this.methods[4], r = this._transport.mergeOptions(t);
3686
+ return le("unary", this._transport, n, r, e);
3683
3687
  }
3684
3688
  }
3685
- class cr extends M {
3689
+ class di extends M {
3686
3690
  constructor() {
3687
3691
  super("com.hamropatro.grpc.cms.ImageUploadRequest", []);
3688
3692
  }
3689
3693
  create(e) {
3690
3694
  const t = globalThis.Object.create(this.messagePrototype);
3691
- return e !== void 0 && R(this, t, e), t;
3695
+ return e !== void 0 && D(this, t, e), t;
3692
3696
  }
3693
- internalBinaryRead(e, t, n, i) {
3694
- return i ?? this.create();
3697
+ internalBinaryRead(e, t, n, r) {
3698
+ return r ?? this.create();
3695
3699
  }
3696
3700
  internalBinaryWrite(e, t, n) {
3697
- let i = n.writeUnknownFields;
3698
- return i !== !1 && (i == !0 ? N.onWrite : i)(this.typeName, e, t), t;
3701
+ let r = n.writeUnknownFields;
3702
+ return r !== !1 && (r == !0 ? k.onWrite : r)(this.typeName, e, t), t;
3699
3703
  }
3700
3704
  }
3701
- const jt = new cr();
3702
- class hr extends M {
3705
+ const Xt = new di();
3706
+ class fi extends M {
3703
3707
  constructor() {
3704
3708
  super("com.hamropatro.grpc.cms.ImageUploadResponse", [
3705
3709
  {
@@ -3720,10 +3724,10 @@ class hr extends M {
3720
3724
  }
3721
3725
  create(e) {
3722
3726
  const t = globalThis.Object.create(this.messagePrototype);
3723
- return t.key = "", t.url = "", e !== void 0 && R(this, t, e), t;
3727
+ return t.key = "", t.url = "", e !== void 0 && D(this, t, e), t;
3724
3728
  }
3725
- internalBinaryRead(e, t, n, i) {
3726
- let s = i ?? this.create(), o = e.pos + t;
3729
+ internalBinaryRead(e, t, n, r) {
3730
+ let s = r ?? this.create(), o = e.pos + t;
3727
3731
  for (; e.pos < o; ) {
3728
3732
  let [a, l] = e.tag();
3729
3733
  switch (a) {
@@ -3740,132 +3744,132 @@ class hr extends M {
3740
3744
  if (c === "throw")
3741
3745
  throw new globalThis.Error(`Unknown field ${a} (wire type ${l}) for ${this.typeName}`);
3742
3746
  let d = e.skip(l);
3743
- c !== !1 && (c === !0 ? N.onRead : c)(this.typeName, s, a, l, d);
3747
+ c !== !1 && (c === !0 ? k.onRead : c)(this.typeName, s, a, l, d);
3744
3748
  }
3745
3749
  }
3746
3750
  return s;
3747
3751
  }
3748
3752
  internalBinaryWrite(e, t, n) {
3749
- e.key !== "" && t.tag(1, m.LengthDelimited).string(e.key), e.url !== "" && t.tag(2, m.LengthDelimited).string(e.url);
3750
- let i = n.writeUnknownFields;
3751
- return i !== !1 && (i == !0 ? N.onWrite : i)(this.typeName, e, t), t;
3753
+ e.key !== "" && t.tag(1, p.LengthDelimited).string(e.key), e.url !== "" && t.tag(2, p.LengthDelimited).string(e.url);
3754
+ let r = n.writeUnknownFields;
3755
+ return r !== !1 && (r == !0 ? k.onWrite : r)(this.typeName, e, t), t;
3752
3756
  }
3753
3757
  }
3754
- const ur = new hr(), ze = new st("com.hamropatro.grpc.cms.ImageUploadService", [
3755
- { name: "Upload", options: {}, I: jt, O: ur }
3758
+ const mi = new fi(), nt = new ct("com.hamropatro.grpc.cms.ImageUploadService", [
3759
+ { name: "Upload", options: {}, I: Xt, O: mi }
3756
3760
  ]);
3757
- class dr {
3761
+ class pi {
3758
3762
  constructor(e) {
3759
- C(this, "typeName", ze.typeName);
3760
- C(this, "methods", ze.methods);
3761
- C(this, "options", ze.options);
3763
+ _(this, "typeName", nt.typeName);
3764
+ _(this, "methods", nt.methods);
3765
+ _(this, "options", nt.options);
3762
3766
  this._transport = e;
3763
3767
  }
3764
3768
  /**
3765
3769
  * @generated from protobuf rpc: Upload(com.hamropatro.grpc.cms.ImageUploadRequest) returns (com.hamropatro.grpc.cms.ImageUploadResponse);
3766
3770
  */
3767
3771
  upload(e, t) {
3768
- const n = this.methods[0], i = this._transport.mergeOptions(t);
3769
- return se("unary", this._transport, n, i, e);
3772
+ const n = this.methods[0], r = this._transport.mergeOptions(t);
3773
+ return le("unary", this._transport, n, r, e);
3770
3774
  }
3771
3775
  }
3772
- const fr = {
3776
+ const gi = {
3773
3777
  baseUrl: "https://hamro-cms-backend-grpc.hamrostack.com"
3774
- }, at = new jn({
3775
- baseUrl: fr.baseUrl
3776
- }), Wt = new Gn(at), Me = St.create(), Qe = Mt.create(), lt = new lr(at), Ie = $t.create(), Ve = Pt.create(), $e = Vt.create(), mr = new dr(at);
3777
- jt.create();
3778
- const qt = async () => {
3778
+ }, ut = new Kn({
3779
+ baseUrl: gi.baseUrl
3780
+ }), Ht = new Yn(ut), Ve = Pt.create(), it = jt.create(), dt = new ui(ut), Te = qt.create(), $e = Kt.create(), Pe = Wt.create(), wi = new pi(ut), bi = Xt.create(), yi = async () => {
3779
3781
  try {
3780
- return await mr.upload(qt);
3781
- } catch (r) {
3782
- throw r;
3782
+ return await wi.upload(
3783
+ bi
3784
+ );
3785
+ } catch (i) {
3786
+ throw i;
3783
3787
  }
3784
- }, pr = async (r, e) => {
3788
+ }, Ni = async (i, e) => {
3785
3789
  try {
3786
- const t = gr(r, e), i = (await qt()).response.url;
3787
- return await fetch(i, {
3790
+ const t = ki(i, e), r = (await yi()).response.url;
3791
+ return await fetch(r, {
3788
3792
  method: "PUT",
3789
3793
  headers: {
3790
3794
  "Content-Type": "image/*",
3791
3795
  "x-amz-acl": "public-read"
3792
3796
  },
3793
3797
  body: t
3794
- }), i == null ? void 0 : i.split("?")[0];
3798
+ }), r == null ? void 0 : r.split("?")[0];
3795
3799
  } catch (t) {
3796
3800
  throw t;
3797
3801
  }
3798
- }, gr = (r, e) => {
3802
+ }, ki = (i, e) => {
3799
3803
  const t = e.type.split("/")[0];
3800
3804
  let n = "";
3801
- t === "video" ? n = r == null ? void 0 : r.replace(/^data:video\/\w+;base64,/, "") : t === "image" && (n = r == null ? void 0 : r.replace(/^data:image\/\w+;base64,/, ""));
3802
- const i = atob(n), s = new Uint8Array(i.length);
3803
- for (let o = 0; o < i.length; o++)
3804
- s[o] = i.charCodeAt(o);
3805
+ 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,/, ""));
3806
+ const r = atob(n), s = new Uint8Array(r.length);
3807
+ for (let o = 0; o < r.length; o++)
3808
+ s[o] = r.charCodeAt(o);
3805
3809
  return s;
3806
- }, br = async (r, e = 20, t) => {
3810
+ }, Ei = async (i, e = 20, t) => {
3807
3811
  try {
3808
- return Qe.cursor = r, Qe.limit = e, await Wt.getFolders(
3809
- Qe,
3812
+ return it.cursor = i, it.limit = e, await Ht.getFolders(
3813
+ it,
3810
3814
  t
3811
3815
  );
3812
3816
  } catch (n) {
3813
3817
  throw n;
3814
3818
  }
3815
- }, wr = async (r, e, t, n) => {
3819
+ }, Ii = async (i, e, t, n) => {
3816
3820
  try {
3817
- return Me.name = r, Me.nestedFolderName = e, Me.createdBy = t, await Wt.createFolder(
3818
- Me,
3821
+ return Ve.name = i, Ve.nestedFolderName = e, Ve.createdBy = t, await Ht.createFolder(
3822
+ Ve,
3819
3823
  n
3820
3824
  );
3821
- } catch (i) {
3822
- throw i;
3825
+ } catch (r) {
3826
+ throw r;
3823
3827
  }
3824
- }, yr = async (r, e, t, n, i, s) => {
3828
+ }, Ai = async (i, e, t, n, r, s) => {
3825
3829
  try {
3826
- return Ie.name = r, Ie.nestedFolderName = e, Ie.url = t, Ie.type = n, Ie.folderName = i, await lt.createFile(
3827
- Ie,
3830
+ return Te.name = i, Te.nestedFolderName = e, Te.url = t, Te.type = n, Te.folderName = r, await dt.createFile(
3831
+ Te,
3828
3832
  s
3829
3833
  );
3830
3834
  } catch (o) {
3831
3835
  throw o;
3832
3836
  }
3833
- }, Nr = async (r, e, t, n) => {
3837
+ }, Ti = async (i, e, t, n) => {
3834
3838
  try {
3835
- return Ve.folderName = r, Ve.cursor = e, Ve.limit = t, await lt.getFilesByFolder(
3836
- Ve,
3839
+ return $e.folderName = i, $e.cursor = e, $e.limit = t, await dt.getFilesByFolder(
3840
+ $e,
3837
3841
  n
3838
3842
  );
3839
- } catch (i) {
3840
- throw i;
3843
+ } catch (r) {
3844
+ throw r;
3841
3845
  }
3842
- }, kr = async (r, e, t = 20, n) => {
3846
+ }, Fi = async (i, e, t = 20, n) => {
3843
3847
  try {
3844
- return $e.searchValue = r, $e.cursor = e, $e.limit = t, await lt.search(
3845
- $e,
3848
+ return Pe.searchValue = i, Pe.cursor = e, Pe.limit = t, await dt.search(
3849
+ Pe,
3846
3850
  n
3847
3851
  );
3848
- } catch (i) {
3849
- throw i;
3852
+ } catch (r) {
3853
+ throw r;
3850
3854
  }
3851
3855
  };
3852
- var oe = /* @__PURE__ */ ((r) => (r[r.IMAGE = 0] = "IMAGE", r[r.AUDIO = 1] = "AUDIO", r[r.VIDEO = 2] = "VIDEO", r[r.ALL = 3] = "ALL", r))(oe || {});
3853
- const Le = {
3856
+ var ce = /* @__PURE__ */ ((i) => (i[i.IMAGE = 0] = "IMAGE", i[i.AUDIO = 1] = "AUDIO", i[i.VIDEO = 2] = "VIDEO", i[i.ALL = 3] = "ALL", i))(ce || {});
3857
+ const je = {
3854
3858
  0: "IMAGE",
3855
3859
  1: "AUDIO",
3856
3860
  2: "VIDEO",
3857
3861
  3: "ALL"
3858
3862
  };
3859
- function Er(r) {
3860
- switch (r) {
3863
+ function Li(i) {
3864
+ switch (i) {
3861
3865
  case "image":
3862
- return Le[oe.IMAGE];
3866
+ return je[ce.IMAGE];
3863
3867
  case "video":
3864
- return Le[oe.VIDEO];
3868
+ return je[ce.VIDEO];
3865
3869
  case "audio":
3866
- return Le[oe.AUDIO];
3870
+ return je[ce.AUDIO];
3867
3871
  default:
3868
- return Le[oe.ALL];
3872
+ return je[ce.ALL];
3869
3873
  }
3870
3874
  }
3871
3875
  const G = document.createElementNS(
@@ -3878,15 +3882,15 @@ G.setAttribute("y", "0px");
3878
3882
  G.setAttribute("width", "18");
3879
3883
  G.setAttribute("height", "18");
3880
3884
  G.setAttribute("viewBox", "0 0 50 50");
3881
- const Kt = document.createElementNS("http://www.w3.org/2000/svg", "path");
3882
- Kt.setAttribute(
3885
+ const Gt = document.createElementNS("http://www.w3.org/2000/svg", "path");
3886
+ Gt.setAttribute(
3883
3887
  "d",
3884
3888
  "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"
3885
3889
  );
3886
- G.appendChild(Kt);
3887
- function Ir() {
3888
- const r = document.createElementNS("http://www.w3.org/2000/svg", "svg");
3889
- r.setAttribute("xmlns", "http://www.w3.org/2000/folder"), r.setAttribute("x", "0px"), r.setAttribute("y", "0px"), r.setAttribute("width", "24"), r.setAttribute("height", "24"), r.setAttribute("viewBox", "0 0 48 48");
3890
+ G.appendChild(Gt);
3891
+ function Oi() {
3892
+ const i = document.createElementNS("http://www.w3.org/2000/svg", "svg");
3893
+ i.setAttribute("xmlns", "http://www.w3.org/2000/folder"), i.setAttribute("x", "0px"), i.setAttribute("y", "0px"), i.setAttribute("width", "24"), i.setAttribute("height", "24"), i.setAttribute("viewBox", "0 0 48 48");
3890
3894
  const e = document.createElementNS("http://www.w3.org/2000/svg", "path");
3891
3895
  e.setAttribute("fill", "#FFA000"), e.setAttribute(
3892
3896
  "d",
@@ -3896,28 +3900,28 @@ function Ir() {
3896
3900
  return t.setAttribute("fill", "#FFCA28"), t.setAttribute(
3897
3901
  "d",
3898
3902
  "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"
3899
- ), r.appendChild(e), r.appendChild(t), r;
3903
+ ), i.appendChild(e), i.appendChild(t), i;
3900
3904
  }
3901
- const P = document.createElementNS(
3905
+ const j = document.createElementNS(
3902
3906
  "http://www.w3.org/2000/svg",
3903
3907
  "svg"
3904
3908
  );
3905
- P.setAttribute("xmlns", "http://www.w3.org/2000/svg");
3906
- P.setAttribute("width", "20");
3907
- P.setAttribute("height", "20");
3908
- P.setAttribute("viewBox", "0 0 24 24");
3909
- P.setAttribute("fill", "none");
3910
- P.setAttribute("stroke", "currentColor");
3911
- P.setAttribute("stroke-width", "2");
3912
- P.setAttribute("stroke-linecap", "round");
3913
- P.setAttribute("stroke-linejoin", "round");
3914
- P.classList.add("lucide", "lucide-circle-check-big");
3915
- const Xt = document.createElementNS("http://www.w3.org/2000/svg", "path");
3916
- Xt.setAttribute("d", "M21.801 10A10 10 0 1 1 17 3.335");
3917
- const Ht = document.createElementNS("http://www.w3.org/2000/svg", "path");
3918
- Ht.setAttribute("d", "m9 11 3 3L22 4");
3919
- P.appendChild(Xt);
3920
- P.appendChild(Ht);
3909
+ j.setAttribute("xmlns", "http://www.w3.org/2000/svg");
3910
+ j.setAttribute("width", "20");
3911
+ j.setAttribute("height", "20");
3912
+ j.setAttribute("viewBox", "0 0 24 24");
3913
+ j.setAttribute("fill", "none");
3914
+ j.setAttribute("stroke", "currentColor");
3915
+ j.setAttribute("stroke-width", "2");
3916
+ j.setAttribute("stroke-linecap", "round");
3917
+ j.setAttribute("stroke-linejoin", "round");
3918
+ j.classList.add("lucide", "lucide-circle-check-big");
3919
+ const Jt = document.createElementNS("http://www.w3.org/2000/svg", "path");
3920
+ Jt.setAttribute("d", "M21.801 10A10 10 0 1 1 17 3.335");
3921
+ const Zt = document.createElementNS("http://www.w3.org/2000/svg", "path");
3922
+ Zt.setAttribute("d", "m9 11 3 3L22 4");
3923
+ j.appendChild(Jt);
3924
+ j.appendChild(Zt);
3921
3925
  const V = document.createElementNS(
3922
3926
  "http://www.w3.org/2000/svg",
3923
3927
  "svg"
@@ -3932,76 +3936,113 @@ V.setAttribute("stroke-width", "2");
3932
3936
  V.setAttribute("stroke-linecap", "round");
3933
3937
  V.setAttribute("stroke-linejoin", "round");
3934
3938
  V.classList.add("lucide", "lucide-circle-alert");
3935
- const Xe = document.createElementNS("http://www.w3.org/2000/svg", "circle");
3936
- Xe.setAttribute("cx", "12");
3937
- Xe.setAttribute("cy", "12");
3938
- Xe.setAttribute("r", "10");
3939
- const Ce = document.createElementNS("http://www.w3.org/2000/svg", "line");
3940
- Ce.setAttribute("x1", "12");
3941
- Ce.setAttribute("x2", "12");
3942
- Ce.setAttribute("y1", "8");
3943
- Ce.setAttribute("y2", "12");
3944
- const Ue = document.createElementNS("http://www.w3.org/2000/svg", "line");
3945
- Ue.setAttribute("x1", "12");
3946
- Ue.setAttribute("x2", "12.01");
3947
- Ue.setAttribute("y1", "16");
3948
- Ue.setAttribute("y2", "16");
3949
- V.appendChild(Xe);
3950
- V.appendChild(Ce);
3951
- V.appendChild(Ue);
3952
- function Tr() {
3953
- const r = document.createElementNS(
3939
+ const Je = document.createElementNS("http://www.w3.org/2000/svg", "circle");
3940
+ Je.setAttribute("cx", "12");
3941
+ Je.setAttribute("cy", "12");
3942
+ Je.setAttribute("r", "10");
3943
+ const xe = document.createElementNS("http://www.w3.org/2000/svg", "line");
3944
+ xe.setAttribute("x1", "12");
3945
+ xe.setAttribute("x2", "12");
3946
+ xe.setAttribute("y1", "8");
3947
+ xe.setAttribute("y2", "12");
3948
+ const De = document.createElementNS("http://www.w3.org/2000/svg", "line");
3949
+ De.setAttribute("x1", "12");
3950
+ De.setAttribute("x2", "12.01");
3951
+ De.setAttribute("y1", "16");
3952
+ De.setAttribute("y2", "16");
3953
+ V.appendChild(Je);
3954
+ V.appendChild(xe);
3955
+ V.appendChild(De);
3956
+ function Bi() {
3957
+ const i = document.createElementNS(
3954
3958
  "http://www.w3.org/2000/svg",
3955
3959
  "svg"
3956
3960
  );
3957
- r.setAttribute("xmlns", "http://www.w3.org/2000/svg"), r.setAttribute("height", "24px"), r.setAttribute("width", "24px"), r.setAttribute("viewBox", "0 -960 960 960"), r.setAttribute("fill", "#333");
3961
+ i.setAttribute("xmlns", "http://www.w3.org/2000/svg"), i.setAttribute("height", "24px"), i.setAttribute("width", "24px"), i.setAttribute("viewBox", "0 -960 960 960"), i.setAttribute("fill", "#333");
3958
3962
  const e = document.createElementNS("http://www.w3.org/2000/svg", "path");
3959
3963
  return e.setAttribute(
3960
3964
  "d",
3961
3965
  "M504-480 320-664l56-56 240 240-240 240-56-56 184-184Z"
3962
- ), r.appendChild(e), r;
3966
+ ), i.appendChild(e), i;
3963
3967
  }
3964
- function At() {
3965
- const r = document.createElementNS("http://www.w3.org/2000/svg", "svg");
3966
- r.setAttribute("xmlns", "http://www.w3.org/2000/svg"), r.setAttribute("fill", "none"), r.setAttribute("width", "20"), r.setAttribute("height", "20"), r.setAttribute("viewBox", "0 0 24 24"), r.setAttribute("stroke-width", "1.5"), r.setAttribute("stroke", "currentColor"), r.setAttribute("class", "size-2");
3968
+ function Bt() {
3969
+ const i = document.createElementNS("http://www.w3.org/2000/svg", "svg");
3970
+ 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");
3967
3971
  const e = document.createElementNS("http://www.w3.org/2000/svg", "path");
3968
- return e.setAttribute("stroke-linecap", "round"), e.setAttribute("stroke-linejoin", "round"), e.setAttribute("d", "M12 4.5v15m7.5-7.5h-15"), r.appendChild(e), r;
3972
+ 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;
3969
3973
  }
3970
- function Ar(r) {
3974
+ function Ci(i) {
3971
3975
  const e = {};
3972
- r.forEach((i) => {
3973
- e[i.key] = { ...i, children: {} };
3976
+ i.forEach((r) => {
3977
+ e[r.key] = { ...r, children: {} };
3974
3978
  });
3975
- const t = (i) => (Object.values(e).filter(
3976
- (o) => o.nestedFolderName == i.key
3979
+ const t = (r) => (Object.values(e).filter(
3980
+ (o) => o.nestedFolderName == r.key
3977
3981
  ).forEach((o) => {
3978
- i.children[o.key] = t(o);
3979
- }), i);
3980
- return r.reduce((i, s) => (s.nestedFolderName || i.push(t(e[s.key])), i), []);
3982
+ r.children[o.key] = t(o);
3983
+ }), r);
3984
+ return i.reduce((r, s) => (s.nestedFolderName || r.push(t(e[s.key])), r), []);
3981
3985
  }
3982
- function Fr() {
3983
- const r = document.createElementNS("http://www.w3.org/2000/svg", "svg");
3984
- r.setAttribute("xmlns", "http://www.w3.org/2000/svg"), r.setAttribute("height", "24px"), r.setAttribute("width", "24px"), r.setAttribute("viewBox", "0 0 30 30"), r.setAttribute("fill", "#999");
3986
+ function vi(i, e) {
3987
+ const t = (n) => {
3988
+ if (n.key === e.nestedFolderName)
3989
+ return n.children[e.key] = { ...e, children: {} }, !0;
3990
+ for (const r in n.children) {
3991
+ const s = n.children[r];
3992
+ if (t(s))
3993
+ return !0;
3994
+ }
3995
+ return !1;
3996
+ };
3997
+ for (const n of i)
3998
+ if (t(n))
3999
+ break;
4000
+ return i;
4001
+ }
4002
+ function _i() {
4003
+ const i = document.createElementNS("http://www.w3.org/2000/svg", "svg");
4004
+ 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");
3985
4005
  const e = document.createElementNS("http://www.w3.org/2000/svg", "path");
3986
4006
  return e.setAttribute(
3987
4007
  "d",
3988
4008
  "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"
3989
- ), r.appendChild(e), r;
4009
+ ), i.appendChild(e), i;
3990
4010
  }
3991
- function Lr() {
3992
- const r = "http://www.w3.org/2000/svg", e = document.createElementNS(r, "svg");
3993
- e.setAttribute("xmlns", r), e.setAttribute("height", "20px"), e.setAttribute("viewBox", "0 -960 960 960"), e.setAttribute("width", "20px"), e.setAttribute("fill", "#e8eaed");
3994
- const t = document.createElementNS(r, "path");
4011
+ function xi() {
4012
+ const i = "http://www.w3.org/2000/svg", e = document.createElementNS(i, "svg");
4013
+ e.setAttribute("xmlns", i), e.setAttribute("height", "20px"), e.setAttribute("viewBox", "0 -960 960 960"), e.setAttribute("width", "20px"), e.setAttribute("fill", "#fff");
4014
+ const t = document.createElementNS(i, "path");
3995
4015
  return t.setAttribute(
3996
4016
  "d",
3997
4017
  "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"
3998
4018
  ), e.appendChild(t), e;
3999
4019
  }
4000
- const Or = async (r) => {
4020
+ function Di() {
4021
+ const i = "http://www.w3.org/2000/svg", e = document.createElementNS(i, "svg");
4022
+ 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");
4023
+ const t = document.createElementNS(i, "path");
4024
+ t.setAttribute(
4025
+ "d",
4026
+ "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5"
4027
+ );
4028
+ const n = document.createElementNS(i, "rect");
4029
+ return n.setAttribute("x", "2"), n.setAttribute("y", "6"), n.setAttribute("width", "14"), n.setAttribute("height", "12"), n.setAttribute("rx", "2"), e.appendChild(t), e.appendChild(n), document.body.appendChild(e), e;
4030
+ }
4031
+ function Ri() {
4032
+ const i = "http://www.w3.org/2000/svg", e = document.createElementNS(i, "svg");
4033
+ 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");
4034
+ const t = document.createElementNS(i, "rect");
4035
+ t.setAttribute("width", "18"), t.setAttribute("height", "18"), t.setAttribute("x", "3"), t.setAttribute("y", "3"), t.setAttribute("rx", "2"), t.setAttribute("ry", "2");
4036
+ const n = document.createElementNS(i, "circle");
4037
+ n.setAttribute("cx", "9"), n.setAttribute("cy", "9"), n.setAttribute("r", "2");
4038
+ const r = document.createElementNS(i, "path");
4039
+ 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;
4040
+ }
4041
+ const Ui = async (i) => {
4001
4042
  let e;
4002
4043
  try {
4003
- r && (e = {
4004
- Authorization: "Bearer " + r
4044
+ i && (e = {
4045
+ Authorization: "Bearer " + i
4005
4046
  });
4006
4047
  } catch (n) {
4007
4048
  if (n) throw n;
@@ -4010,221 +4051,288 @@ const Or = async (r) => {
4010
4051
  meta: e
4011
4052
  };
4012
4053
  };
4013
- var ge, be, x, te, L, v, ce, W, we, ye, Ae, he, ue, Be, ne, de, Z, Ne, Y, fe, ke, Ee, _e, De, re;
4014
- class _r {
4054
+ class Si {
4055
+ constructor() {
4056
+ _(this, "main");
4057
+ _(this, "dialogBody");
4058
+ this.main = S("div"), this.dialogBody = S("div"), this.hide();
4059
+ }
4060
+ show(e) {
4061
+ this.main = S("div", "popover", e.mainContainer), this.dialogBody = S("div", "popover-body", this.main), this.main.id = e.divId, this.dialogBody.append(e.content);
4062
+ }
4063
+ hide() {
4064
+ this.main.remove();
4065
+ }
4066
+ }
4067
+ const We = new Si();
4068
+ function Mi() {
4069
+ const i = document.createElementNS("http://www.w3.org/2000/svg", "svg");
4070
+ 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");
4071
+ const e = document.createElementNS("http://www.w3.org/2000/svg", "path");
4072
+ e.setAttribute(
4073
+ "d",
4074
+ "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"
4075
+ );
4076
+ const t = document.createElementNS("http://www.w3.org/2000/svg", "path");
4077
+ return t.setAttribute("d", "m15 5 4 4"), i.appendChild(e), i.appendChild(t), document.body.appendChild(i), i;
4078
+ }
4079
+ function Vi() {
4080
+ const i = document.createElementNS("http://www.w3.org/2000/svg", "svg");
4081
+ 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");
4082
+ const e = document.createElementNS("http://www.w3.org/2000/svg", "path");
4083
+ e.setAttribute("d", "M3 6h18");
4084
+ const t = document.createElementNS("http://www.w3.org/2000/svg", "path");
4085
+ t.setAttribute("d", "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6");
4086
+ const n = document.createElementNS("http://www.w3.org/2000/svg", "path");
4087
+ n.setAttribute("d", "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2");
4088
+ const r = document.createElementNS("http://www.w3.org/2000/svg", "line");
4089
+ r.setAttribute("x1", "10"), r.setAttribute("x2", "10"), r.setAttribute("y1", "11"), r.setAttribute("y2", "17");
4090
+ const s = document.createElementNS("http://www.w3.org/2000/svg", "line");
4091
+ 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;
4092
+ }
4093
+ function $i() {
4094
+ const i = document.createElementNS("http://www.w3.org/2000/svg", "svg");
4095
+ 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");
4096
+ const e = document.createElementNS("http://www.w3.org/2000/svg", "path");
4097
+ e.setAttribute("d", "M9 18V5l12-2v13");
4098
+ const t = document.createElementNS("http://www.w3.org/2000/svg", "path");
4099
+ t.setAttribute("d", "m9 9 12-2");
4100
+ const n = document.createElementNS(
4101
+ "http://www.w3.org/2000/svg",
4102
+ "circle"
4103
+ );
4104
+ n.setAttribute("cx", "6"), n.setAttribute("cy", "18"), n.setAttribute("r", "3");
4105
+ const r = document.createElementNS(
4106
+ "http://www.w3.org/2000/svg",
4107
+ "circle"
4108
+ );
4109
+ 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;
4110
+ }
4111
+ var ye, Ne, B, ne, x, R, de, K, ke, fe, Ee, ie, me, ve, pe, ge, re, Ie, Y, z, we, Ae, se, Le, _e, oe, be;
4112
+ class ji {
4015
4113
  constructor(e) {
4016
- E(this, ge);
4017
- E(this, be);
4018
- E(this, x);
4019
- E(this, te);
4020
- E(this, L, []);
4021
- E(this, v, []);
4022
- E(this, ce);
4023
- E(this, W);
4024
- E(this, we);
4025
4114
  E(this, ye);
4026
- E(this, Ae, []);
4027
- E(this, he);
4028
- E(this, ue);
4029
- E(this, Be);
4115
+ E(this, Ne);
4116
+ E(this, B);
4030
4117
  E(this, ne);
4118
+ E(this, x, []);
4119
+ E(this, R, []);
4031
4120
  E(this, de);
4032
- E(this, Z);
4033
- E(this, Ne);
4034
- E(this, Y);
4035
- E(this, fe);
4121
+ E(this, K);
4036
4122
  E(this, ke);
4037
- E(this, Ee);
4038
- E(this, _e);
4039
- E(this, De);
4123
+ E(this, fe);
4124
+ E(this, Ee, []);
4125
+ E(this, ie);
4126
+ E(this, me);
4127
+ E(this, ve);
4128
+ E(this, pe);
4129
+ E(this, ge);
4040
4130
  E(this, re);
4041
- p(this, ce, !1), p(this, W, !1), p(this, we, !1), p(this, Be, e.handleUpload.bind(this)), p(this, ne, 0), p(this, fe, ""), p(this, ke, !1), p(this, De, e.accessToken), this._removeToastContainer(), this._grpcOptionInitializer();
4131
+ E(this, Ie);
4132
+ E(this, Y);
4133
+ E(this, z);
4134
+ E(this, we);
4135
+ E(this, Ae);
4136
+ E(this, se);
4137
+ E(this, Le);
4138
+ E(this, _e);
4139
+ E(this, oe);
4140
+ E(this, be);
4141
+ m(this, de, !1), m(this, K, !1), m(this, ke, !1), m(this, ve, e.handleUpload.bind(this)), m(this, pe, 0), m(this, z, ""), m(this, we, !1), m(this, se, !1), m(this, _e, e.accessToken), m(this, be, null), this._removeToastContainer(), this._grpcOptionInitializer();
4042
4142
  }
4043
4143
  create(e) {
4044
4144
  const {
4045
4145
  parentContainerId: t,
4046
4146
  buttonText: n,
4047
- buttonClass: i,
4147
+ buttonClass: r,
4048
4148
  buttonStyle: s,
4049
4149
  buttonIcon: o
4050
4150
  } = e;
4051
- p(this, ge, document.getElementById(t));
4151
+ m(this, ye, document.getElementById(t));
4052
4152
  const a = document.createElement("button");
4053
- a.className = i || "browse-image-button";
4153
+ a.className = r || "browse-image-button";
4054
4154
  const l = document.createElement("span");
4055
4155
  l.textContent = n || "Browse Files";
4056
4156
  const c = document.createElement("span");
4057
4157
  return c.innerHTML = o || "", a.type = "button", a.append(l, c), s && Object.assign(a.style, s), a.addEventListener("click", () => {
4058
4158
  this._selectedImageContainer();
4059
- }), u(this, ge) && u(this, ge).appendChild(a), u(this, ge);
4159
+ }), u(this, ye) && u(this, ye).appendChild(a), u(this, ye);
4060
4160
  }
4061
4161
  async _grpcOptionInitializer() {
4062
- p(this, re, await Or(u(this, De)));
4162
+ m(this, oe, await Ui(u(this, _e)));
4063
4163
  }
4064
4164
  _selectedImageContainer() {
4065
4165
  var g;
4066
- p(this, ue, Fe(
4067
- `Upload (${(g = u(this, L)) == null ? void 0 : g.length})`,
4166
+ m(this, me, Be(
4167
+ `Save (${(g = u(this, x)) == null ? void 0 : g.length})`,
4068
4168
  "dialog-btn confirm"
4069
- )), p(this, de, U("folder-container")), p(this, Z, document.createElement("div")), u(this, Z).style.width = "100%", this._fetchAllFolders();
4070
- const e = Fe("Cancel", "dialog-btn cancel");
4071
- Fe(
4169
+ )), m(this, ge, F("folder-container")), m(this, re, F("folder-list-wrapper")), this._fetchAllFolders();
4170
+ const e = Be("Cancel", "dialog-btn cancel");
4171
+ Be(
4072
4172
  "",
4073
4173
  "dialog-modal-close-btn",
4074
4174
  "",
4075
4175
  !1,
4076
4176
  '<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>'
4077
4177
  ).addEventListener("click", () => {
4078
- Re.hide(), p(this, L, []), p(this, v, []);
4079
- }), p(this, be, U("browse-container"));
4080
- const n = U();
4178
+ Re.hide(), m(this, x, []), m(this, R, []);
4179
+ }), m(this, Ne, F("browse-container"));
4180
+ const n = F();
4081
4181
  n.style.display = "flex", n.style.alignItems = "center", n.style.justifyContent = "space-between", n.style.padding = "10px 20px";
4082
- const i = pe("Folders", "folder-title"), s = Fe("", "add-folder-btn");
4083
- s.append(At()), this._createFolderPrompt(s), n.append(i, s), u(this, de).append(n, u(this, Z));
4084
- const o = this._renderSearchField(), a = this._createBrowseMoreContainer(), l = this._createBrowseImageMain(), c = U("footer");
4182
+ const r = Oe("Folders", "folder-title"), s = Be("", "add-folder-btn");
4183
+ s.append(Bt()), this._createFolderPrompt(s), n.append(r, s), u(this, ge).append(n, u(this, re));
4184
+ const o = this._renderSearchField(), a = this._createBrowseMoreContainer(), l = this._createBrowseImageMain(), c = F("footer");
4085
4185
  e.onclick = () => {
4086
- Re.hide(), p(this, v, []), p(this, L, []);
4087
- }, u(this, ue).onclick = () => {
4088
- u(this, Be).call(this), Re.hide(), p(this, L, []), p(this, v, []);
4089
- }, c.append(u(this, ue), e);
4090
- const d = U("container-right-main");
4091
- d.append(o, a, l, c), u(this, be).append(u(this, de), d), Re.show({
4092
- content: u(this, be)
4186
+ Re.hide(), m(this, R, []), m(this, x, []);
4187
+ }, u(this, me).onclick = () => {
4188
+ u(this, ve).call(this), Re.hide(), m(this, x, []), m(this, R, []);
4189
+ }, c.append(u(this, me), e);
4190
+ const d = F("container-right-main");
4191
+ d.append(o, a, l, c), u(this, Ne).append(u(this, ge), d), Re.show({
4192
+ content: u(this, Ne)
4093
4193
  });
4094
4194
  }
4095
4195
  _createAllAndSelectedTab(e) {
4096
- const t = U("select-options"), n = pe("Browse", "select"), i = pe(
4196
+ const t = F("select-options"), n = Oe("Browse", "select"), r = Oe(
4097
4197
  "Selected",
4098
4198
  "select",
4099
4199
  "selected-images-tab"
4100
4200
  );
4101
- n.classList.add("selected"), [n, i].forEach((o, a) => {
4201
+ n.classList.add("selected"), [n, r].forEach((o, a) => {
4102
4202
  o.addEventListener("click", () => {
4103
4203
  var l;
4104
- p(this, ne, a), (l = document.querySelector(".select.selected")) == null || l.classList.remove("selected"), o.classList.add("selected"), this._updateSelectedImageListContainerUI();
4204
+ m(this, pe, a), (l = document.querySelector(".select.selected")) == null || l.classList.remove("selected"), o.classList.add("selected"), this._updateSelectedImageListContainerUI();
4105
4205
  });
4106
- }), t.append(n, i), e.appendChild(t);
4206
+ }), t.append(n, r), e.appendChild(t);
4107
4207
  }
4108
4208
  _renderUploadButton() {
4109
- const e = dt("file");
4110
- e.style.display = "none", e.setAttribute("multiple", "true"), e.setAttribute("accept", "image/*,video/*,audio/*,.gif"), p(this, te, document.createElement("button")), u(this, te).className = "browse-more-btn";
4209
+ const e = gt("file");
4210
+ e.style.display = "none", e.setAttribute("multiple", "true"), e.setAttribute("accept", "image/*,video/*,audio/*,.gif"), m(this, ne, document.createElement("button")), u(this, ne).className = "browse-more-btn";
4111
4211
  const t = document.createElement("span");
4112
- return t.textContent = "Upload", u(this, te).append(Lr(), t), u(this, te).type = "button", u(this, te).addEventListener(
4212
+ return t.textContent = "Upload", u(this, ne).append(xi(), t), u(this, ne).type = "button", u(this, ne).addEventListener(
4113
4213
  "click",
4114
4214
  () => e.click()
4115
4215
  ), e.addEventListener("change", () => {
4116
4216
  const n = e.files;
4117
- Object.values(n).forEach((i) => {
4217
+ Object.values(n).forEach((r) => {
4118
4218
  const s = new FileReader();
4119
- s.readAsDataURL(i), s.onload = async () => {
4219
+ s.readAsDataURL(r), s.onload = async () => {
4120
4220
  await this._uploadAndAddSelectedImageList(
4121
4221
  s.result,
4122
- i
4222
+ r
4123
4223
  );
4124
4224
  };
4125
4225
  }), e.value = "";
4126
- }), u(this, te);
4226
+ }), u(this, ne);
4127
4227
  }
4128
4228
  _renderCreateFolderBtn() {
4129
4229
  const e = document.createElement("button");
4130
4230
  e.className = "create-folder-btn";
4131
4231
  const t = document.createElement("span");
4132
- return t.textContent = "Create", e.append(At(), t), this._createFolderPrompt(e), e;
4232
+ return t.textContent = "Create", e.append(Bt(), t), this._createFolderPrompt(e), e;
4133
4233
  }
4134
4234
  _renderSearchField() {
4135
4235
  let e;
4136
- const t = U("search-browse-container"), n = U(
4236
+ const t = F("search-browse-container"), n = F(
4137
4237
  "search-input-wrapper",
4138
4238
  "search-input-wrapper"
4139
4239
  );
4140
- p(this, Ee, dt("search")), u(this, Ee).addEventListener("input", (s) => {
4141
- p(this, v, []), p(this, L, []);
4240
+ m(this, Ae, gt("search")), u(this, Ae).addEventListener("input", (s) => {
4241
+ m(this, R, []);
4142
4242
  const o = s.target;
4143
4243
  e && clearTimeout(e), e = setTimeout(() => {
4144
4244
  if (!o.value) {
4145
- this._fetchFilesFromFolder(u(this, ye));
4245
+ m(this, z, ""), m(this, we, !1), m(this, se, !1), this._fetchFilesFromFolder(u(this, fe));
4146
4246
  return;
4147
4247
  }
4148
- p(this, _e, o.value), this._search(u(this, _e));
4248
+ m(this, se, !0), m(this, Le, o.value), this._search(u(this, Le));
4149
4249
  }, 750);
4150
- }), u(this, Ee).setAttribute("placeholder", "Search");
4151
- const i = Fr();
4152
- return i.style.position = "absolute", i.style.top = "50%", i.style.left = "5%", i.style.transform = "translate(-5%, -50%)", n.append(i, u(this, Ee)), t.append(n), t;
4250
+ }), u(this, Ae).setAttribute("placeholder", "Search");
4251
+ const r = _i();
4252
+ return r.style.position = "absolute", r.style.top = "50%", r.style.left = "5%", r.style.transform = "translate(-5%, -50%)", n.append(r, u(this, Ae)), t.append(n), t;
4153
4253
  }
4154
4254
  _createBrowseMoreContainer() {
4155
- p(this, Ne, U("browse-more-btn-container")), this._createAllAndSelectedTab(u(this, Ne));
4255
+ m(this, Ie, F("browse-more-btn-container")), this._createAllAndSelectedTab(u(this, Ie));
4156
4256
  const e = this._renderUploadButton(), t = this._renderCreateFolderBtn(), n = document.createElement("div");
4157
- return n.style.display = "flex", n.style.alignItems = "center", n.style.gap = "10px", n.append(e, t), u(this, Ne).appendChild(n), u(this, Ne);
4257
+ return n.style.display = "flex", n.style.alignItems = "center", n.style.gap = "10px", n.append(e, t), u(this, Ie).appendChild(n), u(this, Ie);
4158
4258
  }
4159
4259
  _createBrowseImageMain() {
4160
- const e = U("browse-image-main");
4161
- return p(this, x, U("selected-image-container")), u(this, x).addEventListener("scroll", () => {
4162
- const t = u(this, x).clientHeight, n = u(this, x).scrollTop, i = u(this, x).scrollHeight;
4163
- t + n >= i - 5 && u(this, ke) && this._fetchFilesFromFolder(u(this, ye));
4164
- }), this._updateSelectedImageListContainerUI(), e.appendChild(u(this, x)), e;
4260
+ const e = F("browse-image-main");
4261
+ return m(this, B, F("selected-image-container")), u(this, B).addEventListener("scroll", () => {
4262
+ const t = u(this, B).clientHeight, n = u(this, B).scrollTop, r = u(this, B).scrollHeight;
4263
+ t + n >= r - 5 && u(this, we) && (u(this, se) ? this._search(u(this, Le)) : this._fetchFilesFromFolder(u(this, fe)));
4264
+ }), this._updateSelectedImageListContainerUI(), e.appendChild(u(this, B)), e;
4165
4265
  }
4166
4266
  _renderFetchingSkeletonUI() {
4167
- for (let e = 0; e < 3; e++) {
4168
- const t = U("skeleton");
4169
- t.innerHTML = "", u(this, x).append(t);
4267
+ for (let e = 0; e < 6; e++) {
4268
+ const t = F("skeleton");
4269
+ t.innerHTML = "", u(this, B).append(t);
4170
4270
  }
4171
4271
  }
4172
4272
  _renderEmptyImageContainer() {
4173
- if (u(this, W) || u(this, ce)) return;
4174
- const e = U();
4175
- e.innerHTML = "No media selected", u(this, x).appendChild(e);
4273
+ if (u(this, K) || u(this, de)) return;
4274
+ const e = F(), t = document.createElement("p");
4275
+ u(this, se) && u(this, pe) === 0 ? t.textContent = "No Result Found!" : t.textContent = "Looks Empty!", e.appendChild(t), u(this, B).appendChild(e);
4176
4276
  }
4177
4277
  _renderLoadingUI() {
4178
- const e = U("skeleton");
4179
- e.innerHTML = "", u(this, x).appendChild(e);
4278
+ const e = F("skeleton");
4279
+ e.innerHTML = "", u(this, B).appendChild(e);
4180
4280
  }
4181
4281
  _fileCardBody(e) {
4182
- var y, O, F, q, A;
4183
- const t = U("selected-image-content"), n = Fe("x", "selected-image-btn");
4184
- let i;
4185
- (e == null ? void 0 : e.type) === oe.IMAGE && (i = zt(e == null ? void 0 : e.url, "selected-image")), (e == null ? void 0 : e.type) === oe.VIDEO && (i = Qt(e == null ? void 0 : e.url, "uploaded-video")), (e == null ? void 0 : e.type) === oe.AUDIO && (i = en(e == null ? void 0 : e.url, "uploaded-audio"));
4186
- const s = U(
4282
+ const t = F("selected-image-content"), n = F("selected-image-top-bar"), r = Be(
4283
+ "",
4284
+ "selected-image-btn",
4285
+ "",
4286
+ !1,
4287
+ '<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>'
4288
+ );
4289
+ let s, o;
4290
+ (e == null ? void 0 : e.type) === ce.IMAGE && (s = tn(e == null ? void 0 : e.url, "selected-image"), o = Ri()), (e == null ? void 0 : e.type) === ce.VIDEO && (s = nn(e == null ? void 0 : e.url, "uploaded-video"), o = Di()), (e == null ? void 0 : e.type) === ce.AUDIO && (s = rn(e == null ? void 0 : e.url, "uploaded-audio"), o = $i());
4291
+ const a = F(
4187
4292
  "selected-image-wrapper",
4188
4293
  "selected-image-wrapper"
4189
- ), o = pe(e == null ? void 0 : e.name, "selected-image-name"), a = pe(
4190
- `${Le[e == null ? void 0 : e.type]}`,
4191
- "selected-image-type"
4192
- ), l = U();
4193
- l.style.marginTop = "10px", l.style.display = "flex", l.style.justifyContent = "space-between", l.style.alignItems = "center";
4194
- const c = pe(
4195
- ` ${(y = e == null ? void 0 : e.metadata) == null ? void 0 : y.width} *
4196
- ${(O = e == null ? void 0 : e.metadata) == null ? void 0 : O.height}`,
4197
- "selected-image-size"
4294
+ ), l = Oe(e == null ? void 0 : e.name, "selected-image-name"), c = Ye("", "selected-image-type");
4295
+ c.append(o), n.append(c, r);
4296
+ const d = F();
4297
+ d.style.marginTop = "10px", d.style.display = "flex", d.style.justifyContent = "space-between", d.style.alignItems = "center", d.append(l), t.append(n, s), a.append(t, d);
4298
+ const g = u(this, x).findIndex(
4299
+ (w) => (w == null ? void 0 : w.key) === (e == null ? void 0 : e.key)
4198
4300
  );
4199
- l.append(o, a), t.appendChild(i), s.append(
4200
- t,
4201
- l,
4202
- ((F = e == null ? void 0 : e.metadata) == null ? void 0 : F.width) > 0 && ((q = e == null ? void 0 : e.metadata) == null ? void 0 : q.height) > 0 ? c : "",
4203
- n
4204
- ), (A = u(this, L)) != null && A.includes(e) && t.classList.add("checked"), u(this, x).appendChild(s);
4205
- const d = u(this, L).findIndex(
4206
- (_) => (_ == null ? void 0 : _.key) === (e == null ? void 0 : e.key)
4207
- ), g = u(this, v).findIndex(
4208
- (_) => (_ == null ? void 0 : _.key) === (e == null ? void 0 : e.key)
4301
+ u(this, R).findIndex(
4302
+ (w) => (w == null ? void 0 : w.key) === (e == null ? void 0 : e.key)
4209
4303
  );
4210
- n.addEventListener("click", () => {
4211
- d !== -1 && u(this, L).splice(d, 1), g !== -1 && u(this, v).splice(g, 1), s.remove(), this._updateContent();
4212
- }), i.addEventListener("click", () => {
4213
- t.classList.contains("checked") ? (t.classList.remove("checked"), u(this, ne) === 1 ? d !== -1 && (u(this, L).splice(d, 1), s.remove()) : (d !== -1 || g !== -1) && u(this, L).splice(d, 1)) : (t.classList.add("checked"), u(this, L).push(e)), this._updateSelectedImageListContainerUI();
4214
- });
4304
+ const N = F("image-action-wrapper"), L = F("file-action edit"), O = Ye("Edit", ""), J = Mi();
4305
+ L.append(J, O);
4306
+ const T = F("file-action delete"), $ = Ye("Delete", ""), W = Vi();
4307
+ T.append(W, $), N.append(L, T);
4308
+ const Z = F("");
4309
+ Z.appendChild(N), r.addEventListener("click", (w) => {
4310
+ w.stopPropagation();
4311
+ const b = document.querySelector(`#${e.key}`);
4312
+ u(this, be) === e.key && b !== null ? (We.hide(), m(this, be, null)) : (We.hide(), We.show({
4313
+ content: Z,
4314
+ mainContainer: n,
4315
+ divId: e.key
4316
+ }), m(this, be, e.key));
4317
+ }), document.addEventListener("click", (w) => {
4318
+ const b = document.querySelector(`#${u(this, be)}`);
4319
+ b && (w.composedPath().includes(b) || We.hide());
4320
+ }), s.addEventListener("click", () => {
4321
+ t.classList.contains("checked") ? (t.classList.remove("checked"), g !== -1 && (u(this, x).splice(g, 1), u(this, pe) === 1 && a.remove())) : (t.classList.add("checked"), u(this, x).push(e)), this._updateSelectedImageListContainerUI();
4322
+ }), g !== -1 ? (t.classList.add("checked"), u(this, se) ? u(this, B).prepend(a) : u(this, B).appendChild(a)) : u(this, B).appendChild(a);
4215
4323
  }
4216
4324
  _renderImageCard(e) {
4217
4325
  this._fileCardBody(e);
4218
4326
  }
4219
4327
  _renderImageListContainer() {
4220
4328
  var e, t;
4221
- ((e = u(this, v)) == null ? void 0 : e.length) > 0 && ((t = u(this, v)) == null || t.forEach((n) => {
4329
+ ((e = u(this, R)) == null ? void 0 : e.length) > 0 && ((t = u(this, R)) == null || t.forEach((n) => {
4222
4330
  this._renderImageCard(n);
4223
4331
  }));
4224
4332
  }
4225
4333
  _renderSelectedImageListContainer() {
4226
4334
  var e;
4227
- ((e = u(this, L)) == null ? void 0 : e.length) > 0 && u(this, L).forEach((t) => {
4335
+ ((e = u(this, x)) == null ? void 0 : e.length) > 0 && u(this, x).forEach((t) => {
4228
4336
  this._renderImageCard(t);
4229
4337
  });
4230
4338
  }
@@ -4232,7 +4340,7 @@ class _r {
4232
4340
  const e = document.createElement("div");
4233
4341
  e.style.paddingInline = "20px";
4234
4342
  for (let t = 0; t < 4; t++) {
4235
- const n = U("skeleton");
4343
+ const n = F("skeleton");
4236
4344
  n.className = "skeleton folder", n.innerHTML = "", e.appendChild(n);
4237
4345
  }
4238
4346
  return e;
@@ -4243,10 +4351,10 @@ class _r {
4243
4351
  t.className = "folder";
4244
4352
  const n = document.createElement("div");
4245
4353
  n.style.display = "flex", n.style.alignItems = "center", n.style.gap = "10px";
4246
- const i = document.createElement("span"), s = document.createElement("span");
4247
- if (s.textContent = e == null ? void 0 : e.name, i.appendChild(Ir()), n.append(i, s), t.appendChild(n), e.children && Object.keys(e.children).length > 0) {
4354
+ const r = document.createElement("span"), s = document.createElement("span");
4355
+ if (s.className = "folder-name", s.textContent = e == null ? void 0 : e.name, r.appendChild(Oi()), n.append(r, s), t.appendChild(n), e.children && Object.keys(e.children).length > 0) {
4248
4356
  const a = document.createElement("button");
4249
- a.classList.add("expand-icon"), a.appendChild(Tr()), n.append(a);
4357
+ a.classList.add("expand-icon"), a.appendChild(Bi()), n.append(a);
4250
4358
  const l = document.createElement("ul");
4251
4359
  l.className = "folders nested", t.appendChild(l), a.addEventListener("click", (c) => {
4252
4360
  c.stopPropagation(), t.classList.toggle("active"), l.classList.toggle("visible");
@@ -4257,103 +4365,119 @@ class _r {
4257
4365
  }
4258
4366
  return t.addEventListener("click", (a) => {
4259
4367
  var l;
4260
- a.stopPropagation(), p(this, he, e), p(this, ye, e == null ? void 0 : e.name), p(this, L, []), p(this, v, []), p(this, fe, ""), p(this, ke, !1), (l = document.querySelector(".folder.selected")) == null || l.classList.remove("selected"), t.classList.add("selected"), this._fetchFilesFromFolder(e.name);
4261
- }), ((o = u(this, he)) == null ? void 0 : o.key) === (e == null ? void 0 : e.key) && t.classList.add("selected"), t;
4368
+ a.stopPropagation(), m(this, ie, e), m(this, fe, e == null ? void 0 : e.name), m(this, x, []), m(this, R, []), m(this, z, ""), m(this, we, !1), (l = document.querySelector(".folder.selected")) == null || l.classList.remove("selected"), t.classList.add("selected"), this._fetchFilesFromFolder(e.name);
4369
+ }), ((o = u(this, ie)) == null ? void 0 : o.key) === (e == null ? void 0 : e.key) && t.classList.add("selected"), t;
4262
4370
  }
4263
4371
  _updateFolderListContainer() {
4264
- if (u(this, de))
4265
- if (u(this, Z).innerHTML = "", u(this, we)) {
4372
+ if (u(this, ge))
4373
+ if (u(this, re).innerHTML = "", u(this, ke)) {
4266
4374
  const e = this._renderFolderListLoadingUI();
4267
- u(this, Z).appendChild(e);
4375
+ u(this, re).appendChild(e);
4268
4376
  } else {
4269
4377
  const e = document.createElement("ul");
4270
- e.className = "folders", u(this, Z).appendChild(e), u(this, Ae).forEach((t) => {
4378
+ e.className = "folders", u(this, re).appendChild(e), u(this, Ee).forEach((t) => {
4271
4379
  const n = this._renderFolderListContainer(t);
4272
4380
  e.appendChild(n);
4273
- }), u(this, de).appendChild(u(this, Z));
4381
+ }), u(this, ge).appendChild(u(this, re));
4274
4382
  }
4275
4383
  }
4276
4384
  _renderToastContainer(e, t) {
4277
- this._removeToastContainer(), p(this, Y, document.createElement("div")), u(this, Y).className = `message-container ${t}`;
4278
- const n = pe(e, "message"), i = t === "success" ? P : V;
4279
- G.style.cursor = "pointer", G.setAttribute("fill", t === "error" ? "#ee3f3f" : "#4caf50"), G.onclick = () => this._removeToastContainer(), u(this, Y).append(i, n, G), u(this, be).appendChild(u(this, Y)), setTimeout(() => {
4385
+ this._removeToastContainer(), m(this, Y, document.createElement("div")), u(this, Y).className = `message-container ${t}`;
4386
+ const n = Oe(e, "message"), r = t === "success" ? j : V;
4387
+ G.style.cursor = "pointer", G.setAttribute("fill", t === "error" ? "#ee3f3f" : "#4caf50"), G.onclick = () => this._removeToastContainer(), u(this, Y).append(r, n, G), u(this, Ne).appendChild(u(this, Y)), setTimeout(() => {
4280
4388
  this._removeToastContainer();
4281
4389
  }, 5e3);
4282
4390
  }
4283
4391
  _removeToastContainer() {
4284
- u(this, Y) && (u(this, Y).remove(), p(this, Y, null));
4392
+ u(this, Y) && (u(this, Y).remove(), m(this, Y, null));
4285
4393
  }
4286
4394
  _updateSelectedImageListContainerUI() {
4287
- var t, n, i;
4288
- if (!u(this, x)) return;
4289
- u(this, x).innerHTML = "", u(this, W) && this._renderFetchingSkeletonUI(), u(this, ce) && this._renderLoadingUI(), u(this, ne) === 0 && ((t = u(this, L)) == null ? void 0 : t.length) === 0 && ((n = u(this, v)) == null ? void 0 : n.length) === 0 || u(this, ne) === 1 && ((i = u(this, L)) == null ? void 0 : i.length) === 0 ? (u(this, x).classList.add("no-selected-image-container"), this._renderEmptyImageContainer()) : (u(this, x).classList.remove(
4395
+ var t, n;
4396
+ if (!u(this, B)) return;
4397
+ u(this, B).innerHTML = "", u(this, K) && this._renderFetchingSkeletonUI(), u(this, de) && this._renderLoadingUI();
4398
+ const e = document.getElementById(
4399
+ "search-input-wrapper"
4400
+ );
4401
+ u(this, pe) === 0 ? (e && (e.style.visibility = "visible"), ((t = u(this, R)) == null ? void 0 : t.length) === 0 ? (u(this, B).classList.add(
4402
+ "no-selected-image-container"
4403
+ ), this._renderEmptyImageContainer()) : (u(this, B).classList.remove(
4404
+ "no-selected-image-container"
4405
+ ), this._renderImageListContainer())) : (e && (e.style.visibility = "hidden"), ((n = u(this, x)) == null ? void 0 : n.length) === 0 ? (u(this, B).classList.add(
4406
+ "no-selected-image-container"
4407
+ ), this._renderEmptyImageContainer()) : (u(this, B).classList.remove(
4290
4408
  "no-selected-image-container"
4291
- ), u(this, ne) === 1 ? this._renderSelectedImageListContainer() : this._renderImageListContainer()), this._updateContent();
4409
+ ), this._renderSelectedImageListContainer())), this._updateContent();
4292
4410
  }
4293
4411
  _updateContent() {
4294
- var t, n, i;
4412
+ var t, n, r;
4295
4413
  const e = document.getElementById("selected-images-tab");
4296
- e && (e.textContent = `Selected (${(t = u(this, L)) == null ? void 0 : t.length})`), u(this, ue).textContent = `Upload (${(n = u(this, L)) == null ? void 0 : n.length})`, u(this, ue).disabled = ((i = u(this, L)) == null ? void 0 : i.length) <= 0;
4414
+ e && (e.textContent = `Selected (${(t = u(this, x)) == null ? void 0 : t.length})`), u(this, me).textContent = `Save (${(n = u(this, x)) == null ? void 0 : n.length})`, u(this, me).disabled = ((r = u(this, x)) == null ? void 0 : r.length) <= 0;
4297
4415
  }
4298
4416
  async _uploadAndAddSelectedImageList(e, t) {
4299
- var n, i;
4300
- p(this, ce, !0), this._updateSelectedImageListContainerUI();
4417
+ var n, r;
4418
+ m(this, de, !0), this._updateSelectedImageListContainerUI();
4301
4419
  try {
4302
- const s = await pr(e, t), o = await yr(
4420
+ const s = await Ni(e, t), o = await Ai(
4303
4421
  t == null ? void 0 : t.name,
4304
4422
  "",
4305
4423
  s,
4306
- oe[Er((n = t.type) == null ? void 0 : n.split("/")[0])],
4307
- (i = u(this, he)) == null ? void 0 : i.name,
4308
- u(this, re)
4424
+ ce[Li((n = t.type) == null ? void 0 : n.split("/")[0])],
4425
+ (r = u(this, ie)) == null ? void 0 : r.name,
4426
+ u(this, oe)
4309
4427
  );
4310
- u(this, v).unshift(o == null ? void 0 : o.response), this._renderToastContainer("File Uploaded Successfully", "success");
4428
+ u(this, R).unshift(o == null ? void 0 : o.response), this._renderToastContainer("File Uploaded Successfully", "success");
4311
4429
  } catch {
4312
4430
  this._renderToastContainer(
4313
4431
  "Something went wrong while uploading file. Please try again later.",
4314
4432
  "error"
4315
4433
  );
4316
4434
  } finally {
4317
- p(this, ce, !1), this._updateSelectedImageListContainerUI();
4435
+ m(this, de, !1), this._updateSelectedImageListContainerUI();
4318
4436
  }
4319
4437
  }
4320
4438
  async _createFolder(e, t = 2) {
4321
- var n, i, s;
4439
+ var n;
4322
4440
  try {
4323
- const o = await wr(
4441
+ const r = await Ii(
4324
4442
  e,
4325
- (n = u(this, he)) == null ? void 0 : n.name,
4443
+ (n = u(this, ie)) == null ? void 0 : n.name,
4326
4444
  "",
4327
- u(this, re)
4445
+ u(this, oe)
4328
4446
  );
4329
- (i = u(this, Ae)) == null || i.unshift(o == null ? void 0 : o.response), p(this, L, []), p(this, v, []), this._fetchFilesFromFolder((s = o == null ? void 0 : o.response) == null ? void 0 : s.name), this._renderToastContainer(
4447
+ m(this, x, []), m(this, R, []);
4448
+ const s = vi(u(this, Ee), r == null ? void 0 : r.response);
4449
+ m(this, Ee, s), m(this, fe, e), m(this, ie, { ...r == null ? void 0 : r.response, children: {} }), this._fetchFilesFromFolder(e), this._renderToastContainer(
4330
4450
  `Folder ${e} created successfully`,
4331
4451
  "success"
4332
4452
  );
4333
- } catch {
4334
- if (t > 1)
4453
+ } catch (r) {
4454
+ if (console.log("ERROR", r), t > 1)
4335
4455
  this._createFolder(e, --t);
4336
4456
  else
4337
4457
  throw this._renderToastContainer(
4338
- "Error creating folder: " + e,
4458
+ `Error creating folder "${e}". Either folder already exist or failed to create folder`,
4339
4459
  "error"
4340
- ), new Error("Error creating folder: " + e);
4460
+ ), new Error(
4461
+ `Error creating folder "${e}". Either folder already exist or failed to create folder`
4462
+ );
4463
+ } finally {
4464
+ this._updateFolderListContainer();
4341
4465
  }
4342
4466
  }
4343
4467
  async _upload() {
4344
- return u(this, L);
4468
+ return u(this, x);
4345
4469
  }
4346
4470
  async _fetchFilesFromFolder(e) {
4347
- var t, n, i;
4348
- p(this, W, !0), this._updateSelectedImageListContainerUI();
4471
+ var t, n, r;
4472
+ m(this, K, !0), this._updateSelectedImageListContainerUI();
4349
4473
  try {
4350
- const s = await Nr(
4474
+ const s = await Ti(
4351
4475
  e,
4352
- u(this, fe),
4353
- 10,
4354
- u(this, re)
4476
+ u(this, z),
4477
+ 20,
4478
+ u(this, oe)
4355
4479
  ), o = (t = s.response) == null ? void 0 : t.files;
4356
- u(this, v).push(...o), p(this, fe, (n = s.response) == null ? void 0 : n.nextCursor), p(this, ke, (i = s.response) == null ? void 0 : i.hasMore);
4480
+ u(this, R).push(...o), m(this, z, (n = s.response) == null ? void 0 : n.nextCursor), m(this, we, (r = s.response) == null ? void 0 : r.hasMore);
4357
4481
  } catch {
4358
4482
  throw this._renderToastContainer(
4359
4483
  "Error while fetching files from folder" + e,
@@ -4362,44 +4486,49 @@ class _r {
4362
4486
  "Something went wrong. Error while fetching files from folder" + e
4363
4487
  );
4364
4488
  } finally {
4365
- p(this, W, !1), this._updateSelectedImageListContainerUI();
4489
+ m(this, K, !1), this._updateSelectedImageListContainerUI();
4366
4490
  }
4367
4491
  }
4368
4492
  async _fetchAllFolders() {
4369
4493
  var e, t;
4370
- p(this, W, !0), p(this, we, !0), this._updateSelectedImageListContainerUI(), this._updateFolderListContainer(), this._removeToastContainer();
4494
+ m(this, K, !0), m(this, ke, !0), this._updateSelectedImageListContainerUI(), this._updateFolderListContainer(), this._removeToastContainer();
4371
4495
  try {
4372
- const i = (await br("", 50, u(this, re))).response.folder, s = Ar(i);
4373
- p(this, ye, (e = s[0]) == null ? void 0 : e.name), this._fetchFilesFromFolder((t = s[0]) == null ? void 0 : t.name), p(this, he, s[0]), p(this, Ae, s);
4496
+ const r = (await Ei("", 100, u(this, oe))).response.folder, s = Ci(r);
4497
+ m(this, fe, (e = s[0]) == null ? void 0 : e.name), this._fetchFilesFromFolder((t = s[0]) == null ? void 0 : t.name), m(this, ie, s[0]), m(this, Ee, s);
4374
4498
  } catch {
4375
- p(this, W, !1), this._renderToastContainer(
4499
+ m(this, K, !1), this._renderToastContainer(
4376
4500
  "Folder not found. Please create a folder or try again later",
4377
4501
  "error"
4378
4502
  );
4379
4503
  } finally {
4380
- p(this, we, !1), this._updateFolderListContainer();
4504
+ m(this, ke, !1), this._updateFolderListContainer();
4381
4505
  }
4382
4506
  }
4383
4507
  async _search(e) {
4384
4508
  var t, n;
4385
- p(this, W, !0), this._updateSelectedImageListContainerUI(), this._removeToastContainer();
4509
+ m(this, K, !0), this._updateSelectedImageListContainerUI(), this._removeToastContainer();
4386
4510
  try {
4387
- const i = await kr(e, "", 10, u(this, re)), s = (t = i.response) == null ? void 0 : t.items;
4388
- u(this, v).push(...s), p(this, fe, (n = i.response) == null ? void 0 : n.nextPageCursor);
4511
+ const r = await Fi(
4512
+ e,
4513
+ u(this, z),
4514
+ 10,
4515
+ u(this, oe)
4516
+ ), s = (t = r.response) == null ? void 0 : t.items;
4517
+ u(this, R).push(...s), m(this, z, (n = r.response) == null ? void 0 : n.nextPageCursor);
4389
4518
  } catch {
4390
4519
  this._renderToastContainer("Error while searching files", "error");
4391
4520
  } finally {
4392
- p(this, W, !1), this._updateSelectedImageListContainerUI();
4521
+ m(this, K, !1), this._updateSelectedImageListContainerUI();
4393
4522
  }
4394
4523
  }
4395
4524
  _createFolderPrompt(e) {
4396
4525
  e.addEventListener("click", () => {
4397
4526
  const t = window.prompt("Please enter the folder name.");
4398
- t && (this._createFolder(t), this._fetchAllFolders());
4527
+ t && this._createFolder(t);
4399
4528
  });
4400
4529
  }
4401
4530
  }
4402
- ge = new WeakMap(), be = new WeakMap(), x = new WeakMap(), te = new WeakMap(), L = new WeakMap(), v = new WeakMap(), ce = new WeakMap(), W = new WeakMap(), we = new WeakMap(), ye = new WeakMap(), Ae = new WeakMap(), he = new WeakMap(), ue = new WeakMap(), Be = new WeakMap(), ne = new WeakMap(), de = new WeakMap(), Z = new WeakMap(), Ne = new WeakMap(), Y = new WeakMap(), fe = new WeakMap(), ke = new WeakMap(), Ee = new WeakMap(), _e = new WeakMap(), De = new WeakMap(), re = new WeakMap();
4531
+ ye = new WeakMap(), Ne = new WeakMap(), B = new WeakMap(), ne = new WeakMap(), x = new WeakMap(), R = new WeakMap(), de = new WeakMap(), K = new WeakMap(), ke = new WeakMap(), fe = new WeakMap(), Ee = new WeakMap(), ie = new WeakMap(), me = new WeakMap(), ve = new WeakMap(), pe = new WeakMap(), ge = new WeakMap(), re = new WeakMap(), Ie = new WeakMap(), Y = new WeakMap(), z = new WeakMap(), we = new WeakMap(), Ae = new WeakMap(), se = new WeakMap(), Le = new WeakMap(), _e = new WeakMap(), oe = new WeakMap(), be = new WeakMap();
4403
4532
  export {
4404
- _r as default
4533
+ ji as default
4405
4534
  };