@one-payments/web-components 1.4.0 → 1.5.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 +650 -410
- package/dist/one-payment.d.ts +6 -0
- package/dist/one-payment.d.ts.map +1 -1
- package/dist/one-payment.js +272 -3
- package/dist/one-payment.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
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,
|
|
6
|
+
const ye = globalThis, qe = ye.ShadowRoot && (ye.ShadyCSS === void 0 || ye.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, He = Symbol(), Ze = /* @__PURE__ */ new WeakMap();
|
|
7
7
|
let ht = class {
|
|
8
8
|
constructor(e, r, n) {
|
|
9
|
-
if (this._$cssResult$ = !0, n !==
|
|
9
|
+
if (this._$cssResult$ = !0, n !== He) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
10
10
|
this.cssText = e, this.t = r;
|
|
11
11
|
}
|
|
12
12
|
get styleSheet() {
|
|
@@ -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 =
|
|
17
|
+
n && (e = Ze.get(r)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), n && Ze.set(r, e));
|
|
18
18
|
}
|
|
19
19
|
return e;
|
|
20
20
|
}
|
|
@@ -22,33 +22,33 @@ let ht = class {
|
|
|
22
22
|
return this.cssText;
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
|
-
const
|
|
25
|
+
const Bt = (t) => new ht(typeof t == "string" ? t : t + "", void 0, He), Lt = (t, ...e) => {
|
|
26
26
|
const r = t.length === 1 ? t[0] : e.reduce((n, i, o) => n + ((s) => {
|
|
27
27
|
if (s._$cssResult$ === !0) return s.cssText;
|
|
28
28
|
if (typeof s == "number") return s;
|
|
29
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
30
|
})(i) + t[o + 1], t[0]);
|
|
31
|
-
return new ht(r, t,
|
|
32
|
-
},
|
|
31
|
+
return new ht(r, t, He);
|
|
32
|
+
}, Ut = (t, e) => {
|
|
33
33
|
if (qe) t.adoptedStyleSheets = e.map((r) => r instanceof CSSStyleSheet ? r : r.styleSheet);
|
|
34
34
|
else for (const r of e) {
|
|
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
|
-
},
|
|
38
|
+
}, Je = qe ? (t) => t : (t) => t instanceof CSSStyleSheet ? ((e) => {
|
|
39
39
|
let r = "";
|
|
40
40
|
for (const n of e.cssRules) r += n.cssText;
|
|
41
|
-
return
|
|
41
|
+
return Bt(r);
|
|
42
42
|
})(t) : t;
|
|
43
43
|
/**
|
|
44
44
|
* @license
|
|
45
45
|
* Copyright 2017 Google LLC
|
|
46
46
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
47
47
|
*/
|
|
48
|
-
const { is:
|
|
48
|
+
const { is: Ft, defineProperty: Ot, getOwnPropertyDescriptor: zt, getOwnPropertyNames: qt, getOwnPropertySymbols: Ht, getPrototypeOf: Yt } = Object, z = globalThis, Xe = z.trustedTypes, Vt = Xe ? Xe.emptyScript : "", _e = z.reactiveElementPolyfillSupport, ie = (t, e) => t, be = { toAttribute(t, e) {
|
|
49
49
|
switch (e) {
|
|
50
50
|
case Boolean:
|
|
51
|
-
t = t ?
|
|
51
|
+
t = t ? Vt : null;
|
|
52
52
|
break;
|
|
53
53
|
case Object:
|
|
54
54
|
case Array:
|
|
@@ -73,7 +73,7 @@ const { is: Ut, defineProperty: Ot, getOwnPropertyDescriptor: zt, getOwnProperty
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
return r;
|
|
76
|
-
} },
|
|
76
|
+
} }, Ye = (t, e) => !Ft(t, e), et = { attribute: !0, type: String, converter: be, reflect: !1, useDefault: !1, hasChanged: Ye };
|
|
77
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) {
|
|
@@ -104,13 +104,13 @@ let K = class extends HTMLElement {
|
|
|
104
104
|
}
|
|
105
105
|
static _$Ei() {
|
|
106
106
|
if (this.hasOwnProperty(ie("elementProperties"))) return;
|
|
107
|
-
const e =
|
|
107
|
+
const e = Yt(this);
|
|
108
108
|
e.finalize(), e.l !== void 0 && (this.l = [...e.l]), this.elementProperties = new Map(e.elementProperties);
|
|
109
109
|
}
|
|
110
110
|
static finalize() {
|
|
111
111
|
if (this.hasOwnProperty(ie("finalized"))) return;
|
|
112
112
|
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(ie("properties"))) {
|
|
113
|
-
const r = this.properties, n = [...qt(r), ...
|
|
113
|
+
const r = this.properties, n = [...qt(r), ...Ht(r)];
|
|
114
114
|
for (const i of n) this.createProperty(i, r[i]);
|
|
115
115
|
}
|
|
116
116
|
const e = this[Symbol.metadata];
|
|
@@ -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(
|
|
133
|
-
} else e !== void 0 && r.push(
|
|
132
|
+
for (const i of n) r.unshift(Je(i));
|
|
133
|
+
} else e !== void 0 && r.push(Je(e));
|
|
134
134
|
return r;
|
|
135
135
|
}
|
|
136
136
|
static _$Eu(e, r) {
|
|
@@ -159,7 +159,7 @@ let K = class extends HTMLElement {
|
|
|
159
159
|
}
|
|
160
160
|
createRenderRoot() {
|
|
161
161
|
const e = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
162
|
-
return
|
|
162
|
+
return Ut(e, this.constructor.elementStyles), e;
|
|
163
163
|
}
|
|
164
164
|
connectedCallback() {
|
|
165
165
|
var e;
|
|
@@ -202,7 +202,7 @@ let K = class extends HTMLElement {
|
|
|
202
202
|
var i;
|
|
203
203
|
if (e !== void 0) {
|
|
204
204
|
const o = this.constructor, s = this[e];
|
|
205
|
-
if (n ?? (n = o.getPropertyOptions(e)), !((n.hasChanged ??
|
|
205
|
+
if (n ?? (n = o.getPropertyOptions(e)), !((n.hasChanged ?? Ye)(s, r) || n.useDefault && n.reflect && s === ((i = this._$Ej) == null ? void 0 : i.get(e)) && !this.hasAttribute(o._$Eu(e, n)))) return;
|
|
206
206
|
this.C(e, r, n);
|
|
207
207
|
}
|
|
208
208
|
this.isUpdatePending === !1 && (this._$ES = this._$EP());
|
|
@@ -278,28 +278,28 @@ 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(),
|
|
281
|
+
K.elementStyles = [], K.shadowRootOptions = { mode: "open" }, K[ie("elementProperties")] = /* @__PURE__ */ new Map(), K[ie("finalized")] = /* @__PURE__ */ new Map(), _e == null || _e({ 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 oe = globalThis, ve = oe.trustedTypes, tt = ve ? ve.createPolicy("lit-html", { createHTML: (t) => t }) : void 0, pt = "$lit$",
|
|
288
|
-
\f\r]`, ne = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, rt = /-->/g, nt = />/g,
|
|
289
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), it = /'/g, ot = /"/g, ft = /^(?:script|style|textarea|title)$/i, Kt = (t) => (e, ...r) => ({ _$litType$: t, strings: e, values: r }),
|
|
287
|
+
const oe = globalThis, ve = oe.trustedTypes, tt = ve ? ve.createPolicy("lit-html", { createHTML: (t) => t }) : void 0, pt = "$lit$", F = `lit$${Math.random().toFixed(9).slice(2)}$`, mt = "?" + F, jt = `<${mt}>`, Q = document, le = () => Q.createComment(""), ce = (t) => t === null || typeof t != "object" && typeof t != "function", Ve = Array.isArray, Qt = (t) => Ve(t) || typeof (t == null ? void 0 : t[Symbol.iterator]) == "function", Ie = `[
|
|
288
|
+
\f\r]`, ne = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, rt = /-->/g, nt = />/g, H = RegExp(`>|${Ie}(?:([^\\s"'>=/]+)(${Ie}*=${Ie}*(?:[^
|
|
289
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), it = /'/g, ot = /"/g, ft = /^(?:script|style|textarea|title)$/i, Kt = (t) => (e, ...r) => ({ _$litType$: t, strings: e, values: r }), x = Kt(1), W = Symbol.for("lit-noChange"), I = Symbol.for("lit-nothing"), st = /* @__PURE__ */ new WeakMap(), Y = Q.createTreeWalker(Q, 129);
|
|
290
290
|
function gt(t, e) {
|
|
291
|
-
if (!
|
|
291
|
+
if (!Ve(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
292
292
|
return tt !== void 0 ? tt.createHTML(e) : e;
|
|
293
293
|
}
|
|
294
|
-
const
|
|
294
|
+
const Gt = (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
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 =
|
|
301
|
-
const u = s ===
|
|
302
|
-
o += s === ne ? a + jt : h >= 0 ? (n.push(c), a.slice(0, h) + pt + a.slice(h) +
|
|
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 = H) : d[3] !== void 0 && (s = H) : s === H ? 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 ? H : d[3] === '"' ? ot : it) : s === ot || s === it ? s = H : s === rt || s === nt ? s = ne : (s = H, i = void 0);
|
|
301
|
+
const u = s === H && t[l + 1].startsWith("/>") ? " " : "";
|
|
302
|
+
o += s === ne ? a + jt : h >= 0 ? (n.push(c), a.slice(0, h) + pt + a.slice(h) + F + u) : a + F + (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] =
|
|
312
|
-
if (this.el = de.createElement(c, n),
|
|
311
|
+
const l = e.length - 1, a = this.parts, [c, d] = Gt(e, r);
|
|
312
|
+
if (this.el = de.createElement(c, n), 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 =
|
|
316
|
+
for (; (i = Y.nextNode()) !== null && a.length < l; ) {
|
|
317
317
|
if (i.nodeType === 1) {
|
|
318
318
|
if (i.hasAttributes()) for (const h of i.getAttributeNames()) if (h.endsWith(pt)) {
|
|
319
|
-
const p = d[s++], u = i.getAttribute(h).split(
|
|
320
|
-
a.push({ type: 1, index: o, name: m[2], strings: u, ctor: m[1] === "." ?
|
|
321
|
-
} else h.startsWith(
|
|
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] === "." ? Zt : m[1] === "?" ? Jt : m[1] === "@" ? Xt : Se }), i.removeAttribute(h);
|
|
321
|
+
} else h.startsWith(F) && (a.push({ type: 6, index: o }), i.removeAttribute(h));
|
|
322
322
|
if (ft.test(i.tagName)) {
|
|
323
|
-
const h = i.textContent.split(
|
|
323
|
+
const h = i.textContent.split(F), p = h.length - 1;
|
|
324
324
|
if (p > 0) {
|
|
325
325
|
i.textContent = ve ? ve.emptyScript : "";
|
|
326
|
-
for (let u = 0; u < p; u++) i.append(h[u], le()),
|
|
326
|
+
for (let u = 0; u < p; u++) i.append(h[u], le()), Y.nextNode(), a.push({ type: 2, index: ++o });
|
|
327
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
332
|
let h = -1;
|
|
333
|
-
for (; (h = i.data.indexOf(
|
|
333
|
+
for (; (h = i.data.indexOf(F, h + 1)) !== -1; ) a.push({ type: 7, index: o }), h += F.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
|
|
343
|
+
function Z(t, e, r = t, n) {
|
|
344
344
|
var s, l;
|
|
345
|
-
if (e ===
|
|
345
|
+
if (e === W) 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 =
|
|
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 = Z(t, i._$AS(t, e.values), i, n)), e;
|
|
349
349
|
}
|
|
350
|
-
class
|
|
350
|
+
class Wt {
|
|
351
351
|
constructor(e, r) {
|
|
352
352
|
this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = r;
|
|
353
353
|
}
|
|
@@ -359,16 +359,16 @@ class Zt {
|
|
|
359
359
|
}
|
|
360
360
|
u(e) {
|
|
361
361
|
const { el: { content: r }, parts: n } = this._$AD, i = ((e == null ? void 0 : e.creationScope) ?? Q).importNode(r, !0);
|
|
362
|
-
|
|
363
|
-
let o =
|
|
362
|
+
Y.currentNode = i;
|
|
363
|
+
let o = Y.nextNode(), s = 0, l = 0, a = n[0];
|
|
364
364
|
for (; a !== void 0; ) {
|
|
365
365
|
if (s === a.index) {
|
|
366
366
|
let c;
|
|
367
367
|
a.type === 2 ? c = new he(o, o.nextSibling, this, e) : a.type === 1 ? c = new a.ctor(o, a.name, a.strings, this, e) : a.type === 6 && (c = new er(o, this, e)), this._$AV.push(c), a = n[++l];
|
|
368
368
|
}
|
|
369
|
-
s !== (a == null ? void 0 : a.index) && (o =
|
|
369
|
+
s !== (a == null ? void 0 : a.index) && (o = Y.nextNode(), s++);
|
|
370
370
|
}
|
|
371
|
-
return
|
|
371
|
+
return Y.currentNode = Q, i;
|
|
372
372
|
}
|
|
373
373
|
p(e) {
|
|
374
374
|
let r = 0;
|
|
@@ -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 =
|
|
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;
|
|
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 =
|
|
398
|
+
e = Z(this, e, r), ce(e) ? e === I || e == null || e === "" ? (this._$AH !== I && this._$AR(), this._$AH = I) : e !== this._$AH && e !== W && 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 !==
|
|
407
|
+
this._$AH !== I && 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
|
|
414
|
+
const s = new Wt(i, this), l = s.u(this.options);
|
|
415
415
|
s.p(r), this.T(l), this._$AH = s;
|
|
416
416
|
}
|
|
417
417
|
}
|
|
@@ -420,7 +420,7 @@ class he {
|
|
|
420
420
|
return r === void 0 && st.set(e.strings, r = new de(e)), r;
|
|
421
421
|
}
|
|
422
422
|
k(e) {
|
|
423
|
-
|
|
423
|
+
Ve(this._$AH) || (this._$AH = [], this._$AR());
|
|
424
424
|
const r = this._$AH;
|
|
425
425
|
let n, i = 0;
|
|
426
426
|
for (const o of e) i === r.length ? r.push(n = new he(this.O(le()), this.O(le()), this, this.options)) : n = r[i], n._$AI(o), i++;
|
|
@@ -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 =
|
|
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;
|
|
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 =
|
|
454
|
+
if (o === void 0) e = Z(this, e, r, 0), s = !ce(e) || e !== this._$AH && e !== W, 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 =
|
|
458
|
+
for (e = 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 = !ce(c) || c !== this._$AH[a]), c === I ? e = I : e !== I && (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 ===
|
|
463
|
+
e === I ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
|
|
464
464
|
}
|
|
465
465
|
}
|
|
466
|
-
class
|
|
466
|
+
class Zt extends Se {
|
|
467
467
|
constructor() {
|
|
468
468
|
super(...arguments), this.type = 3;
|
|
469
469
|
}
|
|
470
470
|
j(e) {
|
|
471
|
-
this.element[this.name] = e ===
|
|
471
|
+
this.element[this.name] = e === I ? void 0 : e;
|
|
472
472
|
}
|
|
473
473
|
}
|
|
474
|
-
class
|
|
474
|
+
class Jt 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 !==
|
|
479
|
+
this.element.toggleAttribute(this.name, !!e && e !== I);
|
|
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 =
|
|
488
|
-
const n = this._$AH, i = e ===
|
|
487
|
+
if ((e = Z(this, e, r, 0) ?? I) === W) 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);
|
|
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
|
-
|
|
504
|
+
Z(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
|
|
546
|
+
return W;
|
|
547
547
|
}
|
|
548
548
|
}
|
|
549
549
|
var ut;
|
|
@@ -566,7 +566,7 @@ const rr = (t) => (e, 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: be, reflect: !1, hasChanged:
|
|
569
|
+
const nr = { attribute: !0, type: String, converter: be, reflect: !1, hasChanged: Ye }, ir = (t = nr, e, r) => {
|
|
570
570
|
const { kind: n, metadata: i } = r;
|
|
571
571
|
let o = globalThis.litPropertyMetadata.get(i);
|
|
572
572
|
if (o === void 0 && globalThis.litPropertyMetadata.set(i, o = /* @__PURE__ */ new Map()), n === "setter" && ((t = Object.create(t)).wrapped = !0), o.set(r.name, t), n === "accessor") {
|
|
@@ -604,12 +604,15 @@ function M(t) {
|
|
|
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
|
|
607
|
+
var w = {
|
|
608
608
|
CARD: "card",
|
|
609
609
|
PAYNOW: "paynow",
|
|
610
610
|
PROMPTPAY: "promptpay",
|
|
611
|
-
DUITNOW: "duitnow"
|
|
612
|
-
|
|
611
|
+
DUITNOW: "duitnow",
|
|
612
|
+
GOPAY: "gopay",
|
|
613
|
+
BOOST: "boost",
|
|
614
|
+
SHOPEEPAY: "shopeepay"
|
|
615
|
+
}, T = {
|
|
613
616
|
IDLE: "idle",
|
|
614
617
|
INITIALIZING: "initializing",
|
|
615
618
|
READY: "ready",
|
|
@@ -756,7 +759,7 @@ function lr(t) {
|
|
|
756
759
|
var cr = class {
|
|
757
760
|
// Flag to ignore qrCode after user scans it
|
|
758
761
|
constructor(t, e) {
|
|
759
|
-
this.state = { status:
|
|
762
|
+
this.state = { status: T.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;
|
|
760
763
|
}
|
|
761
764
|
/**
|
|
762
765
|
* Get the API base URL - uses apiBaseUrl if provided, otherwise derives from environment
|
|
@@ -911,7 +914,7 @@ var cr = class {
|
|
|
911
914
|
* @public
|
|
912
915
|
*/
|
|
913
916
|
async initialize(t) {
|
|
914
|
-
this.setState({ status:
|
|
917
|
+
this.setState({ status: T.INITIALIZING }), this.emit({
|
|
915
918
|
type: "initialize",
|
|
916
919
|
payload: t
|
|
917
920
|
});
|
|
@@ -946,7 +949,7 @@ var cr = class {
|
|
|
946
949
|
id: this.paymentIntentId,
|
|
947
950
|
amount: l.result.customerAmount || t.amount,
|
|
948
951
|
currency: l.result.currency || t.currency,
|
|
949
|
-
status:
|
|
952
|
+
status: T.READY,
|
|
950
953
|
...t.metadata && { metadata: t.metadata }
|
|
951
954
|
}, d = [];
|
|
952
955
|
let h = 0;
|
|
@@ -968,9 +971,21 @@ var cr = class {
|
|
|
968
971
|
id: "duitnow",
|
|
969
972
|
enabled: !0,
|
|
970
973
|
priority: h++
|
|
974
|
+
}), (u.includes("gopay") || u.includes("go pay") || m.includes("payments_go_pay")) && d.push({
|
|
975
|
+
id: "gopay",
|
|
976
|
+
enabled: !0,
|
|
977
|
+
priority: h++
|
|
978
|
+
}), (u.includes("boost") || m.includes("payments_boost")) && d.push({
|
|
979
|
+
id: "boost",
|
|
980
|
+
enabled: !0,
|
|
981
|
+
priority: h++
|
|
982
|
+
}), (u.includes("shopeepay") || u.includes("shopee pay") || u.includes("shopee_pay") || m.includes("payments_shopee_pay")) && d.push({
|
|
983
|
+
id: "shopeepay",
|
|
984
|
+
enabled: !0,
|
|
985
|
+
priority: h++
|
|
971
986
|
});
|
|
972
987
|
}), this.setState({
|
|
973
|
-
status:
|
|
988
|
+
status: T.READY,
|
|
974
989
|
paymentIntent: c,
|
|
975
990
|
availableMethods: d
|
|
976
991
|
}), this.emit({
|
|
@@ -987,7 +1002,7 @@ var cr = class {
|
|
|
987
1002
|
timestamp: this.adapters.timer.now()
|
|
988
1003
|
};
|
|
989
1004
|
throw this.setState({
|
|
990
|
-
status:
|
|
1005
|
+
status: T.FAILED,
|
|
991
1006
|
error: r
|
|
992
1007
|
}), this.emit({
|
|
993
1008
|
type: "payment_failed",
|
|
@@ -1055,7 +1070,7 @@ var cr = class {
|
|
|
1055
1070
|
if (!this.paymentToken)
|
|
1056
1071
|
throw new Error("Cannot submit payment: No payment token available");
|
|
1057
1072
|
this.ignore3DSInPolling = !1, this.ignoreQRInPolling = !1, this.setState({
|
|
1058
|
-
status:
|
|
1073
|
+
status: T.PROCESSING,
|
|
1059
1074
|
paymentIntent: r.paymentIntent,
|
|
1060
1075
|
selectedMethod: t,
|
|
1061
1076
|
availableMethods: r.availableMethods
|
|
@@ -1067,7 +1082,24 @@ var cr = class {
|
|
|
1067
1082
|
}
|
|
1068
1083
|
});
|
|
1069
1084
|
try {
|
|
1070
|
-
const a = {
|
|
1085
|
+
const a = (d) => {
|
|
1086
|
+
switch (d) {
|
|
1087
|
+
case "paynow":
|
|
1088
|
+
return "qr";
|
|
1089
|
+
case "promptpay":
|
|
1090
|
+
return "prompt_pay";
|
|
1091
|
+
case "duitnow":
|
|
1092
|
+
return "duit_now";
|
|
1093
|
+
case "gopay":
|
|
1094
|
+
return "go_pay";
|
|
1095
|
+
case "boost":
|
|
1096
|
+
return "boost";
|
|
1097
|
+
case "shopeepay":
|
|
1098
|
+
return "shopee_pay";
|
|
1099
|
+
default:
|
|
1100
|
+
return "qr";
|
|
1101
|
+
}
|
|
1102
|
+
}, c = {
|
|
1071
1103
|
firstName: String(e.firstName),
|
|
1072
1104
|
lastName: String(e.lastName),
|
|
1073
1105
|
email: String(e.email),
|
|
@@ -1079,12 +1111,11 @@ var cr = class {
|
|
|
1079
1111
|
expiryYear: String(e.expiryYear),
|
|
1080
1112
|
cvc: String(e.cvv)
|
|
1081
1113
|
}
|
|
1082
|
-
} :
|
|
1083
|
-
// PayNow
|
|
1114
|
+
} : { type: a(t) }
|
|
1084
1115
|
};
|
|
1085
1116
|
return await this.adapters.http.patch(
|
|
1086
1117
|
`${this.getApiBaseUrl()}/payment-intent/confirm`,
|
|
1087
|
-
|
|
1118
|
+
c,
|
|
1088
1119
|
{
|
|
1089
1120
|
"x-token": this.paymentToken
|
|
1090
1121
|
}
|
|
@@ -1092,7 +1123,7 @@ var cr = class {
|
|
|
1092
1123
|
id: this.paymentIntentId || "",
|
|
1093
1124
|
amount: r.paymentIntent.amount,
|
|
1094
1125
|
currency: r.paymentIntent.currency,
|
|
1095
|
-
status:
|
|
1126
|
+
status: T.PROCESSING
|
|
1096
1127
|
};
|
|
1097
1128
|
} catch (a) {
|
|
1098
1129
|
let c = "Unknown error", d = "PAYMENT_FAILED";
|
|
@@ -1112,7 +1143,7 @@ var cr = class {
|
|
|
1112
1143
|
timestamp: this.adapters.timer.now()
|
|
1113
1144
|
};
|
|
1114
1145
|
throw this.setState({
|
|
1115
|
-
status:
|
|
1146
|
+
status: T.FAILED,
|
|
1116
1147
|
error: h,
|
|
1117
1148
|
paymentIntent: r.paymentIntent
|
|
1118
1149
|
}), this.emit({
|
|
@@ -1276,6 +1307,36 @@ var cr = class {
|
|
|
1276
1307
|
});
|
|
1277
1308
|
return;
|
|
1278
1309
|
}
|
|
1310
|
+
if (e.selectedMethod === "gopay") {
|
|
1311
|
+
this.stopPolling(), this.emit({
|
|
1312
|
+
type: "gopay_redirect",
|
|
1313
|
+
payload: {
|
|
1314
|
+
redirectUrl: t.nextActionUrl,
|
|
1315
|
+
methodId: e.selectedMethod
|
|
1316
|
+
}
|
|
1317
|
+
});
|
|
1318
|
+
return;
|
|
1319
|
+
}
|
|
1320
|
+
if (e.selectedMethod === "boost") {
|
|
1321
|
+
this.stopPolling(), this.emit({
|
|
1322
|
+
type: "boost_redirect",
|
|
1323
|
+
payload: {
|
|
1324
|
+
redirectUrl: t.nextActionUrl,
|
|
1325
|
+
methodId: e.selectedMethod
|
|
1326
|
+
}
|
|
1327
|
+
});
|
|
1328
|
+
return;
|
|
1329
|
+
}
|
|
1330
|
+
if (e.selectedMethod === "shopeepay") {
|
|
1331
|
+
this.stopPolling(), this.emit({
|
|
1332
|
+
type: "shopeepay_redirect",
|
|
1333
|
+
payload: {
|
|
1334
|
+
redirectUrl: t.nextActionUrl,
|
|
1335
|
+
methodId: e.selectedMethod
|
|
1336
|
+
}
|
|
1337
|
+
});
|
|
1338
|
+
return;
|
|
1339
|
+
}
|
|
1279
1340
|
if (e.selectedMethod === "paynow" && !this.ignoreQRInPolling) {
|
|
1280
1341
|
this.emit({
|
|
1281
1342
|
type: "qr_code_received",
|
|
@@ -1291,11 +1352,11 @@ var cr = class {
|
|
|
1291
1352
|
id: t.paymentIntentId,
|
|
1292
1353
|
amount: t.amount ?? e.paymentIntent.amount,
|
|
1293
1354
|
currency: t.currency ?? e.paymentIntent.currency,
|
|
1294
|
-
status:
|
|
1355
|
+
status: T.REQUIRES_ACTION,
|
|
1295
1356
|
...t.metadata && { metadata: t.metadata }
|
|
1296
1357
|
};
|
|
1297
1358
|
this.setState({
|
|
1298
|
-
status:
|
|
1359
|
+
status: T.REQUIRES_ACTION,
|
|
1299
1360
|
paymentIntent: n,
|
|
1300
1361
|
actionUrl: t.nextActionUrl,
|
|
1301
1362
|
selectedMethod: e.selectedMethod,
|
|
@@ -1319,7 +1380,7 @@ var cr = class {
|
|
|
1319
1380
|
};
|
|
1320
1381
|
if (t.status === "succeeded")
|
|
1321
1382
|
this.stopPolling(), this.setState({
|
|
1322
|
-
status:
|
|
1383
|
+
status: T.SUCCEEDED,
|
|
1323
1384
|
paymentIntent: r,
|
|
1324
1385
|
selectedMethod: e.selectedMethod
|
|
1325
1386
|
}), this.emit({
|
|
@@ -1337,7 +1398,7 @@ var cr = class {
|
|
|
1337
1398
|
timestamp: this.adapters.timer.now()
|
|
1338
1399
|
};
|
|
1339
1400
|
this.setState({
|
|
1340
|
-
status:
|
|
1401
|
+
status: T.FAILED,
|
|
1341
1402
|
error: i,
|
|
1342
1403
|
paymentIntent: r
|
|
1343
1404
|
}), this.emit({
|
|
@@ -1373,37 +1434,37 @@ var cr = class {
|
|
|
1373
1434
|
r(t);
|
|
1374
1435
|
});
|
|
1375
1436
|
}
|
|
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",
|
|
1437
|
+
}, 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", G = typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, V = function(t, e, r, n, i, o, s, l, a, c) {
|
|
1377
1438
|
var d = this;
|
|
1378
|
-
d.numeralDecimalMark = t || ".", d.numeralIntegerScale = e > 0 ? e : 0, d.numeralDecimalScale = r >= 0 ? r : 2, d.numeralThousandsGroupStyle = n ||
|
|
1439
|
+
d.numeralDecimalMark = t || ".", d.numeralIntegerScale = e > 0 ? e : 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") : "";
|
|
1379
1440
|
};
|
|
1380
|
-
|
|
1441
|
+
V.groupStyle = {
|
|
1381
1442
|
thousand: "thousand",
|
|
1382
1443
|
lakh: "lakh",
|
|
1383
1444
|
wan: "wan",
|
|
1384
1445
|
none: "none"
|
|
1385
1446
|
};
|
|
1386
|
-
|
|
1447
|
+
V.prototype = {
|
|
1387
1448
|
getRawValue: function(t) {
|
|
1388
1449
|
return t.replace(this.delimiterRE, "").replace(this.numeralDecimalMark, ".");
|
|
1389
1450
|
},
|
|
1390
1451
|
format: function(t) {
|
|
1391
1452
|
var e = this, r, n, i, o, s = "";
|
|
1392
1453
|
switch (t = t.replace(/[A-Za-z]/g, "").replace(e.numeralDecimalMark, "M").replace(/[^\dM-]/g, "").replace(/^\-/, "N").replace(/\-/g, "").replace("N", e.numeralPositiveOnly ? "" : "-").replace("M", e.numeralDecimalMark), e.stripLeadingZeroes && (t = t.replace(/^(-)?0+(?=\d)/, "$1")), n = t.slice(0, 1) === "-" ? "-" : "", typeof e.prefix < "u" ? e.signBeforePrefix ? i = n + e.prefix : i = e.prefix + n : i = n, o = t, t.indexOf(e.numeralDecimalMark) >= 0 && (r = t.split(e.numeralDecimalMark), o = r[0], s = e.numeralDecimalMark + r[1].slice(0, e.numeralDecimalScale)), n === "-" && (o = o.slice(1)), e.numeralIntegerScale > 0 && (o = o.slice(0, e.numeralIntegerScale)), e.numeralThousandsGroupStyle) {
|
|
1393
|
-
case
|
|
1454
|
+
case V.groupStyle.lakh:
|
|
1394
1455
|
o = o.replace(/(\d)(?=(\d\d)+\d$)/g, "$1" + e.delimiter);
|
|
1395
1456
|
break;
|
|
1396
|
-
case
|
|
1457
|
+
case V.groupStyle.wan:
|
|
1397
1458
|
o = o.replace(/(\d)(?=(\d{4})+$)/g, "$1" + e.delimiter);
|
|
1398
1459
|
break;
|
|
1399
|
-
case
|
|
1460
|
+
case V.groupStyle.thousand:
|
|
1400
1461
|
o = o.replace(/(\d)(?=(\d{3})+$)/g, "$1" + e.delimiter);
|
|
1401
1462
|
break;
|
|
1402
1463
|
}
|
|
1403
1464
|
return e.tailPrefix ? n + o.toString() + (e.numeralDecimalScale > 0 ? s.toString() : "") + e.prefix : i + o.toString() + (e.numeralDecimalScale > 0 ? s.toString() : "");
|
|
1404
1465
|
}
|
|
1405
1466
|
};
|
|
1406
|
-
var
|
|
1467
|
+
var gr = V, yt = function(t, e, r) {
|
|
1407
1468
|
var n = this;
|
|
1408
1469
|
n.date = [], n.blocks = [], n.datePattern = t, n.dateMin = e.split("-").reverse().map(function(i) {
|
|
1409
1470
|
return parseInt(i, 10);
|
|
@@ -1444,21 +1505,21 @@ yt.prototype = {
|
|
|
1444
1505
|
},
|
|
1445
1506
|
getFixedDateString: function(t) {
|
|
1446
1507
|
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,
|
|
1508
|
+
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, E) {
|
|
1448
1509
|
switch (y) {
|
|
1449
1510
|
case "d":
|
|
1450
|
-
i =
|
|
1511
|
+
i = E;
|
|
1451
1512
|
break;
|
|
1452
1513
|
case "m":
|
|
1453
|
-
o =
|
|
1514
|
+
o = E;
|
|
1454
1515
|
break;
|
|
1455
1516
|
default:
|
|
1456
|
-
s =
|
|
1517
|
+
s = E;
|
|
1457
1518
|
break;
|
|
1458
1519
|
}
|
|
1459
1520
|
}), 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;
|
|
1460
|
-
var m = n.length === 0 ? t : r.reduce(function(y,
|
|
1461
|
-
switch (
|
|
1521
|
+
var m = n.length === 0 ? t : r.reduce(function(y, E) {
|
|
1522
|
+
switch (E) {
|
|
1462
1523
|
case "d":
|
|
1463
1524
|
return y + (n[0] === 0 ? "" : e.addLeadingZero(n[0]));
|
|
1464
1525
|
case "m":
|
|
@@ -1490,7 +1551,7 @@ yt.prototype = {
|
|
|
1490
1551
|
return e ? (t < 10 ? "000" : t < 100 ? "00" : t < 1e3 ? "0" : "") + t : (t < 10 ? "0" : "") + t;
|
|
1491
1552
|
}
|
|
1492
1553
|
};
|
|
1493
|
-
var
|
|
1554
|
+
var yr = yt, bt = function(t, e) {
|
|
1494
1555
|
var r = this;
|
|
1495
1556
|
r.time = [], r.blocks = [], r.timePattern = t, r.timeFormat = e, r.initBlocks();
|
|
1496
1557
|
};
|
|
@@ -1583,7 +1644,7 @@ bt.prototype = {
|
|
|
1583
1644
|
return (t < 10 ? "0" : "") + t;
|
|
1584
1645
|
}
|
|
1585
1646
|
};
|
|
1586
|
-
var
|
|
1647
|
+
var br = bt, vt = function(t, e) {
|
|
1587
1648
|
var r = this;
|
|
1588
1649
|
r.delimiter = e || e === "" ? e : " ", r.delimiterRE = e ? new RegExp("\\" + e, "g") : "", r.formatter = t;
|
|
1589
1650
|
};
|
|
@@ -1599,7 +1660,7 @@ vt.prototype = {
|
|
|
1599
1660
|
return r = r.replace(/[()]/g, ""), r = r.replace(/[\s-]/g, e.delimiter), r;
|
|
1600
1661
|
}
|
|
1601
1662
|
};
|
|
1602
|
-
var
|
|
1663
|
+
var vr = vt, Le = {
|
|
1603
1664
|
blocks: {
|
|
1604
1665
|
uatp: [4, 5, 6],
|
|
1605
1666
|
amex: [4, 6, 5],
|
|
@@ -1651,7 +1712,7 @@ var gr = vt, Be = {
|
|
|
1651
1712
|
return t.concat(19 - e);
|
|
1652
1713
|
},
|
|
1653
1714
|
getInfo: function(t, e) {
|
|
1654
|
-
var r =
|
|
1715
|
+
var r = Le.blocks, n = Le.re;
|
|
1655
1716
|
e = !!e;
|
|
1656
1717
|
for (var i in n)
|
|
1657
1718
|
if (n[i].test(t)) {
|
|
@@ -1666,7 +1727,7 @@ var gr = vt, Be = {
|
|
|
1666
1727
|
blocks: e ? this.getStrictBlocks(r.general) : r.general
|
|
1667
1728
|
};
|
|
1668
1729
|
}
|
|
1669
|
-
},
|
|
1730
|
+
}, wr = Le, xr = {
|
|
1670
1731
|
noop: function() {
|
|
1671
1732
|
},
|
|
1672
1733
|
strip: function(t, e) {
|
|
@@ -1795,15 +1856,15 @@ var gr = vt, Be = {
|
|
|
1795
1856
|
isAndroidBackspaceKeydown: function(t, e) {
|
|
1796
1857
|
return !this.isAndroid() || !t || !e ? !1 : e === t.slice(0, -1);
|
|
1797
1858
|
}
|
|
1798
|
-
},
|
|
1859
|
+
}, Sr = xr, Pr = {
|
|
1799
1860
|
// Maybe change to object-assign
|
|
1800
1861
|
// for now just keep it as simple
|
|
1801
1862
|
assign: function(t, e) {
|
|
1802
1863
|
return t = t || {}, e = e || {}, t.creditCard = !!e.creditCard, t.creditCardStrictMode = !!e.creditCardStrictMode, t.creditCardType = "", t.onCreditCardTypeChanged = e.onCreditCardTypeChanged || 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
|
|
1864
|
+
}, 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 G == "object" && G ? G : window, t.document = e.document || t.root.document, t.maxLength = 0, t.backspace = !1, t.result = "", t.onValueChanged = e.onValueChanged || function() {
|
|
1804
1865
|
}, t;
|
|
1805
1866
|
}
|
|
1806
|
-
},
|
|
1867
|
+
}, kr = Pr, P = function(t, e) {
|
|
1807
1868
|
var r = this, n = !1;
|
|
1808
1869
|
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)
|
|
1809
1870
|
throw new Error("[cleave.js] Please check the element");
|
|
@@ -1812,16 +1873,16 @@ var gr = vt, Be = {
|
|
|
1812
1873
|
console.warn("[cleave.js] Multiple input fields matched, cleave.js will only take the first one.");
|
|
1813
1874
|
} catch {
|
|
1814
1875
|
}
|
|
1815
|
-
e.initValue = r.element.value, r.properties =
|
|
1876
|
+
e.initValue = r.element.value, r.properties = P.DefaultProperties.assign({}, e), r.init();
|
|
1816
1877
|
};
|
|
1817
|
-
|
|
1878
|
+
P.prototype = {
|
|
1818
1879
|
init: function() {
|
|
1819
1880
|
var t = this, e = t.properties;
|
|
1820
1881
|
if (!e.numeral && !e.phone && !e.creditCard && !e.time && !e.date && e.blocksLength === 0 && !e.prefix) {
|
|
1821
1882
|
t.onInput(e.initValue);
|
|
1822
1883
|
return;
|
|
1823
1884
|
}
|
|
1824
|
-
e.maxLength =
|
|
1885
|
+
e.maxLength = P.Util.getMaxLength(e.blocks), t.isAndroid = P.Util.isAndroid(), t.lastInputValue = "", t.isBackward = "", t.onChangeListener = t.onChange.bind(t), t.onKeyDownListener = t.onKeyDown.bind(t), t.onFocusListener = t.onFocus.bind(t), t.onCutListener = t.onCut.bind(t), t.onCopyListener = t.onCopy.bind(t), t.initSwapHiddenInput(), t.element.addEventListener("input", t.onChangeListener), t.element.addEventListener("keydown", t.onKeyDownListener), t.element.addEventListener("focus", t.onFocusListener), t.element.addEventListener("cut", t.onCutListener), t.element.addEventListener("copy", t.onCopyListener), t.initPhoneFormatter(), t.initDateFormatter(), t.initTimeFormatter(), t.initNumeralFormatter(), (e.initValue || e.prefix && !e.noImmediatePrefix) && t.onInput(e.initValue);
|
|
1825
1886
|
},
|
|
1826
1887
|
initSwapHiddenInput: function() {
|
|
1827
1888
|
var t = this, e = t.properties;
|
|
@@ -1832,7 +1893,7 @@ x.prototype = {
|
|
|
1832
1893
|
},
|
|
1833
1894
|
initNumeralFormatter: function() {
|
|
1834
1895
|
var t = this, e = t.properties;
|
|
1835
|
-
e.numeral && (e.numeralFormatter = new
|
|
1896
|
+
e.numeral && (e.numeralFormatter = new P.NumeralFormatter(
|
|
1836
1897
|
e.numeralDecimalMark,
|
|
1837
1898
|
e.numeralIntegerScale,
|
|
1838
1899
|
e.numeralDecimalScale,
|
|
@@ -1847,17 +1908,17 @@ x.prototype = {
|
|
|
1847
1908
|
},
|
|
1848
1909
|
initTimeFormatter: function() {
|
|
1849
1910
|
var t = this, e = t.properties;
|
|
1850
|
-
e.time && (e.timeFormatter = new
|
|
1911
|
+
e.time && (e.timeFormatter = new P.TimeFormatter(e.timePattern, e.timeFormat), e.blocks = e.timeFormatter.getBlocks(), e.blocksLength = e.blocks.length, e.maxLength = P.Util.getMaxLength(e.blocks));
|
|
1851
1912
|
},
|
|
1852
1913
|
initDateFormatter: function() {
|
|
1853
1914
|
var t = this, e = t.properties;
|
|
1854
|
-
e.date && (e.dateFormatter = new
|
|
1915
|
+
e.date && (e.dateFormatter = new P.DateFormatter(e.datePattern, e.dateMin, e.dateMax), e.blocks = e.dateFormatter.getBlocks(), e.blocksLength = e.blocks.length, e.maxLength = P.Util.getMaxLength(e.blocks));
|
|
1855
1916
|
},
|
|
1856
1917
|
initPhoneFormatter: function() {
|
|
1857
1918
|
var t = this, e = t.properties;
|
|
1858
1919
|
if (e.phone)
|
|
1859
1920
|
try {
|
|
1860
|
-
e.phoneFormatter = new
|
|
1921
|
+
e.phoneFormatter = new P.PhoneFormatter(
|
|
1861
1922
|
new e.root.Cleave.AsYouTypeFormatter(e.phoneRegionCode),
|
|
1862
1923
|
e.delimiter
|
|
1863
1924
|
);
|
|
@@ -1870,23 +1931,23 @@ x.prototype = {
|
|
|
1870
1931
|
e.lastInputValue = e.element.value, e.isBackward = r === 8;
|
|
1871
1932
|
},
|
|
1872
1933
|
onChange: function(t) {
|
|
1873
|
-
var e = this, r = e.properties, n =
|
|
1934
|
+
var e = this, r = e.properties, n = P.Util;
|
|
1874
1935
|
e.isBackward = e.isBackward || t.inputType === "deleteContentBackward";
|
|
1875
1936
|
var i = n.getPostDelimiter(e.lastInputValue, r.delimiter, r.delimiters);
|
|
1876
1937
|
e.isBackward && i ? r.postDelimiterBackspace = i : r.postDelimiterBackspace = !1, this.onInput(this.element.value);
|
|
1877
1938
|
},
|
|
1878
1939
|
onFocus: function() {
|
|
1879
1940
|
var t = this, e = t.properties;
|
|
1880
|
-
t.lastInputValue = t.element.value, e.prefix && e.noImmediatePrefix && !t.element.value && this.onInput(e.prefix),
|
|
1941
|
+
t.lastInputValue = t.element.value, e.prefix && e.noImmediatePrefix && !t.element.value && this.onInput(e.prefix), P.Util.fixPrefixCursor(t.element, e.prefix, e.delimiter, e.delimiters);
|
|
1881
1942
|
},
|
|
1882
1943
|
onCut: function(t) {
|
|
1883
|
-
|
|
1944
|
+
P.Util.checkFullSelection(this.element.value) && (this.copyClipboardData(t), this.onInput(""));
|
|
1884
1945
|
},
|
|
1885
1946
|
onCopy: function(t) {
|
|
1886
|
-
|
|
1947
|
+
P.Util.checkFullSelection(this.element.value) && this.copyClipboardData(t);
|
|
1887
1948
|
},
|
|
1888
1949
|
copyClipboardData: function(t) {
|
|
1889
|
-
var e = this, r = e.properties, n =
|
|
1950
|
+
var e = this, r = e.properties, n = P.Util, i = e.element.value, o = "";
|
|
1890
1951
|
r.copyDelimiter ? o = i : o = n.stripDelimiters(i, r.delimiter, r.delimiters);
|
|
1891
1952
|
try {
|
|
1892
1953
|
t.clipboardData ? t.clipboardData.setData("Text", o) : window.clipboardData.setData("Text", o), t.preventDefault();
|
|
@@ -1894,7 +1955,7 @@ x.prototype = {
|
|
|
1894
1955
|
}
|
|
1895
1956
|
},
|
|
1896
1957
|
onInput: function(t) {
|
|
1897
|
-
var e = this, r = e.properties, n =
|
|
1958
|
+
var e = this, r = e.properties, n = P.Util, i = n.getPostDelimiter(t, r.delimiter, r.delimiters);
|
|
1898
1959
|
if (!r.numeral && r.postDelimiterBackspace && !i && (t = n.headStr(t, t.length - r.postDelimiterBackspace.length)), r.phone) {
|
|
1899
1960
|
r.prefix && (!r.noImmediatePrefix || t.length) ? r.result = r.prefix + r.phoneFormatter.format(t).slice(r.prefix.length) : r.result = r.phoneFormatter.format(t), e.updateValueState();
|
|
1900
1961
|
return;
|
|
@@ -1917,11 +1978,11 @@ x.prototype = {
|
|
|
1917
1978
|
), e.updateValueState();
|
|
1918
1979
|
},
|
|
1919
1980
|
updateCreditCardPropsByValue: function(t) {
|
|
1920
|
-
var e = this, r = e.properties, n =
|
|
1921
|
-
n.headStr(r.result, 4) !== n.headStr(t, 4) && (i =
|
|
1981
|
+
var e = this, r = e.properties, n = P.Util, i;
|
|
1982
|
+
n.headStr(r.result, 4) !== n.headStr(t, 4) && (i = P.CreditCardDetector.getInfo(t, 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(e, r.creditCardType)));
|
|
1922
1983
|
},
|
|
1923
1984
|
updateValueState: function() {
|
|
1924
|
-
var t = this, e =
|
|
1985
|
+
var t = this, e = P.Util, r = t.properties;
|
|
1925
1986
|
if (t.element) {
|
|
1926
1987
|
var n = t.element.selectionEnd, i = t.element.value, o = r.result;
|
|
1927
1988
|
if (n = e.getNextCursorPosition(n, i, o, r.delimiter, r.delimiters), t.isAndroid) {
|
|
@@ -1952,7 +2013,7 @@ x.prototype = {
|
|
|
1952
2013
|
t = t != null ? t.toString() : "", r.numeral && (t = t.replace(".", r.numeralDecimalMark)), r.postDelimiterBackspace = !1, e.element.value = t, e.onInput(t);
|
|
1953
2014
|
},
|
|
1954
2015
|
getRawValue: function() {
|
|
1955
|
-
var t = this, e = t.properties, r =
|
|
2016
|
+
var t = this, e = t.properties, r = P.Util, n = t.element.value;
|
|
1956
2017
|
return e.rawValueTrimPrefix && (n = r.getPrefixStrippedValue(n, e.prefix, e.prefixLength, e.result, e.delimiter, e.delimiters, e.noImmediatePrefix, e.tailPrefix, e.signBeforePrefix)), e.numeral ? n = e.numeralFormatter.getRawValue(n) : n = r.stripDelimiters(n, e.delimiter, e.delimiters), n;
|
|
1957
2018
|
},
|
|
1958
2019
|
getISOFormatDate: function() {
|
|
@@ -1974,19 +2035,19 @@ x.prototype = {
|
|
|
1974
2035
|
return "[Cleave Object]";
|
|
1975
2036
|
}
|
|
1976
2037
|
};
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
(typeof
|
|
1985
|
-
var at =
|
|
2038
|
+
P.NumeralFormatter = gr;
|
|
2039
|
+
P.DateFormatter = yr;
|
|
2040
|
+
P.TimeFormatter = br;
|
|
2041
|
+
P.PhoneFormatter = vr;
|
|
2042
|
+
P.CreditCardDetector = wr;
|
|
2043
|
+
P.Util = Sr;
|
|
2044
|
+
P.DefaultProperties = kr;
|
|
2045
|
+
(typeof G == "object" && G ? G : window).Cleave = P;
|
|
2046
|
+
var at = P, pe = {}, Cr = function() {
|
|
1986
2047
|
return typeof Promise == "function" && Promise.prototype && Promise.prototype.then;
|
|
1987
|
-
}, wt = {},
|
|
2048
|
+
}, wt = {}, $ = {};
|
|
1988
2049
|
let je;
|
|
1989
|
-
const
|
|
2050
|
+
const Er = [
|
|
1990
2051
|
0,
|
|
1991
2052
|
// Not used
|
|
1992
2053
|
26,
|
|
@@ -2030,32 +2091,32 @@ const kr = [
|
|
|
2030
2091
|
3532,
|
|
2031
2092
|
3706
|
|
2032
2093
|
];
|
|
2033
|
-
|
|
2094
|
+
$.getSymbolSize = function(e) {
|
|
2034
2095
|
if (!e) throw new Error('"version" cannot be null or undefined');
|
|
2035
2096
|
if (e < 1 || e > 40) throw new Error('"version" should be in range from 1 to 40');
|
|
2036
2097
|
return e * 4 + 17;
|
|
2037
2098
|
};
|
|
2038
|
-
|
|
2039
|
-
return
|
|
2099
|
+
$.getSymbolTotalCodewords = function(e) {
|
|
2100
|
+
return Er[e];
|
|
2040
2101
|
};
|
|
2041
|
-
|
|
2102
|
+
$.getBCHDigit = function(t) {
|
|
2042
2103
|
let e = 0;
|
|
2043
2104
|
for (; t !== 0; )
|
|
2044
2105
|
e++, t >>>= 1;
|
|
2045
2106
|
return e;
|
|
2046
2107
|
};
|
|
2047
|
-
|
|
2108
|
+
$.setToSJISFunction = function(e) {
|
|
2048
2109
|
if (typeof e != "function")
|
|
2049
2110
|
throw new Error('"toSJISFunc" is not a valid function.');
|
|
2050
2111
|
je = e;
|
|
2051
2112
|
};
|
|
2052
|
-
|
|
2113
|
+
$.isKanjiModeEnabled = function() {
|
|
2053
2114
|
return typeof je < "u";
|
|
2054
2115
|
};
|
|
2055
|
-
|
|
2116
|
+
$.toSJIS = function(e) {
|
|
2056
2117
|
return je(e);
|
|
2057
2118
|
};
|
|
2058
|
-
var
|
|
2119
|
+
var Pe = {};
|
|
2059
2120
|
(function(t) {
|
|
2060
2121
|
t.L = { bit: 1 }, t.M = { bit: 0 }, t.Q = { bit: 3 }, t.H = { bit: 2 };
|
|
2061
2122
|
function e(r) {
|
|
@@ -2089,7 +2150,7 @@ var ke = {};
|
|
|
2089
2150
|
return i;
|
|
2090
2151
|
}
|
|
2091
2152
|
};
|
|
2092
|
-
})(
|
|
2153
|
+
})(Pe);
|
|
2093
2154
|
function xt() {
|
|
2094
2155
|
this.buffer = [], this.length = 0;
|
|
2095
2156
|
}
|
|
@@ -2110,7 +2171,7 @@ xt.prototype = {
|
|
|
2110
2171
|
this.buffer.length <= e && this.buffer.push(0), t && (this.buffer[e] |= 128 >>> this.length % 8), this.length++;
|
|
2111
2172
|
}
|
|
2112
2173
|
};
|
|
2113
|
-
var
|
|
2174
|
+
var Ar = xt;
|
|
2114
2175
|
function me(t) {
|
|
2115
2176
|
if (!t || t < 1)
|
|
2116
2177
|
throw new Error("BitMatrix size must be defined and greater than 0");
|
|
@@ -2129,9 +2190,9 @@ me.prototype.xor = function(t, e, r) {
|
|
|
2129
2190
|
me.prototype.isReserved = function(t, e) {
|
|
2130
2191
|
return this.reservedBit[t * this.size + e];
|
|
2131
2192
|
};
|
|
2132
|
-
var
|
|
2193
|
+
var _r = me, St = {};
|
|
2133
2194
|
(function(t) {
|
|
2134
|
-
const e =
|
|
2195
|
+
const e = $.getSymbolSize;
|
|
2135
2196
|
t.getRowColCoords = function(n) {
|
|
2136
2197
|
if (n === 1) return [];
|
|
2137
2198
|
const i = Math.floor(n / 7) + 2, o = e(n), s = o === 145 ? 26 : Math.ceil((o - 13) / (2 * i - 2)) * 2, l = [o - 7];
|
|
@@ -2148,10 +2209,10 @@ var Pr = me, St = {};
|
|
|
2148
2209
|
return i;
|
|
2149
2210
|
};
|
|
2150
2211
|
})(St);
|
|
2151
|
-
var
|
|
2152
|
-
const
|
|
2153
|
-
|
|
2154
|
-
const r =
|
|
2212
|
+
var Pt = {};
|
|
2213
|
+
const Ir = $.getSymbolSize, lt = 7;
|
|
2214
|
+
Pt.getPositions = function(e) {
|
|
2215
|
+
const r = Ir(e);
|
|
2155
2216
|
return [
|
|
2156
2217
|
// top-left
|
|
2157
2218
|
[0, 0],
|
|
@@ -2161,7 +2222,7 @@ kt.getPositions = function(e) {
|
|
|
2161
2222
|
[0, r - lt]
|
|
2162
2223
|
];
|
|
2163
2224
|
};
|
|
2164
|
-
var
|
|
2225
|
+
var kt = {};
|
|
2165
2226
|
(function(t) {
|
|
2166
2227
|
t.Patterns = {
|
|
2167
2228
|
PATTERN000: 0,
|
|
@@ -2256,9 +2317,9 @@ var Ct = {};
|
|
|
2256
2317
|
}
|
|
2257
2318
|
return l;
|
|
2258
2319
|
};
|
|
2259
|
-
})(
|
|
2260
|
-
var
|
|
2261
|
-
const O =
|
|
2320
|
+
})(kt);
|
|
2321
|
+
var ke = {};
|
|
2322
|
+
const O = Pe, fe = [
|
|
2262
2323
|
// L M Q H
|
|
2263
2324
|
1,
|
|
2264
2325
|
1,
|
|
@@ -2583,7 +2644,7 @@ const O = ke, fe = [
|
|
|
2583
2644
|
2040,
|
|
2584
2645
|
2430
|
|
2585
2646
|
];
|
|
2586
|
-
|
|
2647
|
+
ke.getBlocksCount = function(e, r) {
|
|
2587
2648
|
switch (r) {
|
|
2588
2649
|
case O.L:
|
|
2589
2650
|
return fe[(e - 1) * 4 + 0];
|
|
@@ -2597,7 +2658,7 @@ Ce.getBlocksCount = function(e, r) {
|
|
|
2597
2658
|
return;
|
|
2598
2659
|
}
|
|
2599
2660
|
};
|
|
2600
|
-
|
|
2661
|
+
ke.getTotalCodewordsCount = function(e, r) {
|
|
2601
2662
|
switch (r) {
|
|
2602
2663
|
case O.L:
|
|
2603
2664
|
return ge[(e - 1) * 4 + 0];
|
|
@@ -2611,7 +2672,7 @@ Ce.getTotalCodewordsCount = function(e, r) {
|
|
|
2611
2672
|
return;
|
|
2612
2673
|
}
|
|
2613
2674
|
};
|
|
2614
|
-
var
|
|
2675
|
+
var Ct = {}, Ce = {};
|
|
2615
2676
|
const ae = new Uint8Array(512), we = new Uint8Array(256);
|
|
2616
2677
|
(function() {
|
|
2617
2678
|
let e = 1;
|
|
@@ -2620,18 +2681,18 @@ const ae = new Uint8Array(512), we = new Uint8Array(256);
|
|
|
2620
2681
|
for (let r = 255; r < 512; r++)
|
|
2621
2682
|
ae[r] = ae[r - 255];
|
|
2622
2683
|
})();
|
|
2623
|
-
|
|
2684
|
+
Ce.log = function(e) {
|
|
2624
2685
|
if (e < 1) throw new Error("log(" + e + ")");
|
|
2625
2686
|
return we[e];
|
|
2626
2687
|
};
|
|
2627
|
-
|
|
2688
|
+
Ce.exp = function(e) {
|
|
2628
2689
|
return ae[e];
|
|
2629
2690
|
};
|
|
2630
|
-
|
|
2691
|
+
Ce.mul = function(e, r) {
|
|
2631
2692
|
return e === 0 || r === 0 ? 0 : ae[we[e] + we[r]];
|
|
2632
2693
|
};
|
|
2633
2694
|
(function(t) {
|
|
2634
|
-
const e =
|
|
2695
|
+
const e = Ce;
|
|
2635
2696
|
t.mul = function(n, i) {
|
|
2636
2697
|
const o = new Uint8Array(n.length + i.length - 1);
|
|
2637
2698
|
for (let s = 0; s < n.length; s++)
|
|
@@ -2655,8 +2716,8 @@ Pe.mul = function(e, r) {
|
|
|
2655
2716
|
i = t.mul(i, new Uint8Array([1, e.exp(o)]));
|
|
2656
2717
|
return i;
|
|
2657
2718
|
};
|
|
2658
|
-
})(
|
|
2659
|
-
const Et =
|
|
2719
|
+
})(Ct);
|
|
2720
|
+
const Et = Ct;
|
|
2660
2721
|
function Qe(t) {
|
|
2661
2722
|
this.genPoly = void 0, this.degree = t, this.degree && this.initialize(this.degree);
|
|
2662
2723
|
}
|
|
@@ -2675,33 +2736,33 @@ Qe.prototype.encode = function(e) {
|
|
|
2675
2736
|
}
|
|
2676
2737
|
return n;
|
|
2677
2738
|
};
|
|
2678
|
-
var
|
|
2739
|
+
var Mr = Qe, At = {}, q = {}, Ke = {};
|
|
2679
2740
|
Ke.isValid = function(e) {
|
|
2680
2741
|
return !isNaN(e) && e >= 1 && e <= 40;
|
|
2681
2742
|
};
|
|
2682
|
-
var
|
|
2683
|
-
const
|
|
2743
|
+
var B = {};
|
|
2744
|
+
const _t = "[0-9]+", Dr = "[A-Z $%*+\\-./:]+";
|
|
2684
2745
|
let ue = "(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";
|
|
2685
2746
|
ue = ue.replace(/u/g, "\\u");
|
|
2686
|
-
const
|
|
2747
|
+
const $r = "(?:(?![A-Z0-9 $%*+\\-./:]|" + ue + `)(?:.|[\r
|
|
2687
2748
|
]))+`;
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
const
|
|
2694
|
-
|
|
2695
|
-
return
|
|
2749
|
+
B.KANJI = new RegExp(ue, "g");
|
|
2750
|
+
B.BYTE_KANJI = new RegExp("[^A-Z0-9 $%*+\\-./:]+", "g");
|
|
2751
|
+
B.BYTE = new RegExp($r, "g");
|
|
2752
|
+
B.NUMERIC = new RegExp(_t, "g");
|
|
2753
|
+
B.ALPHANUMERIC = new RegExp(Dr, "g");
|
|
2754
|
+
const Tr = new RegExp("^" + ue + "$"), Nr = new RegExp("^" + _t + "$"), Rr = new RegExp("^[A-Z0-9 $%*+\\-./:]+$");
|
|
2755
|
+
B.testKanji = function(e) {
|
|
2756
|
+
return Tr.test(e);
|
|
2696
2757
|
};
|
|
2697
|
-
|
|
2698
|
-
return
|
|
2758
|
+
B.testNumeric = function(e) {
|
|
2759
|
+
return Nr.test(e);
|
|
2699
2760
|
};
|
|
2700
|
-
|
|
2701
|
-
return
|
|
2761
|
+
B.testAlphanumeric = function(e) {
|
|
2762
|
+
return Rr.test(e);
|
|
2702
2763
|
};
|
|
2703
2764
|
(function(t) {
|
|
2704
|
-
const e = Ke, r =
|
|
2765
|
+
const e = Ke, r = B;
|
|
2705
2766
|
t.NUMERIC = {
|
|
2706
2767
|
id: "Numeric",
|
|
2707
2768
|
bit: 1,
|
|
@@ -2760,7 +2821,7 @@ L.testAlphanumeric = function(e) {
|
|
|
2760
2821
|
};
|
|
2761
2822
|
})(q);
|
|
2762
2823
|
(function(t) {
|
|
2763
|
-
const e =
|
|
2824
|
+
const e = $, r = ke, n = Pe, i = q, o = Ke, s = 7973, l = e.getBCHDigit(s);
|
|
2764
2825
|
function a(p, u, m) {
|
|
2765
2826
|
for (let y = 1; y <= 40; y++)
|
|
2766
2827
|
if (u <= t.getCapacity(y, m, p))
|
|
@@ -2772,8 +2833,8 @@ L.testAlphanumeric = function(e) {
|
|
|
2772
2833
|
function d(p, u) {
|
|
2773
2834
|
let m = 0;
|
|
2774
2835
|
return p.forEach(function(y) {
|
|
2775
|
-
const
|
|
2776
|
-
m +=
|
|
2836
|
+
const E = c(y.mode, u);
|
|
2837
|
+
m += E + y.getBitsLength();
|
|
2777
2838
|
}), m;
|
|
2778
2839
|
}
|
|
2779
2840
|
function h(p, u) {
|
|
@@ -2787,7 +2848,7 @@ L.testAlphanumeric = function(e) {
|
|
|
2787
2848
|
if (!o.isValid(u))
|
|
2788
2849
|
throw new Error("Invalid QR Code version");
|
|
2789
2850
|
typeof y > "u" && (y = i.BYTE);
|
|
2790
|
-
const
|
|
2851
|
+
const E = e.getSymbolTotalCodewords(u), b = r.getTotalCodewordsCount(u, m), v = (E - b) * 8;
|
|
2791
2852
|
if (y === i.MIXED) return v;
|
|
2792
2853
|
const g = v - c(y, u);
|
|
2793
2854
|
switch (y) {
|
|
@@ -2803,16 +2864,16 @@ L.testAlphanumeric = function(e) {
|
|
|
2803
2864
|
}
|
|
2804
2865
|
}, t.getBestVersionForData = function(u, m) {
|
|
2805
2866
|
let y;
|
|
2806
|
-
const
|
|
2867
|
+
const E = n.from(m, n.M);
|
|
2807
2868
|
if (Array.isArray(u)) {
|
|
2808
2869
|
if (u.length > 1)
|
|
2809
|
-
return h(u,
|
|
2870
|
+
return h(u, E);
|
|
2810
2871
|
if (u.length === 0)
|
|
2811
2872
|
return 1;
|
|
2812
2873
|
y = u[0];
|
|
2813
2874
|
} else
|
|
2814
2875
|
y = u;
|
|
2815
|
-
return a(y.mode, y.getLength(),
|
|
2876
|
+
return a(y.mode, y.getLength(), E);
|
|
2816
2877
|
}, t.getEncodedBits = function(u) {
|
|
2817
2878
|
if (!o.isValid(u) || u < 7)
|
|
2818
2879
|
throw new Error("Invalid QR Code version");
|
|
@@ -2822,38 +2883,38 @@ L.testAlphanumeric = function(e) {
|
|
|
2822
2883
|
return u << 12 | m;
|
|
2823
2884
|
};
|
|
2824
2885
|
})(At);
|
|
2825
|
-
var
|
|
2826
|
-
const
|
|
2827
|
-
|
|
2886
|
+
var It = {};
|
|
2887
|
+
const Ue = $, Mt = 1335, Br = 21522, ct = Ue.getBCHDigit(Mt);
|
|
2888
|
+
It.getEncodedBits = function(e, r) {
|
|
2828
2889
|
const n = e.bit << 3 | r;
|
|
2829
2890
|
let i = n << 10;
|
|
2830
|
-
for (;
|
|
2831
|
-
i ^= Mt <<
|
|
2832
|
-
return (n << 10 | i) ^
|
|
2891
|
+
for (; Ue.getBCHDigit(i) - ct >= 0; )
|
|
2892
|
+
i ^= Mt << Ue.getBCHDigit(i) - ct;
|
|
2893
|
+
return (n << 10 | i) ^ Br;
|
|
2833
2894
|
};
|
|
2834
2895
|
var Dt = {};
|
|
2835
|
-
const
|
|
2836
|
-
function
|
|
2837
|
-
this.mode =
|
|
2896
|
+
const Lr = q;
|
|
2897
|
+
function J(t) {
|
|
2898
|
+
this.mode = Lr.NUMERIC, this.data = t.toString();
|
|
2838
2899
|
}
|
|
2839
|
-
|
|
2900
|
+
J.getBitsLength = function(e) {
|
|
2840
2901
|
return 10 * Math.floor(e / 3) + (e % 3 ? e % 3 * 3 + 1 : 0);
|
|
2841
2902
|
};
|
|
2842
|
-
|
|
2903
|
+
J.prototype.getLength = function() {
|
|
2843
2904
|
return this.data.length;
|
|
2844
2905
|
};
|
|
2845
|
-
|
|
2846
|
-
return
|
|
2906
|
+
J.prototype.getBitsLength = function() {
|
|
2907
|
+
return J.getBitsLength(this.data.length);
|
|
2847
2908
|
};
|
|
2848
|
-
|
|
2909
|
+
J.prototype.write = function(e) {
|
|
2849
2910
|
let r, n, i;
|
|
2850
2911
|
for (r = 0; r + 3 <= this.data.length; r += 3)
|
|
2851
2912
|
n = this.data.substr(r, 3), i = parseInt(n, 10), e.put(i, 10);
|
|
2852
2913
|
const o = this.data.length - r;
|
|
2853
2914
|
o > 0 && (n = this.data.substr(r), i = parseInt(n, 10), e.put(i, o * 3 + 1));
|
|
2854
2915
|
};
|
|
2855
|
-
var
|
|
2856
|
-
const
|
|
2916
|
+
var Ur = J;
|
|
2917
|
+
const Fr = q, $e = [
|
|
2857
2918
|
"0",
|
|
2858
2919
|
"1",
|
|
2859
2920
|
"2",
|
|
@@ -2901,7 +2962,7 @@ const Lr = q, Te = [
|
|
|
2901
2962
|
":"
|
|
2902
2963
|
];
|
|
2903
2964
|
function X(t) {
|
|
2904
|
-
this.mode =
|
|
2965
|
+
this.mode = Fr.ALPHANUMERIC, this.data = t;
|
|
2905
2966
|
}
|
|
2906
2967
|
X.getBitsLength = function(e) {
|
|
2907
2968
|
return 11 * Math.floor(e / 2) + 6 * (e % 2);
|
|
@@ -2915,15 +2976,15 @@ X.prototype.getBitsLength = function() {
|
|
|
2915
2976
|
X.prototype.write = function(e) {
|
|
2916
2977
|
let r;
|
|
2917
2978
|
for (r = 0; r + 2 <= this.data.length; r += 2) {
|
|
2918
|
-
let n =
|
|
2919
|
-
n +=
|
|
2979
|
+
let n = $e.indexOf(this.data[r]) * 45;
|
|
2980
|
+
n += $e.indexOf(this.data[r + 1]), e.put(n, 11);
|
|
2920
2981
|
}
|
|
2921
|
-
this.data.length % 2 && e.put(
|
|
2982
|
+
this.data.length % 2 && e.put($e.indexOf(this.data[r]), 6);
|
|
2922
2983
|
};
|
|
2923
|
-
var
|
|
2924
|
-
const
|
|
2984
|
+
var Or = X;
|
|
2985
|
+
const zr = q;
|
|
2925
2986
|
function ee(t) {
|
|
2926
|
-
this.mode =
|
|
2987
|
+
this.mode = zr.BYTE, typeof t == "string" ? this.data = new TextEncoder().encode(t) : this.data = new Uint8Array(t);
|
|
2927
2988
|
}
|
|
2928
2989
|
ee.getBitsLength = function(e) {
|
|
2929
2990
|
return e * 8;
|
|
@@ -2938,10 +2999,10 @@ ee.prototype.write = function(t) {
|
|
|
2938
2999
|
for (let e = 0, r = this.data.length; e < r; e++)
|
|
2939
3000
|
t.put(this.data[e], 8);
|
|
2940
3001
|
};
|
|
2941
|
-
var
|
|
2942
|
-
const
|
|
3002
|
+
var qr = ee;
|
|
3003
|
+
const Hr = q, Yr = $;
|
|
2943
3004
|
function te(t) {
|
|
2944
|
-
this.mode =
|
|
3005
|
+
this.mode = Hr.KANJI, this.data = t;
|
|
2945
3006
|
}
|
|
2946
3007
|
te.getBitsLength = function(e) {
|
|
2947
3008
|
return e * 13;
|
|
@@ -2955,7 +3016,7 @@ te.prototype.getBitsLength = function() {
|
|
|
2955
3016
|
te.prototype.write = function(t) {
|
|
2956
3017
|
let e;
|
|
2957
3018
|
for (e = 0; e < this.data.length; e++) {
|
|
2958
|
-
let r =
|
|
3019
|
+
let r = Yr.toSJIS(this.data[e]);
|
|
2959
3020
|
if (r >= 33088 && r <= 40956)
|
|
2960
3021
|
r -= 33088;
|
|
2961
3022
|
else if (r >= 57408 && r <= 60351)
|
|
@@ -2968,7 +3029,7 @@ Make sure your charset is UTF-8`
|
|
|
2968
3029
|
r = (r >>> 8 & 255) * 192 + (r & 255), t.put(r, 13);
|
|
2969
3030
|
}
|
|
2970
3031
|
};
|
|
2971
|
-
var
|
|
3032
|
+
var Vr = te, $t = { exports: {} };
|
|
2972
3033
|
(function(t) {
|
|
2973
3034
|
var e = {
|
|
2974
3035
|
single_source_shortest_paths: function(r, n, i) {
|
|
@@ -2976,10 +3037,10 @@ var qr = te, Tt = { exports: {} };
|
|
|
2976
3037
|
s[n] = 0;
|
|
2977
3038
|
var l = e.PriorityQueue.make();
|
|
2978
3039
|
l.push(n, 0);
|
|
2979
|
-
for (var a, c, d, h, p, u, m, y,
|
|
3040
|
+
for (var a, c, d, h, p, u, m, y, E; !l.empty(); ) {
|
|
2980
3041
|
a = l.pop(), c = a.value, h = a.cost, p = r[c] || {};
|
|
2981
3042
|
for (d in p)
|
|
2982
|
-
p.hasOwnProperty(d) && (u = p[d], m = h + u, y = s[d],
|
|
3043
|
+
p.hasOwnProperty(d) && (u = p[d], m = h + u, y = s[d], E = typeof s[d] > "u", (E || y > m) && (s[d] = m, l.push(d, m), o[d] = c));
|
|
2983
3044
|
}
|
|
2984
3045
|
if (typeof i < "u" && typeof s[i] > "u") {
|
|
2985
3046
|
var b = ["Could not find a path from ", n, " to ", i, "."].join("");
|
|
@@ -3033,35 +3094,35 @@ var qr = te, Tt = { exports: {} };
|
|
|
3033
3094
|
}
|
|
3034
3095
|
};
|
|
3035
3096
|
t.exports = e;
|
|
3036
|
-
})(
|
|
3037
|
-
var
|
|
3097
|
+
})($t);
|
|
3098
|
+
var jr = $t.exports;
|
|
3038
3099
|
(function(t) {
|
|
3039
|
-
const e = q, r =
|
|
3100
|
+
const e = q, r = Ur, n = Or, i = qr, o = Vr, s = B, l = $, a = jr;
|
|
3040
3101
|
function c(b) {
|
|
3041
3102
|
return unescape(encodeURIComponent(b)).length;
|
|
3042
3103
|
}
|
|
3043
3104
|
function d(b, v, g) {
|
|
3044
3105
|
const f = [];
|
|
3045
|
-
let
|
|
3046
|
-
for (; (
|
|
3106
|
+
let C;
|
|
3107
|
+
for (; (C = b.exec(g)) !== null; )
|
|
3047
3108
|
f.push({
|
|
3048
|
-
data:
|
|
3049
|
-
index:
|
|
3109
|
+
data: C[0],
|
|
3110
|
+
index: C.index,
|
|
3050
3111
|
mode: v,
|
|
3051
|
-
length:
|
|
3112
|
+
length: C[0].length
|
|
3052
3113
|
});
|
|
3053
3114
|
return f;
|
|
3054
3115
|
}
|
|
3055
3116
|
function h(b) {
|
|
3056
3117
|
const v = d(s.NUMERIC, e.NUMERIC, b), g = d(s.ALPHANUMERIC, e.ALPHANUMERIC, b);
|
|
3057
|
-
let f,
|
|
3058
|
-
return l.isKanjiModeEnabled() ? (f = d(s.BYTE, e.BYTE, b),
|
|
3059
|
-
return
|
|
3060
|
-
}).map(function(
|
|
3118
|
+
let f, C;
|
|
3119
|
+
return l.isKanjiModeEnabled() ? (f = d(s.BYTE, e.BYTE, b), C = d(s.KANJI, e.KANJI, b)) : (f = d(s.BYTE_KANJI, e.BYTE, b), C = []), v.concat(g, f, C).sort(function(_, N) {
|
|
3120
|
+
return _.index - N.index;
|
|
3121
|
+
}).map(function(_) {
|
|
3061
3122
|
return {
|
|
3062
|
-
data:
|
|
3063
|
-
mode:
|
|
3064
|
-
length:
|
|
3123
|
+
data: _.data,
|
|
3124
|
+
mode: _.mode,
|
|
3125
|
+
length: _.length
|
|
3065
3126
|
};
|
|
3066
3127
|
});
|
|
3067
3128
|
}
|
|
@@ -3117,24 +3178,24 @@ var Vr = Tt.exports;
|
|
|
3117
3178
|
}
|
|
3118
3179
|
function y(b, v) {
|
|
3119
3180
|
const g = {}, f = { start: {} };
|
|
3120
|
-
let
|
|
3121
|
-
for (let
|
|
3122
|
-
const
|
|
3123
|
-
for (let
|
|
3124
|
-
const R =
|
|
3125
|
-
|
|
3126
|
-
for (let Ae = 0; Ae <
|
|
3127
|
-
const
|
|
3128
|
-
g[
|
|
3181
|
+
let C = ["start"];
|
|
3182
|
+
for (let A = 0; A < b.length; A++) {
|
|
3183
|
+
const _ = b[A], N = [];
|
|
3184
|
+
for (let U = 0; U < _.length; U++) {
|
|
3185
|
+
const R = _[U], re = "" + A + U;
|
|
3186
|
+
N.push(re), g[re] = { node: R, lastCount: 0 }, f[re] = {};
|
|
3187
|
+
for (let Ae = 0; Ae < C.length; Ae++) {
|
|
3188
|
+
const L = C[Ae];
|
|
3189
|
+
g[L] && g[L].node.mode === R.mode ? (f[L][re] = p(g[L].lastCount + R.length, R.mode) - p(g[L].lastCount, R.mode), g[L].lastCount += R.length) : (g[L] && (g[L].lastCount = R.length), f[L][re] = p(R.length, R.mode) + 4 + e.getCharCountIndicator(R.mode, v));
|
|
3129
3190
|
}
|
|
3130
3191
|
}
|
|
3131
|
-
|
|
3192
|
+
C = N;
|
|
3132
3193
|
}
|
|
3133
|
-
for (let
|
|
3134
|
-
f[
|
|
3194
|
+
for (let A = 0; A < C.length; A++)
|
|
3195
|
+
f[C[A]].end = 0;
|
|
3135
3196
|
return { map: f, table: g };
|
|
3136
3197
|
}
|
|
3137
|
-
function
|
|
3198
|
+
function E(b, v) {
|
|
3138
3199
|
let g;
|
|
3139
3200
|
const f = e.getBestModeForData(b);
|
|
3140
3201
|
if (g = e.from(v, f), g !== e.BYTE && g.bit < f.bit)
|
|
@@ -3153,22 +3214,22 @@ var Vr = Tt.exports;
|
|
|
3153
3214
|
}
|
|
3154
3215
|
t.fromArray = function(v) {
|
|
3155
3216
|
return v.reduce(function(g, f) {
|
|
3156
|
-
return typeof f == "string" ? g.push(
|
|
3217
|
+
return typeof f == "string" ? g.push(E(f, null)) : f.data && g.push(E(f.data, f.mode)), g;
|
|
3157
3218
|
}, []);
|
|
3158
3219
|
}, t.fromString = function(v, g) {
|
|
3159
|
-
const f = h(v, l.isKanjiModeEnabled()),
|
|
3160
|
-
for (let
|
|
3161
|
-
|
|
3162
|
-
return t.fromArray(u(
|
|
3220
|
+
const f = h(v, l.isKanjiModeEnabled()), C = m(f), A = y(C, g), _ = a.find_path(A.map, "start", "end"), N = [];
|
|
3221
|
+
for (let U = 1; U < _.length - 1; U++)
|
|
3222
|
+
N.push(A.table[_[U]].node);
|
|
3223
|
+
return t.fromArray(u(N));
|
|
3163
3224
|
}, t.rawSplit = function(v) {
|
|
3164
3225
|
return t.fromArray(
|
|
3165
3226
|
h(v, l.isKanjiModeEnabled())
|
|
3166
3227
|
);
|
|
3167
3228
|
};
|
|
3168
3229
|
})(Dt);
|
|
3169
|
-
const Ee =
|
|
3170
|
-
function
|
|
3171
|
-
const r = t.size, n =
|
|
3230
|
+
const Ee = $, Te = Pe, Qr = Ar, Kr = _r, Gr = St, Wr = Pt, Fe = kt, Oe = ke, Zr = Mr, xe = At, Jr = It, Xr = q, Ne = Dt;
|
|
3231
|
+
function en(t, e) {
|
|
3232
|
+
const r = t.size, n = Wr.getPositions(e);
|
|
3172
3233
|
for (let i = 0; i < n.length; i++) {
|
|
3173
3234
|
const o = n[i][0], s = n[i][1];
|
|
3174
3235
|
for (let l = -1; l <= 7; l++)
|
|
@@ -3177,15 +3238,15 @@ function Jr(t, e) {
|
|
|
3177
3238
|
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 ? t.set(o + l, s + a, !0, !0) : t.set(o + l, s + a, !1, !0));
|
|
3178
3239
|
}
|
|
3179
3240
|
}
|
|
3180
|
-
function
|
|
3241
|
+
function tn(t) {
|
|
3181
3242
|
const e = t.size;
|
|
3182
3243
|
for (let r = 8; r < e - 8; r++) {
|
|
3183
3244
|
const n = r % 2 === 0;
|
|
3184
3245
|
t.set(r, 6, n, !0), t.set(6, r, n, !0);
|
|
3185
3246
|
}
|
|
3186
3247
|
}
|
|
3187
|
-
function
|
|
3188
|
-
const r =
|
|
3248
|
+
function rn(t, e) {
|
|
3249
|
+
const r = Gr.getPositions(e);
|
|
3189
3250
|
for (let n = 0; n < r.length; n++) {
|
|
3190
3251
|
const i = r[n][0], o = r[n][1];
|
|
3191
3252
|
for (let s = -2; s <= 2; s++)
|
|
@@ -3193,20 +3254,20 @@ function Xr(t, e) {
|
|
|
3193
3254
|
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);
|
|
3194
3255
|
}
|
|
3195
3256
|
}
|
|
3196
|
-
function
|
|
3257
|
+
function nn(t, e) {
|
|
3197
3258
|
const r = t.size, n = xe.getEncodedBits(e);
|
|
3198
3259
|
let i, o, s;
|
|
3199
3260
|
for (let l = 0; l < 18; l++)
|
|
3200
3261
|
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);
|
|
3201
3262
|
}
|
|
3202
3263
|
function Re(t, e, r) {
|
|
3203
|
-
const n = t.size, i =
|
|
3264
|
+
const n = t.size, i = Jr.getEncodedBits(e, r);
|
|
3204
3265
|
let o, s;
|
|
3205
3266
|
for (o = 0; o < 15; o++)
|
|
3206
3267
|
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);
|
|
3207
3268
|
t.set(n - 8, 8, 1, !0);
|
|
3208
3269
|
}
|
|
3209
|
-
function
|
|
3270
|
+
function on(t, e) {
|
|
3210
3271
|
const r = t.size;
|
|
3211
3272
|
let n = -1, i = r - 1, o = 7, s = 0;
|
|
3212
3273
|
for (let l = r - 1; l > 0; l -= 2)
|
|
@@ -3222,10 +3283,10 @@ function tn(t, e) {
|
|
|
3222
3283
|
}
|
|
3223
3284
|
}
|
|
3224
3285
|
}
|
|
3225
|
-
function
|
|
3226
|
-
const n = new
|
|
3286
|
+
function sn(t, e, r) {
|
|
3287
|
+
const n = new Qr();
|
|
3227
3288
|
r.forEach(function(a) {
|
|
3228
|
-
n.put(a.mode.bit, 4), n.put(a.getLength(),
|
|
3289
|
+
n.put(a.mode.bit, 4), n.put(a.getLength(), Xr.getCharCountIndicator(a.mode, t)), a.write(n);
|
|
3229
3290
|
});
|
|
3230
3291
|
const i = Ee.getSymbolTotalCodewords(t), o = Oe.getTotalCodewordsCount(t, e), s = (i - o) * 8;
|
|
3231
3292
|
for (n.getLengthInBits() + 4 <= s && n.put(0, 4); n.getLengthInBits() % 8 !== 0; )
|
|
@@ -3233,39 +3294,39 @@ function rn(t, e, r) {
|
|
|
3233
3294
|
const l = (s - n.getLengthInBits()) / 8;
|
|
3234
3295
|
for (let a = 0; a < l; a++)
|
|
3235
3296
|
n.put(a % 2 ? 17 : 236, 8);
|
|
3236
|
-
return
|
|
3297
|
+
return an(n, t, e);
|
|
3237
3298
|
}
|
|
3238
|
-
function
|
|
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
|
|
3299
|
+
function an(t, e, r) {
|
|
3300
|
+
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 Zr(p);
|
|
3240
3301
|
let m = 0;
|
|
3241
|
-
const y = new Array(s),
|
|
3302
|
+
const y = new Array(s), E = new Array(s);
|
|
3242
3303
|
let b = 0;
|
|
3243
3304
|
const v = new Uint8Array(t.buffer);
|
|
3244
|
-
for (let
|
|
3245
|
-
const
|
|
3246
|
-
y[
|
|
3305
|
+
for (let _ = 0; _ < s; _++) {
|
|
3306
|
+
const N = _ < a ? d : h;
|
|
3307
|
+
y[_] = v.slice(m, m + N), E[_] = u.encode(y[_]), m += N, b = Math.max(b, N);
|
|
3247
3308
|
}
|
|
3248
3309
|
const g = new Uint8Array(n);
|
|
3249
|
-
let f = 0,
|
|
3250
|
-
for (
|
|
3251
|
-
for (
|
|
3252
|
-
|
|
3253
|
-
for (
|
|
3254
|
-
for (
|
|
3255
|
-
g[f++] =
|
|
3310
|
+
let f = 0, C, A;
|
|
3311
|
+
for (C = 0; C < b; C++)
|
|
3312
|
+
for (A = 0; A < s; A++)
|
|
3313
|
+
C < y[A].length && (g[f++] = y[A][C]);
|
|
3314
|
+
for (C = 0; C < p; C++)
|
|
3315
|
+
for (A = 0; A < s; A++)
|
|
3316
|
+
g[f++] = E[A][C];
|
|
3256
3317
|
return g;
|
|
3257
3318
|
}
|
|
3258
|
-
function
|
|
3319
|
+
function ln(t, e, r, n) {
|
|
3259
3320
|
let i;
|
|
3260
3321
|
if (Array.isArray(t))
|
|
3261
|
-
i =
|
|
3322
|
+
i = Ne.fromArray(t);
|
|
3262
3323
|
else if (typeof t == "string") {
|
|
3263
3324
|
let c = e;
|
|
3264
3325
|
if (!c) {
|
|
3265
|
-
const d =
|
|
3326
|
+
const d = Ne.rawSplit(t);
|
|
3266
3327
|
c = xe.getBestVersionForData(d, r);
|
|
3267
3328
|
}
|
|
3268
|
-
i =
|
|
3329
|
+
i = Ne.fromString(t, c || 40);
|
|
3269
3330
|
} else
|
|
3270
3331
|
throw new Error("Invalid data");
|
|
3271
3332
|
const o = xe.getBestVersionForData(i, r);
|
|
@@ -3280,11 +3341,11 @@ The chosen QR Code version cannot contain this amount of data.
|
|
|
3280
3341
|
Minimum version required to store current data is: ` + o + `.
|
|
3281
3342
|
`
|
|
3282
3343
|
);
|
|
3283
|
-
const s =
|
|
3284
|
-
return
|
|
3344
|
+
const s = sn(e, r, i), l = Ee.getSymbolSize(e), a = new Kr(l);
|
|
3345
|
+
return en(a, e), tn(a), rn(a, e), Re(a, r, 0), e >= 7 && nn(a, e), on(a, s), isNaN(n) && (n = Fe.getBestMask(
|
|
3285
3346
|
a,
|
|
3286
3347
|
Re.bind(null, a, r)
|
|
3287
|
-
)),
|
|
3348
|
+
)), Fe.applyMask(n, a), Re(a, r, n), {
|
|
3288
3349
|
modules: a,
|
|
3289
3350
|
version: e,
|
|
3290
3351
|
errorCorrectionLevel: r,
|
|
@@ -3295,10 +3356,10 @@ Minimum version required to store current data is: ` + o + `.
|
|
|
3295
3356
|
wt.create = function(e, r) {
|
|
3296
3357
|
if (typeof e > "u" || e === "")
|
|
3297
3358
|
throw new Error("No input text");
|
|
3298
|
-
let n =
|
|
3299
|
-
return typeof r < "u" && (n =
|
|
3359
|
+
let n = Te.M, i, o;
|
|
3360
|
+
return typeof r < "u" && (n = Te.from(r.errorCorrectionLevel, Te.M), i = xe.from(r.version), o = Fe.from(r.maskPattern), r.toSJISFunc && Ee.setToSJISFunction(r.toSJISFunc)), ln(e, i, n, o);
|
|
3300
3361
|
};
|
|
3301
|
-
var
|
|
3362
|
+
var Tt = {}, Ge = {};
|
|
3302
3363
|
(function(t) {
|
|
3303
3364
|
function e(r) {
|
|
3304
3365
|
if (typeof r == "number" && (r = r.toString()), typeof r != "string")
|
|
@@ -3343,15 +3404,15 @@ var Nt = {}, We = {};
|
|
|
3343
3404
|
for (let u = 0; u < c; u++) {
|
|
3344
3405
|
let m = (p * c + u) * 4, y = o.color.light;
|
|
3345
3406
|
if (p >= d && u >= d && p < c - d && u < c - d) {
|
|
3346
|
-
const
|
|
3347
|
-
y = h[l[
|
|
3407
|
+
const E = Math.floor((p - d) / a), b = Math.floor((u - d) / a);
|
|
3408
|
+
y = h[l[E * s + b] ? 1 : 0];
|
|
3348
3409
|
}
|
|
3349
3410
|
n[m++] = y.r, n[m++] = y.g, n[m++] = y.b, n[m] = y.a;
|
|
3350
3411
|
}
|
|
3351
3412
|
};
|
|
3352
|
-
})(
|
|
3413
|
+
})(Ge);
|
|
3353
3414
|
(function(t) {
|
|
3354
|
-
const e =
|
|
3415
|
+
const e = Ge;
|
|
3355
3416
|
function r(i, o, s) {
|
|
3356
3417
|
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";
|
|
3357
3418
|
}
|
|
@@ -3373,34 +3434,34 @@ var Nt = {}, We = {};
|
|
|
3373
3434
|
const c = t.render(o, s, a), d = a.type || "image/png", h = a.rendererOpts || {};
|
|
3374
3435
|
return c.toDataURL(d, h.quality);
|
|
3375
3436
|
};
|
|
3376
|
-
})(
|
|
3377
|
-
var
|
|
3378
|
-
const
|
|
3437
|
+
})(Tt);
|
|
3438
|
+
var Nt = {};
|
|
3439
|
+
const cn = Ge;
|
|
3379
3440
|
function dt(t, e) {
|
|
3380
3441
|
const r = t.a / 255, n = e + '="' + t.hex + '"';
|
|
3381
3442
|
return r < 1 ? n + " " + e + '-opacity="' + r.toFixed(2).slice(1) + '"' : n;
|
|
3382
3443
|
}
|
|
3383
|
-
function
|
|
3444
|
+
function Be(t, e, r) {
|
|
3384
3445
|
let n = t + e;
|
|
3385
3446
|
return typeof r < "u" && (n += " " + r), n;
|
|
3386
3447
|
}
|
|
3387
|
-
function
|
|
3448
|
+
function dn(t, e, r) {
|
|
3388
3449
|
let n = "", i = 0, o = !1, s = 0;
|
|
3389
3450
|
for (let l = 0; l < t.length; l++) {
|
|
3390
3451
|
const a = Math.floor(l % e), c = Math.floor(l / e);
|
|
3391
|
-
!a && !o && (o = !0), t[l] ? (s++, l > 0 && a > 0 && t[l - 1] || (n += o ?
|
|
3452
|
+
!a && !o && (o = !0), t[l] ? (s++, l > 0 && a > 0 && t[l - 1] || (n += o ? Be("M", a + r, 0.5 + c + r) : Be("m", i, 0), i = 0, o = !1), a + 1 < e && t[l + 1] || (n += Be("h", s), s = 0)) : i++;
|
|
3392
3453
|
}
|
|
3393
3454
|
return n;
|
|
3394
3455
|
}
|
|
3395
|
-
|
|
3396
|
-
const i =
|
|
3456
|
+
Nt.render = function(e, r, n) {
|
|
3457
|
+
const i = cn.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="' + dn(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>
|
|
3397
3458
|
`;
|
|
3398
3459
|
return typeof n == "function" && n(null, p), p;
|
|
3399
3460
|
};
|
|
3400
|
-
const
|
|
3401
|
-
function
|
|
3461
|
+
const un = Cr, ze = wt, Rt = Tt, hn = Nt;
|
|
3462
|
+
function We(t, e, r, n, i) {
|
|
3402
3463
|
const o = [].slice.call(arguments, 1), s = o.length, l = typeof o[s - 1] == "function";
|
|
3403
|
-
if (!l && !
|
|
3464
|
+
if (!l && !un())
|
|
3404
3465
|
throw new Error("Callback required as last argument");
|
|
3405
3466
|
if (l) {
|
|
3406
3467
|
if (s < 2)
|
|
@@ -3426,17 +3487,17 @@ function Ze(t, e, r, n, i) {
|
|
|
3426
3487
|
}
|
|
3427
3488
|
}
|
|
3428
3489
|
pe.create = ze.create;
|
|
3429
|
-
pe.toCanvas =
|
|
3430
|
-
pe.toDataURL =
|
|
3431
|
-
pe.toString =
|
|
3432
|
-
return
|
|
3490
|
+
pe.toCanvas = We.bind(null, Rt.render);
|
|
3491
|
+
pe.toDataURL = We.bind(null, Rt.renderToDataURL);
|
|
3492
|
+
pe.toString = We.bind(null, function(t, e, r) {
|
|
3493
|
+
return hn.render(t, r);
|
|
3433
3494
|
});
|
|
3434
|
-
var
|
|
3435
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
3495
|
+
var pn = Object.defineProperty, mn = Object.getOwnPropertyDescriptor, k = (t, e, r, n) => {
|
|
3496
|
+
for (var i = n > 1 ? void 0 : n ? mn(e, r) : e, o = t.length - 1, s; o >= 0; o--)
|
|
3436
3497
|
(s = t[o]) && (i = (n ? s(e, r, i) : s(i)) || i);
|
|
3437
|
-
return n && i &&
|
|
3498
|
+
return n && i && pn(e, r, i), i;
|
|
3438
3499
|
};
|
|
3439
|
-
let
|
|
3500
|
+
let S = class extends se {
|
|
3440
3501
|
constructor() {
|
|
3441
3502
|
super(...arguments), this.currentState = { status: "idle" }, this.selectedMethod = null, this.cardFormData = {
|
|
3442
3503
|
cardNumber: "",
|
|
@@ -3591,18 +3652,30 @@ let w = class extends se {
|
|
|
3591
3652
|
return t.length === 0 ? [] : t.filter((e) => {
|
|
3592
3653
|
var r;
|
|
3593
3654
|
return !((r = this.excludePaymentMethods) != null && r.includes(e.id));
|
|
3594
|
-
}).map((e) => e.id ===
|
|
3655
|
+
}).map((e) => e.id === w.PAYNOW && this.getTransactionData().currency !== "SGD" ? {
|
|
3595
3656
|
id: e.id,
|
|
3596
3657
|
enabled: !1,
|
|
3597
3658
|
disabledReason: "PayNow is only available for SGD currency"
|
|
3598
|
-
} : e.id ===
|
|
3659
|
+
} : e.id === w.PROMPTPAY && this.getTransactionData().currency !== "THB" ? {
|
|
3599
3660
|
id: e.id,
|
|
3600
3661
|
enabled: !1,
|
|
3601
3662
|
disabledReason: "PromptPay is only available for THB currency"
|
|
3602
|
-
} : e.id ===
|
|
3663
|
+
} : e.id === w.DUITNOW && this.getTransactionData().currency !== "MYR" ? {
|
|
3603
3664
|
id: e.id,
|
|
3604
3665
|
enabled: !1,
|
|
3605
3666
|
disabledReason: "DuitNow is only available for MYR currency"
|
|
3667
|
+
} : e.id === w.GOPAY && this.getTransactionData().currency !== "IDR" ? {
|
|
3668
|
+
id: e.id,
|
|
3669
|
+
enabled: !1,
|
|
3670
|
+
disabledReason: "GoPay is only available for IDR currency"
|
|
3671
|
+
} : e.id === w.BOOST && this.getTransactionData().currency !== "MYR" ? {
|
|
3672
|
+
id: e.id,
|
|
3673
|
+
enabled: !1,
|
|
3674
|
+
disabledReason: "Boost is only available for MYR currency"
|
|
3675
|
+
} : e.id === w.SHOPEEPAY && this.getTransactionData().currency !== "MYR" ? {
|
|
3676
|
+
id: e.id,
|
|
3677
|
+
enabled: !1,
|
|
3678
|
+
disabledReason: "ShopeePay is only available for MYR currency"
|
|
3606
3679
|
} : {
|
|
3607
3680
|
id: e.id,
|
|
3608
3681
|
enabled: !0
|
|
@@ -3704,6 +3777,24 @@ let w = class extends se {
|
|
|
3704
3777
|
const { redirectUrl: r } = e.payload;
|
|
3705
3778
|
r && (window.location.href = r);
|
|
3706
3779
|
}
|
|
3780
|
+
), this.sdk.on(
|
|
3781
|
+
"gopay_redirect",
|
|
3782
|
+
(e) => {
|
|
3783
|
+
const { redirectUrl: r } = e.payload;
|
|
3784
|
+
r && (window.location.href = r);
|
|
3785
|
+
}
|
|
3786
|
+
), this.sdk.on(
|
|
3787
|
+
"boost_redirect",
|
|
3788
|
+
(e) => {
|
|
3789
|
+
const { redirectUrl: r } = e.payload;
|
|
3790
|
+
r && (window.location.href = r);
|
|
3791
|
+
}
|
|
3792
|
+
), this.sdk.on(
|
|
3793
|
+
"shopeepay_redirect",
|
|
3794
|
+
(e) => {
|
|
3795
|
+
const { redirectUrl: r } = e.payload;
|
|
3796
|
+
r && (window.location.href = r);
|
|
3797
|
+
}
|
|
3707
3798
|
), this.sdk.initialize({
|
|
3708
3799
|
amount: this.amount,
|
|
3709
3800
|
currency: this.currency,
|
|
@@ -3774,7 +3865,7 @@ let w = class extends se {
|
|
|
3774
3865
|
return;
|
|
3775
3866
|
this.paymentLocked = !0;
|
|
3776
3867
|
const t = this.cardFormData.expiry.split("/"), e = (t[0] || "").trim(), n = `20${(t[1] || "").trim().substring(0, 2)}`;
|
|
3777
|
-
this.sdk.submitPayment(
|
|
3868
|
+
this.sdk.submitPayment(w.CARD, {
|
|
3778
3869
|
cardNumber: this.cardFormData.cardNumber.replace(/\s/g, ""),
|
|
3779
3870
|
expiryMonth: e,
|
|
3780
3871
|
expiryYear: n,
|
|
@@ -3785,21 +3876,42 @@ let w = class extends se {
|
|
|
3785
3876
|
});
|
|
3786
3877
|
}
|
|
3787
3878
|
handlePayNowPayment() {
|
|
3788
|
-
!this.sdk || this.currentState.status !== "ready" || (this.paymentLocked = !0, this.sdk.submitPayment(
|
|
3879
|
+
!this.sdk || this.currentState.status !== "ready" || (this.paymentLocked = !0, this.sdk.submitPayment(w.PAYNOW, {
|
|
3789
3880
|
firstName: this.firstName,
|
|
3790
3881
|
lastName: this.lastName,
|
|
3791
3882
|
email: this.email
|
|
3792
3883
|
}));
|
|
3793
3884
|
}
|
|
3794
3885
|
handlePromptPayPayment() {
|
|
3795
|
-
!this.sdk || this.currentState.status !== "ready" || (this.paymentLocked = !0, this.sdk.submitPayment(
|
|
3886
|
+
!this.sdk || this.currentState.status !== "ready" || (this.paymentLocked = !0, this.sdk.submitPayment(w.PROMPTPAY, {
|
|
3796
3887
|
firstName: this.firstName,
|
|
3797
3888
|
lastName: this.lastName,
|
|
3798
3889
|
email: this.email
|
|
3799
3890
|
}));
|
|
3800
3891
|
}
|
|
3801
3892
|
handleDuitNowPayment() {
|
|
3802
|
-
!this.sdk || this.currentState.status !== "ready" || (this.paymentLocked = !0, this.sdk.submitPayment(
|
|
3893
|
+
!this.sdk || this.currentState.status !== "ready" || (this.paymentLocked = !0, this.sdk.submitPayment(w.DUITNOW, {
|
|
3894
|
+
firstName: this.firstName,
|
|
3895
|
+
lastName: this.lastName,
|
|
3896
|
+
email: this.email
|
|
3897
|
+
}));
|
|
3898
|
+
}
|
|
3899
|
+
handleGoPayPayment() {
|
|
3900
|
+
!this.sdk || this.currentState.status !== "ready" || (this.paymentLocked = !0, this.sdk.submitPayment(w.GOPAY, {
|
|
3901
|
+
firstName: this.firstName,
|
|
3902
|
+
lastName: this.lastName,
|
|
3903
|
+
email: this.email
|
|
3904
|
+
}));
|
|
3905
|
+
}
|
|
3906
|
+
handleBoostPayment() {
|
|
3907
|
+
!this.sdk || this.currentState.status !== "ready" || (this.paymentLocked = !0, this.sdk.submitPayment(w.BOOST, {
|
|
3908
|
+
firstName: this.firstName,
|
|
3909
|
+
lastName: this.lastName,
|
|
3910
|
+
email: this.email
|
|
3911
|
+
}));
|
|
3912
|
+
}
|
|
3913
|
+
handleShopeePayPayment() {
|
|
3914
|
+
!this.sdk || this.currentState.status !== "ready" || (this.paymentLocked = !0, this.sdk.submitPayment(w.SHOPEEPAY, {
|
|
3803
3915
|
firstName: this.firstName,
|
|
3804
3916
|
lastName: this.lastName,
|
|
3805
3917
|
email: this.email
|
|
@@ -3835,7 +3947,7 @@ let w = class extends se {
|
|
|
3835
3947
|
};
|
|
3836
3948
|
}
|
|
3837
3949
|
renderTransactionDetailsSkeleton() {
|
|
3838
|
-
return
|
|
3950
|
+
return x`
|
|
3839
3951
|
<div class="skeleton-transaction">
|
|
3840
3952
|
<div class="skeleton skeleton-title"></div>
|
|
3841
3953
|
<div class="skeleton-row">
|
|
@@ -3859,7 +3971,7 @@ let w = class extends se {
|
|
|
3859
3971
|
`;
|
|
3860
3972
|
}
|
|
3861
3973
|
renderPaymentMethodsSkeleton() {
|
|
3862
|
-
return
|
|
3974
|
+
return x`
|
|
3863
3975
|
<div>
|
|
3864
3976
|
<div class="skeleton-method">
|
|
3865
3977
|
<div class="skeleton skeleton-radio"></div>
|
|
@@ -3879,7 +3991,7 @@ let w = class extends se {
|
|
|
3879
3991
|
this.width ? `--one-payment-width: ${this.width}` : "",
|
|
3880
3992
|
this.maxWidth ? `--one-payment-max-width: ${this.maxWidth}` : ""
|
|
3881
3993
|
].filter(Boolean).join("; ");
|
|
3882
|
-
return
|
|
3994
|
+
return x`
|
|
3883
3995
|
<div class="payment-element" style="${t}">
|
|
3884
3996
|
${this.renderTransactionDetailsSkeleton()}
|
|
3885
3997
|
<div class="header">Select a payment method</div>
|
|
@@ -3889,7 +4001,7 @@ let w = class extends se {
|
|
|
3889
4001
|
}
|
|
3890
4002
|
renderTransactionDetails() {
|
|
3891
4003
|
const t = this.getTransactionData(), e = (r) => r.toFixed(2);
|
|
3892
|
-
return
|
|
4004
|
+
return x`
|
|
3893
4005
|
<div class="transaction-details">
|
|
3894
4006
|
<h2 class="transaction-title">Transaction details</h2>
|
|
3895
4007
|
|
|
@@ -3924,7 +4036,7 @@ let w = class extends se {
|
|
|
3924
4036
|
margin-top: ${this.feesExpanded ? "0.625rem" : "0"};
|
|
3925
4037
|
`}
|
|
3926
4038
|
>
|
|
3927
|
-
${t.feeBreakdown ?
|
|
4039
|
+
${t.feeBreakdown ? x`
|
|
3928
4040
|
<div class="fee-breakdown-inner">
|
|
3929
4041
|
<div class="breakdown-row">
|
|
3930
4042
|
<span class="breakdown-label">Transaction fee:</span>
|
|
@@ -3958,7 +4070,7 @@ let w = class extends se {
|
|
|
3958
4070
|
renderCardForm() {
|
|
3959
4071
|
setTimeout(() => this.setupCleave(), 0);
|
|
3960
4072
|
const t = this.cardBrand === "amex" ? 4 : 3, e = this.cardBrand === "amex" ? "1234" : "123";
|
|
3961
|
-
return
|
|
4073
|
+
return x`
|
|
3962
4074
|
<div class="card-form">
|
|
3963
4075
|
<h4 class="form-title">Card Information</h4>
|
|
3964
4076
|
<div class="form-fields">
|
|
@@ -3973,7 +4085,7 @@ let w = class extends se {
|
|
|
3973
4085
|
.value=${this.cardFormData.cardNumber}
|
|
3974
4086
|
@input=${(r) => this.handleInputChange("cardNumber", r.target.value)}
|
|
3975
4087
|
/>
|
|
3976
|
-
${this.formErrors.cardNumber ?
|
|
4088
|
+
${this.formErrors.cardNumber ? x`<div class="error-message">${this.formErrors.cardNumber}</div>` : ""}
|
|
3977
4089
|
</div>
|
|
3978
4090
|
|
|
3979
4091
|
<!-- Single Expiry Field -->
|
|
@@ -3992,7 +4104,7 @@ let w = class extends se {
|
|
|
3992
4104
|
}, 0);
|
|
3993
4105
|
}}
|
|
3994
4106
|
/>
|
|
3995
|
-
${this.formErrors.expiry ?
|
|
4107
|
+
${this.formErrors.expiry ? x`<div class="error-message">${this.formErrors.expiry}</div>` : ""}
|
|
3996
4108
|
</div>
|
|
3997
4109
|
|
|
3998
4110
|
<!-- CVV -->
|
|
@@ -4009,7 +4121,7 @@ let w = class extends se {
|
|
|
4009
4121
|
r.target.value = n, this.handleInputChange("cvv", n);
|
|
4010
4122
|
}}
|
|
4011
4123
|
/>
|
|
4012
|
-
${this.formErrors.cvv ?
|
|
4124
|
+
${this.formErrors.cvv ? x`<div class="error-message">${this.formErrors.cvv}</div>` : ""}
|
|
4013
4125
|
</div>
|
|
4014
4126
|
|
|
4015
4127
|
<!-- Cardholder Name -->
|
|
@@ -4025,7 +4137,7 @@ let w = class extends se {
|
|
|
4025
4137
|
r.target.value = n, this.handleInputChange("cardholderName", n);
|
|
4026
4138
|
}}
|
|
4027
4139
|
/>
|
|
4028
|
-
${this.formErrors.cardholderName ?
|
|
4140
|
+
${this.formErrors.cardholderName ? x`<div class="error-message">${this.formErrors.cardholderName}</div>` : ""}
|
|
4029
4141
|
</div>
|
|
4030
4142
|
</div>
|
|
4031
4143
|
|
|
@@ -4042,7 +4154,7 @@ let w = class extends se {
|
|
|
4042
4154
|
`;
|
|
4043
4155
|
}
|
|
4044
4156
|
renderPayNowContent() {
|
|
4045
|
-
return this.showQRModal && this.qrCodeDataUrl ?
|
|
4157
|
+
return this.showQRModal && this.qrCodeDataUrl ? x`
|
|
4046
4158
|
<div class="paynow-container">
|
|
4047
4159
|
<!-- Render generated QR code image -->
|
|
4048
4160
|
<div class="qr-code-wrapper">
|
|
@@ -4059,7 +4171,7 @@ let w = class extends se {
|
|
|
4059
4171
|
${this.qrPollingInProgress ? "Verifying..." : "I Have Scanned the QR Code"}
|
|
4060
4172
|
</button>
|
|
4061
4173
|
</div>
|
|
4062
|
-
` :
|
|
4174
|
+
` : x`
|
|
4063
4175
|
<div class="paynow-container">
|
|
4064
4176
|
<div class="paynow-instructions">
|
|
4065
4177
|
<h3 class="instructions-title">How to Pay by QR:</h3>
|
|
@@ -4090,7 +4202,7 @@ let w = class extends se {
|
|
|
4090
4202
|
`;
|
|
4091
4203
|
}
|
|
4092
4204
|
renderPromptPayContent() {
|
|
4093
|
-
return
|
|
4205
|
+
return x`
|
|
4094
4206
|
<div class="paynow-container">
|
|
4095
4207
|
<div class="paynow-instructions">
|
|
4096
4208
|
<h3 class="instructions-title">How to Pay with PromptPay:</h3>
|
|
@@ -4126,7 +4238,7 @@ let w = class extends se {
|
|
|
4126
4238
|
`;
|
|
4127
4239
|
}
|
|
4128
4240
|
renderDuitNowContent() {
|
|
4129
|
-
return
|
|
4241
|
+
return x`
|
|
4130
4242
|
<div class="paynow-container">
|
|
4131
4243
|
<div class="paynow-instructions">
|
|
4132
4244
|
<h3 class="instructions-title">How to Pay with DuitNow:</h3>
|
|
@@ -4161,8 +4273,116 @@ let w = class extends se {
|
|
|
4161
4273
|
</div>
|
|
4162
4274
|
`;
|
|
4163
4275
|
}
|
|
4276
|
+
renderGoPayContent() {
|
|
4277
|
+
return x`
|
|
4278
|
+
<div class="paynow-container">
|
|
4279
|
+
<div class="paynow-instructions">
|
|
4280
|
+
<h3 class="instructions-title">How to Pay with GoPay:</h3>
|
|
4281
|
+
|
|
4282
|
+
<div class="instruction-steps">
|
|
4283
|
+
<div class="instruction-step">
|
|
4284
|
+
<div class="step-number">1</div>
|
|
4285
|
+
<p class="step-text">Click <strong>"Pay"</strong> to go to the payment page.</p>
|
|
4286
|
+
</div>
|
|
4287
|
+
|
|
4288
|
+
<div class="instruction-step">
|
|
4289
|
+
<div class="step-number">2</div>
|
|
4290
|
+
<p class="step-text">Complete payment in your Gojek app.</p>
|
|
4291
|
+
</div>
|
|
4292
|
+
|
|
4293
|
+
<div class="instruction-step">
|
|
4294
|
+
<div class="step-number">3</div>
|
|
4295
|
+
<p class="step-text">You'll be redirected back automatically.</p>
|
|
4296
|
+
</div>
|
|
4297
|
+
</div>
|
|
4298
|
+
|
|
4299
|
+
<div class="submit-section">
|
|
4300
|
+
<button
|
|
4301
|
+
class="pay-button ${this.currentState.status === "processing" || this.currentState.status === "requires_action" ? "loading" : ""}"
|
|
4302
|
+
@click=${this.handleGoPayPayment}
|
|
4303
|
+
?disabled=${this.currentState.status === "processing" || this.currentState.status === "requires_action"}
|
|
4304
|
+
>
|
|
4305
|
+
${this.currentState.status === "processing" || this.currentState.status === "requires_action" ? "Redirecting..." : `Pay ${this.currency} ${this.amount.toFixed(2)}`}
|
|
4306
|
+
</button>
|
|
4307
|
+
</div>
|
|
4308
|
+
</div>
|
|
4309
|
+
</div>
|
|
4310
|
+
`;
|
|
4311
|
+
}
|
|
4312
|
+
renderBoostContent() {
|
|
4313
|
+
return x`
|
|
4314
|
+
<div class="paynow-container">
|
|
4315
|
+
<div class="paynow-instructions">
|
|
4316
|
+
<h3 class="instructions-title">How to Pay with Boost:</h3>
|
|
4317
|
+
|
|
4318
|
+
<div class="instruction-steps">
|
|
4319
|
+
<div class="instruction-step">
|
|
4320
|
+
<div class="step-number">1</div>
|
|
4321
|
+
<p class="step-text">Click <strong>"Pay"</strong> to go to the payment page.</p>
|
|
4322
|
+
</div>
|
|
4323
|
+
|
|
4324
|
+
<div class="instruction-step">
|
|
4325
|
+
<div class="step-number">2</div>
|
|
4326
|
+
<p class="step-text">Complete payment in your Boost app.</p>
|
|
4327
|
+
</div>
|
|
4328
|
+
|
|
4329
|
+
<div class="instruction-step">
|
|
4330
|
+
<div class="step-number">3</div>
|
|
4331
|
+
<p class="step-text">You'll be redirected back automatically.</p>
|
|
4332
|
+
</div>
|
|
4333
|
+
</div>
|
|
4334
|
+
|
|
4335
|
+
<div class="submit-section">
|
|
4336
|
+
<button
|
|
4337
|
+
class="pay-button ${this.currentState.status === "processing" || this.currentState.status === "requires_action" ? "loading" : ""}"
|
|
4338
|
+
@click=${this.handleBoostPayment}
|
|
4339
|
+
?disabled=${this.currentState.status === "processing" || this.currentState.status === "requires_action"}
|
|
4340
|
+
>
|
|
4341
|
+
${this.currentState.status === "processing" || this.currentState.status === "requires_action" ? "Redirecting..." : `Pay ${this.currency} ${this.amount.toFixed(2)}`}
|
|
4342
|
+
</button>
|
|
4343
|
+
</div>
|
|
4344
|
+
</div>
|
|
4345
|
+
</div>
|
|
4346
|
+
`;
|
|
4347
|
+
}
|
|
4348
|
+
renderShopeePayContent() {
|
|
4349
|
+
return x`
|
|
4350
|
+
<div class="paynow-container">
|
|
4351
|
+
<div class="paynow-instructions">
|
|
4352
|
+
<h3 class="instructions-title">How to Pay with ShopeePay:</h3>
|
|
4353
|
+
|
|
4354
|
+
<div class="instruction-steps">
|
|
4355
|
+
<div class="instruction-step">
|
|
4356
|
+
<div class="step-number">1</div>
|
|
4357
|
+
<p class="step-text">Click <strong>"Pay"</strong> to go to the payment page.</p>
|
|
4358
|
+
</div>
|
|
4359
|
+
|
|
4360
|
+
<div class="instruction-step">
|
|
4361
|
+
<div class="step-number">2</div>
|
|
4362
|
+
<p class="step-text">Complete payment in your Shopee app.</p>
|
|
4363
|
+
</div>
|
|
4364
|
+
|
|
4365
|
+
<div class="instruction-step">
|
|
4366
|
+
<div class="step-number">3</div>
|
|
4367
|
+
<p class="step-text">You'll be redirected back automatically.</p>
|
|
4368
|
+
</div>
|
|
4369
|
+
</div>
|
|
4370
|
+
|
|
4371
|
+
<div class="submit-section">
|
|
4372
|
+
<button
|
|
4373
|
+
class="pay-button ${this.currentState.status === "processing" || this.currentState.status === "requires_action" ? "loading" : ""}"
|
|
4374
|
+
@click=${this.handleShopeePayPayment}
|
|
4375
|
+
?disabled=${this.currentState.status === "processing" || this.currentState.status === "requires_action"}
|
|
4376
|
+
>
|
|
4377
|
+
${this.currentState.status === "processing" || this.currentState.status === "requires_action" ? "Redirecting..." : `Pay ${this.currency} ${this.amount.toFixed(2)}`}
|
|
4378
|
+
</button>
|
|
4379
|
+
</div>
|
|
4380
|
+
</div>
|
|
4381
|
+
</div>
|
|
4382
|
+
`;
|
|
4383
|
+
}
|
|
4164
4384
|
render3DSModal() {
|
|
4165
|
-
return !this.show3DSModal || !this.nextActionUrl ? null :
|
|
4385
|
+
return !this.show3DSModal || !this.nextActionUrl ? null : x`
|
|
4166
4386
|
<div class="modal-overlay">
|
|
4167
4387
|
<div class="modal-content iframe-modal">
|
|
4168
4388
|
<iframe
|
|
@@ -4177,7 +4397,7 @@ let w = class extends se {
|
|
|
4177
4397
|
}
|
|
4178
4398
|
renderStatusBlock() {
|
|
4179
4399
|
if (this.currentState.status === "succeeded")
|
|
4180
|
-
return
|
|
4400
|
+
return x`
|
|
4181
4401
|
<div class="result-card success">
|
|
4182
4402
|
<div class="result-icon-wrapper">
|
|
4183
4403
|
<div class="result-icon">✓</div>
|
|
@@ -4191,7 +4411,7 @@ let w = class extends se {
|
|
|
4191
4411
|
`;
|
|
4192
4412
|
if (this.currentState.status === "failed") {
|
|
4193
4413
|
const t = this.currentState.error ? this.currentState.error.message : "An error occurred while processing your payment";
|
|
4194
|
-
return
|
|
4414
|
+
return x`
|
|
4195
4415
|
<div class="result-card error">
|
|
4196
4416
|
<div class="result-icon-wrapper">
|
|
4197
4417
|
<div class="result-icon">✕</div>
|
|
@@ -4219,18 +4439,24 @@ let w = class extends se {
|
|
|
4219
4439
|
}
|
|
4220
4440
|
const n = (s) => {
|
|
4221
4441
|
switch (s) {
|
|
4222
|
-
case
|
|
4442
|
+
case w.CARD:
|
|
4223
4443
|
return "Card";
|
|
4224
|
-
case
|
|
4444
|
+
case w.PAYNOW:
|
|
4225
4445
|
return "PayNow";
|
|
4226
|
-
case
|
|
4446
|
+
case w.PROMPTPAY:
|
|
4227
4447
|
return "PromptPay";
|
|
4228
|
-
case
|
|
4448
|
+
case w.DUITNOW:
|
|
4229
4449
|
return "DuitNow";
|
|
4450
|
+
case w.GOPAY:
|
|
4451
|
+
return "GoPay";
|
|
4452
|
+
case w.BOOST:
|
|
4453
|
+
return "Boost";
|
|
4454
|
+
case w.SHOPEEPAY:
|
|
4455
|
+
return "ShopeePay";
|
|
4230
4456
|
default:
|
|
4231
4457
|
return s;
|
|
4232
4458
|
}
|
|
4233
|
-
}, i = (s) => s ===
|
|
4459
|
+
}, i = (s) => s === w.CARD ? x`
|
|
4234
4460
|
<div class="method-icon-right">
|
|
4235
4461
|
<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
4236
4462
|
<path
|
|
@@ -4243,34 +4469,46 @@ let w = class extends se {
|
|
|
4243
4469
|
/>
|
|
4244
4470
|
</svg>
|
|
4245
4471
|
</div>
|
|
4246
|
-
` : s ===
|
|
4472
|
+
` : s === w.PAYNOW ? x`
|
|
4247
4473
|
<div class="method-icon-right">
|
|
4248
4474
|
<img src="${dr}" alt="PayNow" style="width: 45px; height: auto;" />
|
|
4249
4475
|
</div>
|
|
4250
|
-
` : s ===
|
|
4476
|
+
` : s === w.PROMPTPAY ? x`
|
|
4251
4477
|
<div class="method-icon-right">
|
|
4252
4478
|
<img src="${ur}" alt="PromptPay" style="width: 45px; height: auto;" />
|
|
4253
4479
|
</div>
|
|
4254
|
-
` : s ===
|
|
4480
|
+
` : s === w.DUITNOW ? x`
|
|
4255
4481
|
<div class="method-icon-right">
|
|
4256
4482
|
<img src="${hr}" alt="DuitNow" style="width: 45px; height: auto;" />
|
|
4257
4483
|
</div>
|
|
4484
|
+
` : s === w.GOPAY ? x`
|
|
4485
|
+
<div class="method-icon-right">
|
|
4486
|
+
<img src="${pr}" alt="GoPay" style="width: 45px; height: auto;" />
|
|
4487
|
+
</div>
|
|
4488
|
+
` : s === w.BOOST ? x`
|
|
4489
|
+
<div class="method-icon-right">
|
|
4490
|
+
<img src="${mr}" alt="Boost" style="width: 45px; height: auto;" />
|
|
4491
|
+
</div>
|
|
4492
|
+
` : s === w.SHOPEEPAY ? x`
|
|
4493
|
+
<div class="method-icon-right">
|
|
4494
|
+
<img src="${fr}" alt="ShopeePay" style="width: 45px; height: auto;" />
|
|
4495
|
+
</div>
|
|
4258
4496
|
` : null, o = [
|
|
4259
4497
|
this.width ? `--one-payment-width: ${this.width}` : "",
|
|
4260
4498
|
this.maxWidth ? `--one-payment-max-width: ${this.maxWidth}` : ""
|
|
4261
4499
|
].filter(Boolean).join("; ");
|
|
4262
|
-
return
|
|
4500
|
+
return x`
|
|
4263
4501
|
<div class="payment-element" style="${o}">
|
|
4264
4502
|
${this.renderTransactionDetails()}
|
|
4265
|
-
${e ?
|
|
4503
|
+
${e ? x`
|
|
4266
4504
|
<div class="header">Select a payment method</div>
|
|
4267
4505
|
<div class="payment-methods-list">
|
|
4268
4506
|
${r.map((s) => {
|
|
4269
4507
|
const l = this.selectedMethod === s.id, a = !s.enabled || this.paymentLocked && !l;
|
|
4270
|
-
return
|
|
4508
|
+
return x`
|
|
4271
4509
|
<div
|
|
4272
4510
|
class="payment-method-item"
|
|
4273
|
-
${s.disabledReason ?
|
|
4511
|
+
${s.disabledReason ? x`data-tooltip="${s.disabledReason}"` : ""}
|
|
4274
4512
|
>
|
|
4275
4513
|
<div
|
|
4276
4514
|
class="method-header ${l ? "selected" : ""} ${a ? "disabled" : ""}"
|
|
@@ -4282,13 +4520,15 @@ let w = class extends se {
|
|
|
4282
4520
|
name="payment-method"
|
|
4283
4521
|
.checked=${l}
|
|
4284
4522
|
?disabled=${a}
|
|
4285
|
-
@click=${(c) =>
|
|
4523
|
+
@click=${(c) => {
|
|
4524
|
+
c.stopPropagation(), s.enabled && this.handleMethodSelect(s.id);
|
|
4525
|
+
}}
|
|
4286
4526
|
/>
|
|
4287
4527
|
<span class="method-name">${n(s.id)}</span>
|
|
4288
4528
|
${i(s.id)}
|
|
4289
4529
|
</div>
|
|
4290
|
-
${l ?
|
|
4291
|
-
${s.id ===
|
|
4530
|
+
${l ? x`<div class="method-content">
|
|
4531
|
+
${s.id === w.CARD ? this.renderCardForm() : s.id === w.PAYNOW ? this.renderPayNowContent() : s.id === w.PROMPTPAY ? this.renderPromptPayContent() : s.id === w.DUITNOW ? this.renderDuitNowContent() : s.id === w.GOPAY ? this.renderGoPayContent() : s.id === w.BOOST ? this.renderBoostContent() : s.id === w.SHOPEEPAY ? this.renderShopeePayContent() : null}
|
|
4292
4532
|
</div>` : ""}
|
|
4293
4533
|
</div>
|
|
4294
4534
|
`;
|
|
@@ -4302,7 +4542,7 @@ let w = class extends se {
|
|
|
4302
4542
|
`;
|
|
4303
4543
|
}
|
|
4304
4544
|
};
|
|
4305
|
-
|
|
4545
|
+
S.styles = Lt`
|
|
4306
4546
|
/* ═══════════════════════════════════════════════════════════════
|
|
4307
4547
|
CSS CUSTOM PROPERTIES (Theming)
|
|
4308
4548
|
═══════════════════════════════════════════════════════════════ */
|
|
@@ -5624,106 +5864,106 @@ w.styles = Bt`
|
|
|
5624
5864
|
}
|
|
5625
5865
|
}
|
|
5626
5866
|
`;
|
|
5627
|
-
|
|
5867
|
+
k([
|
|
5628
5868
|
D({ type: Object })
|
|
5629
|
-
],
|
|
5630
|
-
|
|
5869
|
+
], S.prototype, "config", 2);
|
|
5870
|
+
k([
|
|
5631
5871
|
D({ type: Object })
|
|
5632
|
-
],
|
|
5633
|
-
|
|
5872
|
+
], S.prototype, "adapters", 2);
|
|
5873
|
+
k([
|
|
5634
5874
|
D({ type: Number })
|
|
5635
|
-
],
|
|
5636
|
-
|
|
5875
|
+
], S.prototype, "amount", 2);
|
|
5876
|
+
k([
|
|
5637
5877
|
D({ type: String })
|
|
5638
|
-
],
|
|
5639
|
-
|
|
5878
|
+
], S.prototype, "currency", 2);
|
|
5879
|
+
k([
|
|
5640
5880
|
D({ type: String })
|
|
5641
|
-
],
|
|
5642
|
-
|
|
5881
|
+
], S.prototype, "orderId", 2);
|
|
5882
|
+
k([
|
|
5643
5883
|
D({ type: String })
|
|
5644
|
-
],
|
|
5645
|
-
|
|
5884
|
+
], S.prototype, "firstName", 2);
|
|
5885
|
+
k([
|
|
5646
5886
|
D({ type: String })
|
|
5647
|
-
],
|
|
5648
|
-
|
|
5887
|
+
], S.prototype, "lastName", 2);
|
|
5888
|
+
k([
|
|
5649
5889
|
D({ type: String })
|
|
5650
|
-
],
|
|
5651
|
-
|
|
5890
|
+
], S.prototype, "email", 2);
|
|
5891
|
+
k([
|
|
5652
5892
|
D({ type: Array })
|
|
5653
|
-
],
|
|
5654
|
-
|
|
5893
|
+
], S.prototype, "excludePaymentMethods", 2);
|
|
5894
|
+
k([
|
|
5655
5895
|
D({ type: String })
|
|
5656
|
-
],
|
|
5657
|
-
|
|
5896
|
+
], S.prototype, "width", 2);
|
|
5897
|
+
k([
|
|
5658
5898
|
D({ type: String })
|
|
5659
|
-
],
|
|
5660
|
-
|
|
5899
|
+
], S.prototype, "maxWidth", 2);
|
|
5900
|
+
k([
|
|
5661
5901
|
D({ type: Object })
|
|
5662
|
-
],
|
|
5663
|
-
|
|
5902
|
+
], S.prototype, "appearance", 2);
|
|
5903
|
+
k([
|
|
5664
5904
|
M()
|
|
5665
|
-
],
|
|
5666
|
-
|
|
5905
|
+
], S.prototype, "currentState", 2);
|
|
5906
|
+
k([
|
|
5667
5907
|
M()
|
|
5668
|
-
],
|
|
5669
|
-
|
|
5908
|
+
], S.prototype, "selectedMethod", 2);
|
|
5909
|
+
k([
|
|
5670
5910
|
M()
|
|
5671
|
-
],
|
|
5672
|
-
|
|
5911
|
+
], S.prototype, "cardFormData", 2);
|
|
5912
|
+
k([
|
|
5673
5913
|
M()
|
|
5674
|
-
],
|
|
5675
|
-
|
|
5914
|
+
], S.prototype, "formErrors", 2);
|
|
5915
|
+
k([
|
|
5676
5916
|
M()
|
|
5677
|
-
],
|
|
5678
|
-
|
|
5917
|
+
], S.prototype, "paymentData", 2);
|
|
5918
|
+
k([
|
|
5679
5919
|
M()
|
|
5680
|
-
],
|
|
5681
|
-
|
|
5920
|
+
], S.prototype, "feesExpanded", 2);
|
|
5921
|
+
k([
|
|
5682
5922
|
M()
|
|
5683
|
-
],
|
|
5684
|
-
|
|
5923
|
+
], S.prototype, "isInitializing", 2);
|
|
5924
|
+
k([
|
|
5685
5925
|
M()
|
|
5686
|
-
],
|
|
5687
|
-
|
|
5926
|
+
], S.prototype, "cardBrand", 2);
|
|
5927
|
+
k([
|
|
5688
5928
|
M()
|
|
5689
|
-
],
|
|
5690
|
-
|
|
5929
|
+
], S.prototype, "paymentLocked", 2);
|
|
5930
|
+
k([
|
|
5691
5931
|
M()
|
|
5692
|
-
],
|
|
5693
|
-
|
|
5932
|
+
], S.prototype, "show3DSModal", 2);
|
|
5933
|
+
k([
|
|
5694
5934
|
M()
|
|
5695
|
-
],
|
|
5696
|
-
|
|
5935
|
+
], S.prototype, "showQRModal", 2);
|
|
5936
|
+
k([
|
|
5697
5937
|
M()
|
|
5698
|
-
],
|
|
5699
|
-
|
|
5938
|
+
], S.prototype, "nextActionUrl", 2);
|
|
5939
|
+
k([
|
|
5700
5940
|
M()
|
|
5701
|
-
],
|
|
5702
|
-
|
|
5941
|
+
], S.prototype, "qrCode", 2);
|
|
5942
|
+
k([
|
|
5703
5943
|
M()
|
|
5704
|
-
],
|
|
5705
|
-
|
|
5944
|
+
], S.prototype, "qrCodeDataUrl", 2);
|
|
5945
|
+
k([
|
|
5706
5946
|
M()
|
|
5707
|
-
],
|
|
5708
|
-
|
|
5947
|
+
], S.prototype, "qrAutoResumeTimer", 2);
|
|
5948
|
+
k([
|
|
5709
5949
|
M()
|
|
5710
|
-
],
|
|
5711
|
-
|
|
5950
|
+
], S.prototype, "qrPollingInProgress", 2);
|
|
5951
|
+
S = k([
|
|
5712
5952
|
rr("one-payment")
|
|
5713
|
-
],
|
|
5714
|
-
const
|
|
5953
|
+
], S);
|
|
5954
|
+
const fn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5715
5955
|
__proto__: null,
|
|
5716
5956
|
get OnePayment() {
|
|
5717
|
-
return
|
|
5957
|
+
return S;
|
|
5718
5958
|
}
|
|
5719
5959
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5720
|
-
function
|
|
5721
|
-
customElements.get("one-payment") || Promise.resolve().then(() =>
|
|
5960
|
+
function bn() {
|
|
5961
|
+
customElements.get("one-payment") || Promise.resolve().then(() => fn).then(({ OnePayment: t }) => {
|
|
5722
5962
|
customElements.define("one-payment", t);
|
|
5723
5963
|
});
|
|
5724
5964
|
}
|
|
5725
5965
|
export {
|
|
5726
|
-
|
|
5727
|
-
|
|
5728
|
-
|
|
5966
|
+
S as OnePayment,
|
|
5967
|
+
S as OnePaymentElement,
|
|
5968
|
+
bn as defineCustomElements
|
|
5729
5969
|
};
|