@wral/profile-image-editor 0.0.3 → 0.0.5

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,6 +1,6 @@
1
1
  function nr(d, a) {
2
- for (var f = 0; f < a.length; f++) {
3
- const c = a[f];
2
+ for (var u = 0; u < a.length; u++) {
3
+ const c = a[u];
4
4
  if (typeof c != "string" && !Array.isArray(c)) {
5
5
  for (const p in c)
6
6
  if (p !== "default" && !(p in d)) {
@@ -16,16 +16,16 @@ function nr(d, a) {
16
16
  }
17
17
  const rn = globalThis, On = rn.ShadowRoot && (rn.ShadyCSS === void 0 || rn.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Un = /* @__PURE__ */ Symbol(), qn = /* @__PURE__ */ new WeakMap();
18
18
  let Mi = class {
19
- constructor(a, f, c) {
19
+ constructor(a, u, c) {
20
20
  if (this._$cssResult$ = !0, c !== Un) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
21
- this.cssText = a, this.t = f;
21
+ this.cssText = a, this.t = u;
22
22
  }
23
23
  get styleSheet() {
24
24
  let a = this.o;
25
- const f = this.t;
25
+ const u = this.t;
26
26
  if (On && a === void 0) {
27
- const c = f !== void 0 && f.length === 1;
28
- c && (a = qn.get(f)), a === void 0 && ((this.o = a = new CSSStyleSheet()).replaceSync(this.cssText), c && qn.set(f, a));
27
+ const c = u !== void 0 && u.length === 1;
28
+ c && (a = qn.get(u)), a === void 0 && ((this.o = a = new CSSStyleSheet()).replaceSync(this.cssText), c && qn.set(u, a));
29
29
  }
30
30
  return a;
31
31
  }
@@ -34,22 +34,22 @@ let Mi = class {
34
34
  }
35
35
  };
36
36
  const ir = (d) => new Mi(typeof d == "string" ? d : d + "", void 0, Un), rr = (d, ...a) => {
37
- const f = d.length === 1 ? d[0] : a.reduce((c, p, g) => c + ((N) => {
37
+ const u = d.length === 1 ? d[0] : a.reduce((c, p, g) => c + ((N) => {
38
38
  if (N._$cssResult$ === !0) return N.cssText;
39
39
  if (typeof N == "number") return N;
40
40
  throw Error("Value passed to 'css' function must be a 'css' function result: " + N + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
41
41
  })(p) + d[g + 1], d[0]);
42
- return new Mi(f, d, Un);
42
+ return new Mi(u, d, Un);
43
43
  }, sr = (d, a) => {
44
- if (On) d.adoptedStyleSheets = a.map((f) => f instanceof CSSStyleSheet ? f : f.styleSheet);
45
- else for (const f of a) {
44
+ if (On) d.adoptedStyleSheets = a.map((u) => u instanceof CSSStyleSheet ? u : u.styleSheet);
45
+ else for (const u of a) {
46
46
  const c = document.createElement("style"), p = rn.litNonce;
47
- p !== void 0 && c.setAttribute("nonce", p), c.textContent = f.cssText, d.appendChild(c);
47
+ p !== void 0 && c.setAttribute("nonce", p), c.textContent = u.cssText, d.appendChild(c);
48
48
  }
49
49
  }, Kn = On ? (d) => d : (d) => d instanceof CSSStyleSheet ? ((a) => {
50
- let f = "";
51
- for (const c of a.cssRules) f += c.cssText;
52
- return ir(f);
50
+ let u = "";
51
+ for (const c of a.cssRules) u += c.cssText;
52
+ return ir(u);
53
53
  })(d) : d;
54
54
  const { is: or, defineProperty: ar, getOwnPropertyDescriptor: lr, getOwnPropertyNames: cr, getOwnPropertySymbols: ur, getPrototypeOf: fr } = Object, cn = globalThis, Xn = cn.trustedTypes, dr = Xn ? Xn.emptyScript : "", hr = cn.reactiveElementPolyfillSupport, zt = (d, a) => d, xn = { toAttribute(d, a) {
55
55
  switch (a) {
@@ -62,23 +62,23 @@ const { is: or, defineProperty: ar, getOwnPropertyDescriptor: lr, getOwnProperty
62
62
  }
63
63
  return d;
64
64
  }, fromAttribute(d, a) {
65
- let f = d;
65
+ let u = d;
66
66
  switch (a) {
67
67
  case Boolean:
68
- f = d !== null;
68
+ u = d !== null;
69
69
  break;
70
70
  case Number:
71
- f = d === null ? null : Number(d);
71
+ u = d === null ? null : Number(d);
72
72
  break;
73
73
  case Object:
74
74
  case Array:
75
75
  try {
76
- f = JSON.parse(d);
76
+ u = JSON.parse(d);
77
77
  } catch {
78
- f = null;
78
+ u = null;
79
79
  }
80
80
  }
81
- return f;
81
+ return u;
82
82
  } }, Ni = (d, a) => !or(d, a), Gn = { attribute: !0, type: String, converter: xn, reflect: !1, useDefault: !1, hasChanged: Ni };
83
83
  Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), cn.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
84
84
  let jt = class extends HTMLElement {
@@ -88,17 +88,17 @@ let jt = class extends HTMLElement {
88
88
  static get observedAttributes() {
89
89
  return this.finalize(), this._$Eh && [...this._$Eh.keys()];
90
90
  }
91
- static createProperty(a, f = Gn) {
92
- if (f.state && (f.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(a) && ((f = Object.create(f)).wrapped = !0), this.elementProperties.set(a, f), !f.noAccessor) {
93
- const c = /* @__PURE__ */ Symbol(), p = this.getPropertyDescriptor(a, c, f);
91
+ static createProperty(a, u = Gn) {
92
+ if (u.state && (u.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(a) && ((u = Object.create(u)).wrapped = !0), this.elementProperties.set(a, u), !u.noAccessor) {
93
+ const c = /* @__PURE__ */ Symbol(), p = this.getPropertyDescriptor(a, c, u);
94
94
  p !== void 0 && ar(this.prototype, a, p);
95
95
  }
96
96
  }
97
- static getPropertyDescriptor(a, f, c) {
97
+ static getPropertyDescriptor(a, u, c) {
98
98
  const { get: p, set: g } = lr(this.prototype, a) ?? { get() {
99
- return this[f];
99
+ return this[u];
100
100
  }, set(N) {
101
- this[f] = N;
101
+ this[u] = N;
102
102
  } };
103
103
  return { get: p, set(N) {
104
104
  const j = p?.call(this);
@@ -116,31 +116,31 @@ let jt = class extends HTMLElement {
116
116
  static finalize() {
117
117
  if (this.hasOwnProperty(zt("finalized"))) return;
118
118
  if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(zt("properties"))) {
119
- const f = this.properties, c = [...cr(f), ...ur(f)];
120
- for (const p of c) this.createProperty(p, f[p]);
119
+ const u = this.properties, c = [...cr(u), ...ur(u)];
120
+ for (const p of c) this.createProperty(p, u[p]);
121
121
  }
122
122
  const a = this[Symbol.metadata];
123
123
  if (a !== null) {
124
- const f = litPropertyMetadata.get(a);
125
- if (f !== void 0) for (const [c, p] of f) this.elementProperties.set(c, p);
124
+ const u = litPropertyMetadata.get(a);
125
+ if (u !== void 0) for (const [c, p] of u) this.elementProperties.set(c, p);
126
126
  }
127
127
  this._$Eh = /* @__PURE__ */ new Map();
128
- for (const [f, c] of this.elementProperties) {
129
- const p = this._$Eu(f, c);
130
- p !== void 0 && this._$Eh.set(p, f);
128
+ for (const [u, c] of this.elementProperties) {
129
+ const p = this._$Eu(u, c);
130
+ p !== void 0 && this._$Eh.set(p, u);
131
131
  }
132
132
  this.elementStyles = this.finalizeStyles(this.styles);
133
133
  }
134
134
  static finalizeStyles(a) {
135
- const f = [];
135
+ const u = [];
136
136
  if (Array.isArray(a)) {
137
137
  const c = new Set(a.flat(1 / 0).reverse());
138
- for (const p of c) f.unshift(Kn(p));
139
- } else a !== void 0 && f.push(Kn(a));
140
- return f;
138
+ for (const p of c) u.unshift(Kn(p));
139
+ } else a !== void 0 && u.push(Kn(a));
140
+ return u;
141
141
  }
142
- static _$Eu(a, f) {
143
- const c = f.attribute;
142
+ static _$Eu(a, u) {
143
+ const c = u.attribute;
144
144
  return c === !1 ? void 0 : typeof c == "string" ? c : typeof a == "string" ? a.toLowerCase() : void 0;
145
145
  }
146
146
  constructor() {
@@ -156,8 +156,8 @@ let jt = class extends HTMLElement {
156
156
  this._$EO?.delete(a);
157
157
  }
158
158
  _$E_() {
159
- const a = /* @__PURE__ */ new Map(), f = this.constructor.elementProperties;
160
- for (const c of f.keys()) this.hasOwnProperty(c) && (a.set(c, this[c]), delete this[c]);
159
+ const a = /* @__PURE__ */ new Map(), u = this.constructor.elementProperties;
160
+ for (const c of u.keys()) this.hasOwnProperty(c) && (a.set(c, this[c]), delete this[c]);
161
161
  a.size > 0 && (this._$Ep = a);
162
162
  }
163
163
  createRenderRoot() {
@@ -172,42 +172,42 @@ let jt = class extends HTMLElement {
172
172
  disconnectedCallback() {
173
173
  this._$EO?.forEach((a) => a.hostDisconnected?.());
174
174
  }
175
- attributeChangedCallback(a, f, c) {
175
+ attributeChangedCallback(a, u, c) {
176
176
  this._$AK(a, c);
177
177
  }
178
- _$ET(a, f) {
178
+ _$ET(a, u) {
179
179
  const c = this.constructor.elementProperties.get(a), p = this.constructor._$Eu(a, c);
180
180
  if (p !== void 0 && c.reflect === !0) {
181
- const g = (c.converter?.toAttribute !== void 0 ? c.converter : xn).toAttribute(f, c.type);
181
+ const g = (c.converter?.toAttribute !== void 0 ? c.converter : xn).toAttribute(u, c.type);
182
182
  this._$Em = a, g == null ? this.removeAttribute(p) : this.setAttribute(p, g), this._$Em = null;
183
183
  }
184
184
  }
185
- _$AK(a, f) {
185
+ _$AK(a, u) {
186
186
  const c = this.constructor, p = c._$Eh.get(a);
187
187
  if (p !== void 0 && this._$Em !== p) {
188
188
  const g = c.getPropertyOptions(p), N = typeof g.converter == "function" ? { fromAttribute: g.converter } : g.converter?.fromAttribute !== void 0 ? g.converter : xn;
189
189
  this._$Em = p;
190
- const j = N.fromAttribute(f, g.type);
190
+ const j = N.fromAttribute(u, g.type);
191
191
  this[p] = j ?? this._$Ej?.get(p) ?? j, this._$Em = null;
192
192
  }
193
193
  }
194
- requestUpdate(a, f, c, p = !1, g) {
194
+ requestUpdate(a, u, c, p = !1, g) {
195
195
  if (a !== void 0) {
196
196
  const N = this.constructor;
197
- if (p === !1 && (g = this[a]), c ??= N.getPropertyOptions(a), !((c.hasChanged ?? Ni)(g, f) || c.useDefault && c.reflect && g === this._$Ej?.get(a) && !this.hasAttribute(N._$Eu(a, c)))) return;
198
- this.C(a, f, c);
197
+ if (p === !1 && (g = this[a]), c ??= N.getPropertyOptions(a), !((c.hasChanged ?? Ni)(g, u) || c.useDefault && c.reflect && g === this._$Ej?.get(a) && !this.hasAttribute(N._$Eu(a, c)))) return;
198
+ this.C(a, u, c);
199
199
  }
200
200
  this.isUpdatePending === !1 && (this._$ES = this._$EP());
201
201
  }
202
- C(a, f, { useDefault: c, reflect: p, wrapped: g }, N) {
203
- c && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(a) && (this._$Ej.set(a, N ?? f ?? this[a]), g !== !0 || N !== void 0) || (this._$AL.has(a) || (this.hasUpdated || c || (f = void 0), this._$AL.set(a, f)), p === !0 && this._$Em !== a && (this._$Eq ??= /* @__PURE__ */ new Set()).add(a));
202
+ C(a, u, { useDefault: c, reflect: p, wrapped: g }, N) {
203
+ c && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(a) && (this._$Ej.set(a, N ?? u ?? this[a]), g !== !0 || N !== void 0) || (this._$AL.has(a) || (this.hasUpdated || c || (u = void 0), this._$AL.set(a, u)), p === !0 && this._$Em !== a && (this._$Eq ??= /* @__PURE__ */ new Set()).add(a));
204
204
  }
205
205
  async _$EP() {
206
206
  this.isUpdatePending = !0;
207
207
  try {
208
208
  await this._$ES;
209
- } catch (f) {
210
- Promise.reject(f);
209
+ } catch (u) {
210
+ Promise.reject(u);
211
211
  }
212
212
  const a = this.scheduleUpdate();
213
213
  return a != null && await a, !this.isUpdatePending;
@@ -229,18 +229,18 @@ let jt = class extends HTMLElement {
229
229
  }
230
230
  }
231
231
  let a = !1;
232
- const f = this._$AL;
232
+ const u = this._$AL;
233
233
  try {
234
- a = this.shouldUpdate(f), a ? (this.willUpdate(f), this._$EO?.forEach((c) => c.hostUpdate?.()), this.update(f)) : this._$EM();
234
+ a = this.shouldUpdate(u), a ? (this.willUpdate(u), this._$EO?.forEach((c) => c.hostUpdate?.()), this.update(u)) : this._$EM();
235
235
  } catch (c) {
236
236
  throw a = !1, this._$EM(), c;
237
237
  }
238
- a && this._$AE(f);
238
+ a && this._$AE(u);
239
239
  }
240
240
  willUpdate(a) {
241
241
  }
242
242
  _$AE(a) {
243
- this._$EO?.forEach((f) => f.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(a)), this.updated(a);
243
+ this._$EO?.forEach((u) => u.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(a)), this.updated(a);
244
244
  }
245
245
  _$EM() {
246
246
  this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
@@ -255,7 +255,7 @@ let jt = class extends HTMLElement {
255
255
  return !0;
256
256
  }
257
257
  update(a) {
258
- this._$Eq &&= this._$Eq.forEach((f) => this._$ET(f, this[f])), this._$EM();
258
+ this._$Eq &&= this._$Eq.forEach((u) => this._$ET(u, this[u])), this._$EM();
259
259
  }
260
260
  updated(a) {
261
261
  }
@@ -265,30 +265,30 @@ let jt = class extends HTMLElement {
265
265
  jt.elementStyles = [], jt.shadowRootOptions = { mode: "open" }, jt[zt("elementProperties")] = /* @__PURE__ */ new Map(), jt[zt("finalized")] = /* @__PURE__ */ new Map(), hr?.({ ReactiveElement: jt }), (cn.reactiveElementVersions ??= []).push("2.1.2");
266
266
  const Rn = globalThis, Jn = (d) => d, ln = Rn.trustedTypes, Zn = ln ? ln.createPolicy("lit-html", { createHTML: (d) => d }) : void 0, Fi = "$lit$", xt = `lit$${Math.random().toFixed(9).slice(2)}$`, _i = "?" + xt, pr = `<${_i}>`, Dt = document, Kt = () => Dt.createComment(""), Xt = (d) => d === null || typeof d != "object" && typeof d != "function", Pn = Array.isArray, gr = (d) => Pn(d) || typeof d?.[Symbol.iterator] == "function", dn = `[
267
267
  \f\r]`, Ft = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Qn = /-->/g, ei = />/g, Et = RegExp(`>|${dn}(?:([^\\s"'>=/]+)(${dn}*=${dn}*(?:[^
268
- \f\r"'\`<>=]|("|')|))|$)`, "g"), ti = /'/g, ni = /"/g, Oi = /^(?:script|style|textarea|title)$/i, mr = (d) => (a, ...f) => ({ _$litType$: d, strings: a, values: f }), wt = mr(1), It = /* @__PURE__ */ Symbol.for("lit-noChange"), dt = /* @__PURE__ */ Symbol.for("lit-nothing"), ii = /* @__PURE__ */ new WeakMap(), St = Dt.createTreeWalker(Dt, 129);
268
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), ti = /'/g, ni = /"/g, Oi = /^(?:script|style|textarea|title)$/i, mr = (d) => (a, ...u) => ({ _$litType$: d, strings: a, values: u }), wt = mr(1), It = /* @__PURE__ */ Symbol.for("lit-noChange"), dt = /* @__PURE__ */ Symbol.for("lit-nothing"), ii = /* @__PURE__ */ new WeakMap(), St = Dt.createTreeWalker(Dt, 129);
269
269
  function Ui(d, a) {
270
270
  if (!Pn(d) || !d.hasOwnProperty("raw")) throw Error("invalid template strings array");
271
271
  return Zn !== void 0 ? Zn.createHTML(a) : a;
272
272
  }
273
273
  const vr = (d, a) => {
274
- const f = d.length - 1, c = [];
274
+ const u = d.length - 1, c = [];
275
275
  let p, g = a === 2 ? "<svg>" : a === 3 ? "<math>" : "", N = Ft;
276
- for (let j = 0; j < f; j++) {
276
+ for (let j = 0; j < u; j++) {
277
277
  const V = d[j];
278
278
  let b, X, W = -1, pe = 0;
279
279
  for (; pe < V.length && (N.lastIndex = pe, X = N.exec(V), X !== null); ) pe = N.lastIndex, N === Ft ? X[1] === "!--" ? N = Qn : X[1] !== void 0 ? N = ei : X[2] !== void 0 ? (Oi.test(X[2]) && (p = RegExp("</" + X[2], "g")), N = Et) : X[3] !== void 0 && (N = Et) : N === Et ? X[0] === ">" ? (N = p ?? Ft, W = -1) : X[1] === void 0 ? W = -2 : (W = N.lastIndex - X[2].length, b = X[1], N = X[3] === void 0 ? Et : X[3] === '"' ? ni : ti) : N === ni || N === ti ? N = Et : N === Qn || N === ei ? N = Ft : (N = Et, p = void 0);
280
280
  const $ = N === Et && d[j + 1].startsWith("/>") ? " " : "";
281
281
  g += N === Ft ? V + pr : W >= 0 ? (c.push(b), V.slice(0, W) + Fi + V.slice(W) + xt + $) : V + xt + (W === -2 ? j : $);
282
282
  }
283
- return [Ui(d, g + (d[f] || "<?>") + (a === 2 ? "</svg>" : a === 3 ? "</math>" : "")), c];
283
+ return [Ui(d, g + (d[u] || "<?>") + (a === 2 ? "</svg>" : a === 3 ? "</math>" : "")), c];
284
284
  };
285
285
  class Gt {
286
- constructor({ strings: a, _$litType$: f }, c) {
286
+ constructor({ strings: a, _$litType$: u }, c) {
287
287
  let p;
288
288
  this.parts = [];
289
289
  let g = 0, N = 0;
290
- const j = a.length - 1, V = this.parts, [b, X] = vr(a, f);
291
- if (this.el = Gt.createElement(b, c), St.currentNode = this.el.content, f === 2 || f === 3) {
290
+ const j = a.length - 1, V = this.parts, [b, X] = vr(a, u);
291
+ if (this.el = Gt.createElement(b, c), St.currentNode = this.el.content, u === 2 || u === 3) {
292
292
  const W = this.el.content.firstChild;
293
293
  W.replaceWith(...W.childNodes);
294
294
  }
@@ -314,20 +314,20 @@ class Gt {
314
314
  g++;
315
315
  }
316
316
  }
317
- static createElement(a, f) {
317
+ static createElement(a, u) {
318
318
  const c = Dt.createElement("template");
319
319
  return c.innerHTML = a, c;
320
320
  }
321
321
  }
322
- function kt(d, a, f = d, c) {
322
+ function kt(d, a, u = d, c) {
323
323
  if (a === It) return a;
324
- let p = c !== void 0 ? f._$Co?.[c] : f._$Cl;
324
+ let p = c !== void 0 ? u._$Co?.[c] : u._$Cl;
325
325
  const g = Xt(a) ? void 0 : a._$litDirective$;
326
- return p?.constructor !== g && (p?._$AO?.(!1), g === void 0 ? p = void 0 : (p = new g(d), p._$AT(d, f, c)), c !== void 0 ? (f._$Co ??= [])[c] = p : f._$Cl = p), p !== void 0 && (a = kt(d, p._$AS(d, a.values), p, c)), a;
326
+ return p?.constructor !== g && (p?._$AO?.(!1), g === void 0 ? p = void 0 : (p = new g(d), p._$AT(d, u, c)), c !== void 0 ? (u._$Co ??= [])[c] = p : u._$Cl = p), p !== void 0 && (a = kt(d, p._$AS(d, a.values), p, c)), a;
327
327
  }
328
328
  class yr {
329
- constructor(a, f) {
330
- this._$AV = [], this._$AN = void 0, this._$AD = a, this._$AM = f;
329
+ constructor(a, u) {
330
+ this._$AV = [], this._$AN = void 0, this._$AD = a, this._$AM = u;
331
331
  }
332
332
  get parentNode() {
333
333
  return this._$AM.parentNode;
@@ -336,7 +336,7 @@ class yr {
336
336
  return this._$AM._$AU;
337
337
  }
338
338
  u(a) {
339
- const { el: { content: f }, parts: c } = this._$AD, p = (a?.creationScope ?? Dt).importNode(f, !0);
339
+ const { el: { content: u }, parts: c } = this._$AD, p = (a?.creationScope ?? Dt).importNode(u, !0);
340
340
  St.currentNode = p;
341
341
  let g = St.nextNode(), N = 0, j = 0, V = c[0];
342
342
  for (; V !== void 0; ) {
@@ -349,21 +349,21 @@ class yr {
349
349
  return St.currentNode = Dt, p;
350
350
  }
351
351
  p(a) {
352
- let f = 0;
353
- for (const c of this._$AV) c !== void 0 && (c.strings !== void 0 ? (c._$AI(a, c, f), f += c.strings.length - 2) : c._$AI(a[f])), f++;
352
+ let u = 0;
353
+ for (const c of this._$AV) c !== void 0 && (c.strings !== void 0 ? (c._$AI(a, c, u), u += c.strings.length - 2) : c._$AI(a[u])), u++;
354
354
  }
355
355
  }
356
356
  class Qt {
357
357
  get _$AU() {
358
358
  return this._$AM?._$AU ?? this._$Cv;
359
359
  }
360
- constructor(a, f, c, p) {
361
- this.type = 2, this._$AH = dt, this._$AN = void 0, this._$AA = a, this._$AB = f, this._$AM = c, this.options = p, this._$Cv = p?.isConnected ?? !0;
360
+ constructor(a, u, c, p) {
361
+ this.type = 2, this._$AH = dt, this._$AN = void 0, this._$AA = a, this._$AB = u, this._$AM = c, this.options = p, this._$Cv = p?.isConnected ?? !0;
362
362
  }
363
363
  get parentNode() {
364
364
  let a = this._$AA.parentNode;
365
- const f = this._$AM;
366
- return f !== void 0 && a?.nodeType === 11 && (a = f.parentNode), a;
365
+ const u = this._$AM;
366
+ return u !== void 0 && a?.nodeType === 11 && (a = u.parentNode), a;
367
367
  }
368
368
  get startNode() {
369
369
  return this._$AA;
@@ -371,8 +371,8 @@ class Qt {
371
371
  get endNode() {
372
372
  return this._$AB;
373
373
  }
374
- _$AI(a, f = this) {
375
- a = kt(this, a, f), Xt(a) ? a === dt || a == null || a === "" ? (this._$AH !== dt && this._$AR(), this._$AH = dt) : a !== this._$AH && a !== It && this._(a) : a._$litType$ !== void 0 ? this.$(a) : a.nodeType !== void 0 ? this.T(a) : gr(a) ? this.k(a) : this._(a);
374
+ _$AI(a, u = this) {
375
+ a = kt(this, a, u), Xt(a) ? a === dt || a == null || a === "" ? (this._$AH !== dt && this._$AR(), this._$AH = dt) : a !== this._$AH && a !== It && this._(a) : a._$litType$ !== void 0 ? this.$(a) : a.nodeType !== void 0 ? this.T(a) : gr(a) ? this.k(a) : this._(a);
376
376
  }
377
377
  O(a) {
378
378
  return this._$AA.parentNode.insertBefore(a, this._$AB);
@@ -384,26 +384,26 @@ class Qt {
384
384
  this._$AH !== dt && Xt(this._$AH) ? this._$AA.nextSibling.data = a : this.T(Dt.createTextNode(a)), this._$AH = a;
385
385
  }
386
386
  $(a) {
387
- const { values: f, _$litType$: c } = a, p = typeof c == "number" ? this._$AC(a) : (c.el === void 0 && (c.el = Gt.createElement(Ui(c.h, c.h[0]), this.options)), c);
388
- if (this._$AH?._$AD === p) this._$AH.p(f);
387
+ const { values: u, _$litType$: c } = a, p = typeof c == "number" ? this._$AC(a) : (c.el === void 0 && (c.el = Gt.createElement(Ui(c.h, c.h[0]), this.options)), c);
388
+ if (this._$AH?._$AD === p) this._$AH.p(u);
389
389
  else {
390
390
  const g = new yr(p, this), N = g.u(this.options);
391
- g.p(f), this.T(N), this._$AH = g;
391
+ g.p(u), this.T(N), this._$AH = g;
392
392
  }
393
393
  }
394
394
  _$AC(a) {
395
- let f = ii.get(a.strings);
396
- return f === void 0 && ii.set(a.strings, f = new Gt(a)), f;
395
+ let u = ii.get(a.strings);
396
+ return u === void 0 && ii.set(a.strings, u = new Gt(a)), u;
397
397
  }
398
398
  k(a) {
399
399
  Pn(this._$AH) || (this._$AH = [], this._$AR());
400
- const f = this._$AH;
400
+ const u = this._$AH;
401
401
  let c, p = 0;
402
- for (const g of a) p === f.length ? f.push(c = new Qt(this.O(Kt()), this.O(Kt()), this, this.options)) : c = f[p], c._$AI(g), p++;
403
- p < f.length && (this._$AR(c && c._$AB.nextSibling, p), f.length = p);
402
+ for (const g of a) p === u.length ? u.push(c = new Qt(this.O(Kt()), this.O(Kt()), this, this.options)) : c = u[p], c._$AI(g), p++;
403
+ p < u.length && (this._$AR(c && c._$AB.nextSibling, p), u.length = p);
404
404
  }
405
- _$AR(a = this._$AA.nextSibling, f) {
406
- for (this._$AP?.(!1, !0, f); a !== this._$AB; ) {
405
+ _$AR(a = this._$AA.nextSibling, u) {
406
+ for (this._$AP?.(!1, !0, u); a !== this._$AB; ) {
407
407
  const c = Jn(a).nextSibling;
408
408
  Jn(a).remove(), a = c;
409
409
  }
@@ -419,17 +419,17 @@ class un {
419
419
  get _$AU() {
420
420
  return this._$AM._$AU;
421
421
  }
422
- constructor(a, f, c, p, g) {
423
- this.type = 1, this._$AH = dt, this._$AN = void 0, this.element = a, this.name = f, this._$AM = p, this.options = g, c.length > 2 || c[0] !== "" || c[1] !== "" ? (this._$AH = Array(c.length - 1).fill(new String()), this.strings = c) : this._$AH = dt;
422
+ constructor(a, u, c, p, g) {
423
+ this.type = 1, this._$AH = dt, this._$AN = void 0, this.element = a, this.name = u, this._$AM = p, this.options = g, c.length > 2 || c[0] !== "" || c[1] !== "" ? (this._$AH = Array(c.length - 1).fill(new String()), this.strings = c) : this._$AH = dt;
424
424
  }
425
- _$AI(a, f = this, c, p) {
425
+ _$AI(a, u = this, c, p) {
426
426
  const g = this.strings;
427
427
  let N = !1;
428
- if (g === void 0) a = kt(this, a, f, 0), N = !Xt(a) || a !== this._$AH && a !== It, N && (this._$AH = a);
428
+ if (g === void 0) a = kt(this, a, u, 0), N = !Xt(a) || a !== this._$AH && a !== It, N && (this._$AH = a);
429
429
  else {
430
430
  const j = a;
431
431
  let V, b;
432
- for (a = g[0], V = 0; V < g.length - 1; V++) b = kt(this, j[c + V], f, V), b === It && (b = this._$AH[V]), N ||= !Xt(b) || b !== this._$AH[V], b === dt ? a = dt : a !== dt && (a += (b ?? "") + g[V + 1]), this._$AH[V] = b;
432
+ for (a = g[0], V = 0; V < g.length - 1; V++) b = kt(this, j[c + V], u, V), b === It && (b = this._$AH[V]), N ||= !Xt(b) || b !== this._$AH[V], b === dt ? a = dt : a !== dt && (a += (b ?? "") + g[V + 1]), this._$AH[V] = b;
433
433
  }
434
434
  N && !p && this.j(a);
435
435
  }
@@ -454,11 +454,11 @@ class br extends un {
454
454
  }
455
455
  }
456
456
  class xr extends un {
457
- constructor(a, f, c, p, g) {
458
- super(a, f, c, p, g), this.type = 5;
457
+ constructor(a, u, c, p, g) {
458
+ super(a, u, c, p, g), this.type = 5;
459
459
  }
460
- _$AI(a, f = this) {
461
- if ((a = kt(this, a, f, 0) ?? dt) === It) return;
460
+ _$AI(a, u = this) {
461
+ if ((a = kt(this, a, u, 0) ?? dt) === It) return;
462
462
  const c = this._$AH, p = a === dt && c !== dt || a.capture !== c.capture || a.once !== c.once || a.passive !== c.passive, g = a !== dt && (c === dt || p);
463
463
  p && this.element.removeEventListener(this.name, this, c), g && this.element.addEventListener(this.name, this, a), this._$AH = a;
464
464
  }
@@ -467,8 +467,8 @@ class xr extends un {
467
467
  }
468
468
  }
469
469
  class Cr {
470
- constructor(a, f, c) {
471
- this.element = a, this.type = 6, this._$AN = void 0, this._$AM = f, this.options = c;
470
+ constructor(a, u, c) {
471
+ this.element = a, this.type = 6, this._$AN = void 0, this._$AM = u, this.options = c;
472
472
  }
473
473
  get _$AU() {
474
474
  return this._$AM._$AU;
@@ -479,12 +479,12 @@ class Cr {
479
479
  }
480
480
  const Er = Rn.litHtmlPolyfillSupport;
481
481
  Er?.(Gt, Qt), (Rn.litHtmlVersions ??= []).push("3.3.2");
482
- const Lr = (d, a, f) => {
483
- const c = f?.renderBefore ?? a;
482
+ const Lr = (d, a, u) => {
483
+ const c = u?.renderBefore ?? a;
484
484
  let p = c._$litPart$;
485
485
  if (p === void 0) {
486
- const g = f?.renderBefore ?? null;
487
- c._$litPart$ = p = new Qt(a.insertBefore(Kt(), g), g, void 0, f ?? {});
486
+ const g = u?.renderBefore ?? null;
487
+ c._$litPart$ = p = new Qt(a.insertBefore(Kt(), g), g, void 0, u ?? {});
488
488
  }
489
489
  return p._$AI(d), p;
490
490
  };
@@ -498,8 +498,8 @@ class Yt extends jt {
498
498
  return this.renderOptions.renderBefore ??= a.firstChild, a;
499
499
  }
500
500
  update(a) {
501
- const f = this.render();
502
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(a), this._$Do = Lr(f, this.renderRoot, this.renderOptions);
501
+ const u = this.render();
502
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(a), this._$Do = Lr(u, this.renderRoot, this.renderOptions);
503
503
  }
504
504
  connectedCallback() {
505
505
  super.connectedCallback(), this._$Do?.setConnected(!0);
@@ -642,34 +642,78 @@ const Tr = rr`
642
642
 
643
643
  .controls {
644
644
  display: flex;
645
- justify-content: space-between;
646
- gap: 1rem;
645
+ flex-wrap: wrap;
646
+ justify-content: center;
647
+ gap: 12px;
647
648
  align-items: center;
648
- align-self: stretch;
649
- padding: 0.25rem;
649
+ justify-content: space-between;
650
+
651
+ width: 100%;
652
+ margin: 0.5rem 0;
650
653
  }
651
654
 
652
- .controls > input {
653
- display: flex;
654
- height: 4px;
655
- align-items: center;
656
- flex: 1 0 0;
655
+ .zoom {
656
+ flex: 1 1 160px;
657
+ min-width: 160px;
658
+ height: 32px;
659
+ width: 500px;
657
660
  }
658
661
 
659
- .controls > input[type="range"]::-moz-range-track,
660
- .controls > input[type="range"]::-webkit-slider-runnable-track {
662
+ input[type="range"] {
663
+ -webkit-appearance: none;
664
+ appearance: none;
665
+
666
+ background: transparent;
667
+ margin: 0;
668
+ }
669
+
670
+ .zoom[type="range"]::-moz-range-track,
671
+ .zoom[type="range"]::-webkit-slider-runnable-track {
661
672
  height: 15px;
662
673
  background: #ccc;
663
674
  border-radius: 16px;
664
675
  }
665
676
 
666
- button {
667
- display: flex;
677
+ .zoom[type="range"]::-webkit-slider-runnable-track {
678
+ background-color: #ccc;
679
+ border-radius: 16px;
680
+ }
681
+
682
+ input[type="range"]::-webkit-slider-thumb {
683
+ -webkit-appearance: none;
684
+
685
+ width: 32px;
668
686
  height: 32px;
669
- padding: 8px 12px;
687
+ background: #ffffff;
688
+ border-radius: 50%;
689
+ border: none;
690
+
691
+ box-shadow: 0 6px 12px rgba(0,0,0,0.25);
692
+ margin-top: -12px;
693
+ cursor: pointer;
694
+ }
695
+
696
+ input[type="range"]::-moz-range-thumb {
697
+ width: 32px;
698
+ height: 32px;
699
+ background: #ffffff;
700
+ border-radius: 50%;
701
+ border: none;
702
+
703
+ box-shadow: 0 6px 12px rgba(0,0,0,0.25);
704
+ cursor: pointer;
705
+ }
706
+
707
+
708
+ button {
709
+ display: inline-flex;
710
+ align-items: center;
670
711
  justify-content: center;
671
712
  gap: 8px;
672
- align-items: center;
713
+
714
+ min-height: 44px;
715
+ padding: 10px 14px;
716
+
673
717
  border-radius: var(--Radius---radius-sm, 5px);
674
718
  border: 1.5px solid var(--Colors-Primary---color-primary, #001D68);
675
719
  background: var(--Colors-Grays---color-white, #FFF);
@@ -677,12 +721,10 @@ const Tr = rr`
677
721
  color: var(--Colors-Primary---color-primary, #001D68);
678
722
  text-align: center;
679
723
 
680
- /* Button Font/Small */
681
- font-family: Inter;
682
- font-size: 12px;
683
- font-style: normal;
724
+ font-family: inherit;
725
+ font-size: 14px;
684
726
  font-weight: 600;
685
- line-height: 16px; /* 133.333% */
727
+ line-height: 16px;
686
728
  }
687
729
 
688
730
  button[disabled] {
@@ -723,7 +765,7 @@ const Tr = rr`
723
765
 
724
766
  .placeholder {
725
767
  display: flex;
726
- height: 253px;
768
+ height: 100%;
727
769
  flex-direction: column;
728
770
  justify-content: center;
729
771
  align-items: center;
@@ -761,12 +803,11 @@ const Tr = rr`
761
803
  color: var(--Colors-Grays---color-white, #FFF);
762
804
  text-align: center;
763
805
 
764
- /* Button Font/Medium */
765
806
  font-family: Inter;
766
807
  font-size: 14px;
767
808
  font-style: normal;
768
809
  font-weight: 600;
769
- line-height: 16px; /* 114.286% */
810
+ line-height: 16px;
770
811
  }
771
812
 
772
813
  .continue:disabled {
@@ -782,7 +823,6 @@ const Tr = rr`
782
823
  color: var(--Colors-Grays---color-gray-7, #424242);
783
824
  text-align: center;
784
825
 
785
- /* Button Font/Medium */
786
826
  font-family: Inter;
787
827
  font-size: 14px;
788
828
  font-style: normal;
@@ -792,23 +832,103 @@ const Tr = rr`
792
832
 
793
833
  .confirmation {
794
834
  display: flex;
795
- height: 77px;
796
- gap: 30px;
797
- justify-content: space-between;
798
- align-items: flex-end;
835
+ flex-wrap: wrap;
836
+ gap: 12px;
837
+ justify-content: center;
838
+ align-items: center;
839
+
840
+ height: auto;
799
841
  }
800
842
 
801
843
  .nav {
802
844
  display: flex;
803
- height: 77px;
804
- gap: 30px;
845
+ flex-wrap: wrap;
846
+ gap: 12px;
805
847
  justify-content: space-between;
806
- align-items: flex-end;
848
+ align-items: center;
807
849
  align-self: stretch;
850
+
851
+ height: auto;
852
+ min-height: 56px;
808
853
  }
809
854
 
810
855
  .nav-spacer {
811
- flex: 1;
856
+ flex: 1 1 auto;
857
+ }
858
+
859
+ .cropper {
860
+ display: flex;
861
+ justify-content: center;
862
+ width: 100%;
863
+ height: 100%;
864
+ }
865
+
866
+ .rotate-controls,
867
+ .zoom-controls,
868
+ .reset-controls {
869
+ display: flex;
870
+ align-items: center;
871
+ justify-content: space-between;
872
+ gap: 12px;
873
+ }
874
+
875
+ @media (max-width: 640px) {
876
+ .layout {
877
+ flex-direction: column;
878
+ align-items: stretch;
879
+ }
880
+
881
+ .controls {
882
+ flex-direction: column;
883
+ gap: 12px;
884
+ }
885
+
886
+ .rotate-controls,
887
+ .zoom-controls {
888
+ width: 100%;
889
+ gap: 6px;
890
+ }
891
+
892
+ .cropper,
893
+ .preview {
894
+ width: 100%;
895
+ }
896
+
897
+ /* Make action buttons full-width for easy tapping */
898
+ .nav button,
899
+ .confirmation button {
900
+ width: 100%;
901
+ }
902
+
903
+ .nav {
904
+ justify-content: center;
905
+ }
906
+
907
+ .zoom {
908
+ height: 64px;
909
+ }
910
+
911
+ .nav-spacer {
912
+ display: none;
913
+ }
914
+
915
+ .zoom[type="range"]::-moz-range-track,
916
+ .zoom[type="range"]::-webkit-slider-runnable-track {
917
+ height: 30px;
918
+ border-radius: 32px;
919
+ }
920
+
921
+ input[type="range"]::-webkit-slider-thumb {
922
+ width: 48px;
923
+ height: 48px;
924
+ margin-top: -4px; /* centers thumb over 8px track */
925
+ }
926
+
927
+ input[type="range"]::-moz-range-thumb {
928
+ width: 48px;
929
+ height: 48px;
930
+ cursor: pointer;
931
+ }
812
932
  }
813
933
  `, Sr = wt`
814
934
  <svg width="15" height="16"
@@ -857,7 +977,7 @@ function Bn(d) {
857
977
  if (Object.prototype.hasOwnProperty.call(d, "__esModule")) return d;
858
978
  var a = d.default;
859
979
  if (typeof a == "function") {
860
- var f = function c() {
980
+ var u = function c() {
861
981
  var p = !1;
862
982
  try {
863
983
  p = this instanceof c;
@@ -865,17 +985,17 @@ function Bn(d) {
865
985
  }
866
986
  return p ? Reflect.construct(a, arguments, this.constructor) : a.apply(this, arguments);
867
987
  };
868
- f.prototype = a.prototype;
869
- } else f = {};
870
- return Object.defineProperty(f, "__esModule", { value: !0 }), Object.keys(d).forEach(function(c) {
988
+ u.prototype = a.prototype;
989
+ } else u = {};
990
+ return Object.defineProperty(u, "__esModule", { value: !0 }), Object.keys(d).forEach(function(c) {
871
991
  var p = Object.getOwnPropertyDescriptor(d, c);
872
- Object.defineProperty(f, c, p.get ? p : {
992
+ Object.defineProperty(u, c, p.get ? p : {
873
993
  enumerable: !0,
874
994
  get: function() {
875
995
  return d[c];
876
996
  }
877
997
  });
878
- }), f;
998
+ }), u;
879
999
  }
880
1000
  function Mr(d) {
881
1001
  throw new Error('Could not dynamically require "' + d + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
@@ -883,10 +1003,10 @@ function Mr(d) {
883
1003
  var sn = { exports: {} }, on = { exports: {} }, Nr = on.exports, si;
884
1004
  function Fr() {
885
1005
  return si || (si = 1, (function(d, a) {
886
- (function(f, c) {
1006
+ (function(u, c) {
887
1007
  d.exports = c();
888
1008
  })(Nr, (function() {
889
- var f;
1009
+ var u;
890
1010
  return (function() {
891
1011
  var c = {
892
1012
  /***/
@@ -1554,37 +1674,37 @@ function Fr() {
1554
1674
  general: ["A", "0", "[0-9a-zA-Z$]+", "."]
1555
1675
  }, l = function() {
1556
1676
  if (this.mask.toLowerCase().indexOf("[h]") !== -1) {
1557
- var u = 0;
1558
- this.date[4] && (u = parseFloat(this.date[4] / 60));
1559
- var L = parseInt(this.date[3]) + u;
1677
+ var f = 0;
1678
+ this.date[4] && (f = parseFloat(this.date[4] / 60));
1679
+ var L = parseInt(this.date[3]) + f;
1560
1680
  L /= 24;
1561
1681
  } else !(this.date[0] && this.date[1] && this.date[2]) && (this.date[3] || this.date[4]) ? L = $.two(this.date[3]) + ":" + $.two(this.date[4]) + ":" + $.two(this.date[5]) : (this.date[0] && this.date[1] && !this.date[2] && (this.date[2] = 1), L = $.two(this.date[0]) + "-" + $.two(this.date[1]) + "-" + $.two(this.date[2]), (this.date[3] || this.date[4] || this.date[5]) && (L += " " + $.two(this.date[3]) + ":" + $.two(this.date[4]) + ":" + $.two(this.date[5])));
1562
1682
  return L;
1563
1683
  }, r = function() {
1564
- var u = "";
1684
+ var f = "";
1565
1685
  if (!(this.date[0] && this.date[1] && this.date[2]) && (this.date[3] || this.date[4])) {
1566
1686
  if (this.mask.toLowerCase().indexOf("[h]") !== -1)
1567
- u = parseInt(this.date[3]);
1687
+ f = parseInt(this.date[3]);
1568
1688
  else {
1569
1689
  let J = parseInt(this.date[3]);
1570
- J < 13 && this.values.indexOf("PM") !== -1 ? u = (J + 12) % 24 : u = J % 24;
1690
+ J < 13 && this.values.indexOf("PM") !== -1 ? f = (J + 12) % 24 : f = J % 24;
1571
1691
  }
1572
- this.date[4] && (u += parseFloat(this.date[4] / 60)), this.date[5] && (u += parseFloat(this.date[5] / 3600)), u /= 24;
1692
+ this.date[4] && (f += parseFloat(this.date[4] / 60)), this.date[5] && (f += parseFloat(this.date[5] / 3600)), f /= 24;
1573
1693
  } else if (this.date[0] || this.date[1] || this.date[2] || this.date[3] || this.date[4] || this.date[5]) {
1574
1694
  this.date[0] && this.date[1] && !this.date[2] && (this.date[2] = 1);
1575
1695
  var L = Be.now(this.date);
1576
- u = Be.dateToNum(L);
1696
+ f = Be.dateToNum(L);
1577
1697
  }
1578
- return isNaN(u) && (u = ""), u;
1579
- }, e = function(u) {
1580
- return u === null || u === "" || u === void 0;
1581
- }, m = function(u) {
1582
- var L = ("" + u)[0];
1698
+ return isNaN(f) && (f = ""), f;
1699
+ }, e = function(f) {
1700
+ return f === null || f === "" || f === void 0;
1701
+ }, m = function(f) {
1702
+ var L = ("" + f)[0];
1583
1703
  return L == "=";
1584
- }, P = function(u) {
1585
- return u === "currency" || u === "percentage" || u === "scientific" || u === "numeric";
1586
- }, Q = function(u) {
1587
- if (u && Number(u) == u)
1704
+ }, P = function(f) {
1705
+ return f === "currency" || f === "percentage" || f === "scientific" || f === "numeric";
1706
+ }, Q = function(f) {
1707
+ if (f && Number(f) == f)
1588
1708
  return ".";
1589
1709
  if (this.options.decimal)
1590
1710
  return this.options.decimal;
@@ -1592,50 +1712,50 @@ function Fr() {
1592
1712
  var L = Intl.NumberFormat(this.locale).format(1.1);
1593
1713
  return this.options.decimal = L[1];
1594
1714
  } else {
1595
- u || (u = this.mask);
1596
- var J = new RegExp("0{1}(.{1})0+", "ig"), L = J.exec(u);
1715
+ f || (f = this.mask);
1716
+ var J = new RegExp("0{1}(.{1})0+", "ig"), L = J.exec(f);
1597
1717
  if (L && L[1] && L[1].length == 1)
1598
1718
  return this.options.decimal = L[1], L[1];
1599
- var J = new RegExp("#{1}(.{1})#+", "ig"), L = J.exec(u);
1719
+ var J = new RegExp("#{1}(.{1})#+", "ig"), L = J.exec(f);
1600
1720
  L && L[1] && L[1].length == 1 ? L[1] === "," ? this.options.decimal = "." : this.options.decimal = "," : this.options.decimal = "1.1".toLocaleString().substring(1, 2);
1601
1721
  }
1602
1722
  return this.options.decimal ? this.options.decimal : null;
1603
- }, E = function(u, L) {
1604
- if (u == "")
1723
+ }, E = function(f, L) {
1724
+ if (f == "")
1605
1725
  return "";
1606
- L || (L = Q.call(this)), u = ("" + u).split(L);
1607
- var J = u[0].match(/[-]+/g);
1608
- if (J && J.length ? J = !0 : J = !1, u[0] = u[0].match(/[0-9]+/g), u[0] ? (J && u[0].unshift("-"), u[0] = u[0].join("")) : J && (u[0] = "-"), u[0] || u[1])
1609
- u[1] !== void 0 && (u[1] = u[1].match(/[0-9]+/g), u[1] ? u[1] = u[1].join("") : u[1] = "");
1726
+ L || (L = Q.call(this)), f = ("" + f).split(L);
1727
+ var J = f[0].match(/[-]+/g);
1728
+ if (J && J.length ? J = !0 : J = !1, f[0] = f[0].match(/[0-9]+/g), f[0] ? (J && f[0].unshift("-"), f[0] = f[0].join("")) : J && (f[0] = "-"), f[0] || f[1])
1729
+ f[1] !== void 0 && (f[1] = f[1].match(/[0-9]+/g), f[1] ? f[1] = f[1].join("") : f[1] = "");
1610
1730
  else
1611
1731
  return "";
1612
- return u;
1613
- }, n = function(u, L) {
1614
- if (u === "")
1732
+ return f;
1733
+ }, n = function(f, L) {
1734
+ if (f === "")
1615
1735
  return "";
1616
1736
  var J = Q.call(this), U = this.options;
1617
- if (u = E.call(this, u), u === "")
1737
+ if (f = E.call(this, f), f === "")
1618
1738
  return "";
1619
1739
  var F = null;
1620
- if (u[0] && (U.style === "percent" ? F = parseFloat(u[0]) / 100 : F = parseFloat(u[0] + ".1")), (u[0] === "-" || u[0] === "-00") && !u[1] && L && L.inputType == "deleteContentBackward")
1740
+ if (f[0] && (U.style === "percent" ? F = parseFloat(f[0]) / 100 : F = parseFloat(f[0] + ".1")), (f[0] === "-" || f[0] === "-00") && !f[1] && L && L.inputType == "deleteContentBackward")
1621
1741
  return "";
1622
1742
  var ae = new Intl.NumberFormat(this.locale, U).format(F);
1623
1743
  if (ae = ae.split(J), U.style === "percent" && ae[0].indexOf("%") !== -1 && (ae[0] = ae[0].replace("%", ""), ae[2] = "%"), typeof ae[1] < "u") {
1624
1744
  var I = ae[1].replace(/[0-9]*/g, "");
1625
1745
  I && (ae[2] = I);
1626
1746
  }
1627
- return u[1] !== void 0 ? ae[1] = J + u[1] : ae[1] = "", ae.join("");
1628
- }, o = function(u, L) {
1629
- var J = w.call(u);
1747
+ return f[1] !== void 0 ? ae[1] = J + f[1] : ae[1] = "", ae.join("");
1748
+ }, o = function(f, L) {
1749
+ var J = w.call(f);
1630
1750
  if (J) {
1631
- var U = n.call(this, J, L), F = U.length - J.length, ae = t.call(u) + F;
1632
- w.call(u, U, ae, !0);
1751
+ var U = n.call(this, J, L), F = U.length - J.length, ae = t.call(f) + F;
1752
+ w.call(f, U, ae, !0);
1633
1753
  }
1634
- }, i = function(u) {
1635
- var L = E.call(this, u);
1754
+ }, i = function(f) {
1755
+ var L = E.call(this, f);
1636
1756
  return L ? (L[0] === "-" && (L[0] = "-0"), parseFloat(L.join("."))) : null;
1637
- }, t = function(u, L) {
1638
- if (u === void 0)
1757
+ }, t = function(f, L) {
1758
+ if (f === void 0)
1639
1759
  if (this.tagName == "DIV") {
1640
1760
  var J = 0, U = window.getSelection();
1641
1761
  if (U && U.rangeCount !== 0) {
@@ -1650,31 +1770,31 @@ function Fr() {
1650
1770
  if (L) {
1651
1771
  for (var ae = null, D = 0; D < I.length; D++)
1652
1772
  (I[D].match(/[\-0-9]/g) || I[D] === "." || I[D] === ",") && (ae = D);
1653
- ae === null && (ae = I.indexOf(" ")), u >= ae && (u = ae + 1);
1773
+ ae === null && (ae = I.indexOf(" ")), f >= ae && (f = ae + 1);
1654
1774
  }
1655
- if (u > I.length && (u = I.length), u)
1775
+ if (f > I.length && (f = I.length), f)
1656
1776
  if (this.tagName == "DIV") {
1657
1777
  var U = window.getSelection(), F = document.createRange();
1658
- this.childNodes[0] && (F.setStart(this.childNodes[0], u), U.removeAllRanges(), U.addRange(F));
1778
+ this.childNodes[0] && (F.setStart(this.childNodes[0], f), U.removeAllRanges(), U.addRange(F));
1659
1779
  } else
1660
- this.selectionStart = u, this.selectionEnd = u;
1780
+ this.selectionStart = f, this.selectionEnd = f;
1661
1781
  }
1662
- }, w = function(u, L, J) {
1782
+ }, w = function(f, L, J) {
1663
1783
  if (this.tagName == "DIV")
1664
- if (u === void 0) {
1665
- var u = this.innerText;
1666
- return this.value && this.value.length > u.length && (u = this.value), u;
1784
+ if (f === void 0) {
1785
+ var f = this.innerText;
1786
+ return this.value && this.value.length > f.length && (f = this.value), f;
1667
1787
  } else
1668
- this.innerText !== u && (this.innerText = u, L && t.call(this, L, J));
1788
+ this.innerText !== f && (this.innerText = f, L && t.call(this, L, J));
1669
1789
  else {
1670
- if (u === void 0)
1790
+ if (f === void 0)
1671
1791
  return this.value;
1672
- this.value !== u && (this.value = u, L && t.call(this, L, J));
1792
+ this.value !== f && (this.value = f, L && t.call(this, L, J));
1673
1793
  }
1674
1794
  }, R = Be.weekdays, B = Be.weekdaysShort, C = Be.months, v = Be.monthsShort, k = {
1675
- YEAR: function(u, L) {
1795
+ YEAR: function(f, L) {
1676
1796
  var J = "" + (/* @__PURE__ */ new Date()).getFullYear();
1677
- if (typeof this.values[this.index] > "u" && (this.values[this.index] = ""), parseInt(u) >= 0 && parseInt(u) <= 10 && this.values[this.index].length < L && (this.values[this.index] += u), this.values[this.index].length == L) {
1797
+ if (typeof this.values[this.index] > "u" && (this.values[this.index] = ""), parseInt(f) >= 0 && parseInt(f) <= 10 && this.values[this.index].length < L && (this.values[this.index] += f), this.values[this.index].length == L) {
1678
1798
  if (L == 2)
1679
1799
  var J = J.substr(0, 2) + this.values[this.index];
1680
1800
  else if (L == 3)
@@ -1684,63 +1804,63 @@ function Fr() {
1684
1804
  this.date[0] = J, this.index++;
1685
1805
  }
1686
1806
  },
1687
- YYYY: function(u) {
1688
- k.YEAR.call(this, u, 4);
1807
+ YYYY: function(f) {
1808
+ k.YEAR.call(this, f, 4);
1689
1809
  },
1690
- YYY: function(u) {
1691
- k.YEAR.call(this, u, 3);
1810
+ YYY: function(f) {
1811
+ k.YEAR.call(this, f, 3);
1692
1812
  },
1693
- YY: function(u) {
1694
- k.YEAR.call(this, u, 2);
1813
+ YY: function(f) {
1814
+ k.YEAR.call(this, f, 2);
1695
1815
  },
1696
- FIND: function(u, L) {
1816
+ FIND: function(f, L) {
1697
1817
  if (e(this.values[this.index]) && (this.values[this.index] = ""), this.event && this.event.inputType && this.event.inputType.indexOf("delete") > -1) {
1698
- this.values[this.index] += u;
1818
+ this.values[this.index] += f;
1699
1819
  return;
1700
1820
  }
1701
- for (var J = 0, U = 0, F = (this.values[this.index] + u).toLowerCase(), ae = 0; ae < L.length; ae++)
1821
+ for (var J = 0, U = 0, F = (this.values[this.index] + f).toLowerCase(), ae = 0; ae < L.length; ae++)
1702
1822
  L[ae].toLowerCase().indexOf(F) == 0 && (J = ae, U++);
1703
1823
  if (U > 1)
1704
- this.values[this.index] += u;
1824
+ this.values[this.index] += f;
1705
1825
  else if (U == 1) {
1706
1826
  var I = L[J].length - this.values[this.index].length - 1;
1707
1827
  return this.position += I, this.values[this.index] = L[J], this.index++, J;
1708
1828
  }
1709
1829
  },
1710
- MMM: function(u) {
1711
- var L = k.FIND.call(this, u, v);
1830
+ MMM: function(f) {
1831
+ var L = k.FIND.call(this, f, v);
1712
1832
  L !== void 0 && (this.date[1] = L + 1);
1713
1833
  },
1714
- MON: function(u) {
1715
- k.MMM.call(this, u);
1834
+ MON: function(f) {
1835
+ k.MMM.call(this, f);
1716
1836
  },
1717
- MMMM: function(u) {
1718
- var L = k.FIND.call(this, u, C);
1837
+ MMMM: function(f) {
1838
+ var L = k.FIND.call(this, f, C);
1719
1839
  L !== void 0 && (this.date[1] = L + 1);
1720
1840
  },
1721
- MONTH: function(u) {
1722
- k.MMMM.call(this, u);
1841
+ MONTH: function(f) {
1842
+ k.MMMM.call(this, f);
1723
1843
  },
1724
- MMMMM: function(u) {
1844
+ MMMMM: function(f) {
1725
1845
  e(this.values[this.index]) && (this.values[this.index] = "");
1726
- for (var L = (this.values[this.index] + u).toLowerCase(), J = 0; J < C.length; J++)
1846
+ for (var L = (this.values[this.index] + f).toLowerCase(), J = 0; J < C.length; J++)
1727
1847
  if (C[J][0].toLowerCase().indexOf(L) == 0) {
1728
1848
  this.values[this.index] = C[J][0], this.date[1] = J + 1, this.index++;
1729
1849
  break;
1730
1850
  }
1731
1851
  },
1732
- MM: function(u) {
1733
- e(this.values[this.index]) ? parseInt(u) > 1 && parseInt(u) < 10 ? (this.date[1] = this.values[this.index] = "0" + u, this.index++) : parseInt(u) < 2 && (this.values[this.index] = u) : this.values[this.index] == 1 && parseInt(u) < 3 ? (this.date[1] = this.values[this.index] += u, this.index++) : this.values[this.index] == 0 && parseInt(u) > 0 && parseInt(u) < 10 && (this.date[1] = this.values[this.index] += u, this.index++);
1852
+ MM: function(f) {
1853
+ e(this.values[this.index]) ? parseInt(f) > 1 && parseInt(f) < 10 ? (this.date[1] = this.values[this.index] = "0" + f, this.index++) : parseInt(f) < 2 && (this.values[this.index] = f) : this.values[this.index] == 1 && parseInt(f) < 3 ? (this.date[1] = this.values[this.index] += f, this.index++) : this.values[this.index] == 0 && parseInt(f) > 0 && parseInt(f) < 10 && (this.date[1] = this.values[this.index] += f, this.index++);
1734
1854
  },
1735
- M: function(u) {
1855
+ M: function(f) {
1736
1856
  var L = !1;
1737
- if (parseInt(u) >= 0 && parseInt(u) < 10)
1857
+ if (parseInt(f) >= 0 && parseInt(f) < 10)
1738
1858
  if (e(this.values[this.index]))
1739
- this.values[this.index] = u, u > 1 && (this.date[1] = this.values[this.index], this.index++);
1740
- else if (this.values[this.index] == 1 && parseInt(u) < 3)
1741
- this.date[1] = this.values[this.index] += u, this.index++;
1742
- else if (this.values[this.index] == 0 && parseInt(u) > 0)
1743
- this.date[1] = this.values[this.index] += u, this.index++;
1859
+ this.values[this.index] = f, f > 1 && (this.date[1] = this.values[this.index], this.index++);
1860
+ else if (this.values[this.index] == 1 && parseInt(f) < 3)
1861
+ this.date[1] = this.values[this.index] += f, this.index++;
1862
+ else if (this.values[this.index] == 0 && parseInt(f) > 0)
1863
+ this.date[1] = this.values[this.index] += f, this.index++;
1744
1864
  else
1745
1865
  var L = !0;
1746
1866
  else
@@ -1750,17 +1870,17 @@ function Fr() {
1750
1870
  J > 0 && J < 12 && (this.date[1] = this.values[this.index], this.index++, this.position--);
1751
1871
  }
1752
1872
  },
1753
- D: function(u) {
1873
+ D: function(f) {
1754
1874
  var L = !1;
1755
- if (parseInt(u) >= 0 && parseInt(u) < 10)
1875
+ if (parseInt(f) >= 0 && parseInt(f) < 10)
1756
1876
  if (e(this.values[this.index]))
1757
- this.values[this.index] = u, parseInt(u) > 3 && (this.date[2] = this.values[this.index], this.index++);
1758
- else if (this.values[this.index] == 3 && parseInt(u) < 2)
1759
- this.date[2] = this.values[this.index] += u, this.index++;
1877
+ this.values[this.index] = f, parseInt(f) > 3 && (this.date[2] = this.values[this.index], this.index++);
1878
+ else if (this.values[this.index] == 3 && parseInt(f) < 2)
1879
+ this.date[2] = this.values[this.index] += f, this.index++;
1760
1880
  else if (this.values[this.index] == 1 || this.values[this.index] == 2)
1761
- this.date[2] = this.values[this.index] += u, this.index++;
1762
- else if (this.values[this.index] == 0 && parseInt(u) > 0)
1763
- this.date[2] = this.values[this.index] += u, this.index++;
1881
+ this.date[2] = this.values[this.index] += f, this.index++;
1882
+ else if (this.values[this.index] == 0 && parseInt(f) > 0)
1883
+ this.date[2] = this.values[this.index] += f, this.index++;
1764
1884
  else
1765
1885
  var L = !0;
1766
1886
  else
@@ -1770,30 +1890,30 @@ function Fr() {
1770
1890
  J > 0 && J < 32 && (this.date[2] = this.values[this.index], this.index++, this.position--);
1771
1891
  }
1772
1892
  },
1773
- DD: function(u) {
1774
- e(this.values[this.index]) ? parseInt(u) > 3 && parseInt(u) < 10 ? (this.date[2] = this.values[this.index] = "0" + u, this.index++) : parseInt(u) < 10 && (this.values[this.index] = u) : this.values[this.index] == 3 && parseInt(u) < 2 ? (this.date[2] = this.values[this.index] += u, this.index++) : (this.values[this.index] == 1 || this.values[this.index] == 2) && parseInt(u) < 10 ? (this.date[2] = this.values[this.index] += u, this.index++) : this.values[this.index] == 0 && parseInt(u) > 0 && parseInt(u) < 10 && (this.date[2] = this.values[this.index] += u, this.index++);
1893
+ DD: function(f) {
1894
+ e(this.values[this.index]) ? parseInt(f) > 3 && parseInt(f) < 10 ? (this.date[2] = this.values[this.index] = "0" + f, this.index++) : parseInt(f) < 10 && (this.values[this.index] = f) : this.values[this.index] == 3 && parseInt(f) < 2 ? (this.date[2] = this.values[this.index] += f, this.index++) : (this.values[this.index] == 1 || this.values[this.index] == 2) && parseInt(f) < 10 ? (this.date[2] = this.values[this.index] += f, this.index++) : this.values[this.index] == 0 && parseInt(f) > 0 && parseInt(f) < 10 && (this.date[2] = this.values[this.index] += f, this.index++);
1775
1895
  },
1776
- DDD: function(u) {
1777
- k.FIND.call(this, u, B);
1896
+ DDD: function(f) {
1897
+ k.FIND.call(this, f, B);
1778
1898
  },
1779
- DY: function(u) {
1780
- k.DDD.call(this, u);
1899
+ DY: function(f) {
1900
+ k.DDD.call(this, f);
1781
1901
  },
1782
- DDDD: function(u) {
1783
- k.FIND.call(this, u, R);
1902
+ DDDD: function(f) {
1903
+ k.FIND.call(this, f, R);
1784
1904
  },
1785
- DAY: function(u) {
1786
- k.DDDD.call(this, u);
1905
+ DAY: function(f) {
1906
+ k.DDDD.call(this, f);
1787
1907
  },
1788
- HH12: function(u, L) {
1908
+ HH12: function(f, L) {
1789
1909
  var J = !1;
1790
- if (parseInt(u) >= 0 && parseInt(u) < 10)
1910
+ if (parseInt(f) >= 0 && parseInt(f) < 10)
1791
1911
  if (e(this.values[this.index]))
1792
- parseInt(u) > 1 && parseInt(u) < 10 ? (L && (u = 0 + u), this.date[3] = this.values[this.index] = u, this.index++) : parseInt(u) < 10 && (this.values[this.index] = u);
1793
- else if (this.values[this.index] == 1 && parseInt(u) < 3)
1794
- this.date[3] = this.values[this.index] += u, this.index++;
1795
- else if (this.values[this.index] < 1 && parseInt(u) < 10)
1796
- this.date[3] = this.values[this.index] += u, this.index++;
1912
+ parseInt(f) > 1 && parseInt(f) < 10 ? (L && (f = 0 + f), this.date[3] = this.values[this.index] = f, this.index++) : parseInt(f) < 10 && (this.values[this.index] = f);
1913
+ else if (this.values[this.index] == 1 && parseInt(f) < 3)
1914
+ this.date[3] = this.values[this.index] += f, this.index++;
1915
+ else if (this.values[this.index] < 1 && parseInt(f) < 10)
1916
+ this.date[3] = this.values[this.index] += f, this.index++;
1797
1917
  else
1798
1918
  var J = !0;
1799
1919
  else
@@ -1803,15 +1923,15 @@ function Fr() {
1803
1923
  U >= 0 && U <= 12 && (this.date[3] = this.values[this.index], this.index++, this.position--);
1804
1924
  }
1805
1925
  },
1806
- HH24: function(u, L) {
1926
+ HH24: function(f, L) {
1807
1927
  var J = !1;
1808
- if (parseInt(u) >= 0 && parseInt(u) < 10)
1928
+ if (parseInt(f) >= 0 && parseInt(f) < 10)
1809
1929
  if (this.values[this.index] == null || this.values[this.index] == "")
1810
- parseInt(u) > 2 && parseInt(u) < 10 ? (L && (u = 0 + u), this.date[3] = this.values[this.index] = u, this.index++) : parseInt(u) < 10 && (this.values[this.index] = u);
1811
- else if (this.values[this.index] == 2 && parseInt(u) < 4)
1812
- !L && this.values[this.index] === "0" && (this.values[this.index] = ""), this.date[3] = this.values[this.index] += u, this.index++;
1813
- else if (this.values[this.index] < 2 && parseInt(u) < 10)
1814
- !L && this.values[this.index] === "0" && (this.values[this.index] = ""), this.date[3] = this.values[this.index] += u, this.index++;
1930
+ parseInt(f) > 2 && parseInt(f) < 10 ? (L && (f = 0 + f), this.date[3] = this.values[this.index] = f, this.index++) : parseInt(f) < 10 && (this.values[this.index] = f);
1931
+ else if (this.values[this.index] == 2 && parseInt(f) < 4)
1932
+ !L && this.values[this.index] === "0" && (this.values[this.index] = ""), this.date[3] = this.values[this.index] += f, this.index++;
1933
+ else if (this.values[this.index] < 2 && parseInt(f) < 10)
1934
+ !L && this.values[this.index] === "0" && (this.values[this.index] = ""), this.date[3] = this.values[this.index] += f, this.index++;
1815
1935
  else
1816
1936
  var J = !0;
1817
1937
  else
@@ -1821,44 +1941,44 @@ function Fr() {
1821
1941
  U >= 0 && U < 24 && (this.date[3] = this.values[this.index], this.index++, this.position--);
1822
1942
  }
1823
1943
  },
1824
- HH: function(u) {
1825
- k.HH24.call(this, u, 1);
1944
+ HH: function(f) {
1945
+ k.HH24.call(this, f, 1);
1826
1946
  },
1827
- H: function(u) {
1828
- k.HH24.call(this, u, 0);
1947
+ H: function(f) {
1948
+ k.HH24.call(this, f, 0);
1829
1949
  },
1830
- "\\[H\\]": function(u) {
1831
- this.values[this.index] == null && (this.values[this.index] = ""), u.match(/[0-9]/g) ? this.date[3] = this.values[this.index] += u : this.values[this.index].match(/[0-9]/g) && (this.date[3] = this.values[this.index], this.index++, this.position--);
1950
+ "\\[H\\]": function(f) {
1951
+ this.values[this.index] == null && (this.values[this.index] = ""), f.match(/[0-9]/g) ? this.date[3] = this.values[this.index] += f : this.values[this.index].match(/[0-9]/g) && (this.date[3] = this.values[this.index], this.index++, this.position--);
1832
1952
  },
1833
- N60: function(u, L) {
1834
- this.values[this.index] == null || this.values[this.index] == "" ? parseInt(u) > 5 && parseInt(u) < 10 ? (this.date[L] = this.values[this.index] = "0" + u, this.index++) : parseInt(u) < 10 && (this.values[this.index] = u) : parseInt(u) < 10 && (this.date[L] = this.values[this.index] += u, this.index++);
1953
+ N60: function(f, L) {
1954
+ this.values[this.index] == null || this.values[this.index] == "" ? parseInt(f) > 5 && parseInt(f) < 10 ? (this.date[L] = this.values[this.index] = "0" + f, this.index++) : parseInt(f) < 10 && (this.values[this.index] = f) : parseInt(f) < 10 && (this.date[L] = this.values[this.index] += f, this.index++);
1835
1955
  },
1836
- MI: function(u) {
1837
- k.N60.call(this, u, 4);
1956
+ MI: function(f) {
1957
+ k.N60.call(this, f, 4);
1838
1958
  },
1839
- SS: function(u) {
1840
- k.N60.call(this, u, 5);
1959
+ SS: function(f) {
1960
+ k.N60.call(this, f, 5);
1841
1961
  },
1842
- "AM/PM": function(u) {
1843
- typeof this.values[this.index] > "u" && (this.values[this.index] = ""), this.values[this.index] === "" ? u.match(/a/i) && this.date[3] < 13 ? this.values[this.index] += "A" : u.match(/p/i) && (this.values[this.index] += "P") : (this.values[this.index] === "A" || this.values[this.index] === "P") && (this.values[this.index] += "M", this.index++);
1962
+ "AM/PM": function(f) {
1963
+ typeof this.values[this.index] > "u" && (this.values[this.index] = ""), this.values[this.index] === "" ? f.match(/a/i) && this.date[3] < 13 ? this.values[this.index] += "A" : f.match(/p/i) && (this.values[this.index] += "P") : (this.values[this.index] === "A" || this.values[this.index] === "P") && (this.values[this.index] += "M", this.index++);
1844
1964
  },
1845
- WD: function(u) {
1846
- typeof this.values[this.index] > "u" && (this.values[this.index] = ""), parseInt(u) >= 0 && parseInt(u) < 7 && (this.values[this.index] = u), this.values[this.index].length == 1 && this.index++;
1965
+ WD: function(f) {
1966
+ typeof this.values[this.index] > "u" && (this.values[this.index] = ""), parseInt(f) >= 0 && parseInt(f) < 7 && (this.values[this.index] = f), this.values[this.index].length == 1 && this.index++;
1847
1967
  },
1848
- "0{1}(.{1}0+)?": function(u) {
1968
+ "0{1}(.{1}0+)?": function(f) {
1849
1969
  var L = Q.call(this), J = !1;
1850
1970
  e(this.values[this.index]) ? this.values[this.index] = "" : this.values[this.index] == "-" && (J = !0);
1851
1971
  var U = E.call(this, this.values[this.index], L);
1852
- U && (this.values[this.index] = U.join(L)), parseInt(u) >= 0 && parseInt(u) < 10 ? (this.values[this.index] == "0" && u > 0 ? this.values[this.index] = "" : this.values[this.index] == "-0" && u > 0 && (this.values[this.index] = "-"), (this.values[this.index] != "0" && this.values[this.index] != "-0" || u == L) && (this.values[this.index] += u)) : L && u == L ? this.values[this.index].indexOf(L) == -1 && (this.values[this.index] || (this.values[this.index] = "0"), this.values[this.index] += u) : u == "-" && (J = !0), J === !0 && this.values[this.index][0] !== "-" && (this.values[this.index] = "-" + this.values[this.index]);
1972
+ U && (this.values[this.index] = U.join(L)), parseInt(f) >= 0 && parseInt(f) < 10 ? (this.values[this.index] == "0" && f > 0 ? this.values[this.index] = "" : this.values[this.index] == "-0" && f > 0 && (this.values[this.index] = "-"), (this.values[this.index] != "0" && this.values[this.index] != "-0" || f == L) && (this.values[this.index] += f)) : L && f == L ? this.values[this.index].indexOf(L) == -1 && (this.values[this.index] || (this.values[this.index] = "0"), this.values[this.index] += f) : f == "-" && (J = !0), J === !0 && this.values[this.index][0] !== "-" && (this.values[this.index] = "-" + this.values[this.index]);
1853
1973
  },
1854
- "0{1}(.{1}0+)?E{1}\\+0+": function(u) {
1855
- k["0{1}(.{1}0+)?"].call(this, u);
1974
+ "0{1}(.{1}0+)?E{1}\\+0+": function(f) {
1975
+ k["0{1}(.{1}0+)?"].call(this, f);
1856
1976
  },
1857
- "0{1}(.{1}0+)?%": function(u) {
1858
- k["0{1}(.{1}0+)?"].call(this, u), this.values[this.index].match(/[\-0-9]/g) ? this.values[this.index] && this.values[this.index].indexOf("%") == -1 && (this.values[this.index] += "%") : this.values[this.index] = "";
1977
+ "0{1}(.{1}0+)?%": function(f) {
1978
+ k["0{1}(.{1}0+)?"].call(this, f), this.values[this.index].match(/[\-0-9]/g) ? this.values[this.index] && this.values[this.index].indexOf("%") == -1 && (this.values[this.index] += "%") : this.values[this.index] = "";
1859
1979
  },
1860
- "#(.{1})##0?(.{1}0+)?( ?;(.*)?)?": function(u) {
1861
- k["0{1}(.{1}0+)?"].call(this, u);
1980
+ "#(.{1})##0?(.{1}0+)?( ?;(.*)?)?": function(f) {
1981
+ k["0{1}(.{1}0+)?"].call(this, f);
1862
1982
  var L = Q.call(this), J = this.tokens[this.index].substr(1, 1), U = this.values[this.index][0] === "-", F = E.call(this, this.values[this.index], L);
1863
1983
  if (F !== "") {
1864
1984
  var ae = F[0].match(/[0-9]/g);
@@ -1872,31 +1992,31 @@ function Fr() {
1872
1992
  this.values[this.index] = F.join(L), U && (this.values[this.index] = "-" + this.values[this.index]);
1873
1993
  }
1874
1994
  },
1875
- 0: function(u) {
1876
- u.match(/[0-9]/g) && (this.values[this.index] = u, this.index++);
1995
+ 0: function(f) {
1996
+ f.match(/[0-9]/g) && (this.values[this.index] = f, this.index++);
1877
1997
  },
1878
- "[0-9a-zA-Z$]+": function(u) {
1998
+ "[0-9a-zA-Z$]+": function(f) {
1879
1999
  e(this.values[this.index]) && (this.values[this.index] = "");
1880
2000
  var L = this.tokens[this.index], J = this.values[this.index], U = J.length;
1881
- L[U] == u ? (this.values[this.index] += u, this.values[this.index] == L && this.index++) : (this.values[this.index] = L, this.index++, u.match(/[\-0-9]/g) && this.position--);
2001
+ L[U] == f ? (this.values[this.index] += f, this.values[this.index] == L && this.index++) : (this.values[this.index] = L, this.index++, f.match(/[\-0-9]/g) && this.position--);
1882
2002
  },
1883
- A: function(u) {
1884
- u.match(/[a-zA-Z]/gi) && (this.values[this.index] = u, this.index++);
2003
+ A: function(f) {
2004
+ f.match(/[a-zA-Z]/gi) && (this.values[this.index] = f, this.index++);
1885
2005
  },
1886
- ".": function(u) {
1887
- k["[0-9a-zA-Z$]+"].call(this, u);
2006
+ ".": function(f) {
2007
+ k["[0-9a-zA-Z$]+"].call(this, f);
1888
2008
  },
1889
- "@": function(u) {
1890
- e(this.values[this.index]) && (this.values[this.index] = ""), this.values[this.index] += u;
2009
+ "@": function(f) {
2010
+ e(this.values[this.index]) && (this.values[this.index] = ""), this.values[this.index] += f;
1891
2011
  }
1892
- }, K = function(u) {
2012
+ }, K = function(f) {
1893
2013
  if (this.type == "general")
1894
2014
  var L = [].concat(s.general);
1895
2015
  else
1896
2016
  var L = [].concat(s.currency, s.datetime, s.percentage, s.scientific, s.numeric, s.text, s.general);
1897
2017
  var J = new RegExp(L.join("|"), "gi");
1898
- return u.match(J);
1899
- }, oe = function(u) {
2018
+ return f.match(J);
2019
+ }, oe = function(f) {
1900
2020
  if (this.type)
1901
2021
  if (this.type == "text")
1902
2022
  var L = ["text"];
@@ -1909,38 +2029,38 @@ function Fr() {
1909
2029
  else var L = Object.keys(s);
1910
2030
  for (var J = 0; J < L.length; J++)
1911
2031
  for (var U = L[J], F = 0; F < s[U].length; F++) {
1912
- var ae = new RegExp(s[U][F], "gi"), I = u.match(ae);
2032
+ var ae = new RegExp(s[U][F], "gi"), I = f.match(ae);
1913
2033
  if (I)
1914
2034
  return { type: U, method: s[U][F] };
1915
2035
  }
1916
- }, H = function(u) {
1917
- for (var L = [], J = 0; J < u.length; J++) {
1918
- var U = oe.call(this, u[J]);
2036
+ }, H = function(f) {
2037
+ for (var L = [], J = 0; J < f.length; J++) {
2038
+ var U = oe.call(this, f[J]);
1919
2039
  U ? L.push(U.method) : L.push(null);
1920
2040
  }
1921
2041
  for (var J = 0; J < L.length; J++)
1922
2042
  L[J] == "MM" && (L[J - 1] && L[J - 1].indexOf("H") >= 0 || L[J - 2] && L[J - 2].indexOf("H") >= 0 || L[J + 1] && L[J + 1].indexOf("S") >= 0 || L[J + 2] && L[J + 2].indexOf("S") >= 0) && (L[J] = "MI");
1923
2043
  return L;
1924
- }, ne = function(u) {
1925
- var L = oe.call(this, u);
2044
+ }, ne = function(f) {
2045
+ var L = oe.call(this, f);
1926
2046
  if (L)
1927
2047
  var J = L.type;
1928
2048
  if (J) {
1929
- for (var U = 0, F = K.call(this, u), ae = 0; ae < F.length; ae++)
2049
+ for (var U = 0, F = K.call(this, f), ae = 0; ae < F.length; ae++)
1930
2050
  L = oe.call(this, F[ae]), L && P(L.type) && U++;
1931
2051
  U > 1 && (J = "general");
1932
2052
  }
1933
2053
  return J;
1934
2054
  }, de = function() {
1935
2055
  typeof k[this.methods[this.index]] == "function" ? (k[this.methods[this.index]].call(this, this.value[this.position]), this.position++) : (this.values[this.index] = this.tokens[this.index], this.index++);
1936
- }, M = function(u) {
1937
- return ("" + +u).replace(
2056
+ }, M = function(f) {
2057
+ return ("" + +f).replace(
1938
2058
  /(-?)(\d*)\.?(\d*)e([+-]\d+)/,
1939
2059
  function(L, J, U, F, ae) {
1940
2060
  return ae < 0 ? J + "0." + Array(1 - ae - U.length).join(0) + U + F : J + U + F + Array(ae - F.length + 1).join(0);
1941
2061
  }
1942
2062
  );
1943
- }, z = function(u, L, J) {
2063
+ }, z = function(f, L, J) {
1944
2064
  var U = null, F = {
1945
2065
  // Element
1946
2066
  input: null,
@@ -1959,10 +2079,10 @@ function Fr() {
1959
2079
  // Raw number for the numeric values
1960
2080
  number: 0
1961
2081
  };
1962
- if (typeof u == "object") {
1963
- if (F.input = u.target, F.value = w.call(u.target), F.caret = t.call(u.target), (U = u.target.getAttribute("data-mask")) && (F.mask = U), (U = u.target.getAttribute("data-type")) && (F.type = U), u.target.mask ? (u.target.mask.options && (F.options = u.target.mask.options), u.target.mask.locale && (F.locale = u.target.mask.locale)) : (U = u.target.getAttribute("data-locale")) && (F.locale = U, F.mask && (F.options.style = F.mask)), u.target.attributes && u.target.attributes.length)
1964
- for (var ae = 0; ae < u.target.attributes.length; ae++) {
1965
- var I = u.target.attributes[ae].name, D = u.target.attributes[ae].value;
2082
+ if (typeof f == "object") {
2083
+ if (F.input = f.target, F.value = w.call(f.target), F.caret = t.call(f.target), (U = f.target.getAttribute("data-mask")) && (F.mask = U), (U = f.target.getAttribute("data-type")) && (F.type = U), f.target.mask ? (f.target.mask.options && (F.options = f.target.mask.options), f.target.mask.locale && (F.locale = f.target.mask.locale)) : (U = f.target.getAttribute("data-locale")) && (F.locale = U, F.mask && (F.options.style = F.mask)), f.target.attributes && f.target.attributes.length)
2084
+ for (var ae = 0; ae < f.target.attributes.length; ae++) {
2085
+ var I = f.target.attributes[ae].name, D = f.target.attributes[ae].value;
1966
2086
  I.substr(0, 4) == "data" && (F.options[I.substr(5)] = D);
1967
2087
  }
1968
2088
  } else {
@@ -1971,7 +2091,7 @@ function Fr() {
1971
2091
  else
1972
2092
  for (var I = Object.keys(L), ae = 0; ae < I.length; ae++)
1973
2093
  F[I[ae]] = L[I[ae]];
1974
- typeof u == "number" && (Q.call(F, F.mask), u = ("" + u).replace(".", F.options.decimal)), F.value = u, F.input && (w.call(F.input, u), $.focus(F.input), F.caret = t.call(F.input));
2094
+ typeof f == "number" && (Q.call(F, F.mask), f = ("" + f).replace(".", F.options.decimal)), F.value = f, F.input && (w.call(F.input, f), $.focus(F.input), F.caret = t.call(F.input));
1975
2095
  }
1976
2096
  if (!m(F.value) && (F.mask || F.locale)) {
1977
2097
  if (F.mask) {
@@ -1981,7 +2101,7 @@ function Fr() {
1981
2101
  }
1982
2102
  if (F.mask.indexOf("##") !== -1) {
1983
2103
  var S = F.mask.split(";");
1984
- S[0] && (typeof u == "object" && (S[0] = S[0].replace(new RegExp(/_\)/g), ""), S[0] = S[0].replace(new RegExp(/_\(/g), "")), S[0] = S[0].replace("*", " "), S[0] = S[0].replace(new RegExp(/_-/g), ""), S[0] = S[0].replace(new RegExp(/_/g), ""), S[0] = S[0].replace(new RegExp(/"/g), ""), S[0] = S[0].replace("##0.###", "##0.000"), S[0] = S[0].replace("##0.##", "##0.00"), S[0] = S[0].replace("##0.#", "##0.0"), S[0] = S[0].replace("##0,###", "##0,000"), S[0] = S[0].replace("##0,##", "##0,00"), S[0] = S[0].replace("##0,#", "##0,0")), F.mask = S[0];
2104
+ S[0] && (typeof f == "object" && (S[0] = S[0].replace(new RegExp(/_\)/g), ""), S[0] = S[0].replace(new RegExp(/_\(/g), "")), S[0] = S[0].replace("*", " "), S[0] = S[0].replace(new RegExp(/_-/g), ""), S[0] = S[0].replace(new RegExp(/_/g), ""), S[0] = S[0].replace(new RegExp(/"/g), ""), S[0] = S[0].replace("##0.###", "##0.000"), S[0] = S[0].replace("##0.##", "##0.00"), S[0] = S[0].replace("##0.#", "##0.0"), S[0] = S[0].replace("##0,###", "##0,000"), S[0] = S[0].replace("##0,##", "##0,00"), S[0] = S[0].replace("##0,#", "##0,0")), F.mask = S[0];
1985
2105
  }
1986
2106
  if (F.mask.indexOf("\\") !== -1) {
1987
2107
  var S = F.mask.split(";");
@@ -1989,14 +2109,14 @@ function Fr() {
1989
2109
  }
1990
2110
  F.type || (F.type = ne.call(F, F.mask)), F.tokens = K.call(F, F.mask);
1991
2111
  }
1992
- if (typeof u != "object" || !u.inputType || !u.inputType.indexOf("insert") || !u.inputType.indexOf("delete"))
2112
+ if (typeof f != "object" || !f.inputType || !f.inputType.indexOf("insert") || !f.inputType.indexOf("delete"))
1993
2113
  if (F.locale)
1994
2114
  if (F.input)
1995
- o.call(F, F.input, u);
2115
+ o.call(F, F.input, f);
1996
2116
  else
1997
2117
  var Y = n.call(F, F.value);
1998
2118
  else {
1999
- for (F.methods = H.call(F, F.tokens), F.event = u; F.position < F.value.length && typeof F.tokens[F.index] < "u"; )
2119
+ for (F.methods = H.call(F, F.tokens), F.event = f; F.position < F.value.length && typeof F.tokens[F.index] < "u"; )
2000
2120
  de.call(F);
2001
2121
  var Y = F.values.join("");
2002
2122
  if (P(F.type) && Y !== "") {
@@ -2027,9 +2147,9 @@ function Fr() {
2027
2147
  return J ? F : Y;
2028
2148
  }
2029
2149
  };
2030
- return z.adjustPrecision = function(u) {
2031
- if (typeof u == "number" && !Number.isInteger(u)) {
2032
- const L = u.toString().split(".");
2150
+ return z.adjustPrecision = function(f) {
2151
+ if (typeof f == "number" && !Number.isInteger(f)) {
2152
+ const L = f.toString().split(".");
2033
2153
  if (L[1] && L[1].length > 10) {
2034
2154
  let J = 0;
2035
2155
  const U = L[1][L[1].length - 2];
@@ -2043,21 +2163,21 @@ function Fr() {
2043
2163
  break;
2044
2164
  }
2045
2165
  if (J)
2046
- return parseFloat(parseFloat(u).toFixed(L[1].length - 1));
2166
+ return parseFloat(parseFloat(f).toFixed(L[1].length - 1));
2047
2167
  }
2048
2168
  }
2049
2169
  }
2050
- return u;
2051
- }, z.getType = ne, z.prepare = function(u, L) {
2052
- return L || (L = {}), K.call(L, u);
2053
- }, z.apply = function(u) {
2054
- var L = w.call(u.target);
2055
- u.key.length == 1 && (L += u.key), w.call(u.target, z(L, u.target.getAttribute("data-mask")));
2056
- }, z.run = function(u, L, J) {
2057
- return z(u, { mask: L, decimal: J });
2058
- }, z.extract = function(u, L, J) {
2059
- if (e(u) || typeof L != "object")
2060
- return u;
2170
+ return f;
2171
+ }, z.getType = ne, z.prepare = function(f, L) {
2172
+ return L || (L = {}), K.call(L, f);
2173
+ }, z.apply = function(f) {
2174
+ var L = w.call(f.target);
2175
+ f.key.length == 1 && (L += f.key), w.call(f.target, z(L, f.target.getAttribute("data-mask")));
2176
+ }, z.run = function(f, L, J) {
2177
+ return z(f, { mask: L, decimal: J });
2178
+ }, z.extract = function(f, L, J) {
2179
+ if (e(f) || typeof L != "object")
2180
+ return f;
2061
2181
  if (L = Object.assign({}, L), L.options || (L.options = {}), !L.mask && L.format && (L.mask = L.format), L.mask) {
2062
2182
  if (L.mask.indexOf(";") !== -1) {
2063
2183
  var U = L.mask.split(";");
@@ -2069,25 +2189,25 @@ function Fr() {
2069
2189
  var F = null, ae = null;
2070
2190
  if (L.type == "percent" || L.options.style == "percent" ? F = "percentage" : L.mask && (F = ne.call(L, L.mask)), F === "text") {
2071
2191
  var I = {};
2072
- ae = u;
2192
+ ae = f;
2073
2193
  } else if (F === "general") {
2074
- var I = z(u, L, !0);
2075
- ae = u;
2194
+ var I = z(f, L, !0);
2195
+ ae = f;
2076
2196
  } else if (F === "datetime") {
2077
- u instanceof Date && (u = z.getDateString(u, L.mask));
2078
- var I = z(u, L, !0);
2079
- $.isNumeric(u) ? ae = u : ae = r.call(I);
2197
+ f instanceof Date && (f = z.getDateString(f, L.mask));
2198
+ var I = z(f, L, !0);
2199
+ $.isNumeric(f) ? ae = f : ae = r.call(I);
2080
2200
  } else if (F === "scientific") {
2081
- ae = u, typeof u == "string" && (ae = Number(ae));
2201
+ ae = f, typeof f == "string" && (ae = Number(ae));
2082
2202
  var I = L;
2083
2203
  } else {
2084
- ae = i.call(L, u), F === "percentage" && ("" + u).indexOf("%") !== -1 && (ae /= 100);
2204
+ ae = i.call(L, f), F === "percentage" && ("" + f).indexOf("%") !== -1 && (ae /= 100);
2085
2205
  var I = L;
2086
2206
  }
2087
2207
  return I.value = ae, !I.type && F && (I.type = F), J ? I : ae;
2088
- }, z.render = function(u, L, J, U) {
2089
- if (e(u) || typeof L != "object")
2090
- return u;
2208
+ }, z.render = function(f, L, J, U) {
2209
+ if (e(f) || typeof L != "object")
2210
+ return f;
2091
2211
  if (L = Object.assign({}, L), L.options || (L.options = {}), !L.mask && L.format && (L.mask = L.format), L.mask) {
2092
2212
  if (L.mask.indexOf(";") !== -1) {
2093
2213
  var F = L.mask.split(";");
@@ -2096,34 +2216,34 @@ function Fr() {
2096
2216
  L.mask = L.mask.replace(new RegExp(/\[h]/), "|h|"), L.mask = L.mask.replace(new RegExp(/\[.*?\]/), ""), L.mask = L.mask.replace(new RegExp(/\|h\|/), "[h]");
2097
2217
  }
2098
2218
  var ae = null;
2099
- L.type == "percent" || L.options.style == "percent" ? ae = "percentage" : L.mask ? ae = ne.call(L, L.mask) : u instanceof Date && (ae = "datetime");
2219
+ L.type == "percent" || L.options.style == "percent" ? ae = "percentage" : L.mask ? ae = ne.call(L, L.mask) : f instanceof Date && (ae = "datetime");
2100
2220
  var I = !1;
2101
2221
  if (ae == "datetime" || L.type == "calendar") {
2102
- var F = z.getDateString(u, L.mask);
2103
- F && (u = F), L.mask && J && (I = !0);
2222
+ var F = z.getDateString(f, L.mask);
2223
+ F && (f = F), L.mask && J && (I = !0);
2104
2224
  } else if (ae === "text")
2105
- typeof u == "number" && (u = u.toString());
2106
- else if (typeof u == "string" && f.isNumeric(u) && (u = Number(u)), ae === "percentage" && (u = z.adjustPrecision(u * 100)), typeof u == "number") {
2225
+ typeof f == "number" && (f = f.toString());
2226
+ else if (typeof f == "string" && u.isNumeric(f) && (f = Number(f)), ae === "percentage" && (f = z.adjustPrecision(f * 100)), typeof f == "number") {
2107
2227
  var F = null;
2108
2228
  if (L.mask && J) {
2109
2229
  var D = Q.call(L, L.mask);
2110
2230
  if (ae === "scientific")
2111
2231
  if (L.mask.indexOf(D) !== -1) {
2112
2232
  let $e = L.mask.split("E");
2113
- $e = $e[0].split(D), $e = "" + $e[1].match(/[0-9]+/g), $e = $e.length, F = u.toExponential($e);
2233
+ $e = $e[0].split(D), $e = "" + $e[1].match(/[0-9]+/g), $e = $e.length, F = f.toExponential($e);
2114
2234
  } else
2115
- F = u.toExponential(0);
2235
+ F = f.toExponential(0);
2116
2236
  else {
2117
2237
  if (L.mask.indexOf(D) !== -1) {
2118
- D = L.mask.split(D), D = "" + D[1].match(/[0-9]+/g), D = D.length, F = u.toFixed(D);
2119
- let $e = u.toString().split("."), ge = $e[1];
2238
+ D = L.mask.split(D), D = "" + D[1].match(/[0-9]+/g), D = D.length, F = f.toFixed(D);
2239
+ let $e = f.toString().split("."), ge = $e[1];
2120
2240
  ge && ge.length > D && ge[ge.length - 1] === "5" && (F = parseFloat($e[0] + "." + ge + "1").toFixed(D));
2121
2241
  } else
2122
- F = u.toFixed(0);
2242
+ F = f.toFixed(0);
2123
2243
  ("" + F).indexOf("e") !== -1 && (F = M(F));
2124
2244
  }
2125
2245
  } else if (L.locale && J) {
2126
- var D = ("" + u).split(".");
2246
+ var D = ("" + f).split(".");
2127
2247
  if (L.options) {
2128
2248
  typeof D[1] > "u" && (D[1] = "");
2129
2249
  var Y = D[1].length;
@@ -2135,51 +2255,51 @@ function Fr() {
2135
2255
  var Y = D[1].length;
2136
2256
  L.options && L.options.maximumFractionDigits < Y && (F = parseFloat(F).toFixed(L.options.maximumFractionDigits));
2137
2257
  } else
2138
- F = M(u);
2139
- F !== null && (u = F, Q.call(L, L.mask), L.options.decimal && (u = u.replace(".", L.options.decimal)));
2258
+ F = M(f);
2259
+ F !== null && (f = F, Q.call(L, L.mask), L.options.decimal && (f = f.replace(".", L.options.decimal)));
2140
2260
  } else
2141
2261
  L.mask && J && (I = !0);
2142
2262
  if (I) {
2143
- var ve = L.mask.length - u.length;
2263
+ var ve = L.mask.length - f.length;
2144
2264
  if (ve > 0)
2145
2265
  for (var S = 0; S < ve; S++)
2146
- u += " ";
2266
+ f += " ";
2147
2267
  }
2148
2268
  if (ae === "scientific")
2149
2269
  if (!J)
2150
- u = M(u);
2270
+ f = M(f);
2151
2271
  else
2152
- return u;
2153
- if (ae === "numeric" && U === !1 && typeof u == "string")
2154
- return u;
2155
- if (u = z(u, L), J && ae === "numeric") {
2272
+ return f;
2273
+ if (ae === "numeric" && U === !1 && typeof f == "string")
2274
+ return f;
2275
+ if (f = z(f, L), J && ae === "numeric") {
2156
2276
  var Ue = L.mask.match(new RegExp(/^[0]+$/gm));
2157
2277
  if (Ue && Ue.length === 1) {
2158
2278
  var Re = Ue[0].length;
2159
2279
  if (Re > 3)
2160
- for (u = "" + u; u.length < Re; )
2161
- u = "0" + u;
2280
+ for (f = "" + f; f.length < Re; )
2281
+ f = "0" + f;
2162
2282
  }
2163
2283
  }
2164
- return u;
2165
- }, z.set = function(u, L) {
2284
+ return f;
2285
+ }, z.set = function(f, L) {
2166
2286
  if (L) {
2167
- u.setAttribute("data-mask", L);
2287
+ f.setAttribute("data-mask", L);
2168
2288
  var J = new Event("input", {
2169
2289
  bubbles: !0,
2170
2290
  cancelable: !0
2171
2291
  });
2172
- u.dispatchEvent(J);
2292
+ f.dispatchEvent(J);
2173
2293
  }
2174
- }, z.extractDateFromString = function(u, L) {
2175
- var J = z(u, { mask: L }, !0);
2176
- if (u > 0 && Number(u) == u && (J.values.join("") !== J.value || J.type == "numeric")) {
2177
- var U = new Date(Math.round((u - 25569) * 86400 * 1e3));
2294
+ }, z.extractDateFromString = function(f, L) {
2295
+ var J = z(f, { mask: L }, !0);
2296
+ if (f > 0 && Number(f) == f && (J.values.join("") !== J.value || J.type == "numeric")) {
2297
+ var U = new Date(Math.round((f - 25569) * 86400 * 1e3));
2178
2298
  return U.getFullYear() + "-" + $.two(U.getMonth()) + "-" + $.two(U.getDate()) + " 00:00:00";
2179
2299
  }
2180
2300
  var F = !1;
2181
2301
  return J.values && J.values.length === J.tokens.length && J.values[J.values.length - 1].length >= J.tokens[J.tokens.length - 1].length && (F = !0), J.date[0] && J.date[1] && (J.date[2] || F) ? (J.date[2] || (J.date[2] = 1), J.date[0] + "-" + $.two(J.date[1]) + "-" + $.two(J.date[2]) + " " + $.two(J.date[3]) + ":" + $.two(J.date[4]) + ":" + $.two(J.date[5])) : "";
2182
- }, z.getDateString = function(u, L) {
2302
+ }, z.getDateString = function(f, L) {
2183
2303
  if (!L)
2184
2304
  var L = {};
2185
2305
  if (L && typeof L == "object") {
@@ -2191,7 +2311,7 @@ function Fr() {
2191
2311
  var J = L;
2192
2312
  if (J || (J = "YYYY-MM-DD"), J.indexOf("[h]") >= 0) {
2193
2313
  var U = 0;
2194
- if (u && $.isNumeric(u) && (U = parseFloat(24 * Number(u)), J.indexOf("mm") >= 0)) {
2314
+ if (f && $.isNumeric(f) && (U = parseFloat(24 * Number(f)), J.indexOf("mm") >= 0)) {
2195
2315
  var F = ("" + U).split(".");
2196
2316
  if (F[1]) {
2197
2317
  var ae = 60 * parseFloat("0." + F[1]);
@@ -2202,14 +2322,14 @@ function Fr() {
2202
2322
  }
2203
2323
  return U;
2204
2324
  }
2205
- u instanceof Date ? u = Be.now(u) : u && $.isNumeric(u) && (u = Be.numToDate(u));
2325
+ f instanceof Date ? f = Be.now(f) : f && $.isNumeric(f) && (f = Be.numToDate(f));
2206
2326
  for (var I = ["DAY", "WD", "DDDD", "DDD", "DD", "D", "Q", "HH24", "HH12", "HH", "H", "AM/PM", "MI", "SS", "MS", "YYYY", "YYY", "YY", "Y", "MONTH", "MON", "MMMMM", "MMMM", "MMM", "MM", "M", "."], D = new RegExp(I.join("|"), "gi"), S = J.match(D), Y = 0; Y < S.length; Y++)
2207
2327
  S[Y].toUpperCase() == "MM" && (S[Y - 1] && S[Y - 1].toUpperCase().indexOf("H") >= 0 || S[Y - 2] && S[Y - 2].toUpperCase().indexOf("H") >= 0 || S[Y + 1] && S[Y + 1].toUpperCase().indexOf("S") >= 0 || S[Y + 2] && S[Y + 2].toUpperCase().indexOf("S") >= 0) && (S[Y] = "mi");
2208
2328
  var ve = {
2209
2329
  tokens: S
2210
2330
  };
2211
- if (u) {
2212
- var ae = "" + u, Ue = ae.indexOf("T") !== -1 ? "T" : " ";
2331
+ if (f) {
2332
+ var ae = "" + f, Ue = ae.indexOf("T") !== -1 ? "T" : " ";
2213
2333
  ae = ae.split(Ue);
2214
2334
  var F = 0, Re = 0, qe = 0;
2215
2335
  ae[1] && (F = ae[1].split(":"), Re = F[1] ? F[1] : 0, qe = F[2] ? F[2] : 0, F = F[0] ? F[0] : 0), ae = ae[0].split("-");
@@ -2221,11 +2341,11 @@ function Fr() {
2221
2341
  at === "YYYY" ? st = this.data[0] : at === "YYY" ? st = this.data[0].substring(1, 4) : at === "YY" ? st = this.data[0].substring(2, 4) : at === "Y" ? st = this.data[0].substring(3, 4) : ot === "MON" ? st = Be.months[$e.getMonth()].substr(0, 3).toUpperCase() : ot === "mon" ? st = Be.months[$e.getMonth()].substr(0, 3).toLowerCase() : ot === "MONTH" ? st = Be.months[$e.getMonth()].toUpperCase() : ot === "month" ? st = Be.months[$e.getMonth()].toLowerCase() : at === "MMMMM" ? st = Be.months[$e.getMonth()].substr(0, 1) : at === "MMMM" || ot === "Month" ? st = Be.months[$e.getMonth()] : at === "MMM" || ot == "Mon" ? st = Be.months[$e.getMonth()].substr(0, 3) : at === "MM" ? st = $.two(this.data[1]) : at === "M" ? st = $e.getMonth() + 1 : ot === "DAY" ? st = Be.weekdays[$e.getDay()].toUpperCase() : ot === "day" ? st = Be.weekdays[$e.getDay()].toLowerCase() : at === "DDDD" || ot == "Day" ? st = Be.weekdays[$e.getDay()] : at === "DDD" ? st = Be.weekdays[$e.getDay()].substr(0, 3) : at === "DD" ? st = $.two(this.data[2]) : at === "D" ? st = parseInt(this.data[2]) : at === "Q" ? st = Math.floor(($e.getMonth() + 3) / 3) : at === "HH24" || at === "HH" ? (st = this.data[3], st > 12 && this.tokens.indexOf("am/pm") !== -1 && (st -= 12), st = $.two(st)) : at === "HH12" ? this.data[3] > 12 ? st = $.two(this.data[3] - 12) : st = $.two(this.data[3]) : at === "H" ? (st = this.data[3], st > 12 && this.tokens.indexOf("am/pm") !== -1 && (st -= 12, st = $.two(st))) : at === "MI" ? st = $.two(this.data[4]) : at === "SS" ? st = $.two(this.data[5]) : at === "MS" ? st = $e.getMilliseconds() : at === "AM/PM" ? this.data[3] >= 12 ? st = "PM" : st = "AM" : at === "WD" && (st = Be.weekdays[$e.getDay()]), st === null ? this.value[ct] = this.tokens[ct] : this.value[ct] = st;
2222
2342
  }, Y = 0; Y < ve.tokens.length; Y++)
2223
2343
  ge.call(ve, Y);
2224
- u = ve.value.join("");
2344
+ f = ve.value.join("");
2225
2345
  } else
2226
- u = "";
2346
+ f = "";
2227
2347
  }
2228
- return u;
2348
+ return f;
2229
2349
  }, z;
2230
2350
  }
2231
2351
  var je = ue();
@@ -2235,7 +2355,7 @@ function Fr() {
2235
2355
  return l.calendar.setOptions(r, !0);
2236
2356
  var e = { type: "calendar" };
2237
2357
  e.options = {}, e.date = null, e.setOptions = function(M, z) {
2238
- var u = {
2358
+ var f = {
2239
2359
  // Render type: [ default | year-month-picker ]
2240
2360
  type: "default",
2241
2361
  // Restrictions
@@ -2282,8 +2402,8 @@ function Fr() {
2282
2402
  // Auto select
2283
2403
  autoSelect: !0
2284
2404
  };
2285
- for (var L in u)
2286
- M && M.hasOwnProperty(L) ? e.options[L] = M[L] : (typeof e.options[L] > "u" || z === !0) && (e.options[L] = u[L]);
2405
+ for (var L in f)
2406
+ M && M.hasOwnProperty(L) ? e.options[L] = M[L] : (typeof e.options[L] > "u" || z === !0) && (e.options[L] = f[L]);
2287
2407
  if (e.options.resetButton == !1 ? n.style.display = "none" : n.style.display = "", e.options.readonly ? l.setAttribute("readonly", "readonly") : l.removeAttribute("readonly"), e.options.placeholder ? l.setAttribute("placeholder", e.options.placeholder) : l.removeAttribute("placeholder"), $.isNumeric(e.options.value) && e.options.value > 0 && (e.options.value = s.numToDate(e.options.value), e.options.dataType = "numeric"), n.innerHTML = e.options.textReset, o.innerHTML = e.options.textDone, oe.innerHTML = e.options.textUpdate, e.options.format && l.setAttribute("data-mask", e.options.format.toLowerCase()), !e.options.value && e.options.today)
2288
2408
  var J = s.now();
2289
2409
  else
@@ -2295,17 +2415,17 @@ function Fr() {
2295
2415
  E.classList.add("jcalendar-fullsize"), ce.slideBottom(t, 1);
2296
2416
  else {
2297
2417
  E.classList.remove("jcalendar-fullsize");
2298
- var z = l.getBoundingClientRect(), u = t.getBoundingClientRect();
2418
+ var z = l.getBoundingClientRect(), f = t.getBoundingClientRect();
2299
2419
  if (e.options.position)
2300
- i.style.position = "fixed", window.innerHeight < z.bottom + u.height ? i.style.top = z.top - (u.height + 2) + "px" : i.style.top = z.top + z.height + 2 + "px", i.style.left = z.left + "px";
2420
+ i.style.position = "fixed", window.innerHeight < z.bottom + f.height ? i.style.top = z.top - (f.height + 2) + "px" : i.style.top = z.top + z.height + 2 + "px", i.style.left = z.left + "px";
2301
2421
  else {
2302
- if (window.innerHeight < z.bottom + u.height) {
2303
- var L = -1 * (z.height + u.height + 2);
2422
+ if (window.innerHeight < z.bottom + f.height) {
2423
+ var L = -1 * (z.height + f.height + 2);
2304
2424
  L + z.top < 0 && (L = -1 * (z.top + z.height)), i.style.top = L + "px";
2305
2425
  } else
2306
2426
  i.style.top = "2px";
2307
- if (window.innerWidth < z.left + u.width) {
2308
- var L = window.innerWidth - (z.left + u.width + 20);
2427
+ if (window.innerWidth < z.left + f.width) {
2428
+ var L = window.innerWidth - (z.left + f.width + 20);
2309
2429
  i.style.left = L + "px";
2310
2430
  } else
2311
2431
  i.style.left = "0px";
@@ -2316,10 +2436,10 @@ function Fr() {
2316
2436
  }, e.close = function(M, z) {
2317
2437
  if (e.options.autoSelect !== !0 && typeof z > "u" && (z = !1), E.classList.contains("jcalendar-focus")) {
2318
2438
  if (z !== !1) {
2319
- var u = E.querySelector(".jcalendar-selected");
2439
+ var f = E.querySelector(".jcalendar-selected");
2320
2440
  if (typeof z == "string")
2321
2441
  var L = z;
2322
- else if (!u || u.classList.contains("jcalendar-disabled"))
2442
+ else if (!f || f.classList.contains("jcalendar-disabled"))
2323
2443
  var L = e.options.value;
2324
2444
  else
2325
2445
  var L = e.getValue();
@@ -2340,8 +2460,8 @@ function Fr() {
2340
2460
  return e.setValue(M), M;
2341
2461
  }, e.setValue = function(M) {
2342
2462
  M || (M = "" + M);
2343
- var z = M, u = e.options.value;
2344
- if (u != z) {
2463
+ var z = M, f = e.options.value;
2464
+ if (f != z) {
2345
2465
  if (z) {
2346
2466
  e.setLabel(z, e.options);
2347
2467
  var J = z.split(" ");
@@ -2366,7 +2486,7 @@ function Fr() {
2366
2486
  var M = "";
2367
2487
  l.classList.remove("jcalendar_warning"), l.title = "";
2368
2488
  }
2369
- e.options.value = z, typeof e.options.onchange == "function" && e.options.onchange(l, z, u), l.value != M && (l.value = M, typeof l.oninput == "function" && l.oninput({
2489
+ e.options.value = z, typeof e.options.onchange == "function" && e.options.onchange(l, z, f), l.value != M && (l.value = M, typeof l.oninput == "function" && l.oninput({
2370
2490
  type: "input",
2371
2491
  target: l,
2372
2492
  value: l.value
@@ -2377,16 +2497,16 @@ function Fr() {
2377
2497
  return e.date ? e.options.time ? $.two(e.date[0]) + "-" + $.two(e.date[1]) + "-" + $.two(e.date[2]) + " " + $.two(e.date[3]) + ":" + $.two(e.date[4]) + ":" + $.two(0) : $.two(e.date[0]) + "-" + $.two(e.date[1]) + "-" + $.two(e.date[2]) + " " + $.two(0) + ":" + $.two(0) + ":" + $.two(0) : "";
2378
2498
  }, e.update = function(M, z) {
2379
2499
  if (!M.classList.contains("jcalendar-disabled")) {
2380
- var u = E.querySelector(".jcalendar-selected");
2381
- u && u.classList.remove("jcalendar-selected"), M.classList.add("jcalendar-selected"), M.classList.contains("jcalendar-set-month") ? (e.date[1] = z, e.date[2] = 1) : e.date[2] = M.innerText, e.options.time ? (e.date[3] = H.value, e.date[4] = ne.value) : e.close(null, !0);
2500
+ var f = E.querySelector(".jcalendar-selected");
2501
+ f && f.classList.remove("jcalendar-selected"), M.classList.add("jcalendar-selected"), M.classList.contains("jcalendar-set-month") ? (e.date[1] = z, e.date[2] = 1) : e.date[2] = M.innerText, e.options.time ? (e.date[3] = H.value, e.date[4] = ne.value) : e.close(null, !0);
2382
2502
  }
2383
2503
  Q();
2384
2504
  }, e.reset = function() {
2385
2505
  e.setValue(""), e.date = null, e.close(!1, !1);
2386
2506
  }, e.getDays = function() {
2387
2507
  e.options.mode = "days";
2388
- var I = /* @__PURE__ */ new Date(), M = e.date && $.isNumeric(e.date[0]) ? e.date[0] : parseInt(I.getFullYear()), z = e.date && $.isNumeric(e.date[1]) ? e.date[1] : parseInt(I.getMonth()) + 1, u = e.date && $.isNumeric(e.date[2]) ? e.date[2] : parseInt(I.getDate()), L = e.date && $.isNumeric(e.date[3]) ? e.date[3] : parseInt(I.getHours()), J = e.date && $.isNumeric(e.date[4]) ? e.date[4] : parseInt(I.getMinutes());
2389
- e.date = [M, z, u, L, J, 0], w.innerHTML = M, R.innerHTML = e.options.months[z - 1];
2508
+ var I = /* @__PURE__ */ new Date(), M = e.date && $.isNumeric(e.date[0]) ? e.date[0] : parseInt(I.getFullYear()), z = e.date && $.isNumeric(e.date[1]) ? e.date[1] : parseInt(I.getMonth()) + 1, f = e.date && $.isNumeric(e.date[2]) ? e.date[2] : parseInt(I.getDate()), L = e.date && $.isNumeric(e.date[3]) ? e.date[3] : parseInt(I.getHours()), J = e.date && $.isNumeric(e.date[4]) ? e.date[4] : parseInt(I.getMinutes());
2509
+ e.date = [M, z, f, L, J, 0], w.innerHTML = M, R.innerHTML = e.options.months[z - 1];
2390
2510
  var U = I.getMonth() == z - 1 && I.getFullYear() == M, F = I.getDate(), I = new Date(M, z, 0, 0, 0), ae = I.getDate(), I = new Date(M, z - 1, 0, 0, 0), D = I.getDay() + 1, Ue = e.options.startingDay || 0;
2391
2511
  D = D - Ue, C.innerHTML = "";
2392
2512
  var S = document.createElement("tr");
@@ -2401,7 +2521,7 @@ function Fr() {
2401
2521
  for (var Y = 0; Y < 7; Y++) {
2402
2522
  var ve = document.createElement("td");
2403
2523
  if (ve.classList.add("jcalendar-set-day"), Ue >= D && Ue < D + ae) {
2404
- Re++, ve.innerHTML = Re, Re == u && ve.classList.add("jcalendar-selected"), U && F == Re && (ve.style.fontWeight = "bold");
2524
+ Re++, ve.innerHTML = Re, Re == f && ve.classList.add("jcalendar-selected"), U && F == Re && (ve.style.fontWeight = "bold");
2405
2525
  var $e = s.now(new Date(M, z - 1, Re), !0);
2406
2526
  if (e.options.validRange) {
2407
2527
  if (!e.options.validRange[0] || $e >= e.options.validRange[0])
@@ -2424,7 +2544,7 @@ function Fr() {
2424
2544
  e.options.mode = "months";
2425
2545
  var M = e.options.months;
2426
2546
  e.options.value;
2427
- var z = /* @__PURE__ */ new Date(), u = parseInt(z.getFullYear()), L = parseInt(z.getMonth()) + 1, J = e.date && $.isNumeric(e.date[0]) ? e.date[0] : u, U = e.date && $.isNumeric(e.date[1]) ? e.date[1] : L;
2547
+ var z = /* @__PURE__ */ new Date(), f = parseInt(z.getFullYear()), L = parseInt(z.getMonth()) + 1, J = e.date && $.isNumeric(e.date[0]) ? e.date[0] : f, U = e.date && $.isNumeric(e.date[1]) ? e.date[1] : L;
2428
2548
  w.innerHTML = e.date[0], R.innerHTML = M[U - 1];
2429
2549
  var F = document.createElement("table");
2430
2550
  F.setAttribute("width", "100%");
@@ -2446,12 +2566,12 @@ function Fr() {
2446
2566
  var ve = !1;
2447
2567
  Y && ve || D.classList.add("jcalendar-disabled");
2448
2568
  }
2449
- I + 1 == U && D.classList.add("jcalendar-selected"), u == J && I + 1 == L && (D.style.fontWeight = "bold"), ae.appendChild(D);
2569
+ I + 1 == U && D.classList.add("jcalendar-selected"), f == J && I + 1 == L && (D.style.fontWeight = "bold"), ae.appendChild(D);
2450
2570
  }
2451
2571
  C.innerHTML = '<tr><td colspan="7"></td></tr>', C.children[0].children[0].appendChild(F), Q();
2452
2572
  }, e.getYears = function() {
2453
2573
  e.options.mode = "years";
2454
- for (var M = /* @__PURE__ */ new Date(), z = M.getFullYear(), u = e.date && $.isNumeric(e.date[0]) ? e.date[0] : parseInt(M.getFullYear()), L = [], J = 0; J < 25; J++)
2574
+ for (var M = /* @__PURE__ */ new Date(), z = M.getFullYear(), f = e.date && $.isNumeric(e.date[0]) ? e.date[0] : parseInt(M.getFullYear()), L = [], J = 0; J < 25; J++)
2455
2575
  L[J] = parseInt(e.date[0]) + (J - 12);
2456
2576
  var U = document.createElement("table");
2457
2577
  U.setAttribute("width", "100%");
@@ -2461,7 +2581,7 @@ function Fr() {
2461
2581
  F.setAttribute("align", "center"), U.appendChild(F);
2462
2582
  }
2463
2583
  var ae = document.createElement("td");
2464
- ae.classList.add("jcalendar-set-year"), ae.innerText = L[J], u == L[J] && ae.classList.add("jcalendar-selected"), z == L[J] && (ae.style.fontWeight = "bold"), F.appendChild(ae);
2584
+ ae.classList.add("jcalendar-set-year"), ae.innerText = L[J], f == L[J] && ae.classList.add("jcalendar-selected"), z == L[J] && (ae.style.fontWeight = "bold"), F.appendChild(ae);
2465
2585
  }
2466
2586
  C.innerHTML = '<tr><td colspan="7"></td></tr>', C.firstChild.firstChild.appendChild(U), Q();
2467
2587
  }, e.setLabel = function(M, z) {
@@ -2472,21 +2592,21 @@ function Fr() {
2472
2592
  var m = function(M) {
2473
2593
  var z = $.findElement(M.target, "jcalendar-container");
2474
2594
  if (z) {
2475
- var u = M.target.className;
2476
- if (u == "jcalendar-prev")
2595
+ var f = M.target.className;
2596
+ if (f == "jcalendar-prev")
2477
2597
  e.prev();
2478
- else if (u == "jcalendar-next")
2598
+ else if (f == "jcalendar-next")
2479
2599
  e.next();
2480
- else if (u == "jcalendar-month")
2600
+ else if (f == "jcalendar-month")
2481
2601
  e.getMonths();
2482
- else if (u == "jcalendar-year")
2602
+ else if (f == "jcalendar-year")
2483
2603
  e.getYears();
2484
- else if (u == "jcalendar-set-year")
2604
+ else if (f == "jcalendar-set-year")
2485
2605
  e.date[0] = M.target.innerText, e.options.type == "year-month-picker" ? e.getMonths() : e.getDays();
2486
2606
  else if (M.target.classList.contains("jcalendar-set-month")) {
2487
2607
  var L = parseInt(M.target.getAttribute("data-value"));
2488
2608
  e.options.type == "year-month-picker" ? e.update(M.target, L) : (e.date[1] = L, e.getDays());
2489
- } else u == "jcalendar-confirm" || u == "jcalendar-update" || u == "jcalendar-close" ? e.close(null, !0) : u == "jcalendar-backdrop" ? e.close(!1, !1) : u == "jcalendar-reset" ? e.reset() : M.target.classList.contains("jcalendar-set-day") && M.target.innerText && e.update(M.target);
2609
+ } else f == "jcalendar-confirm" || f == "jcalendar-update" || f == "jcalendar-close" ? e.close(null, !0) : f == "jcalendar-backdrop" ? e.close(!1, !1) : f == "jcalendar-reset" ? e.reset() : M.target.classList.contains("jcalendar-set-day") && M.target.innerText && e.update(M.target);
2490
2610
  } else
2491
2611
  e.close(!1, !1);
2492
2612
  }, P = function(M) {
@@ -2503,12 +2623,12 @@ function Fr() {
2503
2623
  M.className = "jcalendar-table", t.appendChild(M);
2504
2624
  var z = document.createElement("td");
2505
2625
  z.setAttribute("colspan", "2"), z.className = "jcalendar-prev", w = document.createElement("span"), w.className = "jcalendar-year", R = document.createElement("span"), R.className = "jcalendar-month";
2506
- var u = document.createElement("td");
2507
- u.className = "jcalendar-header", u.setAttribute("colspan", "3"), u.appendChild(R), u.appendChild(w);
2626
+ var f = document.createElement("td");
2627
+ f.className = "jcalendar-header", f.setAttribute("colspan", "3"), f.appendChild(R), f.appendChild(w);
2508
2628
  var L = document.createElement("td");
2509
2629
  L.setAttribute("colspan", "2"), L.className = "jcalendar-next";
2510
2630
  var J = document.createElement("thead"), U = document.createElement("tr");
2511
- U.appendChild(z), U.appendChild(u), U.appendChild(L), J.appendChild(U), B = document.createElement("table"), C = document.createElement("tbody"), B.setAttribute("cellpadding", "0"), B.setAttribute("cellspacing", "0"), B.appendChild(J), B.appendChild(C), M.appendChild(B), H = document.createElement("select"), H.className = "jcalendar-select", H.onchange = function() {
2631
+ U.appendChild(z), U.appendChild(f), U.appendChild(L), J.appendChild(U), B = document.createElement("table"), C = document.createElement("tbody"), B.setAttribute("cellpadding", "0"), B.setAttribute("cellspacing", "0"), B.appendChild(J), B.appendChild(C), M.appendChild(B), H = document.createElement("select"), H.className = "jcalendar-select", H.onchange = function() {
2512
2632
  e.date[3] = this.value, typeof e.options.onupdate == "function" && e.options.onupdate(l, e.getValue());
2513
2633
  };
2514
2634
  for (var F = 0; F < 24; F++) {
@@ -2826,7 +2946,7 @@ function Fr() {
2826
2946
  var r = { type: "color" };
2827
2947
  r.options = {};
2828
2948
  var e = null, m = null, P = null, Q = null, E = null, n = null, o = null;
2829
- r.setOptions = function(u, L) {
2949
+ r.setOptions = function(f, L) {
2830
2950
  var J = {
2831
2951
  placeholder: "",
2832
2952
  value: null,
@@ -2841,28 +2961,28 @@ function Fr() {
2841
2961
  fullscreen: !1,
2842
2962
  opened: !1
2843
2963
  };
2844
- u || (u = {}), u && !u.palette && (u.palette = Ce());
2964
+ f || (f = {}), f && !f.palette && (f.palette = Ce());
2845
2965
  for (var U in J)
2846
- u && u.hasOwnProperty(U) ? r.options[U] = u[U] : (typeof r.options[U] > "u" || L === !0) && (r.options[U] = J[U]);
2966
+ f && f.hasOwnProperty(U) ? r.options[U] = f[U] : (typeof r.options[U] > "u" || L === !0) && (r.options[U] = J[U]);
2847
2967
  return Q && (Q.innerHTML = r.options.resetLabel), E && (E.innerHTML = r.options.doneLabel), r.options.palette && o && o.updateContent(0, B()), typeof r.options.value == "string" && (s.value = r.options.value, s.tagName === "INPUT" && (s.style.color = s.value, s.style.backgroundColor = s.value)), r.options.placeholder ? s.setAttribute("placeholder", r.options.placeholder) : s.getAttribute("placeholder") && s.removeAttribute("placeholder"), r;
2848
- }, r.select = function(u) {
2968
+ }, r.select = function(f) {
2849
2969
  var L = e.querySelector(".jcolor-selected");
2850
- L && L.classList.remove("jcolor-selected"), r.values[u] && r.values[u].classList.add("jcolor-selected"), r.options.value = u;
2970
+ L && L.classList.remove("jcolor-selected"), r.values[f] && r.values[f].classList.add("jcolor-selected"), r.options.value = f;
2851
2971
  }, r.open = function() {
2852
2972
  if (!e.classList.contains("jcolor-focus")) {
2853
2973
  W(r, !0), e.classList.add("jcolor-focus"), r.options.value && r.select(r.options.value), P.style.marginTop = "", P.style.marginLeft = "";
2854
- var u = P.getBoundingClientRect(), L = $.getWindowWidth(), J = $.getWindowHeight();
2855
- if (L < 800 || r.options.fullscreen == !0 ? (P.classList.add("jcolor-fullscreen"), ce.slideBottom(P, 1), m.style.display = "block") : (P.classList.contains("jcolor-fullscreen") && (P.classList.remove("jcolor-fullscreen"), m.style.display = ""), r.options.position ? P.style.position = "fixed" : P.style.position = "", u.left + u.width > L && (P.style.marginLeft = -1 * (u.left + u.width - (L - 20)) + "px"), u.top + u.height > J && (P.style.marginTop = -1 * (u.top + u.height - (J - 20)) + "px")), typeof r.options.onopen == "function" && r.options.onopen(s, r), o.setBorder(o.getActive()), r.options.value) {
2974
+ var f = P.getBoundingClientRect(), L = $.getWindowWidth(), J = $.getWindowHeight();
2975
+ if (L < 800 || r.options.fullscreen == !0 ? (P.classList.add("jcolor-fullscreen"), ce.slideBottom(P, 1), m.style.display = "block") : (P.classList.contains("jcolor-fullscreen") && (P.classList.remove("jcolor-fullscreen"), m.style.display = ""), r.options.position ? P.style.position = "fixed" : P.style.position = "", f.left + f.width > L && (P.style.marginLeft = -1 * (f.left + f.width - (L - 20)) + "px"), f.top + f.height > J && (P.style.marginTop = -1 * (f.top + f.height - (J - 20)) + "px")), typeof r.options.onopen == "function" && r.options.onopen(s, r), o.setBorder(o.getActive()), r.options.value) {
2856
2976
  var U = R(r.options.value);
2857
2977
  ne.forEach(function(F, ae) {
2858
2978
  F.value = U[ae], F.dispatchEvent(new Event("input"));
2859
2979
  });
2860
2980
  }
2861
2981
  }
2862
- }, r.close = function(u) {
2863
- return e.classList.contains("jcolor-focus") && (e.classList.remove("jcolor-focus"), m.style.display = "", !u && typeof r.options.onclose == "function" && r.options.onclose(s, r), W(r, !1)), r.options.value;
2864
- }, r.setValue = function(u) {
2865
- u || (u = ""), u != r.options.value && (r.options.value = u, H = u, r.select(u), typeof r.options.onchange == "function" && r.options.onchange(s, u, r), s.value != r.options.value && (s.value = r.options.value, s.tagName === "INPUT" && (s.style.color = s.value, s.style.backgroundColor = s.value), typeof s.oninput == "function" && s.oninput({
2982
+ }, r.close = function(f) {
2983
+ return e.classList.contains("jcolor-focus") && (e.classList.remove("jcolor-focus"), m.style.display = "", !f && typeof r.options.onclose == "function" && r.options.onclose(s, r), W(r, !1)), r.options.value;
2984
+ }, r.setValue = function(f) {
2985
+ f || (f = ""), f != r.options.value && (r.options.value = f, H = f, r.select(f), typeof r.options.onchange == "function" && r.options.onchange(s, f, r), s.value != r.options.value && (s.value = r.options.value, s.tagName === "INPUT" && (s.style.color = s.value, s.style.backgroundColor = s.value), typeof s.oninput == "function" && s.oninput({
2866
2986
  type: "input",
2867
2987
  target: s,
2868
2988
  value: s.value
@@ -2870,18 +2990,18 @@ function Fr() {
2870
2990
  }, r.getValue = function() {
2871
2991
  return r.options.value;
2872
2992
  };
2873
- var i = function(u) {
2874
- var L = u.toString(16);
2993
+ var i = function(f) {
2994
+ var L = f.toString(16);
2875
2995
  return L.length === 1 ? "0" + L : L;
2876
- }, t = function(u, L, J) {
2877
- return "#" + i(u) + i(L) + i(J);
2878
- }, w = function(u) {
2879
- return parseInt("0x" + u);
2880
- }, R = function(u) {
2881
- return [w(u.substr(1, 2)), w(u.substr(3, 2)), w(u.substr(5, 2))];
2996
+ }, t = function(f, L, J) {
2997
+ return "#" + i(f) + i(L) + i(J);
2998
+ }, w = function(f) {
2999
+ return parseInt("0x" + f);
3000
+ }, R = function(f) {
3001
+ return [w(f.substr(1, 2)), w(f.substr(3, 2)), w(f.substr(5, 2))];
2882
3002
  }, B = function() {
2883
- var u = document.createElement("div");
2884
- u.className = "jcolor-grid", r.values = [];
3003
+ var f = document.createElement("div");
3004
+ f.className = "jcolor-grid", r.values = [];
2885
3005
  var L = document.createElement("table");
2886
3006
  L.setAttribute("cellpadding", "7"), L.setAttribute("cellspacing", "0");
2887
3007
  for (var J = 0; J < r.options.palette.length; J++) {
@@ -2891,48 +3011,48 @@ function Fr() {
2891
3011
  }
2892
3012
  L.appendChild(U);
2893
3013
  }
2894
- return u.appendChild(L), u;
3014
+ return f.appendChild(L), f;
2895
3015
  }, C = document.createElement("canvas");
2896
3016
  C.width = 200, C.height = 160;
2897
3017
  var v = C.getContext("2d"), k = function() {
2898
- var u = n.firstChild.getBoundingClientRect();
2899
- C.width = u.width - 14, K();
3018
+ var f = n.firstChild.getBoundingClientRect();
3019
+ C.width = f.width - 14, K();
2900
3020
  }, K = function() {
2901
- var u = v.createLinearGradient(0, 0, C.width, 0);
2902
- u.addColorStop(0, "rgb(255,0,0)"), u.addColorStop(0.15, "rgb(255,0,255)"), u.addColorStop(0.33, "rgb(0,0,255)"), u.addColorStop(0.49, "rgb(0,255,255)"), u.addColorStop(0.67, "rgb(0,255,0)"), u.addColorStop(0.84, "rgb(255,255,0)"), u.addColorStop(1, "rgb(255,0,0)"), v.fillStyle = u, v.fillRect(0, 0, C.width, C.height), u = v.createLinearGradient(0, 0, 0, C.height), u.addColorStop(0, "rgba(255,255,255,1)"), u.addColorStop(0.5, "rgba(255,255,255,0)"), u.addColorStop(0.5, "rgba(0,0,0,0)"), u.addColorStop(1, "rgba(0,0,0,1)"), v.fillStyle = u, v.fillRect(0, 0, C.width, C.height);
3021
+ var f = v.createLinearGradient(0, 0, C.width, 0);
3022
+ f.addColorStop(0, "rgb(255,0,0)"), f.addColorStop(0.15, "rgb(255,0,255)"), f.addColorStop(0.33, "rgb(0,0,255)"), f.addColorStop(0.49, "rgb(0,255,255)"), f.addColorStop(0.67, "rgb(0,255,0)"), f.addColorStop(0.84, "rgb(255,255,0)"), f.addColorStop(1, "rgb(255,0,0)"), v.fillStyle = f, v.fillRect(0, 0, C.width, C.height), f = v.createLinearGradient(0, 0, 0, C.height), f.addColorStop(0, "rgba(255,255,255,1)"), f.addColorStop(0.5, "rgba(255,255,255,0)"), f.addColorStop(0.5, "rgba(0,0,0,0)"), f.addColorStop(1, "rgba(0,0,0,1)"), v.fillStyle = f, v.fillRect(0, 0, C.width, C.height);
2903
3023
  }, oe = function() {
2904
- var u = document.createElement("div");
2905
- u.className = "jcolor-hsl";
3024
+ var f = document.createElement("div");
3025
+ f.className = "jcolor-hsl";
2906
3026
  var L = document.createElement("div");
2907
3027
  L.className = "jcolor-point";
2908
3028
  var J = document.createElement("div");
2909
- J.appendChild(C), J.appendChild(L), u.appendChild(J);
3029
+ J.appendChild(C), J.appendChild(L), f.appendChild(J);
2910
3030
  var U = function(F, ae, I) {
2911
3031
  if (F === 1) {
2912
- var D = u.getBoundingClientRect(), S = ae - D.left, Y = I - D.top;
3032
+ var D = f.getBoundingClientRect(), S = ae - D.left, Y = I - D.top;
2913
3033
  S < 0 && (S = 0), Y < 0 && (Y = 0), S > D.width && (S = D.width), Y > D.height && (Y = D.height), L.style.left = S + "px", L.style.top = Y + "px";
2914
3034
  var ve = v.getImageData(S, Y, 1, 1).data;
2915
3035
  H = t(ve[0], ve[1], ve[2]);
2916
3036
  }
2917
3037
  };
2918
- return u.addEventListener("mousedown", function(F) {
3038
+ return f.addEventListener("mousedown", function(F) {
2919
3039
  U(F.buttons, F.clientX, F.clientY);
2920
- }), u.addEventListener("mousemove", function(F) {
3040
+ }), f.addEventListener("mousemove", function(F) {
2921
3041
  U(F.buttons, F.clientX, F.clientY);
2922
- }), u.addEventListener("touchmove", function(F) {
3042
+ }), f.addEventListener("touchmove", function(F) {
2923
3043
  U(1, F.changedTouches[0].clientX, F.changedTouches[0].clientY);
2924
- }), u;
3044
+ }), f;
2925
3045
  }, H = "", ne = [], de = function() {
2926
3046
  if (H !== "")
2927
- for (var u = 0; u < ne.length; u++) {
3047
+ for (var f = 0; f < ne.length; f++) {
2928
3048
  var L = R(H);
2929
- L[u] = 0;
3049
+ L[f] = 0;
2930
3050
  var J = "linear-gradient(90deg, rgb(";
2931
- J += L.join(", "), J += "), rgb(", L[u] = 255, J += L.join(", "), J += "))", ne[u].style.backgroundImage = J;
3051
+ J += L.join(", "), J += "), rgb(", L[f] = 255, J += L.join(", "), J += "))", ne[f].style.backgroundImage = J;
2932
3052
  }
2933
3053
  }, M = function() {
2934
- var u = document.createElement("div");
2935
- u.className = "jcolor-sliders";
3054
+ var f = document.createElement("div");
3055
+ f.className = "jcolor-sliders";
2936
3056
  var L = document.createElement("div"), J = function(I) {
2937
3057
  var D = document.createElement("div");
2938
3058
  D.className = "jcolor-sliders-input-container";
@@ -2951,7 +3071,7 @@ function Fr() {
2951
3071
  J("Red"),
2952
3072
  J("Green"),
2953
3073
  J("Blue")
2954
- ], u.appendChild(L);
3074
+ ], f.appendChild(L);
2955
3075
  var U = document.createElement("div");
2956
3076
  U.className = "jcolor-sliders-final-color";
2957
3077
  var F = document.createElement("div");
@@ -2964,11 +3084,11 @@ function Fr() {
2964
3084
  I.addEventListener("input", function() {
2965
3085
  ae(), de();
2966
3086
  });
2967
- }), u.appendChild(U), u;
3087
+ }), f.appendChild(U), f;
2968
3088
  }, z = function() {
2969
3089
  r.setOptions(l), s.tagName == "INPUT" && (s.classList.add("jcolor-input"), s.readOnly = !0), e = document.createElement("div"), e.className = "jcolor", m = document.createElement("div"), m.className = "jcolor-backdrop", e.appendChild(m), P = document.createElement("div"), P.className = "jcolor-content";
2970
- var u = document.createElement("div");
2971
- u.className = "jcolor-controls", P.appendChild(u), Q = document.createElement("div"), Q.className = "jcolor-reset", Q.innerHTML = r.options.resetLabel, u.appendChild(Q), E = document.createElement("div"), E.className = "jcolor-close", E.innerHTML = r.options.doneLabel, u.appendChild(E), n = document.createElement("div"), P.appendChild(n), o = Ne(n, {
3090
+ var f = document.createElement("div");
3091
+ f.className = "jcolor-controls", P.appendChild(f), Q = document.createElement("div"), Q.className = "jcolor-reset", Q.innerHTML = r.options.resetLabel, f.appendChild(Q), E = document.createElement("div"), E.className = "jcolor-close", E.innerHTML = r.options.doneLabel, f.appendChild(E), n = document.createElement("div"), P.appendChild(n), o = Ne(n, {
2972
3092
  animation: !0,
2973
3093
  data: [
2974
3094
  {
@@ -3013,12 +3133,12 @@ function Fr() {
3013
3133
  r.setValue(L);
3014
3134
  }, s.color = r, e.color = r;
3015
3135
  };
3016
- return r.toHex = function(u) {
3136
+ return r.toHex = function(f) {
3017
3137
  var L = function(J) {
3018
3138
  return ("0" + parseInt(J).toString(16)).slice(-2);
3019
3139
  };
3020
- if (u)
3021
- return /^#[0-9A-F]{6}$/i.test(u) ? u : (u = u.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/), u && u.length ? "#" + L(u[1]) + L(u[2]) + L(u[3]) : "");
3140
+ if (f)
3141
+ return /^#[0-9A-F]{6}$/i.test(f) ? f : (f = f.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/), f && f.length ? "#" + L(f[1]) + L(f[2]) + L(f[3]) : "");
3022
3142
  }, z(), r;
3023
3143
  }
3024
3144
  function Fe() {
@@ -3129,8 +3249,8 @@ function Fr() {
3129
3249
  var m = function(M, z) {
3130
3250
  M && M.length && (e.options.sortResults !== !1 && (typeof e.options.sortResults == "function" ? M.sort(e.options.sortResults) : M.sort(P)), e.setData(M)), typeof e.options.onload == "function" && e.options.onload(l, e, M, z), z && E(z), z == null && (e.options.value = ""), l.value = e.options.value, e.options.opened == !0 && e.open();
3131
3251
  }, P = function(M, z) {
3132
- var u, L;
3133
- return typeof M == "string" ? u = M : M.text ? u = M.text : M.name && (u = M.name), typeof z == "string" ? L = z : z.text ? L = z.text : z.name && (L = z.name), typeof u == "string" || typeof L == "string" ? (typeof u != "string" && (u = "" + u), typeof L != "string" && (L = "" + L), u.localeCompare(L)) : u - L;
3252
+ var f, L;
3253
+ return typeof M == "string" ? f = M : M.text ? f = M.text : M.name && (f = M.name), typeof z == "string" ? L = z : z.text ? L = z.text : z.name && (L = z.name), typeof f == "string" || typeof L == "string" ? (typeof f != "string" && (f = "" + f), typeof L != "string" && (L = "" + L), f.localeCompare(L)) : f - L;
3134
3254
  }, Q = function() {
3135
3255
  e.value = {};
3136
3256
  for (var M = 0; M < e.items.length; M++)
@@ -3150,26 +3270,26 @@ function Fr() {
3150
3270
  e.options.value = Object.keys(e.value).join(";"), e.header.value = e.getText();
3151
3271
  }, n = function(M, z) {
3152
3272
  if (e.options.format)
3153
- var u = "id";
3273
+ var f = "id";
3154
3274
  else
3155
- var u = "value";
3156
- return e.items[M] ? e.items[M].data[u] : "";
3275
+ var f = "value";
3276
+ return e.items[M] ? e.items[M].data[f] : "";
3157
3277
  }, o = function(M, z) {
3158
3278
  if (e.options.format)
3159
- var u = "name";
3279
+ var f = "name";
3160
3280
  else
3161
- var u = "text";
3162
- return e.items[M] ? e.items[M].data[u] : "";
3281
+ var f = "text";
3282
+ return e.items[M] ? e.items[M].data[f] : "";
3163
3283
  }, i = function() {
3164
3284
  return Object.keys(e.value);
3165
3285
  }, t = function() {
3166
- for (var M = [], z = Object.keys(e.value), u = 0; u < z.length; u++)
3167
- M.push(e.value[z[u]]);
3286
+ for (var M = [], z = Object.keys(e.value), f = 0; f < z.length; f++)
3287
+ M.push(e.value[z[f]]);
3168
3288
  return M;
3169
3289
  };
3170
3290
  e.setOptions = function(M, z) {
3171
3291
  M || (M = {});
3172
- var u = {
3292
+ var f = {
3173
3293
  url: null,
3174
3294
  data: [],
3175
3295
  format: 0,
@@ -3200,8 +3320,8 @@ function Fr() {
3200
3320
  prompt: null,
3201
3321
  allowEmpty: !0
3202
3322
  };
3203
- for (var L in u)
3204
- M && M.hasOwnProperty(L) ? e.options[L] = M[L] : (typeof e.options[L] > "u" || z === !0) && (e.options[L] = u[L]);
3323
+ for (var L in f)
3324
+ M && M.hasOwnProperty(L) ? e.options[L] = M[L] : (typeof e.options[L] > "u" || z === !0) && (e.options[L] = f[L]);
3205
3325
  return (e.options.remoteSearch == !0 || e.options.type === "searchbar") && (e.options.autocomplete = !0), e.options.newOptions == !0 ? e.header.classList.add("jdropdown-add") : e.header.classList.remove("jdropdown-add"), e.options.autocomplete == !0 ? e.header.removeAttribute("readonly") : e.header.setAttribute("readonly", "readonly"), e.options.placeholder ? e.header.setAttribute("placeholder", e.options.placeholder) : e.header.removeAttribute("placeholder"), l.classList.remove("jdropdown-searchbar"), l.classList.remove("jdropdown-picker"), l.classList.remove("jdropdown-list"), e.options.type == "searchbar" ? l.classList.add("jdropdown-searchbar") : e.options.type == "list" ? l.classList.add("jdropdown-list") : e.options.type == "picker" ? l.classList.add("jdropdown-picker") : $.getWindowWidth() < 800 ? e.options.autocomplete ? (l.classList.add("jdropdown-searchbar"), e.options.type = "searchbar") : (l.classList.add("jdropdown-picker"), e.options.type = "picker") : (e.options.width ? (l.style.width = e.options.width, l.style.minWidth = e.options.width) : (l.style.removeProperty("width"), l.style.removeProperty("min-width")), l.classList.add("jdropdown-default"), e.options.type = "default"), e.options.type == "searchbar" ? w.appendChild(C) : R.insertBefore(C, R.firstChild), e.options.url && !M.data ? Ee({
3206
3326
  url: e.options.url,
3207
3327
  method: "GET",
@@ -3244,16 +3364,16 @@ function Fr() {
3244
3364
  url: e.options.url,
3245
3365
  method: "GET",
3246
3366
  dataType: "json",
3247
- success: function(u) {
3248
- e.setData(u), typeof z == "function" && z(e);
3367
+ success: function(f) {
3368
+ e.setData(f), typeof z == "function" && z(e);
3249
3369
  }
3250
3370
  });
3251
3371
  }, e.setId = function(M, z) {
3252
3372
  if (e.options.format)
3253
- var u = "id";
3373
+ var f = "id";
3254
3374
  else
3255
- var u = "value";
3256
- typeof M == "object" ? M[u] = z : e.items[M].data[u] = z;
3375
+ var f = "value";
3376
+ typeof M == "object" ? M[f] = z : e.items[M].data[f] = z;
3257
3377
  };
3258
3378
  const H = function(M, z) {
3259
3379
  if (!M) {
@@ -3262,28 +3382,28 @@ function Fr() {
3262
3382
  return !1;
3263
3383
  }
3264
3384
  if (z || (z = $.guid()), e.options.format)
3265
- var u = {
3385
+ var f = {
3266
3386
  id: z,
3267
3387
  name: M
3268
3388
  };
3269
3389
  else
3270
- var u = {
3390
+ var f = {
3271
3391
  value: z,
3272
3392
  text: M
3273
3393
  };
3274
3394
  if (typeof e.options.onbeforeinsert == "function") {
3275
- let J = e.options.onbeforeinsert(e, u);
3395
+ let J = e.options.onbeforeinsert(e, f);
3276
3396
  if (J === !1)
3277
3397
  return !1;
3278
- J && (u = J);
3398
+ J && (f = J);
3279
3399
  }
3280
- e.options.data.push(u);
3281
- var L = e.createItem(u);
3282
- return B.appendChild(L.element), typeof e.options.oninsert == "function" && e.options.oninsert(e, u, L), B.style.display == "none" && (B.style.display = ""), e.results && e.results.push(L), u;
3400
+ e.options.data.push(f);
3401
+ var L = e.createItem(f);
3402
+ return B.appendChild(L.element), typeof e.options.oninsert == "function" && e.options.oninsert(e, f, L), B.style.display == "none" && (B.style.display = ""), e.results && e.results.push(L), f;
3283
3403
  };
3284
3404
  e.add = function(M, z) {
3285
3405
  return typeof e.options.prompt == "function" ? e.options.prompt.call(e, H) : H(M, z);
3286
- }, e.createItem = function(M, z, u) {
3406
+ }, e.createItem = function(M, z, f) {
3287
3407
  e.options.format ? (!M.id && M.value !== void 0 && (M.id = M.value), !M.name && M.text !== void 0 && (M.name = M.text)) : (!M.value && M.id !== void 0 && (M.value = M.id), !M.text && M.name !== void 0 && (M.text = M.name));
3288
3408
  var L = {};
3289
3409
  if (L.element = document.createElement("div"), L.element.className = "jdropdown-item", L.element.indexValue = e.items.length, L.data = M, z && (L.group = z), M.id && L.element.setAttribute("id", M.id), M.disabled == !0 && L.element.setAttribute("data-disabled", !0), M.tooltip && L.element.setAttribute("title", M.tooltip), M.image) {
@@ -3312,9 +3432,9 @@ function Fr() {
3312
3432
  return e.value[S] && (L.element.classList.add("jdropdown-selected"), L.selected = !0), e.items.push(L), L.element.appendChild(I), L;
3313
3433
  }, e.appendData = function(M) {
3314
3434
  if (M.length) {
3315
- for (var z = [], u = [], L = 0; L < M.length; L++)
3316
- M[L].group ? (u[M[L].group] || (u[M[L].group] = []), u[M[L].group].push(L)) : z.push(L);
3317
- var J = 0, U = Object.keys(u);
3435
+ for (var z = [], f = [], L = 0; L < M.length; L++)
3436
+ M[L].group ? (f[M[L].group] || (f[M[L].group] = []), f[M[L].group].push(L)) : z.push(L);
3437
+ var J = 0, U = Object.keys(f);
3318
3438
  if (U.length > 0)
3319
3439
  for (var L = 0; L < U.length; L++) {
3320
3440
  var F = document.createElement("div");
@@ -3325,8 +3445,8 @@ function Fr() {
3325
3445
  I.className = "jdropdown-group-arrow jdropdown-group-arrow-down", ae.appendChild(I);
3326
3446
  var D = document.createElement("div");
3327
3447
  D.className = "jdropdown-group-items";
3328
- for (var S = 0; S < u[U[L]].length; S++) {
3329
- var Y = e.createItem(M[u[U[L]][S]], F, U[L]);
3448
+ for (var S = 0; S < f[U[L]].length; S++) {
3449
+ var Y = e.createItem(M[f[U[L]][S]], F, U[L]);
3330
3450
  (e.options.lazyLoading == !1 || J < 200) && (D.appendChild(Y.element), J++);
3331
3451
  }
3332
3452
  F.appendChild(ae), F.appendChild(D), e.groups.push(F), D.children.length > 0 && B.appendChild(F);
@@ -3377,24 +3497,24 @@ function Fr() {
3377
3497
  Array.isArray(M) && (M = M.join(";")), z !== M && (E(M), ne(z));
3378
3498
  }, e.resetSelected = function() {
3379
3499
  e.setValue(null);
3380
- }, e.selectIndex = function(u, z) {
3381
- var u = parseInt(u);
3382
- if (e.items && e.items[u] && (z === !0 || e.items[u].data.disabled !== !0))
3383
- if (e.setCursor(u, !1), !e.options.multiple)
3384
- e.items[u].selected ? e.options.allowEmpty !== !1 && e.setValue(null) : e.setValue(n(u)), e.close();
3500
+ }, e.selectIndex = function(f, z) {
3501
+ var f = parseInt(f);
3502
+ if (e.items && e.items[f] && (z === !0 || e.items[f].data.disabled !== !0))
3503
+ if (e.setCursor(f, !1), !e.options.multiple)
3504
+ e.items[f].selected ? e.options.allowEmpty !== !1 && e.setValue(null) : e.setValue(n(f)), e.close();
3385
3505
  else {
3386
3506
  var L = e.options.value;
3387
- e.items[u].selected ? (e.items[u].element.classList.remove("jdropdown-selected"), e.items[u].selected = !1, delete e.value[n(u)]) : (e.items[u].element.classList.add("jdropdown-selected"), e.items[u].selected = !0, e.value[n(u)] = o(u)), e.options.value = Object.keys(e.value).join(";"), e.options.autocomplete == !1 && (e.header.value = t().join("; ")), ne(L);
3507
+ e.items[f].selected ? (e.items[f].element.classList.remove("jdropdown-selected"), e.items[f].selected = !1, delete e.value[n(f)]) : (e.items[f].element.classList.add("jdropdown-selected"), e.items[f].selected = !0, e.value[n(f)] = o(f)), e.options.value = Object.keys(e.value).join(";"), e.options.autocomplete == !1 && (e.header.value = t().join("; ")), ne(L);
3388
3508
  }
3389
3509
  }, e.selectItem = function(M) {
3390
3510
  e.selectIndex(M.indexValue);
3391
3511
  };
3392
3512
  var de = function(M, z) {
3393
- for (var u = 0; u < z.length; u++)
3513
+ for (var f = 0; f < z.length; f++)
3394
3514
  if (e.options.format) {
3395
- if (z[u].id == M)
3515
+ if (z[f].id == M)
3396
3516
  return !0;
3397
- } else if (z[u].value == M)
3517
+ } else if (z[f].value == M)
3398
3518
  return !0;
3399
3519
  return !1;
3400
3520
  };
@@ -3406,9 +3526,9 @@ function Fr() {
3406
3526
  e.groups[z].lastChild.textContent = "";
3407
3527
  if (B.textContent = "", e.options.remoteSearch == !0) {
3408
3528
  e.results = null;
3409
- var u = e.options.url;
3529
+ var f = e.options.url;
3410
3530
  let D = {
3411
- url: u,
3531
+ url: f,
3412
3532
  method: "GET",
3413
3533
  data: { q: M },
3414
3534
  dataType: "json",
@@ -3454,8 +3574,8 @@ function Fr() {
3454
3574
  z !== !1 && e.setCursor(z);
3455
3575
  }
3456
3576
  if (!e.options.type || e.options.type == "default") {
3457
- var u = l.getBoundingClientRect(), L = R.getBoundingClientRect();
3458
- e.options.position ? (R.style.position = "fixed", window.innerHeight < u.bottom + L.height ? (R.style.top = "", R.style.bottom = window.innerHeight - u.top + 1 + "px") : (R.style.top = u.bottom + "px", R.style.bottom = ""), R.style.left = u.left + "px") : window.innerHeight < u.bottom + L.height ? (R.style.top = "", R.style.bottom = u.height + 1 + "px") : (R.style.top = "", R.style.bottom = ""), R.style.minWidth = u.width + "px", e.options.maxWidth && (R.style.maxWidth = e.options.maxWidth), !e.items.length && e.options.autocomplete == !0 ? B.style.display = "none" : B.style.display = "";
3577
+ var f = l.getBoundingClientRect(), L = R.getBoundingClientRect();
3578
+ e.options.position ? (R.style.position = "fixed", window.innerHeight < f.bottom + L.height ? (R.style.top = "", R.style.bottom = window.innerHeight - f.top + 1 + "px") : (R.style.top = f.bottom + "px", R.style.bottom = ""), R.style.left = f.left + "px") : window.innerHeight < f.bottom + L.height ? (R.style.top = "", R.style.bottom = f.height + 1 + "px") : (R.style.top = "", R.style.bottom = ""), R.style.minWidth = f.width + "px", e.options.maxWidth && (R.style.maxWidth = e.options.maxWidth), !e.items.length && e.options.autocomplete == !0 ? B.style.display = "none" : B.style.display = "";
3459
3579
  }
3460
3580
  }
3461
3581
  typeof e.options.onopen == "function" && e.options.onopen(l);
@@ -3466,8 +3586,8 @@ function Fr() {
3466
3586
  e.currentIndex = null;
3467
3587
  else if (M = parseInt(M), e.items[M].element.parentNode && (e.items[M].element.classList.add("jdropdown-cursor"), e.currentIndex = M, z !== !1 && e.items[e.currentIndex].element)) {
3468
3588
  B.scrollTop;
3469
- var u = e.items[e.currentIndex].element;
3470
- B.scrollTop = u.offsetTop - u.scrollTop + u.clientTop - 95;
3589
+ var f = e.items[e.currentIndex].element;
3590
+ B.scrollTop = f.offsetTop - f.scrollTop + f.clientTop - 95;
3471
3591
  }
3472
3592
  }, e.resetCursor = e.setCursor, e.updateCursor = e.setCursor, e.reset = function() {
3473
3593
  e.setCursor(), e.setValue(null);
@@ -3489,12 +3609,12 @@ function Fr() {
3489
3609
  var z = null;
3490
3610
  if (M) {
3491
3611
  if (M.length == 1) {
3492
- var u = e.currentIndex || -1;
3612
+ var f = e.currentIndex || -1;
3493
3613
  M = M.toLowerCase();
3494
3614
  var L = null, J = null, U = B.querySelectorAll(".jdropdown-item");
3495
3615
  if (U.length) {
3496
3616
  for (var F = 0; F < U.length; F++)
3497
- if (U[F].indexValue > u && (L = e.items[U[F].indexValue]) && (J = L.element.innerText[0]) && (J = J.toLowerCase(), M == J)) {
3617
+ if (U[F].indexValue > f && (L = e.items[U[F].indexValue]) && (J = L.element.innerText[0]) && (J = J.toLowerCase(), M == J)) {
3498
3618
  z = U[F].indexValue;
3499
3619
  break;
3500
3620
  }
@@ -3512,8 +3632,8 @@ function Fr() {
3512
3632
  if (e.currentIndex === null)
3513
3633
  e.first();
3514
3634
  else {
3515
- var z = e.items[e.currentIndex].element, u = z.previousElementSibling;
3516
- u ? (u.classList.contains("jdropdown-group") && (u = u.lastChild.lastChild), M = u.indexValue) : z.parentNode.classList.contains("jdropdown-group-items") && ((u = z.parentNode.parentNode.previousElementSibling) && (u.classList.contains("jdropdown-group") ? u = u.lastChild.lastChild : u.classList.contains("jdropdown-item") ? M = u.indexValue : u = null), u && (M = u.indexValue));
3635
+ var z = e.items[e.currentIndex].element, f = z.previousElementSibling;
3636
+ f ? (f.classList.contains("jdropdown-group") && (f = f.lastChild.lastChild), M = f.indexValue) : z.parentNode.classList.contains("jdropdown-group-items") && ((f = z.parentNode.parentNode.previousElementSibling) && (f.classList.contains("jdropdown-group") ? f = f.lastChild.lastChild : f.classList.contains("jdropdown-item") ? M = f.indexValue : f = null), f && (M = f.indexValue));
3517
3637
  }
3518
3638
  M !== null && e.setCursor(M);
3519
3639
  }, e.loadFirst = function() {
@@ -3523,8 +3643,8 @@ function Fr() {
3523
3643
  var M = e.items;
3524
3644
  var z = M.length || 0;
3525
3645
  e.options.lazyLoading == !0 && z > 200 && (z = 200), B.textContent = "";
3526
- for (var u = 0; u < z; u++)
3527
- M[u].group ? (M[u].group.parentNode || B.appendChild(M[u].group), M[u].group.lastChild.appendChild(M[u].element)) : B.appendChild(M[u].element);
3646
+ for (var f = 0; f < z; f++)
3647
+ M[f].group ? (M[f].group.parentNode || B.appendChild(M[f].group), M[f].group.lastChild.appendChild(M[f].element)) : B.appendChild(M[f].element);
3528
3648
  B.scrollTop = 0;
3529
3649
  }, e.loadLast = function() {
3530
3650
  if (e.results)
@@ -3534,8 +3654,8 @@ function Fr() {
3534
3654
  var z = M.length;
3535
3655
  if (z > 200) {
3536
3656
  z = z - 200, B.textContent = "";
3537
- for (var u = z; u < M.length; u++)
3538
- M[u].group ? (M[u].group.parentNode || B.appendChild(M[u].group), M[u].group.lastChild.appendChild(M[u].element)) : B.appendChild(M[u].element);
3657
+ for (var f = z; f < M.length; f++)
3658
+ M[f].group ? (M[f].group.parentNode || B.appendChild(M[f].group), M[f].group.lastChild.appendChild(M[f].element)) : B.appendChild(M[f].element);
3539
3659
  B.scrollTop = B.scrollHeight;
3540
3660
  }
3541
3661
  }, e.loadUp = function() {
@@ -3544,7 +3664,7 @@ function Fr() {
3544
3664
  var z = e.results;
3545
3665
  else
3546
3666
  var z = e.items;
3547
- var u = B.querySelectorAll(".jdropdown-item"), L = u[0].indexValue;
3667
+ var f = B.querySelectorAll(".jdropdown-item"), L = f[0].indexValue;
3548
3668
  L = e.items[L];
3549
3669
  var J = z.indexOf(L) - 1;
3550
3670
  if (J > 0) {
@@ -3559,7 +3679,7 @@ function Fr() {
3559
3679
  var z = e.results;
3560
3680
  else
3561
3681
  var z = e.items;
3562
- var u = B.querySelectorAll(".jdropdown-item"), L = u[u.length - 1].indexValue;
3682
+ var f = B.querySelectorAll(".jdropdown-item"), L = f[f.length - 1].indexValue;
3563
3683
  L = e.items[L];
3564
3684
  var J = z.indexOf(L) + 1;
3565
3685
  if (J < z.length) {
@@ -4157,7 +4277,7 @@ function Fr() {
4157
4277
  }, !1), S[Y].readAsDataURL(D[Y])) : alert("The extension is not allowed");
4158
4278
  }
4159
4279
  }, e.destroy = function() {
4160
- e.editor.removeEventListener("mouseup", L), e.editor.removeEventListener("mousedown", J), e.editor.removeEventListener("mousemove", U), e.editor.removeEventListener("keyup", z), e.editor.removeEventListener("keydown", u), e.editor.removeEventListener("dragstart", K), e.editor.removeEventListener("dragenter", oe), e.editor.removeEventListener("dragover", H), e.editor.removeEventListener("drop", ne), e.editor.removeEventListener("paste", k), e.editor.removeEventListener("blur", de), e.editor.removeEventListener("focus", M), l.editor = null, l.classList.remove("jeditor-container"), i.remove(), o.remove(), e.editor.remove();
4280
+ e.editor.removeEventListener("mouseup", L), e.editor.removeEventListener("mousedown", J), e.editor.removeEventListener("mousemove", U), e.editor.removeEventListener("keyup", z), e.editor.removeEventListener("keydown", f), e.editor.removeEventListener("dragstart", K), e.editor.removeEventListener("dragenter", oe), e.editor.removeEventListener("dragover", H), e.editor.removeEventListener("drop", ne), e.editor.removeEventListener("paste", k), e.editor.removeEventListener("blur", de), e.editor.removeEventListener("focus", M), l.editor = null, l.classList.remove("jeditor-container"), i.remove(), o.remove(), e.editor.remove();
4161
4281
  }, e.upload = function() {
4162
4282
  $.click(e.file);
4163
4283
  };
@@ -4213,7 +4333,7 @@ function Fr() {
4213
4333
  typeof e.options.onfocus == "function" && e.options.onfocus(l, e, D);
4214
4334
  }, z = function(D) {
4215
4335
  e.editor.innerHTML || (e.editor.innerHTML = "<div><br></div>"), typeof e.options.onkeyup == "function" && e.options.onkeyup(l, e, D);
4216
- }, u = function(D) {
4336
+ }, f = function(D) {
4217
4337
  if (F("onevent", D), D.key == "Delete" && D.target.tagName == "IMG") {
4218
4338
  var S = D.target.parentNode;
4219
4339
  v(D.target), S.classList.contains("jsnippet-image") && B();
@@ -4279,7 +4399,7 @@ function Fr() {
4279
4399
  e.options.extensions[D[S]] && typeof e.options.extensions[D[S]] == "function" && (e.options.extensions[D[S]] = e.options.extensions[D[S]](l, e));
4280
4400
  }
4281
4401
  };
4282
- if (document.addEventListener("mouseup", L), document.addEventListener("mousemove", U), e.editor.addEventListener("mousedown", J), e.editor.addEventListener("keyup", z), e.editor.addEventListener("keydown", u), e.editor.addEventListener("dragstart", K), e.editor.addEventListener("dragenter", oe), e.editor.addEventListener("dragover", H), e.editor.addEventListener("drop", ne), e.editor.addEventListener("paste", k), e.editor.addEventListener("focus", M), e.editor.addEventListener("blur", de), l.appendChild(e.editor), e.options.snippet && e.appendSnippet(e.options.snippet), e.options.toolbar) {
4402
+ if (document.addEventListener("mouseup", L), document.addEventListener("mousemove", U), e.editor.addEventListener("mousedown", J), e.editor.addEventListener("keyup", z), e.editor.addEventListener("keydown", f), e.editor.addEventListener("dragstart", K), e.editor.addEventListener("dragenter", oe), e.editor.addEventListener("dragover", H), e.editor.addEventListener("drop", ne), e.editor.addEventListener("paste", k), e.editor.addEventListener("focus", M), e.editor.addEventListener("blur", de), l.appendChild(e.editor), e.options.snippet && e.appendSnippet(e.options.snippet), e.options.toolbar) {
4283
4403
  if (Array.isArray(e.options.toolbar))
4284
4404
  var I = {
4285
4405
  container: !0,
@@ -5386,8 +5506,8 @@ function Fr() {
5386
5506
  H && H.hasOwnProperty(M) ? r.options[M] = H[M] : (typeof r.options[M] > "u" || ne === !0) && (r.options[M] = de[M]);
5387
5507
  return r.options.placeholder ? s.setAttribute("data-placeholder", r.options.placeholder) : s.removeAttribute("data-placeholder"), s.placeholder = r.options.placeholder, r.setValue(r.options.value), o(), r.options.search ? P || (P = document.createElement("div"), s.parentNode.insertBefore(P, s.nextSibling), m = Te(P, {
5388
5508
  data: r.options.search,
5389
- onselect: function(z, u, L) {
5390
- r.selectIndex(u, L);
5509
+ onselect: function(z, f, L) {
5510
+ r.selectIndex(f, L);
5391
5511
  }
5392
5512
  })) : P && (m = null, P.remove(), P = null), r;
5393
5513
  }, r.add = function(H, ne) {
@@ -5407,12 +5527,12 @@ function Fr() {
5407
5527
  if (s.lastChild && (s.lastChild.innerText.trim() || s.removeChild(s.lastChild)), !H || typeof H == "string")
5408
5528
  var z = E(H, H, M);
5409
5529
  else
5410
- for (var u = 0; u <= H.length; u++)
5530
+ for (var f = 0; f <= H.length; f++)
5411
5531
  if (!e()) {
5412
- if (!H[u] || typeof H[u] == "string")
5413
- var L = H[u] || "", J = null;
5532
+ if (!H[f] || typeof H[f] == "string")
5533
+ var L = H[f] || "", J = null;
5414
5534
  else
5415
- var L = H[u].text, J = H[u].value;
5535
+ var L = H[f].text, J = H[f].value;
5416
5536
  var z = E(L, J);
5417
5537
  }
5418
5538
  n();
@@ -5748,15 +5868,15 @@ function Fr() {
5748
5868
  var ne = H.changedTouches[0].clientX, de = H.changedTouches[0].clientY;
5749
5869
  else
5750
5870
  var ne = H.clientX, de = H.clientY;
5751
- let M = E(H), z = M && M.tagName === "DIV" && M.getAttribute("contentEditable"), u = h.findElement(M, "jpanel");
5752
- if (u && !u.classList.contains("readonly") && !z) {
5753
- let L = u.getBoundingClientRect(), J = 0;
5754
- u.style.rotate && (J = parseFloat(u.style.rotate));
5871
+ let M = E(H), z = M && M.tagName === "DIV" && M.getAttribute("contentEditable"), f = h.findElement(M, "jpanel");
5872
+ if (f && !f.classList.contains("readonly") && !z) {
5873
+ let L = f.getBoundingClientRect(), J = 0;
5874
+ f.style.rotate && (J = parseFloat(f.style.rotate));
5755
5875
  let U = "move";
5756
- M.getAttribute("data-action") ? U = M.getAttribute("data-action") : u.style.cursor ? U = "resize" : u.style.cursor = "move", e = {
5876
+ M.getAttribute("data-action") ? U = M.getAttribute("data-action") : f.style.cursor ? U = "resize" : f.style.cursor = "move", e = {
5757
5877
  action: U,
5758
5878
  a: J,
5759
- e: u,
5879
+ e: f,
5760
5880
  x: ne,
5761
5881
  y: de,
5762
5882
  l: L.left,
@@ -5765,14 +5885,14 @@ function Fr() {
5765
5885
  r: L.right,
5766
5886
  w: L.width,
5767
5887
  h: L.height,
5768
- d: u.style.cursor,
5888
+ d: f.style.cursor,
5769
5889
  actioned: !1
5770
- }, u.style.width || (u.style.width = L.width + "px"), u.style.height || (u.style.height = L.height + "px");
5890
+ }, f.style.width || (f.style.width = L.width + "px"), f.style.height || (f.style.height = L.height + "px");
5771
5891
  } else
5772
5892
  e = !1;
5773
5893
  l(M), B(H);
5774
- }, o = function(H, ne, de, M, z, u) {
5775
- const L = de - H, J = M - ne, U = z - H, F = u - ne;
5894
+ }, o = function(H, ne, de, M, z, f) {
5895
+ const L = de - H, J = M - ne, U = z - H, F = f - ne;
5776
5896
  let ae = Math.atan2(J, L), D = Math.atan2(F, U) - ae;
5777
5897
  return D = D * (180 / Math.PI), D < 0 && (D += 360), D;
5778
5898
  }, i = function(H) {
@@ -5782,23 +5902,23 @@ function Fr() {
5782
5902
  }, e = !1;
5783
5903
  }, t = function(H) {
5784
5904
  if (e) {
5785
- let u = H.clientX || H.pageX, L = H.clientY || H.pageY;
5786
- if (m.x == null && m.y == null && (m.x = u, m.y = L), e.action === "move") {
5787
- var ne = u - m.x, de = L - m.y, M = e.e.offsetTop + de, z = e.e.offsetLeft + ne;
5905
+ let f = H.clientX || H.pageX, L = H.clientY || H.pageY;
5906
+ if (m.x == null && m.y == null && (m.x = f, m.y = L), e.action === "move") {
5907
+ var ne = f - m.x, de = L - m.y, M = e.e.offsetTop + de, z = e.e.offsetLeft + ne;
5788
5908
  e.e.style.top = M + "px", e.e.style.left = z + "px", typeof e.e.refresh == "function" && (m.actioned = !0, e.e.refresh("position", M, z));
5789
5909
  } else if (e.action === "rotate") {
5790
- let J = e.l + e.w / 2, U = e.t + e.h / 2, F = o(J, U, e.x, e.y, u, L);
5910
+ let J = e.l + e.w / 2, U = e.t + e.h / 2, F = o(J, U, e.x, e.y, f, L);
5791
5911
  F = F + e.a % 360, F = Math.round(F / 2) * 2, e.e.style.rotate = `${F}deg`, typeof e.e.refresh == "function" && (m.actioned = !0, e.e.refresh("rotate", F));
5792
5912
  } else if (e.action === "resize") {
5793
5913
  let J = null, U = null, F = null, ae = null;
5794
- e.d == "e-resize" || e.d == "ne-resize" || e.d == "se-resize" ? (F = e.e.offsetWidth + (u - m.x), H.shiftKey && (ae = e.e.offsetHeight + (u - m.x) * (e.e.offsetHeight / e.e.offsetWidth))) : (e.d === "w-resize" || e.d == "nw-resize" || e.d == "sw-resize") && (U = e.e.offsetLeft + (u - m.x), F = e.e.offsetLeft + e.e.offsetWidth - U, H.shiftKey && (ae = e.e.offsetHeight - (u - m.x) * (e.e.offsetHeight / e.e.offsetWidth))), e.d == "s-resize" || e.d == "se-resize" || e.d == "sw-resize" ? ae || (ae = e.e.offsetHeight + (L - m.y)) : (e.d === "n-resize" || e.d == "ne-resize" || e.d == "nw-resize") && (J = e.e.offsetTop + (L - m.y), ae = e.e.offsetTop + e.e.offsetHeight - J), J && (e.e.style.top = J + "px"), U && (e.e.style.left = U + "px"), F && (e.e.style.width = F + "px"), ae && (e.e.style.height = ae + "px"), typeof e.e.refresh == "function" && (m.actioned = !0, e.e.refresh("dimensions", F, ae));
5914
+ e.d == "e-resize" || e.d == "ne-resize" || e.d == "se-resize" ? (F = e.e.offsetWidth + (f - m.x), H.shiftKey && (ae = e.e.offsetHeight + (f - m.x) * (e.e.offsetHeight / e.e.offsetWidth))) : (e.d === "w-resize" || e.d == "nw-resize" || e.d == "sw-resize") && (U = e.e.offsetLeft + (f - m.x), F = e.e.offsetLeft + e.e.offsetWidth - U, H.shiftKey && (ae = e.e.offsetHeight - (f - m.x) * (e.e.offsetHeight / e.e.offsetWidth))), e.d == "s-resize" || e.d == "se-resize" || e.d == "sw-resize" ? ae || (ae = e.e.offsetHeight + (L - m.y)) : (e.d === "n-resize" || e.d == "ne-resize" || e.d == "nw-resize") && (J = e.e.offsetTop + (L - m.y), ae = e.e.offsetTop + e.e.offsetHeight - J), J && (e.e.style.top = J + "px"), U && (e.e.style.left = U + "px"), F && (e.e.style.width = F + "px"), ae && (e.e.style.height = ae + "px"), typeof e.e.refresh == "function" && (m.actioned = !0, e.e.refresh("dimensions", F, ae));
5795
5915
  }
5796
- m.x = u, m.y = L;
5916
+ m.x = f, m.y = L;
5797
5917
  } else {
5798
- let u = E(H), L = h.findElement(u, "jpanel");
5918
+ let f = E(H), L = h.findElement(f, "jpanel");
5799
5919
  if (L) {
5800
5920
  if (L.classList.contains("jpanel-controls")) {
5801
- let U = u.getAttribute("data-position");
5921
+ let U = f.getAttribute("data-position");
5802
5922
  U ? L.style.cursor = U : L.style.cursor = "";
5803
5923
  } else if (L.getAttribute("tabindex")) {
5804
5924
  let U = L.getBoundingClientRect();
@@ -5849,22 +5969,22 @@ function Fr() {
5849
5969
  document.addEventListener("focusin", B), document.addEventListener("mouseup", i), document.addEventListener("mousedown", n), document.addEventListener("mousemove", t), document.addEventListener("mouseover", v), document.addEventListener("keydown", K), document.addEventListener("contextmenu", k), document.addEventListener("input", oe);
5850
5970
  }();
5851
5971
  var Z = h;
5852
- })(), f = N.default;
5853
- })(), f;
5972
+ })(), u = N.default;
5973
+ })(), u;
5854
5974
  }));
5855
5975
  })(on)), on.exports;
5856
5976
  }
5857
5977
  var _r = sn.exports, oi;
5858
5978
  function Or() {
5859
5979
  return oi || (oi = 1, (function(d, a) {
5860
- (function(f, c) {
5980
+ (function(u, c) {
5861
5981
  d.exports = c();
5862
5982
  })(_r, (function() {
5863
- if (typeof f > "u") {
5983
+ if (typeof u > "u") {
5864
5984
  if (typeof Mr == "function")
5865
- var f = Fr();
5985
+ var u = Fr();
5866
5986
  else if (window.jSuites)
5867
- var f = window.jSuites;
5987
+ var u = window.jSuites;
5868
5988
  }
5869
5989
  const c = [
5870
5990
  "html",
@@ -5997,7 +6117,7 @@ function Or() {
5997
6117
  W.image = new Image(), W.image.onload = function() {
5998
6118
  W.resetCanvas();
5999
6119
  var se = W.options.area[0] / this.naturalWidth, fe = W.options.area[1] / this.naturalHeight, ke = Math.min(fe, se);
6000
- this.width = this.naturalWidth * ke, this.height = this.naturalHeight * ke, me(), b.classList.add("jcrop_edition"), f.getWindowWidth() > 800 && W.resetCropSelection(), He(), typeof W.options.onchange == "function" && W.options.onchange(b, W.image);
6120
+ this.width = this.naturalWidth * ke, this.height = this.naturalHeight * ke, me(), b.classList.add("jcrop_edition"), u.getWindowWidth() > 800 && W.resetCropSelection(), He(), typeof W.options.onchange == "function" && W.options.onchange(b, W.image);
6001
6121
  };
6002
6122
  var he = {
6003
6123
  zoom: {
@@ -6030,7 +6150,7 @@ function Or() {
6030
6150
  };
6031
6151
  for (var ke in fe)
6032
6152
  O && O.hasOwnProperty(ke) ? W.options[ke] = O[ke] : (typeof W.options[ke] > "u" || se === !0) && (W.options[ke] = fe[ke]);
6033
- return f.getWindowWidth() < 800 && (W.options.area[0] || (W.options.area[0] = window.clientWidth * 2), W.options.area[1] || (W.options.area[1] = window.clientHeight * 2)), b.style.width = W.options.area[0] + "px", b.style.height = W.options.area[1] + "px", $.width = W.options.area[0], $.height = W.options.area[1], W.reset(), typeof W.options.value == "string" && (W.image.src = W.options.value), W;
6153
+ return u.getWindowWidth() < 800 && (W.options.area[0] || (W.options.area[0] = window.clientWidth * 2), W.options.area[1] || (W.options.area[1] = window.clientHeight * 2)), b.style.width = W.options.area[0] + "px", b.style.height = W.options.area[1] + "px", $.width = W.options.area[0], $.height = W.options.area[1], W.reset(), typeof W.options.value == "string" && (W.image.src = W.options.value), W;
6034
6154
  }, W.resetCropSelection = function() {
6035
6155
  pe.style.left = W.options.area[0] / 2 - W.options.crop[0] / 2 + "px", pe.style.top = W.options.area[1] / 2 - W.options.crop[1] / 2 + "px", pe.style.width = W.options.crop[0] + "px", pe.style.height = W.options.crop[1] + "px", pe.style.zIndex = 1;
6036
6156
  }, W.getCropSelection = function() {
@@ -6100,7 +6220,7 @@ function Or() {
6100
6220
  bottom: pe.offsetTop + pe.clientHeight
6101
6221
  };
6102
6222
  }, W.getCroppedImage = function() {
6103
- return f.image.create({
6223
+ return u.image.create({
6104
6224
  extension: W.getImageType(),
6105
6225
  file: W.getCroppedContent(),
6106
6226
  name: "",
@@ -6244,7 +6364,7 @@ function Or() {
6244
6364
  document.addEventListener("mouseup", function(O) {
6245
6365
  Ge.mousedown = !1;
6246
6366
  }), b.addEventListener("mouseup", et), b.addEventListener("mousedown", Me), b.addEventListener("mousemove", Xe), b.addEventListener("touchstart", we), b.addEventListener("touchend", Qe), b.addEventListener("touchmove", tt), b.addEventListener("mousedown", we), b.addEventListener("mousemove", tt), b.addEventListener("dblclick", function(O) {
6247
- f.click(Ze);
6367
+ u.click(Ze);
6248
6368
  }), b.addEventListener("dragenter", function(O) {
6249
6369
  b.style.border = "1px dashed #000";
6250
6370
  }), b.addEventListener("dragleave", function(O) {
@@ -6271,7 +6391,7 @@ function Or() {
6271
6391
  Pe[3] != 0 && (he.zoom.origin.x = fe, he.zoom.origin.y = ke), W.zoom(), O.preventDefault();
6272
6392
  }
6273
6393
  }), b.addEventListener("click", function(O) {
6274
- b.classList.contains("jcrop_edition") || f.click(Ze);
6394
+ b.classList.contains("jcrop_edition") || u.click(Ze);
6275
6395
  }), W.setOptions(X), typeof W.options.onload == "function" && W.options.onload(b, W);
6276
6396
  var De = function(O) {
6277
6397
  var se = b.getBoundingClientRect();
@@ -6294,7 +6414,7 @@ function Or() {
6294
6414
  };
6295
6415
  return b.crop = W, W;
6296
6416
  });
6297
- return window.jSuites && f.setExtensions({ crop: V }), V;
6417
+ return window.jSuites && u.setExtensions({ crop: V }), V;
6298
6418
  }));
6299
6419
  })(sn)), sn.exports;
6300
6420
  }
@@ -6306,10 +6426,10 @@ const Ur = /* @__PURE__ */ kr(Ri), Rr = /* @__PURE__ */ nr({
6306
6426
  var an = { exports: {} }, Pr = an.exports, ai;
6307
6427
  function Hr() {
6308
6428
  return ai || (ai = 1, (function(d, a) {
6309
- (function(f, c) {
6429
+ (function(u, c) {
6310
6430
  d.exports = c();
6311
6431
  })(Pr, (function() {
6312
- var f;
6432
+ var u;
6313
6433
  return (function() {
6314
6434
  var c = {
6315
6435
  /***/
@@ -7686,8 +7806,8 @@ function Hr() {
7686
7806
  if (C === 0) return [R * B, 1];
7687
7807
  let v = 1, k = 0, K = 0, oe = 1, H = C;
7688
7808
  for (; K <= w; ) {
7689
- let M = Math.floor(H), z = M * v + k, u = M * K + oe;
7690
- if (u > w || (k = v, v = z, oe = K, K = u, Math.abs(H - M) < 1e-10)) break;
7809
+ let M = Math.floor(H), z = M * v + k, f = M * K + oe;
7810
+ if (f > w || (k = v, v = z, oe = K, K = f, Math.abs(H - M) < 1e-10)) break;
7691
7811
  H = 1 / (H - M);
7692
7812
  }
7693
7813
  return [R * (l ? B * K + v : Math.round(t * K)), K];
@@ -7865,8 +7985,8 @@ function Hr() {
7865
7985
  if (!Z) return null;
7866
7986
  const s = Z.length;
7867
7987
  let l = !1, r = !1, e = "", m = "", P = "", Q = -1, E = -1, n = -1, o = -1, i = 0, t = 0, w = !1, R = !1;
7868
- for (let u = 0; u < s; u++) {
7869
- const L = Z[u];
7988
+ for (let f = 0; f < s; f++) {
7989
+ const L = Z[f];
7870
7990
  if (L === "-" && !m) {
7871
7991
  l = !0;
7872
7992
  continue;
@@ -7883,7 +8003,7 @@ function Hr() {
7883
8003
  if (L === "$" || L === "€" || L === "£" || L === "¥" || L === "₹" || L === "₽" || L === "₩" || L === "₫" || L === "¢") {
7884
8004
  if (R = !0, P.trim().length > 2)
7885
8005
  return null;
7886
- P ? (e = P + L, P = "") : e = L, u + 1 < s && (Z[u + 1] === " " || Z[u + 1] === " ") && (e += " ", u++);
8006
+ P ? (e = P + L, P = "") : e = L, f + 1 < s && (Z[f + 1] === " " || Z[f + 1] === " ") && (e += " ", f++);
7887
8007
  continue;
7888
8008
  }
7889
8009
  if (L >= "A" && L <= "Z" || L >= "a" && L <= "z") {
@@ -7913,8 +8033,8 @@ function Hr() {
7913
8033
  let B = ".", C = ",";
7914
8034
  if (ie) {
7915
8035
  if (B = ie, C = ie === "," ? "." : ",", i > 0 && t > 0) {
7916
- const u = E > o;
7917
- if (ie === "," && !u || ie === "." && u)
8036
+ const f = E > o;
8037
+ if (ie === "," && !f || ie === "." && f)
7918
8038
  return null;
7919
8039
  } else if (t === 1 && i === 0) {
7920
8040
  if (m.substring(o + 1).length !== 3 && ie !== ".")
@@ -7924,8 +8044,8 @@ function Hr() {
7924
8044
  } else
7925
8045
  i > 0 && t > 0 ? E > o && (B = ",", C = ".") : t === 1 && i === 0 ? m.substring(o + 1).length === 3 && (B = ",", C = ".") : i === 1 && t === 0 && m.substring(E + 1).length !== 3 && (B = ",", C = ".");
7926
8046
  let v = "";
7927
- for (let u = 0; u < m.length; u++) {
7928
- const L = m[u];
8047
+ for (let f = 0; f < m.length; f++) {
8048
+ const L = m[f];
7929
8049
  L !== C && (L === B ? v += "." : v += L);
7930
8050
  }
7931
8051
  const k = parseFloat(v);
@@ -11247,8 +11367,8 @@ function Hr() {
11247
11367
  else if (oe[de[M]] === null || oe[de[M]] === void 0)
11248
11368
  ne[z] = "";
11249
11369
  else if (typeof oe[de[M]] == "object")
11250
- for (var u = R(oe[de[M]], z), L = Object.keys(u), J = 0; J < L.length; J++)
11251
- ne[L[J]] = u[L[J]];
11370
+ for (var f = R(oe[de[M]], z), L = Object.keys(f), J = 0; J < L.length; J++)
11371
+ ne[L[J]] = f[L[J]];
11252
11372
  else
11253
11373
  ne[z] = oe[de[M]];
11254
11374
  }
@@ -11570,7 +11690,7 @@ function Hr() {
11570
11690
  }
11571
11691
  M.appendChild(Oe);
11572
11692
  }
11573
- t.options.time ? u.style.display = "" : u.style.display = "none", B();
11693
+ t.options.time ? f.style.display = "" : f.style.display = "none", B();
11574
11694
  }, t.getMonths = function() {
11575
11695
  t.options.mode = "months";
11576
11696
  var I = t.options.months;
@@ -11648,7 +11768,7 @@ function Hr() {
11648
11768
  }, B = function() {
11649
11769
  var I = C.querySelector(".jcalendar-selected");
11650
11770
  I && I.classList.contains("jcalendar-disabled") ? (J.setAttribute("disabled", "disabled"), U.setAttribute("disabled", "disabled"), F.setAttribute("disabled", "disabled")) : (J.removeAttribute("disabled"), U.removeAttribute("disabled"), F.removeAttribute("disabled")), typeof t.options.onupdate == "function" && t.options.onupdate(o, t.getValue());
11651
- }, C = null, v = null, k = null, K = null, oe = null, H = null, ne = null, de = null, M = null, z = null, u = null, L = null, J = null, U = null, F = null, ae = function() {
11771
+ }, C = null, v = null, k = null, K = null, oe = null, H = null, ne = null, de = null, M = null, z = null, f = null, L = null, J = null, U = null, F = null, ae = function() {
11652
11772
  o.tagName == "INPUT" && o.value && (i.value = o.value), v = document.createElement("div"), v.className = "jcalendar-reset", k = document.createElement("div"), k.className = "jcalendar-confirm", z = document.createElement("div"), z.className = "jcalendar-controls", z.style.borderBottom = "1px solid #ddd", z.appendChild(v), z.appendChild(k), K = document.createElement("div"), K.className = "jcalendar-container", oe = document.createElement("div"), oe.className = "jcalendar-content", K.appendChild(oe), o.tagName == "DIV" ? (C = o, C.classList.add("jcalendar-inline")) : (oe.appendChild(z), C = document.createElement("div"), C.className = "jcalendar"), C.classList.add("jcalendar-container"), C.appendChild(K);
11653
11773
  var I = document.createElement("div");
11654
11774
  I.className = "jcalendar-table", oe.appendChild(I);
@@ -11674,7 +11794,7 @@ function Hr() {
11674
11794
  qe.value = Re, qe.innerHTML = $.two(Re), F.appendChild(qe);
11675
11795
  }
11676
11796
  var $e = document.createElement("div");
11677
- $e.className = "jcalendar-controls", u = document.createElement("div"), u.className = "jcalendar-time", u.style.maxWidth = "140px", u.appendChild(U), u.appendChild(F), J = document.createElement("button"), J.setAttribute("type", "button"), J.className = "jcalendar-update", L = document.createElement("div"), L.style.flexGrow = "10", L.appendChild(J), $e.appendChild(u), o.tagName == "INPUT" && $e.appendChild(L), oe.appendChild($e);
11797
+ $e.className = "jcalendar-controls", f = document.createElement("div"), f.className = "jcalendar-time", f.style.maxWidth = "140px", f.appendChild(U), f.appendChild(F), J = document.createElement("button"), J.setAttribute("type", "button"), J.className = "jcalendar-update", L = document.createElement("div"), L.style.flexGrow = "10", L.appendChild(J), $e.appendChild(f), o.tagName == "INPUT" && $e.appendChild(L), oe.appendChild($e);
11678
11798
  var ge = document.createElement("div");
11679
11799
  ge.className = "jcalendar-backdrop", C.appendChild(ge), o.addEventListener("keyup", R), C.addEventListener("swipeleft", function(Oe) {
11680
11800
  ce.slideLeft(de, 0, function() {
@@ -11817,8 +11937,8 @@ function Hr() {
11817
11937
  i.headers.parentNode.style.display = "none";
11818
11938
  else {
11819
11939
  i.headers.parentNode.style.display = "";
11820
- var z = i.headers.children[ne].offsetLeft, u = z + i.headers.children[ne].offsetWidth, L = i.headers.scrollLeft, J = L + i.headers.offsetWidth;
11821
- L <= z && J >= u || k(z - 1), v(ne);
11940
+ var z = i.headers.children[ne].offsetLeft, f = z + i.headers.children[ne].offsetWidth, L = i.headers.scrollLeft, J = L + i.headers.offsetWidth;
11941
+ L <= z && J >= f || k(z - 1), v(ne);
11822
11942
  }
11823
11943
  }
11824
11944
  }, i.selectIndex = function(ne) {
@@ -11861,16 +11981,16 @@ function Hr() {
11861
11981
  var ne = prompt("Title?", "");
11862
11982
  if (ne) {
11863
11983
  let J = $.guid(), U = $.guid();
11864
- var u = document.createElement("div");
11865
- u.setAttribute("id", U), u.setAttribute("role", "tabpanel"), u.setAttribute("aria-labelledby", J);
11984
+ var f = document.createElement("div");
11985
+ f.setAttribute("id", U), f.setAttribute("role", "tabpanel"), f.setAttribute("aria-labelledby", J);
11866
11986
  var L = document.createElement("div");
11867
- if (L.setAttribute("id", J), L.setAttribute("role", "tab"), L.setAttribute("aria-controls", U), L.textContent = ne, L.content = u, typeof z > "u")
11868
- i.content.appendChild(u), i.headers.insertBefore(L, i.headers.lastChild);
11987
+ if (L.setAttribute("id", J), L.setAttribute("role", "tab"), L.setAttribute("aria-controls", U), L.textContent = ne, L.content = f, typeof z > "u")
11988
+ i.content.appendChild(f), i.headers.insertBefore(L, i.headers.lastChild);
11869
11989
  else {
11870
11990
  let F = i.content.children[z];
11871
- F ? i.content.insertBefore(u, F) : i.content.appendChild(u), F = i.headers.children[z] || i.headers.lastChild, i.headers.insertBefore(L, F);
11991
+ F ? i.content.insertBefore(f, F) : i.content.appendChild(f), F = i.headers.children[z] || i.headers.lastChild, i.headers.insertBefore(L, F);
11872
11992
  }
11873
- return i.options.allowChangePosition && L.setAttribute("draggable", "true"), M !== !1 && i.selectIndex(L), typeof de == "function" && de(u, L), u;
11993
+ return i.options.allowChangePosition && L.setAttribute("draggable", "true"), M !== !1 && i.selectIndex(L), typeof de == "function" && de(f, L), f;
11874
11994
  }
11875
11995
  }, i.getActive = function() {
11876
11996
  for (var ne = 0; ne < i.headers.children.length; ne++)
@@ -11889,8 +12009,8 @@ function Hr() {
11889
12009
  if (ne > de ? i.content.insertBefore(i.content.children[ne], i.content.children[de]) : i.content.insertBefore(i.content.children[ne], i.content.children[de].nextSibling), z !== !1)
11890
12010
  i.open(de);
11891
12011
  else {
11892
- const u = i.getActive();
11893
- de < u && i.setBorder(u);
12012
+ const f = i.getActive();
12013
+ de < f && i.setBorder(f);
11894
12014
  }
11895
12015
  !M && typeof i.options.onchangeposition == "function" && i.options.onchangeposition(i.headers, ne, de);
11896
12016
  }, i.move = function(ne, de, M, z) {
@@ -11913,24 +12033,24 @@ function Hr() {
11913
12033
  }, de.appendChild(B);
11914
12034
  for (var z = 0; z < i.options.data.length; z++) {
11915
12035
  if (i.options.data[z].titleElement)
11916
- var u = i.options.data[z].titleElement;
12036
+ var f = i.options.data[z].titleElement;
11917
12037
  else
11918
- var u = document.createElement("div");
12038
+ var f = document.createElement("div");
11919
12039
  if (i.options.data[z].icon) {
11920
12040
  var L = document.createElement("div"), J = document.createElement("i");
11921
- J.classList.add("material-icons"), J.textContent = i.options.data[z].icon, L.appendChild(J), u.appendChild(L);
12041
+ J.classList.add("material-icons"), J.textContent = i.options.data[z].icon, L.appendChild(J), f.appendChild(L);
11922
12042
  }
11923
12043
  if (i.options.data[z].title) {
11924
12044
  var U = document.createTextNode(i.options.data[z].title);
11925
- u.appendChild(U);
12045
+ f.appendChild(U);
11926
12046
  }
11927
- if (i.options.data[z].width && (u.style.width = i.options.data[z].width), i.options.data[z].contentElement)
12047
+ if (i.options.data[z].width && (f.style.width = i.options.data[z].width), i.options.data[z].contentElement)
11928
12048
  var F = i.options.data[z].contentElement;
11929
12049
  else {
11930
12050
  var F = document.createElement("div");
11931
12051
  F.innerHTML = i.options.data[z].content;
11932
12052
  }
11933
- i.headers.appendChild(u), i.content.appendChild(F);
12053
+ i.headers.appendChild(f), i.content.appendChild(F);
11934
12054
  }
11935
12055
  C = document.createElement("div"), C.className = "jtabs-border", i.headers.appendChild(C), i.options.animation && n.classList.add("jtabs-animation"), i.headers.addEventListener("click", function(ae) {
11936
12056
  if (ae.target.parentNode.classList.contains("jtabs-headers"))
@@ -12045,7 +12165,7 @@ function Hr() {
12045
12165
  return S.appendChild(Y), S;
12046
12166
  }, M = document.createElement("canvas");
12047
12167
  M.width = 200, M.height = 160;
12048
- var z = M.getContext("2d"), u = function() {
12168
+ var z = M.getContext("2d"), f = function() {
12049
12169
  var S = v.firstChild.getBoundingClientRect();
12050
12170
  M.width = S.width - 14, L();
12051
12171
  }, L = function() {
@@ -12137,7 +12257,7 @@ function Hr() {
12137
12257
  ],
12138
12258
  onchange: function(Y, ve, Ue) {
12139
12259
  if (Ue === 1)
12140
- u();
12260
+ f();
12141
12261
  else {
12142
12262
  var Re = U !== "" ? U : i.getValue();
12143
12263
  if (Ue === 2 && Re) {
@@ -12157,7 +12277,7 @@ function Hr() {
12157
12277
  }), n.addEventListener("mouseup", function(Y) {
12158
12278
  i.open();
12159
12279
  }), window.addEventListener("resize", function() {
12160
- t.classList.contains("jcolor-focus") && k.getActive() == 1 && u();
12280
+ t.classList.contains("jcolor-focus") && k.getActive() == 1 && f();
12161
12281
  }), i.options.opened == !0 && i.open(), n.change = i.setValue, n.val = function(Y) {
12162
12282
  if (Y === void 0)
12163
12283
  return i.getValue();
@@ -12362,7 +12482,7 @@ function Hr() {
12362
12482
  }
12363
12483
  }) : w(t.options.data, t.options.value), t;
12364
12484
  };
12365
- var H = null, ne = null, de = null, M = null, z = null, u = null, L = null, J = function() {
12485
+ var H = null, ne = null, de = null, M = null, z = null, f = null, L = null, J = function() {
12366
12486
  if (i || (i = {}), o.tagName == "SELECT") {
12367
12487
  var I = n.extractFromDom(o, i);
12368
12488
  o = I.el, i = I.options;
@@ -12377,7 +12497,7 @@ function Hr() {
12377
12497
  }, 400)), o.classList.contains("jdropdown-focus") || t.open()) : t.options.autocomplete || t.next(D.key);
12378
12498
  }, n.hasEvents || (n.hasEvents = !0, document.addEventListener("keydown", n.keydown)), ne = document.createElement("div"), ne.className = "jdropdown-container", de = document.createElement("div"), de.className = "jdropdown-content", M = document.createElement("div"), M.className = "jdropdown-close", M.textContent = "Done", z = document.createElement("div"), z.className = "jdropdown-reset", z.textContent = "x", z.onclick = function() {
12379
12499
  t.reset(), t.close();
12380
- }, u = document.createElement("div"), u.className = "jdropdown-backdrop", H.appendChild(t.header), ne.appendChild(de), o.appendChild(H), o.appendChild(ne), o.appendChild(u), t.setOptions(i), "ontouchsend" in document.documentElement ? o.addEventListener("touchsend", n.mouseup) : o.addEventListener("mouseup", n.mouseup), t.options.lazyLoading == !0 && re(de, {
12500
+ }, f = document.createElement("div"), f.className = "jdropdown-backdrop", H.appendChild(t.header), ne.appendChild(de), o.appendChild(H), o.appendChild(ne), o.appendChild(f), t.setOptions(i), "ontouchsend" in document.documentElement ? o.addEventListener("touchsend", n.mouseup) : o.addEventListener("mouseup", n.mouseup), t.options.lazyLoading == !0 && re(de, {
12381
12501
  loadUp: t.loadUp,
12382
12502
  loadDown: t.loadDown
12383
12503
  }), de.onwheel = function(D) {
@@ -12956,8 +13076,8 @@ function Hr() {
12956
13076
  }
12957
13077
  if (k[K].title)
12958
13078
  if (i.options.title == !0) {
12959
- var u = document.createElement("span");
12960
- u.innerHTML = k[K].title, oe.appendChild(u);
13079
+ var f = document.createElement("span");
13080
+ f.innerHTML = k[K].title, oe.appendChild(f);
12961
13081
  } else
12962
13082
  oe.setAttribute("title", k[K].title);
12963
13083
  i.options.app && k[K].route && (oe.route = k[K].route, oe.onclick = function() {
@@ -13367,14 +13487,14 @@ function Hr() {
13367
13487
  }, !1), Oe[ze].readAsDataURL(ge[ze])) : alert("The extension is not allowed");
13368
13488
  }
13369
13489
  }, t.destroy = function() {
13370
- t.editor.removeEventListener("mouseup", Y), t.editor.removeEventListener("mousedown", ve), t.editor.removeEventListener("mousemove", Ue), t.editor.removeEventListener("keyup", D), t.editor.removeEventListener("keydown", S), t.editor.removeEventListener("dragstart", L), t.editor.removeEventListener("dragenter", J), t.editor.removeEventListener("dragover", U), t.editor.removeEventListener("drop", F), t.editor.removeEventListener("paste", u), t.editor.removeEventListener("blur", ae), t.editor.removeEventListener("focus", I), o.editor = null, o.classList.remove("jeditor-container"), K.remove(), k.remove(), t.editor.remove();
13490
+ t.editor.removeEventListener("mouseup", Y), t.editor.removeEventListener("mousedown", ve), t.editor.removeEventListener("mousemove", Ue), t.editor.removeEventListener("keyup", D), t.editor.removeEventListener("keydown", S), t.editor.removeEventListener("dragstart", L), t.editor.removeEventListener("dragenter", J), t.editor.removeEventListener("dragover", U), t.editor.removeEventListener("drop", F), t.editor.removeEventListener("paste", f), t.editor.removeEventListener("blur", ae), t.editor.removeEventListener("focus", I), o.editor = null, o.classList.remove("jeditor-container"), K.remove(), k.remove(), t.editor.remove();
13371
13491
  }, t.upload = function() {
13372
13492
  $.click(t.file);
13373
13493
  };
13374
13494
  var z = function(ge) {
13375
13495
  var Oe = window.getSelection(), ze = document.createRange();
13376
13496
  ze.selectNode(ge), Oe.addRange(ze);
13377
- }, u = function(ge) {
13497
+ }, f = function(ge) {
13378
13498
  if (t.options.filterPaste == !0) {
13379
13499
  if (ge.clipboardData || ge.originalEvent.clipboardData)
13380
13500
  var Oe = (ge.originalEvent || ge).clipboardData.getData("text/html"), ze = (ge.originalEvent || ge).clipboardData.getData("text/plain"), Je = (ge.originalEvent || ge).clipboardData.files;
@@ -13489,7 +13609,7 @@ function Hr() {
13489
13609
  t.options.extensions[ge[Oe]] && typeof t.options.extensions[ge[Oe]] == "function" && (t.options.extensions[ge[Oe]] = t.options.extensions[ge[Oe]](o, t));
13490
13610
  }
13491
13611
  };
13492
- if (document.addEventListener("mouseup", Y), document.addEventListener("mousemove", Ue), t.editor.addEventListener("mousedown", ve), t.editor.addEventListener("keyup", D), t.editor.addEventListener("keydown", S), t.editor.addEventListener("dragstart", L), t.editor.addEventListener("dragenter", J), t.editor.addEventListener("dragover", U), t.editor.addEventListener("drop", F), t.editor.addEventListener("paste", u), t.editor.addEventListener("focus", I), t.editor.addEventListener("blur", ae), o.appendChild(t.editor), t.options.snippet && t.appendSnippet(t.options.snippet), t.options.toolbar) {
13612
+ if (document.addEventListener("mouseup", Y), document.addEventListener("mousemove", Ue), t.editor.addEventListener("mousedown", ve), t.editor.addEventListener("keyup", D), t.editor.addEventListener("keydown", S), t.editor.addEventListener("dragstart", L), t.editor.addEventListener("dragenter", J), t.editor.addEventListener("dragover", U), t.editor.addEventListener("drop", F), t.editor.addEventListener("paste", f), t.editor.addEventListener("focus", I), t.editor.addEventListener("blur", ae), o.appendChild(t.editor), t.options.snippet && t.appendSnippet(t.options.snippet), t.options.toolbar) {
13493
13613
  if (Array.isArray(t.options.toolbar))
13494
13614
  var $e = {
13495
13615
  container: !0,
@@ -14285,8 +14405,8 @@ function Hr() {
14285
14405
  var z = setTimeout(function() {
14286
14406
  i.hide();
14287
14407
  }, i.options.timeout);
14288
- return $.getWindowWidth() < 800 && R.addEventListener("swipeup", function(u) {
14289
- i.hide(), u.preventDefault(), u.stopPropagation();
14408
+ return $.getWindowWidth() < 800 && R.addEventListener("swipeup", function(f) {
14409
+ i.hide(), f.preventDefault(), f.stopPropagation();
14290
14410
  }), i;
14291
14411
  };
14292
14412
  return n.isVisible = function() {
@@ -14417,8 +14537,8 @@ function Hr() {
14417
14537
  M.setAttribute("data-value", de), M.setAttribute("data-text", ne), M.className = "jsearch_item", k[H].id && M.setAttribute("id", k[H].id), C.options.forceSelect && H == 0 && M.classList.add("selected");
14418
14538
  var z = document.createElement("img");
14419
14539
  k[H].image ? z.src = k[H].image : z.style.display = "none", M.appendChild(z);
14420
- var u = document.createElement("div");
14421
- u.innerHTML = ne, M.appendChild(u), v.appendChild(M);
14540
+ var f = document.createElement("div");
14541
+ f.innerHTML = ne, M.appendChild(f), v.appendChild(M);
14422
14542
  }
14423
14543
  }
14424
14544
  }, R = function(k) {
@@ -14676,7 +14796,7 @@ function Hr() {
14676
14796
  }, i.search = function(U) {
14677
14797
  U.innerText;
14678
14798
  }, i.destroy = function() {
14679
- n.removeEventListener("mouseup", z), n.removeEventListener("keydown", ne), n.removeEventListener("keyup", de), n.removeEventListener("paste", M), n.removeEventListener("focus", u), n.removeEventListener("blur", L), n.parentNode.removeChild(n);
14799
+ n.removeEventListener("mouseup", z), n.removeEventListener("keydown", ne), n.removeEventListener("keyup", de), n.removeEventListener("paste", M), n.removeEventListener("focus", f), n.removeEventListener("blur", L), n.parentNode.removeChild(n);
14680
14800
  };
14681
14801
  var B = function(U) {
14682
14802
  if (n.children.length) {
@@ -14746,7 +14866,7 @@ function Hr() {
14746
14866
  F.width - (U.clientX - F.left) < 16 && i.remove(U.target);
14747
14867
  }
14748
14868
  U.target == n && B();
14749
- }, u = function() {
14869
+ }, f = function() {
14750
14870
  n.classList.contains("jtags-focus") || ((!n.children.length || i.getValue(n.children.length - 1)) && (t() || C("")), typeof i.options.onfocus == "function" && i.options.onfocus(n, i, i.getValue()), n.classList.add("jtags-focus"));
14751
14871
  }, L = function() {
14752
14872
  if (n.classList.contains("jtags-focus")) {
@@ -14756,7 +14876,7 @@ function Hr() {
14756
14876
  v(), n.classList.remove("jtags-focus"), typeof i.options.onblur == "function" && i.options.onblur(n, i, i.getValue());
14757
14877
  }
14758
14878
  }, J = function() {
14759
- "touchend" in document.documentElement ? n.addEventListener("touchend", z) : n.addEventListener("mouseup", z), n.addEventListener("keydown", ne), n.addEventListener("keyup", de), n.addEventListener("paste", M), n.addEventListener("focus", u), n.addEventListener("blur", L), n.setAttribute("contenteditable", !0), n.classList.add("jtags"), i.setOptions(o), typeof i.options.onload == "function" && i.options.onload(n, i), n.change = i.setValue, n.val = function(U) {
14879
+ "touchend" in document.documentElement ? n.addEventListener("touchend", z) : n.addEventListener("mouseup", z), n.addEventListener("keydown", ne), n.addEventListener("keyup", de), n.addEventListener("paste", M), n.addEventListener("focus", f), n.addEventListener("blur", L), n.setAttribute("contenteditable", !0), n.classList.add("jtags"), i.setOptions(o), typeof i.options.onload == "function" && i.options.onload(n, i), n.change = i.setValue, n.val = function(U) {
14760
14880
  if (U === void 0)
14761
14881
  return i.getValue();
14762
14882
  i.setValue(U);
@@ -15041,7 +15161,7 @@ function Hr() {
15041
15161
  var I = U.clientX, D = U.clientY;
15042
15162
  R.style.top = D + "px", R.style.left = I + "px", document.body.appendChild(R);
15043
15163
  } else R.innerText && (R.innerText = "", document.body.removeChild(R));
15044
- }, u = function(U) {
15164
+ }, f = function(U) {
15045
15165
  var F = document.activeElement;
15046
15166
  if (F && typeof F.contextmenu == "function")
15047
15167
  F.contextmenu(U), U.preventDefault(), U.stopImmediatePropagation();
@@ -15059,11 +15179,11 @@ function Hr() {
15059
15179
  }, J = function(U) {
15060
15180
  (U.target.getAttribute("data-mask") || U.target.mask) && P.mask.oninput(U);
15061
15181
  };
15062
- document.addEventListener("focusin", de), document.addEventListener("mouseup", K), document.addEventListener("mousedown", v), document.addEventListener("mousemove", oe), document.addEventListener("mouseover", z), document.addEventListener("keydown", L), document.addEventListener("contextmenu", u), document.addEventListener("input", J);
15182
+ document.addEventListener("focusin", de), document.addEventListener("mouseup", K), document.addEventListener("mousedown", v), document.addEventListener("mousemove", oe), document.addEventListener("mouseover", z), document.addEventListener("keydown", L), document.addEventListener("contextmenu", f), document.addEventListener("input", J);
15063
15183
  }();
15064
15184
  var E = P;
15065
- })(), f = N.default;
15066
- })(), f;
15185
+ })(), u = N.default;
15186
+ })(), u;
15067
15187
  }));
15068
15188
  })(an)), an.exports;
15069
15189
  }
@@ -15101,16 +15221,16 @@ const Br = (d = {}) => ({
15101
15221
  set: (d, a) => localStorage.setItem(d, a),
15102
15222
  remove: (d) => localStorage.removeItem(d),
15103
15223
  clear: () => Object.values(bt).forEach((d) => localStorage.removeItem(d))
15104
- }), qr = (d, a, f) => {
15224
+ }), qr = (d, a, u) => {
15105
15225
  d.set(bt.idToken, a.idToken), d.set(bt.accessToken, a.accessToken), d.set(bt.refreshToken, a.refreshToken);
15106
- const c = f(a.idToken), p = c?.exp ? (c.exp * 1e3).toString() : (Date.now() + 3600 * 1e3).toString();
15226
+ const c = u(a.idToken), p = c?.exp ? (c.exp * 1e3).toString() : (Date.now() + 3600 * 1e3).toString();
15107
15227
  d.set(bt.idTokenExpiry, p), d.set(bt.userEmail, c?.email || ""), d.set(bt.userId, c?.sub || "");
15108
- }, Kr = async (d, a, f, c, p, g, N) => {
15228
+ }, Kr = async (d, a, u, c, p, g, N) => {
15109
15229
  const j = a.get(bt.refreshToken);
15110
15230
  if (!j) return null;
15111
15231
  const V = a.get(bt.userEmail);
15112
15232
  if (!V) return null;
15113
- const b = f(d), X = c(V, b), W = new AmazonCognitoIdentity.CognitoRefreshToken({
15233
+ const b = u(d), X = c(V, b), W = new AmazonCognitoIdentity.CognitoRefreshToken({
15114
15234
  RefreshToken: j
15115
15235
  });
15116
15236
  return new Promise((pe) => {
@@ -15142,17 +15262,17 @@ const { crypto: Gr } = globalThis, Jr = 14e11, Hi = 4, $n = 16, Zr = Hi + $n, Qr
15142
15262
  function ts(d) {
15143
15263
  let a = 0n;
15144
15264
  for (const c of d) a = (a << 8n) + BigInt(c);
15145
- let f = "";
15265
+ let u = "";
15146
15266
  for (; a > 0n; )
15147
- f = es[a % ci] + f, a /= ci;
15148
- return f.padStart(Qr, "0");
15267
+ u = es[a % ci] + u, a /= ci;
15268
+ return u.padStart(Qr, "0");
15149
15269
  }
15150
15270
  function ns() {
15151
15271
  const d = new Uint8Array($n);
15152
15272
  return Gr.getRandomValues(d), d;
15153
15273
  }
15154
15274
  function is({ timestamp: d = Date.now(), payload: a } = {}) {
15155
- const f = d instanceof Date ? d.getTime() : Number(d), c = Math.floor((f - Jr) / 1e3);
15275
+ const u = d instanceof Date ? d.getTime() : Number(d), c = Math.floor((u - Jr) / 1e3);
15156
15276
  if (c < 0 || c > 4294967295)
15157
15277
  throw new RangeError("Timestamp out of KSUID 32-bit range");
15158
15278
  const p = new Uint8Array(Zr);
@@ -15162,7 +15282,7 @@ function is({ timestamp: d = Date.now(), payload: a } = {}) {
15162
15282
  throw new TypeError("Payload must be a 16-byte Uint8Array");
15163
15283
  return p.set(g, Hi), ts(p);
15164
15284
  }
15165
- const _t = (d, ...a) => (...f) => d(...a, ...f);
15285
+ const _t = (d, ...a) => (...u) => d(...a, ...u);
15166
15286
  function rs(d) {
15167
15287
  return {
15168
15288
  // Underlying mechanism to use the REST URLs directly.
@@ -15179,18 +15299,18 @@ function ss(d) {
15179
15299
  function os(d, a) {
15180
15300
  return en(d, `/user/${a}`);
15181
15301
  }
15182
- function as(d, { factName: a, nonce: f, value: c }) {
15302
+ function as(d, { factName: a, nonce: u, value: c }) {
15183
15303
  return en(
15184
15304
  d,
15185
- `/user/${a}/${encodeURIComponent(f || is())}`,
15305
+ `/user/${a}/${encodeURIComponent(u || is())}`,
15186
15306
  {
15187
15307
  method: "PUT",
15188
15308
  body: { value: c }
15189
15309
  }
15190
15310
  );
15191
15311
  }
15192
- function ls(d, { factName: a, nonce: f }) {
15193
- const c = ["user", a, f].filter(Boolean).join("/");
15312
+ function ls(d, { factName: a, nonce: u }) {
15313
+ const c = ["user", a, u].filter(Boolean).join("/");
15194
15314
  return en(
15195
15315
  d,
15196
15316
  `/${c}`,
@@ -15199,14 +15319,14 @@ function ls(d, { factName: a, nonce: f }) {
15199
15319
  }
15200
15320
  );
15201
15321
  }
15202
- async function en(d, a, f) {
15322
+ async function en(d, a, u) {
15203
15323
  const c = d.baseUrl.endsWith("/") ? d.baseUrl : `${d.baseUrl}/`, p = a.startsWith("/") ? a.substring(1) : a, g = new URL(p, c), N = {
15204
15324
  "Content-Type": "application/json"
15205
15325
  };
15206
15326
  d.apiKey && (N.Authorization = `Bearer ${d.apiKey}`);
15207
- const j = Object.assign({}, f, {
15208
- headers: Object.assign({}, N, f?.headers),
15209
- body: f?.body ? JSON.stringify(f.body) : void 0
15327
+ const j = Object.assign({}, u, {
15328
+ headers: Object.assign({}, N, u?.headers),
15329
+ body: u?.body ? JSON.stringify(u.body) : void 0
15210
15330
  }), V = await fetch(g.toString(), j);
15211
15331
  if (!V.ok) {
15212
15332
  const X = new Error("API request failed.", { cause: V });
@@ -15225,8 +15345,8 @@ function $i() {
15225
15345
  try {
15226
15346
  const d = localStorage.getItem(Cn);
15227
15347
  if (!d) return null;
15228
- const a = JSON.parse(d), f = Date.now() - a.timestamp;
15229
- return f > Bi ? (localStorage.removeItem(Cn), null) : (console.log("[user-facts:persist] Loaded from localStorage (age:", Math.round(f / 6e4), "minutes)"), a.data);
15348
+ const a = JSON.parse(d), u = Date.now() - a.timestamp;
15349
+ return u > Bi ? (localStorage.removeItem(Cn), null) : (console.log("[user-facts:persist] Loaded from localStorage (age:", Math.round(u / 6e4), "minutes)"), a.data);
15230
15350
  } catch (d) {
15231
15351
  return console.warn("[user-facts:persist] Failed to load from storage:", d), null;
15232
15352
  }
@@ -15280,23 +15400,23 @@ async function ds(d = !1) {
15280
15400
  if (!d && ht && a - Wt < us)
15281
15401
  return console.log("[user-facts] Memory cache hit"), ht;
15282
15402
  if (!ht && a - Wt < Bi) {
15283
- const f = $i();
15284
- if (f)
15285
- return ht = f, Wt = Date.now() - 1e4, console.log("[user-facts] Using persisted fallback data"), f;
15403
+ const u = $i();
15404
+ if (u)
15405
+ return ht = u, Wt = Date.now() - 1e4, console.log("[user-facts] Using persisted fallback data"), u;
15286
15406
  }
15287
15407
  return console.log("[user-facts] Fetching fresh from API"), await fs();
15288
15408
  }
15289
15409
  async function hs(d) {
15290
15410
  return (await ds())?.facts?.[d];
15291
15411
  }
15292
- async function ps(d, a, f) {
15412
+ async function ps(d, a, u) {
15293
15413
  const c = await zi();
15294
15414
  console.log(`[user-facts:update] Updating ${d}`);
15295
15415
  try {
15296
- if (await c.putUserFact({ factName: d, nonce: f, value: a }), ht?.facts) {
15416
+ if (await c.putUserFact({ factName: d, nonce: u, value: a }), ht?.facts) {
15297
15417
  if (Array.isArray(ht.facts[d].items)) {
15298
- const p = ht.facts[d].items.findIndex((g) => g.nonce === f);
15299
- p !== -1 ? ht.facts[d].items[p].value = a : ht.facts[d].items.push({ nonce: f, value: a });
15418
+ const p = ht.facts[d].items.findIndex((g) => g.nonce === u);
15419
+ p !== -1 ? ht.facts[d].items[p].value = a : ht.facts[d].items.push({ nonce: u, value: a });
15300
15420
  } else
15301
15421
  ht.facts = {
15302
15422
  ...ht.facts,
@@ -15345,7 +15465,7 @@ class Yi extends Yt {
15345
15465
  this._initialized = !1;
15346
15466
  }
15347
15467
  render() {
15348
- const [a, f] = this.area, c = !!this.exportDataUrl;
15468
+ const [a, u] = this.area, c = !!this.exportDataUrl;
15349
15469
  return wt`
15350
15470
  <input
15351
15471
  id="file"
@@ -15358,7 +15478,7 @@ class Yi extends Yt {
15358
15478
  <div class="layout">
15359
15479
  <div class="cropper" style="${c ? "display: none" : ""}">
15360
15480
  <div id="image-cropper"
15361
- dimensions="${a}x${f}"
15481
+ dimensions="${a}x${u}"
15362
15482
  style="--cropper-size:${a}px"
15363
15483
  >
15364
15484
  ${this._lastFile ? null : this.renderPlaceholder()}
@@ -15384,35 +15504,41 @@ class Yi extends Yt {
15384
15504
 
15385
15505
  <div class="controls" style="${c ? "display: none" : ""}">
15386
15506
  ${this.allowRotate ? wt`
15387
- <button
15388
- class="rotate"
15389
- ?disabled=${this.busy || !this._lastFile}
15390
- @click=${() => this._rotate(90)}>
15391
- ${Sr} Rotate
15392
- </button>
15393
- <button
15394
- class="rotate"
15395
- ?disabled=${this.busy || !this._lastFile}
15396
- @click=${() => this._rotate(-90)}>
15397
- Rotate ${Dr}
15398
- </button>` : null}
15507
+ <div class="rotate-controls">
15508
+ <button
15509
+ class="rotate"
15510
+ ?disabled=${this.busy || !this._lastFile}
15511
+ @click=${() => this._rotate(90)}>
15512
+ ${Sr} Rotate
15513
+ </button>
15514
+ <button
15515
+ class="rotate"
15516
+ ?disabled=${this.busy || !this._lastFile}
15517
+ @click=${() => this._rotate(-90)}>
15518
+ Rotate ${Dr}
15519
+ </button>
15520
+ </div>` : null}
15399
15521
  ${this.allowZoom ? wt`
15522
+ <div class="zoom-controls">
15400
15523
  ${jr}
15401
- <input type="range"
15524
+ <input class="zoom" type="range"
15402
15525
  step=".05" min="0.1" max="5" value="1" id="zoom"
15403
15526
  .value=${this.zoom}
15404
15527
  ?disabled=${this.busy || !this._lastFile}
15405
15528
  @input=${this._handleZoomChange}
15406
15529
  >
15407
15530
  </input>
15408
- ${Ir}` : null}
15531
+ ${Ir}
15532
+ </div>` : null}
15409
15533
 
15410
- <button
15411
- ?disabled=${this.busy || !this.sourceInfo}
15412
- @click=${this._resetEditor}
15413
- >
15414
- Reset
15415
- </button>
15534
+ <div class="reset-controls">
15535
+ <button
15536
+ ?disabled=${this.busy || !this.sourceInfo}
15537
+ @click=${this._resetEditor}
15538
+ >
15539
+ Reset
15540
+ </button>
15541
+ </div>
15416
15542
  </div>
15417
15543
 
15418
15544
  <div class="nav">
@@ -15472,8 +15598,8 @@ class Yi extends Yt {
15472
15598
  async _getCurrentImage() {
15473
15599
  const a = await hs("profile_picture");
15474
15600
  console.log(a);
15475
- const f = a?.item?.value || fi;
15476
- console.log(f), this.currentImage = f, this.requestUpdate();
15601
+ const u = a?.item?.value || fi;
15602
+ console.log(u), this.currentImage = u, this.requestUpdate();
15477
15603
  }
15478
15604
  _openFilePicker() {
15479
15605
  this.errorMessage = "", this.renderRoot.querySelector("#file")?.click();
@@ -15481,29 +15607,34 @@ class Yi extends Yt {
15481
15607
  _initCropper() {
15482
15608
  if (this._initialized) return;
15483
15609
  const a = this.renderRoot.querySelector("#image-cropper");
15484
- a && (this._cropperFn(a, {
15485
- area: this.area,
15610
+ if (!a) return;
15611
+ const u = [
15612
+ Math.min(this.area[0], a.parentElement.clientWidth),
15613
+ Math.min(this.area[1], a.parentElement.clientHeight)
15614
+ ];
15615
+ console.log("area: ", u), this._cropperFn(a, {
15616
+ area: u,
15486
15617
  crop: this.crop,
15487
15618
  onchange: () => {
15488
15619
  this.exportDataUrl = null, this.errorMessage = "", this._setCropVisibility(!0), this._lockCropToSquare();
15489
15620
  }
15490
- }), this._cropperHost = a, this._cropperApi = a.crop, this._installCropperGuards(), this._setCropVisibility(!1), this._lockCropToSquare(), this._initialized = !0);
15621
+ }), this._cropperHost = a, this._cropperApi = a.crop, this._installCropperGuards(), this._setCropVisibility(!1), this._lockCropToSquare(), this._initialized = !0;
15491
15622
  }
15492
15623
  _handleZoomChange(a) {
15493
15624
  if (!this.allowZoom || !this._cropperApi?.zoom || !this.sourceInfo) return;
15494
- const f = Number.parseFloat(a.target.value);
15495
- Number.isFinite(f) && (this.zoom = f, this.exportDataUrl = null, this.errorMessage = "", this._cropperApi.zoom(f));
15625
+ const u = Number.parseFloat(a.target.value);
15626
+ Number.isFinite(u) && (this.zoom = u, this.exportDataUrl = null, this.errorMessage = "", this._cropperApi.zoom(u));
15496
15627
  }
15497
15628
  _installCropperGuards() {
15498
15629
  if (!this._cropperHost) return;
15499
15630
  this._wheelCleanup?.(), this._wheelCleanup = null, this._cropperGuardsCleanup?.(), this._cropperGuardsCleanup = null;
15500
- const a = [], f = (j) => {
15631
+ const a = [], u = (j) => {
15501
15632
  j.preventDefault(), j.stopPropagation();
15502
15633
  };
15503
- this._cropperHost.addEventListener("wheel", f, {
15634
+ this._cropperHost.addEventListener("wheel", u, {
15504
15635
  capture: !0,
15505
15636
  passive: !1
15506
- }), a.push(() => this._cropperHost?.removeEventListener("wheel", f, { capture: !0 }));
15637
+ }), a.push(() => this._cropperHost?.removeEventListener("wheel", u, { capture: !0 }));
15507
15638
  const c = (j) => {
15508
15639
  j.target?.closest?.(".placeholder") || this._lastFile || (j.preventDefault(), j.stopPropagation(), j.stopImmediatePropagation?.());
15509
15640
  }, p = (j) => {
@@ -15523,17 +15654,17 @@ class Yi extends Yt {
15523
15654
  }
15524
15655
  _setCropVisibility(a) {
15525
15656
  if (!this._cropperHost) return;
15526
- const f = this._cropperHost.querySelector(".jcrop-area");
15527
- f && (f.style.display = a ? "block" : "none");
15657
+ const u = this._cropperHost.querySelector(".jcrop-area");
15658
+ u && (u.style.display = a ? "block" : "none");
15528
15659
  }
15529
15660
  _lockCropToSquare() {
15530
15661
  if (!this._cropperHost) return;
15531
15662
  this._cropLockCleanup?.(), this._cropLockCleanup = null;
15532
- const a = this._cropperHost, f = () => a.querySelector(".jcrop-area") || a.querySelector("[class*='crop' i][style*='width']") || a.querySelector("[class*='select' i][style*='width']");
15533
- let c = f();
15663
+ const a = this._cropperHost, u = () => a.querySelector(".jcrop-area") || a.querySelector("[class*='crop' i][style*='width']") || a.querySelector("[class*='select' i][style*='width']");
15664
+ let c = u();
15534
15665
  if (!c) {
15535
15666
  const p = new MutationObserver(() => {
15536
- c = f(), c && (p.disconnect(), this._applySquareLock(c));
15667
+ c = u(), c && (p.disconnect(), this._applySquareLock(c));
15537
15668
  });
15538
15669
  p.observe(a, { childList: !0, subtree: !0 }), this._cropLockCleanup = () => p.disconnect();
15539
15670
  return;
@@ -15542,16 +15673,16 @@ class Yi extends Yt {
15542
15673
  }
15543
15674
  _applySquareLock(a) {
15544
15675
  this._ensureCircleGuide(a);
15545
- const f = () => {
15676
+ const u = () => {
15546
15677
  const g = a.getBoundingClientRect(), N = Math.round(Math.min(g.width, g.height));
15547
15678
  if (!N) return;
15548
15679
  const j = Math.round(g.width), V = Math.round(g.height);
15549
15680
  j === N && V === N || (a.style.width = `${N}px`, a.style.height = `${N}px`);
15550
15681
  };
15551
- f();
15552
- const c = new ResizeObserver(() => f());
15682
+ u();
15683
+ const c = new ResizeObserver(() => u());
15553
15684
  c.observe(a);
15554
- const p = () => f();
15685
+ const p = () => u();
15555
15686
  a.addEventListener("pointerup", p), this._cropLockCleanup = () => {
15556
15687
  c.disconnect(), a.removeEventListener("pointerup", p);
15557
15688
  };
@@ -15565,16 +15696,16 @@ class Yi extends Yt {
15565
15696
  height: this._sourceHeight,
15566
15697
  mime: a.type
15567
15698
  };
15568
- } catch (f) {
15569
- this._lastFile = null, this.rotation = 0, this.sourceInfo = null, this.exportDataUrl = null, this._setCropVisibility(!1), this.errorMessage = f?.message ?? String(f);
15699
+ } catch (u) {
15700
+ this._lastFile = null, this.rotation = 0, this.sourceInfo = null, this.exportDataUrl = null, this._setCropVisibility(!1), this.errorMessage = u?.message ?? String(u);
15570
15701
  } finally {
15571
15702
  this.busy = !1;
15572
15703
  }
15573
15704
  }
15574
15705
  }
15575
15706
  async _onFileChange(a) {
15576
- const f = a.target.files?.[0];
15577
- a.target.value = "", await this._handleIncomingFile(f);
15707
+ const u = a.target.files?.[0];
15708
+ a.target.value = "", await this._handleIncomingFile(u);
15578
15709
  }
15579
15710
  async _resetEditor() {
15580
15711
  if (!this.busy && this._cropperApi && this._lastFile)
@@ -15591,17 +15722,17 @@ class Yi extends Yt {
15591
15722
  throw new Error("Unsupported file type. Please upload JPEG, PNG, or WebP.");
15592
15723
  if (a.size > this.maxUploadBytes)
15593
15724
  throw new Error(`File is too large. Max upload is ${Math.round(this.maxUploadBytes / (1024 * 1024))}MB.`);
15594
- const { width: f, height: c } = await this._decodeProbe(a);
15595
- if (f < this.outputSize || c < this.outputSize)
15725
+ const { width: u, height: c } = await this._decodeProbe(a);
15726
+ if (u < this.outputSize || c < this.outputSize)
15596
15727
  throw new Error(`Image is too small. Minimum is ${this.outputSize}×${this.outputSize}.`);
15597
- if (f * c > this.maxPixels)
15728
+ if (u * c > this.maxPixels)
15598
15729
  throw new Error("Image is too large (pixel count). Please use a smaller image.");
15599
- this._sourceWidth = f, this._sourceHeight = c;
15730
+ this._sourceWidth = u, this._sourceHeight = c;
15600
15731
  }
15601
15732
  _ensureCircleGuide(a) {
15602
15733
  if (!a) return;
15603
- let f = a.querySelector(".circle-guide");
15604
- f || (f = document.createElement("div"), f.className = "circle-guide", a.appendChild(f));
15734
+ let u = a.querySelector(".circle-guide");
15735
+ u || (u = document.createElement("div"), u.className = "circle-guide", a.appendChild(u));
15605
15736
  }
15606
15737
  async _decodeProbe(a) {
15607
15738
  if ("createImageBitmap" in window)
@@ -15610,12 +15741,12 @@ class Yi extends Yt {
15610
15741
  return c.close?.(), { width: p, height: g };
15611
15742
  } catch {
15612
15743
  }
15613
- const f = URL.createObjectURL(a);
15744
+ const u = URL.createObjectURL(a);
15614
15745
  try {
15615
- const c = await this._loadImage(f);
15746
+ const c = await this._loadImage(u);
15616
15747
  return { width: c.naturalWidth, height: c.naturalHeight };
15617
15748
  } finally {
15618
- URL.revokeObjectURL(f);
15749
+ URL.revokeObjectURL(u);
15619
15750
  }
15620
15751
  }
15621
15752
  async _loadFileIntoCropper(a) {
@@ -15625,13 +15756,13 @@ class Yi extends Yt {
15625
15756
  try {
15626
15757
  this._cropperApi.addFromFile(a);
15627
15758
  } catch {
15628
- const f = this.renderRoot.querySelector("#file");
15629
- this._cropperApi.addFromFile(f);
15759
+ const u = this.renderRoot.querySelector("#file");
15760
+ this._cropperApi.addFromFile(u);
15630
15761
  }
15631
15762
  }
15632
15763
  _rotate(a) {
15633
15764
  if (!this.allowRotate || !this._cropperApi.rotate) return;
15634
- const f = (this.rotation + a + 360) % 360, c = Math.round(f / 90) * 90 % 360;
15765
+ const u = (this.rotation + a + 360) % 360, c = Math.round(u / 90) * 90 % 360;
15635
15766
  this.rotation = c, this.exportDataUrl = null, this.errorMessage = "";
15636
15767
  const p = c / 180;
15637
15768
  this._cropperApi.rotate(p), this._rotationAppliedInEditor = !0;
@@ -15642,8 +15773,8 @@ class Yi extends Yt {
15642
15773
  this.busy = !0;
15643
15774
  const a = this._getCropState();
15644
15775
  this._validateCropState(a);
15645
- const { dataUrl: f, mime: c } = await this._renderAndEncode(a);
15646
- this._validateOutputDataUrl(f, c), await this._validateRedecode(f), this._checkLocalStorageQuotaRisk(f), this.exportDataUrl = f;
15776
+ const { dataUrl: u, mime: c } = await this._renderAndEncode(a);
15777
+ this._validateOutputDataUrl(u, c), await this._validateRedecode(u), this._checkLocalStorageQuotaRisk(u), this.exportDataUrl = u;
15647
15778
  } catch (a) {
15648
15779
  this.exportDataUrl = null, this.errorMessage = a?.message ?? String(a);
15649
15780
  } finally {
@@ -15651,13 +15782,13 @@ class Yi extends Yt {
15651
15782
  }
15652
15783
  }
15653
15784
  _getCropState() {
15654
- const a = this._cropperApi, f = a?.getSelectionCoordinates?.() ?? null, c = a?.getCroppedImage?.() ?? null;
15655
- return { api: a, state: f, cropped: c };
15785
+ const a = this._cropperApi, u = a?.getSelectionCoordinates?.() ?? null, c = a?.getCroppedImage?.() ?? null;
15786
+ return { api: a, state: u, cropped: c };
15656
15787
  }
15657
- _validateCropState({ api: a, state: f }) {
15788
+ _validateCropState({ api: a, state: u }) {
15658
15789
  if (!a) throw new Error("Cropper not ready.");
15659
- if (f?.width && f?.height) {
15660
- const p = f.width / f.height;
15790
+ if (u?.width && u?.height) {
15791
+ const p = u.width / u.height;
15661
15792
  if (Math.abs(p - 1) > 0.01)
15662
15793
  throw new Error("Crop must be a 1:1 square.");
15663
15794
  }
@@ -15665,7 +15796,7 @@ class Yi extends Yt {
15665
15796
  if (!(!c || !c.width || !c.height) && (c.width < this.outputSize || c.height < this.outputSize))
15666
15797
  throw new Error("Zoom is too far in: export would upscale.");
15667
15798
  }
15668
- async _renderAndEncode({ api: a, cropped: f }) {
15799
+ async _renderAndEncode({ api: a, cropped: u }) {
15669
15800
  const c = document.createElement("canvas");
15670
15801
  c.width = this.outputSize, c.height = this.outputSize;
15671
15802
  const p = c.getContext("2d", { alpha: !0 });
@@ -15674,7 +15805,7 @@ class Yi extends Yt {
15674
15805
  if (g && typeof g.width == "number" && g.width > 0 && typeof g.height == "number" && g.height > 0)
15675
15806
  p.drawImage(g, 0, 0, this.outputSize, this.outputSize);
15676
15807
  else {
15677
- const X = f ?? a?.getCroppedImage?.();
15808
+ const X = u ?? a?.getCroppedImage?.();
15678
15809
  if (!X?.src)
15679
15810
  throw new Error("Unable to read cropped image from cropper.");
15680
15811
  const W = await this._loadImage(X.src);
@@ -15686,19 +15817,19 @@ class Yi extends Yt {
15686
15817
  _pickOutputMime() {
15687
15818
  return document.createElement("canvas").toDataURL("image/webp").startsWith("data:image/webp") ? "image/webp" : "image/jpeg";
15688
15819
  }
15689
- _validateOutputDataUrl(a, f) {
15820
+ _validateOutputDataUrl(a, u) {
15690
15821
  const p = {
15691
15822
  "image/webp": "data:image/webp;base64,",
15692
15823
  "image/jpeg": "data:image/jpeg;base64,",
15693
15824
  "image/png": "data:image/png;base64,"
15694
- }[f];
15825
+ }[u];
15695
15826
  if (!p || !a.startsWith(p))
15696
15827
  throw new Error("Export format mismatch or invalid base64 data URL.");
15697
15828
  if (a.length > this.maxBase64Bytes)
15698
15829
  throw new Error("Export is too large for storage. Try zooming out or use a different image.");
15699
15830
  }
15700
15831
  async _validateRedecode(a) {
15701
- const f = await this._loadImage(a), c = f.naturalWidth, p = f.naturalHeight;
15832
+ const u = await this._loadImage(a), c = u.naturalWidth, p = u.naturalHeight;
15702
15833
  if (c !== this.outputSize || p !== this.outputSize)
15703
15834
  throw new Error(`Export decode check failed: expected ${this.outputSize}×${this.outputSize}, got ${c}×${p}.`);
15704
15835
  }
@@ -15707,24 +15838,24 @@ class Yi extends Yt {
15707
15838
  throw new Error("Export is very large and may exceed browser storage limits.");
15708
15839
  }
15709
15840
  async _loadImage(a) {
15710
- return new Promise((f, c) => {
15841
+ return new Promise((u, c) => {
15711
15842
  const p = new Image();
15712
- p.onload = () => f(p), p.onerror = () => c(new Error("Image decode failed.")), p.src = a;
15843
+ p.onload = () => u(p), p.onerror = () => c(new Error("Image decode failed.")), p.src = a;
15713
15844
  });
15714
15845
  }
15715
- _clamp(a, f, c) {
15716
- return Math.min(c, Math.max(f, a));
15846
+ _clamp(a, u, c) {
15847
+ return Math.min(c, Math.max(u, a));
15717
15848
  }
15718
- _useExported() {
15719
- console.log("new image URL:", this.exportDataUrl), ps("profile_picture", this.exportDataUrl), window.dispatchEvent(new CustomEvent("wral:profile-picture-saved", {
15849
+ async _useExported() {
15850
+ console.log("new image URL:", this.exportDataUrl), await ps("profile_picture", this.exportDataUrl), window.dispatchEvent(new CustomEvent("wral:profile-picture-saved", {
15720
15851
  detail: { src: this.exportDataUrl }
15721
15852
  })), this._closeEditor();
15722
15853
  }
15723
15854
  }
15724
15855
  customElements.define("wral-profile-image-editor", Yi);
15725
15856
  var vs = /* @__PURE__ */ (function() {
15726
- function d(f) {
15727
- var c = f || {}, p = c.ValidationData, g = c.Username, N = c.Password, j = c.AuthParameters, V = c.ClientMetadata;
15857
+ function d(u) {
15858
+ var c = u || {}, p = c.ValidationData, g = c.Username, N = c.Password, j = c.AuthParameters, V = c.ClientMetadata;
15728
15859
  this.validationData = p || {}, this.authParameters = j || {}, this.clientMetadata = V || {}, this.username = g, this.password = N;
15729
15860
  }
15730
15861
  var a = d.prototype;
@@ -15743,7 +15874,7 @@ var vs = /* @__PURE__ */ (function() {
15743
15874
  function ys() {
15744
15875
  if (di) return Ot;
15745
15876
  di = 1, Ot.byteLength = j, Ot.toByteArray = b, Ot.fromByteArray = pe;
15746
- for (var d = [], a = [], f = typeof Uint8Array < "u" ? Uint8Array : Array, c = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", p = 0, g = c.length; p < g; ++p)
15877
+ for (var d = [], a = [], u = typeof Uint8Array < "u" ? Uint8Array : Array, c = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", p = 0, g = c.length; p < g; ++p)
15747
15878
  d[p] = c[p], a[c.charCodeAt(p)] = p;
15748
15879
  a[45] = 62, a[95] = 63;
15749
15880
  function N($) {
@@ -15763,7 +15894,7 @@ function ys() {
15763
15894
  return (Le + me) * 3 / 4 - me;
15764
15895
  }
15765
15896
  function b($) {
15766
- var Le, me = N($), he = me[0], re = me[1], Se = new f(V($, he, re)), Ee = 0, He = re > 0 ? he - 4 : he, ce;
15897
+ var Le, me = N($), he = me[0], re = me[1], Se = new u(V($, he, re)), Ee = 0, He = re > 0 ? he - 4 : he, ce;
15767
15898
  for (ce = 0; ce < He; ce += 4)
15768
15899
  Le = a[$.charCodeAt(ce)] << 18 | a[$.charCodeAt(ce + 1)] << 12 | a[$.charCodeAt(ce + 2)] << 6 | a[$.charCodeAt(ce + 3)], Se[Ee++] = Le >> 16 & 255, Se[Ee++] = Le >> 8 & 255, Se[Ee++] = Le & 255;
15769
15900
  return re === 2 && (Le = a[$.charCodeAt(ce)] << 2 | a[$.charCodeAt(ce + 1)] >> 4, Se[Ee++] = Le & 255), re === 1 && (Le = a[$.charCodeAt(ce)] << 10 | a[$.charCodeAt(ce + 1)] << 4 | a[$.charCodeAt(ce + 2)] >> 2, Se[Ee++] = Le >> 8 & 255, Se[Ee++] = Le & 255), Se;
@@ -15790,8 +15921,8 @@ function ys() {
15790
15921
  var tn = {};
15791
15922
  var hi;
15792
15923
  function ws() {
15793
- return hi || (hi = 1, tn.read = function(d, a, f, c, p) {
15794
- var g, N, j = p * 8 - c - 1, V = (1 << j) - 1, b = V >> 1, X = -7, W = f ? p - 1 : 0, pe = f ? -1 : 1, $ = d[a + W];
15924
+ return hi || (hi = 1, tn.read = function(d, a, u, c, p) {
15925
+ var g, N, j = p * 8 - c - 1, V = (1 << j) - 1, b = V >> 1, X = -7, W = u ? p - 1 : 0, pe = u ? -1 : 1, $ = d[a + W];
15795
15926
  for (W += pe, g = $ & (1 << -X) - 1, $ >>= -X, X += j; X > 0; g = g * 256 + d[a + W], W += pe, X -= 8)
15796
15927
  ;
15797
15928
  for (N = g & (1 << -X) - 1, g >>= -X, X += c; X > 0; N = N * 256 + d[a + W], W += pe, X -= 8)
@@ -15804,13 +15935,13 @@ function ws() {
15804
15935
  N = N + Math.pow(2, c), g = g - b;
15805
15936
  }
15806
15937
  return ($ ? -1 : 1) * N * Math.pow(2, g - c);
15807
- }, tn.write = function(d, a, f, c, p, g) {
15938
+ }, tn.write = function(d, a, u, c, p, g) {
15808
15939
  var N, j, V, b = g * 8 - p - 1, X = (1 << b) - 1, W = X >> 1, pe = p === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, $ = c ? 0 : g - 1, Le = c ? 1 : -1, me = a < 0 || a === 0 && 1 / a < 0 ? 1 : 0;
15809
- for (a = Math.abs(a), isNaN(a) || a === 1 / 0 ? (j = isNaN(a) ? 1 : 0, N = X) : (N = Math.floor(Math.log(a) / Math.LN2), a * (V = Math.pow(2, -N)) < 1 && (N--, V *= 2), N + W >= 1 ? a += pe / V : a += pe * Math.pow(2, 1 - W), a * V >= 2 && (N++, V /= 2), N + W >= X ? (j = 0, N = X) : N + W >= 1 ? (j = (a * V - 1) * Math.pow(2, p), N = N + W) : (j = a * Math.pow(2, W - 1) * Math.pow(2, p), N = 0)); p >= 8; d[f + $] = j & 255, $ += Le, j /= 256, p -= 8)
15940
+ for (a = Math.abs(a), isNaN(a) || a === 1 / 0 ? (j = isNaN(a) ? 1 : 0, N = X) : (N = Math.floor(Math.log(a) / Math.LN2), a * (V = Math.pow(2, -N)) < 1 && (N--, V *= 2), N + W >= 1 ? a += pe / V : a += pe * Math.pow(2, 1 - W), a * V >= 2 && (N++, V /= 2), N + W >= X ? (j = 0, N = X) : N + W >= 1 ? (j = (a * V - 1) * Math.pow(2, p), N = N + W) : (j = a * Math.pow(2, W - 1) * Math.pow(2, p), N = 0)); p >= 8; d[u + $] = j & 255, $ += Le, j /= 256, p -= 8)
15810
15941
  ;
15811
- for (N = N << p | j, b += p; b > 0; d[f + $] = N & 255, $ += Le, N /= 256, b -= 8)
15942
+ for (N = N << p | j, b += p; b > 0; d[u + $] = N & 255, $ += Le, N /= 256, b -= 8)
15812
15943
  ;
15813
- d[f + $ - Le] |= me * 128;
15944
+ d[u + $ - Le] |= me * 128;
15814
15945
  }), tn;
15815
15946
  }
15816
15947
  var gn, pi;
@@ -15825,7 +15956,7 @@ function bs() {
15825
15956
  var gi;
15826
15957
  function xs() {
15827
15958
  return gi || (gi = 1, (function(d) {
15828
- var a = ys(), f = ws(), c = bs();
15959
+ var a = ys(), u = ws(), c = bs();
15829
15960
  d.Buffer = j, d.SlowBuffer = re, d.INSPECT_MAX_BYTES = 50, j.TYPED_ARRAY_SUPPORT = ri.TYPED_ARRAY_SUPPORT !== void 0 ? ri.TYPED_ARRAY_SUPPORT : p(), d.kMaxLength = g();
15830
15961
  function p() {
15831
15962
  try {
@@ -16352,13 +16483,13 @@ function xs() {
16352
16483
  }, j.prototype.readInt32BE = function(T, A) {
16353
16484
  return A || Me(T, 4, this.length), this[T] << 24 | this[T + 1] << 16 | this[T + 2] << 8 | this[T + 3];
16354
16485
  }, j.prototype.readFloatLE = function(T, A) {
16355
- return A || Me(T, 4, this.length), f.read(this, T, !0, 23, 4);
16486
+ return A || Me(T, 4, this.length), u.read(this, T, !0, 23, 4);
16356
16487
  }, j.prototype.readFloatBE = function(T, A) {
16357
- return A || Me(T, 4, this.length), f.read(this, T, !1, 23, 4);
16488
+ return A || Me(T, 4, this.length), u.read(this, T, !1, 23, 4);
16358
16489
  }, j.prototype.readDoubleLE = function(T, A) {
16359
- return A || Me(T, 8, this.length), f.read(this, T, !0, 52, 8);
16490
+ return A || Me(T, 8, this.length), u.read(this, T, !0, 52, 8);
16360
16491
  }, j.prototype.readDoubleBE = function(T, A) {
16361
- return A || Me(T, 8, this.length), f.read(this, T, !1, 52, 8);
16492
+ return A || Me(T, 8, this.length), u.read(this, T, !1, 52, 8);
16362
16493
  };
16363
16494
  function Xe(te, T, A, le, Te, G) {
16364
16495
  if (!j.isBuffer(te)) throw new TypeError('"buffer" argument must be a Buffer instance');
@@ -16439,7 +16570,7 @@ function xs() {
16439
16570
  if (A < 0) throw new RangeError("Index out of range");
16440
16571
  }
16441
16572
  function tt(te, T, A, le, Te) {
16442
- return Te || Qe(te, T, A, 4), f.write(te, T, A, le, 23, 4), A + 4;
16573
+ return Te || Qe(te, T, A, 4), u.write(te, T, A, le, 23, 4), A + 4;
16443
16574
  }
16444
16575
  j.prototype.writeFloatLE = function(T, A, le) {
16445
16576
  return tt(this, T, A, !0, le);
@@ -16447,7 +16578,7 @@ function xs() {
16447
16578
  return tt(this, T, A, !1, le);
16448
16579
  };
16449
16580
  function De(te, T, A, le, Te) {
16450
- return Te || Qe(te, T, A, 8), f.write(te, T, A, le, 52, 8), A + 8;
16581
+ return Te || Qe(te, T, A, 8), u.write(te, T, A, le, 52, 8), A + 8;
16451
16582
  }
16452
16583
  j.prototype.writeDoubleLE = function(T, A, le) {
16453
16584
  return De(this, T, A, !0, le);
@@ -16612,15 +16743,15 @@ function Cs() {
16612
16743
  throw new Error("Native crypto module could not be used to get secure random number.");
16613
16744
  }
16614
16745
  function Es(d) {
16615
- for (var a = d.words, f = d.sigBytes, c = [], p = 0; p < f; p++) {
16746
+ for (var a = d.words, u = d.sigBytes, c = [], p = 0; p < u; p++) {
16616
16747
  var g = a[p >>> 2] >>> 24 - p % 4 * 8 & 255;
16617
16748
  c.push((g >>> 4).toString(16)), c.push((g & 15).toString(16));
16618
16749
  }
16619
16750
  return c.join("");
16620
16751
  }
16621
16752
  var Wi = /* @__PURE__ */ (function() {
16622
- function d(f, c) {
16623
- f = this.words = f || [], c != null ? this.sigBytes = c : this.sigBytes = f.length * 4;
16753
+ function d(u, c) {
16754
+ u = this.words = u || [], c != null ? this.sigBytes = c : this.sigBytes = u.length * 4;
16624
16755
  }
16625
16756
  var a = d.prototype;
16626
16757
  return a.random = function(c) {
@@ -16632,57 +16763,57 @@ var Wi = /* @__PURE__ */ (function() {
16632
16763
  }, d;
16633
16764
  })(), mn = {};
16634
16765
  var En = function(d, a) {
16635
- return En = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(f, c) {
16636
- f.__proto__ = c;
16637
- } || function(f, c) {
16638
- for (var p in c) c.hasOwnProperty(p) && (f[p] = c[p]);
16766
+ return En = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(u, c) {
16767
+ u.__proto__ = c;
16768
+ } || function(u, c) {
16769
+ for (var p in c) c.hasOwnProperty(p) && (u[p] = c[p]);
16639
16770
  }, En(d, a);
16640
16771
  };
16641
16772
  function Ls(d, a) {
16642
16773
  En(d, a);
16643
- function f() {
16774
+ function u() {
16644
16775
  this.constructor = d;
16645
16776
  }
16646
- d.prototype = a === null ? Object.create(a) : (f.prototype = a.prototype, new f());
16777
+ d.prototype = a === null ? Object.create(a) : (u.prototype = a.prototype, new u());
16647
16778
  }
16648
16779
  var Ln = function() {
16649
16780
  return Ln = Object.assign || function(a) {
16650
- for (var f, c = 1, p = arguments.length; c < p; c++) {
16651
- f = arguments[c];
16652
- for (var g in f) Object.prototype.hasOwnProperty.call(f, g) && (a[g] = f[g]);
16781
+ for (var u, c = 1, p = arguments.length; c < p; c++) {
16782
+ u = arguments[c];
16783
+ for (var g in u) Object.prototype.hasOwnProperty.call(u, g) && (a[g] = u[g]);
16653
16784
  }
16654
16785
  return a;
16655
16786
  }, Ln.apply(this, arguments);
16656
16787
  };
16657
16788
  function As(d, a) {
16658
- var f = {};
16659
- for (var c in d) Object.prototype.hasOwnProperty.call(d, c) && a.indexOf(c) < 0 && (f[c] = d[c]);
16789
+ var u = {};
16790
+ for (var c in d) Object.prototype.hasOwnProperty.call(d, c) && a.indexOf(c) < 0 && (u[c] = d[c]);
16660
16791
  if (d != null && typeof Object.getOwnPropertySymbols == "function")
16661
16792
  for (var p = 0, c = Object.getOwnPropertySymbols(d); p < c.length; p++)
16662
- a.indexOf(c[p]) < 0 && Object.prototype.propertyIsEnumerable.call(d, c[p]) && (f[c[p]] = d[c[p]]);
16663
- return f;
16793
+ a.indexOf(c[p]) < 0 && Object.prototype.propertyIsEnumerable.call(d, c[p]) && (u[c[p]] = d[c[p]]);
16794
+ return u;
16664
16795
  }
16665
- function Ts(d, a, f, c) {
16666
- var p = arguments.length, g = p < 3 ? a : c === null ? c = Object.getOwnPropertyDescriptor(a, f) : c, N;
16667
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function") g = Reflect.decorate(d, a, f, c);
16668
- else for (var j = d.length - 1; j >= 0; j--) (N = d[j]) && (g = (p < 3 ? N(g) : p > 3 ? N(a, f, g) : N(a, f)) || g);
16669
- return p > 3 && g && Object.defineProperty(a, f, g), g;
16796
+ function Ts(d, a, u, c) {
16797
+ var p = arguments.length, g = p < 3 ? a : c === null ? c = Object.getOwnPropertyDescriptor(a, u) : c, N;
16798
+ if (typeof Reflect == "object" && typeof Reflect.decorate == "function") g = Reflect.decorate(d, a, u, c);
16799
+ else for (var j = d.length - 1; j >= 0; j--) (N = d[j]) && (g = (p < 3 ? N(g) : p > 3 ? N(a, u, g) : N(a, u)) || g);
16800
+ return p > 3 && g && Object.defineProperty(a, u, g), g;
16670
16801
  }
16671
16802
  function Ss(d, a) {
16672
- return function(f, c) {
16673
- a(f, c, d);
16803
+ return function(u, c) {
16804
+ a(u, c, d);
16674
16805
  };
16675
16806
  }
16676
16807
  function Ds(d, a) {
16677
16808
  if (typeof Reflect == "object" && typeof Reflect.metadata == "function") return Reflect.metadata(d, a);
16678
16809
  }
16679
- function js(d, a, f, c) {
16810
+ function js(d, a, u, c) {
16680
16811
  function p(g) {
16681
- return g instanceof f ? g : new f(function(N) {
16812
+ return g instanceof u ? g : new u(function(N) {
16682
16813
  N(g);
16683
16814
  });
16684
16815
  }
16685
- return new (f || (f = Promise))(function(g, N) {
16816
+ return new (u || (u = Promise))(function(g, N) {
16686
16817
  function j(X) {
16687
16818
  try {
16688
16819
  b(c.next(X));
@@ -16704,7 +16835,7 @@ function js(d, a, f, c) {
16704
16835
  });
16705
16836
  }
16706
16837
  function Is(d, a) {
16707
- var f = { label: 0, sent: function() {
16838
+ var u = { label: 0, sent: function() {
16708
16839
  if (g[0] & 1) throw g[1];
16709
16840
  return g[1];
16710
16841
  }, trys: [], ops: [] }, c, p, g, N;
@@ -16718,7 +16849,7 @@ function Is(d, a) {
16718
16849
  }
16719
16850
  function V(b) {
16720
16851
  if (c) throw new TypeError("Generator is already executing.");
16721
- for (; f; ) try {
16852
+ for (; u; ) try {
16722
16853
  if (c = 1, p && (g = b[0] & 2 ? p.return : b[0] ? p.throw || ((g = p.return) && g.call(p), 0) : p.next) && !(g = g.call(p, b[1])).done) return g;
16723
16854
  switch (p = 0, g && (b = [b[0] & 2, g.value]), b[0]) {
16724
16855
  case 0:
@@ -16726,34 +16857,34 @@ function Is(d, a) {
16726
16857
  g = b;
16727
16858
  break;
16728
16859
  case 4:
16729
- return f.label++, { value: b[1], done: !1 };
16860
+ return u.label++, { value: b[1], done: !1 };
16730
16861
  case 5:
16731
- f.label++, p = b[1], b = [0];
16862
+ u.label++, p = b[1], b = [0];
16732
16863
  continue;
16733
16864
  case 7:
16734
- b = f.ops.pop(), f.trys.pop();
16865
+ b = u.ops.pop(), u.trys.pop();
16735
16866
  continue;
16736
16867
  default:
16737
- if (g = f.trys, !(g = g.length > 0 && g[g.length - 1]) && (b[0] === 6 || b[0] === 2)) {
16738
- f = 0;
16868
+ if (g = u.trys, !(g = g.length > 0 && g[g.length - 1]) && (b[0] === 6 || b[0] === 2)) {
16869
+ u = 0;
16739
16870
  continue;
16740
16871
  }
16741
16872
  if (b[0] === 3 && (!g || b[1] > g[0] && b[1] < g[3])) {
16742
- f.label = b[1];
16873
+ u.label = b[1];
16743
16874
  break;
16744
16875
  }
16745
- if (b[0] === 6 && f.label < g[1]) {
16746
- f.label = g[1], g = b;
16876
+ if (b[0] === 6 && u.label < g[1]) {
16877
+ u.label = g[1], g = b;
16747
16878
  break;
16748
16879
  }
16749
- if (g && f.label < g[2]) {
16750
- f.label = g[2], f.ops.push(b);
16880
+ if (g && u.label < g[2]) {
16881
+ u.label = g[2], u.ops.push(b);
16751
16882
  break;
16752
16883
  }
16753
- g[2] && f.ops.pop(), f.trys.pop();
16884
+ g[2] && u.ops.pop(), u.trys.pop();
16754
16885
  continue;
16755
16886
  }
16756
- b = a.call(d, f);
16887
+ b = a.call(d, u);
16757
16888
  } catch (X) {
16758
16889
  b = [6, X], p = 0;
16759
16890
  } finally {
@@ -16763,15 +16894,15 @@ function Is(d, a) {
16763
16894
  return { value: b[0] ? b[1] : void 0, done: !0 };
16764
16895
  }
16765
16896
  }
16766
- function ks(d, a, f, c) {
16767
- c === void 0 && (c = f), d[c] = a[f];
16897
+ function ks(d, a, u, c) {
16898
+ c === void 0 && (c = u), d[c] = a[u];
16768
16899
  }
16769
16900
  function Ms(d, a) {
16770
- for (var f in d) f !== "default" && !a.hasOwnProperty(f) && (a[f] = d[f]);
16901
+ for (var u in d) u !== "default" && !a.hasOwnProperty(u) && (a[u] = d[u]);
16771
16902
  }
16772
16903
  function An(d) {
16773
- var a = typeof Symbol == "function" && Symbol.iterator, f = a && d[a], c = 0;
16774
- if (f) return f.call(d);
16904
+ var a = typeof Symbol == "function" && Symbol.iterator, u = a && d[a], c = 0;
16905
+ if (u) return u.call(d);
16775
16906
  if (d && typeof d.length == "number") return {
16776
16907
  next: function() {
16777
16908
  return d && c >= d.length && (d = void 0), { value: d && d[c++], done: !d };
@@ -16780,16 +16911,16 @@ function An(d) {
16780
16911
  throw new TypeError(a ? "Object is not iterable." : "Symbol.iterator is not defined.");
16781
16912
  }
16782
16913
  function qi(d, a) {
16783
- var f = typeof Symbol == "function" && d[Symbol.iterator];
16784
- if (!f) return d;
16785
- var c = f.call(d), p, g = [], N;
16914
+ var u = typeof Symbol == "function" && d[Symbol.iterator];
16915
+ if (!u) return d;
16916
+ var c = u.call(d), p, g = [], N;
16786
16917
  try {
16787
16918
  for (; (a === void 0 || a-- > 0) && !(p = c.next()).done; ) g.push(p.value);
16788
16919
  } catch (j) {
16789
16920
  N = { error: j };
16790
16921
  } finally {
16791
16922
  try {
16792
- p && !p.done && (f = c.return) && f.call(c);
16923
+ p && !p.done && (u = c.return) && u.call(c);
16793
16924
  } finally {
16794
16925
  if (N) throw N.error;
16795
16926
  }
@@ -16802,8 +16933,8 @@ function Ns() {
16802
16933
  return d;
16803
16934
  }
16804
16935
  function Fs() {
16805
- for (var d = 0, a = 0, f = arguments.length; a < f; a++) d += arguments[a].length;
16806
- for (var c = Array(d), p = 0, a = 0; a < f; a++)
16936
+ for (var d = 0, a = 0, u = arguments.length; a < u; a++) d += arguments[a].length;
16937
+ for (var c = Array(d), p = 0, a = 0; a < u; a++)
16807
16938
  for (var g = arguments[a], N = 0, j = g.length; N < j; N++, p++)
16808
16939
  c[p] = g[N];
16809
16940
  return c;
@@ -16811,9 +16942,9 @@ function Fs() {
16811
16942
  function Jt(d) {
16812
16943
  return this instanceof Jt ? (this.v = d, this) : new Jt(d);
16813
16944
  }
16814
- function _s(d, a, f) {
16945
+ function _s(d, a, u) {
16815
16946
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
16816
- var c = f.apply(d, a || []), p, g = [];
16947
+ var c = u.apply(d, a || []), p, g = [];
16817
16948
  return p = {}, N("next"), N("throw"), N("return"), p[Symbol.asyncIterator] = function() {
16818
16949
  return this;
16819
16950
  }, p;
@@ -16845,7 +16976,7 @@ function _s(d, a, f) {
16845
16976
  }
16846
16977
  }
16847
16978
  function Os(d) {
16848
- var a, f;
16979
+ var a, u;
16849
16980
  return a = {}, c("next"), c("throw", function(p) {
16850
16981
  throw p;
16851
16982
  }), c("return"), a[Symbol.iterator] = function() {
@@ -16853,18 +16984,18 @@ function Os(d) {
16853
16984
  }, a;
16854
16985
  function c(p, g) {
16855
16986
  a[p] = d[p] ? function(N) {
16856
- return (f = !f) ? { value: Jt(d[p](N)), done: p === "return" } : g ? g(N) : N;
16987
+ return (u = !u) ? { value: Jt(d[p](N)), done: p === "return" } : g ? g(N) : N;
16857
16988
  } : g;
16858
16989
  }
16859
16990
  }
16860
16991
  function Us(d) {
16861
16992
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
16862
- var a = d[Symbol.asyncIterator], f;
16863
- return a ? a.call(d) : (d = typeof An == "function" ? An(d) : d[Symbol.iterator](), f = {}, c("next"), c("throw"), c("return"), f[Symbol.asyncIterator] = function() {
16993
+ var a = d[Symbol.asyncIterator], u;
16994
+ return a ? a.call(d) : (d = typeof An == "function" ? An(d) : d[Symbol.iterator](), u = {}, c("next"), c("throw"), c("return"), u[Symbol.asyncIterator] = function() {
16864
16995
  return this;
16865
- }, f);
16996
+ }, u);
16866
16997
  function c(g) {
16867
- f[g] = d[g] && function(N) {
16998
+ u[g] = d[g] && function(N) {
16868
16999
  return new Promise(function(j, V) {
16869
17000
  N = d[g](N), p(j, V, N.done, N.value);
16870
17001
  });
@@ -16882,7 +17013,7 @@ function Rs(d, a) {
16882
17013
  function Ps(d) {
16883
17014
  if (d && d.__esModule) return d;
16884
17015
  var a = {};
16885
- if (d != null) for (var f in d) Object.hasOwnProperty.call(d, f) && (a[f] = d[f]);
17016
+ if (d != null) for (var u in d) Object.hasOwnProperty.call(d, u) && (a[u] = d[u]);
16886
17017
  return a.default = d, a;
16887
17018
  }
16888
17019
  function Hs(d) {
@@ -16893,10 +17024,10 @@ function Bs(d, a) {
16893
17024
  throw new TypeError("attempted to get private field on non-instance");
16894
17025
  return a.get(d);
16895
17026
  }
16896
- function $s(d, a, f) {
17027
+ function $s(d, a, u) {
16897
17028
  if (!a.has(d))
16898
17029
  throw new TypeError("attempted to set private field on non-instance");
16899
- return a.set(d, f), f;
17030
+ return a.set(d, u), u;
16900
17031
  }
16901
17032
  const Vs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
16902
17033
  __proto__: null,
@@ -17011,10 +17142,10 @@ function zs() {
17011
17142
  var d = Xi(), a = (
17012
17143
  /** @class */
17013
17144
  (function() {
17014
- function f() {
17145
+ function u() {
17015
17146
  this.state = Int32Array.from(d.INIT), this.temp = new Int32Array(64), this.buffer = new Uint8Array(64), this.bufferLength = 0, this.bytesHashed = 0, this.finished = !1;
17016
17147
  }
17017
- return f.prototype.update = function(c) {
17148
+ return u.prototype.update = function(c) {
17018
17149
  if (this.finished)
17019
17150
  throw new Error("Attempted to update an already finished hash.");
17020
17151
  var p = 0, g = c.byteLength;
@@ -17022,7 +17153,7 @@ function zs() {
17022
17153
  throw new Error("Cannot hash more than 2^53 - 1 bits");
17023
17154
  for (; g > 0; )
17024
17155
  this.buffer[this.bufferLength++] = c[p++], g--, this.bufferLength === d.BLOCK_SIZE && (this.hashBuffer(), this.bufferLength = 0);
17025
- }, f.prototype.digest = function() {
17156
+ }, u.prototype.digest = function() {
17026
17157
  if (!this.finished) {
17027
17158
  var c = this.bytesHashed * 8, p = new DataView(this.buffer.buffer, this.buffer.byteOffset, this.buffer.byteLength), g = this.bufferLength;
17028
17159
  if (p.setUint8(this.bufferLength++, 128), g % d.BLOCK_SIZE >= d.BLOCK_SIZE - 8) {
@@ -17037,7 +17168,7 @@ function zs() {
17037
17168
  for (var j = new Uint8Array(d.DIGEST_LENGTH), N = 0; N < 8; N++)
17038
17169
  j[N * 4] = this.state[N] >>> 24 & 255, j[N * 4 + 1] = this.state[N] >>> 16 & 255, j[N * 4 + 2] = this.state[N] >>> 8 & 255, j[N * 4 + 3] = this.state[N] >>> 0 & 255;
17039
17170
  return j;
17040
- }, f.prototype.hashBuffer = function() {
17171
+ }, u.prototype.hashBuffer = function() {
17041
17172
  for (var c = this, p = c.buffer, g = c.state, N = g[0], j = g[1], V = g[2], b = g[3], X = g[4], W = g[5], pe = g[6], $ = g[7], Le = 0; Le < d.BLOCK_SIZE; Le++) {
17042
17173
  if (Le < 16)
17043
17174
  this.temp[Le] = (p[Le * 4] & 255) << 24 | (p[Le * 4 + 1] & 255) << 16 | (p[Le * 4 + 2] & 255) << 8 | p[Le * 4 + 3] & 255;
@@ -17051,7 +17182,7 @@ function zs() {
17051
17182
  $ = pe, pe = W, W = X, X = b + Se | 0, b = V, V = j, j = N, N = Se + Ee | 0;
17052
17183
  }
17053
17184
  g[0] += N, g[1] += j, g[2] += V, g[3] += b, g[4] += X, g[5] += W, g[6] += pe, g[7] += $;
17054
- }, f;
17185
+ }, u;
17055
17186
  })()
17056
17187
  );
17057
17188
  return Rt.RawSha256 = a, Rt;
@@ -17059,14 +17190,14 @@ function zs() {
17059
17190
  var vn = {}, Pt = {};
17060
17191
  const Ys = (d) => {
17061
17192
  const a = [];
17062
- for (let f = 0, c = d.length; f < c; f++) {
17063
- const p = d.charCodeAt(f);
17193
+ for (let u = 0, c = d.length; u < c; u++) {
17194
+ const p = d.charCodeAt(u);
17064
17195
  if (p < 128)
17065
17196
  a.push(p);
17066
17197
  else if (p < 2048)
17067
17198
  a.push(p >> 6 | 192, p & 63 | 128);
17068
- else if (f + 1 < d.length && (p & 64512) === 55296 && (d.charCodeAt(f + 1) & 64512) === 56320) {
17069
- const g = 65536 + ((p & 1023) << 10) + (d.charCodeAt(++f) & 1023);
17199
+ else if (u + 1 < d.length && (p & 64512) === 55296 && (d.charCodeAt(u + 1) & 64512) === 56320) {
17200
+ const g = 65536 + ((p & 1023) << 10) + (d.charCodeAt(++u) & 1023);
17070
17201
  a.push(g >> 18 | 240, g >> 12 & 63 | 128, g >> 6 & 63 | 128, g & 63 | 128);
17071
17202
  } else
17072
17203
  a.push(p >> 12 | 224, p >> 6 & 63 | 128, p & 63 | 128);
@@ -17074,18 +17205,18 @@ const Ys = (d) => {
17074
17205
  return Uint8Array.from(a);
17075
17206
  }, Ws = (d) => {
17076
17207
  let a = "";
17077
- for (let f = 0, c = d.length; f < c; f++) {
17078
- const p = d[f];
17208
+ for (let u = 0, c = d.length; u < c; u++) {
17209
+ const p = d[u];
17079
17210
  if (p < 128)
17080
17211
  a += String.fromCharCode(p);
17081
17212
  else if (192 <= p && p < 224) {
17082
- const g = d[++f];
17213
+ const g = d[++u];
17083
17214
  a += String.fromCharCode((p & 31) << 6 | g & 63);
17084
17215
  } else if (240 <= p && p < 365) {
17085
- const N = "%" + [p, d[++f], d[++f], d[++f]].map((j) => j.toString(16)).join("%");
17216
+ const N = "%" + [p, d[++u], d[++u], d[++u]].map((j) => j.toString(16)).join("%");
17086
17217
  a += decodeURIComponent(N);
17087
17218
  } else
17088
- a += String.fromCharCode((p & 15) << 12 | (d[++f] & 63) << 6 | d[++f] & 63);
17219
+ a += String.fromCharCode((p & 15) << 12 | (d[++u] & 63) << 6 | d[++u] & 63);
17089
17220
  }
17090
17221
  return a;
17091
17222
  };
@@ -17107,10 +17238,10 @@ function Qs() {
17107
17238
  var d = Zs, a = typeof Buffer < "u" && Buffer.from ? function(c) {
17108
17239
  return Buffer.from(c, "utf8");
17109
17240
  } : d.fromUtf8;
17110
- function f(c) {
17241
+ function u(c) {
17111
17242
  return c instanceof Uint8Array ? c : typeof c == "string" ? a(c) : ArrayBuffer.isView(c) ? new Uint8Array(c.buffer, c.byteOffset, c.byteLength / Uint8Array.BYTES_PER_ELEMENT) : new Uint8Array(c);
17112
17243
  }
17113
- return Pt.convertToBuffer = f, Pt;
17244
+ return Pt.convertToBuffer = u, Pt;
17114
17245
  }
17115
17246
  var Ht = {}, wi;
17116
17247
  function eo() {
@@ -17141,9 +17272,9 @@ function no() {
17141
17272
  xi = 1, Object.defineProperty($t, "__esModule", { value: !0 }), $t.uint32ArrayFrom = void 0;
17142
17273
  function d(a) {
17143
17274
  if (!Array.from) {
17144
- for (var f = new Uint32Array(a.length), c = 0; c < a.length; )
17145
- f[c] = a[c];
17146
- return f;
17275
+ for (var u = new Uint32Array(a.length), c = 0; c < a.length; )
17276
+ u[c] = a[c];
17277
+ return u;
17147
17278
  }
17148
17279
  return Uint32Array.from(a);
17149
17280
  }
@@ -17157,9 +17288,9 @@ function io() {
17157
17288
  Object.defineProperty(d, "convertToBuffer", { enumerable: !0, get: function() {
17158
17289
  return a.convertToBuffer;
17159
17290
  } });
17160
- var f = eo();
17291
+ var u = eo();
17161
17292
  Object.defineProperty(d, "isEmptyData", { enumerable: !0, get: function() {
17162
- return f.isEmptyData;
17293
+ return u.isEmptyData;
17163
17294
  } });
17164
17295
  var c = to();
17165
17296
  Object.defineProperty(d, "numToUint8", { enumerable: !0, get: function() {
@@ -17175,12 +17306,12 @@ var Ei;
17175
17306
  function ro() {
17176
17307
  if (Ei) return Ut;
17177
17308
  Ei = 1, Object.defineProperty(Ut, "__esModule", { value: !0 }), Ut.Sha256 = void 0;
17178
- var d = Ki, a = Xi(), f = zs(), c = io(), p = (
17309
+ var d = Ki, a = Xi(), u = zs(), c = io(), p = (
17179
17310
  /** @class */
17180
17311
  (function() {
17181
17312
  function N(j) {
17182
- if (this.hash = new f.RawSha256(), j) {
17183
- this.outer = new f.RawSha256();
17313
+ if (this.hash = new u.RawSha256(), j) {
17314
+ this.outer = new u.RawSha256();
17184
17315
  var V = g(j), b = new Uint8Array(a.BLOCK_SIZE);
17185
17316
  b.set(V);
17186
17317
  for (var X = 0; X < a.BLOCK_SIZE; X++)
@@ -17214,7 +17345,7 @@ function ro() {
17214
17345
  function g(N) {
17215
17346
  var j = (0, c.convertToBuffer)(N);
17216
17347
  if (j.byteLength > a.BLOCK_SIZE) {
17217
- var V = new f.RawSha256();
17348
+ var V = new u.RawSha256();
17218
17349
  V.update(j), j = V.digest();
17219
17350
  }
17220
17351
  var b = new Uint8Array(a.BLOCK_SIZE);
@@ -17238,24 +17369,24 @@ function pt() {
17238
17369
  return new nt(null);
17239
17370
  }
17240
17371
  var Ct, oo = 244837814094590, Ai = (oo & 16777215) == 15715070;
17241
- function ao(d, a, f, c, p, g) {
17372
+ function ao(d, a, u, c, p, g) {
17242
17373
  for (; --g >= 0; ) {
17243
- var N = a * this[d++] + f[c] + p;
17244
- p = Math.floor(N / 67108864), f[c++] = N & 67108863;
17374
+ var N = a * this[d++] + u[c] + p;
17375
+ p = Math.floor(N / 67108864), u[c++] = N & 67108863;
17245
17376
  }
17246
17377
  return p;
17247
17378
  }
17248
- function lo(d, a, f, c, p, g) {
17379
+ function lo(d, a, u, c, p, g) {
17249
17380
  for (var N = a & 32767, j = a >> 15; --g >= 0; ) {
17250
17381
  var V = this[d] & 32767, b = this[d++] >> 15, X = j * V + b * N;
17251
- V = N * V + ((X & 32767) << 15) + f[c] + (p & 1073741823), p = (V >>> 30) + (X >>> 15) + j * b + (p >>> 30), f[c++] = V & 1073741823;
17382
+ V = N * V + ((X & 32767) << 15) + u[c] + (p & 1073741823), p = (V >>> 30) + (X >>> 15) + j * b + (p >>> 30), u[c++] = V & 1073741823;
17252
17383
  }
17253
17384
  return p;
17254
17385
  }
17255
- function co(d, a, f, c, p, g) {
17386
+ function co(d, a, u, c, p, g) {
17256
17387
  for (var N = a & 16383, j = a >> 14; --g >= 0; ) {
17257
17388
  var V = this[d] & 16383, b = this[d++] >> 14, X = j * V + b * N;
17258
- V = N * V + ((X & 16383) << 14) + f[c] + p, p = (V >> 28) + (X >> 14) + j * b, f[c++] = V & 268435455;
17389
+ V = N * V + ((X & 16383) << 14) + u[c] + p, p = (V >> 28) + (X >> 14) + j * b, u[c++] = V & 268435455;
17259
17390
  }
17260
17391
  return p;
17261
17392
  }
@@ -17279,8 +17410,8 @@ function Si(d) {
17279
17410
  return uo.charAt(d);
17280
17411
  }
17281
17412
  function fo(d, a) {
17282
- var f = fn[d.charCodeAt(a)];
17283
- return f ?? -1;
17413
+ var u = fn[d.charCodeAt(a)];
17414
+ return u ?? -1;
17284
17415
  }
17285
17416
  function ho(d) {
17286
17417
  for (var a = this.t - 1; a >= 0; --a) d[a] = this[a];
@@ -17294,12 +17425,12 @@ function zn(d) {
17294
17425
  return a.fromInt(d), a;
17295
17426
  }
17296
17427
  function go(d, a) {
17297
- var f;
17298
- if (a == 16) f = 4;
17299
- else if (a == 8) f = 3;
17300
- else if (a == 2) f = 1;
17301
- else if (a == 32) f = 5;
17302
- else if (a == 4) f = 2;
17428
+ var u;
17429
+ if (a == 16) u = 4;
17430
+ else if (a == 8) u = 3;
17431
+ else if (a == 2) u = 1;
17432
+ else if (a == 32) u = 5;
17433
+ else if (a == 4) u = 2;
17303
17434
  else throw new Error("Only radix 2, 4, 8, 16, 32 are supported");
17304
17435
  this.t = 0, this.s = 0;
17305
17436
  for (var c = d.length, p = !1, g = 0; --c >= 0; ) {
@@ -17308,7 +17439,7 @@ function go(d, a) {
17308
17439
  d.charAt(c) == "-" && (p = !0);
17309
17440
  continue;
17310
17441
  }
17311
- p = !1, g == 0 ? this[this.t++] = N : g + f > this.DB ? (this[this.t - 1] |= (N & (1 << this.DB - g) - 1) << g, this[this.t++] = N >> this.DB - g) : this[this.t - 1] |= N << g, g += f, g >= this.DB && (g -= this.DB);
17442
+ p = !1, g == 0 ? this[this.t++] = N : g + u > this.DB ? (this[this.t - 1] |= (N & (1 << this.DB - g) - 1) << g, this[this.t++] = N >> this.DB - g) : this[this.t - 1] |= N << g, g += u, g >= this.DB && (g -= this.DB);
17312
17443
  }
17313
17444
  this.clamp(), p && nt.ZERO.subTo(this, this);
17314
17445
  }
@@ -17324,10 +17455,10 @@ function vo(d) {
17324
17455
  else if (d == 32) a = 5;
17325
17456
  else if (d == 4) a = 2;
17326
17457
  else throw new Error("Only radix 2, 4, 8, 16, 32 are supported");
17327
- var f = (1 << a) - 1, c, p = !1, g = "", N = this.t, j = this.DB - N * this.DB % a;
17458
+ var u = (1 << a) - 1, c, p = !1, g = "", N = this.t, j = this.DB - N * this.DB % a;
17328
17459
  if (N-- > 0)
17329
17460
  for (j < this.DB && (c = this[N] >> j) > 0 && (p = !0, g = Si(c)); N >= 0; )
17330
- j < a ? (c = (this[N] & (1 << j) - 1) << a - j, c |= this[--N] >> (j += this.DB - a)) : (c = this[N] >> (j -= a) & f, j <= 0 && (j += this.DB, --N)), c > 0 && (p = !0), p && (g += Si(c));
17461
+ j < a ? (c = (this[N] & (1 << j) - 1) << a - j, c |= this[--N] >> (j += this.DB - a)) : (c = this[N] >> (j -= a) & u, j <= 0 && (j += this.DB, --N)), c > 0 && (p = !0), p && (g += Si(c));
17331
17462
  return p ? g : "0";
17332
17463
  }
17333
17464
  function yo() {
@@ -17340,97 +17471,97 @@ function wo() {
17340
17471
  function bo(d) {
17341
17472
  var a = this.s - d.s;
17342
17473
  if (a != 0) return a;
17343
- var f = this.t;
17344
- if (a = f - d.t, a != 0) return this.s < 0 ? -a : a;
17345
- for (; --f >= 0; ) if ((a = this[f] - d[f]) != 0) return a;
17474
+ var u = this.t;
17475
+ if (a = u - d.t, a != 0) return this.s < 0 ? -a : a;
17476
+ for (; --u >= 0; ) if ((a = this[u] - d[u]) != 0) return a;
17346
17477
  return 0;
17347
17478
  }
17348
17479
  function Yn(d) {
17349
- var a = 1, f;
17350
- return (f = d >>> 16) != 0 && (d = f, a += 16), (f = d >> 8) != 0 && (d = f, a += 8), (f = d >> 4) != 0 && (d = f, a += 4), (f = d >> 2) != 0 && (d = f, a += 2), (f = d >> 1) != 0 && (d = f, a += 1), a;
17480
+ var a = 1, u;
17481
+ return (u = d >>> 16) != 0 && (d = u, a += 16), (u = d >> 8) != 0 && (d = u, a += 8), (u = d >> 4) != 0 && (d = u, a += 4), (u = d >> 2) != 0 && (d = u, a += 2), (u = d >> 1) != 0 && (d = u, a += 1), a;
17351
17482
  }
17352
17483
  function xo() {
17353
17484
  return this.t <= 0 ? 0 : this.DB * (this.t - 1) + Yn(this[this.t - 1] ^ this.s & this.DM);
17354
17485
  }
17355
17486
  function Co(d, a) {
17356
- var f;
17357
- for (f = this.t - 1; f >= 0; --f) a[f + d] = this[f];
17358
- for (f = d - 1; f >= 0; --f) a[f] = 0;
17487
+ var u;
17488
+ for (u = this.t - 1; u >= 0; --u) a[u + d] = this[u];
17489
+ for (u = d - 1; u >= 0; --u) a[u] = 0;
17359
17490
  a.t = this.t + d, a.s = this.s;
17360
17491
  }
17361
17492
  function Eo(d, a) {
17362
- for (var f = d; f < this.t; ++f) a[f - d] = this[f];
17493
+ for (var u = d; u < this.t; ++u) a[u - d] = this[u];
17363
17494
  a.t = Math.max(this.t - d, 0), a.s = this.s;
17364
17495
  }
17365
17496
  function Lo(d, a) {
17366
- var f = d % this.DB, c = this.DB - f, p = (1 << c) - 1, g = Math.floor(d / this.DB), N = this.s << f & this.DM, j;
17497
+ var u = d % this.DB, c = this.DB - u, p = (1 << c) - 1, g = Math.floor(d / this.DB), N = this.s << u & this.DM, j;
17367
17498
  for (j = this.t - 1; j >= 0; --j)
17368
- a[j + g + 1] = this[j] >> c | N, N = (this[j] & p) << f;
17499
+ a[j + g + 1] = this[j] >> c | N, N = (this[j] & p) << u;
17369
17500
  for (j = g - 1; j >= 0; --j) a[j] = 0;
17370
17501
  a[g] = N, a.t = this.t + g + 1, a.s = this.s, a.clamp();
17371
17502
  }
17372
17503
  function Ao(d, a) {
17373
17504
  a.s = this.s;
17374
- var f = Math.floor(d / this.DB);
17375
- if (f >= this.t) {
17505
+ var u = Math.floor(d / this.DB);
17506
+ if (u >= this.t) {
17376
17507
  a.t = 0;
17377
17508
  return;
17378
17509
  }
17379
17510
  var c = d % this.DB, p = this.DB - c, g = (1 << c) - 1;
17380
- a[0] = this[f] >> c;
17381
- for (var N = f + 1; N < this.t; ++N)
17382
- a[N - f - 1] |= (this[N] & g) << p, a[N - f] = this[N] >> c;
17383
- c > 0 && (a[this.t - f - 1] |= (this.s & g) << p), a.t = this.t - f, a.clamp();
17511
+ a[0] = this[u] >> c;
17512
+ for (var N = u + 1; N < this.t; ++N)
17513
+ a[N - u - 1] |= (this[N] & g) << p, a[N - u] = this[N] >> c;
17514
+ c > 0 && (a[this.t - u - 1] |= (this.s & g) << p), a.t = this.t - u, a.clamp();
17384
17515
  }
17385
17516
  function To(d, a) {
17386
- for (var f = 0, c = 0, p = Math.min(d.t, this.t); f < p; )
17387
- c += this[f] - d[f], a[f++] = c & this.DM, c >>= this.DB;
17517
+ for (var u = 0, c = 0, p = Math.min(d.t, this.t); u < p; )
17518
+ c += this[u] - d[u], a[u++] = c & this.DM, c >>= this.DB;
17388
17519
  if (d.t < this.t) {
17389
- for (c -= d.s; f < this.t; )
17390
- c += this[f], a[f++] = c & this.DM, c >>= this.DB;
17520
+ for (c -= d.s; u < this.t; )
17521
+ c += this[u], a[u++] = c & this.DM, c >>= this.DB;
17391
17522
  c += this.s;
17392
17523
  } else {
17393
- for (c += this.s; f < d.t; )
17394
- c -= d[f], a[f++] = c & this.DM, c >>= this.DB;
17524
+ for (c += this.s; u < d.t; )
17525
+ c -= d[u], a[u++] = c & this.DM, c >>= this.DB;
17395
17526
  c -= d.s;
17396
17527
  }
17397
- a.s = c < 0 ? -1 : 0, c < -1 ? a[f++] = this.DV + c : c > 0 && (a[f++] = c), a.t = f, a.clamp();
17528
+ a.s = c < 0 ? -1 : 0, c < -1 ? a[u++] = this.DV + c : c > 0 && (a[u++] = c), a.t = u, a.clamp();
17398
17529
  }
17399
17530
  function So(d, a) {
17400
- var f = this.abs(), c = d.abs(), p = f.t;
17531
+ var u = this.abs(), c = d.abs(), p = u.t;
17401
17532
  for (a.t = p + c.t; --p >= 0; ) a[p] = 0;
17402
- for (p = 0; p < c.t; ++p) a[p + f.t] = f.am(0, c[p], a, p, 0, f.t);
17533
+ for (p = 0; p < c.t; ++p) a[p + u.t] = u.am(0, c[p], a, p, 0, u.t);
17403
17534
  a.s = 0, a.clamp(), this.s != d.s && nt.ZERO.subTo(a, a);
17404
17535
  }
17405
17536
  function Do(d) {
17406
- for (var a = this.abs(), f = d.t = 2 * a.t; --f >= 0; ) d[f] = 0;
17407
- for (f = 0; f < a.t - 1; ++f) {
17408
- var c = a.am(f, a[f], d, 2 * f, 0, 1);
17409
- (d[f + a.t] += a.am(f + 1, 2 * a[f], d, 2 * f + 1, c, a.t - f - 1)) >= a.DV && (d[f + a.t] -= a.DV, d[f + a.t + 1] = 1);
17537
+ for (var a = this.abs(), u = d.t = 2 * a.t; --u >= 0; ) d[u] = 0;
17538
+ for (u = 0; u < a.t - 1; ++u) {
17539
+ var c = a.am(u, a[u], d, 2 * u, 0, 1);
17540
+ (d[u + a.t] += a.am(u + 1, 2 * a[u], d, 2 * u + 1, c, a.t - u - 1)) >= a.DV && (d[u + a.t] -= a.DV, d[u + a.t + 1] = 1);
17410
17541
  }
17411
- d.t > 0 && (d[d.t - 1] += a.am(f, a[f], d, 2 * f, 0, 1)), d.s = 0, d.clamp();
17542
+ d.t > 0 && (d[d.t - 1] += a.am(u, a[u], d, 2 * u, 0, 1)), d.s = 0, d.clamp();
17412
17543
  }
17413
- function jo(d, a, f) {
17544
+ function jo(d, a, u) {
17414
17545
  var c = d.abs();
17415
17546
  if (!(c.t <= 0)) {
17416
17547
  var p = this.abs();
17417
17548
  if (p.t < c.t) {
17418
- a?.fromInt(0), f != null && this.copyTo(f);
17549
+ a?.fromInt(0), u != null && this.copyTo(u);
17419
17550
  return;
17420
17551
  }
17421
- f == null && (f = pt());
17552
+ u == null && (u = pt());
17422
17553
  var g = pt(), N = this.s, j = d.s, V = this.DB - Yn(c[c.t - 1]);
17423
- V > 0 ? (c.lShiftTo(V, g), p.lShiftTo(V, f)) : (c.copyTo(g), p.copyTo(f));
17554
+ V > 0 ? (c.lShiftTo(V, g), p.lShiftTo(V, u)) : (c.copyTo(g), p.copyTo(u));
17424
17555
  var b = g.t, X = g[b - 1];
17425
17556
  if (X != 0) {
17426
- var W = X * (1 << this.F1) + (b > 1 ? g[b - 2] >> this.F2 : 0), pe = this.FV / W, $ = (1 << this.F1) / W, Le = 1 << this.F2, me = f.t, he = me - b, re = a ?? pt();
17427
- for (g.dlShiftTo(he, re), f.compareTo(re) >= 0 && (f[f.t++] = 1, f.subTo(re, f)), nt.ONE.dlShiftTo(b, re), re.subTo(g, g); g.t < b; ) g[g.t++] = 0;
17557
+ var W = X * (1 << this.F1) + (b > 1 ? g[b - 2] >> this.F2 : 0), pe = this.FV / W, $ = (1 << this.F1) / W, Le = 1 << this.F2, me = u.t, he = me - b, re = a ?? pt();
17558
+ for (g.dlShiftTo(he, re), u.compareTo(re) >= 0 && (u[u.t++] = 1, u.subTo(re, u)), nt.ONE.dlShiftTo(b, re), re.subTo(g, g); g.t < b; ) g[g.t++] = 0;
17428
17559
  for (; --he >= 0; ) {
17429
- var Se = f[--me] == X ? this.DM : Math.floor(f[me] * pe + (f[me - 1] + Le) * $);
17430
- if ((f[me] += g.am(0, Se, f, he, 0, b)) < Se)
17431
- for (g.dlShiftTo(he, re), f.subTo(re, f); f[me] < --Se; ) f.subTo(re, f);
17560
+ var Se = u[--me] == X ? this.DM : Math.floor(u[me] * pe + (u[me - 1] + Le) * $);
17561
+ if ((u[me] += g.am(0, Se, u, he, 0, b)) < Se)
17562
+ for (g.dlShiftTo(he, re), u.subTo(re, u); u[me] < --Se; ) u.subTo(re, u);
17432
17563
  }
17433
- a != null && (f.drShiftTo(b, a), N != j && nt.ZERO.subTo(a, a)), f.t = b, f.clamp(), V > 0 && f.rShiftTo(V, f), N < 0 && nt.ZERO.subTo(f, f);
17564
+ a != null && (u.drShiftTo(b, a), N != j && nt.ZERO.subTo(a, a)), u.t = b, u.clamp(), V > 0 && u.rShiftTo(V, u), N < 0 && nt.ZERO.subTo(u, u);
17434
17565
  }
17435
17566
  }
17436
17567
  }
@@ -17449,18 +17580,18 @@ function Mo(d) {
17449
17580
  return this.compareTo(d) == 0;
17450
17581
  }
17451
17582
  function No(d, a) {
17452
- for (var f = 0, c = 0, p = Math.min(d.t, this.t); f < p; )
17453
- c += this[f] + d[f], a[f++] = c & this.DM, c >>= this.DB;
17583
+ for (var u = 0, c = 0, p = Math.min(d.t, this.t); u < p; )
17584
+ c += this[u] + d[u], a[u++] = c & this.DM, c >>= this.DB;
17454
17585
  if (d.t < this.t) {
17455
- for (c += d.s; f < this.t; )
17456
- c += this[f], a[f++] = c & this.DM, c >>= this.DB;
17586
+ for (c += d.s; u < this.t; )
17587
+ c += this[u], a[u++] = c & this.DM, c >>= this.DB;
17457
17588
  c += this.s;
17458
17589
  } else {
17459
- for (c += this.s; f < d.t; )
17460
- c += d[f], a[f++] = c & this.DM, c >>= this.DB;
17590
+ for (c += this.s; u < d.t; )
17591
+ c += d[u], a[u++] = c & this.DM, c >>= this.DB;
17461
17592
  c += d.s;
17462
17593
  }
17463
- a.s = c < 0 ? -1 : 0, c > 0 ? a[f++] = c : c < -1 && (a[f++] = this.DV + c), a.t = f, a.clamp();
17594
+ a.s = c < 0 ? -1 : 0, c > 0 ? a[u++] = c : c < -1 && (a[u++] = this.DV + c), a.t = u, a.clamp();
17464
17595
  }
17465
17596
  function Fo(d) {
17466
17597
  var a = pt();
@@ -17493,24 +17624,24 @@ function Ho(d) {
17493
17624
  for (; d.t <= this.mt2; )
17494
17625
  d[d.t++] = 0;
17495
17626
  for (var a = 0; a < this.m.t; ++a) {
17496
- var f = d[a] & 32767, c = f * this.mpl + ((f * this.mph + (d[a] >> 15) * this.mpl & this.um) << 15) & d.DM;
17497
- for (f = a + this.m.t, d[f] += this.m.am(0, c, d, a, 0, this.m.t); d[f] >= d.DV; )
17498
- d[f] -= d.DV, d[++f]++;
17627
+ var u = d[a] & 32767, c = u * this.mpl + ((u * this.mph + (d[a] >> 15) * this.mpl & this.um) << 15) & d.DM;
17628
+ for (u = a + this.m.t, d[u] += this.m.am(0, c, d, a, 0, this.m.t); d[u] >= d.DV; )
17629
+ d[u] -= d.DV, d[++u]++;
17499
17630
  }
17500
17631
  d.clamp(), d.drShiftTo(this.m.t, d), d.compareTo(this.m) >= 0 && d.subTo(this.m, d);
17501
17632
  }
17502
17633
  function Bo(d, a) {
17503
17634
  d.squareTo(a), this.reduce(a);
17504
17635
  }
17505
- function $o(d, a, f) {
17506
- d.multiplyTo(a, f), this.reduce(f);
17636
+ function $o(d, a, u) {
17637
+ d.multiplyTo(a, u), this.reduce(u);
17507
17638
  }
17508
17639
  Nt.prototype.convert = Ro;
17509
17640
  Nt.prototype.revert = Po;
17510
17641
  Nt.prototype.reduce = Ho;
17511
17642
  Nt.prototype.mulTo = $o;
17512
17643
  Nt.prototype.sqrTo = Bo;
17513
- function Vo(d, a, f) {
17644
+ function Vo(d, a, u) {
17514
17645
  var c = d.bitLength(), p, g = zn(1), N = new Nt(a);
17515
17646
  if (c <= 0) return g;
17516
17647
  c < 18 ? p = 1 : c < 48 ? p = 3 : c < 144 ? p = 4 : c < 768 ? p = 5 : p = 6;
@@ -17535,7 +17666,7 @@ function Vo(d, a, f) {
17535
17666
  N.sqrTo(g, me), he = g, g = me, me = he, --c < 0 && (c = this.DB - 1, --pe);
17536
17667
  }
17537
17668
  var re = N.revert(g);
17538
- return f(null, re), re;
17669
+ return u(null, re), re;
17539
17670
  }
17540
17671
  nt.prototype.copyTo = ho;
17541
17672
  nt.prototype.fromInt = po;
@@ -17569,9 +17700,9 @@ function yn(d) {
17569
17700
  return ut.Buffer.from(new Wi().random(d).toString(), "hex");
17570
17701
  }
17571
17702
  var zo = /^[89a-f]/i, Yo = "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF", Wo = "userAttributes.", Tt = /* @__PURE__ */ (function() {
17572
- function d(f) {
17703
+ function d(u) {
17573
17704
  this.N = new nt(Yo, 16), this.g = new nt("2", 16), this.k = new nt(this.hexHash("" + this.padHex(this.N) + this.padHex(this.g)), 16), this.smallAValue = this.generateRandomSmallA(), this.getLargeAValue(function() {
17574
- }), this.infoBits = ut.Buffer.from("Caldera Derived Key", "utf8"), this.poolName = f;
17705
+ }), this.infoBits = ut.Buffer.from("Caldera Derived Key", "utf8"), this.poolName = u;
17575
17706
  }
17576
17707
  var a = d.prototype;
17577
17708
  return a.getSmallAValue = function() {
@@ -17660,8 +17791,8 @@ var zo = /^[89a-f]/i, Yo = "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD12902
17660
17791
  }, d;
17661
17792
  })();
17662
17793
  var Gi = /* @__PURE__ */ (function() {
17663
- function d(f) {
17664
- this.jwtToken = f || "", this.payload = this.decodePayload();
17794
+ function d(u) {
17795
+ this.jwtToken = u || "", this.payload = this.decodePayload();
17665
17796
  }
17666
17797
  var a = d.prototype;
17667
17798
  return a.getJwtToken = function() {
@@ -17683,13 +17814,13 @@ function qo(d, a) {
17683
17814
  d.prototype = Object.create(a.prototype), d.prototype.constructor = d, Tn(d, a);
17684
17815
  }
17685
17816
  function Tn(d, a) {
17686
- return Tn = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(f, c) {
17687
- return f.__proto__ = c, f;
17817
+ return Tn = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(u, c) {
17818
+ return u.__proto__ = c, u;
17688
17819
  }, Tn(d, a);
17689
17820
  }
17690
17821
  var Sn = /* @__PURE__ */ (function(d) {
17691
- function a(f) {
17692
- var c = f === void 0 ? {} : f, p = c.AccessToken;
17822
+ function a(u) {
17823
+ var c = u === void 0 ? {} : u, p = c.AccessToken;
17693
17824
  return d.call(this, p || "") || this;
17694
17825
  }
17695
17826
  return qo(a, d), a;
@@ -17698,20 +17829,20 @@ function Ko(d, a) {
17698
17829
  d.prototype = Object.create(a.prototype), d.prototype.constructor = d, Dn(d, a);
17699
17830
  }
17700
17831
  function Dn(d, a) {
17701
- return Dn = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(f, c) {
17702
- return f.__proto__ = c, f;
17832
+ return Dn = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(u, c) {
17833
+ return u.__proto__ = c, u;
17703
17834
  }, Dn(d, a);
17704
17835
  }
17705
17836
  var jn = /* @__PURE__ */ (function(d) {
17706
- function a(f) {
17707
- var c = f === void 0 ? {} : f, p = c.IdToken;
17837
+ function a(u) {
17838
+ var c = u === void 0 ? {} : u, p = c.IdToken;
17708
17839
  return d.call(this, p || "") || this;
17709
17840
  }
17710
17841
  return Ko(a, d), a;
17711
17842
  })(Gi);
17712
17843
  var In = /* @__PURE__ */ (function() {
17713
- function d(f) {
17714
- var c = f === void 0 ? {} : f, p = c.RefreshToken;
17844
+ function d(u) {
17845
+ var c = u === void 0 ? {} : u, p = c.RefreshToken;
17715
17846
  this.token = p || "";
17716
17847
  }
17717
17848
  var a = d.prototype;
@@ -17726,8 +17857,8 @@ var Go = "aws-amplify/" + Xo, Ji = {
17726
17857
  return Ji.userAgent;
17727
17858
  };
17728
17859
  var kn = /* @__PURE__ */ (function() {
17729
- function d(f) {
17730
- var c = f === void 0 ? {} : f, p = c.IdToken, g = c.RefreshToken, N = c.AccessToken, j = c.ClockDrift;
17860
+ function d(u) {
17861
+ var c = u === void 0 ? {} : u, p = c.IdToken, g = c.RefreshToken, N = c.AccessToken, j = c.ClockDrift;
17731
17862
  if (N == null || p == null)
17732
17863
  throw new Error("Id token and Access Token must be present.");
17733
17864
  this.idToken = p, this.refreshToken = g, this.accessToken = N, this.clockDrift = j === void 0 ? this.calculateClockDrift() : j;
@@ -17765,8 +17896,8 @@ var Zo = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct",
17765
17896
  }, d;
17766
17897
  })();
17767
17898
  var Zi = /* @__PURE__ */ (function() {
17768
- function d(f) {
17769
- var c = f === void 0 ? {} : f, p = c.Name, g = c.Value;
17899
+ function d(u) {
17900
+ var c = u === void 0 ? {} : u, p = c.Name, g = c.Value;
17770
17901
  this.Name = p || "", this.Value = g || "";
17771
17902
  }
17772
17903
  var a = d.prototype;
@@ -17790,12 +17921,12 @@ var Zi = /* @__PURE__ */ (function() {
17790
17921
  var At = {}, ea = /* @__PURE__ */ (function() {
17791
17922
  function d() {
17792
17923
  }
17793
- return d.setItem = function(f, c) {
17794
- return At[f] = c, At[f];
17795
- }, d.getItem = function(f) {
17796
- return Object.prototype.hasOwnProperty.call(At, f) ? At[f] : void 0;
17797
- }, d.removeItem = function(f) {
17798
- return delete At[f];
17924
+ return d.setItem = function(u, c) {
17925
+ return At[u] = c, At[u];
17926
+ }, d.getItem = function(u) {
17927
+ return Object.prototype.hasOwnProperty.call(At, u) ? At[u] : void 0;
17928
+ }, d.removeItem = function(u) {
17929
+ return delete At[u];
17799
17930
  }, d.clear = function() {
17800
17931
  return At = {}, At;
17801
17932
  }, d;
@@ -17813,10 +17944,10 @@ var At = {}, ea = /* @__PURE__ */ (function() {
17813
17944
  }, d;
17814
17945
  })();
17815
17946
  var ta = typeof navigator < "u", Di = ta ? Ji.isReactNative ? "react-native" : navigator.userAgent : "nodejs", Nn = /* @__PURE__ */ (function() {
17816
- function d(f) {
17817
- if (f == null || f.Username == null || f.Pool == null)
17947
+ function d(u) {
17948
+ if (u == null || u.Username == null || u.Pool == null)
17818
17949
  throw new Error("Username and Pool information are required.");
17819
- this.username = f.Username || "", this.pool = f.Pool, this.Session = null, this.client = f.Pool.client, this.signInUserSession = null, this.authenticationFlowType = "USER_SRP_AUTH", this.storage = f.Storage || new Qi().getStorage(), this.keyPrefix = "CognitoIdentityServiceProvider." + this.pool.getClientId(), this.userDataKey = this.keyPrefix + "." + this.username + ".userData";
17950
+ this.username = u.Username || "", this.pool = u.Pool, this.Session = null, this.client = u.Pool.client, this.signInUserSession = null, this.authenticationFlowType = "USER_SRP_AUTH", this.storage = u.Storage || new Qi().getStorage(), this.keyPrefix = "CognitoIdentityServiceProvider." + this.pool.getClientId(), this.userDataKey = this.keyPrefix + "." + this.username + ".userData";
17820
17951
  }
17821
17952
  var a = d.prototype;
17822
17953
  return a.setSignInUserSession = function(c) {
@@ -18524,7 +18655,7 @@ var ta = typeof navigator < "u", Di = ta ? Ji.isReactNative ? "react-native" : n
18524
18655
  }, d;
18525
18656
  })();
18526
18657
  function na(d, a) {
18527
- return a = a || {}, new Promise(function(f, c) {
18658
+ return a = a || {}, new Promise(function(u, c) {
18528
18659
  var p = new XMLHttpRequest(), g = [], N = [], j = {}, V = function() {
18529
18660
  return { ok: (p.status / 100 | 0) == 2, statusText: p.statusText, status: p.status, url: p.responseURL, text: function() {
18530
18661
  return Promise.resolve(p.responseText);
@@ -18545,7 +18676,7 @@ function na(d, a) {
18545
18676
  for (var b in p.open(a.method || "get", d, !0), p.onload = function() {
18546
18677
  p.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm, function(X, W, pe) {
18547
18678
  g.push(W = W.toLowerCase()), N.push([W, pe]), j[W] = j[W] ? j[W] + "," + pe : pe;
18548
- }), f(V());
18679
+ }), u(V());
18549
18680
  }, p.onerror = c, p.withCredentials = a.credentials == "include", a.headers) p.setRequestHeader(b, a.headers[b]);
18550
18681
  p.send(a.body || null);
18551
18682
  });
@@ -18565,7 +18696,7 @@ mt.prototype.userAgent = Jo();
18565
18696
  var sa = function(a) {
18566
18697
  a && (mt.prototype.userAgent && !mt.prototype.userAgent.includes(a) && (mt.prototype.userAgent = mt.prototype.userAgent.concat(" ", a)), (!mt.prototype.userAgent || mt.prototype.userAgent === "") && (mt.prototype.userAgent = a));
18567
18698
  }, oa = function(a) {
18568
- var f = mt.category ? " " + mt.category : "", c = mt.framework ? " framework/" + mt.framework : "", p = "" + mt.prototype.userAgent + f + c;
18699
+ var u = mt.category ? " " + mt.category : "", c = mt.framework ? " framework/" + mt.framework : "", p = "" + mt.prototype.userAgent + u + c;
18569
18700
  return p;
18570
18701
  };
18571
18702
  function aa(d, a) {
@@ -18586,12 +18717,12 @@ function Fn(d) {
18586
18717
  return p.prototype = Object.create(c.prototype, { constructor: { value: p, enumerable: !1, writable: !0, configurable: !0 } }), Zt(p, c);
18587
18718
  }, Fn(d);
18588
18719
  }
18589
- function la(d, a, f) {
18720
+ function la(d, a, u) {
18590
18721
  if (er()) return Reflect.construct.apply(null, arguments);
18591
18722
  var c = [null];
18592
18723
  c.push.apply(c, a);
18593
18724
  var p = new (d.bind.apply(d, c))();
18594
- return f && Zt(p, f.prototype), p;
18725
+ return u && Zt(p, u.prototype), p;
18595
18726
  }
18596
18727
  function er() {
18597
18728
  try {
@@ -18611,8 +18742,8 @@ function ca(d) {
18611
18742
  }
18612
18743
  }
18613
18744
  function Zt(d, a) {
18614
- return Zt = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(f, c) {
18615
- return f.__proto__ = c, f;
18745
+ return Zt = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(u, c) {
18746
+ return u.__proto__ = c, u;
18616
18747
  }, Zt(d, a);
18617
18748
  }
18618
18749
  function _n(d) {
@@ -18621,14 +18752,14 @@ function _n(d) {
18621
18752
  }, _n(d);
18622
18753
  }
18623
18754
  var ua = /* @__PURE__ */ (function(d) {
18624
- function a(f, c, p, g) {
18755
+ function a(u, c, p, g) {
18625
18756
  var N;
18626
- return N = d.call(this, f) || this, N.code = c, N.name = p, N.statusCode = g, N;
18757
+ return N = d.call(this, u) || this, N.code = c, N.name = p, N.statusCode = g, N;
18627
18758
  }
18628
18759
  return aa(a, d), a;
18629
18760
  })(/* @__PURE__ */ Fn(Error)), fa = /* @__PURE__ */ (function() {
18630
- function d(f, c, p) {
18631
- this.endpoint = c || "https://cognito-idp." + f + ".amazonaws.com/";
18761
+ function d(u, c, p) {
18762
+ this.endpoint = c || "https://cognito-idp." + u + ".amazonaws.com/";
18632
18763
  var g = p || {}, N = g.credentials;
18633
18764
  this.fetchOptions = N ? {
18634
18765
  credentials: N
@@ -18695,44 +18826,44 @@ var ua = /* @__PURE__ */ (function(d) {
18695
18826
  debug: function() {
18696
18827
  }
18697
18828
  }, da = function(a) {
18698
- var f = "nonRetryable";
18699
- return a && a[f];
18829
+ var u = "nonRetryable";
18830
+ return a && a[u];
18700
18831
  };
18701
- function tr(d, a, f, c) {
18832
+ function tr(d, a, u, c) {
18702
18833
  if (c === void 0 && (c = 1), typeof d != "function")
18703
18834
  throw Error("functionToRetry must be a function");
18704
18835
  return nn.debug(d.name + " attempt #" + c + " with args: " + JSON.stringify(a)), d.apply(void 0, a).catch(function(p) {
18705
18836
  if (nn.debug("error on " + d.name, p), da(p))
18706
18837
  throw nn.debug(d.name + " non retryable error", p), p;
18707
- var g = f(c, a, p);
18838
+ var g = u(c, a, p);
18708
18839
  if (nn.debug(d.name + " retrying in " + g + " ms"), g !== !1)
18709
18840
  return new Promise(function(N) {
18710
18841
  return setTimeout(N, g);
18711
18842
  }).then(function() {
18712
- return tr(d, a, f, c + 1);
18843
+ return tr(d, a, u, c + 1);
18713
18844
  });
18714
18845
  throw p;
18715
18846
  });
18716
18847
  }
18717
18848
  function ha(d) {
18718
- var a = 100, f = 100;
18849
+ var a = 100, u = 100;
18719
18850
  return function(c) {
18720
- var p = Math.pow(2, c) * a + f * Math.random();
18851
+ var p = Math.pow(2, c) * a + u * Math.random();
18721
18852
  return p > d ? !1 : p;
18722
18853
  };
18723
18854
  }
18724
- function pa(d, a, f) {
18725
- return tr(d, a, ha(f));
18855
+ function pa(d, a, u) {
18856
+ return tr(d, a, ha(u));
18726
18857
  }
18727
18858
  var ga = 55, ma = /* @__PURE__ */ (function() {
18728
- function d(f, c) {
18729
- var p = f || {}, g = p.UserPoolId, N = p.ClientId, j = p.endpoint, V = p.fetchOptions, b = p.AdvancedSecurityDataCollectionFlag;
18859
+ function d(u, c) {
18860
+ var p = u || {}, g = p.UserPoolId, N = p.ClientId, j = p.endpoint, V = p.fetchOptions, b = p.AdvancedSecurityDataCollectionFlag;
18730
18861
  if (!g || !N)
18731
18862
  throw new Error("Both UserPoolId and ClientId are required.");
18732
18863
  if (g.length > ga || !/^[\w-]+_[0-9a-zA-Z]+$/.test(g))
18733
18864
  throw new Error("Invalid UserPoolId format.");
18734
18865
  var X = g.split("_")[0];
18735
- this.userPoolId = g, this.clientId = N, this.client = new fa(X, j, V), this.advancedSecurityDataCollectionFlag = b !== !1, this.storage = f.Storage || new Qi().getStorage(), c && (this.wrapRefreshSessionCallback = c);
18866
+ this.userPoolId = g, this.clientId = N, this.client = new fa(X, j, V), this.advancedSecurityDataCollectionFlag = b !== !1, this.storage = u.Storage || new Qi().getStorage(), c && (this.wrapRefreshSessionCallback = c);
18736
18867
  }
18737
18868
  var a = d.prototype;
18738
18869
  return a.getUserPoolId = function() {
@@ -18795,16 +18926,16 @@ var ga = 55, ma = /* @__PURE__ */ (function() {
18795
18926
  var ki;
18796
18927
  function va() {
18797
18928
  return ki || (ki = 1, (function(d, a) {
18798
- (function(f) {
18929
+ (function(u) {
18799
18930
  var c;
18800
- if (d.exports = f(), c = !0, !c) {
18801
- var p = window.Cookies, g = window.Cookies = f();
18931
+ if (d.exports = u(), c = !0, !c) {
18932
+ var p = window.Cookies, g = window.Cookies = u();
18802
18933
  g.noConflict = function() {
18803
18934
  return window.Cookies = p, g;
18804
18935
  };
18805
18936
  }
18806
18937
  })(function() {
18807
- function f() {
18938
+ function u() {
18808
18939
  for (var g = 0, N = {}; g < arguments.length; g++) {
18809
18940
  var j = arguments[g];
18810
18941
  for (var V in j)
@@ -18820,7 +18951,7 @@ function va() {
18820
18951
  }
18821
18952
  function j(b, X, W) {
18822
18953
  if (!(typeof document > "u")) {
18823
- W = f({
18954
+ W = u({
18824
18955
  path: "/"
18825
18956
  }, N.defaults, W), typeof W.expires == "number" && (W.expires = new Date(/* @__PURE__ */ new Date() * 1 + W.expires * 864e5)), W.expires = W.expires ? W.expires.toUTCString() : "";
18826
18957
  try {
@@ -18868,7 +18999,7 @@ function va() {
18868
18999
  /* read as json */
18869
19000
  );
18870
19001
  }, N.remove = function(b, X) {
18871
- j(b, "", f(X, {
19002
+ j(b, "", u(X, {
18872
19003
  expires: -1
18873
19004
  }));
18874
19005
  }, N.defaults = {}, N.withConverter = p, N;
@@ -18879,13 +19010,13 @@ function va() {
18879
19010
  })(bn)), bn.exports;
18880
19011
  }
18881
19012
  var Vt = va(), ya = /* @__PURE__ */ (function() {
18882
- function d(f) {
18883
- if (f === void 0 && (f = {}), f.domain && (this.domain = f.domain), f.path ? this.path = f.path : this.path = "/", Object.prototype.hasOwnProperty.call(f, "expires") ? this.expires = f.expires : this.expires = 365, Object.prototype.hasOwnProperty.call(f, "secure") ? this.secure = f.secure : this.secure = !0, Object.prototype.hasOwnProperty.call(f, "sameSite")) {
18884
- if (!["strict", "lax", "none"].includes(f.sameSite))
19013
+ function d(u) {
19014
+ if (u === void 0 && (u = {}), u.domain && (this.domain = u.domain), u.path ? this.path = u.path : this.path = "/", Object.prototype.hasOwnProperty.call(u, "expires") ? this.expires = u.expires : this.expires = 365, Object.prototype.hasOwnProperty.call(u, "secure") ? this.secure = u.secure : this.secure = !0, Object.prototype.hasOwnProperty.call(u, "sameSite")) {
19015
+ if (!["strict", "lax", "none"].includes(u.sameSite))
18885
19016
  throw new Error('The sameSite value of cookieStorage must be "lax", "strict" or "none".');
18886
- if (f.sameSite === "none" && !this.secure)
19017
+ if (u.sameSite === "none" && !this.secure)
18887
19018
  throw new Error("sameSite = None requires the Secure attribute in latest browser versions.");
18888
- this.sameSite = f.sameSite;
19019
+ this.sameSite = u.sameSite;
18889
19020
  } else
18890
19021
  this.sameSite = null;
18891
19022
  }