@one-payments/web-components 1.3.0 → 1.4.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,7 +3,7 @@
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
5
  */
6
- const ye = globalThis, qe = ye.ShadowRoot && (ye.ShadyCSS === void 0 || ye.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Ve = Symbol(), Ge = /* @__PURE__ */ new WeakMap();
6
+ const ye = globalThis, qe = ye.ShadowRoot && (ye.ShadyCSS === void 0 || ye.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Ve = Symbol(), Je = /* @__PURE__ */ new WeakMap();
7
7
  let ht = class {
8
8
  constructor(e, r, n) {
9
9
  if (this._$cssResult$ = !0, n !== Ve) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
@@ -14,7 +14,7 @@ let ht = class {
14
14
  const r = this.t;
15
15
  if (qe && e === void 0) {
16
16
  const n = r !== void 0 && r.length === 1;
17
- n && (e = Ge.get(r)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), n && Ge.set(r, e));
17
+ n && (e = Je.get(r)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), n && Je.set(r, e));
18
18
  }
19
19
  return e;
20
20
  }
@@ -35,7 +35,7 @@ const Lt = (t) => new ht(typeof t == "string" ? t : t + "", void 0, Ve), Bt = (t
35
35
  const n = document.createElement("style"), i = ye.litNonce;
36
36
  i !== void 0 && n.setAttribute("nonce", i), n.textContent = r.cssText, t.appendChild(n);
37
37
  }
38
- }, We = qe ? (t) => t : (t) => t instanceof CSSStyleSheet ? ((e) => {
38
+ }, Ge = qe ? (t) => t : (t) => t instanceof CSSStyleSheet ? ((e) => {
39
39
  let r = "";
40
40
  for (const n of e.cssRules) r += n.cssText;
41
41
  return Lt(r);
@@ -45,7 +45,7 @@ const Lt = (t) => new ht(typeof t == "string" ? t : t + "", void 0, Ve), Bt = (t
45
45
  * Copyright 2017 Google LLC
46
46
  * SPDX-License-Identifier: BSD-3-Clause
47
47
  */
48
- const { is: Ut, defineProperty: zt, getOwnPropertyDescriptor: Ot, getOwnPropertyNames: qt, getOwnPropertySymbols: Vt, getPrototypeOf: Ht } = Object, O = globalThis, Xe = O.trustedTypes, Yt = Xe ? Xe.emptyScript : "", Ie = O.reactiveElementPolyfillSupport, ie = (t, e) => t, be = { toAttribute(t, e) {
48
+ const { is: Ut, defineProperty: Ot, getOwnPropertyDescriptor: zt, getOwnPropertyNames: qt, getOwnPropertySymbols: Vt, getPrototypeOf: Ht } = Object, z = globalThis, Xe = z.trustedTypes, Yt = Xe ? Xe.emptyScript : "", Ie = z.reactiveElementPolyfillSupport, ie = (t, e) => t, be = { toAttribute(t, e) {
49
49
  switch (e) {
50
50
  case Boolean:
51
51
  t = t ? Yt : null;
@@ -74,7 +74,7 @@ const { is: Ut, defineProperty: zt, getOwnPropertyDescriptor: Ot, getOwnProperty
74
74
  }
75
75
  return r;
76
76
  } }, He = (t, e) => !Ut(t, e), et = { attribute: !0, type: String, converter: be, reflect: !1, useDefault: !1, hasChanged: He };
77
- Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), O.litPropertyMetadata ?? (O.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
77
+ Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), z.litPropertyMetadata ?? (z.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
78
78
  let K = class extends HTMLElement {
79
79
  static addInitializer(e) {
80
80
  this._$Ei(), (this.l ?? (this.l = [])).push(e);
@@ -85,11 +85,11 @@ let K = class extends HTMLElement {
85
85
  static createProperty(e, r = et) {
86
86
  if (r.state && (r.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(e) && ((r = Object.create(r)).wrapped = !0), this.elementProperties.set(e, r), !r.noAccessor) {
87
87
  const n = Symbol(), i = this.getPropertyDescriptor(e, n, r);
88
- i !== void 0 && zt(this.prototype, e, i);
88
+ i !== void 0 && Ot(this.prototype, e, i);
89
89
  }
90
90
  }
91
91
  static getPropertyDescriptor(e, r, n) {
92
- const { get: i, set: o } = Ot(this.prototype, e) ?? { get() {
92
+ const { get: i, set: o } = zt(this.prototype, e) ?? { get() {
93
93
  return this[r];
94
94
  }, set(s) {
95
95
  this[r] = s;
@@ -129,8 +129,8 @@ let K = class extends HTMLElement {
129
129
  const r = [];
130
130
  if (Array.isArray(e)) {
131
131
  const n = new Set(e.flat(1 / 0).reverse());
132
- for (const i of n) r.unshift(We(i));
133
- } else e !== void 0 && r.push(We(e));
132
+ for (const i of n) r.unshift(Ge(i));
133
+ } else e !== void 0 && r.push(Ge(e));
134
134
  return r;
135
135
  }
136
136
  static _$Eu(e, r) {
@@ -278,7 +278,7 @@ let K = class extends HTMLElement {
278
278
  firstUpdated(e) {
279
279
  }
280
280
  };
281
- K.elementStyles = [], K.shadowRootOptions = { mode: "open" }, K[ie("elementProperties")] = /* @__PURE__ */ new Map(), K[ie("finalized")] = /* @__PURE__ */ new Map(), Ie == null || Ie({ ReactiveElement: K }), (O.reactiveElementVersions ?? (O.reactiveElementVersions = [])).push("2.1.1");
281
+ K.elementStyles = [], K.shadowRootOptions = { mode: "open" }, K[ie("elementProperties")] = /* @__PURE__ */ new Map(), K[ie("finalized")] = /* @__PURE__ */ new Map(), Ie == null || Ie({ ReactiveElement: K }), (z.reactiveElementVersions ?? (z.reactiveElementVersions = [])).push("2.1.1");
282
282
  /**
283
283
  * @license
284
284
  * Copyright 2017 Google LLC
@@ -286,20 +286,20 @@ K.elementStyles = [], K.shadowRootOptions = { mode: "open" }, K[ie("elementPrope
286
286
  */
287
287
  const oe = globalThis, ve = oe.trustedTypes, tt = ve ? ve.createPolicy("lit-html", { createHTML: (t) => t }) : void 0, pt = "$lit$", U = `lit$${Math.random().toFixed(9).slice(2)}$`, mt = "?" + U, jt = `<${mt}>`, Q = document, le = () => Q.createComment(""), ce = (t) => t === null || typeof t != "object" && typeof t != "function", Ye = Array.isArray, Qt = (t) => Ye(t) || typeof (t == null ? void 0 : t[Symbol.iterator]) == "function", _e = `[
288
288
  \f\r]`, ne = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, rt = /-->/g, nt = />/g, V = RegExp(`>|${_e}(?:([^\\s"'>=/]+)(${_e}*=${_e}*(?:[^
289
- \f\r"'\`<>=]|("|')|))|$)`, "g"), it = /'/g, ot = /"/g, ft = /^(?:script|style|textarea|title)$/i, Kt = (t) => (e, ...r) => ({ _$litType$: t, strings: e, values: r }), C = Kt(1), J = Symbol.for("lit-noChange"), I = Symbol.for("lit-nothing"), st = /* @__PURE__ */ new WeakMap(), H = Q.createTreeWalker(Q, 129);
289
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), it = /'/g, ot = /"/g, ft = /^(?:script|style|textarea|title)$/i, Kt = (t) => (e, ...r) => ({ _$litType$: t, strings: e, values: r }), C = Kt(1), Z = Symbol.for("lit-noChange"), _ = Symbol.for("lit-nothing"), st = /* @__PURE__ */ new WeakMap(), H = Q.createTreeWalker(Q, 129);
290
290
  function gt(t, e) {
291
291
  if (!Ye(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
292
292
  return tt !== void 0 ? tt.createHTML(e) : e;
293
293
  }
294
- const Zt = (t, e) => {
294
+ const Wt = (t, e) => {
295
295
  const r = t.length - 1, n = [];
296
296
  let i, o = e === 2 ? "<svg>" : e === 3 ? "<math>" : "", s = ne;
297
297
  for (let l = 0; l < r; l++) {
298
298
  const a = t[l];
299
- let c, d, p = -1, h = 0;
300
- for (; h < a.length && (s.lastIndex = h, d = s.exec(a), d !== null); ) h = s.lastIndex, s === ne ? d[1] === "!--" ? s = rt : d[1] !== void 0 ? s = nt : d[2] !== void 0 ? (ft.test(d[2]) && (i = RegExp("</" + d[2], "g")), s = V) : d[3] !== void 0 && (s = V) : s === V ? d[0] === ">" ? (s = i ?? ne, p = -1) : d[1] === void 0 ? p = -2 : (p = s.lastIndex - d[2].length, c = d[1], s = d[3] === void 0 ? V : d[3] === '"' ? ot : it) : s === ot || s === it ? s = V : s === rt || s === nt ? s = ne : (s = V, i = void 0);
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 === ne ? d[1] === "!--" ? s = rt : d[1] !== void 0 ? s = nt : d[2] !== void 0 ? (ft.test(d[2]) && (i = RegExp("</" + d[2], "g")), s = V) : d[3] !== void 0 && (s = V) : s === V ? d[0] === ">" ? (s = i ?? ne, h = -1) : d[1] === void 0 ? h = -2 : (h = s.lastIndex - d[2].length, c = d[1], s = d[3] === void 0 ? V : d[3] === '"' ? ot : it) : s === ot || s === it ? s = V : s === rt || s === nt ? s = ne : (s = V, i = void 0);
301
301
  const u = s === V && t[l + 1].startsWith("/>") ? " " : "";
302
- o += s === ne ? a + jt : p >= 0 ? (n.push(c), a.slice(0, p) + pt + a.slice(p) + U + u) : a + U + (p === -2 ? l : u);
302
+ o += s === ne ? a + jt : h >= 0 ? (n.push(c), a.slice(0, h) + pt + a.slice(h) + U + u) : a + U + (h === -2 ? l : u);
303
303
  }
304
304
  return [gt(t, o + (t[r] || "<?>") + (e === 2 ? "</svg>" : e === 3 ? "</math>" : "")), n];
305
305
  };
@@ -308,29 +308,29 @@ class de {
308
308
  let i;
309
309
  this.parts = [];
310
310
  let o = 0, s = 0;
311
- const l = e.length - 1, a = this.parts, [c, d] = Zt(e, r);
311
+ const l = e.length - 1, a = this.parts, [c, d] = Wt(e, r);
312
312
  if (this.el = de.createElement(c, n), H.currentNode = this.el.content, r === 2 || r === 3) {
313
- const p = this.el.content.firstChild;
314
- p.replaceWith(...p.childNodes);
313
+ const h = this.el.content.firstChild;
314
+ h.replaceWith(...h.childNodes);
315
315
  }
316
316
  for (; (i = H.nextNode()) !== null && a.length < l; ) {
317
317
  if (i.nodeType === 1) {
318
- if (i.hasAttributes()) for (const p of i.getAttributeNames()) if (p.endsWith(pt)) {
319
- const h = d[s++], u = i.getAttribute(p).split(U), m = /([.?@])?(.*)/.exec(h);
320
- a.push({ type: 1, index: o, name: m[2], strings: u, ctor: m[1] === "." ? Gt : m[1] === "?" ? Wt : m[1] === "@" ? Xt : Se }), i.removeAttribute(p);
321
- } else p.startsWith(U) && (a.push({ type: 6, index: o }), i.removeAttribute(p));
318
+ if (i.hasAttributes()) for (const h of i.getAttributeNames()) if (h.endsWith(pt)) {
319
+ const p = d[s++], u = i.getAttribute(h).split(U), m = /([.?@])?(.*)/.exec(p);
320
+ a.push({ type: 1, index: o, name: m[2], strings: u, ctor: m[1] === "." ? Jt : m[1] === "?" ? Gt : m[1] === "@" ? Xt : Se }), i.removeAttribute(h);
321
+ } else h.startsWith(U) && (a.push({ type: 6, index: o }), i.removeAttribute(h));
322
322
  if (ft.test(i.tagName)) {
323
- const p = i.textContent.split(U), h = p.length - 1;
324
- if (h > 0) {
323
+ const h = i.textContent.split(U), p = h.length - 1;
324
+ if (p > 0) {
325
325
  i.textContent = ve ? ve.emptyScript : "";
326
- for (let u = 0; u < h; u++) i.append(p[u], le()), H.nextNode(), a.push({ type: 2, index: ++o });
327
- i.append(p[h], le());
326
+ for (let u = 0; u < p; u++) i.append(h[u], le()), H.nextNode(), a.push({ type: 2, index: ++o });
327
+ i.append(h[p], le());
328
328
  }
329
329
  }
330
330
  } else if (i.nodeType === 8) if (i.data === mt) a.push({ type: 2, index: o });
331
331
  else {
332
- let p = -1;
333
- for (; (p = i.data.indexOf(U, p + 1)) !== -1; ) a.push({ type: 7, index: o }), p += U.length - 1;
332
+ let h = -1;
333
+ for (; (h = i.data.indexOf(U, h + 1)) !== -1; ) a.push({ type: 7, index: o }), h += U.length - 1;
334
334
  }
335
335
  o++;
336
336
  }
@@ -340,14 +340,14 @@ class de {
340
340
  return n.innerHTML = e, n;
341
341
  }
342
342
  }
343
- function G(t, e, r = t, n) {
343
+ function J(t, e, r = t, n) {
344
344
  var s, l;
345
- if (e === J) return e;
345
+ if (e === Z) return e;
346
346
  let i = n !== void 0 ? (s = r._$Co) == null ? void 0 : s[n] : r._$Cl;
347
347
  const o = ce(e) ? void 0 : e._$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(t), i._$AT(t, r, n)), n !== void 0 ? (r._$Co ?? (r._$Co = []))[n] = i : r._$Cl = i), i !== void 0 && (e = G(t, i._$AS(t, e.values), i, n)), e;
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(t), i._$AT(t, r, n)), n !== void 0 ? (r._$Co ?? (r._$Co = []))[n] = i : r._$Cl = i), i !== void 0 && (e = J(t, i._$AS(t, e.values), i, n)), e;
349
349
  }
350
- class Jt {
350
+ class Zt {
351
351
  constructor(e, r) {
352
352
  this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = r;
353
353
  }
@@ -381,7 +381,7 @@ class he {
381
381
  return ((e = this._$AM) == null ? void 0 : e._$AU) ?? this._$Cv;
382
382
  }
383
383
  constructor(e, r, n, i) {
384
- this.type = 2, this._$AH = I, this._$AN = void 0, this._$AA = e, this._$AB = r, this._$AM = n, this.options = i, this._$Cv = (i == null ? void 0 : i.isConnected) ?? !0;
384
+ this.type = 2, this._$AH = _, this._$AN = void 0, this._$AA = e, this._$AB = r, this._$AM = n, this.options = i, this._$Cv = (i == null ? void 0 : i.isConnected) ?? !0;
385
385
  }
386
386
  get parentNode() {
387
387
  let e = this._$AA.parentNode;
@@ -395,7 +395,7 @@ class he {
395
395
  return this._$AB;
396
396
  }
397
397
  _$AI(e, r = this) {
398
- e = G(this, e, r), ce(e) ? e === I || e == null || e === "" ? (this._$AH !== I && this._$AR(), this._$AH = I) : e !== this._$AH && e !== J && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : Qt(e) ? this.k(e) : this._(e);
398
+ e = J(this, e, r), ce(e) ? e === _ || e == null || e === "" ? (this._$AH !== _ && this._$AR(), this._$AH = _) : e !== this._$AH && e !== Z && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : Qt(e) ? this.k(e) : this._(e);
399
399
  }
400
400
  O(e) {
401
401
  return this._$AA.parentNode.insertBefore(e, this._$AB);
@@ -404,14 +404,14 @@ class he {
404
404
  this._$AH !== e && (this._$AR(), this._$AH = this.O(e));
405
405
  }
406
406
  _(e) {
407
- this._$AH !== I && ce(this._$AH) ? this._$AA.nextSibling.data = e : this.T(Q.createTextNode(e)), this._$AH = e;
407
+ this._$AH !== _ && ce(this._$AH) ? this._$AA.nextSibling.data = e : this.T(Q.createTextNode(e)), this._$AH = e;
408
408
  }
409
409
  $(e) {
410
410
  var o;
411
411
  const { values: r, _$litType$: n } = e, i = typeof n == "number" ? this._$AC(e) : (n.el === void 0 && (n.el = de.createElement(gt(n.h, n.h[0]), this.options)), n);
412
412
  if (((o = this._$AH) == null ? void 0 : o._$AD) === i) this._$AH.p(r);
413
413
  else {
414
- const s = new Jt(i, this), l = s.u(this.options);
414
+ const s = new Zt(i, this), l = s.u(this.options);
415
415
  s.p(r), this.T(l), this._$AH = s;
416
416
  }
417
417
  }
@@ -446,37 +446,37 @@ class Se {
446
446
  return this._$AM._$AU;
447
447
  }
448
448
  constructor(e, r, n, i, o) {
449
- this.type = 1, this._$AH = I, this._$AN = void 0, this.element = e, 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;
449
+ this.type = 1, this._$AH = _, this._$AN = void 0, this.element = e, 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 = _;
450
450
  }
451
451
  _$AI(e, r = this, n, i) {
452
452
  const o = this.strings;
453
453
  let s = !1;
454
- if (o === void 0) e = G(this, e, r, 0), s = !ce(e) || e !== this._$AH && e !== J, s && (this._$AH = e);
454
+ if (o === void 0) e = J(this, e, r, 0), s = !ce(e) || e !== this._$AH && e !== Z, s && (this._$AH = e);
455
455
  else {
456
456
  const l = e;
457
457
  let a, c;
458
- for (e = o[0], a = 0; a < o.length - 1; a++) c = G(this, l[n + a], r, a), c === J && (c = this._$AH[a]), s || (s = !ce(c) || c !== this._$AH[a]), c === I ? e = I : e !== I && (e += (c ?? "") + o[a + 1]), this._$AH[a] = c;
458
+ for (e = o[0], a = 0; a < o.length - 1; a++) c = J(this, l[n + a], r, a), c === Z && (c = this._$AH[a]), s || (s = !ce(c) || c !== this._$AH[a]), c === _ ? e = _ : e !== _ && (e += (c ?? "") + o[a + 1]), this._$AH[a] = c;
459
459
  }
460
460
  s && !i && this.j(e);
461
461
  }
462
462
  j(e) {
463
- e === I ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
463
+ e === _ ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
464
464
  }
465
465
  }
466
- class Gt extends Se {
466
+ class Jt extends Se {
467
467
  constructor() {
468
468
  super(...arguments), this.type = 3;
469
469
  }
470
470
  j(e) {
471
- this.element[this.name] = e === I ? void 0 : e;
471
+ this.element[this.name] = e === _ ? void 0 : e;
472
472
  }
473
473
  }
474
- class Wt extends Se {
474
+ class Gt extends Se {
475
475
  constructor() {
476
476
  super(...arguments), this.type = 4;
477
477
  }
478
478
  j(e) {
479
- this.element.toggleAttribute(this.name, !!e && e !== I);
479
+ this.element.toggleAttribute(this.name, !!e && e !== _);
480
480
  }
481
481
  }
482
482
  class Xt extends Se {
@@ -484,8 +484,8 @@ class Xt extends Se {
484
484
  super(e, r, n, i, o), this.type = 5;
485
485
  }
486
486
  _$AI(e, r = this) {
487
- if ((e = G(this, e, r, 0) ?? I) === J) return;
488
- const n = this._$AH, i = e === I && n !== I || e.capture !== n.capture || e.once !== n.once || e.passive !== n.passive, o = e !== I && (n === I || i);
487
+ if ((e = J(this, e, r, 0) ?? _) === Z) return;
488
+ const n = this._$AH, i = e === _ && n !== _ || e.capture !== n.capture || e.once !== n.once || e.passive !== n.passive, o = e !== _ && (n === _ || i);
489
489
  i && this.element.removeEventListener(this.name, this, n), o && this.element.addEventListener(this.name, this, e), this._$AH = e;
490
490
  }
491
491
  handleEvent(e) {
@@ -501,7 +501,7 @@ class er {
501
501
  return this._$AM._$AU;
502
502
  }
503
503
  _$AI(e) {
504
- G(this, e);
504
+ J(this, e);
505
505
  }
506
506
  }
507
507
  const Me = oe.litHtmlPolyfillSupport;
@@ -543,7 +543,7 @@ class se extends K {
543
543
  super.disconnectedCallback(), (e = this._$Do) == null || e.setConnected(!1);
544
544
  }
545
545
  render() {
546
- return J;
546
+ return Z;
547
547
  }
548
548
  }
549
549
  var ut;
@@ -598,17 +598,18 @@ function D(t) {
598
598
  * Copyright 2017 Google LLC
599
599
  * SPDX-License-Identifier: BSD-3-Clause
600
600
  */
601
- function _(t) {
601
+ function M(t) {
602
602
  return D({ ...t, state: !0, attribute: !1 });
603
603
  }
604
604
  function or(t) {
605
605
  return t instanceof Error && ("response" in t && typeof t.response == "object" && t.response !== null || "data" in t && typeof t.data == "object" && t.data !== null);
606
606
  }
607
- var M = {
607
+ var A = {
608
608
  CARD: "card",
609
609
  PAYNOW: "paynow",
610
- PROMPTPAY: "promptpay"
611
- }, $ = {
610
+ PROMPTPAY: "promptpay",
611
+ DUITNOW: "duitnow"
612
+ }, N = {
612
613
  IDLE: "idle",
613
614
  INITIALIZING: "initializing",
614
615
  READY: "ready",
@@ -755,7 +756,7 @@ function lr(t) {
755
756
  var cr = class {
756
757
  // Flag to ignore qrCode after user scans it
757
758
  constructor(t, e) {
758
- this.state = { status: $.IDLE }, this.subscribers = /* @__PURE__ */ new Set(), this.eventListeners = {}, this.paymentToken = null, this.paymentIntentId = null, this.pollingService = null, this.ignore3DSInPolling = !1, this.ignoreQRInPolling = !1, this.config = t, this.adapters = e;
759
+ this.state = { status: N.IDLE }, this.subscribers = /* @__PURE__ */ new Set(), this.eventListeners = {}, this.paymentToken = null, this.paymentIntentId = null, this.pollingService = null, this.ignore3DSInPolling = !1, this.ignoreQRInPolling = !1, this.config = t, this.adapters = e;
759
760
  }
760
761
  /**
761
762
  * Get the API base URL - uses apiBaseUrl if provided, otherwise derives from environment
@@ -910,7 +911,7 @@ var cr = class {
910
911
  * @public
911
912
  */
912
913
  async initialize(t) {
913
- this.setState({ status: $.INITIALIZING }), this.emit({
914
+ this.setState({ status: N.INITIALIZING }), this.emit({
914
915
  type: "initialize",
915
916
  payload: t
916
917
  });
@@ -945,27 +946,31 @@ var cr = class {
945
946
  id: this.paymentIntentId,
946
947
  amount: l.result.customerAmount || t.amount,
947
948
  currency: l.result.currency || t.currency,
948
- status: $.READY,
949
+ status: N.READY,
949
950
  ...t.metadata && { metadata: t.metadata }
950
951
  }, d = [];
951
- let p = 0;
952
- return a.result.paymentMethods.forEach((h) => {
953
- const u = h.type.toLowerCase(), m = h.capabilities || [];
952
+ let h = 0;
953
+ return a.result.paymentMethods.forEach((p) => {
954
+ const u = p.type.toLowerCase(), m = p.capabilities || [];
954
955
  u.includes("card") && d.push({
955
956
  id: "card",
956
957
  enabled: !0,
957
- priority: p++
958
+ priority: h++
958
959
  }), (u.includes("paynow") || m.includes("payments_pay_now")) && d.push({
959
960
  id: "paynow",
960
961
  enabled: !0,
961
- priority: p++
962
+ priority: h++
962
963
  }), (u.includes("promptpay") || u.includes("prompt pay") || m.includes("payments_prompt_pay")) && d.push({
963
964
  id: "promptpay",
964
965
  enabled: !0,
965
- priority: p++
966
+ priority: h++
967
+ }), (u.includes("duitnow") || u.includes("duit now") || m.includes("payments_duit_now")) && d.push({
968
+ id: "duitnow",
969
+ enabled: !0,
970
+ priority: h++
966
971
  });
967
972
  }), this.setState({
968
- status: $.READY,
973
+ status: N.READY,
969
974
  paymentIntent: c,
970
975
  availableMethods: d
971
976
  }), this.emit({
@@ -982,7 +987,7 @@ var cr = class {
982
987
  timestamp: this.adapters.timer.now()
983
988
  };
984
989
  throw this.setState({
985
- status: $.FAILED,
990
+ status: N.FAILED,
986
991
  error: r
987
992
  }), this.emit({
988
993
  type: "payment_failed",
@@ -1050,7 +1055,7 @@ var cr = class {
1050
1055
  if (!this.paymentToken)
1051
1056
  throw new Error("Cannot submit payment: No payment token available");
1052
1057
  this.ignore3DSInPolling = !1, this.ignoreQRInPolling = !1, this.setState({
1053
- status: $.PROCESSING,
1058
+ status: N.PROCESSING,
1054
1059
  paymentIntent: r.paymentIntent,
1055
1060
  selectedMethod: t,
1056
1061
  availableMethods: r.availableMethods
@@ -1074,7 +1079,7 @@ var cr = class {
1074
1079
  expiryYear: String(e.expiryYear),
1075
1080
  cvc: String(e.cvv)
1076
1081
  }
1077
- } : t === "promptpay" ? { type: "prompt_pay" } : { type: "qr" }
1082
+ } : t === "promptpay" ? { type: "prompt_pay" } : t === "duitnow" ? { type: "duit_now" } : { type: "qr" }
1078
1083
  // PayNow
1079
1084
  };
1080
1085
  return await this.adapters.http.patch(
@@ -1087,33 +1092,33 @@ var cr = class {
1087
1092
  id: this.paymentIntentId || "",
1088
1093
  amount: r.paymentIntent.amount,
1089
1094
  currency: r.paymentIntent.currency,
1090
- status: $.PROCESSING
1095
+ status: N.PROCESSING
1091
1096
  };
1092
1097
  } catch (a) {
1093
1098
  let c = "Unknown error", d = "PAYMENT_FAILED";
1094
1099
  if (a instanceof Error)
1095
1100
  try {
1096
1101
  if (or(a)) {
1097
- const h = (n = a.response) == null ? void 0 : n.data, u = a.data;
1098
- h ? (c = h.message || ((i = h.error) == null ? void 0 : i.message) || a.message, d = h.code || ((o = h.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;
1102
+ const p = (n = a.response) == null ? void 0 : n.data, u = a.data;
1103
+ 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;
1099
1104
  } else
1100
1105
  c = a.message;
1101
1106
  } catch {
1102
1107
  c = a.message;
1103
1108
  }
1104
- const p = {
1109
+ const h = {
1105
1110
  code: d,
1106
1111
  message: c,
1107
1112
  timestamp: this.adapters.timer.now()
1108
1113
  };
1109
1114
  throw this.setState({
1110
- status: $.FAILED,
1111
- error: p,
1115
+ status: N.FAILED,
1116
+ error: h,
1112
1117
  paymentIntent: r.paymentIntent
1113
1118
  }), this.emit({
1114
1119
  type: "payment_failed",
1115
1120
  payload: {
1116
- error: p,
1121
+ error: h,
1117
1122
  paymentIntent: r.paymentIntent
1118
1123
  }
1119
1124
  }), a;
@@ -1261,6 +1266,16 @@ var cr = class {
1261
1266
  });
1262
1267
  return;
1263
1268
  }
1269
+ if (e.selectedMethod === "duitnow") {
1270
+ this.stopPolling(), this.emit({
1271
+ type: "duitnow_redirect",
1272
+ payload: {
1273
+ redirectUrl: t.nextActionUrl,
1274
+ methodId: e.selectedMethod
1275
+ }
1276
+ });
1277
+ return;
1278
+ }
1264
1279
  if (e.selectedMethod === "paynow" && !this.ignoreQRInPolling) {
1265
1280
  this.emit({
1266
1281
  type: "qr_code_received",
@@ -1276,11 +1291,11 @@ var cr = class {
1276
1291
  id: t.paymentIntentId,
1277
1292
  amount: t.amount ?? e.paymentIntent.amount,
1278
1293
  currency: t.currency ?? e.paymentIntent.currency,
1279
- status: $.REQUIRES_ACTION,
1294
+ status: N.REQUIRES_ACTION,
1280
1295
  ...t.metadata && { metadata: t.metadata }
1281
1296
  };
1282
1297
  this.setState({
1283
- status: $.REQUIRES_ACTION,
1298
+ status: N.REQUIRES_ACTION,
1284
1299
  paymentIntent: n,
1285
1300
  actionUrl: t.nextActionUrl,
1286
1301
  selectedMethod: e.selectedMethod,
@@ -1304,7 +1319,7 @@ var cr = class {
1304
1319
  };
1305
1320
  if (t.status === "succeeded")
1306
1321
  this.stopPolling(), this.setState({
1307
- status: $.SUCCEEDED,
1322
+ status: N.SUCCEEDED,
1308
1323
  paymentIntent: r,
1309
1324
  selectedMethod: e.selectedMethod
1310
1325
  }), this.emit({
@@ -1322,7 +1337,7 @@ var cr = class {
1322
1337
  timestamp: this.adapters.timer.now()
1323
1338
  };
1324
1339
  this.setState({
1325
- status: $.FAILED,
1340
+ status: N.FAILED,
1326
1341
  error: i,
1327
1342
  paymentIntent: r
1328
1343
  }), this.emit({
@@ -1358,7 +1373,7 @@ var cr = class {
1358
1373
  r(t);
1359
1374
  });
1360
1375
  }
1361
- }, 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", Z = typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Y = function(t, e, r, n, i, o, s, l, a, c) {
1376
+ }, 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", W = typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Y = function(t, e, r, n, i, o, s, l, a, c) {
1362
1377
  var d = this;
1363
1378
  d.numeralDecimalMark = t || ".", d.numeralIntegerScale = e > 0 ? e : 0, d.numeralDecimalScale = r >= 0 ? r : 2, d.numeralThousandsGroupStyle = n || Y.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") : "";
1364
1379
  };
@@ -1388,7 +1403,7 @@ Y.prototype = {
1388
1403
  return e.tailPrefix ? n + o.toString() + (e.numeralDecimalScale > 0 ? s.toString() : "") + e.prefix : i + o.toString() + (e.numeralDecimalScale > 0 ? s.toString() : "");
1389
1404
  }
1390
1405
  };
1391
- var hr = Y, yt = function(t, e, r) {
1406
+ var pr = Y, yt = function(t, e, r) {
1392
1407
  var n = this;
1393
1408
  n.date = [], n.blocks = [], n.datePattern = t, n.dateMin = e.split("-").reverse().map(function(i) {
1394
1409
  return parseInt(i, 10);
@@ -1428,8 +1443,8 @@ yt.prototype = {
1428
1443
  }), this.getFixedDateString(r);
1429
1444
  },
1430
1445
  getFixedDateString: function(t) {
1431
- var e = this, r = e.datePattern, n = [], i = 0, o = 0, s = 0, l = 0, a = 0, c = 0, d, p, h, u = !1;
1432
- t.length === 4 && r[0].toLowerCase() !== "y" && r[1].toLowerCase() !== "y" && (l = r[0] === "d" ? 0 : 2, a = 2 - l, d = parseInt(t.slice(l, l + 2), 10), p = parseInt(t.slice(a, a + 2), 10), n = this.getFixedDate(d, p, 0)), t.length === 8 && (r.forEach(function(y, P) {
1446
+ var e = this, r = e.datePattern, n = [], i = 0, o = 0, s = 0, l = 0, a = 0, c = 0, d, h, p, u = !1;
1447
+ t.length === 4 && r[0].toLowerCase() !== "y" && r[1].toLowerCase() !== "y" && (l = r[0] === "d" ? 0 : 2, a = 2 - l, d = parseInt(t.slice(l, l + 2), 10), h = parseInt(t.slice(a, a + 2), 10), n = this.getFixedDate(d, h, 0)), t.length === 8 && (r.forEach(function(y, P) {
1433
1448
  switch (y) {
1434
1449
  case "d":
1435
1450
  i = P;
@@ -1441,7 +1456,7 @@ yt.prototype = {
1441
1456
  s = P;
1442
1457
  break;
1443
1458
  }
1444
- }), c = s * 2, l = i <= s ? i * 2 : i * 2 + 2, a = o <= s ? o * 2 : o * 2 + 2, d = parseInt(t.slice(l, l + 2), 10), p = parseInt(t.slice(a, a + 2), 10), h = parseInt(t.slice(c, c + 4), 10), u = t.slice(c, c + 4).length === 4, n = this.getFixedDate(d, p, h)), t.length === 4 && (r[0] === "y" || r[1] === "y") && (a = r[0] === "m" ? 0 : 2, c = 2 - a, p = parseInt(t.slice(a, a + 2), 10), h = parseInt(t.slice(c, c + 2), 10), u = t.slice(c, c + 2).length === 2, n = [0, p, h]), t.length === 6 && (r[0] === "Y" || r[1] === "Y") && (a = r[0] === "m" ? 0 : 4, c = 2 - 0.5 * a, p = parseInt(t.slice(a, a + 2), 10), h = parseInt(t.slice(c, c + 4), 10), u = t.slice(c, c + 4).length === 4, n = [0, p, h]), n = e.getRangeFixedDate(n), e.date = n;
1459
+ }), c = s * 2, l = i <= s ? i * 2 : i * 2 + 2, a = o <= s ? o * 2 : o * 2 + 2, d = parseInt(t.slice(l, l + 2), 10), h = parseInt(t.slice(a, a + 2), 10), p = parseInt(t.slice(c, c + 4), 10), u = t.slice(c, c + 4).length === 4, n = this.getFixedDate(d, h, p)), t.length === 4 && (r[0] === "y" || r[1] === "y") && (a = r[0] === "m" ? 0 : 2, c = 2 - a, h = parseInt(t.slice(a, a + 2), 10), p = parseInt(t.slice(c, c + 2), 10), u = t.slice(c, c + 2).length === 2, n = [0, h, p]), t.length === 6 && (r[0] === "Y" || r[1] === "Y") && (a = r[0] === "m" ? 0 : 4, c = 2 - 0.5 * a, h = parseInt(t.slice(a, a + 2), 10), p = parseInt(t.slice(c, c + 4), 10), u = t.slice(c, c + 4).length === 4, n = [0, h, p]), n = e.getRangeFixedDate(n), e.date = n;
1445
1460
  var m = n.length === 0 ? t : r.reduce(function(y, P) {
1446
1461
  switch (P) {
1447
1462
  case "d":
@@ -1475,7 +1490,7 @@ yt.prototype = {
1475
1490
  return e ? (t < 10 ? "000" : t < 100 ? "00" : t < 1e3 ? "0" : "") + t : (t < 10 ? "0" : "") + t;
1476
1491
  }
1477
1492
  };
1478
- var pr = yt, bt = function(t, e) {
1493
+ var mr = yt, bt = function(t, e) {
1479
1494
  var r = this;
1480
1495
  r.time = [], r.blocks = [], r.timePattern = t, r.timeFormat = e, r.initBlocks();
1481
1496
  };
@@ -1528,7 +1543,7 @@ bt.prototype = {
1528
1543
  }), this.getFixedTimeString(r);
1529
1544
  },
1530
1545
  getFixedTimeString: function(t) {
1531
- var e = this, r = e.timePattern, n = [], i = 0, o = 0, s = 0, l = 0, a = 0, c = 0, d, p, h;
1546
+ var e = this, r = e.timePattern, n = [], i = 0, o = 0, s = 0, l = 0, a = 0, c = 0, d, h, p;
1532
1547
  return t.length === 6 && (r.forEach(function(u, m) {
1533
1548
  switch (u) {
1534
1549
  case "s":
@@ -1541,7 +1556,7 @@ bt.prototype = {
1541
1556
  s = m * 2;
1542
1557
  break;
1543
1558
  }
1544
- }), c = s, a = o, l = i, d = parseInt(t.slice(l, l + 2), 10), p = parseInt(t.slice(a, a + 2), 10), h = parseInt(t.slice(c, c + 2), 10), n = this.getFixedTime(h, p, d)), t.length === 4 && e.timePattern.indexOf("s") < 0 && (r.forEach(function(u, m) {
1559
+ }), c = s, a = o, l = i, d = parseInt(t.slice(l, l + 2), 10), h = parseInt(t.slice(a, a + 2), 10), p = parseInt(t.slice(c, c + 2), 10), n = this.getFixedTime(p, h, d)), t.length === 4 && e.timePattern.indexOf("s") < 0 && (r.forEach(function(u, m) {
1545
1560
  switch (u) {
1546
1561
  case "m":
1547
1562
  o = m * 2;
@@ -1550,7 +1565,7 @@ bt.prototype = {
1550
1565
  s = m * 2;
1551
1566
  break;
1552
1567
  }
1553
- }), c = s, a = o, d = 0, p = parseInt(t.slice(a, a + 2), 10), h = parseInt(t.slice(c, c + 2), 10), n = this.getFixedTime(h, p, d)), e.time = n, n.length === 0 ? t : r.reduce(function(u, m) {
1568
+ }), c = s, a = o, d = 0, h = parseInt(t.slice(a, a + 2), 10), p = parseInt(t.slice(c, c + 2), 10), n = this.getFixedTime(p, h, d)), e.time = n, n.length === 0 ? t : r.reduce(function(u, m) {
1554
1569
  switch (m) {
1555
1570
  case "s":
1556
1571
  return u + e.addLeadingZero(n[2]);
@@ -1568,7 +1583,7 @@ bt.prototype = {
1568
1583
  return (t < 10 ? "0" : "") + t;
1569
1584
  }
1570
1585
  };
1571
- var mr = bt, vt = function(t, e) {
1586
+ var fr = bt, vt = function(t, e) {
1572
1587
  var r = this;
1573
1588
  r.delimiter = e || e === "" ? e : " ", r.delimiterRE = e ? new RegExp("\\" + e, "g") : "", r.formatter = t;
1574
1589
  };
@@ -1584,7 +1599,7 @@ vt.prototype = {
1584
1599
  return r = r.replace(/[()]/g, ""), r = r.replace(/[\s-]/g, e.delimiter), r;
1585
1600
  }
1586
1601
  };
1587
- var fr = vt, Be = {
1602
+ var gr = vt, Be = {
1588
1603
  blocks: {
1589
1604
  uatp: [4, 5, 6],
1590
1605
  amex: [4, 6, 5],
@@ -1651,7 +1666,7 @@ var fr = vt, Be = {
1651
1666
  blocks: e ? this.getStrictBlocks(r.general) : r.general
1652
1667
  };
1653
1668
  }
1654
- }, gr = Be, yr = {
1669
+ }, yr = Be, br = {
1655
1670
  noop: function() {
1656
1671
  },
1657
1672
  strip: function(t, e) {
@@ -1727,8 +1742,8 @@ var fr = vt, Be = {
1727
1742
  var s = "", l = i.length > 0, a = "";
1728
1743
  return r === 0 ? t : (e.forEach(function(c, d) {
1729
1744
  if (t.length > 0) {
1730
- var p = t.slice(0, c), h = t.slice(c);
1731
- l ? a = i[o ? d - 1 : d] || a : a = n, o ? (d > 0 && (s += a), s += p) : (s += p, p.length === c && d < r - 1 && (s += a)), t = h;
1745
+ var h = t.slice(0, c), p = t.slice(c);
1746
+ 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)), t = p;
1732
1747
  }
1733
1748
  }), s);
1734
1749
  },
@@ -1780,15 +1795,15 @@ var fr = vt, Be = {
1780
1795
  isAndroidBackspaceKeydown: function(t, e) {
1781
1796
  return !this.isAndroid() || !t || !e ? !1 : e === t.slice(0, -1);
1782
1797
  }
1783
- }, br = yr, vr = {
1798
+ }, vr = br, wr = {
1784
1799
  // Maybe change to object-assign
1785
1800
  // for now just keep it as simple
1786
1801
  assign: function(t, e) {
1787
1802
  return t = t || {}, e = e || {}, t.creditCard = !!e.creditCard, t.creditCardStrictMode = !!e.creditCardStrictMode, t.creditCardType = "", t.onCreditCardTypeChanged = e.onCreditCardTypeChanged || function() {
1788
- }, t.phone = !!e.phone, t.phoneRegionCode = e.phoneRegionCode || "AU", t.phoneFormatter = {}, t.time = !!e.time, t.timePattern = e.timePattern || ["h", "m", "s"], t.timeFormat = e.timeFormat || "24", t.timeFormatter = {}, t.date = !!e.date, t.datePattern = e.datePattern || ["d", "m", "Y"], t.dateMin = e.dateMin || "", t.dateMax = e.dateMax || "", t.dateFormatter = {}, t.numeral = !!e.numeral, t.numeralIntegerScale = e.numeralIntegerScale > 0 ? e.numeralIntegerScale : 0, t.numeralDecimalScale = e.numeralDecimalScale >= 0 ? e.numeralDecimalScale : 2, t.numeralDecimalMark = e.numeralDecimalMark || ".", t.numeralThousandsGroupStyle = e.numeralThousandsGroupStyle || "thousand", t.numeralPositiveOnly = !!e.numeralPositiveOnly, t.stripLeadingZeroes = e.stripLeadingZeroes !== !1, t.signBeforePrefix = !!e.signBeforePrefix, t.tailPrefix = !!e.tailPrefix, t.swapHiddenInput = !!e.swapHiddenInput, t.numericOnly = t.creditCard || t.date || !!e.numericOnly, t.uppercase = !!e.uppercase, t.lowercase = !!e.lowercase, t.prefix = t.creditCard || t.date ? "" : e.prefix || "", t.noImmediatePrefix = !!e.noImmediatePrefix, t.prefixLength = t.prefix.length, t.rawValueTrimPrefix = !!e.rawValueTrimPrefix, t.copyDelimiter = !!e.copyDelimiter, t.initValue = e.initValue !== void 0 && e.initValue !== null ? e.initValue.toString() : "", t.delimiter = e.delimiter || e.delimiter === "" ? e.delimiter : e.date ? "/" : e.time ? ":" : e.numeral ? "," : (e.phone, " "), t.delimiterLength = t.delimiter.length, t.delimiterLazyShow = !!e.delimiterLazyShow, t.delimiters = e.delimiters || [], t.blocks = e.blocks || [], t.blocksLength = t.blocks.length, t.root = typeof Z == "object" && Z ? Z : window, t.document = e.document || t.root.document, t.maxLength = 0, t.backspace = !1, t.result = "", t.onValueChanged = e.onValueChanged || function() {
1803
+ }, t.phone = !!e.phone, t.phoneRegionCode = e.phoneRegionCode || "AU", t.phoneFormatter = {}, t.time = !!e.time, t.timePattern = e.timePattern || ["h", "m", "s"], t.timeFormat = e.timeFormat || "24", t.timeFormatter = {}, t.date = !!e.date, t.datePattern = e.datePattern || ["d", "m", "Y"], t.dateMin = e.dateMin || "", t.dateMax = e.dateMax || "", t.dateFormatter = {}, t.numeral = !!e.numeral, t.numeralIntegerScale = e.numeralIntegerScale > 0 ? e.numeralIntegerScale : 0, t.numeralDecimalScale = e.numeralDecimalScale >= 0 ? e.numeralDecimalScale : 2, t.numeralDecimalMark = e.numeralDecimalMark || ".", t.numeralThousandsGroupStyle = e.numeralThousandsGroupStyle || "thousand", t.numeralPositiveOnly = !!e.numeralPositiveOnly, t.stripLeadingZeroes = e.stripLeadingZeroes !== !1, t.signBeforePrefix = !!e.signBeforePrefix, t.tailPrefix = !!e.tailPrefix, t.swapHiddenInput = !!e.swapHiddenInput, t.numericOnly = t.creditCard || t.date || !!e.numericOnly, t.uppercase = !!e.uppercase, t.lowercase = !!e.lowercase, t.prefix = t.creditCard || t.date ? "" : e.prefix || "", t.noImmediatePrefix = !!e.noImmediatePrefix, t.prefixLength = t.prefix.length, t.rawValueTrimPrefix = !!e.rawValueTrimPrefix, t.copyDelimiter = !!e.copyDelimiter, t.initValue = e.initValue !== void 0 && e.initValue !== null ? e.initValue.toString() : "", t.delimiter = e.delimiter || e.delimiter === "" ? e.delimiter : e.date ? "/" : e.time ? ":" : e.numeral ? "," : (e.phone, " "), t.delimiterLength = t.delimiter.length, t.delimiterLazyShow = !!e.delimiterLazyShow, t.delimiters = e.delimiters || [], t.blocks = e.blocks || [], t.blocksLength = t.blocks.length, t.root = typeof W == "object" && W ? W : window, t.document = e.document || t.root.document, t.maxLength = 0, t.backspace = !1, t.result = "", t.onValueChanged = e.onValueChanged || function() {
1789
1804
  }, t;
1790
1805
  }
1791
- }, wr = vr, x = function(t, e) {
1806
+ }, xr = wr, x = function(t, e) {
1792
1807
  var r = this, n = !1;
1793
1808
  if (typeof t == "string" ? (r.element = document.querySelector(t), n = document.querySelectorAll(t).length > 1) : typeof t.length < "u" && t.length > 0 ? (r.element = t[0], n = t.length > 1) : r.element = t, !r.element)
1794
1809
  throw new Error("[cleave.js] Please check the element");
@@ -1959,19 +1974,19 @@ x.prototype = {
1959
1974
  return "[Cleave Object]";
1960
1975
  }
1961
1976
  };
1962
- x.NumeralFormatter = hr;
1963
- x.DateFormatter = pr;
1964
- x.TimeFormatter = mr;
1965
- x.PhoneFormatter = fr;
1966
- x.CreditCardDetector = gr;
1967
- x.Util = br;
1968
- x.DefaultProperties = wr;
1969
- (typeof Z == "object" && Z ? Z : window).Cleave = x;
1970
- var at = x, pe = {}, xr = function() {
1977
+ x.NumeralFormatter = pr;
1978
+ x.DateFormatter = mr;
1979
+ x.TimeFormatter = fr;
1980
+ x.PhoneFormatter = gr;
1981
+ x.CreditCardDetector = yr;
1982
+ x.Util = vr;
1983
+ x.DefaultProperties = xr;
1984
+ (typeof W == "object" && W ? W : window).Cleave = x;
1985
+ var at = x, pe = {}, Sr = function() {
1971
1986
  return typeof Promise == "function" && Promise.prototype && Promise.prototype.then;
1972
1987
  }, wt = {}, T = {};
1973
1988
  let je;
1974
- const Sr = [
1989
+ const kr = [
1975
1990
  0,
1976
1991
  // Not used
1977
1992
  26,
@@ -2021,7 +2036,7 @@ T.getSymbolSize = function(e) {
2021
2036
  return e * 4 + 17;
2022
2037
  };
2023
2038
  T.getSymbolTotalCodewords = function(e) {
2024
- return Sr[e];
2039
+ return kr[e];
2025
2040
  };
2026
2041
  T.getBCHDigit = function(t) {
2027
2042
  let e = 0;
@@ -2095,7 +2110,7 @@ xt.prototype = {
2095
2110
  this.buffer.length <= e && this.buffer.push(0), t && (this.buffer[e] |= 128 >>> this.length % 8), this.length++;
2096
2111
  }
2097
2112
  };
2098
- var kr = xt;
2113
+ var Cr = xt;
2099
2114
  function me(t) {
2100
2115
  if (!t || t < 1)
2101
2116
  throw new Error("BitMatrix size must be defined and greater than 0");
@@ -2114,7 +2129,7 @@ me.prototype.xor = function(t, e, r) {
2114
2129
  me.prototype.isReserved = function(t, e) {
2115
2130
  return this.reservedBit[t * this.size + e];
2116
2131
  };
2117
- var Cr = me, St = {};
2132
+ var Pr = me, St = {};
2118
2133
  (function(t) {
2119
2134
  const e = T.getSymbolSize;
2120
2135
  t.getRowColCoords = function(n) {
@@ -2134,9 +2149,9 @@ var Cr = me, St = {};
2134
2149
  };
2135
2150
  })(St);
2136
2151
  var kt = {};
2137
- const Pr = T.getSymbolSize, lt = 7;
2152
+ const Er = T.getSymbolSize, lt = 7;
2138
2153
  kt.getPositions = function(e) {
2139
- const r = Pr(e);
2154
+ const r = Er(e);
2140
2155
  return [
2141
2156
  // top-left
2142
2157
  [0, 0],
@@ -2171,11 +2186,11 @@ var Ct = {};
2171
2186
  }, t.getPenaltyN1 = function(i) {
2172
2187
  const o = i.size;
2173
2188
  let s = 0, l = 0, a = 0, c = null, d = null;
2174
- for (let p = 0; p < o; p++) {
2189
+ for (let h = 0; h < o; h++) {
2175
2190
  l = a = 0, c = d = null;
2176
- for (let h = 0; h < o; h++) {
2177
- let u = i.get(p, h);
2178
- u === c ? l++ : (l >= 5 && (s += e.N1 + (l - 5)), c = u, l = 1), u = i.get(h, p), u === d ? a++ : (a >= 5 && (s += e.N1 + (a - 5)), d = u, a = 1);
2191
+ for (let p = 0; p < o; p++) {
2192
+ let u = i.get(h, p);
2193
+ u === c ? l++ : (l >= 5 && (s += e.N1 + (l - 5)), c = u, l = 1), u = i.get(p, h), u === d ? a++ : (a >= 5 && (s += e.N1 + (a - 5)), d = u, a = 1);
2179
2194
  }
2180
2195
  l >= 5 && (s += e.N1 + (l - 5)), a >= 5 && (s += e.N1 + (a - 5));
2181
2196
  }
@@ -2243,7 +2258,7 @@ var Ct = {};
2243
2258
  };
2244
2259
  })(Ct);
2245
2260
  var Ce = {};
2246
- const z = ke, fe = [
2261
+ const O = ke, fe = [
2247
2262
  // L M Q H
2248
2263
  1,
2249
2264
  1,
@@ -2570,13 +2585,13 @@ const z = ke, fe = [
2570
2585
  ];
2571
2586
  Ce.getBlocksCount = function(e, r) {
2572
2587
  switch (r) {
2573
- case z.L:
2588
+ case O.L:
2574
2589
  return fe[(e - 1) * 4 + 0];
2575
- case z.M:
2590
+ case O.M:
2576
2591
  return fe[(e - 1) * 4 + 1];
2577
- case z.Q:
2592
+ case O.Q:
2578
2593
  return fe[(e - 1) * 4 + 2];
2579
- case z.H:
2594
+ case O.H:
2580
2595
  return fe[(e - 1) * 4 + 3];
2581
2596
  default:
2582
2597
  return;
@@ -2584,13 +2599,13 @@ Ce.getBlocksCount = function(e, r) {
2584
2599
  };
2585
2600
  Ce.getTotalCodewordsCount = function(e, r) {
2586
2601
  switch (r) {
2587
- case z.L:
2602
+ case O.L:
2588
2603
  return ge[(e - 1) * 4 + 0];
2589
- case z.M:
2604
+ case O.M:
2590
2605
  return ge[(e - 1) * 4 + 1];
2591
- case z.Q:
2606
+ case O.Q:
2592
2607
  return ge[(e - 1) * 4 + 2];
2593
- case z.H:
2608
+ case O.H:
2594
2609
  return ge[(e - 1) * 4 + 3];
2595
2610
  default:
2596
2611
  return;
@@ -2660,30 +2675,30 @@ Qe.prototype.encode = function(e) {
2660
2675
  }
2661
2676
  return n;
2662
2677
  };
2663
- var Er = Qe, At = {}, q = {}, Ke = {};
2678
+ var Ar = Qe, At = {}, q = {}, Ke = {};
2664
2679
  Ke.isValid = function(e) {
2665
2680
  return !isNaN(e) && e >= 1 && e <= 40;
2666
2681
  };
2667
2682
  var L = {};
2668
- const It = "[0-9]+", Ar = "[A-Z $%*+\\-./:]+";
2683
+ const It = "[0-9]+", Ir = "[A-Z $%*+\\-./:]+";
2669
2684
  let ue = "(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";
2670
2685
  ue = ue.replace(/u/g, "\\u");
2671
- const Ir = "(?:(?![A-Z0-9 $%*+\\-./:]|" + ue + `)(?:.|[\r
2686
+ const _r = "(?:(?![A-Z0-9 $%*+\\-./:]|" + ue + `)(?:.|[\r
2672
2687
  ]))+`;
2673
2688
  L.KANJI = new RegExp(ue, "g");
2674
2689
  L.BYTE_KANJI = new RegExp("[^A-Z0-9 $%*+\\-./:]+", "g");
2675
- L.BYTE = new RegExp(Ir, "g");
2690
+ L.BYTE = new RegExp(_r, "g");
2676
2691
  L.NUMERIC = new RegExp(It, "g");
2677
- L.ALPHANUMERIC = new RegExp(Ar, "g");
2678
- const _r = new RegExp("^" + ue + "$"), Mr = new RegExp("^" + It + "$"), Dr = new RegExp("^[A-Z0-9 $%*+\\-./:]+$");
2692
+ L.ALPHANUMERIC = new RegExp(Ir, "g");
2693
+ const Mr = new RegExp("^" + ue + "$"), Dr = new RegExp("^" + It + "$"), Tr = new RegExp("^[A-Z0-9 $%*+\\-./:]+$");
2679
2694
  L.testKanji = function(e) {
2680
- return _r.test(e);
2695
+ return Mr.test(e);
2681
2696
  };
2682
2697
  L.testNumeric = function(e) {
2683
- return Mr.test(e);
2698
+ return Dr.test(e);
2684
2699
  };
2685
2700
  L.testAlphanumeric = function(e) {
2686
- return Dr.test(e);
2701
+ return Tr.test(e);
2687
2702
  };
2688
2703
  (function(t) {
2689
2704
  const e = Ke, r = L;
@@ -2746,24 +2761,24 @@ L.testAlphanumeric = function(e) {
2746
2761
  })(q);
2747
2762
  (function(t) {
2748
2763
  const e = T, r = Ce, n = ke, i = q, o = Ke, s = 7973, l = e.getBCHDigit(s);
2749
- function a(h, u, m) {
2764
+ function a(p, u, m) {
2750
2765
  for (let y = 1; y <= 40; y++)
2751
- if (u <= t.getCapacity(y, m, h))
2766
+ if (u <= t.getCapacity(y, m, p))
2752
2767
  return y;
2753
2768
  }
2754
- function c(h, u) {
2755
- return i.getCharCountIndicator(h, u) + 4;
2769
+ function c(p, u) {
2770
+ return i.getCharCountIndicator(p, u) + 4;
2756
2771
  }
2757
- function d(h, u) {
2772
+ function d(p, u) {
2758
2773
  let m = 0;
2759
- return h.forEach(function(y) {
2774
+ return p.forEach(function(y) {
2760
2775
  const P = c(y.mode, u);
2761
2776
  m += P + y.getBitsLength();
2762
2777
  }), m;
2763
2778
  }
2764
- function p(h, u) {
2779
+ function h(p, u) {
2765
2780
  for (let m = 1; m <= 40; m++)
2766
- if (d(h, m) <= t.getCapacity(m, u, i.MIXED))
2781
+ if (d(p, m) <= t.getCapacity(m, u, i.MIXED))
2767
2782
  return m;
2768
2783
  }
2769
2784
  t.from = function(u, m) {
@@ -2791,7 +2806,7 @@ L.testAlphanumeric = function(e) {
2791
2806
  const P = n.from(m, n.M);
2792
2807
  if (Array.isArray(u)) {
2793
2808
  if (u.length > 1)
2794
- return p(u, P);
2809
+ return h(u, P);
2795
2810
  if (u.length === 0)
2796
2811
  return 1;
2797
2812
  y = u[0];
@@ -2808,37 +2823,37 @@ L.testAlphanumeric = function(e) {
2808
2823
  };
2809
2824
  })(At);
2810
2825
  var _t = {};
2811
- const Fe = T, Mt = 1335, Tr = 21522, ct = Fe.getBCHDigit(Mt);
2826
+ const Fe = T, Mt = 1335, Nr = 21522, ct = Fe.getBCHDigit(Mt);
2812
2827
  _t.getEncodedBits = function(e, r) {
2813
2828
  const n = e.bit << 3 | r;
2814
2829
  let i = n << 10;
2815
2830
  for (; Fe.getBCHDigit(i) - ct >= 0; )
2816
2831
  i ^= Mt << Fe.getBCHDigit(i) - ct;
2817
- return (n << 10 | i) ^ Tr;
2832
+ return (n << 10 | i) ^ Nr;
2818
2833
  };
2819
2834
  var Dt = {};
2820
2835
  const $r = q;
2821
- function W(t) {
2836
+ function G(t) {
2822
2837
  this.mode = $r.NUMERIC, this.data = t.toString();
2823
2838
  }
2824
- W.getBitsLength = function(e) {
2839
+ G.getBitsLength = function(e) {
2825
2840
  return 10 * Math.floor(e / 3) + (e % 3 ? e % 3 * 3 + 1 : 0);
2826
2841
  };
2827
- W.prototype.getLength = function() {
2842
+ G.prototype.getLength = function() {
2828
2843
  return this.data.length;
2829
2844
  };
2830
- W.prototype.getBitsLength = function() {
2831
- return W.getBitsLength(this.data.length);
2845
+ G.prototype.getBitsLength = function() {
2846
+ return G.getBitsLength(this.data.length);
2832
2847
  };
2833
- W.prototype.write = function(e) {
2848
+ G.prototype.write = function(e) {
2834
2849
  let r, n, i;
2835
2850
  for (r = 0; r + 3 <= this.data.length; r += 3)
2836
2851
  n = this.data.substr(r, 3), i = parseInt(n, 10), e.put(i, 10);
2837
2852
  const o = this.data.length - r;
2838
2853
  o > 0 && (n = this.data.substr(r), i = parseInt(n, 10), e.put(i, o * 3 + 1));
2839
2854
  };
2840
- var Nr = W;
2841
- const Rr = q, Te = [
2855
+ var Rr = G;
2856
+ const Lr = q, Te = [
2842
2857
  "0",
2843
2858
  "1",
2844
2859
  "2",
@@ -2886,7 +2901,7 @@ const Rr = q, Te = [
2886
2901
  ":"
2887
2902
  ];
2888
2903
  function X(t) {
2889
- this.mode = Rr.ALPHANUMERIC, this.data = t;
2904
+ this.mode = Lr.ALPHANUMERIC, this.data = t;
2890
2905
  }
2891
2906
  X.getBitsLength = function(e) {
2892
2907
  return 11 * Math.floor(e / 2) + 6 * (e % 2);
@@ -2905,10 +2920,10 @@ X.prototype.write = function(e) {
2905
2920
  }
2906
2921
  this.data.length % 2 && e.put(Te.indexOf(this.data[r]), 6);
2907
2922
  };
2908
- var Lr = X;
2909
- const Br = q;
2923
+ var Br = X;
2924
+ const Fr = q;
2910
2925
  function ee(t) {
2911
- this.mode = Br.BYTE, typeof t == "string" ? this.data = new TextEncoder().encode(t) : this.data = new Uint8Array(t);
2926
+ this.mode = Fr.BYTE, typeof t == "string" ? this.data = new TextEncoder().encode(t) : this.data = new Uint8Array(t);
2912
2927
  }
2913
2928
  ee.getBitsLength = function(e) {
2914
2929
  return e * 8;
@@ -2923,10 +2938,10 @@ ee.prototype.write = function(t) {
2923
2938
  for (let e = 0, r = this.data.length; e < r; e++)
2924
2939
  t.put(this.data[e], 8);
2925
2940
  };
2926
- var Fr = ee;
2927
- const Ur = q, zr = T;
2941
+ var Ur = ee;
2942
+ const Or = q, zr = T;
2928
2943
  function te(t) {
2929
- this.mode = Ur.KANJI, this.data = t;
2944
+ this.mode = Or.KANJI, this.data = t;
2930
2945
  }
2931
2946
  te.getBitsLength = function(e) {
2932
2947
  return e * 13;
@@ -2953,7 +2968,7 @@ Make sure your charset is UTF-8`
2953
2968
  r = (r >>> 8 & 255) * 192 + (r & 255), t.put(r, 13);
2954
2969
  }
2955
2970
  };
2956
- var Or = te, Tt = { exports: {} };
2971
+ var qr = te, Tt = { exports: {} };
2957
2972
  (function(t) {
2958
2973
  var e = {
2959
2974
  single_source_shortest_paths: function(r, n, i) {
@@ -2961,10 +2976,10 @@ var Or = te, Tt = { exports: {} };
2961
2976
  s[n] = 0;
2962
2977
  var l = e.PriorityQueue.make();
2963
2978
  l.push(n, 0);
2964
- for (var a, c, d, p, h, u, m, y, P; !l.empty(); ) {
2965
- a = l.pop(), c = a.value, p = a.cost, h = r[c] || {};
2966
- for (d in h)
2967
- h.hasOwnProperty(d) && (u = h[d], m = p + u, y = s[d], P = typeof s[d] > "u", (P || y > m) && (s[d] = m, l.push(d, m), o[d] = c));
2979
+ for (var a, c, d, h, p, u, m, y, P; !l.empty(); ) {
2980
+ a = l.pop(), c = a.value, h = a.cost, p = r[c] || {};
2981
+ for (d in p)
2982
+ p.hasOwnProperty(d) && (u = p[d], m = h + u, y = s[d], P = typeof s[d] > "u", (P || y > m) && (s[d] = m, l.push(d, m), o[d] = c));
2968
2983
  }
2969
2984
  if (typeof i < "u" && typeof s[i] > "u") {
2970
2985
  var b = ["Could not find a path from ", n, " to ", i, "."].join("");
@@ -3019,9 +3034,9 @@ var Or = te, Tt = { exports: {} };
3019
3034
  };
3020
3035
  t.exports = e;
3021
3036
  })(Tt);
3022
- var qr = Tt.exports;
3037
+ var Vr = Tt.exports;
3023
3038
  (function(t) {
3024
- const e = q, r = Nr, n = Lr, i = Fr, o = Or, s = L, l = T, a = qr;
3039
+ const e = q, r = Rr, n = Br, i = Ur, o = qr, s = L, l = T, a = Vr;
3025
3040
  function c(b) {
3026
3041
  return unescape(encodeURIComponent(b)).length;
3027
3042
  }
@@ -3037,20 +3052,20 @@ var qr = Tt.exports;
3037
3052
  });
3038
3053
  return f;
3039
3054
  }
3040
- function p(b) {
3055
+ function h(b) {
3041
3056
  const v = d(s.NUMERIC, e.NUMERIC, b), g = d(s.ALPHANUMERIC, e.ALPHANUMERIC, b);
3042
3057
  let f, k;
3043
- return l.isKanjiModeEnabled() ? (f = d(s.BYTE, e.BYTE, b), k = d(s.KANJI, e.KANJI, b)) : (f = d(s.BYTE_KANJI, e.BYTE, b), k = []), v.concat(g, f, k).sort(function(A, N) {
3044
- return A.index - N.index;
3045
- }).map(function(A) {
3058
+ return l.isKanjiModeEnabled() ? (f = d(s.BYTE, e.BYTE, b), k = d(s.KANJI, e.KANJI, b)) : (f = d(s.BYTE_KANJI, e.BYTE, b), k = []), v.concat(g, f, k).sort(function(I, $) {
3059
+ return I.index - $.index;
3060
+ }).map(function(I) {
3046
3061
  return {
3047
- data: A.data,
3048
- mode: A.mode,
3049
- length: A.length
3062
+ data: I.data,
3063
+ mode: I.mode,
3064
+ length: I.length
3050
3065
  };
3051
3066
  });
3052
3067
  }
3053
- function h(b, v) {
3068
+ function p(b, v) {
3054
3069
  switch (v) {
3055
3070
  case e.NUMERIC:
3056
3071
  return r.getBitsLength(b);
@@ -3104,16 +3119,16 @@ var qr = Tt.exports;
3104
3119
  const g = {}, f = { start: {} };
3105
3120
  let k = ["start"];
3106
3121
  for (let E = 0; E < b.length; E++) {
3107
- const A = b[E], N = [];
3108
- for (let F = 0; F < A.length; F++) {
3109
- const R = A[F], re = "" + E + F;
3110
- N.push(re), g[re] = { node: R, lastCount: 0 }, f[re] = {};
3122
+ const I = b[E], $ = [];
3123
+ for (let F = 0; F < I.length; F++) {
3124
+ const R = I[F], re = "" + E + F;
3125
+ $.push(re), g[re] = { node: R, lastCount: 0 }, f[re] = {};
3111
3126
  for (let Ae = 0; Ae < k.length; Ae++) {
3112
3127
  const B = k[Ae];
3113
- g[B] && g[B].node.mode === R.mode ? (f[B][re] = h(g[B].lastCount + R.length, R.mode) - h(g[B].lastCount, R.mode), g[B].lastCount += R.length) : (g[B] && (g[B].lastCount = R.length), f[B][re] = h(R.length, R.mode) + 4 + e.getCharCountIndicator(R.mode, v));
3128
+ g[B] && g[B].node.mode === R.mode ? (f[B][re] = p(g[B].lastCount + R.length, R.mode) - p(g[B].lastCount, R.mode), g[B].lastCount += R.length) : (g[B] && (g[B].lastCount = R.length), f[B][re] = p(R.length, R.mode) + 4 + e.getCharCountIndicator(R.mode, v));
3114
3129
  }
3115
3130
  }
3116
- k = N;
3131
+ k = $;
3117
3132
  }
3118
3133
  for (let E = 0; E < k.length; E++)
3119
3134
  f[k[E]].end = 0;
@@ -3141,19 +3156,19 @@ var qr = Tt.exports;
3141
3156
  return typeof f == "string" ? g.push(P(f, null)) : f.data && g.push(P(f.data, f.mode)), g;
3142
3157
  }, []);
3143
3158
  }, t.fromString = function(v, g) {
3144
- const f = p(v, l.isKanjiModeEnabled()), k = m(f), E = y(k, g), A = a.find_path(E.map, "start", "end"), N = [];
3145
- for (let F = 1; F < A.length - 1; F++)
3146
- N.push(E.table[A[F]].node);
3147
- return t.fromArray(u(N));
3159
+ const f = h(v, l.isKanjiModeEnabled()), k = m(f), E = y(k, g), I = a.find_path(E.map, "start", "end"), $ = [];
3160
+ for (let F = 1; F < I.length - 1; F++)
3161
+ $.push(E.table[I[F]].node);
3162
+ return t.fromArray(u($));
3148
3163
  }, t.rawSplit = function(v) {
3149
3164
  return t.fromArray(
3150
- p(v, l.isKanjiModeEnabled())
3165
+ h(v, l.isKanjiModeEnabled())
3151
3166
  );
3152
3167
  };
3153
3168
  })(Dt);
3154
- const Ee = T, $e = ke, Vr = kr, Hr = Cr, Yr = St, jr = kt, Ue = Ct, ze = Ce, Qr = Er, xe = At, Kr = _t, Zr = q, Ne = Dt;
3169
+ const Ee = T, Ne = ke, Hr = Cr, Yr = Pr, jr = St, Qr = kt, Ue = Ct, Oe = Ce, Kr = Ar, xe = At, Wr = _t, Zr = q, $e = Dt;
3155
3170
  function Jr(t, e) {
3156
- const r = t.size, n = jr.getPositions(e);
3171
+ const r = t.size, n = Qr.getPositions(e);
3157
3172
  for (let i = 0; i < n.length; i++) {
3158
3173
  const o = n[i][0], s = n[i][1];
3159
3174
  for (let l = -1; l <= 7; l++)
@@ -3169,8 +3184,8 @@ function Gr(t) {
3169
3184
  t.set(r, 6, n, !0), t.set(6, r, n, !0);
3170
3185
  }
3171
3186
  }
3172
- function Wr(t, e) {
3173
- const r = Yr.getPositions(e);
3187
+ function Xr(t, e) {
3188
+ const r = jr.getPositions(e);
3174
3189
  for (let n = 0; n < r.length; n++) {
3175
3190
  const i = r[n][0], o = r[n][1];
3176
3191
  for (let s = -2; s <= 2; s++)
@@ -3178,20 +3193,20 @@ function Wr(t, e) {
3178
3193
  s === -2 || s === 2 || l === -2 || l === 2 || s === 0 && l === 0 ? t.set(i + s, o + l, !0, !0) : t.set(i + s, o + l, !1, !0);
3179
3194
  }
3180
3195
  }
3181
- function Xr(t, e) {
3196
+ function en(t, e) {
3182
3197
  const r = t.size, n = xe.getEncodedBits(e);
3183
3198
  let i, o, s;
3184
3199
  for (let l = 0; l < 18; l++)
3185
3200
  i = Math.floor(l / 3), o = l % 3 + r - 8 - 3, s = (n >> l & 1) === 1, t.set(i, o, s, !0), t.set(o, i, s, !0);
3186
3201
  }
3187
3202
  function Re(t, e, r) {
3188
- const n = t.size, i = Kr.getEncodedBits(e, r);
3203
+ const n = t.size, i = Wr.getEncodedBits(e, r);
3189
3204
  let o, s;
3190
3205
  for (o = 0; o < 15; o++)
3191
3206
  s = (i >> o & 1) === 1, o < 6 ? t.set(o, 8, s, !0) : o < 8 ? t.set(o + 1, 8, s, !0) : t.set(n - 15 + o, 8, s, !0), o < 8 ? t.set(8, n - o - 1, s, !0) : o < 9 ? t.set(8, 15 - o - 1 + 1, s, !0) : t.set(8, 15 - o - 1, s, !0);
3192
3207
  t.set(n - 8, 8, 1, !0);
3193
3208
  }
3194
- function en(t, e) {
3209
+ function tn(t, e) {
3195
3210
  const r = t.size;
3196
3211
  let n = -1, i = r - 1, o = 7, s = 0;
3197
3212
  for (let l = r - 1; l > 0; l -= 2)
@@ -3207,50 +3222,50 @@ function en(t, e) {
3207
3222
  }
3208
3223
  }
3209
3224
  }
3210
- function tn(t, e, r) {
3211
- const n = new Vr();
3225
+ function rn(t, e, r) {
3226
+ const n = new Hr();
3212
3227
  r.forEach(function(a) {
3213
3228
  n.put(a.mode.bit, 4), n.put(a.getLength(), Zr.getCharCountIndicator(a.mode, t)), a.write(n);
3214
3229
  });
3215
- const i = Ee.getSymbolTotalCodewords(t), o = ze.getTotalCodewordsCount(t, e), s = (i - o) * 8;
3230
+ const i = Ee.getSymbolTotalCodewords(t), o = Oe.getTotalCodewordsCount(t, e), s = (i - o) * 8;
3216
3231
  for (n.getLengthInBits() + 4 <= s && n.put(0, 4); n.getLengthInBits() % 8 !== 0; )
3217
3232
  n.putBit(0);
3218
3233
  const l = (s - n.getLengthInBits()) / 8;
3219
3234
  for (let a = 0; a < l; a++)
3220
3235
  n.put(a % 2 ? 17 : 236, 8);
3221
- return rn(n, t, e);
3236
+ return nn(n, t, e);
3222
3237
  }
3223
- function rn(t, e, r) {
3224
- const n = Ee.getSymbolTotalCodewords(e), i = ze.getTotalCodewordsCount(e, r), o = n - i, s = ze.getBlocksCount(e, r), l = n % s, a = s - l, c = Math.floor(n / s), d = Math.floor(o / s), p = d + 1, h = c - d, u = new Qr(h);
3238
+ function nn(t, e, r) {
3239
+ const n = Ee.getSymbolTotalCodewords(e), i = Oe.getTotalCodewordsCount(e, r), o = n - i, s = Oe.getBlocksCount(e, 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 Kr(p);
3225
3240
  let m = 0;
3226
3241
  const y = new Array(s), P = new Array(s);
3227
3242
  let b = 0;
3228
3243
  const v = new Uint8Array(t.buffer);
3229
- for (let A = 0; A < s; A++) {
3230
- const N = A < a ? d : p;
3231
- y[A] = v.slice(m, m + N), P[A] = u.encode(y[A]), m += N, b = Math.max(b, N);
3244
+ for (let I = 0; I < s; I++) {
3245
+ const $ = I < a ? d : h;
3246
+ y[I] = v.slice(m, m + $), P[I] = u.encode(y[I]), m += $, b = Math.max(b, $);
3232
3247
  }
3233
3248
  const g = new Uint8Array(n);
3234
3249
  let f = 0, k, E;
3235
3250
  for (k = 0; k < b; k++)
3236
3251
  for (E = 0; E < s; E++)
3237
3252
  k < y[E].length && (g[f++] = y[E][k]);
3238
- for (k = 0; k < h; k++)
3253
+ for (k = 0; k < p; k++)
3239
3254
  for (E = 0; E < s; E++)
3240
3255
  g[f++] = P[E][k];
3241
3256
  return g;
3242
3257
  }
3243
- function nn(t, e, r, n) {
3258
+ function on(t, e, r, n) {
3244
3259
  let i;
3245
3260
  if (Array.isArray(t))
3246
- i = Ne.fromArray(t);
3261
+ i = $e.fromArray(t);
3247
3262
  else if (typeof t == "string") {
3248
3263
  let c = e;
3249
3264
  if (!c) {
3250
- const d = Ne.rawSplit(t);
3265
+ const d = $e.rawSplit(t);
3251
3266
  c = xe.getBestVersionForData(d, r);
3252
3267
  }
3253
- i = Ne.fromString(t, c || 40);
3268
+ i = $e.fromString(t, c || 40);
3254
3269
  } else
3255
3270
  throw new Error("Invalid data");
3256
3271
  const o = xe.getBestVersionForData(i, r);
@@ -3265,8 +3280,8 @@ The chosen QR Code version cannot contain this amount of data.
3265
3280
  Minimum version required to store current data is: ` + o + `.
3266
3281
  `
3267
3282
  );
3268
- const s = tn(e, r, i), l = Ee.getSymbolSize(e), a = new Hr(l);
3269
- return Jr(a, e), Gr(a), Wr(a, e), Re(a, r, 0), e >= 7 && Xr(a, e), en(a, s), isNaN(n) && (n = Ue.getBestMask(
3283
+ const s = rn(e, r, i), l = Ee.getSymbolSize(e), a = new Yr(l);
3284
+ return Jr(a, e), Gr(a), Xr(a, e), Re(a, r, 0), e >= 7 && en(a, e), tn(a, s), isNaN(n) && (n = Ue.getBestMask(
3270
3285
  a,
3271
3286
  Re.bind(null, a, r)
3272
3287
  )), Ue.applyMask(n, a), Re(a, r, n), {
@@ -3280,10 +3295,10 @@ Minimum version required to store current data is: ` + o + `.
3280
3295
  wt.create = function(e, r) {
3281
3296
  if (typeof e > "u" || e === "")
3282
3297
  throw new Error("No input text");
3283
- let n = $e.M, i, o;
3284
- return typeof r < "u" && (n = $e.from(r.errorCorrectionLevel, $e.M), i = xe.from(r.version), o = Ue.from(r.maskPattern), r.toSJISFunc && Ee.setToSJISFunction(r.toSJISFunc)), nn(e, i, n, o);
3298
+ let n = Ne.M, i, o;
3299
+ return typeof r < "u" && (n = Ne.from(r.errorCorrectionLevel, Ne.M), i = xe.from(r.version), o = Ue.from(r.maskPattern), r.toSJISFunc && Ee.setToSJISFunction(r.toSJISFunc)), on(e, i, n, o);
3285
3300
  };
3286
- var $t = {}, Ze = {};
3301
+ var Nt = {}, We = {};
3287
3302
  (function(t) {
3288
3303
  function e(r) {
3289
3304
  if (typeof r == "number" && (r = r.toString()), typeof r != "string")
@@ -3323,20 +3338,20 @@ var $t = {}, Ze = {};
3323
3338
  const o = t.getScale(n, i);
3324
3339
  return Math.floor((n + i.margin * 2) * o);
3325
3340
  }, t.qrToImageData = function(n, i, o) {
3326
- const s = i.modules.size, l = i.modules.data, a = t.getScale(s, o), c = Math.floor((s + o.margin * 2) * a), d = o.margin * a, p = [o.color.light, o.color.dark];
3327
- for (let h = 0; h < c; h++)
3341
+ const s = i.modules.size, l = i.modules.data, a = t.getScale(s, o), c = Math.floor((s + o.margin * 2) * a), d = o.margin * a, h = [o.color.light, o.color.dark];
3342
+ for (let p = 0; p < c; p++)
3328
3343
  for (let u = 0; u < c; u++) {
3329
- let m = (h * c + u) * 4, y = o.color.light;
3330
- if (h >= d && u >= d && h < c - d && u < c - d) {
3331
- const P = Math.floor((h - d) / a), b = Math.floor((u - d) / a);
3332
- y = p[l[P * s + b] ? 1 : 0];
3344
+ let m = (p * c + u) * 4, y = o.color.light;
3345
+ if (p >= d && u >= d && p < c - d && u < c - d) {
3346
+ const P = Math.floor((p - d) / a), b = Math.floor((u - d) / a);
3347
+ y = h[l[P * s + b] ? 1 : 0];
3333
3348
  }
3334
3349
  n[m++] = y.r, n[m++] = y.g, n[m++] = y.b, n[m] = y.a;
3335
3350
  }
3336
3351
  };
3337
- })(Ze);
3352
+ })(We);
3338
3353
  (function(t) {
3339
- const e = Ze;
3354
+ const e = We;
3340
3355
  function r(i, o, s) {
3341
3356
  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";
3342
3357
  }
@@ -3350,17 +3365,17 @@ var $t = {}, Ze = {};
3350
3365
  t.render = function(o, s, l) {
3351
3366
  let a = l, c = s;
3352
3367
  typeof a > "u" && (!s || !s.getContext) && (a = s, s = void 0), s || (c = n()), a = e.getOptions(a);
3353
- const d = e.getImageWidth(o.modules.size, a), p = c.getContext("2d"), h = p.createImageData(d, d);
3354
- return e.qrToImageData(h.data, o, a), r(p, c, d), p.putImageData(h, 0, 0), c;
3368
+ const d = e.getImageWidth(o.modules.size, a), h = c.getContext("2d"), p = h.createImageData(d, d);
3369
+ return e.qrToImageData(p.data, o, a), r(h, c, d), h.putImageData(p, 0, 0), c;
3355
3370
  }, t.renderToDataURL = function(o, s, l) {
3356
3371
  let a = l;
3357
3372
  typeof a > "u" && (!s || !s.getContext) && (a = s, s = void 0), a || (a = {});
3358
- const c = t.render(o, s, a), d = a.type || "image/png", p = a.rendererOpts || {};
3359
- return c.toDataURL(d, p.quality);
3373
+ const c = t.render(o, s, a), d = a.type || "image/png", h = a.rendererOpts || {};
3374
+ return c.toDataURL(d, h.quality);
3360
3375
  };
3361
- })($t);
3362
- var Nt = {};
3363
- const on = Ze;
3376
+ })(Nt);
3377
+ var $t = {};
3378
+ const sn = We;
3364
3379
  function dt(t, e) {
3365
3380
  const r = t.a / 255, n = e + '="' + t.hex + '"';
3366
3381
  return r < 1 ? n + " " + e + '-opacity="' + r.toFixed(2).slice(1) + '"' : n;
@@ -3369,7 +3384,7 @@ function Le(t, e, r) {
3369
3384
  let n = t + e;
3370
3385
  return typeof r < "u" && (n += " " + r), n;
3371
3386
  }
3372
- function sn(t, e, r) {
3387
+ function an(t, e, r) {
3373
3388
  let n = "", i = 0, o = !1, s = 0;
3374
3389
  for (let l = 0; l < t.length; l++) {
3375
3390
  const a = Math.floor(l % e), c = Math.floor(l / e);
@@ -3377,15 +3392,15 @@ function sn(t, e, r) {
3377
3392
  }
3378
3393
  return n;
3379
3394
  }
3380
- Nt.render = function(e, r, n) {
3381
- const i = on.getOptions(r), o = e.modules.size, s = e.modules.data, l = o + i.margin * 2, a = i.color.light.a ? "<path " + dt(i.color.light, "fill") + ' d="M0 0h' + l + "v" + l + 'H0z"/>' : "", c = "<path " + dt(i.color.dark, "stroke") + ' d="' + sn(s, o, i.margin) + '"/>', d = 'viewBox="0 0 ' + l + " " + l + '"', h = '<svg xmlns="http://www.w3.org/2000/svg" ' + (i.width ? 'width="' + i.width + '" height="' + i.width + '" ' : "") + d + ' shape-rendering="crispEdges">' + a + c + `</svg>
3395
+ $t.render = function(e, r, n) {
3396
+ const i = sn.getOptions(r), o = e.modules.size, s = e.modules.data, l = o + i.margin * 2, a = i.color.light.a ? "<path " + dt(i.color.light, "fill") + ' d="M0 0h' + l + "v" + l + 'H0z"/>' : "", c = "<path " + dt(i.color.dark, "stroke") + ' d="' + an(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>
3382
3397
  `;
3383
- return typeof n == "function" && n(null, h), h;
3398
+ return typeof n == "function" && n(null, p), p;
3384
3399
  };
3385
- const an = xr, Oe = wt, Rt = $t, ln = Nt;
3386
- function Je(t, e, r, n, i) {
3400
+ const ln = Sr, ze = wt, Rt = Nt, cn = $t;
3401
+ function Ze(t, e, r, n, i) {
3387
3402
  const o = [].slice.call(arguments, 1), s = o.length, l = typeof o[s - 1] == "function";
3388
- if (!l && !an())
3403
+ if (!l && !ln())
3389
3404
  throw new Error("Callback required as last argument");
3390
3405
  if (l) {
3391
3406
  if (s < 2)
@@ -3396,7 +3411,7 @@ function Je(t, e, r, n, i) {
3396
3411
  throw new Error("Too few arguments provided");
3397
3412
  return s === 1 ? (r = e, e = n = void 0) : s === 2 && !e.getContext && (n = r, r = e, e = void 0), new Promise(function(a, c) {
3398
3413
  try {
3399
- const d = Oe.create(r, n);
3414
+ const d = ze.create(r, n);
3400
3415
  a(t(d, e, n));
3401
3416
  } catch (d) {
3402
3417
  c(d);
@@ -3404,22 +3419,22 @@ function Je(t, e, r, n, i) {
3404
3419
  });
3405
3420
  }
3406
3421
  try {
3407
- const a = Oe.create(r, n);
3422
+ const a = ze.create(r, n);
3408
3423
  i(null, t(a, e, n));
3409
3424
  } catch (a) {
3410
3425
  i(a);
3411
3426
  }
3412
3427
  }
3413
- pe.create = Oe.create;
3414
- pe.toCanvas = Je.bind(null, Rt.render);
3415
- pe.toDataURL = Je.bind(null, Rt.renderToDataURL);
3416
- pe.toString = Je.bind(null, function(t, e, r) {
3417
- return ln.render(t, r);
3428
+ pe.create = ze.create;
3429
+ pe.toCanvas = Ze.bind(null, Rt.render);
3430
+ pe.toDataURL = Ze.bind(null, Rt.renderToDataURL);
3431
+ pe.toString = Ze.bind(null, function(t, e, r) {
3432
+ return cn.render(t, r);
3418
3433
  });
3419
- var cn = Object.defineProperty, dn = Object.getOwnPropertyDescriptor, S = (t, e, r, n) => {
3420
- for (var i = n > 1 ? void 0 : n ? dn(e, r) : e, o = t.length - 1, s; o >= 0; o--)
3434
+ var dn = Object.defineProperty, un = Object.getOwnPropertyDescriptor, S = (t, e, r, n) => {
3435
+ for (var i = n > 1 ? void 0 : n ? un(e, r) : e, o = t.length - 1, s; o >= 0; o--)
3421
3436
  (s = t[o]) && (i = (n ? s(e, r, i) : s(i)) || i);
3422
- return n && i && cn(e, r, i), i;
3437
+ return n && i && dn(e, r, i), i;
3423
3438
  };
3424
3439
  let w = class extends se {
3425
3440
  constructor() {
@@ -3576,14 +3591,18 @@ let w = class extends se {
3576
3591
  return t.length === 0 ? [] : t.filter((e) => {
3577
3592
  var r;
3578
3593
  return !((r = this.excludePaymentMethods) != null && r.includes(e.id));
3579
- }).map((e) => e.id === M.PAYNOW && this.getTransactionData().currency !== "SGD" ? {
3594
+ }).map((e) => e.id === A.PAYNOW && this.getTransactionData().currency !== "SGD" ? {
3580
3595
  id: e.id,
3581
3596
  enabled: !1,
3582
3597
  disabledReason: "PayNow is only available for SGD currency"
3583
- } : e.id === M.PROMPTPAY && this.getTransactionData().currency !== "THB" ? {
3598
+ } : e.id === A.PROMPTPAY && this.getTransactionData().currency !== "THB" ? {
3584
3599
  id: e.id,
3585
3600
  enabled: !1,
3586
- disabledReason: "Prompt Pay is only available for THB currency"
3601
+ disabledReason: "PromptPay is only available for THB currency"
3602
+ } : e.id === A.DUITNOW && this.getTransactionData().currency !== "MYR" ? {
3603
+ id: e.id,
3604
+ enabled: !1,
3605
+ disabledReason: "DuitNow is only available for MYR currency"
3587
3606
  } : {
3588
3607
  id: e.id,
3589
3608
  enabled: !0
@@ -3679,6 +3698,12 @@ let w = class extends se {
3679
3698
  const { redirectUrl: r } = e.payload;
3680
3699
  r && (window.location.href = r);
3681
3700
  }
3701
+ ), this.sdk.on(
3702
+ "duitnow_redirect",
3703
+ (e) => {
3704
+ const { redirectUrl: r } = e.payload;
3705
+ r && (window.location.href = r);
3706
+ }
3682
3707
  ), this.sdk.initialize({
3683
3708
  amount: this.amount,
3684
3709
  currency: this.currency,
@@ -3726,13 +3751,13 @@ let w = class extends se {
3726
3751
  if (l < 1 || l > 12)
3727
3752
  return { valid: !1, error: "Invalid month (01-12)" };
3728
3753
  const a = /* @__PURE__ */ new Date(), c = a.getFullYear(), d = a.getMonth() + 1;
3729
- let p;
3754
+ let h;
3730
3755
  if (s.length === 2) {
3731
- const h = parseInt(s, 10), u = c % 100, m = Math.floor(c / 100) * 100;
3732
- h < u && u - h > 80 ? p = m + 100 + h : p = m + h;
3756
+ const p = parseInt(s, 10), u = c % 100, m = Math.floor(c / 100) * 100;
3757
+ p < u && u - p > 80 ? h = m + 100 + p : h = m + p;
3733
3758
  } else
3734
3759
  return { valid: !1, error: "Invalid year format" };
3735
- return p < c ? { valid: !1, error: "Card has expired" } : p === c && l < d ? { valid: !1, error: "Card has expired" } : { valid: !0 };
3760
+ return h < c ? { valid: !1, error: "Card has expired" } : h === c && l < d ? { valid: !1, error: "Card has expired" } : { valid: !0 };
3736
3761
  }
3737
3762
  validateCardForm() {
3738
3763
  const t = {};
@@ -3749,7 +3774,7 @@ let w = class extends se {
3749
3774
  return;
3750
3775
  this.paymentLocked = !0;
3751
3776
  const t = this.cardFormData.expiry.split("/"), e = (t[0] || "").trim(), n = `20${(t[1] || "").trim().substring(0, 2)}`;
3752
- this.sdk.submitPayment(M.CARD, {
3777
+ this.sdk.submitPayment(A.CARD, {
3753
3778
  cardNumber: this.cardFormData.cardNumber.replace(/\s/g, ""),
3754
3779
  expiryMonth: e,
3755
3780
  expiryYear: n,
@@ -3760,14 +3785,21 @@ let w = class extends se {
3760
3785
  });
3761
3786
  }
3762
3787
  handlePayNowPayment() {
3763
- !this.sdk || this.currentState.status !== "ready" || (this.paymentLocked = !0, this.sdk.submitPayment(M.PAYNOW, {
3788
+ !this.sdk || this.currentState.status !== "ready" || (this.paymentLocked = !0, this.sdk.submitPayment(A.PAYNOW, {
3764
3789
  firstName: this.firstName,
3765
3790
  lastName: this.lastName,
3766
3791
  email: this.email
3767
3792
  }));
3768
3793
  }
3769
3794
  handlePromptPayPayment() {
3770
- !this.sdk || this.currentState.status !== "ready" || (this.paymentLocked = !0, this.sdk.submitPayment(M.PROMPTPAY, {
3795
+ !this.sdk || this.currentState.status !== "ready" || (this.paymentLocked = !0, this.sdk.submitPayment(A.PROMPTPAY, {
3796
+ firstName: this.firstName,
3797
+ lastName: this.lastName,
3798
+ email: this.email
3799
+ }));
3800
+ }
3801
+ handleDuitNowPayment() {
3802
+ !this.sdk || this.currentState.status !== "ready" || (this.paymentLocked = !0, this.sdk.submitPayment(A.DUITNOW, {
3771
3803
  firstName: this.firstName,
3772
3804
  lastName: this.lastName,
3773
3805
  email: this.email
@@ -4061,7 +4093,7 @@ let w = class extends se {
4061
4093
  return C`
4062
4094
  <div class="paynow-container">
4063
4095
  <div class="paynow-instructions">
4064
- <h3 class="instructions-title">How to Pay with Prompt Pay:</h3>
4096
+ <h3 class="instructions-title">How to Pay with PromptPay:</h3>
4065
4097
 
4066
4098
  <div class="instruction-steps">
4067
4099
  <div class="instruction-step">
@@ -4093,6 +4125,42 @@ let w = class extends se {
4093
4125
  </div>
4094
4126
  `;
4095
4127
  }
4128
+ renderDuitNowContent() {
4129
+ return C`
4130
+ <div class="paynow-container">
4131
+ <div class="paynow-instructions">
4132
+ <h3 class="instructions-title">How to Pay with DuitNow:</h3>
4133
+
4134
+ <div class="instruction-steps">
4135
+ <div class="instruction-step">
4136
+ <div class="step-number">1</div>
4137
+ <p class="step-text">Click <strong>"Pay"</strong> to go to the payment page.</p>
4138
+ </div>
4139
+
4140
+ <div class="instruction-step">
4141
+ <div class="step-number">2</div>
4142
+ <p class="step-text">Scan the QR code with your banking app.</p>
4143
+ </div>
4144
+
4145
+ <div class="instruction-step">
4146
+ <div class="step-number">3</div>
4147
+ <p class="step-text">You'll be redirected back automatically.</p>
4148
+ </div>
4149
+ </div>
4150
+
4151
+ <div class="submit-section">
4152
+ <button
4153
+ class="pay-button ${this.currentState.status === "processing" || this.currentState.status === "requires_action" ? "loading" : ""}"
4154
+ @click=${this.handleDuitNowPayment}
4155
+ ?disabled=${this.currentState.status === "processing" || this.currentState.status === "requires_action"}
4156
+ >
4157
+ ${this.currentState.status === "processing" || this.currentState.status === "requires_action" ? "Redirecting..." : `Pay ${this.currency} ${this.amount.toFixed(2)}`}
4158
+ </button>
4159
+ </div>
4160
+ </div>
4161
+ </div>
4162
+ `;
4163
+ }
4096
4164
  render3DSModal() {
4097
4165
  return !this.show3DSModal || !this.nextActionUrl ? null : C`
4098
4166
  <div class="modal-overlay">
@@ -4151,16 +4219,18 @@ let w = class extends se {
4151
4219
  }
4152
4220
  const n = (s) => {
4153
4221
  switch (s) {
4154
- case M.CARD:
4222
+ case A.CARD:
4155
4223
  return "Card";
4156
- case M.PAYNOW:
4224
+ case A.PAYNOW:
4157
4225
  return "PayNow";
4158
- case M.PROMPTPAY:
4159
- return "Prompt Pay";
4226
+ case A.PROMPTPAY:
4227
+ return "PromptPay";
4228
+ case A.DUITNOW:
4229
+ return "DuitNow";
4160
4230
  default:
4161
4231
  return s;
4162
4232
  }
4163
- }, i = (s) => s === M.CARD ? C`
4233
+ }, i = (s) => s === A.CARD ? C`
4164
4234
  <div class="method-icon-right">
4165
4235
  <svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
4166
4236
  <path
@@ -4173,13 +4243,17 @@ let w = class extends se {
4173
4243
  />
4174
4244
  </svg>
4175
4245
  </div>
4176
- ` : s === M.PAYNOW ? C`
4246
+ ` : s === A.PAYNOW ? C`
4177
4247
  <div class="method-icon-right">
4178
4248
  <img src="${dr}" alt="PayNow" style="width: 45px; height: auto;" />
4179
4249
  </div>
4180
- ` : s === M.PROMPTPAY ? C`
4250
+ ` : s === A.PROMPTPAY ? C`
4251
+ <div class="method-icon-right">
4252
+ <img src="${ur}" alt="PromptPay" style="width: 45px; height: auto;" />
4253
+ </div>
4254
+ ` : s === A.DUITNOW ? C`
4181
4255
  <div class="method-icon-right">
4182
- <img src="${ur}" alt="Prompt Pay" style="width: 45px; height: auto;" />
4256
+ <img src="${hr}" alt="DuitNow" style="width: 45px; height: auto;" />
4183
4257
  </div>
4184
4258
  ` : null, o = [
4185
4259
  this.width ? `--one-payment-width: ${this.width}` : "",
@@ -4214,7 +4288,7 @@ let w = class extends se {
4214
4288
  ${i(s.id)}
4215
4289
  </div>
4216
4290
  ${l ? C`<div class="method-content">
4217
- ${s.id === M.CARD ? this.renderCardForm() : s.id === M.PAYNOW ? this.renderPayNowContent() : s.id === M.PROMPTPAY ? this.renderPromptPayContent() : null}
4291
+ ${s.id === A.CARD ? this.renderCardForm() : s.id === A.PAYNOW ? this.renderPayNowContent() : s.id === A.PROMPTPAY ? this.renderPromptPayContent() : s.id === A.DUITNOW ? this.renderDuitNowContent() : null}
4218
4292
  </div>` : ""}
4219
4293
  </div>
4220
4294
  `;
@@ -5587,69 +5661,69 @@ S([
5587
5661
  D({ type: Object })
5588
5662
  ], w.prototype, "appearance", 2);
5589
5663
  S([
5590
- _()
5664
+ M()
5591
5665
  ], w.prototype, "currentState", 2);
5592
5666
  S([
5593
- _()
5667
+ M()
5594
5668
  ], w.prototype, "selectedMethod", 2);
5595
5669
  S([
5596
- _()
5670
+ M()
5597
5671
  ], w.prototype, "cardFormData", 2);
5598
5672
  S([
5599
- _()
5673
+ M()
5600
5674
  ], w.prototype, "formErrors", 2);
5601
5675
  S([
5602
- _()
5676
+ M()
5603
5677
  ], w.prototype, "paymentData", 2);
5604
5678
  S([
5605
- _()
5679
+ M()
5606
5680
  ], w.prototype, "feesExpanded", 2);
5607
5681
  S([
5608
- _()
5682
+ M()
5609
5683
  ], w.prototype, "isInitializing", 2);
5610
5684
  S([
5611
- _()
5685
+ M()
5612
5686
  ], w.prototype, "cardBrand", 2);
5613
5687
  S([
5614
- _()
5688
+ M()
5615
5689
  ], w.prototype, "paymentLocked", 2);
5616
5690
  S([
5617
- _()
5691
+ M()
5618
5692
  ], w.prototype, "show3DSModal", 2);
5619
5693
  S([
5620
- _()
5694
+ M()
5621
5695
  ], w.prototype, "showQRModal", 2);
5622
5696
  S([
5623
- _()
5697
+ M()
5624
5698
  ], w.prototype, "nextActionUrl", 2);
5625
5699
  S([
5626
- _()
5700
+ M()
5627
5701
  ], w.prototype, "qrCode", 2);
5628
5702
  S([
5629
- _()
5703
+ M()
5630
5704
  ], w.prototype, "qrCodeDataUrl", 2);
5631
5705
  S([
5632
- _()
5706
+ M()
5633
5707
  ], w.prototype, "qrAutoResumeTimer", 2);
5634
5708
  S([
5635
- _()
5709
+ M()
5636
5710
  ], w.prototype, "qrPollingInProgress", 2);
5637
5711
  w = S([
5638
5712
  rr("one-payment")
5639
5713
  ], w);
5640
- const un = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5714
+ const hn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5641
5715
  __proto__: null,
5642
5716
  get OnePayment() {
5643
5717
  return w;
5644
5718
  }
5645
5719
  }, Symbol.toStringTag, { value: "Module" }));
5646
- function mn() {
5647
- customElements.get("one-payment") || Promise.resolve().then(() => un).then(({ OnePayment: t }) => {
5720
+ function fn() {
5721
+ customElements.get("one-payment") || Promise.resolve().then(() => hn).then(({ OnePayment: t }) => {
5648
5722
  customElements.define("one-payment", t);
5649
5723
  });
5650
5724
  }
5651
5725
  export {
5652
5726
  w as OnePayment,
5653
5727
  w as OnePaymentElement,
5654
- mn as defineCustomElements
5728
+ fn as defineCustomElements
5655
5729
  };