@one-payments/web-components 1.5.5 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -3,18 +3,18 @@
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
5
  */
6
- const yt = globalThis, qt = yt.ShadowRoot && (yt.ShadyCSS === void 0 || yt.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Ht = Symbol(), Zt = /* @__PURE__ */ new WeakMap();
6
+ const yt = globalThis, qt = yt.ShadowRoot && (yt.ShadyCSS === void 0 || yt.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Ht = Symbol(), Jt = /* @__PURE__ */ new WeakMap();
7
7
  let he = class {
8
- constructor(t, r, n) {
9
- if (this._$cssResult$ = !0, n !== Ht) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
8
+ constructor(t, r, i) {
9
+ if (this._$cssResult$ = !0, i !== Ht) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
10
10
  this.cssText = t, this.t = r;
11
11
  }
12
12
  get styleSheet() {
13
13
  let t = this.o;
14
14
  const r = this.t;
15
15
  if (qt && t === void 0) {
16
- const n = r !== void 0 && r.length === 1;
17
- n && (t = Zt.get(r)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), n && Zt.set(r, t));
16
+ const i = r !== void 0 && r.length === 1;
17
+ i && (t = Jt.get(r)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && Jt.set(r, t));
18
18
  }
19
19
  return t;
20
20
  }
@@ -22,30 +22,30 @@ let he = class {
22
22
  return this.cssText;
23
23
  }
24
24
  };
25
- const Be = (e) => new he(typeof e == "string" ? e : e + "", void 0, Ht), Le = (e, ...t) => {
26
- const r = e.length === 1 ? e[0] : t.reduce((n, i, o) => n + ((s) => {
27
- if (s._$cssResult$ === !0) return s.cssText;
28
- if (typeof s == "number") return s;
29
- throw Error("Value passed to 'css' function must be a 'css' function result: " + s + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
30
- })(i) + e[o + 1], e[0]);
25
+ const Le = (e) => new he(typeof e == "string" ? e : e + "", void 0, Ht), Be = (e, ...t) => {
26
+ const r = e.length === 1 ? e[0] : t.reduce((i, n, s) => i + ((o) => {
27
+ if (o._$cssResult$ === !0) return o.cssText;
28
+ if (typeof o == "number") return o;
29
+ throw Error("Value passed to 'css' function must be a 'css' function result: " + o + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
30
+ })(n) + e[s + 1], e[0]);
31
31
  return new he(r, e, Ht);
32
32
  }, Ue = (e, t) => {
33
33
  if (qt) e.adoptedStyleSheets = t.map((r) => r instanceof CSSStyleSheet ? r : r.styleSheet);
34
34
  else for (const r of t) {
35
- const n = document.createElement("style"), i = yt.litNonce;
36
- i !== void 0 && n.setAttribute("nonce", i), n.textContent = r.cssText, e.appendChild(n);
35
+ const i = document.createElement("style"), n = yt.litNonce;
36
+ n !== void 0 && i.setAttribute("nonce", n), i.textContent = r.cssText, e.appendChild(i);
37
37
  }
38
- }, Jt = qt ? (e) => e : (e) => e instanceof CSSStyleSheet ? ((t) => {
38
+ }, Zt = qt ? (e) => e : (e) => e instanceof CSSStyleSheet ? ((t) => {
39
39
  let r = "";
40
- for (const n of t.cssRules) r += n.cssText;
41
- return Be(r);
40
+ for (const i of t.cssRules) r += i.cssText;
41
+ return Le(r);
42
42
  })(e) : e;
43
43
  /**
44
44
  * @license
45
45
  * Copyright 2017 Google LLC
46
46
  * SPDX-License-Identifier: BSD-3-Clause
47
47
  */
48
- const { is: Fe, defineProperty: Oe, getOwnPropertyDescriptor: ze, getOwnPropertyNames: qe, getOwnPropertySymbols: He, getPrototypeOf: Ye } = Object, z = globalThis, Xt = z.trustedTypes, Ve = Xt ? Xt.emptyScript : "", _t = z.reactiveElementPolyfillSupport, it = (e, t) => e, bt = { toAttribute(e, t) {
48
+ const { is: Fe, defineProperty: Oe, getOwnPropertyDescriptor: ze, getOwnPropertyNames: qe, getOwnPropertySymbols: He, getPrototypeOf: Ye } = Object, z = globalThis, Xt = z.trustedTypes, Ve = Xt ? Xt.emptyScript : "", Et = z.reactiveElementPolyfillSupport, nt = (e, t) => e, bt = { toAttribute(e, t) {
49
49
  switch (t) {
50
50
  case Boolean:
51
51
  e = e ? Ve : null;
@@ -75,7 +75,7 @@ const { is: Fe, defineProperty: Oe, getOwnPropertyDescriptor: ze, getOwnProperty
75
75
  return r;
76
76
  } }, Yt = (e, t) => !Fe(e, t), te = { attribute: !0, type: String, converter: bt, reflect: !1, useDefault: !1, hasChanged: Yt };
77
77
  Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), z.litPropertyMetadata ?? (z.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
78
- let Q = class extends HTMLElement {
78
+ let K = class extends HTMLElement {
79
79
  static addInitializer(t) {
80
80
  this._$Ei(), (this.l ?? (this.l = [])).push(t);
81
81
  }
@@ -84,58 +84,58 @@ let Q = class extends HTMLElement {
84
84
  }
85
85
  static createProperty(t, r = te) {
86
86
  if (r.state && (r.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(t) && ((r = Object.create(r)).wrapped = !0), this.elementProperties.set(t, r), !r.noAccessor) {
87
- const n = Symbol(), i = this.getPropertyDescriptor(t, n, r);
88
- i !== void 0 && Oe(this.prototype, t, i);
87
+ const i = Symbol(), n = this.getPropertyDescriptor(t, i, r);
88
+ n !== void 0 && Oe(this.prototype, t, n);
89
89
  }
90
90
  }
91
- static getPropertyDescriptor(t, r, n) {
92
- const { get: i, set: o } = ze(this.prototype, t) ?? { get() {
91
+ static getPropertyDescriptor(t, r, i) {
92
+ const { get: n, set: s } = ze(this.prototype, t) ?? { get() {
93
93
  return this[r];
94
- }, set(s) {
95
- this[r] = s;
94
+ }, set(o) {
95
+ this[r] = o;
96
96
  } };
97
- return { get: i, set(s) {
98
- const l = i == null ? void 0 : i.call(this);
99
- o == null || o.call(this, s), this.requestUpdate(t, l, n);
97
+ return { get: n, set(o) {
98
+ const l = n == null ? void 0 : n.call(this);
99
+ s == null || s.call(this, o), this.requestUpdate(t, l, i);
100
100
  }, configurable: !0, enumerable: !0 };
101
101
  }
102
102
  static getPropertyOptions(t) {
103
103
  return this.elementProperties.get(t) ?? te;
104
104
  }
105
105
  static _$Ei() {
106
- if (this.hasOwnProperty(it("elementProperties"))) return;
106
+ if (this.hasOwnProperty(nt("elementProperties"))) return;
107
107
  const t = Ye(this);
108
108
  t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
109
109
  }
110
110
  static finalize() {
111
- if (this.hasOwnProperty(it("finalized"))) return;
112
- if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(it("properties"))) {
113
- const r = this.properties, n = [...qe(r), ...He(r)];
114
- for (const i of n) this.createProperty(i, r[i]);
111
+ if (this.hasOwnProperty(nt("finalized"))) return;
112
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(nt("properties"))) {
113
+ const r = this.properties, i = [...qe(r), ...He(r)];
114
+ for (const n of i) this.createProperty(n, r[n]);
115
115
  }
116
116
  const t = this[Symbol.metadata];
117
117
  if (t !== null) {
118
118
  const r = litPropertyMetadata.get(t);
119
- if (r !== void 0) for (const [n, i] of r) this.elementProperties.set(n, i);
119
+ if (r !== void 0) for (const [i, n] of r) this.elementProperties.set(i, n);
120
120
  }
121
121
  this._$Eh = /* @__PURE__ */ new Map();
122
- for (const [r, n] of this.elementProperties) {
123
- const i = this._$Eu(r, n);
124
- i !== void 0 && this._$Eh.set(i, r);
122
+ for (const [r, i] of this.elementProperties) {
123
+ const n = this._$Eu(r, i);
124
+ n !== void 0 && this._$Eh.set(n, r);
125
125
  }
126
126
  this.elementStyles = this.finalizeStyles(this.styles);
127
127
  }
128
128
  static finalizeStyles(t) {
129
129
  const r = [];
130
130
  if (Array.isArray(t)) {
131
- const n = new Set(t.flat(1 / 0).reverse());
132
- for (const i of n) r.unshift(Jt(i));
133
- } else t !== void 0 && r.push(Jt(t));
131
+ const i = new Set(t.flat(1 / 0).reverse());
132
+ for (const n of i) r.unshift(Zt(n));
133
+ } else t !== void 0 && r.push(Zt(t));
134
134
  return r;
135
135
  }
136
136
  static _$Eu(t, r) {
137
- const n = r.attribute;
138
- return n === !1 ? void 0 : typeof n == "string" ? n : typeof t == "string" ? t.toLowerCase() : void 0;
137
+ const i = r.attribute;
138
+ return i === !1 ? void 0 : typeof i == "string" ? i : typeof t == "string" ? t.toLowerCase() : void 0;
139
139
  }
140
140
  constructor() {
141
141
  super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
@@ -154,7 +154,7 @@ let Q = class extends HTMLElement {
154
154
  }
155
155
  _$E_() {
156
156
  const t = /* @__PURE__ */ new Map(), r = this.constructor.elementProperties;
157
- for (const n of r.keys()) this.hasOwnProperty(n) && (t.set(n, this[n]), delete this[n]);
157
+ for (const i of r.keys()) this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]);
158
158
  t.size > 0 && (this._$Ep = t);
159
159
  }
160
160
  createRenderRoot() {
@@ -164,8 +164,8 @@ let Q = class extends HTMLElement {
164
164
  connectedCallback() {
165
165
  var t;
166
166
  this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$EO) == null || t.forEach((r) => {
167
- var n;
168
- return (n = r.hostConnected) == null ? void 0 : n.call(r);
167
+ var i;
168
+ return (i = r.hostConnected) == null ? void 0 : i.call(r);
169
169
  });
170
170
  }
171
171
  enableUpdating(t) {
@@ -173,42 +173,42 @@ let Q = class extends HTMLElement {
173
173
  disconnectedCallback() {
174
174
  var t;
175
175
  (t = this._$EO) == null || t.forEach((r) => {
176
- var n;
177
- return (n = r.hostDisconnected) == null ? void 0 : n.call(r);
176
+ var i;
177
+ return (i = r.hostDisconnected) == null ? void 0 : i.call(r);
178
178
  });
179
179
  }
180
- attributeChangedCallback(t, r, n) {
181
- this._$AK(t, n);
180
+ attributeChangedCallback(t, r, i) {
181
+ this._$AK(t, i);
182
182
  }
183
183
  _$ET(t, r) {
184
- var o;
185
- const n = this.constructor.elementProperties.get(t), i = this.constructor._$Eu(t, n);
186
- if (i !== void 0 && n.reflect === !0) {
187
- const s = (((o = n.converter) == null ? void 0 : o.toAttribute) !== void 0 ? n.converter : bt).toAttribute(r, n.type);
188
- this._$Em = t, s == null ? this.removeAttribute(i) : this.setAttribute(i, s), this._$Em = null;
184
+ var s;
185
+ const i = this.constructor.elementProperties.get(t), n = this.constructor._$Eu(t, i);
186
+ if (n !== void 0 && i.reflect === !0) {
187
+ const o = (((s = i.converter) == null ? void 0 : s.toAttribute) !== void 0 ? i.converter : bt).toAttribute(r, i.type);
188
+ this._$Em = t, o == null ? this.removeAttribute(n) : this.setAttribute(n, o), this._$Em = null;
189
189
  }
190
190
  }
191
191
  _$AK(t, r) {
192
- var o, s;
193
- const n = this.constructor, i = n._$Eh.get(t);
194
- if (i !== void 0 && this._$Em !== i) {
195
- const l = n.getPropertyOptions(i), a = typeof l.converter == "function" ? { fromAttribute: l.converter } : ((o = l.converter) == null ? void 0 : o.fromAttribute) !== void 0 ? l.converter : bt;
196
- this._$Em = i;
192
+ var s, o;
193
+ const i = this.constructor, n = i._$Eh.get(t);
194
+ if (n !== void 0 && this._$Em !== n) {
195
+ const l = i.getPropertyOptions(n), a = typeof l.converter == "function" ? { fromAttribute: l.converter } : ((s = l.converter) == null ? void 0 : s.fromAttribute) !== void 0 ? l.converter : bt;
196
+ this._$Em = n;
197
197
  const c = a.fromAttribute(r, l.type);
198
- this[i] = c ?? ((s = this._$Ej) == null ? void 0 : s.get(i)) ?? c, this._$Em = null;
198
+ this[n] = c ?? ((o = this._$Ej) == null ? void 0 : o.get(n)) ?? c, this._$Em = null;
199
199
  }
200
200
  }
201
- requestUpdate(t, r, n) {
202
- var i;
201
+ requestUpdate(t, r, i) {
202
+ var n;
203
203
  if (t !== void 0) {
204
- const o = this.constructor, s = this[t];
205
- if (n ?? (n = o.getPropertyOptions(t)), !((n.hasChanged ?? Yt)(s, r) || n.useDefault && n.reflect && s === ((i = this._$Ej) == null ? void 0 : i.get(t)) && !this.hasAttribute(o._$Eu(t, n)))) return;
206
- this.C(t, r, n);
204
+ const s = this.constructor, o = this[t];
205
+ if (i ?? (i = s.getPropertyOptions(t)), !((i.hasChanged ?? Yt)(o, r) || i.useDefault && i.reflect && o === ((n = this._$Ej) == null ? void 0 : n.get(t)) && !this.hasAttribute(s._$Eu(t, i)))) return;
206
+ this.C(t, r, i);
207
207
  }
208
208
  this.isUpdatePending === !1 && (this._$ES = this._$EP());
209
209
  }
210
- C(t, r, { useDefault: n, reflect: i, wrapped: o }, s) {
211
- n && !(this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Map())).has(t) && (this._$Ej.set(t, s ?? r ?? this[t]), o !== !0 || s !== void 0) || (this._$AL.has(t) || (this.hasUpdated || n || (r = void 0), this._$AL.set(t, r)), i === !0 && this._$Em !== t && (this._$Eq ?? (this._$Eq = /* @__PURE__ */ new Set())).add(t));
210
+ C(t, r, { useDefault: i, reflect: n, wrapped: s }, o) {
211
+ i && !(this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Map())).has(t) && (this._$Ej.set(t, o ?? r ?? this[t]), s !== !0 || o !== void 0) || (this._$AL.has(t) || (this.hasUpdated || i || (r = void 0), this._$AL.set(t, r)), n === !0 && this._$Em !== t && (this._$Eq ?? (this._$Eq = /* @__PURE__ */ new Set())).add(t));
212
212
  }
213
213
  async _$EP() {
214
214
  this.isUpdatePending = !0;
@@ -224,28 +224,28 @@ let Q = class extends HTMLElement {
224
224
  return this.performUpdate();
225
225
  }
226
226
  performUpdate() {
227
- var n;
227
+ var i;
228
228
  if (!this.isUpdatePending) return;
229
229
  if (!this.hasUpdated) {
230
230
  if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) {
231
- for (const [o, s] of this._$Ep) this[o] = s;
231
+ for (const [s, o] of this._$Ep) this[s] = o;
232
232
  this._$Ep = void 0;
233
233
  }
234
- const i = this.constructor.elementProperties;
235
- if (i.size > 0) for (const [o, s] of i) {
236
- const { wrapped: l } = s, a = this[o];
237
- l !== !0 || this._$AL.has(o) || a === void 0 || this.C(o, void 0, s, a);
234
+ const n = this.constructor.elementProperties;
235
+ if (n.size > 0) for (const [s, o] of n) {
236
+ const { wrapped: l } = o, a = this[s];
237
+ l !== !0 || this._$AL.has(s) || a === void 0 || this.C(s, void 0, o, a);
238
238
  }
239
239
  }
240
240
  let t = !1;
241
241
  const r = this._$AL;
242
242
  try {
243
- t = this.shouldUpdate(r), t ? (this.willUpdate(r), (n = this._$EO) == null || n.forEach((i) => {
244
- var o;
245
- return (o = i.hostUpdate) == null ? void 0 : o.call(i);
243
+ t = this.shouldUpdate(r), t ? (this.willUpdate(r), (i = this._$EO) == null || i.forEach((n) => {
244
+ var s;
245
+ return (s = n.hostUpdate) == null ? void 0 : s.call(n);
246
246
  }), this.update(r)) : this._$EM();
247
- } catch (i) {
248
- throw t = !1, this._$EM(), i;
247
+ } catch (n) {
248
+ throw t = !1, this._$EM(), n;
249
249
  }
250
250
  t && this._$AE(r);
251
251
  }
@@ -253,9 +253,9 @@ let Q = class extends HTMLElement {
253
253
  }
254
254
  _$AE(t) {
255
255
  var r;
256
- (r = this._$EO) == null || r.forEach((n) => {
257
- var i;
258
- return (i = n.hostUpdated) == null ? void 0 : i.call(n);
256
+ (r = this._$EO) == null || r.forEach((i) => {
257
+ var n;
258
+ return (n = i.hostUpdated) == null ? void 0 : n.call(i);
259
259
  }), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
260
260
  }
261
261
  _$EM() {
@@ -278,74 +278,74 @@ let Q = class extends HTMLElement {
278
278
  firstUpdated(t) {
279
279
  }
280
280
  };
281
- Q.elementStyles = [], Q.shadowRootOptions = { mode: "open" }, Q[it("elementProperties")] = /* @__PURE__ */ new Map(), Q[it("finalized")] = /* @__PURE__ */ new Map(), _t == null || _t({ ReactiveElement: Q }), (z.reactiveElementVersions ?? (z.reactiveElementVersions = [])).push("2.1.1");
281
+ K.elementStyles = [], K.shadowRootOptions = { mode: "open" }, K[nt("elementProperties")] = /* @__PURE__ */ new Map(), K[nt("finalized")] = /* @__PURE__ */ new Map(), Et == null || Et({ ReactiveElement: K }), (z.reactiveElementVersions ?? (z.reactiveElementVersions = [])).push("2.1.1");
282
282
  /**
283
283
  * @license
284
284
  * Copyright 2017 Google LLC
285
285
  * SPDX-License-Identifier: BSD-3-Clause
286
286
  */
287
- const ot = globalThis, vt = ot.trustedTypes, ee = vt ? vt.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, pe = "$lit$", F = `lit$${Math.random().toFixed(9).slice(2)}$`, me = "?" + F, je = `<${me}>`, G = document, lt = () => G.createComment(""), ct = (e) => e === null || typeof e != "object" && typeof e != "function", Vt = Array.isArray, Ge = (e) => Vt(e) || typeof (e == null ? void 0 : e[Symbol.iterator]) == "function", It = `[
288
- \f\r]`, nt = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, re = /-->/g, ne = />/g, H = RegExp(`>|${It}(?:([^\\s"'>=/]+)(${It}*=${It}*(?:[^
289
- \f\r"'\`<>=]|("|')|))|$)`, "g"), ie = /'/g, oe = /"/g, fe = /^(?:script|style|textarea|title)$/i, Qe = (e) => (t, ...r) => ({ _$litType$: e, strings: t, values: r }), w = Qe(1), W = Symbol.for("lit-noChange"), I = Symbol.for("lit-nothing"), se = /* @__PURE__ */ new WeakMap(), Y = G.createTreeWalker(G, 129);
287
+ const st = globalThis, vt = st.trustedTypes, ee = vt ? vt.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, pe = "$lit$", F = `lit$${Math.random().toFixed(9).slice(2)}$`, me = "?" + F, je = `<${me}>`, G = document, lt = () => G.createComment(""), ct = (e) => e === null || typeof e != "object" && typeof e != "function", Vt = Array.isArray, Ge = (e) => Vt(e) || typeof (e == null ? void 0 : e[Symbol.iterator]) == "function", It = `[
288
+ \f\r]`, it = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, re = /-->/g, ie = />/g, H = RegExp(`>|${It}(?:([^\\s"'>=/]+)(${It}*=${It}*(?:[^
289
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), ne = /'/g, se = /"/g, fe = /^(?:script|style|textarea|title)$/i, Ke = (e) => (t, ...r) => ({ _$litType$: e, strings: t, values: r }), b = Ke(1), W = Symbol.for("lit-noChange"), I = Symbol.for("lit-nothing"), oe = /* @__PURE__ */ new WeakMap(), Y = G.createTreeWalker(G, 129);
290
290
  function ge(e, t) {
291
291
  if (!Vt(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
292
292
  return ee !== void 0 ? ee.createHTML(t) : t;
293
293
  }
294
- const Ke = (e, t) => {
295
- const r = e.length - 1, n = [];
296
- let i, o = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", s = nt;
294
+ const Qe = (e, t) => {
295
+ const r = e.length - 1, i = [];
296
+ let n, s = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o = it;
297
297
  for (let l = 0; l < r; l++) {
298
298
  const a = e[l];
299
299
  let c, d, h = -1, p = 0;
300
- for (; p < a.length && (s.lastIndex = p, d = s.exec(a), d !== null); ) p = s.lastIndex, s === nt ? d[1] === "!--" ? s = re : d[1] !== void 0 ? s = ne : d[2] !== void 0 ? (fe.test(d[2]) && (i = RegExp("</" + d[2], "g")), s = H) : d[3] !== void 0 && (s = H) : s === H ? d[0] === ">" ? (s = i ?? nt, h = -1) : d[1] === void 0 ? h = -2 : (h = s.lastIndex - d[2].length, c = d[1], s = d[3] === void 0 ? H : d[3] === '"' ? oe : ie) : s === oe || s === ie ? s = H : s === re || s === ne ? s = nt : (s = H, i = void 0);
301
- const u = s === H && e[l + 1].startsWith("/>") ? " " : "";
302
- o += s === nt ? a + je : h >= 0 ? (n.push(c), a.slice(0, h) + pe + a.slice(h) + F + u) : a + F + (h === -2 ? l : u);
300
+ for (; p < a.length && (o.lastIndex = p, d = o.exec(a), d !== null); ) p = o.lastIndex, o === it ? d[1] === "!--" ? o = re : d[1] !== void 0 ? o = ie : d[2] !== void 0 ? (fe.test(d[2]) && (n = RegExp("</" + d[2], "g")), o = H) : d[3] !== void 0 && (o = H) : o === H ? d[0] === ">" ? (o = n ?? it, h = -1) : d[1] === void 0 ? h = -2 : (h = o.lastIndex - d[2].length, c = d[1], o = d[3] === void 0 ? H : d[3] === '"' ? se : ne) : o === se || o === ne ? o = H : o === re || o === ie ? o = it : (o = H, n = void 0);
301
+ const u = o === H && e[l + 1].startsWith("/>") ? " " : "";
302
+ s += o === it ? a + je : h >= 0 ? (i.push(c), a.slice(0, h) + pe + a.slice(h) + F + u) : a + F + (h === -2 ? l : u);
303
303
  }
304
- return [ge(e, o + (e[r] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), n];
304
+ return [ge(e, s + (e[r] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), i];
305
305
  };
306
306
  class dt {
307
- constructor({ strings: t, _$litType$: r }, n) {
308
- let i;
307
+ constructor({ strings: t, _$litType$: r }, i) {
308
+ let n;
309
309
  this.parts = [];
310
- let o = 0, s = 0;
311
- const l = t.length - 1, a = this.parts, [c, d] = Ke(t, r);
312
- if (this.el = dt.createElement(c, n), Y.currentNode = this.el.content, r === 2 || r === 3) {
310
+ let s = 0, o = 0;
311
+ const l = t.length - 1, a = this.parts, [c, d] = Qe(t, r);
312
+ if (this.el = dt.createElement(c, i), Y.currentNode = this.el.content, r === 2 || r === 3) {
313
313
  const h = this.el.content.firstChild;
314
314
  h.replaceWith(...h.childNodes);
315
315
  }
316
- for (; (i = Y.nextNode()) !== null && a.length < l; ) {
317
- if (i.nodeType === 1) {
318
- if (i.hasAttributes()) for (const h of i.getAttributeNames()) if (h.endsWith(pe)) {
319
- const p = d[s++], u = i.getAttribute(h).split(F), m = /([.?@])?(.*)/.exec(p);
320
- a.push({ type: 1, index: o, name: m[2], strings: u, ctor: m[1] === "." ? Ze : m[1] === "?" ? Je : m[1] === "@" ? Xe : St }), i.removeAttribute(h);
321
- } else h.startsWith(F) && (a.push({ type: 6, index: o }), i.removeAttribute(h));
322
- if (fe.test(i.tagName)) {
323
- const h = i.textContent.split(F), p = h.length - 1;
316
+ for (; (n = Y.nextNode()) !== null && a.length < l; ) {
317
+ if (n.nodeType === 1) {
318
+ if (n.hasAttributes()) for (const h of n.getAttributeNames()) if (h.endsWith(pe)) {
319
+ const p = d[o++], u = n.getAttribute(h).split(F), m = /([.?@])?(.*)/.exec(p);
320
+ a.push({ type: 1, index: s, name: m[2], strings: u, ctor: m[1] === "." ? Je : m[1] === "?" ? Ze : m[1] === "@" ? Xe : St }), n.removeAttribute(h);
321
+ } else h.startsWith(F) && (a.push({ type: 6, index: s }), n.removeAttribute(h));
322
+ if (fe.test(n.tagName)) {
323
+ const h = n.textContent.split(F), p = h.length - 1;
324
324
  if (p > 0) {
325
- i.textContent = vt ? vt.emptyScript : "";
326
- for (let u = 0; u < p; u++) i.append(h[u], lt()), Y.nextNode(), a.push({ type: 2, index: ++o });
327
- i.append(h[p], lt());
325
+ n.textContent = vt ? vt.emptyScript : "";
326
+ for (let u = 0; u < p; u++) n.append(h[u], lt()), Y.nextNode(), a.push({ type: 2, index: ++s });
327
+ n.append(h[p], lt());
328
328
  }
329
329
  }
330
- } else if (i.nodeType === 8) if (i.data === me) a.push({ type: 2, index: o });
330
+ } else if (n.nodeType === 8) if (n.data === me) a.push({ type: 2, index: s });
331
331
  else {
332
332
  let h = -1;
333
- for (; (h = i.data.indexOf(F, h + 1)) !== -1; ) a.push({ type: 7, index: o }), h += F.length - 1;
333
+ for (; (h = n.data.indexOf(F, h + 1)) !== -1; ) a.push({ type: 7, index: s }), h += F.length - 1;
334
334
  }
335
- o++;
335
+ s++;
336
336
  }
337
337
  }
338
338
  static createElement(t, r) {
339
- const n = G.createElement("template");
340
- return n.innerHTML = t, n;
339
+ const i = G.createElement("template");
340
+ return i.innerHTML = t, i;
341
341
  }
342
342
  }
343
- function Z(e, t, r = e, n) {
344
- var s, l;
343
+ function J(e, t, r = e, i) {
344
+ var o, l;
345
345
  if (t === W) return t;
346
- let i = n !== void 0 ? (s = r._$Co) == null ? void 0 : s[n] : r._$Cl;
347
- const o = ct(t) ? void 0 : t._$litDirective$;
348
- return (i == null ? void 0 : i.constructor) !== o && ((l = i == null ? void 0 : i._$AO) == null || l.call(i, !1), o === void 0 ? i = void 0 : (i = new o(e), i._$AT(e, r, n)), n !== void 0 ? (r._$Co ?? (r._$Co = []))[n] = i : r._$Cl = i), i !== void 0 && (t = Z(e, i._$AS(e, t.values), i, n)), t;
346
+ let n = i !== void 0 ? (o = r._$Co) == null ? void 0 : o[i] : r._$Cl;
347
+ const s = ct(t) ? void 0 : t._$litDirective$;
348
+ return (n == null ? void 0 : n.constructor) !== s && ((l = n == null ? void 0 : n._$AO) == null || l.call(n, !1), s === void 0 ? n = void 0 : (n = new s(e), n._$AT(e, r, i)), i !== void 0 ? (r._$Co ?? (r._$Co = []))[i] = n : r._$Cl = n), n !== void 0 && (t = J(e, n._$AS(e, t.values), n, i)), t;
349
349
  }
350
350
  class We {
351
351
  constructor(t, r) {
@@ -358,21 +358,21 @@ class We {
358
358
  return this._$AM._$AU;
359
359
  }
360
360
  u(t) {
361
- const { el: { content: r }, parts: n } = this._$AD, i = ((t == null ? void 0 : t.creationScope) ?? G).importNode(r, !0);
362
- Y.currentNode = i;
363
- let o = Y.nextNode(), s = 0, l = 0, a = n[0];
361
+ const { el: { content: r }, parts: i } = this._$AD, n = ((t == null ? void 0 : t.creationScope) ?? G).importNode(r, !0);
362
+ Y.currentNode = n;
363
+ let s = Y.nextNode(), o = 0, l = 0, a = i[0];
364
364
  for (; a !== void 0; ) {
365
- if (s === a.index) {
365
+ if (o === a.index) {
366
366
  let c;
367
- a.type === 2 ? c = new ht(o, o.nextSibling, this, t) : a.type === 1 ? c = new a.ctor(o, a.name, a.strings, this, t) : a.type === 6 && (c = new tr(o, this, t)), this._$AV.push(c), a = n[++l];
367
+ a.type === 2 ? c = new ht(s, s.nextSibling, this, t) : a.type === 1 ? c = new a.ctor(s, a.name, a.strings, this, t) : a.type === 6 && (c = new tr(s, this, t)), this._$AV.push(c), a = i[++l];
368
368
  }
369
- s !== (a == null ? void 0 : a.index) && (o = Y.nextNode(), s++);
369
+ o !== (a == null ? void 0 : a.index) && (s = Y.nextNode(), o++);
370
370
  }
371
- return Y.currentNode = G, i;
371
+ return Y.currentNode = G, n;
372
372
  }
373
373
  p(t) {
374
374
  let r = 0;
375
- for (const n of this._$AV) n !== void 0 && (n.strings !== void 0 ? (n._$AI(t, n, r), r += n.strings.length - 2) : n._$AI(t[r])), r++;
375
+ for (const i of this._$AV) i !== void 0 && (i.strings !== void 0 ? (i._$AI(t, i, r), r += i.strings.length - 2) : i._$AI(t[r])), r++;
376
376
  }
377
377
  }
378
378
  class ht {
@@ -380,8 +380,8 @@ class ht {
380
380
  var t;
381
381
  return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
382
382
  }
383
- constructor(t, r, n, i) {
384
- this.type = 2, this._$AH = I, this._$AN = void 0, this._$AA = t, this._$AB = r, this._$AM = n, this.options = i, this._$Cv = (i == null ? void 0 : i.isConnected) ?? !0;
383
+ constructor(t, r, i, n) {
384
+ this.type = 2, this._$AH = I, this._$AN = void 0, this._$AA = t, this._$AB = r, this._$AM = i, this.options = n, this._$Cv = (n == null ? void 0 : n.isConnected) ?? !0;
385
385
  }
386
386
  get parentNode() {
387
387
  let t = this._$AA.parentNode;
@@ -395,7 +395,7 @@ class ht {
395
395
  return this._$AB;
396
396
  }
397
397
  _$AI(t, r = this) {
398
- t = Z(this, t, r), ct(t) ? t === I || t == null || t === "" ? (this._$AH !== I && this._$AR(), this._$AH = I) : t !== this._$AH && t !== W && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Ge(t) ? this.k(t) : this._(t);
398
+ t = J(this, t, r), ct(t) ? t === I || t == null || t === "" ? (this._$AH !== I && this._$AR(), this._$AH = I) : t !== this._$AH && t !== W && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Ge(t) ? this.k(t) : this._(t);
399
399
  }
400
400
  O(t) {
401
401
  return this._$AA.parentNode.insertBefore(t, this._$AB);
@@ -407,30 +407,30 @@ class ht {
407
407
  this._$AH !== I && ct(this._$AH) ? this._$AA.nextSibling.data = t : this.T(G.createTextNode(t)), this._$AH = t;
408
408
  }
409
409
  $(t) {
410
- var o;
411
- const { values: r, _$litType$: n } = t, i = typeof n == "number" ? this._$AC(t) : (n.el === void 0 && (n.el = dt.createElement(ge(n.h, n.h[0]), this.options)), n);
412
- if (((o = this._$AH) == null ? void 0 : o._$AD) === i) this._$AH.p(r);
410
+ var s;
411
+ const { values: r, _$litType$: i } = t, n = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = dt.createElement(ge(i.h, i.h[0]), this.options)), i);
412
+ if (((s = this._$AH) == null ? void 0 : s._$AD) === n) this._$AH.p(r);
413
413
  else {
414
- const s = new We(i, this), l = s.u(this.options);
415
- s.p(r), this.T(l), this._$AH = s;
414
+ const o = new We(n, this), l = o.u(this.options);
415
+ o.p(r), this.T(l), this._$AH = o;
416
416
  }
417
417
  }
418
418
  _$AC(t) {
419
- let r = se.get(t.strings);
420
- return r === void 0 && se.set(t.strings, r = new dt(t)), r;
419
+ let r = oe.get(t.strings);
420
+ return r === void 0 && oe.set(t.strings, r = new dt(t)), r;
421
421
  }
422
422
  k(t) {
423
423
  Vt(this._$AH) || (this._$AH = [], this._$AR());
424
424
  const r = this._$AH;
425
- let n, i = 0;
426
- for (const o of t) i === r.length ? r.push(n = new ht(this.O(lt()), this.O(lt()), this, this.options)) : n = r[i], n._$AI(o), i++;
427
- i < r.length && (this._$AR(n && n._$AB.nextSibling, i), r.length = i);
425
+ let i, n = 0;
426
+ for (const s of t) n === r.length ? r.push(i = new ht(this.O(lt()), this.O(lt()), this, this.options)) : i = r[n], i._$AI(s), n++;
427
+ n < r.length && (this._$AR(i && i._$AB.nextSibling, n), r.length = n);
428
428
  }
429
429
  _$AR(t = this._$AA.nextSibling, r) {
430
- var n;
431
- for ((n = this._$AP) == null ? void 0 : n.call(this, !1, !0, r); t !== this._$AB; ) {
432
- const i = t.nextSibling;
433
- t.remove(), t = i;
430
+ var i;
431
+ for ((i = this._$AP) == null ? void 0 : i.call(this, !1, !0, r); t !== this._$AB; ) {
432
+ const n = t.nextSibling;
433
+ t.remove(), t = n;
434
434
  }
435
435
  }
436
436
  setConnected(t) {
@@ -445,25 +445,25 @@ class St {
445
445
  get _$AU() {
446
446
  return this._$AM._$AU;
447
447
  }
448
- constructor(t, r, n, i, o) {
449
- this.type = 1, this._$AH = I, this._$AN = void 0, this.element = t, this.name = r, this._$AM = i, this.options = o, n.length > 2 || n[0] !== "" || n[1] !== "" ? (this._$AH = Array(n.length - 1).fill(new String()), this.strings = n) : this._$AH = I;
448
+ constructor(t, r, i, n, s) {
449
+ this.type = 1, this._$AH = I, this._$AN = void 0, this.element = t, this.name = r, this._$AM = n, this.options = s, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = I;
450
450
  }
451
- _$AI(t, r = this, n, i) {
452
- const o = this.strings;
453
- let s = !1;
454
- if (o === void 0) t = Z(this, t, r, 0), s = !ct(t) || t !== this._$AH && t !== W, s && (this._$AH = t);
451
+ _$AI(t, r = this, i, n) {
452
+ const s = this.strings;
453
+ let o = !1;
454
+ if (s === void 0) t = J(this, t, r, 0), o = !ct(t) || t !== this._$AH && t !== W, o && (this._$AH = t);
455
455
  else {
456
456
  const l = t;
457
457
  let a, c;
458
- for (t = o[0], a = 0; a < o.length - 1; a++) c = Z(this, l[n + a], r, a), c === W && (c = this._$AH[a]), s || (s = !ct(c) || c !== this._$AH[a]), c === I ? t = I : t !== I && (t += (c ?? "") + o[a + 1]), this._$AH[a] = c;
458
+ for (t = s[0], a = 0; a < s.length - 1; a++) c = J(this, l[i + a], r, a), c === W && (c = this._$AH[a]), o || (o = !ct(c) || c !== this._$AH[a]), c === I ? t = I : t !== I && (t += (c ?? "") + s[a + 1]), this._$AH[a] = c;
459
459
  }
460
- s && !i && this.j(t);
460
+ o && !n && this.j(t);
461
461
  }
462
462
  j(t) {
463
463
  t === I ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
464
464
  }
465
465
  }
466
- class Ze extends St {
466
+ class Je extends St {
467
467
  constructor() {
468
468
  super(...arguments), this.type = 3;
469
469
  }
@@ -471,7 +471,7 @@ class Ze extends St {
471
471
  this.element[this.name] = t === I ? void 0 : t;
472
472
  }
473
473
  }
474
- class Je extends St {
474
+ class Ze extends St {
475
475
  constructor() {
476
476
  super(...arguments), this.type = 4;
477
477
  }
@@ -480,13 +480,13 @@ class Je extends St {
480
480
  }
481
481
  }
482
482
  class Xe extends St {
483
- constructor(t, r, n, i, o) {
484
- super(t, r, n, i, o), this.type = 5;
483
+ constructor(t, r, i, n, s) {
484
+ super(t, r, i, n, s), this.type = 5;
485
485
  }
486
486
  _$AI(t, r = this) {
487
- if ((t = Z(this, t, r, 0) ?? I) === W) return;
488
- const n = this._$AH, i = t === I && n !== I || t.capture !== n.capture || t.once !== n.once || t.passive !== n.passive, o = t !== I && (n === I || i);
489
- i && this.element.removeEventListener(this.name, this, n), o && this.element.addEventListener(this.name, this, t), this._$AH = t;
487
+ if ((t = J(this, t, r, 0) ?? I) === W) return;
488
+ const i = this._$AH, n = t === I && i !== I || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive, s = t !== I && (i === I || n);
489
+ n && this.element.removeEventListener(this.name, this, i), s && this.element.addEventListener(this.name, this, t), this._$AH = t;
490
490
  }
491
491
  handleEvent(t) {
492
492
  var r;
@@ -494,26 +494,26 @@ class Xe extends St {
494
494
  }
495
495
  }
496
496
  class tr {
497
- constructor(t, r, n) {
498
- this.element = t, this.type = 6, this._$AN = void 0, this._$AM = r, this.options = n;
497
+ constructor(t, r, i) {
498
+ this.element = t, this.type = 6, this._$AN = void 0, this._$AM = r, this.options = i;
499
499
  }
500
500
  get _$AU() {
501
501
  return this._$AM._$AU;
502
502
  }
503
503
  _$AI(t) {
504
- Z(this, t);
504
+ J(this, t);
505
505
  }
506
506
  }
507
- const Dt = ot.litHtmlPolyfillSupport;
508
- Dt == null || Dt(dt, ht), (ot.litHtmlVersions ?? (ot.litHtmlVersions = [])).push("3.3.1");
507
+ const Nt = st.litHtmlPolyfillSupport;
508
+ Nt == null || Nt(dt, ht), (st.litHtmlVersions ?? (st.litHtmlVersions = [])).push("3.3.1");
509
509
  const er = (e, t, r) => {
510
- const n = (r == null ? void 0 : r.renderBefore) ?? t;
511
- let i = n._$litPart$;
512
- if (i === void 0) {
513
- const o = (r == null ? void 0 : r.renderBefore) ?? null;
514
- n._$litPart$ = i = new ht(t.insertBefore(lt(), o), o, void 0, r ?? {});
510
+ const i = (r == null ? void 0 : r.renderBefore) ?? t;
511
+ let n = i._$litPart$;
512
+ if (n === void 0) {
513
+ const s = (r == null ? void 0 : r.renderBefore) ?? null;
514
+ i._$litPart$ = n = new ht(t.insertBefore(lt(), s), s, void 0, r ?? {});
515
515
  }
516
- return i._$AI(e), i;
516
+ return n._$AI(e), n;
517
517
  };
518
518
  /**
519
519
  * @license
@@ -521,7 +521,7 @@ const er = (e, t, r) => {
521
521
  * SPDX-License-Identifier: BSD-3-Clause
522
522
  */
523
523
  const j = globalThis;
524
- class st extends Q {
524
+ class ot extends K {
525
525
  constructor() {
526
526
  super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
527
527
  }
@@ -547,9 +547,9 @@ class st extends Q {
547
547
  }
548
548
  }
549
549
  var ue;
550
- st._$litElement$ = !0, st.finalized = !0, (ue = j.litElementHydrateSupport) == null || ue.call(j, { LitElement: st });
551
- const Mt = j.litElementPolyfillSupport;
552
- Mt == null || Mt({ LitElement: st });
550
+ ot._$litElement$ = !0, ot.finalized = !0, (ue = j.litElementHydrateSupport) == null || ue.call(j, { LitElement: ot });
551
+ const Dt = j.litElementPolyfillSupport;
552
+ Dt == null || Dt({ LitElement: ot });
553
553
  (j.litElementVersions ?? (j.litElementVersions = [])).push("4.2.1");
554
554
  /**
555
555
  * @license
@@ -566,31 +566,31 @@ const rr = (e) => (t, r) => {
566
566
  * Copyright 2017 Google LLC
567
567
  * SPDX-License-Identifier: BSD-3-Clause
568
568
  */
569
- const nr = { attribute: !0, type: String, converter: bt, reflect: !1, hasChanged: Yt }, ir = (e = nr, t, r) => {
570
- const { kind: n, metadata: i } = r;
571
- let o = globalThis.litPropertyMetadata.get(i);
572
- if (o === void 0 && globalThis.litPropertyMetadata.set(i, o = /* @__PURE__ */ new Map()), n === "setter" && ((e = Object.create(e)).wrapped = !0), o.set(r.name, e), n === "accessor") {
573
- const { name: s } = r;
569
+ const ir = { attribute: !0, type: String, converter: bt, reflect: !1, hasChanged: Yt }, nr = (e = ir, t, r) => {
570
+ const { kind: i, metadata: n } = r;
571
+ let s = globalThis.litPropertyMetadata.get(n);
572
+ if (s === void 0 && globalThis.litPropertyMetadata.set(n, s = /* @__PURE__ */ new Map()), i === "setter" && ((e = Object.create(e)).wrapped = !0), s.set(r.name, e), i === "accessor") {
573
+ const { name: o } = r;
574
574
  return { set(l) {
575
575
  const a = t.get.call(this);
576
- t.set.call(this, l), this.requestUpdate(s, a, e);
576
+ t.set.call(this, l), this.requestUpdate(o, a, e);
577
577
  }, init(l) {
578
- return l !== void 0 && this.C(s, void 0, e, l), l;
578
+ return l !== void 0 && this.C(o, void 0, e, l), l;
579
579
  } };
580
580
  }
581
- if (n === "setter") {
582
- const { name: s } = r;
581
+ if (i === "setter") {
582
+ const { name: o } = r;
583
583
  return function(l) {
584
- const a = this[s];
585
- t.call(this, l), this.requestUpdate(s, a, e);
584
+ const a = this[o];
585
+ t.call(this, l), this.requestUpdate(o, a, e);
586
586
  };
587
587
  }
588
- throw Error("Unsupported decorator location: " + n);
588
+ throw Error("Unsupported decorator location: " + i);
589
589
  };
590
- function M(e) {
591
- return (t, r) => typeof r == "object" ? ir(e, t, r) : ((n, i, o) => {
592
- const s = i.hasOwnProperty(o);
593
- return i.constructor.createProperty(o, n), s ? Object.getOwnPropertyDescriptor(i, o) : void 0;
590
+ function D(e) {
591
+ return (t, r) => typeof r == "object" ? nr(e, t, r) : ((i, n, s) => {
592
+ const o = n.hasOwnProperty(s);
593
+ return n.constructor.createProperty(s, i), o ? Object.getOwnPropertyDescriptor(n, s) : void 0;
594
594
  })(e, t, r);
595
595
  }
596
596
  /**
@@ -598,10 +598,10 @@ function M(e) {
598
598
  * Copyright 2017 Google LLC
599
599
  * SPDX-License-Identifier: BSD-3-Clause
600
600
  */
601
- function D(e) {
602
- return M({ ...e, state: !0, attribute: !1 });
601
+ function N(e) {
602
+ return D({ ...e, state: !0, attribute: !1 });
603
603
  }
604
- function or(e) {
604
+ function sr(e) {
605
605
  return e instanceof Error && ("response" in e && typeof e.response == "object" && e.response !== null || "data" in e && typeof e.data == "object" && e.data !== null);
606
606
  }
607
607
  var f = {
@@ -614,7 +614,10 @@ var f = {
614
614
  SHOPEEPAY: "shopeepay",
615
615
  ATOM: "atom",
616
616
  DANA: "dana",
617
- TNG: "tng"
617
+ TNG: "tng",
618
+ ALIPAYCN: "alipaycn",
619
+ ALIPAYHK: "alipayhk",
620
+ GCASH: "gcash"
618
621
  }, T = {
619
622
  IDLE: "idle",
620
623
  INITIALIZING: "initializing",
@@ -624,21 +627,21 @@ var f = {
624
627
  SUCCEEDED: "succeeded",
625
628
  FAILED: "failed"
626
629
  };
627
- function sr(e) {
630
+ function or(e) {
628
631
  return e === "paid" ? "succeeded" : e;
629
632
  }
630
633
  var ar = class {
631
- constructor(e, t, r, n, i = {}, o) {
632
- this.isPolling = !1, this.attempts = 0, this.startTime = 0, this.pollTimeoutId = null, this.adapters = e, this.baseUrl = t, this.token = r, this.onStatusUpdate = n, this.onPollStart = o, this.config = {
633
- interval: i.interval ?? 3e3,
634
+ constructor(e, t, r, i, n = {}, s) {
635
+ this.isPolling = !1, this.attempts = 0, this.startTime = 0, this.pollTimeoutId = null, this.adapters = e, this.baseUrl = t, this.token = r, this.onStatusUpdate = i, this.onPollStart = s, this.config = {
636
+ interval: n.interval ?? 3e3,
634
637
  // 3 seconds default
635
- maxAttempts: i.maxAttempts ?? 60,
638
+ maxAttempts: n.maxAttempts ?? 60,
636
639
  // 60 attempts = 3 minutes
637
- timeout: i.timeout ?? 18e4,
640
+ timeout: n.timeout ?? 18e4,
638
641
  // 3 minutes
639
- ignore3DS: i.ignore3DS ?? !1,
642
+ ignore3DS: n.ignore3DS ?? !1,
640
643
  // Default: don't ignore 3DS
641
- ignoreQR: i.ignoreQR ?? !1
644
+ ignoreQR: n.ignoreQR ?? !1
642
645
  // Default: don't ignore QR
643
646
  };
644
647
  }
@@ -711,7 +714,7 @@ var ar = class {
711
714
  "x-token": this.token
712
715
  }
713
716
  ), t = {
714
- status: sr(e.result.status),
717
+ status: or(e.result.status),
715
718
  // Map "paid" to "succeeded"
716
719
  paymentIntentId: e.result.paymentIntentId || "",
717
720
  ...e.result.amount !== void 0 && { amount: e.result.amount },
@@ -873,8 +876,8 @@ var cr = class {
873
876
  this.eventListeners[e] || (this.eventListeners[e] = []);
874
877
  const r = this.eventListeners[e];
875
878
  return r.push(t), () => {
876
- const n = r.indexOf(t);
877
- n > -1 && r.splice(n, 1);
879
+ const i = r.indexOf(t);
880
+ i > -1 && r.splice(i, 1);
878
881
  };
879
882
  }
880
883
  /**
@@ -927,17 +930,17 @@ var cr = class {
927
930
  currency: e.currency,
928
931
  notes: e.notes,
929
932
  orderId: e.orderId
930
- }, r = JSON.stringify(t), n = await this.adapters.crypto.hmacSHA256(this.config.secretKey, r), i = await this.adapters.http.post(
933
+ }, r = JSON.stringify(t), i = await this.adapters.crypto.hmacSHA256(this.config.secretKey, r), n = await this.adapters.http.post(
931
934
  `${this.getApiBaseUrl()}/payment-intent/create`,
932
935
  t,
933
936
  {
934
937
  "x-api-key": this.config.apiKey,
935
- "x-signature": n
938
+ "x-signature": i
936
939
  }
937
- ), s = new URL(i.result.redirectUrl).searchParams.get("token");
938
- if (!s)
940
+ ), o = new URL(n.result.redirectUrl).searchParams.get("token");
941
+ if (!o)
939
942
  throw new Error("No token found in redirectUrl");
940
- this.paymentToken = s, this.paymentIntentId = i.result.paymentIntentId;
943
+ this.paymentToken = o, this.paymentIntentId = n.result.paymentIntentId;
941
944
  const l = await this.adapters.http.get(
942
945
  `${this.getApiBaseUrl()}/payment-intent/get-payment-data`,
943
946
  {
@@ -998,6 +1001,18 @@ var cr = class {
998
1001
  id: "tng",
999
1002
  enabled: !0,
1000
1003
  priority: h++
1004
+ }), (u.includes("alipaycn") || u.includes("alipay cn") || u.includes("alipay_cn") || m.includes("payments_alipaycn")) && d.push({
1005
+ id: "alipaycn",
1006
+ enabled: !0,
1007
+ priority: h++
1008
+ }), (u.includes("alipayhk") || u.includes("alipay hk") || u.includes("alipay_hk") || m.includes("payments_alipayhk")) && d.push({
1009
+ id: "alipayhk",
1010
+ enabled: !0,
1011
+ priority: h++
1012
+ }), (u.includes("gcash") || u.includes("g cash") || m.includes("payments_gcash")) && d.push({
1013
+ id: "gcash",
1014
+ enabled: !0,
1015
+ priority: h++
1001
1016
  });
1002
1017
  }), this.setState({
1003
1018
  status: T.READY,
@@ -1078,7 +1093,7 @@ var cr = class {
1078
1093
  * @public
1079
1094
  */
1080
1095
  async submitPayment(e, t) {
1081
- var n, i, o, s, l;
1096
+ var i, n, s, o, l;
1082
1097
  const r = this.state;
1083
1098
  if (r.status !== "ready")
1084
1099
  throw new Error("Cannot submit payment: SDK not in ready state");
@@ -1117,6 +1132,12 @@ var cr = class {
1117
1132
  return "dana";
1118
1133
  case "tng":
1119
1134
  return "tng";
1135
+ case "alipaycn":
1136
+ return "alipaycn";
1137
+ case "alipayhk":
1138
+ return "alipayhk";
1139
+ case "gcash":
1140
+ return "gcash";
1120
1141
  default:
1121
1142
  return "qr";
1122
1143
  }
@@ -1151,9 +1172,9 @@ var cr = class {
1151
1172
  let c = "Unknown error", d = "PAYMENT_FAILED";
1152
1173
  if (a instanceof Error)
1153
1174
  try {
1154
- if (or(a)) {
1155
- const p = (n = a.response) == null ? void 0 : n.data, u = a.data;
1156
- p ? (c = p.message || ((i = p.error) == null ? void 0 : i.message) || a.message, d = p.code || ((o = p.error) == null ? void 0 : o.code) || d) : u ? (c = u.message || ((s = u.error) == null ? void 0 : s.message) || a.message, d = u.code || ((l = u.error) == null ? void 0 : l.code) || d) : c = a.message;
1175
+ if (sr(a)) {
1176
+ const p = (i = a.response) == null ? void 0 : i.data, u = a.data;
1177
+ p ? (c = p.message || ((n = p.error) == null ? void 0 : n.message) || a.message, d = p.code || ((s = p.error) == null ? void 0 : s.code) || d) : u ? (c = u.message || ((o = u.error) == null ? void 0 : o.message) || a.message, d = u.code || ((l = u.error) == null ? void 0 : l.code) || d) : c = a.message;
1157
1178
  } else
1158
1179
  c = a.message;
1159
1180
  } catch {
@@ -1296,7 +1317,7 @@ var cr = class {
1296
1317
  this.stopPolling();
1297
1318
  return;
1298
1319
  }
1299
- const r = t.selectedMethod === "promptpay" || t.selectedMethod === "duitnow" || t.selectedMethod === "gopay" || t.selectedMethod === "boost" || t.selectedMethod === "shopeepay" || t.selectedMethod === "atom" || t.selectedMethod === "dana" || t.selectedMethod === "tng";
1320
+ const r = t.selectedMethod === "promptpay" || t.selectedMethod === "duitnow" || t.selectedMethod === "gopay" || t.selectedMethod === "boost" || t.selectedMethod === "shopeepay" || t.selectedMethod === "atom" || t.selectedMethod === "dana" || t.selectedMethod === "tng" || t.selectedMethod === "alipaycn" || t.selectedMethod === "alipayhk" || t.selectedMethod === "gcash";
1300
1321
  if (e.qrCode && !this.ignoreQRInPolling && !r) {
1301
1322
  this.emit({
1302
1323
  type: "qr_code_received",
@@ -1388,6 +1409,36 @@ var cr = class {
1388
1409
  });
1389
1410
  return;
1390
1411
  }
1412
+ if (t.selectedMethod === "alipaycn") {
1413
+ this.stopPolling(), this.emit({
1414
+ type: "alipaycn_redirect",
1415
+ payload: {
1416
+ redirectUrl: e.nextActionUrl,
1417
+ methodId: t.selectedMethod
1418
+ }
1419
+ });
1420
+ return;
1421
+ }
1422
+ if (t.selectedMethod === "alipayhk") {
1423
+ this.stopPolling(), this.emit({
1424
+ type: "alipayhk_redirect",
1425
+ payload: {
1426
+ redirectUrl: e.nextActionUrl,
1427
+ methodId: t.selectedMethod
1428
+ }
1429
+ });
1430
+ return;
1431
+ }
1432
+ if (t.selectedMethod === "gcash") {
1433
+ this.stopPolling(), this.emit({
1434
+ type: "gcash_redirect",
1435
+ payload: {
1436
+ redirectUrl: e.nextActionUrl,
1437
+ methodId: t.selectedMethod
1438
+ }
1439
+ });
1440
+ return;
1441
+ }
1391
1442
  if (t.selectedMethod === "paynow" && !this.ignoreQRInPolling) {
1392
1443
  this.emit({
1393
1444
  type: "qr_code_received",
@@ -1399,7 +1450,7 @@ var cr = class {
1399
1450
  });
1400
1451
  return;
1401
1452
  }
1402
- const i = {
1453
+ const n = {
1403
1454
  id: e.paymentIntentId,
1404
1455
  amount: e.amount ?? t.paymentIntent.amount,
1405
1456
  currency: e.currency ?? t.paymentIntent.currency,
@@ -1408,21 +1459,21 @@ var cr = class {
1408
1459
  };
1409
1460
  this.setState({
1410
1461
  status: T.REQUIRES_ACTION,
1411
- paymentIntent: i,
1462
+ paymentIntent: n,
1412
1463
  actionUrl: e.nextActionUrl,
1413
1464
  selectedMethod: t.selectedMethod,
1414
1465
  availableMethods: t.availableMethods
1415
1466
  }), this.emit({
1416
1467
  type: "payment_requires_action",
1417
1468
  payload: {
1418
- paymentIntent: i,
1469
+ paymentIntent: n,
1419
1470
  actionUrl: e.nextActionUrl,
1420
1471
  methodId: t.selectedMethod
1421
1472
  }
1422
1473
  });
1423
1474
  return;
1424
1475
  }
1425
- const n = {
1476
+ const i = {
1426
1477
  id: e.paymentIntentId,
1427
1478
  amount: e.amount ?? t.paymentIntent.amount,
1428
1479
  currency: e.currency ?? t.paymentIntent.currency,
@@ -1432,31 +1483,31 @@ var cr = class {
1432
1483
  if (e.status === "succeeded")
1433
1484
  this.stopPolling(), this.setState({
1434
1485
  status: T.SUCCEEDED,
1435
- paymentIntent: n,
1486
+ paymentIntent: i,
1436
1487
  selectedMethod: t.selectedMethod
1437
1488
  }), this.emit({
1438
1489
  type: "payment_succeeded",
1439
1490
  payload: {
1440
- paymentIntent: n,
1491
+ paymentIntent: i,
1441
1492
  methodId: t.selectedMethod
1442
1493
  }
1443
1494
  });
1444
1495
  else if (e.status === "failed") {
1445
1496
  this.stopPolling();
1446
- const o = {
1497
+ const s = {
1447
1498
  code: "PAYMENT_FAILED",
1448
1499
  message: e.error && typeof e.error == "object" && e.error !== null && "message" in e.error ? String(e.error.message) : "Payment failed",
1449
1500
  timestamp: this.adapters.timer.now()
1450
1501
  };
1451
1502
  this.setState({
1452
1503
  status: T.FAILED,
1453
- error: o,
1454
- paymentIntent: n
1504
+ error: s,
1505
+ paymentIntent: i
1455
1506
  }), this.emit({
1456
1507
  type: "payment_failed",
1457
1508
  payload: {
1458
- error: o,
1459
- paymentIntent: n
1509
+ error: s,
1510
+ paymentIntent: i
1460
1511
  }
1461
1512
  });
1462
1513
  }
@@ -1485,9 +1536,9 @@ var cr = class {
1485
1536
  r(e);
1486
1537
  });
1487
1538
  }
1488
- }, dr = "https://images.ctfassets.net/c3n7jozh84hr/2A5qlS6JkUsOyFVPzQ0KlK/22b497afd71030ef1a44a52394b15027/______2022-06-30_11.03.43.png", ur = "https://www.airwallex.com/docs/assets/contentful/images.ctfassets.net/c3n7jozh84hr/xLSOJpNvMp7cBKdvDln0B/eb2f53a0a3f2317750739dceff9df413/______2022-06-30_10.59.00.png", hr = "https://www.airwallex.com/docs/assets/contentful/images.ctfassets.net/c3n7jozh84hr/4Iq13VoxktB3amHFbQK1yb/f2fe12add0dac233d56c22cf5651c65c/image-20220630-030728.png", pr = "https://www.airwallex.com/docs/assets/contentful/images.ctfassets.net/c3n7jozh84hr/mjau5Tqscwu9tbhRLFbmJ/a66cd2894060b2d3a94b75d7f4e65355/______2022-07-04_17.05.18.png", mr = "https://www.airwallex.com/docs/assets/contentful/images.ctfassets.net/c3n7jozh84hr/1M4DBVFhOrkprPmjxZwS7M/c4a90840d3846b926d3a5524392435fe/Boost.svg", fr = "https://www.airwallex.com/docs/assets/contentful/images.ctfassets.net/c3n7jozh84hr/1BYCLeHNQEyPXBjlIdu09h/71d67c5be3975f77091bf45c7ab58f65/ShopeePay.svg", gr = "https://www.airwallex.com/docs/assets/contentful/images.ctfassets.net/c3n7jozh84hr/61LYQ3RuziTGisarZgaAV1/309f3f1e569609dd0b0095857d6382b5/__2022-05-31_11.44.42.png", yr = "https://www.airwallex.com/docs/assets/contentful/images.ctfassets.net/c3n7jozh84hr/79Uj5xItEZE7L51j2oh6IV/6af4cfefdd65834305931fd16f652d87/DANA.svg", br = "https://www.airwallex.com/docs/assets/contentful/images.ctfassets.net/c3n7jozh84hr/15FHwC4H3W0JrNvsqy6TWH/5d18aa44231c55d6457389e17ac7ea0c/TnG.svg", K = typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, V = function(e, t, r, n, i, o, s, l, a, c) {
1539
+ }, dr = "https://images.ctfassets.net/c3n7jozh84hr/2A5qlS6JkUsOyFVPzQ0KlK/22b497afd71030ef1a44a52394b15027/______2022-06-30_11.03.43.png", ur = "https://www.airwallex.com/docs/assets/contentful/images.ctfassets.net/c3n7jozh84hr/xLSOJpNvMp7cBKdvDln0B/eb2f53a0a3f2317750739dceff9df413/______2022-06-30_10.59.00.png", hr = "https://www.airwallex.com/docs/assets/contentful/images.ctfassets.net/c3n7jozh84hr/4Iq13VoxktB3amHFbQK1yb/f2fe12add0dac233d56c22cf5651c65c/image-20220630-030728.png", pr = "https://www.airwallex.com/docs/assets/contentful/images.ctfassets.net/c3n7jozh84hr/mjau5Tqscwu9tbhRLFbmJ/a66cd2894060b2d3a94b75d7f4e65355/______2022-07-04_17.05.18.png", mr = "https://www.airwallex.com/docs/assets/contentful/images.ctfassets.net/c3n7jozh84hr/1M4DBVFhOrkprPmjxZwS7M/c4a90840d3846b926d3a5524392435fe/Boost.svg", fr = "https://www.airwallex.com/docs/assets/contentful/images.ctfassets.net/c3n7jozh84hr/1BYCLeHNQEyPXBjlIdu09h/71d67c5be3975f77091bf45c7ab58f65/ShopeePay.svg", gr = "https://www.airwallex.com/docs/assets/contentful/images.ctfassets.net/c3n7jozh84hr/61LYQ3RuziTGisarZgaAV1/309f3f1e569609dd0b0095857d6382b5/__2022-05-31_11.44.42.png", yr = "https://www.airwallex.com/docs/assets/contentful/images.ctfassets.net/c3n7jozh84hr/79Uj5xItEZE7L51j2oh6IV/6af4cfefdd65834305931fd16f652d87/DANA.svg", br = "https://www.airwallex.com/docs/assets/contentful/images.ctfassets.net/c3n7jozh84hr/15FHwC4H3W0JrNvsqy6TWH/5d18aa44231c55d6457389e17ac7ea0c/TnG.svg", vr = "https://www.airwallex.com/docs/assets/contentful/images.ctfassets.net/c3n7jozh84hr/5EK8VF1nACmJ0KpPocLuR7/785178078004e82cb69782c570623b8c/Alipay.svg", wr = "https://www.airwallex.com/docs/assets/contentful/images.ctfassets.net/c3n7jozh84hr/3sNSjVq0K9mq5whYcGJhBe/78857434adff807c8e293425491e0bd4/AlipayHK.svg", xr = "https://www.airwallex.com/docs/assets/contentful/images.ctfassets.net/c3n7jozh84hr/4WAO5JJPUOrZ9jBA0Vf4tf/c3896e1a5508efa0c569bd3eaa577dad/GCash.svg", Q = typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, V = function(e, t, r, i, n, s, o, l, a, c) {
1489
1540
  var d = this;
1490
- d.numeralDecimalMark = e || ".", d.numeralIntegerScale = t > 0 ? t : 0, d.numeralDecimalScale = r >= 0 ? r : 2, d.numeralThousandsGroupStyle = n || V.groupStyle.thousand, d.numeralPositiveOnly = !!i, d.stripLeadingZeroes = o !== !1, d.prefix = s || s === "" ? s : "", d.signBeforePrefix = !!l, d.tailPrefix = !!a, d.delimiter = c || c === "" ? c : ",", d.delimiterRE = c ? new RegExp("\\" + c, "g") : "";
1541
+ d.numeralDecimalMark = e || ".", d.numeralIntegerScale = t > 0 ? t : 0, d.numeralDecimalScale = r >= 0 ? r : 2, d.numeralThousandsGroupStyle = i || V.groupStyle.thousand, d.numeralPositiveOnly = !!n, d.stripLeadingZeroes = s !== !1, d.prefix = o || o === "" ? o : "", d.signBeforePrefix = !!l, d.tailPrefix = !!a, d.delimiter = c || c === "" ? c : ",", d.delimiterRE = c ? new RegExp("\\" + c, "g") : "";
1491
1542
  };
1492
1543
  V.groupStyle = {
1493
1544
  thousand: "thousand",
@@ -1500,28 +1551,28 @@ V.prototype = {
1500
1551
  return e.replace(this.delimiterRE, "").replace(this.numeralDecimalMark, ".");
1501
1552
  },
1502
1553
  format: function(e) {
1503
- var t = this, r, n, i, o, s = "";
1504
- switch (e = e.replace(/[A-Za-z]/g, "").replace(t.numeralDecimalMark, "M").replace(/[^\dM-]/g, "").replace(/^\-/, "N").replace(/\-/g, "").replace("N", t.numeralPositiveOnly ? "" : "-").replace("M", t.numeralDecimalMark), t.stripLeadingZeroes && (e = e.replace(/^(-)?0+(?=\d)/, "$1")), n = e.slice(0, 1) === "-" ? "-" : "", typeof t.prefix < "u" ? t.signBeforePrefix ? i = n + t.prefix : i = t.prefix + n : i = n, o = e, e.indexOf(t.numeralDecimalMark) >= 0 && (r = e.split(t.numeralDecimalMark), o = r[0], s = t.numeralDecimalMark + r[1].slice(0, t.numeralDecimalScale)), n === "-" && (o = o.slice(1)), t.numeralIntegerScale > 0 && (o = o.slice(0, t.numeralIntegerScale)), t.numeralThousandsGroupStyle) {
1554
+ var t = this, r, i, n, s, o = "";
1555
+ switch (e = e.replace(/[A-Za-z]/g, "").replace(t.numeralDecimalMark, "M").replace(/[^\dM-]/g, "").replace(/^\-/, "N").replace(/\-/g, "").replace("N", t.numeralPositiveOnly ? "" : "-").replace("M", t.numeralDecimalMark), t.stripLeadingZeroes && (e = e.replace(/^(-)?0+(?=\d)/, "$1")), i = e.slice(0, 1) === "-" ? "-" : "", typeof t.prefix < "u" ? t.signBeforePrefix ? n = i + t.prefix : n = t.prefix + i : n = i, s = e, e.indexOf(t.numeralDecimalMark) >= 0 && (r = e.split(t.numeralDecimalMark), s = r[0], o = t.numeralDecimalMark + r[1].slice(0, t.numeralDecimalScale)), i === "-" && (s = s.slice(1)), t.numeralIntegerScale > 0 && (s = s.slice(0, t.numeralIntegerScale)), t.numeralThousandsGroupStyle) {
1505
1556
  case V.groupStyle.lakh:
1506
- o = o.replace(/(\d)(?=(\d\d)+\d$)/g, "$1" + t.delimiter);
1557
+ s = s.replace(/(\d)(?=(\d\d)+\d$)/g, "$1" + t.delimiter);
1507
1558
  break;
1508
1559
  case V.groupStyle.wan:
1509
- o = o.replace(/(\d)(?=(\d{4})+$)/g, "$1" + t.delimiter);
1560
+ s = s.replace(/(\d)(?=(\d{4})+$)/g, "$1" + t.delimiter);
1510
1561
  break;
1511
1562
  case V.groupStyle.thousand:
1512
- o = o.replace(/(\d)(?=(\d{3})+$)/g, "$1" + t.delimiter);
1563
+ s = s.replace(/(\d)(?=(\d{3})+$)/g, "$1" + t.delimiter);
1513
1564
  break;
1514
1565
  }
1515
- return t.tailPrefix ? n + o.toString() + (t.numeralDecimalScale > 0 ? s.toString() : "") + t.prefix : i + o.toString() + (t.numeralDecimalScale > 0 ? s.toString() : "");
1566
+ return t.tailPrefix ? i + s.toString() + (t.numeralDecimalScale > 0 ? o.toString() : "") + t.prefix : n + s.toString() + (t.numeralDecimalScale > 0 ? o.toString() : "");
1516
1567
  }
1517
1568
  };
1518
- var vr = V, ye = function(e, t, r) {
1519
- var n = this;
1520
- n.date = [], n.blocks = [], n.datePattern = e, n.dateMin = t.split("-").reverse().map(function(i) {
1521
- return parseInt(i, 10);
1522
- }), n.dateMin.length === 2 && n.dateMin.unshift(0), n.dateMax = r.split("-").reverse().map(function(i) {
1523
- return parseInt(i, 10);
1524
- }), n.dateMax.length === 2 && n.dateMax.unshift(0), n.initBlocks();
1569
+ var Sr = V, ye = function(e, t, r) {
1570
+ var i = this;
1571
+ i.date = [], i.blocks = [], i.datePattern = e, i.dateMin = t.split("-").reverse().map(function(n) {
1572
+ return parseInt(n, 10);
1573
+ }), i.dateMin.length === 2 && i.dateMin.unshift(0), i.dateMax = r.split("-").reverse().map(function(n) {
1574
+ return parseInt(n, 10);
1575
+ }), i.dateMax.length === 2 && i.dateMax.unshift(0), i.initBlocks();
1525
1576
  };
1526
1577
  ye.prototype = {
1527
1578
  initBlocks: function() {
@@ -1539,55 +1590,55 @@ ye.prototype = {
1539
1590
  },
1540
1591
  getValidatedDate: function(e) {
1541
1592
  var t = this, r = "";
1542
- return e = e.replace(/[^\d]/g, ""), t.blocks.forEach(function(n, i) {
1593
+ return e = e.replace(/[^\d]/g, ""), t.blocks.forEach(function(i, n) {
1543
1594
  if (e.length > 0) {
1544
- var o = e.slice(0, n), s = o.slice(0, 1), l = e.slice(n);
1545
- switch (t.datePattern[i]) {
1595
+ var s = e.slice(0, i), o = s.slice(0, 1), l = e.slice(i);
1596
+ switch (t.datePattern[n]) {
1546
1597
  case "d":
1547
- o === "00" ? o = "01" : parseInt(s, 10) > 3 ? o = "0" + s : parseInt(o, 10) > 31 && (o = "31");
1598
+ s === "00" ? s = "01" : parseInt(o, 10) > 3 ? s = "0" + o : parseInt(s, 10) > 31 && (s = "31");
1548
1599
  break;
1549
1600
  case "m":
1550
- o === "00" ? o = "01" : parseInt(s, 10) > 1 ? o = "0" + s : parseInt(o, 10) > 12 && (o = "12");
1601
+ s === "00" ? s = "01" : parseInt(o, 10) > 1 ? s = "0" + o : parseInt(s, 10) > 12 && (s = "12");
1551
1602
  break;
1552
1603
  }
1553
- r += o, e = l;
1604
+ r += s, e = l;
1554
1605
  }
1555
1606
  }), this.getFixedDateString(r);
1556
1607
  },
1557
1608
  getFixedDateString: function(e) {
1558
- var t = this, r = t.datePattern, n = [], i = 0, o = 0, s = 0, l = 0, a = 0, c = 0, d, h, p, u = !1;
1559
- e.length === 4 && r[0].toLowerCase() !== "y" && r[1].toLowerCase() !== "y" && (l = r[0] === "d" ? 0 : 2, a = 2 - l, d = parseInt(e.slice(l, l + 2), 10), h = parseInt(e.slice(a, a + 2), 10), n = this.getFixedDate(d, h, 0)), e.length === 8 && (r.forEach(function(b, A) {
1560
- switch (b) {
1609
+ var t = this, r = t.datePattern, i = [], n = 0, s = 0, o = 0, l = 0, a = 0, c = 0, d, h, p, u = !1;
1610
+ e.length === 4 && r[0].toLowerCase() !== "y" && r[1].toLowerCase() !== "y" && (l = r[0] === "d" ? 0 : 2, a = 2 - l, d = parseInt(e.slice(l, l + 2), 10), h = parseInt(e.slice(a, a + 2), 10), i = this.getFixedDate(d, h, 0)), e.length === 8 && (r.forEach(function(v, C) {
1611
+ switch (v) {
1561
1612
  case "d":
1562
- i = A;
1613
+ n = C;
1563
1614
  break;
1564
1615
  case "m":
1565
- o = A;
1616
+ s = C;
1566
1617
  break;
1567
1618
  default:
1568
- s = A;
1619
+ o = C;
1569
1620
  break;
1570
1621
  }
1571
- }), c = s * 2, l = i <= s ? i * 2 : i * 2 + 2, a = o <= s ? o * 2 : o * 2 + 2, d = parseInt(e.slice(l, l + 2), 10), h = parseInt(e.slice(a, a + 2), 10), p = parseInt(e.slice(c, c + 4), 10), u = e.slice(c, c + 4).length === 4, n = this.getFixedDate(d, h, p)), e.length === 4 && (r[0] === "y" || r[1] === "y") && (a = r[0] === "m" ? 0 : 2, c = 2 - a, h = parseInt(e.slice(a, a + 2), 10), p = parseInt(e.slice(c, c + 2), 10), u = e.slice(c, c + 2).length === 2, n = [0, h, p]), e.length === 6 && (r[0] === "Y" || r[1] === "Y") && (a = r[0] === "m" ? 0 : 4, c = 2 - 0.5 * a, h = parseInt(e.slice(a, a + 2), 10), p = parseInt(e.slice(c, c + 4), 10), u = e.slice(c, c + 4).length === 4, n = [0, h, p]), n = t.getRangeFixedDate(n), t.date = n;
1572
- var m = n.length === 0 ? e : r.reduce(function(b, A) {
1573
- switch (A) {
1622
+ }), c = o * 2, l = n <= o ? n * 2 : n * 2 + 2, a = s <= o ? s * 2 : s * 2 + 2, d = parseInt(e.slice(l, l + 2), 10), h = parseInt(e.slice(a, a + 2), 10), p = parseInt(e.slice(c, c + 4), 10), u = e.slice(c, c + 4).length === 4, i = this.getFixedDate(d, h, p)), e.length === 4 && (r[0] === "y" || r[1] === "y") && (a = r[0] === "m" ? 0 : 2, c = 2 - a, h = parseInt(e.slice(a, a + 2), 10), p = parseInt(e.slice(c, c + 2), 10), u = e.slice(c, c + 2).length === 2, i = [0, h, p]), e.length === 6 && (r[0] === "Y" || r[1] === "Y") && (a = r[0] === "m" ? 0 : 4, c = 2 - 0.5 * a, h = parseInt(e.slice(a, a + 2), 10), p = parseInt(e.slice(c, c + 4), 10), u = e.slice(c, c + 4).length === 4, i = [0, h, p]), i = t.getRangeFixedDate(i), t.date = i;
1623
+ var m = i.length === 0 ? e : r.reduce(function(v, C) {
1624
+ switch (C) {
1574
1625
  case "d":
1575
- return b + (n[0] === 0 ? "" : t.addLeadingZero(n[0]));
1626
+ return v + (i[0] === 0 ? "" : t.addLeadingZero(i[0]));
1576
1627
  case "m":
1577
- return b + (n[1] === 0 ? "" : t.addLeadingZero(n[1]));
1628
+ return v + (i[1] === 0 ? "" : t.addLeadingZero(i[1]));
1578
1629
  case "y":
1579
- return b + (u ? t.addLeadingZeroForYear(n[2], !1) : "");
1630
+ return v + (u ? t.addLeadingZeroForYear(i[2], !1) : "");
1580
1631
  case "Y":
1581
- return b + (u ? t.addLeadingZeroForYear(n[2], !0) : "");
1632
+ return v + (u ? t.addLeadingZeroForYear(i[2], !0) : "");
1582
1633
  }
1583
1634
  }, "");
1584
1635
  return m;
1585
1636
  },
1586
1637
  getRangeFixedDate: function(e) {
1587
- var t = this, r = t.datePattern, n = t.dateMin || [], i = t.dateMax || [];
1588
- return !e.length || n.length < 3 && i.length < 3 || r.find(function(o) {
1589
- return o.toLowerCase() === "y";
1590
- }) && e[2] === 0 ? e : i.length && (i[2] < e[2] || i[2] === e[2] && (i[1] < e[1] || i[1] === e[1] && i[0] < e[0])) ? i : n.length && (n[2] > e[2] || n[2] === e[2] && (n[1] > e[1] || n[1] === e[1] && n[0] > e[0])) ? n : e;
1638
+ var t = this, r = t.datePattern, i = t.dateMin || [], n = t.dateMax || [];
1639
+ return !e.length || i.length < 3 && n.length < 3 || r.find(function(s) {
1640
+ return s.toLowerCase() === "y";
1641
+ }) && e[2] === 0 ? e : n.length && (n[2] < e[2] || n[2] === e[2] && (n[1] < e[1] || n[1] === e[1] && n[0] < e[0])) ? n : i.length && (i[2] > e[2] || i[2] === e[2] && (i[1] > e[1] || i[1] === e[1] && i[0] > e[0])) ? i : e;
1591
1642
  },
1592
1643
  getFixedDate: function(e, t, r) {
1593
1644
  return e = Math.min(e, 31), t = Math.min(t, 12), r = parseInt(r || 0, 10), (t < 7 && t % 2 === 0 || t > 8 && t % 2 === 1) && (e = Math.min(e, t === 2 ? this.isLeapYear(r) ? 29 : 28 : 30)), [e, t, r];
@@ -1602,7 +1653,7 @@ ye.prototype = {
1602
1653
  return t ? (e < 10 ? "000" : e < 100 ? "00" : e < 1e3 ? "0" : "") + e : (e < 10 ? "0" : "") + e;
1603
1654
  }
1604
1655
  };
1605
- var wr = ye, be = function(e, t) {
1656
+ var Pr = ye, be = function(e, t) {
1606
1657
  var r = this;
1607
1658
  r.time = [], r.blocks = [], r.timePattern = e, r.timeFormat = t, r.initBlocks();
1608
1659
  };
@@ -1637,54 +1688,54 @@ be.prototype = {
1637
1688
  getValidatedTime: function(e) {
1638
1689
  var t = this, r = "";
1639
1690
  e = e.replace(/[^\d]/g, "");
1640
- var n = t.getTimeFormatOptions();
1641
- return t.blocks.forEach(function(i, o) {
1691
+ var i = t.getTimeFormatOptions();
1692
+ return t.blocks.forEach(function(n, s) {
1642
1693
  if (e.length > 0) {
1643
- var s = e.slice(0, i), l = s.slice(0, 1), a = e.slice(i);
1644
- switch (t.timePattern[o]) {
1694
+ var o = e.slice(0, n), l = o.slice(0, 1), a = e.slice(n);
1695
+ switch (t.timePattern[s]) {
1645
1696
  case "h":
1646
- parseInt(l, 10) > n.maxHourFirstDigit ? s = "0" + l : parseInt(s, 10) > n.maxHours && (s = n.maxHours + "");
1697
+ parseInt(l, 10) > i.maxHourFirstDigit ? o = "0" + l : parseInt(o, 10) > i.maxHours && (o = i.maxHours + "");
1647
1698
  break;
1648
1699
  case "m":
1649
1700
  case "s":
1650
- parseInt(l, 10) > n.maxMinutesFirstDigit ? s = "0" + l : parseInt(s, 10) > n.maxMinutes && (s = n.maxMinutes + "");
1701
+ parseInt(l, 10) > i.maxMinutesFirstDigit ? o = "0" + l : parseInt(o, 10) > i.maxMinutes && (o = i.maxMinutes + "");
1651
1702
  break;
1652
1703
  }
1653
- r += s, e = a;
1704
+ r += o, e = a;
1654
1705
  }
1655
1706
  }), this.getFixedTimeString(r);
1656
1707
  },
1657
1708
  getFixedTimeString: function(e) {
1658
- var t = this, r = t.timePattern, n = [], i = 0, o = 0, s = 0, l = 0, a = 0, c = 0, d, h, p;
1709
+ var t = this, r = t.timePattern, i = [], n = 0, s = 0, o = 0, l = 0, a = 0, c = 0, d, h, p;
1659
1710
  return e.length === 6 && (r.forEach(function(u, m) {
1660
1711
  switch (u) {
1661
1712
  case "s":
1662
- i = m * 2;
1713
+ n = m * 2;
1663
1714
  break;
1664
1715
  case "m":
1665
- o = m * 2;
1716
+ s = m * 2;
1666
1717
  break;
1667
1718
  case "h":
1668
- s = m * 2;
1719
+ o = m * 2;
1669
1720
  break;
1670
1721
  }
1671
- }), c = s, a = o, l = i, d = parseInt(e.slice(l, l + 2), 10), h = parseInt(e.slice(a, a + 2), 10), p = parseInt(e.slice(c, c + 2), 10), n = this.getFixedTime(p, h, d)), e.length === 4 && t.timePattern.indexOf("s") < 0 && (r.forEach(function(u, m) {
1722
+ }), c = o, a = s, l = n, d = parseInt(e.slice(l, l + 2), 10), h = parseInt(e.slice(a, a + 2), 10), p = parseInt(e.slice(c, c + 2), 10), i = this.getFixedTime(p, h, d)), e.length === 4 && t.timePattern.indexOf("s") < 0 && (r.forEach(function(u, m) {
1672
1723
  switch (u) {
1673
1724
  case "m":
1674
- o = m * 2;
1725
+ s = m * 2;
1675
1726
  break;
1676
1727
  case "h":
1677
- s = m * 2;
1728
+ o = m * 2;
1678
1729
  break;
1679
1730
  }
1680
- }), c = s, a = o, d = 0, h = parseInt(e.slice(a, a + 2), 10), p = parseInt(e.slice(c, c + 2), 10), n = this.getFixedTime(p, h, d)), t.time = n, n.length === 0 ? e : r.reduce(function(u, m) {
1731
+ }), c = o, a = s, d = 0, h = parseInt(e.slice(a, a + 2), 10), p = parseInt(e.slice(c, c + 2), 10), i = this.getFixedTime(p, h, d)), t.time = i, i.length === 0 ? e : r.reduce(function(u, m) {
1681
1732
  switch (m) {
1682
1733
  case "s":
1683
- return u + t.addLeadingZero(n[2]);
1734
+ return u + t.addLeadingZero(i[2]);
1684
1735
  case "m":
1685
- return u + t.addLeadingZero(n[1]);
1736
+ return u + t.addLeadingZero(i[1]);
1686
1737
  case "h":
1687
- return u + t.addLeadingZero(n[0]);
1738
+ return u + t.addLeadingZero(i[0]);
1688
1739
  }
1689
1740
  }, "");
1690
1741
  },
@@ -1695,7 +1746,7 @@ be.prototype = {
1695
1746
  return (e < 10 ? "0" : "") + e;
1696
1747
  }
1697
1748
  };
1698
- var xr = be, ve = function(e, t) {
1749
+ var Ar = be, ve = function(e, t) {
1699
1750
  var r = this;
1700
1751
  r.delimiter = t || t === "" ? t : " ", r.delimiterRE = t ? new RegExp("\\" + t, "g") : "", r.formatter = e;
1701
1752
  };
@@ -1706,12 +1757,12 @@ ve.prototype = {
1706
1757
  format: function(e) {
1707
1758
  var t = this;
1708
1759
  t.formatter.clear(), e = e.replace(/[^\d+]/g, ""), e = e.replace(/^\+/, "B").replace(/\+/g, "").replace("B", "+"), e = e.replace(t.delimiterRE, "");
1709
- for (var r = "", n, i = !1, o = 0, s = e.length; o < s; o++)
1710
- n = t.formatter.inputDigit(e.charAt(o)), /[\s()-]/g.test(n) ? (r = n, i = !0) : i || (r = n);
1760
+ for (var r = "", i, n = !1, s = 0, o = e.length; s < o; s++)
1761
+ i = t.formatter.inputDigit(e.charAt(s)), /[\s()-]/g.test(i) ? (r = i, n = !0) : n || (r = i);
1711
1762
  return r = r.replace(/[()]/g, ""), r = r.replace(/[\s-]/g, t.delimiter), r;
1712
1763
  }
1713
1764
  };
1714
- var Sr = ve, Lt = {
1765
+ var kr = ve, Bt = {
1715
1766
  blocks: {
1716
1767
  uatp: [4, 5, 6],
1717
1768
  amex: [4, 6, 5],
@@ -1757,20 +1808,20 @@ var Sr = ve, Lt = {
1757
1808
  unionPay: /^(62|81)\d{0,14}/
1758
1809
  },
1759
1810
  getStrictBlocks: function(e) {
1760
- var t = e.reduce(function(r, n) {
1761
- return r + n;
1811
+ var t = e.reduce(function(r, i) {
1812
+ return r + i;
1762
1813
  }, 0);
1763
1814
  return e.concat(19 - t);
1764
1815
  },
1765
1816
  getInfo: function(e, t) {
1766
- var r = Lt.blocks, n = Lt.re;
1817
+ var r = Bt.blocks, i = Bt.re;
1767
1818
  t = !!t;
1768
- for (var i in n)
1769
- if (n[i].test(e)) {
1770
- var o = r[i];
1819
+ for (var n in i)
1820
+ if (i[n].test(e)) {
1821
+ var s = r[n];
1771
1822
  return {
1772
- type: i,
1773
- blocks: t ? this.getStrictBlocks(o) : o
1823
+ type: n,
1824
+ blocks: t ? this.getStrictBlocks(s) : s
1774
1825
  };
1775
1826
  }
1776
1827
  return {
@@ -1778,7 +1829,7 @@ var Sr = ve, Lt = {
1778
1829
  blocks: t ? this.getStrictBlocks(r.general) : r.general
1779
1830
  };
1780
1831
  }
1781
- }, Pr = Lt, kr = {
1832
+ }, Cr = Bt, _r = {
1782
1833
  noop: function() {
1783
1834
  },
1784
1835
  strip: function(e, t) {
@@ -1787,30 +1838,30 @@ var Sr = ve, Lt = {
1787
1838
  getPostDelimiter: function(e, t, r) {
1788
1839
  if (r.length === 0)
1789
1840
  return e.slice(-t.length) === t ? t : "";
1790
- var n = "";
1791
- return r.forEach(function(i) {
1792
- e.slice(-i.length) === i && (n = i);
1793
- }), n;
1841
+ var i = "";
1842
+ return r.forEach(function(n) {
1843
+ e.slice(-n.length) === n && (i = n);
1844
+ }), i;
1794
1845
  },
1795
1846
  getDelimiterREByDelimiter: function(e) {
1796
1847
  return new RegExp(e.replace(/([.?*+^$[\]\\(){}|-])/g, "\\$1"), "g");
1797
1848
  },
1798
- getNextCursorPosition: function(e, t, r, n, i) {
1799
- return t.length === e ? r.length : e + this.getPositionOffset(e, t, r, n, i);
1849
+ getNextCursorPosition: function(e, t, r, i, n) {
1850
+ return t.length === e ? r.length : e + this.getPositionOffset(e, t, r, i, n);
1800
1851
  },
1801
- getPositionOffset: function(e, t, r, n, i) {
1802
- var o, s, l;
1803
- return o = this.stripDelimiters(t.slice(0, e), n, i), s = this.stripDelimiters(r.slice(0, e), n, i), l = o.length - s.length, l !== 0 ? l / Math.abs(l) : 0;
1852
+ getPositionOffset: function(e, t, r, i, n) {
1853
+ var s, o, l;
1854
+ return s = this.stripDelimiters(t.slice(0, e), i, n), o = this.stripDelimiters(r.slice(0, e), i, n), l = s.length - o.length, l !== 0 ? l / Math.abs(l) : 0;
1804
1855
  },
1805
1856
  stripDelimiters: function(e, t, r) {
1806
- var n = this;
1857
+ var i = this;
1807
1858
  if (r.length === 0) {
1808
- var i = t ? n.getDelimiterREByDelimiter(t) : "";
1809
- return e.replace(i, "");
1859
+ var n = t ? i.getDelimiterREByDelimiter(t) : "";
1860
+ return e.replace(n, "");
1810
1861
  }
1811
- return r.forEach(function(o) {
1812
- o.split("").forEach(function(s) {
1813
- e = e.replace(n.getDelimiterREByDelimiter(s), "");
1862
+ return r.forEach(function(s) {
1863
+ s.split("").forEach(function(o) {
1864
+ e = e.replace(i.getDelimiterREByDelimiter(o), "");
1814
1865
  });
1815
1866
  }), e;
1816
1867
  },
@@ -1828,20 +1879,20 @@ var Sr = ve, Lt = {
1828
1879
  // PREFIX-123 | PEFIX-123 | 123
1829
1880
  // PREFIX-123 | PREFIX-23 | 23
1830
1881
  // PREFIX-123 | PREFIX-1234 | 1234
1831
- getPrefixStrippedValue: function(e, t, r, n, i, o, s, l, a) {
1882
+ getPrefixStrippedValue: function(e, t, r, i, n, s, o, l, a) {
1832
1883
  if (r === 0)
1833
1884
  return e;
1834
1885
  if (e === t && e !== "")
1835
1886
  return "";
1836
1887
  if (a && e.slice(0, 1) == "-") {
1837
- var c = n.slice(0, 1) == "-" ? n.slice(1) : n;
1838
- return "-" + this.getPrefixStrippedValue(e.slice(1), t, r, c, i, o, s, l, a);
1839
- }
1840
- if (n.slice(0, r) !== t && !l)
1841
- return s && !n && e ? e : "";
1842
- if (n.slice(-r) !== t && l)
1843
- return s && !n && e ? e : "";
1844
- var d = this.stripDelimiters(n, i, o);
1888
+ var c = i.slice(0, 1) == "-" ? i.slice(1) : i;
1889
+ return "-" + this.getPrefixStrippedValue(e.slice(1), t, r, c, n, s, o, l, a);
1890
+ }
1891
+ if (i.slice(0, r) !== t && !l)
1892
+ return o && !i && e ? e : "";
1893
+ if (i.slice(-r) !== t && l)
1894
+ return o && !i && e ? e : "";
1895
+ var d = this.stripDelimiters(i, n, s);
1845
1896
  return e.slice(0, r) !== t && !l ? d.slice(r) : e.slice(-r) !== t && l ? d.slice(0, -r - 1) : l ? e.slice(0, -r) : e.slice(r);
1846
1897
  },
1847
1898
  getFirstDiffIndex: function(e, t) {
@@ -1850,24 +1901,24 @@ var Sr = ve, Lt = {
1850
1901
  return -1;
1851
1902
  return r;
1852
1903
  },
1853
- getFormattedValue: function(e, t, r, n, i, o) {
1854
- var s = "", l = i.length > 0, a = "";
1904
+ getFormattedValue: function(e, t, r, i, n, s) {
1905
+ var o = "", l = n.length > 0, a = "";
1855
1906
  return r === 0 ? e : (t.forEach(function(c, d) {
1856
1907
  if (e.length > 0) {
1857
1908
  var h = e.slice(0, c), p = e.slice(c);
1858
- l ? a = i[o ? d - 1 : d] || a : a = n, o ? (d > 0 && (s += a), s += h) : (s += h, h.length === c && d < r - 1 && (s += a)), e = p;
1909
+ l ? a = n[s ? d - 1 : d] || a : a = i, s ? (d > 0 && (o += a), o += h) : (o += h, h.length === c && d < r - 1 && (o += a)), e = p;
1859
1910
  }
1860
- }), s);
1911
+ }), o);
1861
1912
  },
1862
1913
  // move cursor to the end
1863
1914
  // the first time user focuses on an input with prefix
1864
- fixPrefixCursor: function(e, t, r, n) {
1915
+ fixPrefixCursor: function(e, t, r, i) {
1865
1916
  if (e) {
1866
- var i = e.value, o = r || n[0] || " ";
1867
- if (!(!e.setSelectionRange || !t || t.length + o.length <= i.length)) {
1868
- var s = i.length * 2;
1917
+ var n = e.value, s = r || i[0] || " ";
1918
+ if (!(!e.setSelectionRange || !t || t.length + s.length <= n.length)) {
1919
+ var o = n.length * 2;
1869
1920
  setTimeout(function() {
1870
- e.setSelectionRange(s, s);
1921
+ e.setSelectionRange(o, o);
1871
1922
  }, 1);
1872
1923
  }
1873
1924
  }
@@ -1884,8 +1935,8 @@ var Sr = ve, Lt = {
1884
1935
  setSelection: function(e, t, r) {
1885
1936
  if (e === this.getActiveElement(r) && !(e && e.value.length <= t))
1886
1937
  if (e.createTextRange) {
1887
- var n = e.createTextRange();
1888
- n.move("character", t), n.select();
1938
+ var i = e.createTextRange();
1939
+ i.move("character", t), i.select();
1889
1940
  } else
1890
1941
  try {
1891
1942
  e.setSelectionRange(t, t);
@@ -1907,33 +1958,33 @@ var Sr = ve, Lt = {
1907
1958
  isAndroidBackspaceKeydown: function(e, t) {
1908
1959
  return !this.isAndroid() || !e || !t ? !1 : t === e.slice(0, -1);
1909
1960
  }
1910
- }, Cr = kr, Ar = {
1961
+ }, Er = _r, Ir = {
1911
1962
  // Maybe change to object-assign
1912
1963
  // for now just keep it as simple
1913
1964
  assign: function(e, t) {
1914
1965
  return e = e || {}, t = t || {}, e.creditCard = !!t.creditCard, e.creditCardStrictMode = !!t.creditCardStrictMode, e.creditCardType = "", e.onCreditCardTypeChanged = t.onCreditCardTypeChanged || function() {
1915
- }, e.phone = !!t.phone, e.phoneRegionCode = t.phoneRegionCode || "AU", e.phoneFormatter = {}, e.time = !!t.time, e.timePattern = t.timePattern || ["h", "m", "s"], e.timeFormat = t.timeFormat || "24", e.timeFormatter = {}, e.date = !!t.date, e.datePattern = t.datePattern || ["d", "m", "Y"], e.dateMin = t.dateMin || "", e.dateMax = t.dateMax || "", e.dateFormatter = {}, e.numeral = !!t.numeral, e.numeralIntegerScale = t.numeralIntegerScale > 0 ? t.numeralIntegerScale : 0, e.numeralDecimalScale = t.numeralDecimalScale >= 0 ? t.numeralDecimalScale : 2, e.numeralDecimalMark = t.numeralDecimalMark || ".", e.numeralThousandsGroupStyle = t.numeralThousandsGroupStyle || "thousand", e.numeralPositiveOnly = !!t.numeralPositiveOnly, e.stripLeadingZeroes = t.stripLeadingZeroes !== !1, e.signBeforePrefix = !!t.signBeforePrefix, e.tailPrefix = !!t.tailPrefix, e.swapHiddenInput = !!t.swapHiddenInput, e.numericOnly = e.creditCard || e.date || !!t.numericOnly, e.uppercase = !!t.uppercase, e.lowercase = !!t.lowercase, e.prefix = e.creditCard || e.date ? "" : t.prefix || "", e.noImmediatePrefix = !!t.noImmediatePrefix, e.prefixLength = e.prefix.length, e.rawValueTrimPrefix = !!t.rawValueTrimPrefix, e.copyDelimiter = !!t.copyDelimiter, e.initValue = t.initValue !== void 0 && t.initValue !== null ? t.initValue.toString() : "", e.delimiter = t.delimiter || t.delimiter === "" ? t.delimiter : t.date ? "/" : t.time ? ":" : t.numeral ? "," : (t.phone, " "), e.delimiterLength = e.delimiter.length, e.delimiterLazyShow = !!t.delimiterLazyShow, e.delimiters = t.delimiters || [], e.blocks = t.blocks || [], e.blocksLength = e.blocks.length, e.root = typeof K == "object" && K ? K : window, e.document = t.document || e.root.document, e.maxLength = 0, e.backspace = !1, e.result = "", e.onValueChanged = t.onValueChanged || function() {
1966
+ }, e.phone = !!t.phone, e.phoneRegionCode = t.phoneRegionCode || "AU", e.phoneFormatter = {}, e.time = !!t.time, e.timePattern = t.timePattern || ["h", "m", "s"], e.timeFormat = t.timeFormat || "24", e.timeFormatter = {}, e.date = !!t.date, e.datePattern = t.datePattern || ["d", "m", "Y"], e.dateMin = t.dateMin || "", e.dateMax = t.dateMax || "", e.dateFormatter = {}, e.numeral = !!t.numeral, e.numeralIntegerScale = t.numeralIntegerScale > 0 ? t.numeralIntegerScale : 0, e.numeralDecimalScale = t.numeralDecimalScale >= 0 ? t.numeralDecimalScale : 2, e.numeralDecimalMark = t.numeralDecimalMark || ".", e.numeralThousandsGroupStyle = t.numeralThousandsGroupStyle || "thousand", e.numeralPositiveOnly = !!t.numeralPositiveOnly, e.stripLeadingZeroes = t.stripLeadingZeroes !== !1, e.signBeforePrefix = !!t.signBeforePrefix, e.tailPrefix = !!t.tailPrefix, e.swapHiddenInput = !!t.swapHiddenInput, e.numericOnly = e.creditCard || e.date || !!t.numericOnly, e.uppercase = !!t.uppercase, e.lowercase = !!t.lowercase, e.prefix = e.creditCard || e.date ? "" : t.prefix || "", e.noImmediatePrefix = !!t.noImmediatePrefix, e.prefixLength = e.prefix.length, e.rawValueTrimPrefix = !!t.rawValueTrimPrefix, e.copyDelimiter = !!t.copyDelimiter, e.initValue = t.initValue !== void 0 && t.initValue !== null ? t.initValue.toString() : "", e.delimiter = t.delimiter || t.delimiter === "" ? t.delimiter : t.date ? "/" : t.time ? ":" : t.numeral ? "," : (t.phone, " "), e.delimiterLength = e.delimiter.length, e.delimiterLazyShow = !!t.delimiterLazyShow, e.delimiters = t.delimiters || [], e.blocks = t.blocks || [], e.blocksLength = e.blocks.length, e.root = typeof Q == "object" && Q ? Q : window, e.document = t.document || e.root.document, e.maxLength = 0, e.backspace = !1, e.result = "", e.onValueChanged = t.onValueChanged || function() {
1916
1967
  }, e;
1917
1968
  }
1918
- }, Er = Ar, k = function(e, t) {
1919
- var r = this, n = !1;
1920
- if (typeof e == "string" ? (r.element = document.querySelector(e), n = document.querySelectorAll(e).length > 1) : typeof e.length < "u" && e.length > 0 ? (r.element = e[0], n = e.length > 1) : r.element = e, !r.element)
1969
+ }, Nr = Ir, A = function(e, t) {
1970
+ var r = this, i = !1;
1971
+ if (typeof e == "string" ? (r.element = document.querySelector(e), i = document.querySelectorAll(e).length > 1) : typeof e.length < "u" && e.length > 0 ? (r.element = e[0], i = e.length > 1) : r.element = e, !r.element)
1921
1972
  throw new Error("[cleave.js] Please check the element");
1922
- if (n)
1973
+ if (i)
1923
1974
  try {
1924
1975
  console.warn("[cleave.js] Multiple input fields matched, cleave.js will only take the first one.");
1925
1976
  } catch {
1926
1977
  }
1927
- t.initValue = r.element.value, r.properties = k.DefaultProperties.assign({}, t), r.init();
1978
+ t.initValue = r.element.value, r.properties = A.DefaultProperties.assign({}, t), r.init();
1928
1979
  };
1929
- k.prototype = {
1980
+ A.prototype = {
1930
1981
  init: function() {
1931
1982
  var e = this, t = e.properties;
1932
1983
  if (!t.numeral && !t.phone && !t.creditCard && !t.time && !t.date && t.blocksLength === 0 && !t.prefix) {
1933
1984
  e.onInput(t.initValue);
1934
1985
  return;
1935
1986
  }
1936
- t.maxLength = k.Util.getMaxLength(t.blocks), e.isAndroid = k.Util.isAndroid(), e.lastInputValue = "", e.isBackward = "", e.onChangeListener = e.onChange.bind(e), e.onKeyDownListener = e.onKeyDown.bind(e), e.onFocusListener = e.onFocus.bind(e), e.onCutListener = e.onCut.bind(e), e.onCopyListener = e.onCopy.bind(e), e.initSwapHiddenInput(), e.element.addEventListener("input", e.onChangeListener), e.element.addEventListener("keydown", e.onKeyDownListener), e.element.addEventListener("focus", e.onFocusListener), e.element.addEventListener("cut", e.onCutListener), e.element.addEventListener("copy", e.onCopyListener), e.initPhoneFormatter(), e.initDateFormatter(), e.initTimeFormatter(), e.initNumeralFormatter(), (t.initValue || t.prefix && !t.noImmediatePrefix) && e.onInput(t.initValue);
1987
+ t.maxLength = A.Util.getMaxLength(t.blocks), e.isAndroid = A.Util.isAndroid(), e.lastInputValue = "", e.isBackward = "", e.onChangeListener = e.onChange.bind(e), e.onKeyDownListener = e.onKeyDown.bind(e), e.onFocusListener = e.onFocus.bind(e), e.onCutListener = e.onCut.bind(e), e.onCopyListener = e.onCopy.bind(e), e.initSwapHiddenInput(), e.element.addEventListener("input", e.onChangeListener), e.element.addEventListener("keydown", e.onKeyDownListener), e.element.addEventListener("focus", e.onFocusListener), e.element.addEventListener("cut", e.onCutListener), e.element.addEventListener("copy", e.onCopyListener), e.initPhoneFormatter(), e.initDateFormatter(), e.initTimeFormatter(), e.initNumeralFormatter(), (t.initValue || t.prefix && !t.noImmediatePrefix) && e.onInput(t.initValue);
1937
1988
  },
1938
1989
  initSwapHiddenInput: function() {
1939
1990
  var e = this, t = e.properties;
@@ -1944,7 +1995,7 @@ k.prototype = {
1944
1995
  },
1945
1996
  initNumeralFormatter: function() {
1946
1997
  var e = this, t = e.properties;
1947
- t.numeral && (t.numeralFormatter = new k.NumeralFormatter(
1998
+ t.numeral && (t.numeralFormatter = new A.NumeralFormatter(
1948
1999
  t.numeralDecimalMark,
1949
2000
  t.numeralIntegerScale,
1950
2001
  t.numeralDecimalScale,
@@ -1959,17 +2010,17 @@ k.prototype = {
1959
2010
  },
1960
2011
  initTimeFormatter: function() {
1961
2012
  var e = this, t = e.properties;
1962
- t.time && (t.timeFormatter = new k.TimeFormatter(t.timePattern, t.timeFormat), t.blocks = t.timeFormatter.getBlocks(), t.blocksLength = t.blocks.length, t.maxLength = k.Util.getMaxLength(t.blocks));
2013
+ t.time && (t.timeFormatter = new A.TimeFormatter(t.timePattern, t.timeFormat), t.blocks = t.timeFormatter.getBlocks(), t.blocksLength = t.blocks.length, t.maxLength = A.Util.getMaxLength(t.blocks));
1963
2014
  },
1964
2015
  initDateFormatter: function() {
1965
2016
  var e = this, t = e.properties;
1966
- t.date && (t.dateFormatter = new k.DateFormatter(t.datePattern, t.dateMin, t.dateMax), t.blocks = t.dateFormatter.getBlocks(), t.blocksLength = t.blocks.length, t.maxLength = k.Util.getMaxLength(t.blocks));
2017
+ t.date && (t.dateFormatter = new A.DateFormatter(t.datePattern, t.dateMin, t.dateMax), t.blocks = t.dateFormatter.getBlocks(), t.blocksLength = t.blocks.length, t.maxLength = A.Util.getMaxLength(t.blocks));
1967
2018
  },
1968
2019
  initPhoneFormatter: function() {
1969
2020
  var e = this, t = e.properties;
1970
2021
  if (t.phone)
1971
2022
  try {
1972
- t.phoneFormatter = new k.PhoneFormatter(
2023
+ t.phoneFormatter = new A.PhoneFormatter(
1973
2024
  new t.root.Cleave.AsYouTypeFormatter(t.phoneRegionCode),
1974
2025
  t.delimiter
1975
2026
  );
@@ -1982,32 +2033,32 @@ k.prototype = {
1982
2033
  t.lastInputValue = t.element.value, t.isBackward = r === 8;
1983
2034
  },
1984
2035
  onChange: function(e) {
1985
- var t = this, r = t.properties, n = k.Util;
2036
+ var t = this, r = t.properties, i = A.Util;
1986
2037
  t.isBackward = t.isBackward || e.inputType === "deleteContentBackward";
1987
- var i = n.getPostDelimiter(t.lastInputValue, r.delimiter, r.delimiters);
1988
- t.isBackward && i ? r.postDelimiterBackspace = i : r.postDelimiterBackspace = !1, this.onInput(this.element.value);
2038
+ var n = i.getPostDelimiter(t.lastInputValue, r.delimiter, r.delimiters);
2039
+ t.isBackward && n ? r.postDelimiterBackspace = n : r.postDelimiterBackspace = !1, this.onInput(this.element.value);
1989
2040
  },
1990
2041
  onFocus: function() {
1991
2042
  var e = this, t = e.properties;
1992
- e.lastInputValue = e.element.value, t.prefix && t.noImmediatePrefix && !e.element.value && this.onInput(t.prefix), k.Util.fixPrefixCursor(e.element, t.prefix, t.delimiter, t.delimiters);
2043
+ e.lastInputValue = e.element.value, t.prefix && t.noImmediatePrefix && !e.element.value && this.onInput(t.prefix), A.Util.fixPrefixCursor(e.element, t.prefix, t.delimiter, t.delimiters);
1993
2044
  },
1994
2045
  onCut: function(e) {
1995
- k.Util.checkFullSelection(this.element.value) && (this.copyClipboardData(e), this.onInput(""));
2046
+ A.Util.checkFullSelection(this.element.value) && (this.copyClipboardData(e), this.onInput(""));
1996
2047
  },
1997
2048
  onCopy: function(e) {
1998
- k.Util.checkFullSelection(this.element.value) && this.copyClipboardData(e);
2049
+ A.Util.checkFullSelection(this.element.value) && this.copyClipboardData(e);
1999
2050
  },
2000
2051
  copyClipboardData: function(e) {
2001
- var t = this, r = t.properties, n = k.Util, i = t.element.value, o = "";
2002
- r.copyDelimiter ? o = i : o = n.stripDelimiters(i, r.delimiter, r.delimiters);
2052
+ var t = this, r = t.properties, i = A.Util, n = t.element.value, s = "";
2053
+ r.copyDelimiter ? s = n : s = i.stripDelimiters(n, r.delimiter, r.delimiters);
2003
2054
  try {
2004
- e.clipboardData ? e.clipboardData.setData("Text", o) : window.clipboardData.setData("Text", o), e.preventDefault();
2055
+ e.clipboardData ? e.clipboardData.setData("Text", s) : window.clipboardData.setData("Text", s), e.preventDefault();
2005
2056
  } catch {
2006
2057
  }
2007
2058
  },
2008
2059
  onInput: function(e) {
2009
- var t = this, r = t.properties, n = k.Util, i = n.getPostDelimiter(e, r.delimiter, r.delimiters);
2010
- if (!r.numeral && r.postDelimiterBackspace && !i && (e = n.headStr(e, e.length - r.postDelimiterBackspace.length)), r.phone) {
2060
+ var t = this, r = t.properties, i = A.Util, n = i.getPostDelimiter(e, r.delimiter, r.delimiters);
2061
+ if (!r.numeral && r.postDelimiterBackspace && !n && (e = i.headStr(e, e.length - r.postDelimiterBackspace.length)), r.phone) {
2011
2062
  r.prefix && (!r.noImmediatePrefix || e.length) ? r.result = r.prefix + r.phoneFormatter.format(e).slice(r.prefix.length) : r.result = r.phoneFormatter.format(e), t.updateValueState();
2012
2063
  return;
2013
2064
  }
@@ -2015,11 +2066,11 @@ k.prototype = {
2015
2066
  r.prefix && r.noImmediatePrefix && e.length === 0 ? r.result = "" : r.result = r.numeralFormatter.format(e), t.updateValueState();
2016
2067
  return;
2017
2068
  }
2018
- if (r.date && (e = r.dateFormatter.getValidatedDate(e)), r.time && (e = r.timeFormatter.getValidatedTime(e)), e = n.stripDelimiters(e, r.delimiter, r.delimiters), e = n.getPrefixStrippedValue(e, r.prefix, r.prefixLength, r.result, r.delimiter, r.delimiters, r.noImmediatePrefix, r.tailPrefix, r.signBeforePrefix), e = r.numericOnly ? n.strip(e, /[^\d]/g) : e, e = r.uppercase ? e.toUpperCase() : e, e = r.lowercase ? e.toLowerCase() : e, r.prefix && (r.tailPrefix ? e = e + r.prefix : e = r.prefix + e, r.blocksLength === 0)) {
2069
+ if (r.date && (e = r.dateFormatter.getValidatedDate(e)), r.time && (e = r.timeFormatter.getValidatedTime(e)), e = i.stripDelimiters(e, r.delimiter, r.delimiters), e = i.getPrefixStrippedValue(e, r.prefix, r.prefixLength, r.result, r.delimiter, r.delimiters, r.noImmediatePrefix, r.tailPrefix, r.signBeforePrefix), e = r.numericOnly ? i.strip(e, /[^\d]/g) : e, e = r.uppercase ? e.toUpperCase() : e, e = r.lowercase ? e.toLowerCase() : e, r.prefix && (r.tailPrefix ? e = e + r.prefix : e = r.prefix + e, r.blocksLength === 0)) {
2019
2070
  r.result = e, t.updateValueState();
2020
2071
  return;
2021
2072
  }
2022
- r.creditCard && t.updateCreditCardPropsByValue(e), e = n.headStr(e, r.maxLength), r.result = n.getFormattedValue(
2073
+ r.creditCard && t.updateCreditCardPropsByValue(e), e = i.headStr(e, r.maxLength), r.result = i.getFormattedValue(
2023
2074
  e,
2024
2075
  r.blocks,
2025
2076
  r.blocksLength,
@@ -2029,20 +2080,20 @@ k.prototype = {
2029
2080
  ), t.updateValueState();
2030
2081
  },
2031
2082
  updateCreditCardPropsByValue: function(e) {
2032
- var t = this, r = t.properties, n = k.Util, i;
2033
- n.headStr(r.result, 4) !== n.headStr(e, 4) && (i = k.CreditCardDetector.getInfo(e, r.creditCardStrictMode), r.blocks = i.blocks, r.blocksLength = r.blocks.length, r.maxLength = n.getMaxLength(r.blocks), r.creditCardType !== i.type && (r.creditCardType = i.type, r.onCreditCardTypeChanged.call(t, r.creditCardType)));
2083
+ var t = this, r = t.properties, i = A.Util, n;
2084
+ i.headStr(r.result, 4) !== i.headStr(e, 4) && (n = A.CreditCardDetector.getInfo(e, r.creditCardStrictMode), r.blocks = n.blocks, r.blocksLength = r.blocks.length, r.maxLength = i.getMaxLength(r.blocks), r.creditCardType !== n.type && (r.creditCardType = n.type, r.onCreditCardTypeChanged.call(t, r.creditCardType)));
2034
2085
  },
2035
2086
  updateValueState: function() {
2036
- var e = this, t = k.Util, r = e.properties;
2087
+ var e = this, t = A.Util, r = e.properties;
2037
2088
  if (e.element) {
2038
- var n = e.element.selectionEnd, i = e.element.value, o = r.result;
2039
- if (n = t.getNextCursorPosition(n, i, o, r.delimiter, r.delimiters), e.isAndroid) {
2089
+ var i = e.element.selectionEnd, n = e.element.value, s = r.result;
2090
+ if (i = t.getNextCursorPosition(i, n, s, r.delimiter, r.delimiters), e.isAndroid) {
2040
2091
  window.setTimeout(function() {
2041
- e.element.value = o, t.setSelection(e.element, n, r.document, !1), e.callOnValueChanged();
2092
+ e.element.value = s, t.setSelection(e.element, i, r.document, !1), e.callOnValueChanged();
2042
2093
  }, 1);
2043
2094
  return;
2044
2095
  }
2045
- e.element.value = o, r.swapHiddenInput && (e.elementSwapHidden.value = e.getRawValue()), t.setSelection(e.element, n, r.document, !1), e.callOnValueChanged();
2096
+ e.element.value = s, r.swapHiddenInput && (e.elementSwapHidden.value = e.getRawValue()), t.setSelection(e.element, i, r.document, !1), e.callOnValueChanged();
2046
2097
  }
2047
2098
  },
2048
2099
  callOnValueChanged: function() {
@@ -2064,8 +2115,8 @@ k.prototype = {
2064
2115
  e = e != null ? e.toString() : "", r.numeral && (e = e.replace(".", r.numeralDecimalMark)), r.postDelimiterBackspace = !1, t.element.value = e, t.onInput(e);
2065
2116
  },
2066
2117
  getRawValue: function() {
2067
- var e = this, t = e.properties, r = k.Util, n = e.element.value;
2068
- return t.rawValueTrimPrefix && (n = r.getPrefixStrippedValue(n, t.prefix, t.prefixLength, t.result, t.delimiter, t.delimiters, t.noImmediatePrefix, t.tailPrefix, t.signBeforePrefix)), t.numeral ? n = t.numeralFormatter.getRawValue(n) : n = r.stripDelimiters(n, t.delimiter, t.delimiters), n;
2118
+ var e = this, t = e.properties, r = A.Util, i = e.element.value;
2119
+ return t.rawValueTrimPrefix && (i = r.getPrefixStrippedValue(i, t.prefix, t.prefixLength, t.result, t.delimiter, t.delimiters, t.noImmediatePrefix, t.tailPrefix, t.signBeforePrefix)), t.numeral ? i = t.numeralFormatter.getRawValue(i) : i = r.stripDelimiters(i, t.delimiter, t.delimiters), i;
2069
2120
  },
2070
2121
  getISOFormatDate: function() {
2071
2122
  var e = this, t = e.properties;
@@ -2086,19 +2137,19 @@ k.prototype = {
2086
2137
  return "[Cleave Object]";
2087
2138
  }
2088
2139
  };
2089
- k.NumeralFormatter = vr;
2090
- k.DateFormatter = wr;
2091
- k.TimeFormatter = xr;
2092
- k.PhoneFormatter = Sr;
2093
- k.CreditCardDetector = Pr;
2094
- k.Util = Cr;
2095
- k.DefaultProperties = Er;
2096
- (typeof K == "object" && K ? K : window).Cleave = k;
2097
- var ae = k, pt = {}, _r = function() {
2140
+ A.NumeralFormatter = Sr;
2141
+ A.DateFormatter = Pr;
2142
+ A.TimeFormatter = Ar;
2143
+ A.PhoneFormatter = kr;
2144
+ A.CreditCardDetector = Cr;
2145
+ A.Util = Er;
2146
+ A.DefaultProperties = Nr;
2147
+ (typeof Q == "object" && Q ? Q : window).Cleave = A;
2148
+ var ae = A, pt = {}, Dr = function() {
2098
2149
  return typeof Promise == "function" && Promise.prototype && Promise.prototype.then;
2099
- }, we = {}, N = {};
2150
+ }, we = {}, M = {};
2100
2151
  let jt;
2101
- const Ir = [
2152
+ const Mr = [
2102
2153
  0,
2103
2154
  // Not used
2104
2155
  26,
@@ -2142,29 +2193,29 @@ const Ir = [
2142
2193
  3532,
2143
2194
  3706
2144
2195
  ];
2145
- N.getSymbolSize = function(t) {
2196
+ M.getSymbolSize = function(t) {
2146
2197
  if (!t) throw new Error('"version" cannot be null or undefined');
2147
2198
  if (t < 1 || t > 40) throw new Error('"version" should be in range from 1 to 40');
2148
2199
  return t * 4 + 17;
2149
2200
  };
2150
- N.getSymbolTotalCodewords = function(t) {
2151
- return Ir[t];
2201
+ M.getSymbolTotalCodewords = function(t) {
2202
+ return Mr[t];
2152
2203
  };
2153
- N.getBCHDigit = function(e) {
2204
+ M.getBCHDigit = function(e) {
2154
2205
  let t = 0;
2155
2206
  for (; e !== 0; )
2156
2207
  t++, e >>>= 1;
2157
2208
  return t;
2158
2209
  };
2159
- N.setToSJISFunction = function(t) {
2210
+ M.setToSJISFunction = function(t) {
2160
2211
  if (typeof t != "function")
2161
2212
  throw new Error('"toSJISFunc" is not a valid function.');
2162
2213
  jt = t;
2163
2214
  };
2164
- N.isKanjiModeEnabled = function() {
2215
+ M.isKanjiModeEnabled = function() {
2165
2216
  return typeof jt < "u";
2166
2217
  };
2167
- N.toSJIS = function(t) {
2218
+ M.toSJIS = function(t) {
2168
2219
  return jt(t);
2169
2220
  };
2170
2221
  var Pt = {};
@@ -2190,15 +2241,15 @@ var Pt = {};
2190
2241
  throw new Error("Unknown EC Level: " + r);
2191
2242
  }
2192
2243
  }
2193
- e.isValid = function(n) {
2194
- return n && typeof n.bit < "u" && n.bit >= 0 && n.bit < 4;
2195
- }, e.from = function(n, i) {
2196
- if (e.isValid(n))
2197
- return n;
2244
+ e.isValid = function(i) {
2245
+ return i && typeof i.bit < "u" && i.bit >= 0 && i.bit < 4;
2246
+ }, e.from = function(i, n) {
2247
+ if (e.isValid(i))
2248
+ return i;
2198
2249
  try {
2199
- return t(n);
2250
+ return t(i);
2200
2251
  } catch {
2201
- return i;
2252
+ return n;
2202
2253
  }
2203
2254
  };
2204
2255
  })(Pt);
@@ -2222,15 +2273,15 @@ xe.prototype = {
2222
2273
  this.buffer.length <= t && this.buffer.push(0), e && (this.buffer[t] |= 128 >>> this.length % 8), this.length++;
2223
2274
  }
2224
2275
  };
2225
- var Dr = xe;
2276
+ var Tr = xe;
2226
2277
  function mt(e) {
2227
2278
  if (!e || e < 1)
2228
2279
  throw new Error("BitMatrix size must be defined and greater than 0");
2229
2280
  this.size = e, this.data = new Uint8Array(e * e), this.reservedBit = new Uint8Array(e * e);
2230
2281
  }
2231
- mt.prototype.set = function(e, t, r, n) {
2232
- const i = e * this.size + t;
2233
- this.data[i] = r, n && (this.reservedBit[i] = !0);
2282
+ mt.prototype.set = function(e, t, r, i) {
2283
+ const n = e * this.size + t;
2284
+ this.data[n] = r, i && (this.reservedBit[n] = !0);
2234
2285
  };
2235
2286
  mt.prototype.get = function(e, t) {
2236
2287
  return this.data[e * this.size + t];
@@ -2241,29 +2292,29 @@ mt.prototype.xor = function(e, t, r) {
2241
2292
  mt.prototype.isReserved = function(e, t) {
2242
2293
  return this.reservedBit[e * this.size + t];
2243
2294
  };
2244
- var Mr = mt, Se = {};
2295
+ var $r = mt, Se = {};
2245
2296
  (function(e) {
2246
- const t = N.getSymbolSize;
2247
- e.getRowColCoords = function(n) {
2248
- if (n === 1) return [];
2249
- const i = Math.floor(n / 7) + 2, o = t(n), s = o === 145 ? 26 : Math.ceil((o - 13) / (2 * i - 2)) * 2, l = [o - 7];
2250
- for (let a = 1; a < i - 1; a++)
2251
- l[a] = l[a - 1] - s;
2297
+ const t = M.getSymbolSize;
2298
+ e.getRowColCoords = function(i) {
2299
+ if (i === 1) return [];
2300
+ const n = Math.floor(i / 7) + 2, s = t(i), o = s === 145 ? 26 : Math.ceil((s - 13) / (2 * n - 2)) * 2, l = [s - 7];
2301
+ for (let a = 1; a < n - 1; a++)
2302
+ l[a] = l[a - 1] - o;
2252
2303
  return l.push(6), l.reverse();
2253
- }, e.getPositions = function(n) {
2254
- const i = [], o = e.getRowColCoords(n), s = o.length;
2255
- for (let l = 0; l < s; l++)
2256
- for (let a = 0; a < s; a++)
2304
+ }, e.getPositions = function(i) {
2305
+ const n = [], s = e.getRowColCoords(i), o = s.length;
2306
+ for (let l = 0; l < o; l++)
2307
+ for (let a = 0; a < o; a++)
2257
2308
  l === 0 && a === 0 || // top-left
2258
- l === 0 && a === s - 1 || // bottom-left
2259
- l === s - 1 && a === 0 || i.push([o[l], o[a]]);
2260
- return i;
2309
+ l === 0 && a === o - 1 || // bottom-left
2310
+ l === o - 1 && a === 0 || n.push([s[l], s[a]]);
2311
+ return n;
2261
2312
  };
2262
2313
  })(Se);
2263
2314
  var Pe = {};
2264
- const Nr = N.getSymbolSize, le = 7;
2315
+ const Rr = M.getSymbolSize, le = 7;
2265
2316
  Pe.getPositions = function(t) {
2266
- const r = Nr(t);
2317
+ const r = Rr(t);
2267
2318
  return [
2268
2319
  // top-left
2269
2320
  [0, 0],
@@ -2273,7 +2324,7 @@ Pe.getPositions = function(t) {
2273
2324
  [0, r - le]
2274
2325
  ];
2275
2326
  };
2276
- var ke = {};
2327
+ var Ae = {};
2277
2328
  (function(e) {
2278
2329
  e.Patterns = {
2279
2330
  PATTERN000: 0,
@@ -2291,85 +2342,85 @@ var ke = {};
2291
2342
  N3: 40,
2292
2343
  N4: 10
2293
2344
  };
2294
- e.isValid = function(i) {
2295
- return i != null && i !== "" && !isNaN(i) && i >= 0 && i <= 7;
2296
- }, e.from = function(i) {
2297
- return e.isValid(i) ? parseInt(i, 10) : void 0;
2298
- }, e.getPenaltyN1 = function(i) {
2299
- const o = i.size;
2300
- let s = 0, l = 0, a = 0, c = null, d = null;
2301
- for (let h = 0; h < o; h++) {
2345
+ e.isValid = function(n) {
2346
+ return n != null && n !== "" && !isNaN(n) && n >= 0 && n <= 7;
2347
+ }, e.from = function(n) {
2348
+ return e.isValid(n) ? parseInt(n, 10) : void 0;
2349
+ }, e.getPenaltyN1 = function(n) {
2350
+ const s = n.size;
2351
+ let o = 0, l = 0, a = 0, c = null, d = null;
2352
+ for (let h = 0; h < s; h++) {
2302
2353
  l = a = 0, c = d = null;
2303
- for (let p = 0; p < o; p++) {
2304
- let u = i.get(h, p);
2305
- u === c ? l++ : (l >= 5 && (s += t.N1 + (l - 5)), c = u, l = 1), u = i.get(p, h), u === d ? a++ : (a >= 5 && (s += t.N1 + (a - 5)), d = u, a = 1);
2354
+ for (let p = 0; p < s; p++) {
2355
+ let u = n.get(h, p);
2356
+ u === c ? l++ : (l >= 5 && (o += t.N1 + (l - 5)), c = u, l = 1), u = n.get(p, h), u === d ? a++ : (a >= 5 && (o += t.N1 + (a - 5)), d = u, a = 1);
2306
2357
  }
2307
- l >= 5 && (s += t.N1 + (l - 5)), a >= 5 && (s += t.N1 + (a - 5));
2358
+ l >= 5 && (o += t.N1 + (l - 5)), a >= 5 && (o += t.N1 + (a - 5));
2308
2359
  }
2309
- return s;
2310
- }, e.getPenaltyN2 = function(i) {
2311
- const o = i.size;
2312
- let s = 0;
2313
- for (let l = 0; l < o - 1; l++)
2314
- for (let a = 0; a < o - 1; a++) {
2315
- const c = i.get(l, a) + i.get(l, a + 1) + i.get(l + 1, a) + i.get(l + 1, a + 1);
2316
- (c === 4 || c === 0) && s++;
2360
+ return o;
2361
+ }, e.getPenaltyN2 = function(n) {
2362
+ const s = n.size;
2363
+ let o = 0;
2364
+ for (let l = 0; l < s - 1; l++)
2365
+ for (let a = 0; a < s - 1; a++) {
2366
+ const c = n.get(l, a) + n.get(l, a + 1) + n.get(l + 1, a) + n.get(l + 1, a + 1);
2367
+ (c === 4 || c === 0) && o++;
2317
2368
  }
2318
- return s * t.N2;
2319
- }, e.getPenaltyN3 = function(i) {
2320
- const o = i.size;
2321
- let s = 0, l = 0, a = 0;
2322
- for (let c = 0; c < o; c++) {
2369
+ return o * t.N2;
2370
+ }, e.getPenaltyN3 = function(n) {
2371
+ const s = n.size;
2372
+ let o = 0, l = 0, a = 0;
2373
+ for (let c = 0; c < s; c++) {
2323
2374
  l = a = 0;
2324
- for (let d = 0; d < o; d++)
2325
- l = l << 1 & 2047 | i.get(c, d), d >= 10 && (l === 1488 || l === 93) && s++, a = a << 1 & 2047 | i.get(d, c), d >= 10 && (a === 1488 || a === 93) && s++;
2375
+ for (let d = 0; d < s; d++)
2376
+ l = l << 1 & 2047 | n.get(c, d), d >= 10 && (l === 1488 || l === 93) && o++, a = a << 1 & 2047 | n.get(d, c), d >= 10 && (a === 1488 || a === 93) && o++;
2326
2377
  }
2327
- return s * t.N3;
2328
- }, e.getPenaltyN4 = function(i) {
2329
- let o = 0;
2330
- const s = i.data.length;
2331
- for (let a = 0; a < s; a++) o += i.data[a];
2332
- return Math.abs(Math.ceil(o * 100 / s / 5) - 10) * t.N4;
2378
+ return o * t.N3;
2379
+ }, e.getPenaltyN4 = function(n) {
2380
+ let s = 0;
2381
+ const o = n.data.length;
2382
+ for (let a = 0; a < o; a++) s += n.data[a];
2383
+ return Math.abs(Math.ceil(s * 100 / o / 5) - 10) * t.N4;
2333
2384
  };
2334
- function r(n, i, o) {
2335
- switch (n) {
2385
+ function r(i, n, s) {
2386
+ switch (i) {
2336
2387
  case e.Patterns.PATTERN000:
2337
- return (i + o) % 2 === 0;
2388
+ return (n + s) % 2 === 0;
2338
2389
  case e.Patterns.PATTERN001:
2339
- return i % 2 === 0;
2390
+ return n % 2 === 0;
2340
2391
  case e.Patterns.PATTERN010:
2341
- return o % 3 === 0;
2392
+ return s % 3 === 0;
2342
2393
  case e.Patterns.PATTERN011:
2343
- return (i + o) % 3 === 0;
2394
+ return (n + s) % 3 === 0;
2344
2395
  case e.Patterns.PATTERN100:
2345
- return (Math.floor(i / 2) + Math.floor(o / 3)) % 2 === 0;
2396
+ return (Math.floor(n / 2) + Math.floor(s / 3)) % 2 === 0;
2346
2397
  case e.Patterns.PATTERN101:
2347
- return i * o % 2 + i * o % 3 === 0;
2398
+ return n * s % 2 + n * s % 3 === 0;
2348
2399
  case e.Patterns.PATTERN110:
2349
- return (i * o % 2 + i * o % 3) % 2 === 0;
2400
+ return (n * s % 2 + n * s % 3) % 2 === 0;
2350
2401
  case e.Patterns.PATTERN111:
2351
- return (i * o % 3 + (i + o) % 2) % 2 === 0;
2402
+ return (n * s % 3 + (n + s) % 2) % 2 === 0;
2352
2403
  default:
2353
- throw new Error("bad maskPattern:" + n);
2404
+ throw new Error("bad maskPattern:" + i);
2354
2405
  }
2355
2406
  }
2356
- e.applyMask = function(i, o) {
2357
- const s = o.size;
2358
- for (let l = 0; l < s; l++)
2359
- for (let a = 0; a < s; a++)
2360
- o.isReserved(a, l) || o.xor(a, l, r(i, a, l));
2361
- }, e.getBestMask = function(i, o) {
2362
- const s = Object.keys(e.Patterns).length;
2407
+ e.applyMask = function(n, s) {
2408
+ const o = s.size;
2409
+ for (let l = 0; l < o; l++)
2410
+ for (let a = 0; a < o; a++)
2411
+ s.isReserved(a, l) || s.xor(a, l, r(n, a, l));
2412
+ }, e.getBestMask = function(n, s) {
2413
+ const o = Object.keys(e.Patterns).length;
2363
2414
  let l = 0, a = 1 / 0;
2364
- for (let c = 0; c < s; c++) {
2365
- o(c), e.applyMask(c, i);
2366
- const d = e.getPenaltyN1(i) + e.getPenaltyN2(i) + e.getPenaltyN3(i) + e.getPenaltyN4(i);
2367
- e.applyMask(c, i), d < a && (a = d, l = c);
2415
+ for (let c = 0; c < o; c++) {
2416
+ s(c), e.applyMask(c, n);
2417
+ const d = e.getPenaltyN1(n) + e.getPenaltyN2(n) + e.getPenaltyN3(n) + e.getPenaltyN4(n);
2418
+ e.applyMask(c, n), d < a && (a = d, l = c);
2368
2419
  }
2369
2420
  return l;
2370
2421
  };
2371
- })(ke);
2372
- var kt = {};
2422
+ })(Ae);
2423
+ var At = {};
2373
2424
  const O = Pt, ft = [
2374
2425
  // L M Q H
2375
2426
  1,
@@ -2695,7 +2746,7 @@ const O = Pt, ft = [
2695
2746
  2040,
2696
2747
  2430
2697
2748
  ];
2698
- kt.getBlocksCount = function(t, r) {
2749
+ At.getBlocksCount = function(t, r) {
2699
2750
  switch (r) {
2700
2751
  case O.L:
2701
2752
  return ft[(t - 1) * 4 + 0];
@@ -2709,7 +2760,7 @@ kt.getBlocksCount = function(t, r) {
2709
2760
  return;
2710
2761
  }
2711
2762
  };
2712
- kt.getTotalCodewordsCount = function(t, r) {
2763
+ At.getTotalCodewordsCount = function(t, r) {
2713
2764
  switch (r) {
2714
2765
  case O.L:
2715
2766
  return gt[(t - 1) * 4 + 0];
@@ -2723,7 +2774,7 @@ kt.getTotalCodewordsCount = function(t, r) {
2723
2774
  return;
2724
2775
  }
2725
2776
  };
2726
- var Ce = {}, Ct = {};
2777
+ var ke = {}, kt = {};
2727
2778
  const at = new Uint8Array(512), wt = new Uint8Array(256);
2728
2779
  (function() {
2729
2780
  let t = 1;
@@ -2732,88 +2783,88 @@ const at = new Uint8Array(512), wt = new Uint8Array(256);
2732
2783
  for (let r = 255; r < 512; r++)
2733
2784
  at[r] = at[r - 255];
2734
2785
  })();
2735
- Ct.log = function(t) {
2786
+ kt.log = function(t) {
2736
2787
  if (t < 1) throw new Error("log(" + t + ")");
2737
2788
  return wt[t];
2738
2789
  };
2739
- Ct.exp = function(t) {
2790
+ kt.exp = function(t) {
2740
2791
  return at[t];
2741
2792
  };
2742
- Ct.mul = function(t, r) {
2793
+ kt.mul = function(t, r) {
2743
2794
  return t === 0 || r === 0 ? 0 : at[wt[t] + wt[r]];
2744
2795
  };
2745
2796
  (function(e) {
2746
- const t = Ct;
2747
- e.mul = function(n, i) {
2748
- const o = new Uint8Array(n.length + i.length - 1);
2749
- for (let s = 0; s < n.length; s++)
2750
- for (let l = 0; l < i.length; l++)
2751
- o[s + l] ^= t.mul(n[s], i[l]);
2752
- return o;
2753
- }, e.mod = function(n, i) {
2754
- let o = new Uint8Array(n);
2755
- for (; o.length - i.length >= 0; ) {
2756
- const s = o[0];
2757
- for (let a = 0; a < i.length; a++)
2758
- o[a] ^= t.mul(i[a], s);
2797
+ const t = kt;
2798
+ e.mul = function(i, n) {
2799
+ const s = new Uint8Array(i.length + n.length - 1);
2800
+ for (let o = 0; o < i.length; o++)
2801
+ for (let l = 0; l < n.length; l++)
2802
+ s[o + l] ^= t.mul(i[o], n[l]);
2803
+ return s;
2804
+ }, e.mod = function(i, n) {
2805
+ let s = new Uint8Array(i);
2806
+ for (; s.length - n.length >= 0; ) {
2807
+ const o = s[0];
2808
+ for (let a = 0; a < n.length; a++)
2809
+ s[a] ^= t.mul(n[a], o);
2759
2810
  let l = 0;
2760
- for (; l < o.length && o[l] === 0; ) l++;
2761
- o = o.slice(l);
2811
+ for (; l < s.length && s[l] === 0; ) l++;
2812
+ s = s.slice(l);
2762
2813
  }
2763
- return o;
2764
- }, e.generateECPolynomial = function(n) {
2765
- let i = new Uint8Array([1]);
2766
- for (let o = 0; o < n; o++)
2767
- i = e.mul(i, new Uint8Array([1, t.exp(o)]));
2768
- return i;
2814
+ return s;
2815
+ }, e.generateECPolynomial = function(i) {
2816
+ let n = new Uint8Array([1]);
2817
+ for (let s = 0; s < i; s++)
2818
+ n = e.mul(n, new Uint8Array([1, t.exp(s)]));
2819
+ return n;
2769
2820
  };
2770
- })(Ce);
2771
- const Ae = Ce;
2821
+ })(ke);
2822
+ const Ce = ke;
2772
2823
  function Gt(e) {
2773
2824
  this.genPoly = void 0, this.degree = e, this.degree && this.initialize(this.degree);
2774
2825
  }
2775
2826
  Gt.prototype.initialize = function(t) {
2776
- this.degree = t, this.genPoly = Ae.generateECPolynomial(this.degree);
2827
+ this.degree = t, this.genPoly = Ce.generateECPolynomial(this.degree);
2777
2828
  };
2778
2829
  Gt.prototype.encode = function(t) {
2779
2830
  if (!this.genPoly)
2780
2831
  throw new Error("Encoder not initialized");
2781
2832
  const r = new Uint8Array(t.length + this.degree);
2782
2833
  r.set(t);
2783
- const n = Ae.mod(r, this.genPoly), i = this.degree - n.length;
2784
- if (i > 0) {
2785
- const o = new Uint8Array(this.degree);
2786
- return o.set(n, i), o;
2834
+ const i = Ce.mod(r, this.genPoly), n = this.degree - i.length;
2835
+ if (n > 0) {
2836
+ const s = new Uint8Array(this.degree);
2837
+ return s.set(i, n), s;
2787
2838
  }
2788
- return n;
2839
+ return i;
2789
2840
  };
2790
- var Tr = Gt, Ee = {}, q = {}, Qt = {};
2791
- Qt.isValid = function(t) {
2841
+ var Lr = Gt, _e = {}, q = {}, Kt = {};
2842
+ Kt.isValid = function(t) {
2792
2843
  return !isNaN(t) && t >= 1 && t <= 40;
2793
2844
  };
2794
- var B = {};
2795
- const _e = "[0-9]+", $r = "[A-Z $%*+\\-./:]+";
2845
+ var L = {};
2846
+ const Ee = "[0-9]+", Br = "[A-Z $%*+\\-./:]+";
2796
2847
  let ut = "(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";
2797
2848
  ut = ut.replace(/u/g, "\\u");
2798
- const Rr = "(?:(?![A-Z0-9 $%*+\\-./:]|" + ut + `)(?:.|[\r
2849
+ const Ur = "(?:(?![A-Z0-9 $%*+\\-./:]|" + ut + `)(?:.|[\r
2799
2850
  ]))+`;
2800
- B.KANJI = new RegExp(ut, "g");
2801
- B.BYTE_KANJI = new RegExp("[^A-Z0-9 $%*+\\-./:]+", "g");
2802
- B.BYTE = new RegExp(Rr, "g");
2803
- B.NUMERIC = new RegExp(_e, "g");
2804
- B.ALPHANUMERIC = new RegExp($r, "g");
2805
- const Br = new RegExp("^" + ut + "$"), Lr = new RegExp("^" + _e + "$"), Ur = new RegExp("^[A-Z0-9 $%*+\\-./:]+$");
2806
- B.testKanji = function(t) {
2807
- return Br.test(t);
2851
+ L.KANJI = new RegExp(ut, "g");
2852
+ L.BYTE_KANJI = new RegExp("[^A-Z0-9 $%*+\\-./:]+", "g");
2853
+ L.BYTE = new RegExp(Ur, "g");
2854
+ L.NUMERIC = new RegExp(Ee, "g");
2855
+ L.ALPHANUMERIC = new RegExp(Br, "g");
2856
+ const Fr = new RegExp("^" + ut + "$"), Or = new RegExp("^" + Ee + "$"), zr = new RegExp("^[A-Z0-9 $%*+\\-./:]+$");
2857
+ L.testKanji = function(t) {
2858
+ return Fr.test(t);
2808
2859
  };
2809
- B.testNumeric = function(t) {
2810
- return Lr.test(t);
2860
+ L.testNumeric = function(t) {
2861
+ return Or.test(t);
2811
2862
  };
2812
- B.testAlphanumeric = function(t) {
2813
- return Ur.test(t);
2863
+ L.testAlphanumeric = function(t) {
2864
+ return zr.test(t);
2814
2865
  };
2815
2866
  (function(e) {
2816
- const t = Qt, r = B;
2867
+ const t = Kt, r = L;
2817
2868
  e.NUMERIC = {
2818
2869
  id: "Numeric",
2819
2870
  bit: 1,
@@ -2832,23 +2883,23 @@ B.testAlphanumeric = function(t) {
2832
2883
  ccBits: [8, 10, 12]
2833
2884
  }, e.MIXED = {
2834
2885
  bit: -1
2835
- }, e.getCharCountIndicator = function(o, s) {
2836
- if (!o.ccBits) throw new Error("Invalid mode: " + o);
2837
- if (!t.isValid(s))
2838
- throw new Error("Invalid version: " + s);
2839
- return s >= 1 && s < 10 ? o.ccBits[0] : s < 27 ? o.ccBits[1] : o.ccBits[2];
2840
- }, e.getBestModeForData = function(o) {
2841
- return r.testNumeric(o) ? e.NUMERIC : r.testAlphanumeric(o) ? e.ALPHANUMERIC : r.testKanji(o) ? e.KANJI : e.BYTE;
2842
- }, e.toString = function(o) {
2843
- if (o && o.id) return o.id;
2886
+ }, e.getCharCountIndicator = function(s, o) {
2887
+ if (!s.ccBits) throw new Error("Invalid mode: " + s);
2888
+ if (!t.isValid(o))
2889
+ throw new Error("Invalid version: " + o);
2890
+ return o >= 1 && o < 10 ? s.ccBits[0] : o < 27 ? s.ccBits[1] : s.ccBits[2];
2891
+ }, e.getBestModeForData = function(s) {
2892
+ return r.testNumeric(s) ? e.NUMERIC : r.testAlphanumeric(s) ? e.ALPHANUMERIC : r.testKanji(s) ? e.KANJI : e.BYTE;
2893
+ }, e.toString = function(s) {
2894
+ if (s && s.id) return s.id;
2844
2895
  throw new Error("Invalid mode");
2845
- }, e.isValid = function(o) {
2846
- return o && o.bit && o.ccBits;
2896
+ }, e.isValid = function(s) {
2897
+ return s && s.bit && s.ccBits;
2847
2898
  };
2848
- function n(i) {
2849
- if (typeof i != "string")
2899
+ function i(n) {
2900
+ if (typeof n != "string")
2850
2901
  throw new Error("Param is not a string");
2851
- switch (i.toLowerCase()) {
2902
+ switch (n.toLowerCase()) {
2852
2903
  case "numeric":
2853
2904
  return e.NUMERIC;
2854
2905
  case "alphanumeric":
@@ -2858,114 +2909,114 @@ B.testAlphanumeric = function(t) {
2858
2909
  case "byte":
2859
2910
  return e.BYTE;
2860
2911
  default:
2861
- throw new Error("Unknown mode: " + i);
2912
+ throw new Error("Unknown mode: " + n);
2862
2913
  }
2863
2914
  }
2864
- e.from = function(o, s) {
2865
- if (e.isValid(o))
2866
- return o;
2915
+ e.from = function(s, o) {
2916
+ if (e.isValid(s))
2917
+ return s;
2867
2918
  try {
2868
- return n(o);
2919
+ return i(s);
2869
2920
  } catch {
2870
- return s;
2921
+ return o;
2871
2922
  }
2872
2923
  };
2873
2924
  })(q);
2874
2925
  (function(e) {
2875
- const t = N, r = kt, n = Pt, i = q, o = Qt, s = 7973, l = t.getBCHDigit(s);
2926
+ const t = M, r = At, i = Pt, n = q, s = Kt, o = 7973, l = t.getBCHDigit(o);
2876
2927
  function a(p, u, m) {
2877
- for (let b = 1; b <= 40; b++)
2878
- if (u <= e.getCapacity(b, m, p))
2879
- return b;
2928
+ for (let v = 1; v <= 40; v++)
2929
+ if (u <= e.getCapacity(v, m, p))
2930
+ return v;
2880
2931
  }
2881
2932
  function c(p, u) {
2882
- return i.getCharCountIndicator(p, u) + 4;
2933
+ return n.getCharCountIndicator(p, u) + 4;
2883
2934
  }
2884
2935
  function d(p, u) {
2885
2936
  let m = 0;
2886
- return p.forEach(function(b) {
2887
- const A = c(b.mode, u);
2888
- m += A + b.getBitsLength();
2937
+ return p.forEach(function(v) {
2938
+ const C = c(v.mode, u);
2939
+ m += C + v.getBitsLength();
2889
2940
  }), m;
2890
2941
  }
2891
2942
  function h(p, u) {
2892
2943
  for (let m = 1; m <= 40; m++)
2893
- if (d(p, m) <= e.getCapacity(m, u, i.MIXED))
2944
+ if (d(p, m) <= e.getCapacity(m, u, n.MIXED))
2894
2945
  return m;
2895
2946
  }
2896
2947
  e.from = function(u, m) {
2897
- return o.isValid(u) ? parseInt(u, 10) : m;
2898
- }, e.getCapacity = function(u, m, b) {
2899
- if (!o.isValid(u))
2948
+ return s.isValid(u) ? parseInt(u, 10) : m;
2949
+ }, e.getCapacity = function(u, m, v) {
2950
+ if (!s.isValid(u))
2900
2951
  throw new Error("Invalid QR Code version");
2901
- typeof b > "u" && (b = i.BYTE);
2902
- const A = t.getSymbolTotalCodewords(u), v = r.getTotalCodewordsCount(u, m), x = (A - v) * 8;
2903
- if (b === i.MIXED) return x;
2904
- const y = x - c(b, u);
2905
- switch (b) {
2906
- case i.NUMERIC:
2952
+ typeof v > "u" && (v = n.BYTE);
2953
+ const C = t.getSymbolTotalCodewords(u), w = r.getTotalCodewordsCount(u, m), x = (C - w) * 8;
2954
+ if (v === n.MIXED) return x;
2955
+ const y = x - c(v, u);
2956
+ switch (v) {
2957
+ case n.NUMERIC:
2907
2958
  return Math.floor(y / 10 * 3);
2908
- case i.ALPHANUMERIC:
2959
+ case n.ALPHANUMERIC:
2909
2960
  return Math.floor(y / 11 * 2);
2910
- case i.KANJI:
2961
+ case n.KANJI:
2911
2962
  return Math.floor(y / 13);
2912
- case i.BYTE:
2963
+ case n.BYTE:
2913
2964
  default:
2914
2965
  return Math.floor(y / 8);
2915
2966
  }
2916
2967
  }, e.getBestVersionForData = function(u, m) {
2917
- let b;
2918
- const A = n.from(m, n.M);
2968
+ let v;
2969
+ const C = i.from(m, i.M);
2919
2970
  if (Array.isArray(u)) {
2920
2971
  if (u.length > 1)
2921
- return h(u, A);
2972
+ return h(u, C);
2922
2973
  if (u.length === 0)
2923
2974
  return 1;
2924
- b = u[0];
2975
+ v = u[0];
2925
2976
  } else
2926
- b = u;
2927
- return a(b.mode, b.getLength(), A);
2977
+ v = u;
2978
+ return a(v.mode, v.getLength(), C);
2928
2979
  }, e.getEncodedBits = function(u) {
2929
- if (!o.isValid(u) || u < 7)
2980
+ if (!s.isValid(u) || u < 7)
2930
2981
  throw new Error("Invalid QR Code version");
2931
2982
  let m = u << 12;
2932
2983
  for (; t.getBCHDigit(m) - l >= 0; )
2933
- m ^= s << t.getBCHDigit(m) - l;
2984
+ m ^= o << t.getBCHDigit(m) - l;
2934
2985
  return u << 12 | m;
2935
2986
  };
2936
- })(Ee);
2987
+ })(_e);
2937
2988
  var Ie = {};
2938
- const Ut = N, De = 1335, Fr = 21522, ce = Ut.getBCHDigit(De);
2989
+ const Ut = M, Ne = 1335, qr = 21522, ce = Ut.getBCHDigit(Ne);
2939
2990
  Ie.getEncodedBits = function(t, r) {
2940
- const n = t.bit << 3 | r;
2941
- let i = n << 10;
2942
- for (; Ut.getBCHDigit(i) - ce >= 0; )
2943
- i ^= De << Ut.getBCHDigit(i) - ce;
2944
- return (n << 10 | i) ^ Fr;
2991
+ const i = t.bit << 3 | r;
2992
+ let n = i << 10;
2993
+ for (; Ut.getBCHDigit(n) - ce >= 0; )
2994
+ n ^= Ne << Ut.getBCHDigit(n) - ce;
2995
+ return (i << 10 | n) ^ qr;
2945
2996
  };
2946
- var Me = {};
2947
- const Or = q;
2948
- function J(e) {
2949
- this.mode = Or.NUMERIC, this.data = e.toString();
2997
+ var De = {};
2998
+ const Hr = q;
2999
+ function Z(e) {
3000
+ this.mode = Hr.NUMERIC, this.data = e.toString();
2950
3001
  }
2951
- J.getBitsLength = function(t) {
3002
+ Z.getBitsLength = function(t) {
2952
3003
  return 10 * Math.floor(t / 3) + (t % 3 ? t % 3 * 3 + 1 : 0);
2953
3004
  };
2954
- J.prototype.getLength = function() {
3005
+ Z.prototype.getLength = function() {
2955
3006
  return this.data.length;
2956
3007
  };
2957
- J.prototype.getBitsLength = function() {
2958
- return J.getBitsLength(this.data.length);
3008
+ Z.prototype.getBitsLength = function() {
3009
+ return Z.getBitsLength(this.data.length);
2959
3010
  };
2960
- J.prototype.write = function(t) {
2961
- let r, n, i;
3011
+ Z.prototype.write = function(t) {
3012
+ let r, i, n;
2962
3013
  for (r = 0; r + 3 <= this.data.length; r += 3)
2963
- n = this.data.substr(r, 3), i = parseInt(n, 10), t.put(i, 10);
2964
- const o = this.data.length - r;
2965
- o > 0 && (n = this.data.substr(r), i = parseInt(n, 10), t.put(i, o * 3 + 1));
3014
+ i = this.data.substr(r, 3), n = parseInt(i, 10), t.put(n, 10);
3015
+ const s = this.data.length - r;
3016
+ s > 0 && (i = this.data.substr(r), n = parseInt(i, 10), t.put(n, s * 3 + 1));
2966
3017
  };
2967
- var zr = J;
2968
- const qr = q, Nt = [
3018
+ var Yr = Z;
3019
+ const Vr = q, Mt = [
2969
3020
  "0",
2970
3021
  "1",
2971
3022
  "2",
@@ -3013,7 +3064,7 @@ const qr = q, Nt = [
3013
3064
  ":"
3014
3065
  ];
3015
3066
  function X(e) {
3016
- this.mode = qr.ALPHANUMERIC, this.data = e;
3067
+ this.mode = Vr.ALPHANUMERIC, this.data = e;
3017
3068
  }
3018
3069
  X.getBitsLength = function(t) {
3019
3070
  return 11 * Math.floor(t / 2) + 6 * (t % 2);
@@ -3027,15 +3078,15 @@ X.prototype.getBitsLength = function() {
3027
3078
  X.prototype.write = function(t) {
3028
3079
  let r;
3029
3080
  for (r = 0; r + 2 <= this.data.length; r += 2) {
3030
- let n = Nt.indexOf(this.data[r]) * 45;
3031
- n += Nt.indexOf(this.data[r + 1]), t.put(n, 11);
3081
+ let i = Mt.indexOf(this.data[r]) * 45;
3082
+ i += Mt.indexOf(this.data[r + 1]), t.put(i, 11);
3032
3083
  }
3033
- this.data.length % 2 && t.put(Nt.indexOf(this.data[r]), 6);
3084
+ this.data.length % 2 && t.put(Mt.indexOf(this.data[r]), 6);
3034
3085
  };
3035
- var Hr = X;
3036
- const Yr = q;
3086
+ var jr = X;
3087
+ const Gr = q;
3037
3088
  function tt(e) {
3038
- this.mode = Yr.BYTE, typeof e == "string" ? this.data = new TextEncoder().encode(e) : this.data = new Uint8Array(e);
3089
+ this.mode = Gr.BYTE, typeof e == "string" ? this.data = new TextEncoder().encode(e) : this.data = new Uint8Array(e);
3039
3090
  }
3040
3091
  tt.getBitsLength = function(t) {
3041
3092
  return t * 8;
@@ -3050,10 +3101,10 @@ tt.prototype.write = function(e) {
3050
3101
  for (let t = 0, r = this.data.length; t < r; t++)
3051
3102
  e.put(this.data[t], 8);
3052
3103
  };
3053
- var Vr = tt;
3054
- const jr = q, Gr = N;
3104
+ var Kr = tt;
3105
+ const Qr = q, Wr = M;
3055
3106
  function et(e) {
3056
- this.mode = jr.KANJI, this.data = e;
3107
+ this.mode = Qr.KANJI, this.data = e;
3057
3108
  }
3058
3109
  et.getBitsLength = function(t) {
3059
3110
  return t * 13;
@@ -3067,7 +3118,7 @@ et.prototype.getBitsLength = function() {
3067
3118
  et.prototype.write = function(e) {
3068
3119
  let t;
3069
3120
  for (t = 0; t < this.data.length; t++) {
3070
- let r = Gr.toSJIS(this.data[t]);
3121
+ let r = Wr.toSJIS(this.data[t]);
3071
3122
  if (r >= 33088 && r <= 40956)
3072
3123
  r -= 33088;
3073
3124
  else if (r >= 57408 && r <= 60351)
@@ -3080,35 +3131,35 @@ Make sure your charset is UTF-8`
3080
3131
  r = (r >>> 8 & 255) * 192 + (r & 255), e.put(r, 13);
3081
3132
  }
3082
3133
  };
3083
- var Qr = et, Ne = { exports: {} };
3134
+ var Jr = et, Me = { exports: {} };
3084
3135
  (function(e) {
3085
3136
  var t = {
3086
- single_source_shortest_paths: function(r, n, i) {
3087
- var o = {}, s = {};
3088
- s[n] = 0;
3137
+ single_source_shortest_paths: function(r, i, n) {
3138
+ var s = {}, o = {};
3139
+ o[i] = 0;
3089
3140
  var l = t.PriorityQueue.make();
3090
- l.push(n, 0);
3091
- for (var a, c, d, h, p, u, m, b, A; !l.empty(); ) {
3141
+ l.push(i, 0);
3142
+ for (var a, c, d, h, p, u, m, v, C; !l.empty(); ) {
3092
3143
  a = l.pop(), c = a.value, h = a.cost, p = r[c] || {};
3093
3144
  for (d in p)
3094
- p.hasOwnProperty(d) && (u = p[d], m = h + u, b = s[d], A = typeof s[d] > "u", (A || b > m) && (s[d] = m, l.push(d, m), o[d] = c));
3145
+ p.hasOwnProperty(d) && (u = p[d], m = h + u, v = o[d], C = typeof o[d] > "u", (C || v > m) && (o[d] = m, l.push(d, m), s[d] = c));
3095
3146
  }
3096
- if (typeof i < "u" && typeof s[i] > "u") {
3097
- var v = ["Could not find a path from ", n, " to ", i, "."].join("");
3098
- throw new Error(v);
3147
+ if (typeof n < "u" && typeof o[n] > "u") {
3148
+ var w = ["Could not find a path from ", i, " to ", n, "."].join("");
3149
+ throw new Error(w);
3099
3150
  }
3100
- return o;
3151
+ return s;
3101
3152
  },
3102
- extract_shortest_path_from_predecessor_list: function(r, n) {
3103
- for (var i = [], o = n; o; )
3104
- i.push(o), r[o], o = r[o];
3105
- return i.reverse(), i;
3153
+ extract_shortest_path_from_predecessor_list: function(r, i) {
3154
+ for (var n = [], s = i; s; )
3155
+ n.push(s), r[s], s = r[s];
3156
+ return n.reverse(), n;
3106
3157
  },
3107
- find_path: function(r, n, i) {
3108
- var o = t.single_source_shortest_paths(r, n, i);
3158
+ find_path: function(r, i, n) {
3159
+ var s = t.single_source_shortest_paths(r, i, n);
3109
3160
  return t.extract_shortest_path_from_predecessor_list(
3110
- o,
3111
- i
3161
+ s,
3162
+ n
3112
3163
  );
3113
3164
  },
3114
3165
  /**
@@ -3116,22 +3167,22 @@ var Qr = et, Ne = { exports: {} };
3116
3167
  */
3117
3168
  PriorityQueue: {
3118
3169
  make: function(r) {
3119
- var n = t.PriorityQueue, i = {}, o;
3170
+ var i = t.PriorityQueue, n = {}, s;
3120
3171
  r = r || {};
3121
- for (o in n)
3122
- n.hasOwnProperty(o) && (i[o] = n[o]);
3123
- return i.queue = [], i.sorter = r.sorter || n.default_sorter, i;
3172
+ for (s in i)
3173
+ i.hasOwnProperty(s) && (n[s] = i[s]);
3174
+ return n.queue = [], n.sorter = r.sorter || i.default_sorter, n;
3124
3175
  },
3125
- default_sorter: function(r, n) {
3126
- return r.cost - n.cost;
3176
+ default_sorter: function(r, i) {
3177
+ return r.cost - i.cost;
3127
3178
  },
3128
3179
  /**
3129
3180
  * Add a new item to the queue and ensure the highest priority element
3130
3181
  * is at the front of the queue.
3131
3182
  */
3132
- push: function(r, n) {
3133
- var i = { value: r, cost: n };
3134
- this.queue.push(i), this.queue.sort(this.sorter);
3183
+ push: function(r, i) {
3184
+ var n = { value: r, cost: i };
3185
+ this.queue.push(n), this.queue.sort(this.sorter);
3135
3186
  },
3136
3187
  /**
3137
3188
  * Return the highest priority element in the queue.
@@ -3145,60 +3196,60 @@ var Qr = et, Ne = { exports: {} };
3145
3196
  }
3146
3197
  };
3147
3198
  e.exports = t;
3148
- })(Ne);
3149
- var Kr = Ne.exports;
3199
+ })(Me);
3200
+ var Zr = Me.exports;
3150
3201
  (function(e) {
3151
- const t = q, r = zr, n = Hr, i = Vr, o = Qr, s = B, l = N, a = Kr;
3152
- function c(v) {
3153
- return unescape(encodeURIComponent(v)).length;
3202
+ const t = q, r = Yr, i = jr, n = Kr, s = Jr, o = L, l = M, a = Zr;
3203
+ function c(w) {
3204
+ return unescape(encodeURIComponent(w)).length;
3154
3205
  }
3155
- function d(v, x, y) {
3206
+ function d(w, x, y) {
3156
3207
  const g = [];
3157
- let C;
3158
- for (; (C = v.exec(y)) !== null; )
3208
+ let k;
3209
+ for (; (k = w.exec(y)) !== null; )
3159
3210
  g.push({
3160
- data: C[0],
3161
- index: C.index,
3211
+ data: k[0],
3212
+ index: k.index,
3162
3213
  mode: x,
3163
- length: C[0].length
3214
+ length: k[0].length
3164
3215
  });
3165
3216
  return g;
3166
3217
  }
3167
- function h(v) {
3168
- const x = d(s.NUMERIC, t.NUMERIC, v), y = d(s.ALPHANUMERIC, t.ALPHANUMERIC, v);
3169
- let g, C;
3170
- return l.isKanjiModeEnabled() ? (g = d(s.BYTE, t.BYTE, v), C = d(s.KANJI, t.KANJI, v)) : (g = d(s.BYTE_KANJI, t.BYTE, v), C = []), x.concat(y, g, C).sort(function(_, $) {
3171
- return _.index - $.index;
3172
- }).map(function(_) {
3218
+ function h(w) {
3219
+ const x = d(o.NUMERIC, t.NUMERIC, w), y = d(o.ALPHANUMERIC, t.ALPHANUMERIC, w);
3220
+ let g, k;
3221
+ return l.isKanjiModeEnabled() ? (g = d(o.BYTE, t.BYTE, w), k = d(o.KANJI, t.KANJI, w)) : (g = d(o.BYTE_KANJI, t.BYTE, w), k = []), x.concat(y, g, k).sort(function(E, $) {
3222
+ return E.index - $.index;
3223
+ }).map(function(E) {
3173
3224
  return {
3174
- data: _.data,
3175
- mode: _.mode,
3176
- length: _.length
3225
+ data: E.data,
3226
+ mode: E.mode,
3227
+ length: E.length
3177
3228
  };
3178
3229
  });
3179
3230
  }
3180
- function p(v, x) {
3231
+ function p(w, x) {
3181
3232
  switch (x) {
3182
3233
  case t.NUMERIC:
3183
- return r.getBitsLength(v);
3234
+ return r.getBitsLength(w);
3184
3235
  case t.ALPHANUMERIC:
3185
- return n.getBitsLength(v);
3236
+ return i.getBitsLength(w);
3186
3237
  case t.KANJI:
3187
- return o.getBitsLength(v);
3238
+ return s.getBitsLength(w);
3188
3239
  case t.BYTE:
3189
- return i.getBitsLength(v);
3240
+ return n.getBitsLength(w);
3190
3241
  }
3191
3242
  }
3192
- function u(v) {
3193
- return v.reduce(function(x, y) {
3243
+ function u(w) {
3244
+ return w.reduce(function(x, y) {
3194
3245
  const g = x.length - 1 >= 0 ? x[x.length - 1] : null;
3195
3246
  return g && g.mode === y.mode ? (x[x.length - 1].data += y.data, x) : (x.push(y), x);
3196
3247
  }, []);
3197
3248
  }
3198
- function m(v) {
3249
+ function m(w) {
3199
3250
  const x = [];
3200
- for (let y = 0; y < v.length; y++) {
3201
- const g = v[y];
3251
+ for (let y = 0; y < w.length; y++) {
3252
+ const g = w[y];
3202
3253
  switch (g.mode) {
3203
3254
  case t.NUMERIC:
3204
3255
  x.push([
@@ -3227,328 +3278,328 @@ var Kr = Ne.exports;
3227
3278
  }
3228
3279
  return x;
3229
3280
  }
3230
- function b(v, x) {
3281
+ function v(w, x) {
3231
3282
  const y = {}, g = { start: {} };
3232
- let C = ["start"];
3233
- for (let E = 0; E < v.length; E++) {
3234
- const _ = v[E], $ = [];
3235
- for (let U = 0; U < _.length; U++) {
3236
- const R = _[U], rt = "" + E + U;
3283
+ let k = ["start"];
3284
+ for (let _ = 0; _ < w.length; _++) {
3285
+ const E = w[_], $ = [];
3286
+ for (let U = 0; U < E.length; U++) {
3287
+ const R = E[U], rt = "" + _ + U;
3237
3288
  $.push(rt), y[rt] = { node: R, lastCount: 0 }, g[rt] = {};
3238
- for (let Et = 0; Et < C.length; Et++) {
3239
- const L = C[Et];
3240
- y[L] && y[L].node.mode === R.mode ? (g[L][rt] = p(y[L].lastCount + R.length, R.mode) - p(y[L].lastCount, R.mode), y[L].lastCount += R.length) : (y[L] && (y[L].lastCount = R.length), g[L][rt] = p(R.length, R.mode) + 4 + t.getCharCountIndicator(R.mode, x));
3289
+ for (let _t = 0; _t < k.length; _t++) {
3290
+ const B = k[_t];
3291
+ y[B] && y[B].node.mode === R.mode ? (g[B][rt] = p(y[B].lastCount + R.length, R.mode) - p(y[B].lastCount, R.mode), y[B].lastCount += R.length) : (y[B] && (y[B].lastCount = R.length), g[B][rt] = p(R.length, R.mode) + 4 + t.getCharCountIndicator(R.mode, x));
3241
3292
  }
3242
3293
  }
3243
- C = $;
3294
+ k = $;
3244
3295
  }
3245
- for (let E = 0; E < C.length; E++)
3246
- g[C[E]].end = 0;
3296
+ for (let _ = 0; _ < k.length; _++)
3297
+ g[k[_]].end = 0;
3247
3298
  return { map: g, table: y };
3248
3299
  }
3249
- function A(v, x) {
3300
+ function C(w, x) {
3250
3301
  let y;
3251
- const g = t.getBestModeForData(v);
3302
+ const g = t.getBestModeForData(w);
3252
3303
  if (y = t.from(x, g), y !== t.BYTE && y.bit < g.bit)
3253
- throw new Error('"' + v + '" cannot be encoded with mode ' + t.toString(y) + `.
3304
+ throw new Error('"' + w + '" cannot be encoded with mode ' + t.toString(y) + `.
3254
3305
  Suggested mode is: ` + t.toString(g));
3255
3306
  switch (y === t.KANJI && !l.isKanjiModeEnabled() && (y = t.BYTE), y) {
3256
3307
  case t.NUMERIC:
3257
- return new r(v);
3308
+ return new r(w);
3258
3309
  case t.ALPHANUMERIC:
3259
- return new n(v);
3310
+ return new i(w);
3260
3311
  case t.KANJI:
3261
- return new o(v);
3312
+ return new s(w);
3262
3313
  case t.BYTE:
3263
- return new i(v);
3314
+ return new n(w);
3264
3315
  }
3265
3316
  }
3266
3317
  e.fromArray = function(x) {
3267
3318
  return x.reduce(function(y, g) {
3268
- return typeof g == "string" ? y.push(A(g, null)) : g.data && y.push(A(g.data, g.mode)), y;
3319
+ return typeof g == "string" ? y.push(C(g, null)) : g.data && y.push(C(g.data, g.mode)), y;
3269
3320
  }, []);
3270
3321
  }, e.fromString = function(x, y) {
3271
- const g = h(x, l.isKanjiModeEnabled()), C = m(g), E = b(C, y), _ = a.find_path(E.map, "start", "end"), $ = [];
3272
- for (let U = 1; U < _.length - 1; U++)
3273
- $.push(E.table[_[U]].node);
3322
+ const g = h(x, l.isKanjiModeEnabled()), k = m(g), _ = v(k, y), E = a.find_path(_.map, "start", "end"), $ = [];
3323
+ for (let U = 1; U < E.length - 1; U++)
3324
+ $.push(_.table[E[U]].node);
3274
3325
  return e.fromArray(u($));
3275
3326
  }, e.rawSplit = function(x) {
3276
3327
  return e.fromArray(
3277
3328
  h(x, l.isKanjiModeEnabled())
3278
3329
  );
3279
3330
  };
3280
- })(Me);
3281
- const At = N, Tt = Pt, Wr = Dr, Zr = Mr, Jr = Se, Xr = Pe, Ft = ke, Ot = kt, tn = Tr, xt = Ee, en = Ie, rn = q, $t = Me;
3282
- function nn(e, t) {
3283
- const r = e.size, n = Xr.getPositions(t);
3284
- for (let i = 0; i < n.length; i++) {
3285
- const o = n[i][0], s = n[i][1];
3331
+ })(De);
3332
+ const Ct = M, Tt = Pt, Xr = Tr, ti = $r, ei = Se, ri = Pe, Ft = Ae, Ot = At, ii = Lr, xt = _e, ni = Ie, si = q, $t = De;
3333
+ function oi(e, t) {
3334
+ const r = e.size, i = ri.getPositions(t);
3335
+ for (let n = 0; n < i.length; n++) {
3336
+ const s = i[n][0], o = i[n][1];
3286
3337
  for (let l = -1; l <= 7; l++)
3287
- if (!(o + l <= -1 || r <= o + l))
3338
+ if (!(s + l <= -1 || r <= s + l))
3288
3339
  for (let a = -1; a <= 7; a++)
3289
- s + a <= -1 || r <= s + a || (l >= 0 && l <= 6 && (a === 0 || a === 6) || a >= 0 && a <= 6 && (l === 0 || l === 6) || l >= 2 && l <= 4 && a >= 2 && a <= 4 ? e.set(o + l, s + a, !0, !0) : e.set(o + l, s + a, !1, !0));
3340
+ o + a <= -1 || r <= o + a || (l >= 0 && l <= 6 && (a === 0 || a === 6) || a >= 0 && a <= 6 && (l === 0 || l === 6) || l >= 2 && l <= 4 && a >= 2 && a <= 4 ? e.set(s + l, o + a, !0, !0) : e.set(s + l, o + a, !1, !0));
3290
3341
  }
3291
3342
  }
3292
- function on(e) {
3343
+ function ai(e) {
3293
3344
  const t = e.size;
3294
3345
  for (let r = 8; r < t - 8; r++) {
3295
- const n = r % 2 === 0;
3296
- e.set(r, 6, n, !0), e.set(6, r, n, !0);
3346
+ const i = r % 2 === 0;
3347
+ e.set(r, 6, i, !0), e.set(6, r, i, !0);
3297
3348
  }
3298
3349
  }
3299
- function sn(e, t) {
3300
- const r = Jr.getPositions(t);
3301
- for (let n = 0; n < r.length; n++) {
3302
- const i = r[n][0], o = r[n][1];
3303
- for (let s = -2; s <= 2; s++)
3350
+ function li(e, t) {
3351
+ const r = ei.getPositions(t);
3352
+ for (let i = 0; i < r.length; i++) {
3353
+ const n = r[i][0], s = r[i][1];
3354
+ for (let o = -2; o <= 2; o++)
3304
3355
  for (let l = -2; l <= 2; l++)
3305
- s === -2 || s === 2 || l === -2 || l === 2 || s === 0 && l === 0 ? e.set(i + s, o + l, !0, !0) : e.set(i + s, o + l, !1, !0);
3356
+ o === -2 || o === 2 || l === -2 || l === 2 || o === 0 && l === 0 ? e.set(n + o, s + l, !0, !0) : e.set(n + o, s + l, !1, !0);
3306
3357
  }
3307
3358
  }
3308
- function an(e, t) {
3309
- const r = e.size, n = xt.getEncodedBits(t);
3310
- let i, o, s;
3359
+ function ci(e, t) {
3360
+ const r = e.size, i = xt.getEncodedBits(t);
3361
+ let n, s, o;
3311
3362
  for (let l = 0; l < 18; l++)
3312
- i = Math.floor(l / 3), o = l % 3 + r - 8 - 3, s = (n >> l & 1) === 1, e.set(i, o, s, !0), e.set(o, i, s, !0);
3363
+ n = Math.floor(l / 3), s = l % 3 + r - 8 - 3, o = (i >> l & 1) === 1, e.set(n, s, o, !0), e.set(s, n, o, !0);
3313
3364
  }
3314
3365
  function Rt(e, t, r) {
3315
- const n = e.size, i = en.getEncodedBits(t, r);
3316
- let o, s;
3317
- for (o = 0; o < 15; o++)
3318
- s = (i >> o & 1) === 1, o < 6 ? e.set(o, 8, s, !0) : o < 8 ? e.set(o + 1, 8, s, !0) : e.set(n - 15 + o, 8, s, !0), o < 8 ? e.set(8, n - o - 1, s, !0) : o < 9 ? e.set(8, 15 - o - 1 + 1, s, !0) : e.set(8, 15 - o - 1, s, !0);
3319
- e.set(n - 8, 8, 1, !0);
3366
+ const i = e.size, n = ni.getEncodedBits(t, r);
3367
+ let s, o;
3368
+ for (s = 0; s < 15; s++)
3369
+ o = (n >> s & 1) === 1, s < 6 ? e.set(s, 8, o, !0) : s < 8 ? e.set(s + 1, 8, o, !0) : e.set(i - 15 + s, 8, o, !0), s < 8 ? e.set(8, i - s - 1, o, !0) : s < 9 ? e.set(8, 15 - s - 1 + 1, o, !0) : e.set(8, 15 - s - 1, o, !0);
3370
+ e.set(i - 8, 8, 1, !0);
3320
3371
  }
3321
- function ln(e, t) {
3372
+ function di(e, t) {
3322
3373
  const r = e.size;
3323
- let n = -1, i = r - 1, o = 7, s = 0;
3374
+ let i = -1, n = r - 1, s = 7, o = 0;
3324
3375
  for (let l = r - 1; l > 0; l -= 2)
3325
3376
  for (l === 6 && l--; ; ) {
3326
3377
  for (let a = 0; a < 2; a++)
3327
- if (!e.isReserved(i, l - a)) {
3378
+ if (!e.isReserved(n, l - a)) {
3328
3379
  let c = !1;
3329
- s < t.length && (c = (t[s] >>> o & 1) === 1), e.set(i, l - a, c), o--, o === -1 && (s++, o = 7);
3380
+ o < t.length && (c = (t[o] >>> s & 1) === 1), e.set(n, l - a, c), s--, s === -1 && (o++, s = 7);
3330
3381
  }
3331
- if (i += n, i < 0 || r <= i) {
3332
- i -= n, n = -n;
3382
+ if (n += i, n < 0 || r <= n) {
3383
+ n -= i, i = -i;
3333
3384
  break;
3334
3385
  }
3335
3386
  }
3336
3387
  }
3337
- function cn(e, t, r) {
3338
- const n = new Wr();
3388
+ function ui(e, t, r) {
3389
+ const i = new Xr();
3339
3390
  r.forEach(function(a) {
3340
- n.put(a.mode.bit, 4), n.put(a.getLength(), rn.getCharCountIndicator(a.mode, e)), a.write(n);
3391
+ i.put(a.mode.bit, 4), i.put(a.getLength(), si.getCharCountIndicator(a.mode, e)), a.write(i);
3341
3392
  });
3342
- const i = At.getSymbolTotalCodewords(e), o = Ot.getTotalCodewordsCount(e, t), s = (i - o) * 8;
3343
- for (n.getLengthInBits() + 4 <= s && n.put(0, 4); n.getLengthInBits() % 8 !== 0; )
3344
- n.putBit(0);
3345
- const l = (s - n.getLengthInBits()) / 8;
3393
+ const n = Ct.getSymbolTotalCodewords(e), s = Ot.getTotalCodewordsCount(e, t), o = (n - s) * 8;
3394
+ for (i.getLengthInBits() + 4 <= o && i.put(0, 4); i.getLengthInBits() % 8 !== 0; )
3395
+ i.putBit(0);
3396
+ const l = (o - i.getLengthInBits()) / 8;
3346
3397
  for (let a = 0; a < l; a++)
3347
- n.put(a % 2 ? 17 : 236, 8);
3348
- return dn(n, e, t);
3398
+ i.put(a % 2 ? 17 : 236, 8);
3399
+ return hi(i, e, t);
3349
3400
  }
3350
- function dn(e, t, r) {
3351
- const n = At.getSymbolTotalCodewords(t), i = Ot.getTotalCodewordsCount(t, r), o = n - i, s = Ot.getBlocksCount(t, r), l = n % s, a = s - l, c = Math.floor(n / s), d = Math.floor(o / s), h = d + 1, p = c - d, u = new tn(p);
3401
+ function hi(e, t, r) {
3402
+ const i = Ct.getSymbolTotalCodewords(t), n = Ot.getTotalCodewordsCount(t, r), s = i - n, o = Ot.getBlocksCount(t, r), l = i % o, a = o - l, c = Math.floor(i / o), d = Math.floor(s / o), h = d + 1, p = c - d, u = new ii(p);
3352
3403
  let m = 0;
3353
- const b = new Array(s), A = new Array(s);
3354
- let v = 0;
3404
+ const v = new Array(o), C = new Array(o);
3405
+ let w = 0;
3355
3406
  const x = new Uint8Array(e.buffer);
3356
- for (let _ = 0; _ < s; _++) {
3357
- const $ = _ < a ? d : h;
3358
- b[_] = x.slice(m, m + $), A[_] = u.encode(b[_]), m += $, v = Math.max(v, $);
3359
- }
3360
- const y = new Uint8Array(n);
3361
- let g = 0, C, E;
3362
- for (C = 0; C < v; C++)
3363
- for (E = 0; E < s; E++)
3364
- C < b[E].length && (y[g++] = b[E][C]);
3365
- for (C = 0; C < p; C++)
3366
- for (E = 0; E < s; E++)
3367
- y[g++] = A[E][C];
3407
+ for (let E = 0; E < o; E++) {
3408
+ const $ = E < a ? d : h;
3409
+ v[E] = x.slice(m, m + $), C[E] = u.encode(v[E]), m += $, w = Math.max(w, $);
3410
+ }
3411
+ const y = new Uint8Array(i);
3412
+ let g = 0, k, _;
3413
+ for (k = 0; k < w; k++)
3414
+ for (_ = 0; _ < o; _++)
3415
+ k < v[_].length && (y[g++] = v[_][k]);
3416
+ for (k = 0; k < p; k++)
3417
+ for (_ = 0; _ < o; _++)
3418
+ y[g++] = C[_][k];
3368
3419
  return y;
3369
3420
  }
3370
- function un(e, t, r, n) {
3371
- let i;
3421
+ function pi(e, t, r, i) {
3422
+ let n;
3372
3423
  if (Array.isArray(e))
3373
- i = $t.fromArray(e);
3424
+ n = $t.fromArray(e);
3374
3425
  else if (typeof e == "string") {
3375
3426
  let c = t;
3376
3427
  if (!c) {
3377
3428
  const d = $t.rawSplit(e);
3378
3429
  c = xt.getBestVersionForData(d, r);
3379
3430
  }
3380
- i = $t.fromString(e, c || 40);
3431
+ n = $t.fromString(e, c || 40);
3381
3432
  } else
3382
3433
  throw new Error("Invalid data");
3383
- const o = xt.getBestVersionForData(i, r);
3384
- if (!o)
3434
+ const s = xt.getBestVersionForData(n, r);
3435
+ if (!s)
3385
3436
  throw new Error("The amount of data is too big to be stored in a QR Code");
3386
3437
  if (!t)
3387
- t = o;
3388
- else if (t < o)
3438
+ t = s;
3439
+ else if (t < s)
3389
3440
  throw new Error(
3390
3441
  `
3391
3442
  The chosen QR Code version cannot contain this amount of data.
3392
- Minimum version required to store current data is: ` + o + `.
3443
+ Minimum version required to store current data is: ` + s + `.
3393
3444
  `
3394
3445
  );
3395
- const s = cn(t, r, i), l = At.getSymbolSize(t), a = new Zr(l);
3396
- return nn(a, t), on(a), sn(a, t), Rt(a, r, 0), t >= 7 && an(a, t), ln(a, s), isNaN(n) && (n = Ft.getBestMask(
3446
+ const o = ui(t, r, n), l = Ct.getSymbolSize(t), a = new ti(l);
3447
+ return oi(a, t), ai(a), li(a, t), Rt(a, r, 0), t >= 7 && ci(a, t), di(a, o), isNaN(i) && (i = Ft.getBestMask(
3397
3448
  a,
3398
3449
  Rt.bind(null, a, r)
3399
- )), Ft.applyMask(n, a), Rt(a, r, n), {
3450
+ )), Ft.applyMask(i, a), Rt(a, r, i), {
3400
3451
  modules: a,
3401
3452
  version: t,
3402
3453
  errorCorrectionLevel: r,
3403
- maskPattern: n,
3404
- segments: i
3454
+ maskPattern: i,
3455
+ segments: n
3405
3456
  };
3406
3457
  }
3407
3458
  we.create = function(t, r) {
3408
3459
  if (typeof t > "u" || t === "")
3409
3460
  throw new Error("No input text");
3410
- let n = Tt.M, i, o;
3411
- return typeof r < "u" && (n = Tt.from(r.errorCorrectionLevel, Tt.M), i = xt.from(r.version), o = Ft.from(r.maskPattern), r.toSJISFunc && At.setToSJISFunction(r.toSJISFunc)), un(t, i, n, o);
3461
+ let i = Tt.M, n, s;
3462
+ return typeof r < "u" && (i = Tt.from(r.errorCorrectionLevel, Tt.M), n = xt.from(r.version), s = Ft.from(r.maskPattern), r.toSJISFunc && Ct.setToSJISFunction(r.toSJISFunc)), pi(t, n, i, s);
3412
3463
  };
3413
- var Te = {}, Kt = {};
3464
+ var Te = {}, Qt = {};
3414
3465
  (function(e) {
3415
3466
  function t(r) {
3416
3467
  if (typeof r == "number" && (r = r.toString()), typeof r != "string")
3417
3468
  throw new Error("Color should be defined as hex string");
3418
- let n = r.slice().replace("#", "").split("");
3419
- if (n.length < 3 || n.length === 5 || n.length > 8)
3469
+ let i = r.slice().replace("#", "").split("");
3470
+ if (i.length < 3 || i.length === 5 || i.length > 8)
3420
3471
  throw new Error("Invalid hex color: " + r);
3421
- (n.length === 3 || n.length === 4) && (n = Array.prototype.concat.apply([], n.map(function(o) {
3422
- return [o, o];
3423
- }))), n.length === 6 && n.push("F", "F");
3424
- const i = parseInt(n.join(""), 16);
3472
+ (i.length === 3 || i.length === 4) && (i = Array.prototype.concat.apply([], i.map(function(s) {
3473
+ return [s, s];
3474
+ }))), i.length === 6 && i.push("F", "F");
3475
+ const n = parseInt(i.join(""), 16);
3425
3476
  return {
3426
- r: i >> 24 & 255,
3427
- g: i >> 16 & 255,
3428
- b: i >> 8 & 255,
3429
- a: i & 255,
3430
- hex: "#" + n.slice(0, 6).join("")
3477
+ r: n >> 24 & 255,
3478
+ g: n >> 16 & 255,
3479
+ b: n >> 8 & 255,
3480
+ a: n & 255,
3481
+ hex: "#" + i.slice(0, 6).join("")
3431
3482
  };
3432
3483
  }
3433
- e.getOptions = function(n) {
3434
- n || (n = {}), n.color || (n.color = {});
3435
- const i = typeof n.margin > "u" || n.margin === null || n.margin < 0 ? 4 : n.margin, o = n.width && n.width >= 21 ? n.width : void 0, s = n.scale || 4;
3484
+ e.getOptions = function(i) {
3485
+ i || (i = {}), i.color || (i.color = {});
3486
+ const n = typeof i.margin > "u" || i.margin === null || i.margin < 0 ? 4 : i.margin, s = i.width && i.width >= 21 ? i.width : void 0, o = i.scale || 4;
3436
3487
  return {
3437
- width: o,
3438
- scale: o ? 4 : s,
3439
- margin: i,
3488
+ width: s,
3489
+ scale: s ? 4 : o,
3490
+ margin: n,
3440
3491
  color: {
3441
- dark: t(n.color.dark || "#000000ff"),
3442
- light: t(n.color.light || "#ffffffff")
3492
+ dark: t(i.color.dark || "#000000ff"),
3493
+ light: t(i.color.light || "#ffffffff")
3443
3494
  },
3444
- type: n.type,
3445
- rendererOpts: n.rendererOpts || {}
3495
+ type: i.type,
3496
+ rendererOpts: i.rendererOpts || {}
3446
3497
  };
3447
- }, e.getScale = function(n, i) {
3448
- return i.width && i.width >= n + i.margin * 2 ? i.width / (n + i.margin * 2) : i.scale;
3449
- }, e.getImageWidth = function(n, i) {
3450
- const o = e.getScale(n, i);
3451
- return Math.floor((n + i.margin * 2) * o);
3452
- }, e.qrToImageData = function(n, i, o) {
3453
- const s = i.modules.size, l = i.modules.data, a = e.getScale(s, o), c = Math.floor((s + o.margin * 2) * a), d = o.margin * a, h = [o.color.light, o.color.dark];
3498
+ }, e.getScale = function(i, n) {
3499
+ return n.width && n.width >= i + n.margin * 2 ? n.width / (i + n.margin * 2) : n.scale;
3500
+ }, e.getImageWidth = function(i, n) {
3501
+ const s = e.getScale(i, n);
3502
+ return Math.floor((i + n.margin * 2) * s);
3503
+ }, e.qrToImageData = function(i, n, s) {
3504
+ const o = n.modules.size, l = n.modules.data, a = e.getScale(o, s), c = Math.floor((o + s.margin * 2) * a), d = s.margin * a, h = [s.color.light, s.color.dark];
3454
3505
  for (let p = 0; p < c; p++)
3455
3506
  for (let u = 0; u < c; u++) {
3456
- let m = (p * c + u) * 4, b = o.color.light;
3507
+ let m = (p * c + u) * 4, v = s.color.light;
3457
3508
  if (p >= d && u >= d && p < c - d && u < c - d) {
3458
- const A = Math.floor((p - d) / a), v = Math.floor((u - d) / a);
3459
- b = h[l[A * s + v] ? 1 : 0];
3509
+ const C = Math.floor((p - d) / a), w = Math.floor((u - d) / a);
3510
+ v = h[l[C * o + w] ? 1 : 0];
3460
3511
  }
3461
- n[m++] = b.r, n[m++] = b.g, n[m++] = b.b, n[m] = b.a;
3512
+ i[m++] = v.r, i[m++] = v.g, i[m++] = v.b, i[m] = v.a;
3462
3513
  }
3463
3514
  };
3464
- })(Kt);
3515
+ })(Qt);
3465
3516
  (function(e) {
3466
- const t = Kt;
3467
- function r(i, o, s) {
3468
- i.clearRect(0, 0, o.width, o.height), o.style || (o.style = {}), o.height = s, o.width = s, o.style.height = s + "px", o.style.width = s + "px";
3517
+ const t = Qt;
3518
+ function r(n, s, o) {
3519
+ n.clearRect(0, 0, s.width, s.height), s.style || (s.style = {}), s.height = o, s.width = o, s.style.height = o + "px", s.style.width = o + "px";
3469
3520
  }
3470
- function n() {
3521
+ function i() {
3471
3522
  try {
3472
3523
  return document.createElement("canvas");
3473
3524
  } catch {
3474
3525
  throw new Error("You need to specify a canvas element");
3475
3526
  }
3476
3527
  }
3477
- e.render = function(o, s, l) {
3478
- let a = l, c = s;
3479
- typeof a > "u" && (!s || !s.getContext) && (a = s, s = void 0), s || (c = n()), a = t.getOptions(a);
3480
- const d = t.getImageWidth(o.modules.size, a), h = c.getContext("2d"), p = h.createImageData(d, d);
3481
- return t.qrToImageData(p.data, o, a), r(h, c, d), h.putImageData(p, 0, 0), c;
3482
- }, e.renderToDataURL = function(o, s, l) {
3528
+ e.render = function(s, o, l) {
3529
+ let a = l, c = o;
3530
+ typeof a > "u" && (!o || !o.getContext) && (a = o, o = void 0), o || (c = i()), a = t.getOptions(a);
3531
+ const d = t.getImageWidth(s.modules.size, a), h = c.getContext("2d"), p = h.createImageData(d, d);
3532
+ return t.qrToImageData(p.data, s, a), r(h, c, d), h.putImageData(p, 0, 0), c;
3533
+ }, e.renderToDataURL = function(s, o, l) {
3483
3534
  let a = l;
3484
- typeof a > "u" && (!s || !s.getContext) && (a = s, s = void 0), a || (a = {});
3485
- const c = e.render(o, s, a), d = a.type || "image/png", h = a.rendererOpts || {};
3535
+ typeof a > "u" && (!o || !o.getContext) && (a = o, o = void 0), a || (a = {});
3536
+ const c = e.render(s, o, a), d = a.type || "image/png", h = a.rendererOpts || {};
3486
3537
  return c.toDataURL(d, h.quality);
3487
3538
  };
3488
3539
  })(Te);
3489
3540
  var $e = {};
3490
- const hn = Kt;
3541
+ const mi = Qt;
3491
3542
  function de(e, t) {
3492
- const r = e.a / 255, n = t + '="' + e.hex + '"';
3493
- return r < 1 ? n + " " + t + '-opacity="' + r.toFixed(2).slice(1) + '"' : n;
3543
+ const r = e.a / 255, i = t + '="' + e.hex + '"';
3544
+ return r < 1 ? i + " " + t + '-opacity="' + r.toFixed(2).slice(1) + '"' : i;
3494
3545
  }
3495
- function Bt(e, t, r) {
3496
- let n = e + t;
3497
- return typeof r < "u" && (n += " " + r), n;
3546
+ function Lt(e, t, r) {
3547
+ let i = e + t;
3548
+ return typeof r < "u" && (i += " " + r), i;
3498
3549
  }
3499
- function pn(e, t, r) {
3500
- let n = "", i = 0, o = !1, s = 0;
3550
+ function fi(e, t, r) {
3551
+ let i = "", n = 0, s = !1, o = 0;
3501
3552
  for (let l = 0; l < e.length; l++) {
3502
3553
  const a = Math.floor(l % t), c = Math.floor(l / t);
3503
- !a && !o && (o = !0), e[l] ? (s++, l > 0 && a > 0 && e[l - 1] || (n += o ? Bt("M", a + r, 0.5 + c + r) : Bt("m", i, 0), i = 0, o = !1), a + 1 < t && e[l + 1] || (n += Bt("h", s), s = 0)) : i++;
3554
+ !a && !s && (s = !0), e[l] ? (o++, l > 0 && a > 0 && e[l - 1] || (i += s ? Lt("M", a + r, 0.5 + c + r) : Lt("m", n, 0), n = 0, s = !1), a + 1 < t && e[l + 1] || (i += Lt("h", o), o = 0)) : n++;
3504
3555
  }
3505
- return n;
3556
+ return i;
3506
3557
  }
3507
- $e.render = function(t, r, n) {
3508
- const i = hn.getOptions(r), o = t.modules.size, s = t.modules.data, l = o + i.margin * 2, a = i.color.light.a ? "<path " + de(i.color.light, "fill") + ' d="M0 0h' + l + "v" + l + 'H0z"/>' : "", c = "<path " + de(i.color.dark, "stroke") + ' d="' + pn(s, o, i.margin) + '"/>', d = 'viewBox="0 0 ' + l + " " + l + '"', p = '<svg xmlns="http://www.w3.org/2000/svg" ' + (i.width ? 'width="' + i.width + '" height="' + i.width + '" ' : "") + d + ' shape-rendering="crispEdges">' + a + c + `</svg>
3558
+ $e.render = function(t, r, i) {
3559
+ const n = mi.getOptions(r), s = t.modules.size, o = t.modules.data, l = s + n.margin * 2, a = n.color.light.a ? "<path " + de(n.color.light, "fill") + ' d="M0 0h' + l + "v" + l + 'H0z"/>' : "", c = "<path " + de(n.color.dark, "stroke") + ' d="' + fi(o, s, n.margin) + '"/>', d = 'viewBox="0 0 ' + l + " " + l + '"', p = '<svg xmlns="http://www.w3.org/2000/svg" ' + (n.width ? 'width="' + n.width + '" height="' + n.width + '" ' : "") + d + ' shape-rendering="crispEdges">' + a + c + `</svg>
3509
3560
  `;
3510
- return typeof n == "function" && n(null, p), p;
3561
+ return typeof i == "function" && i(null, p), p;
3511
3562
  };
3512
- const mn = _r, zt = we, Re = Te, fn = $e;
3513
- function Wt(e, t, r, n, i) {
3514
- const o = [].slice.call(arguments, 1), s = o.length, l = typeof o[s - 1] == "function";
3515
- if (!l && !mn())
3563
+ const gi = Dr, zt = we, Re = Te, yi = $e;
3564
+ function Wt(e, t, r, i, n) {
3565
+ const s = [].slice.call(arguments, 1), o = s.length, l = typeof s[o - 1] == "function";
3566
+ if (!l && !gi())
3516
3567
  throw new Error("Callback required as last argument");
3517
3568
  if (l) {
3518
- if (s < 2)
3569
+ if (o < 2)
3519
3570
  throw new Error("Too few arguments provided");
3520
- s === 2 ? (i = r, r = t, t = n = void 0) : s === 3 && (t.getContext && typeof i > "u" ? (i = n, n = void 0) : (i = n, n = r, r = t, t = void 0));
3571
+ o === 2 ? (n = r, r = t, t = i = void 0) : o === 3 && (t.getContext && typeof n > "u" ? (n = i, i = void 0) : (n = i, i = r, r = t, t = void 0));
3521
3572
  } else {
3522
- if (s < 1)
3573
+ if (o < 1)
3523
3574
  throw new Error("Too few arguments provided");
3524
- return s === 1 ? (r = t, t = n = void 0) : s === 2 && !t.getContext && (n = r, r = t, t = void 0), new Promise(function(a, c) {
3575
+ return o === 1 ? (r = t, t = i = void 0) : o === 2 && !t.getContext && (i = r, r = t, t = void 0), new Promise(function(a, c) {
3525
3576
  try {
3526
- const d = zt.create(r, n);
3527
- a(e(d, t, n));
3577
+ const d = zt.create(r, i);
3578
+ a(e(d, t, i));
3528
3579
  } catch (d) {
3529
3580
  c(d);
3530
3581
  }
3531
3582
  });
3532
3583
  }
3533
3584
  try {
3534
- const a = zt.create(r, n);
3535
- i(null, e(a, t, n));
3585
+ const a = zt.create(r, i);
3586
+ n(null, e(a, t, i));
3536
3587
  } catch (a) {
3537
- i(a);
3588
+ n(a);
3538
3589
  }
3539
3590
  }
3540
3591
  pt.create = zt.create;
3541
3592
  pt.toCanvas = Wt.bind(null, Re.render);
3542
3593
  pt.toDataURL = Wt.bind(null, Re.renderToDataURL);
3543
3594
  pt.toString = Wt.bind(null, function(e, t, r) {
3544
- return fn.render(e, r);
3595
+ return yi.render(e, r);
3545
3596
  });
3546
- var gn = Object.defineProperty, yn = Object.getOwnPropertyDescriptor, P = (e, t, r, n) => {
3547
- for (var i = n > 1 ? void 0 : n ? yn(t, r) : t, o = e.length - 1, s; o >= 0; o--)
3548
- (s = e[o]) && (i = (n ? s(t, r, i) : s(i)) || i);
3549
- return n && i && gn(t, r, i), i;
3597
+ var bi = Object.defineProperty, vi = Object.getOwnPropertyDescriptor, P = (e, t, r, i) => {
3598
+ for (var n = i > 1 ? void 0 : i ? vi(t, r) : t, s = e.length - 1, o; s >= 0; s--)
3599
+ (o = e[s]) && (n = (i ? o(t, r, n) : o(n)) || n);
3600
+ return i && n && bi(t, r, n), n;
3550
3601
  };
3551
- let S = class extends st {
3602
+ let S = class extends ot {
3552
3603
  constructor() {
3553
3604
  super(...arguments), this.currentState = { status: "idle" }, this.selectedMethod = null, this.cardFormData = {
3554
3605
  cardNumber: "",
@@ -3618,8 +3669,8 @@ let S = class extends st {
3618
3669
  */
3619
3670
  applyCssVariables(e) {
3620
3671
  for (const [t, r] of Object.entries(this.cssVariableMap)) {
3621
- const n = e[t];
3622
- n != null ? this.style.setProperty(r, n) : this.style.removeProperty(r);
3672
+ const i = e[t];
3673
+ i != null ? this.style.setProperty(r, i) : this.style.removeProperty(r);
3623
3674
  }
3624
3675
  }
3625
3676
  /**
@@ -3666,19 +3717,19 @@ let S = class extends st {
3666
3717
  // --- Cleave.js Setup ---
3667
3718
  setupCleave() {
3668
3719
  setTimeout(() => {
3669
- var r, n;
3670
- const e = (r = this.shadowRoot) == null ? void 0 : r.querySelector("#cardNumber"), t = (n = this.shadowRoot) == null ? void 0 : n.querySelector("#expiry");
3720
+ var r, i;
3721
+ const e = (r = this.shadowRoot) == null ? void 0 : r.querySelector("#cardNumber"), t = (i = this.shadowRoot) == null ? void 0 : i.querySelector("#expiry");
3671
3722
  e && !this.cardNumberCleave && (this.cardNumberCleave = new ae(e, {
3672
3723
  creditCard: !0,
3673
3724
  delimiter: " ",
3674
- onCreditCardTypeChanged: (i) => {
3675
- const o = {
3725
+ onCreditCardTypeChanged: (n) => {
3726
+ const s = {
3676
3727
  visa: "visa",
3677
3728
  mastercard: "mastercard",
3678
3729
  amex: "amex",
3679
3730
  discover: "discover"
3680
3731
  };
3681
- this.cardBrand = o[i] || "unknown";
3732
+ this.cardBrand = s[n] || "unknown";
3682
3733
  }
3683
3734
  })), t && !this.expiryCleave && (this.expiryCleave = new ae(t, {
3684
3735
  date: !0,
@@ -3741,8 +3792,8 @@ let S = class extends st {
3741
3792
  disabledReason: "ShopeePay is only available for MYR currency"
3742
3793
  };
3743
3794
  if (t.id === f.ATOM) {
3744
- const n = this.getTransactionData().currency;
3745
- if (n !== "SGD" && n !== "MYR")
3795
+ const i = this.getTransactionData().currency;
3796
+ if (i !== "SGD" && i !== "MYR")
3746
3797
  return {
3747
3798
  id: t.id,
3748
3799
  enabled: !1,
@@ -3757,6 +3808,18 @@ let S = class extends st {
3757
3808
  id: t.id,
3758
3809
  enabled: !1,
3759
3810
  disabledReason: "Touch 'n Go is only available for MYR currency"
3811
+ } : t.id === f.ALIPAYCN && this.getTransactionData().currency !== "CNY" ? {
3812
+ id: t.id,
3813
+ enabled: !1,
3814
+ disabledReason: "Alipay is only available for CNY currency"
3815
+ } : t.id === f.ALIPAYHK && this.getTransactionData().currency !== "HKD" ? {
3816
+ id: t.id,
3817
+ enabled: !1,
3818
+ disabledReason: "AlipayHK is only available for HKD currency"
3819
+ } : t.id === f.GCASH && this.getTransactionData().currency !== "PHP" ? {
3820
+ id: t.id,
3821
+ enabled: !1,
3822
+ disabledReason: "GCash is only available for PHP currency"
3760
3823
  } : {
3761
3824
  id: t.id,
3762
3825
  enabled: !0
@@ -3815,7 +3878,11 @@ let S = class extends st {
3815
3878
  })
3816
3879
  );
3817
3880
  }), this.sdk.on("initialized", (t) => {
3818
- this.paymentData = t.payload.paymentData, this.isInitializing = !1;
3881
+ var r;
3882
+ if (this.paymentData = t.payload.paymentData, this.isInitializing = !1, (r = t.payload.paymentData) != null && r.sessionId && !document.getElementById("airwallex-fraud-api")) {
3883
+ const n = document.createElement("script");
3884
+ n.src = "https://static.airwallex.com/webapp/fraud/device-fingerprint/index.js", n.async = !0, n.setAttribute("data-order-session-id", t.payload.paymentData.sessionId), n.setAttribute("id", "airwallex-fraud-api"), document.body.appendChild(n);
3885
+ }
3819
3886
  }), this.sdk.on("payment_requires_action", (t) => {
3820
3887
  this.nextActionUrl = t.payload.actionUrl, this.show3DSModal = !0, this.paymentLocked = !0, this.leaveEventsCounter = 0;
3821
3888
  }), this.sdk.on("poll_started", () => {
@@ -3826,10 +3893,10 @@ let S = class extends st {
3826
3893
  async (t) => {
3827
3894
  if (this.qrCode = t.payload.qrCode, !this.qrCode)
3828
3895
  return;
3829
- const r = this.qrCode.startsWith("http://") || this.qrCode.startsWith("https://"), n = this.qrCode.startsWith("data:image");
3830
- if (!r && !n)
3896
+ const r = this.qrCode.startsWith("http://") || this.qrCode.startsWith("https://"), i = this.qrCode.startsWith("data:image");
3897
+ if (!r && !i)
3831
3898
  try {
3832
- const i = await pt.toDataURL(this.qrCode, {
3899
+ const n = await pt.toDataURL(this.qrCode, {
3833
3900
  width: 300,
3834
3901
  margin: 2,
3835
3902
  color: {
@@ -3837,7 +3904,7 @@ let S = class extends st {
3837
3904
  light: "#FFFFFF"
3838
3905
  }
3839
3906
  });
3840
- this.qrCodeDataUrl = i;
3907
+ this.qrCodeDataUrl = n;
3841
3908
  } catch {
3842
3909
  this.qrCodeDataUrl = null;
3843
3910
  }
@@ -3897,6 +3964,24 @@ let S = class extends st {
3897
3964
  const { redirectUrl: r } = t.payload;
3898
3965
  r && (console.log("[WebComponent] Redirecting to TnG URL:", r), window.location.href = r);
3899
3966
  }
3967
+ ), this.sdk.on(
3968
+ "alipaycn_redirect",
3969
+ (t) => {
3970
+ const { redirectUrl: r } = t.payload;
3971
+ r && (window.location.href = r);
3972
+ }
3973
+ ), this.sdk.on(
3974
+ "alipayhk_redirect",
3975
+ (t) => {
3976
+ const { redirectUrl: r } = t.payload;
3977
+ r && (window.location.href = r);
3978
+ }
3979
+ ), this.sdk.on(
3980
+ "gcash_redirect",
3981
+ (t) => {
3982
+ const { redirectUrl: r } = t.payload;
3983
+ r && (window.location.href = r);
3984
+ }
3900
3985
  ), this.sdk.initialize({
3901
3986
  amount: this.amount,
3902
3987
  currency: this.currency,
@@ -3923,12 +4008,12 @@ let S = class extends st {
3923
4008
  const t = e.replace(/\s/g, "");
3924
4009
  if (!/^\d+$/.test(t))
3925
4010
  return !1;
3926
- let r = 0, n = !1;
3927
- for (let i = t.length - 1; i >= 0; i--) {
3928
- const o = t.charAt(i);
3929
- if (!o) continue;
3930
- let s = parseInt(o, 10);
3931
- n && (s *= 2, s > 9 && (s -= 9)), r += s, n = !n;
4011
+ let r = 0, i = !1;
4012
+ for (let n = t.length - 1; n >= 0; n--) {
4013
+ const s = t.charAt(n);
4014
+ if (!s) continue;
4015
+ let o = parseInt(s, 10);
4016
+ i && (o *= 2, o > 9 && (o -= 9)), r += o, i = !i;
3932
4017
  }
3933
4018
  return r % 10 === 0;
3934
4019
  }
@@ -3937,16 +4022,16 @@ let S = class extends st {
3937
4022
  const t = e.trim();
3938
4023
  if (!/^\d{1,2}\/\d{2}$/.test(t))
3939
4024
  return { valid: !1, error: "Invalid format (MM/YY)" };
3940
- const i = t.split("/"), o = i[0], s = i[1];
3941
- if (!o || !s)
4025
+ const n = t.split("/"), s = n[0], o = n[1];
4026
+ if (!s || !o)
3942
4027
  return { valid: !1, error: "Invalid format (MM/YY)" };
3943
- const l = parseInt(o, 10);
4028
+ const l = parseInt(s, 10);
3944
4029
  if (l < 1 || l > 12)
3945
4030
  return { valid: !1, error: "Invalid month (01-12)" };
3946
4031
  const a = /* @__PURE__ */ new Date(), c = a.getFullYear(), d = a.getMonth() + 1;
3947
4032
  let h;
3948
- if (s.length === 2) {
3949
- const p = parseInt(s, 10), u = c % 100, m = Math.floor(c / 100) * 100;
4033
+ if (o.length === 2) {
4034
+ const p = parseInt(o, 10), u = c % 100, m = Math.floor(c / 100) * 100;
3950
4035
  p < u && u - p > 80 ? h = m + 100 + p : h = m + p;
3951
4036
  } else
3952
4037
  return { valid: !1, error: "Invalid year format" };
@@ -3966,11 +4051,11 @@ let S = class extends st {
3966
4051
  if (!this.sdk || this.currentState.status !== "ready" || !this.validateCardForm())
3967
4052
  return;
3968
4053
  this.paymentLocked = !0;
3969
- const e = this.cardFormData.expiry.split("/"), t = (e[0] || "").trim(), n = `20${(e[1] || "").trim().substring(0, 2)}`;
4054
+ const e = this.cardFormData.expiry.split("/"), t = (e[0] || "").trim(), i = `20${(e[1] || "").trim().substring(0, 2)}`;
3970
4055
  this.sdk.submitPayment(f.CARD, {
3971
4056
  cardNumber: this.cardFormData.cardNumber.replace(/\s/g, ""),
3972
4057
  expiryMonth: t,
3973
- expiryYear: n,
4058
+ expiryYear: i,
3974
4059
  cvv: this.cardFormData.cvv,
3975
4060
  firstName: this.firstName,
3976
4061
  lastName: this.lastName,
@@ -4050,6 +4135,30 @@ let S = class extends st {
4050
4135
  phoneNumber: this.phoneNumber
4051
4136
  }));
4052
4137
  }
4138
+ handleAlipayCNPayment() {
4139
+ !this.sdk || this.currentState.status !== "ready" || (this.paymentLocked = !0, this.sdk.submitPayment(f.ALIPAYCN, {
4140
+ firstName: this.firstName,
4141
+ lastName: this.lastName,
4142
+ email: this.email,
4143
+ phoneNumber: this.phoneNumber
4144
+ }));
4145
+ }
4146
+ handleAlipayHKPayment() {
4147
+ !this.sdk || this.currentState.status !== "ready" || (this.paymentLocked = !0, this.sdk.submitPayment(f.ALIPAYHK, {
4148
+ firstName: this.firstName,
4149
+ lastName: this.lastName,
4150
+ email: this.email,
4151
+ phoneNumber: this.phoneNumber
4152
+ }));
4153
+ }
4154
+ handleGCashPayment() {
4155
+ !this.sdk || this.currentState.status !== "ready" || (this.paymentLocked = !0, this.sdk.submitPayment(f.GCASH, {
4156
+ firstName: this.firstName,
4157
+ lastName: this.lastName,
4158
+ email: this.email,
4159
+ phoneNumber: this.phoneNumber
4160
+ }));
4161
+ }
4053
4162
  // --- Render Methods ---
4054
4163
  /**
4055
4164
  * Get the formatted pay amount for buttons (net amount including fees)
@@ -4073,21 +4182,21 @@ let S = class extends st {
4073
4182
  },
4074
4183
  netAmount: this.amount
4075
4184
  };
4076
- const t = (a = e.fees) == null ? void 0 : a.find((c) => c.owner === "merchant"), r = () => t ? t.type === "percentage" ? `${t.value}%` : `${t.value} ${t.currency}` : "", n = typeof e.totalFee == "number" ? e.totalFee : Number(e.totalFee) || 0, i = typeof e.totalSystemFee == "number" ? e.totalSystemFee : Number(e.totalSystemFee) || 0, o = e.initialAmount != null ? typeof e.initialAmount == "number" ? e.initialAmount : Number(e.initialAmount) || 0 : this.amount, s = e.customerAmount != null ? typeof e.customerAmount == "number" ? e.customerAmount : Number(e.customerAmount) || 0 : o, l = n - i;
4185
+ const t = (a = e.fees) == null ? void 0 : a.find((c) => c.owner === "merchant"), r = () => t ? t.type === "percentage" ? `${t.value}%` : `${t.value} ${t.currency}` : "", i = typeof e.totalFee == "number" ? e.totalFee : Number(e.totalFee) || 0, n = typeof e.totalSystemFee == "number" ? e.totalSystemFee : Number(e.totalSystemFee) || 0, s = e.initialAmount != null ? typeof e.initialAmount == "number" ? e.initialAmount : Number(e.initialAmount) || 0 : this.amount, o = e.customerAmount != null ? typeof e.customerAmount == "number" ? e.customerAmount : Number(e.customerAmount) || 0 : s, l = i - n;
4077
4186
  return {
4078
4187
  currency: e.currency || this.currency,
4079
- charge: o,
4080
- fees: n,
4188
+ charge: s,
4189
+ fees: i,
4081
4190
  feeBreakdown: {
4082
4191
  transactionFee: l,
4083
4192
  merchantFee: l,
4084
4193
  merchantFeeLabel: r() || "0%"
4085
4194
  },
4086
- netAmount: s
4195
+ netAmount: o
4087
4196
  };
4088
4197
  }
4089
4198
  renderTransactionDetailsSkeleton() {
4090
- return w`
4199
+ return b`
4091
4200
  <div class="skeleton-transaction">
4092
4201
  <div class="skeleton skeleton-title"></div>
4093
4202
  <div class="skeleton-row">
@@ -4111,7 +4220,7 @@ let S = class extends st {
4111
4220
  `;
4112
4221
  }
4113
4222
  renderPaymentMethodsSkeleton() {
4114
- return w`
4223
+ return b`
4115
4224
  <div>
4116
4225
  <div class="skeleton-method">
4117
4226
  <div class="skeleton skeleton-radio"></div>
@@ -4131,7 +4240,7 @@ let S = class extends st {
4131
4240
  this.width ? `--one-payment-width: ${this.width}` : "",
4132
4241
  this.maxWidth ? `--one-payment-max-width: ${this.maxWidth}` : ""
4133
4242
  ].filter(Boolean).join("; ");
4134
- return w`
4243
+ return b`
4135
4244
  <div class="payment-element" style="${e}">
4136
4245
  ${this.renderTransactionDetailsSkeleton()}
4137
4246
  <div class="header">Select a payment method</div>
@@ -4141,7 +4250,7 @@ let S = class extends st {
4141
4250
  }
4142
4251
  renderTransactionDetails() {
4143
4252
  const e = this.getTransactionData(), t = (r) => r.toFixed(2);
4144
- return w`
4253
+ return b`
4145
4254
  <div class="transaction-details">
4146
4255
  <h2 class="transaction-title">Transaction details</h2>
4147
4256
 
@@ -4176,7 +4285,7 @@ let S = class extends st {
4176
4285
  margin-top: ${this.feesExpanded ? "0.625rem" : "0"};
4177
4286
  `}
4178
4287
  >
4179
- ${e.feeBreakdown ? w`
4288
+ ${e.feeBreakdown ? b`
4180
4289
  <div class="fee-breakdown-inner">
4181
4290
  <div class="breakdown-row">
4182
4291
  <span class="breakdown-label">Transaction fee:</span>
@@ -4207,7 +4316,7 @@ let S = class extends st {
4207
4316
  renderCardForm() {
4208
4317
  setTimeout(() => this.setupCleave(), 0);
4209
4318
  const e = this.cardBrand === "amex" ? 4 : 3, t = this.cardBrand === "amex" ? "1234" : "123";
4210
- return w`
4319
+ return b`
4211
4320
  <div class="card-form">
4212
4321
  <h4 class="form-title">Card Information</h4>
4213
4322
  <div class="form-fields">
@@ -4222,7 +4331,7 @@ let S = class extends st {
4222
4331
  .value=${this.cardFormData.cardNumber}
4223
4332
  @input=${(r) => this.handleInputChange("cardNumber", r.target.value)}
4224
4333
  />
4225
- ${this.formErrors.cardNumber ? w`<div class="error-message">${this.formErrors.cardNumber}</div>` : ""}
4334
+ ${this.formErrors.cardNumber ? b`<div class="error-message">${this.formErrors.cardNumber}</div>` : ""}
4226
4335
  </div>
4227
4336
 
4228
4337
  <!-- Single Expiry Field -->
@@ -4235,13 +4344,13 @@ let S = class extends st {
4235
4344
  placeholder="MM/YY"
4236
4345
  .value=${this.cardFormData.expiry}
4237
4346
  @input=${(r) => {
4238
- const n = r.target;
4347
+ const i = r.target;
4239
4348
  setTimeout(() => {
4240
- this.handleInputChange("expiry", n.value);
4349
+ this.handleInputChange("expiry", i.value);
4241
4350
  }, 0);
4242
4351
  }}
4243
4352
  />
4244
- ${this.formErrors.expiry ? w`<div class="error-message">${this.formErrors.expiry}</div>` : ""}
4353
+ ${this.formErrors.expiry ? b`<div class="error-message">${this.formErrors.expiry}</div>` : ""}
4245
4354
  </div>
4246
4355
 
4247
4356
  <!-- CVV -->
@@ -4254,11 +4363,11 @@ let S = class extends st {
4254
4363
  maxlength="${e}"
4255
4364
  .value=${this.cardFormData.cvv}
4256
4365
  @input=${(r) => {
4257
- const n = r.target.value.replace(/\D/g, "");
4258
- r.target.value = n, this.handleInputChange("cvv", n);
4366
+ const i = r.target.value.replace(/\D/g, "");
4367
+ r.target.value = i, this.handleInputChange("cvv", i);
4259
4368
  }}
4260
4369
  />
4261
- ${this.formErrors.cvv ? w`<div class="error-message">${this.formErrors.cvv}</div>` : ""}
4370
+ ${this.formErrors.cvv ? b`<div class="error-message">${this.formErrors.cvv}</div>` : ""}
4262
4371
  </div>
4263
4372
 
4264
4373
  <!-- Cardholder Name -->
@@ -4270,11 +4379,11 @@ let S = class extends st {
4270
4379
  placeholder="JOHN DOE"
4271
4380
  .value=${this.cardFormData.cardholderName}
4272
4381
  @input=${(r) => {
4273
- const n = r.target.value.replace(/[^A-Za-z\s]/g, "").toUpperCase();
4274
- r.target.value = n, this.handleInputChange("cardholderName", n);
4382
+ const i = r.target.value.replace(/[^A-Za-z\s]/g, "").toUpperCase();
4383
+ r.target.value = i, this.handleInputChange("cardholderName", i);
4275
4384
  }}
4276
4385
  />
4277
- ${this.formErrors.cardholderName ? w`<div class="error-message">${this.formErrors.cardholderName}</div>` : ""}
4386
+ ${this.formErrors.cardholderName ? b`<div class="error-message">${this.formErrors.cardholderName}</div>` : ""}
4278
4387
  </div>
4279
4388
  </div>
4280
4389
 
@@ -4291,7 +4400,7 @@ let S = class extends st {
4291
4400
  `;
4292
4401
  }
4293
4402
  renderPayNowContent() {
4294
- return this.showQRModal && this.qrCodeDataUrl ? w`
4403
+ return this.showQRModal && this.qrCodeDataUrl ? b`
4295
4404
  <div class="paynow-container">
4296
4405
  <!-- Render generated QR code image -->
4297
4406
  <div class="qr-code-wrapper">
@@ -4308,7 +4417,7 @@ let S = class extends st {
4308
4417
  ${this.qrPollingInProgress ? "Verifying..." : "I Have Scanned the QR Code"}
4309
4418
  </button>
4310
4419
  </div>
4311
- ` : w`
4420
+ ` : b`
4312
4421
  <div class="paynow-container">
4313
4422
  <div class="paynow-instructions">
4314
4423
  <h3 class="instructions-title">How to Pay by QR:</h3>
@@ -4339,7 +4448,7 @@ let S = class extends st {
4339
4448
  `;
4340
4449
  }
4341
4450
  renderPromptPayContent() {
4342
- return w`
4451
+ return b`
4343
4452
  <div class="paynow-container">
4344
4453
  <div class="paynow-instructions">
4345
4454
  <h3 class="instructions-title">How to Pay with PromptPay:</h3>
@@ -4375,7 +4484,7 @@ let S = class extends st {
4375
4484
  `;
4376
4485
  }
4377
4486
  renderDuitNowContent() {
4378
- return w`
4487
+ return b`
4379
4488
  <div class="paynow-container">
4380
4489
  <div class="paynow-instructions">
4381
4490
  <h3 class="instructions-title">How to Pay with DuitNow:</h3>
@@ -4411,7 +4520,7 @@ let S = class extends st {
4411
4520
  `;
4412
4521
  }
4413
4522
  renderGoPayContent() {
4414
- return w`
4523
+ return b`
4415
4524
  <div class="paynow-container">
4416
4525
  <div class="paynow-instructions">
4417
4526
  <h3 class="instructions-title">How to Pay with GoPay:</h3>
@@ -4447,7 +4556,7 @@ let S = class extends st {
4447
4556
  `;
4448
4557
  }
4449
4558
  renderBoostContent() {
4450
- return w`
4559
+ return b`
4451
4560
  <div class="paynow-container">
4452
4561
  <div class="paynow-instructions">
4453
4562
  <h3 class="instructions-title">How to Pay with Boost:</h3>
@@ -4483,7 +4592,7 @@ let S = class extends st {
4483
4592
  `;
4484
4593
  }
4485
4594
  renderShopeePayContent() {
4486
- return w`
4595
+ return b`
4487
4596
  <div class="paynow-container">
4488
4597
  <div class="paynow-instructions">
4489
4598
  <h3 class="instructions-title">How to Pay with ShopeePay:</h3>
@@ -4519,7 +4628,7 @@ let S = class extends st {
4519
4628
  `;
4520
4629
  }
4521
4630
  renderAtomContent() {
4522
- return w`
4631
+ return b`
4523
4632
  <div class="paynow-container">
4524
4633
  <div class="paynow-instructions">
4525
4634
  <h3 class="instructions-title">How to Pay with Atome:</h3>
@@ -4555,7 +4664,7 @@ let S = class extends st {
4555
4664
  `;
4556
4665
  }
4557
4666
  renderDanaContent() {
4558
- return w`
4667
+ return b`
4559
4668
  <div class="paynow-container">
4560
4669
  <div class="paynow-instructions">
4561
4670
  <h3 class="instructions-title">How to Pay with Dana:</h3>
@@ -4591,7 +4700,7 @@ let S = class extends st {
4591
4700
  `;
4592
4701
  }
4593
4702
  renderTngContent() {
4594
- return w`
4703
+ return b`
4595
4704
  <div class="paynow-container">
4596
4705
  <div class="paynow-instructions">
4597
4706
  <h3 class="instructions-title">How to Pay with Touch 'n Go:</h3>
@@ -4626,8 +4735,116 @@ let S = class extends st {
4626
4735
  </div>
4627
4736
  `;
4628
4737
  }
4738
+ renderAlipayCNContent() {
4739
+ return b`
4740
+ <div class="paynow-container">
4741
+ <div class="paynow-instructions">
4742
+ <h3 class="instructions-title">How to Pay with Alipay:</h3>
4743
+
4744
+ <div class="instruction-steps">
4745
+ <div class="instruction-step">
4746
+ <div class="step-number">1</div>
4747
+ <p class="step-text">Click <strong>"Pay"</strong> to go to the payment page.</p>
4748
+ </div>
4749
+
4750
+ <div class="instruction-step">
4751
+ <div class="step-number">2</div>
4752
+ <p class="step-text">Complete the payment in the Alipay app.</p>
4753
+ </div>
4754
+
4755
+ <div class="instruction-step">
4756
+ <div class="step-number">3</div>
4757
+ <p class="step-text">You'll be redirected back automatically.</p>
4758
+ </div>
4759
+ </div>
4760
+
4761
+ <div class="submit-section">
4762
+ <button
4763
+ class="pay-button ${this.currentState.status === "processing" || this.currentState.status === "requires_action" ? "loading" : ""}"
4764
+ @click=${this.handleAlipayCNPayment}
4765
+ ?disabled=${this.currentState.status === "processing" || this.currentState.status === "requires_action"}
4766
+ >
4767
+ ${this.currentState.status === "processing" || this.currentState.status === "requires_action" ? "Redirecting..." : `Pay ${this.getPayButtonAmount()}`}
4768
+ </button>
4769
+ </div>
4770
+ </div>
4771
+ </div>
4772
+ `;
4773
+ }
4774
+ renderAlipayHKContent() {
4775
+ return b`
4776
+ <div class="paynow-container">
4777
+ <div class="paynow-instructions">
4778
+ <h3 class="instructions-title">How to Pay with AlipayHK:</h3>
4779
+
4780
+ <div class="instruction-steps">
4781
+ <div class="instruction-step">
4782
+ <div class="step-number">1</div>
4783
+ <p class="step-text">Click <strong>"Pay"</strong> to go to the payment page.</p>
4784
+ </div>
4785
+
4786
+ <div class="instruction-step">
4787
+ <div class="step-number">2</div>
4788
+ <p class="step-text">Complete the payment in the AlipayHK app.</p>
4789
+ </div>
4790
+
4791
+ <div class="instruction-step">
4792
+ <div class="step-number">3</div>
4793
+ <p class="step-text">You'll be redirected back automatically.</p>
4794
+ </div>
4795
+ </div>
4796
+
4797
+ <div class="submit-section">
4798
+ <button
4799
+ class="pay-button ${this.currentState.status === "processing" || this.currentState.status === "requires_action" ? "loading" : ""}"
4800
+ @click=${this.handleAlipayHKPayment}
4801
+ ?disabled=${this.currentState.status === "processing" || this.currentState.status === "requires_action"}
4802
+ >
4803
+ ${this.currentState.status === "processing" || this.currentState.status === "requires_action" ? "Redirecting..." : `Pay ${this.getPayButtonAmount()}`}
4804
+ </button>
4805
+ </div>
4806
+ </div>
4807
+ </div>
4808
+ `;
4809
+ }
4810
+ renderGCashContent() {
4811
+ return b`
4812
+ <div class="paynow-container">
4813
+ <div class="paynow-instructions">
4814
+ <h3 class="instructions-title">How to Pay with GCash:</h3>
4815
+
4816
+ <div class="instruction-steps">
4817
+ <div class="instruction-step">
4818
+ <div class="step-number">1</div>
4819
+ <p class="step-text">Click <strong>"Pay"</strong> to go to the payment page.</p>
4820
+ </div>
4821
+
4822
+ <div class="instruction-step">
4823
+ <div class="step-number">2</div>
4824
+ <p class="step-text">Complete the payment in the GCash app.</p>
4825
+ </div>
4826
+
4827
+ <div class="instruction-step">
4828
+ <div class="step-number">3</div>
4829
+ <p class="step-text">You'll be redirected back automatically.</p>
4830
+ </div>
4831
+ </div>
4832
+
4833
+ <div class="submit-section">
4834
+ <button
4835
+ class="pay-button ${this.currentState.status === "processing" || this.currentState.status === "requires_action" ? "loading" : ""}"
4836
+ @click=${this.handleGCashPayment}
4837
+ ?disabled=${this.currentState.status === "processing" || this.currentState.status === "requires_action"}
4838
+ >
4839
+ ${this.currentState.status === "processing" || this.currentState.status === "requires_action" ? "Redirecting..." : `Pay ${this.getPayButtonAmount()}`}
4840
+ </button>
4841
+ </div>
4842
+ </div>
4843
+ </div>
4844
+ `;
4845
+ }
4629
4846
  render3DSModal() {
4630
- return !this.show3DSModal || !this.nextActionUrl ? null : w`
4847
+ return !this.show3DSModal || !this.nextActionUrl ? null : b`
4631
4848
  <div class="modal-overlay">
4632
4849
  <div class="modal-content iframe-modal">
4633
4850
  <iframe
@@ -4643,7 +4860,7 @@ let S = class extends st {
4643
4860
  renderStatusBlock() {
4644
4861
  if (this.currentState.status === "succeeded") {
4645
4862
  const e = this.getTransactionData(), t = e.netAmount.toFixed(2);
4646
- return w`
4863
+ return b`
4647
4864
  <div class="result-card success">
4648
4865
  <div class="result-icon-wrapper">
4649
4866
  <div class="result-icon">✓</div>
@@ -4658,7 +4875,7 @@ let S = class extends st {
4658
4875
  }
4659
4876
  if (this.currentState.status === "failed") {
4660
4877
  const e = this.currentState.error ? this.currentState.error.message : "An error occurred while processing your payment";
4661
- return w`
4878
+ return b`
4662
4879
  <div class="result-card error">
4663
4880
  <div class="result-icon-wrapper">
4664
4881
  <div class="result-icon">✕</div>
@@ -4676,16 +4893,16 @@ let S = class extends st {
4676
4893
  return this.renderSkeletons();
4677
4894
  const e = this.currentState.status === "succeeded" || this.currentState.status === "failed", t = !e, r = this.getFilteredPaymentMethods();
4678
4895
  if (r.length > 0) {
4679
- const s = r.some(
4896
+ const o = r.some(
4680
4897
  (l) => l.id === this.selectedMethod && l.enabled
4681
4898
  );
4682
- if (!this.selectedMethod || !s) {
4899
+ if (!this.selectedMethod || !o) {
4683
4900
  const l = r.find((a) => a.enabled);
4684
4901
  l && this.selectedMethod !== l.id && (this.selectedMethod = l.id);
4685
4902
  }
4686
4903
  }
4687
- const n = (s) => {
4688
- switch (s) {
4904
+ const i = (o) => {
4905
+ switch (o) {
4689
4906
  case f.CARD:
4690
4907
  return "Card";
4691
4908
  case f.PAYNOW:
@@ -4706,10 +4923,16 @@ let S = class extends st {
4706
4923
  return "Dana";
4707
4924
  case f.TNG:
4708
4925
  return "Touch 'n Go";
4926
+ case f.ALIPAYCN:
4927
+ return "Alipay";
4928
+ case f.ALIPAYHK:
4929
+ return "AlipayHK";
4930
+ case f.GCASH:
4931
+ return "GCash";
4709
4932
  default:
4710
- return s;
4933
+ return o;
4711
4934
  }
4712
- }, i = (s) => s === f.CARD ? w`
4935
+ }, n = (o) => o === f.CARD ? b`
4713
4936
  <div class="method-icon-right">
4714
4937
  <svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
4715
4938
  <path
@@ -4722,62 +4945,74 @@ let S = class extends st {
4722
4945
  />
4723
4946
  </svg>
4724
4947
  </div>
4725
- ` : s === f.PAYNOW ? w`
4948
+ ` : o === f.PAYNOW ? b`
4726
4949
  <div class="method-icon-right">
4727
4950
  <img src="${dr}" alt="PayNow" style="width: 45px; height: auto;" />
4728
4951
  </div>
4729
- ` : s === f.PROMPTPAY ? w`
4952
+ ` : o === f.PROMPTPAY ? b`
4730
4953
  <div class="method-icon-right">
4731
4954
  <img src="${ur}" alt="PromptPay" style="width: 45px; height: auto;" />
4732
4955
  </div>
4733
- ` : s === f.DUITNOW ? w`
4956
+ ` : o === f.DUITNOW ? b`
4734
4957
  <div class="method-icon-right">
4735
4958
  <img src="${hr}" alt="DuitNow" style="width: 45px; height: auto;" />
4736
4959
  </div>
4737
- ` : s === f.GOPAY ? w`
4960
+ ` : o === f.GOPAY ? b`
4738
4961
  <div class="method-icon-right">
4739
4962
  <img src="${pr}" alt="GoPay" style="width: 45px; height: auto;" />
4740
4963
  </div>
4741
- ` : s === f.BOOST ? w`
4964
+ ` : o === f.BOOST ? b`
4742
4965
  <div class="method-icon-right">
4743
4966
  <img src="${mr}" alt="Boost" style="width: 45px; height: auto;" />
4744
4967
  </div>
4745
- ` : s === f.SHOPEEPAY ? w`
4968
+ ` : o === f.SHOPEEPAY ? b`
4746
4969
  <div class="method-icon-right">
4747
4970
  <img src="${fr}" alt="ShopeePay" style="width: 45px; height: auto;" />
4748
4971
  </div>
4749
- ` : s === f.ATOM ? w`
4972
+ ` : o === f.ATOM ? b`
4750
4973
  <div class="method-icon-right">
4751
4974
  <img src="${gr}" alt="Atome" style="width: 45px; height: auto;" />
4752
4975
  </div>
4753
- ` : s === f.DANA ? w`
4976
+ ` : o === f.DANA ? b`
4754
4977
  <div class="method-icon-right">
4755
4978
  <img src="${yr}" alt="Dana" style="width: 45px; height: auto;" />
4756
4979
  </div>
4757
- ` : s === f.TNG ? w`
4980
+ ` : o === f.TNG ? b`
4758
4981
  <div class="method-icon-right">
4759
4982
  <img src="${br}" alt="Touch 'n Go" style="width: 45px; height: auto;" />
4760
4983
  </div>
4761
- ` : null, o = [
4984
+ ` : o === f.ALIPAYCN ? b`
4985
+ <div class="method-icon-right">
4986
+ <img src="${vr}" alt="Alipay" style="width: 45px; height: auto;" />
4987
+ </div>
4988
+ ` : o === f.ALIPAYHK ? b`
4989
+ <div class="method-icon-right">
4990
+ <img src="${wr}" alt="AlipayHK" style="width: 45px; height: auto;" />
4991
+ </div>
4992
+ ` : o === f.GCASH ? b`
4993
+ <div class="method-icon-right">
4994
+ <img src="${xr}" alt="GCash" style="width: 45px; height: auto;" />
4995
+ </div>
4996
+ ` : null, s = [
4762
4997
  this.width ? `--one-payment-width: ${this.width}` : "",
4763
4998
  this.maxWidth ? `--one-payment-max-width: ${this.maxWidth}` : ""
4764
4999
  ].filter(Boolean).join("; ");
4765
- return w`
4766
- <div class="payment-element" style="${o}">
5000
+ return b`
5001
+ <div class="payment-element" style="${s}">
4767
5002
  ${this.renderTransactionDetails()}
4768
- ${t ? w`
5003
+ ${t ? b`
4769
5004
  <div class="header">Select a payment method</div>
4770
5005
  <div class="payment-methods-list">
4771
- ${r.map((s) => {
4772
- const l = this.selectedMethod === s.id, a = !s.enabled || this.paymentLocked && !l;
4773
- return w`
5006
+ ${r.map((o) => {
5007
+ const l = this.selectedMethod === o.id, a = !o.enabled || this.paymentLocked && !l;
5008
+ return b`
4774
5009
  <div
4775
5010
  class="payment-method-item"
4776
- ${s.disabledReason ? w`data-tooltip="${s.disabledReason}"` : ""}
5011
+ ${o.disabledReason ? b`data-tooltip="${o.disabledReason}"` : ""}
4777
5012
  >
4778
5013
  <div
4779
5014
  class="method-header ${l ? "selected" : ""} ${a ? "disabled" : ""}"
4780
- @click=${() => s.enabled && this.handleMethodSelect(s.id)}
5015
+ @click=${() => o.enabled && this.handleMethodSelect(o.id)}
4781
5016
  >
4782
5017
  <input
4783
5018
  type="radio"
@@ -4786,14 +5021,14 @@ let S = class extends st {
4786
5021
  .checked=${l}
4787
5022
  ?disabled=${a}
4788
5023
  @click=${(c) => {
4789
- c.stopPropagation(), s.enabled && this.handleMethodSelect(s.id);
5024
+ c.stopPropagation(), o.enabled && this.handleMethodSelect(o.id);
4790
5025
  }}
4791
5026
  />
4792
- <span class="method-name">${n(s.id)}</span>
4793
- ${i(s.id)}
5027
+ <span class="method-name">${i(o.id)}</span>
5028
+ ${n(o.id)}
4794
5029
  </div>
4795
- ${l ? w`<div class="method-content">
4796
- ${s.id === f.CARD ? this.renderCardForm() : s.id === f.PAYNOW ? this.renderPayNowContent() : s.id === f.PROMPTPAY ? this.renderPromptPayContent() : s.id === f.DUITNOW ? this.renderDuitNowContent() : s.id === f.GOPAY ? this.renderGoPayContent() : s.id === f.BOOST ? this.renderBoostContent() : s.id === f.SHOPEEPAY ? this.renderShopeePayContent() : s.id === f.ATOM ? this.renderAtomContent() : s.id === f.DANA ? this.renderDanaContent() : s.id === f.TNG ? this.renderTngContent() : null}
5030
+ ${l ? b`<div class="method-content">
5031
+ ${o.id === f.CARD ? this.renderCardForm() : o.id === f.PAYNOW ? this.renderPayNowContent() : o.id === f.PROMPTPAY ? this.renderPromptPayContent() : o.id === f.DUITNOW ? this.renderDuitNowContent() : o.id === f.GOPAY ? this.renderGoPayContent() : o.id === f.BOOST ? this.renderBoostContent() : o.id === f.SHOPEEPAY ? this.renderShopeePayContent() : o.id === f.ATOM ? this.renderAtomContent() : o.id === f.DANA ? this.renderDanaContent() : o.id === f.TNG ? this.renderTngContent() : o.id === f.ALIPAYCN ? this.renderAlipayCNContent() : o.id === f.ALIPAYHK ? this.renderAlipayHKContent() : o.id === f.GCASH ? this.renderGCashContent() : null}
4797
5032
  </div>` : ""}
4798
5033
  </div>
4799
5034
  `;
@@ -4807,7 +5042,7 @@ let S = class extends st {
4807
5042
  `;
4808
5043
  }
4809
5044
  };
4810
- S.styles = Le`
5045
+ S.styles = Be`
4811
5046
  /* ═══════════════════════════════════════════════════════════════
4812
5047
  CSS CUSTOM PROPERTIES (Theming)
4813
5048
  ═══════════════════════════════════════════════════════════════ */
@@ -6131,108 +6366,108 @@ S.styles = Le`
6131
6366
  }
6132
6367
  `;
6133
6368
  P([
6134
- M({ type: Object })
6369
+ D({ type: Object })
6135
6370
  ], S.prototype, "config", 2);
6136
6371
  P([
6137
- M({ type: Object })
6372
+ D({ type: Object })
6138
6373
  ], S.prototype, "adapters", 2);
6139
6374
  P([
6140
- M({ type: Number })
6375
+ D({ type: Number })
6141
6376
  ], S.prototype, "amount", 2);
6142
6377
  P([
6143
- M({ type: String })
6378
+ D({ type: String })
6144
6379
  ], S.prototype, "currency", 2);
6145
6380
  P([
6146
- M({ type: String })
6381
+ D({ type: String })
6147
6382
  ], S.prototype, "orderId", 2);
6148
6383
  P([
6149
- M({ type: String })
6384
+ D({ type: String })
6150
6385
  ], S.prototype, "firstName", 2);
6151
6386
  P([
6152
- M({ type: String })
6387
+ D({ type: String })
6153
6388
  ], S.prototype, "lastName", 2);
6154
6389
  P([
6155
- M({ type: String })
6390
+ D({ type: String })
6156
6391
  ], S.prototype, "email", 2);
6157
6392
  P([
6158
- M({ type: String })
6393
+ D({ type: String })
6159
6394
  ], S.prototype, "phoneNumber", 2);
6160
6395
  P([
6161
- M({ type: Array })
6396
+ D({ type: Array })
6162
6397
  ], S.prototype, "excludePaymentMethods", 2);
6163
6398
  P([
6164
- M({ type: String })
6399
+ D({ type: String })
6165
6400
  ], S.prototype, "width", 2);
6166
6401
  P([
6167
- M({ type: String })
6402
+ D({ type: String })
6168
6403
  ], S.prototype, "maxWidth", 2);
6169
6404
  P([
6170
- M({ type: Object })
6405
+ D({ type: Object })
6171
6406
  ], S.prototype, "appearance", 2);
6172
6407
  P([
6173
- D()
6408
+ N()
6174
6409
  ], S.prototype, "currentState", 2);
6175
6410
  P([
6176
- D()
6411
+ N()
6177
6412
  ], S.prototype, "selectedMethod", 2);
6178
6413
  P([
6179
- D()
6414
+ N()
6180
6415
  ], S.prototype, "cardFormData", 2);
6181
6416
  P([
6182
- D()
6417
+ N()
6183
6418
  ], S.prototype, "formErrors", 2);
6184
6419
  P([
6185
- D()
6420
+ N()
6186
6421
  ], S.prototype, "paymentData", 2);
6187
6422
  P([
6188
- D()
6423
+ N()
6189
6424
  ], S.prototype, "feesExpanded", 2);
6190
6425
  P([
6191
- D()
6426
+ N()
6192
6427
  ], S.prototype, "isInitializing", 2);
6193
6428
  P([
6194
- D()
6429
+ N()
6195
6430
  ], S.prototype, "cardBrand", 2);
6196
6431
  P([
6197
- D()
6432
+ N()
6198
6433
  ], S.prototype, "paymentLocked", 2);
6199
6434
  P([
6200
- D()
6435
+ N()
6201
6436
  ], S.prototype, "show3DSModal", 2);
6202
6437
  P([
6203
- D()
6438
+ N()
6204
6439
  ], S.prototype, "showQRModal", 2);
6205
6440
  P([
6206
- D()
6441
+ N()
6207
6442
  ], S.prototype, "nextActionUrl", 2);
6208
6443
  P([
6209
- D()
6444
+ N()
6210
6445
  ], S.prototype, "qrCode", 2);
6211
6446
  P([
6212
- D()
6447
+ N()
6213
6448
  ], S.prototype, "qrCodeDataUrl", 2);
6214
6449
  P([
6215
- D()
6450
+ N()
6216
6451
  ], S.prototype, "qrAutoResumeTimer", 2);
6217
6452
  P([
6218
- D()
6453
+ N()
6219
6454
  ], S.prototype, "qrPollingInProgress", 2);
6220
6455
  S = P([
6221
6456
  rr("one-payment")
6222
6457
  ], S);
6223
- const bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6458
+ const wi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6224
6459
  __proto__: null,
6225
6460
  get OnePayment() {
6226
6461
  return S;
6227
6462
  }
6228
6463
  }, Symbol.toStringTag, { value: "Module" }));
6229
- function xn() {
6230
- customElements.get("one-payment") || Promise.resolve().then(() => bn).then(({ OnePayment: e }) => {
6464
+ function Pi() {
6465
+ customElements.get("one-payment") || Promise.resolve().then(() => wi).then(({ OnePayment: e }) => {
6231
6466
  customElements.define("one-payment", e);
6232
6467
  });
6233
6468
  }
6234
6469
  export {
6235
6470
  S as OnePayment,
6236
6471
  S as OnePaymentElement,
6237
- xn as defineCustomElements
6472
+ Pi as defineCustomElements
6238
6473
  };