@one-payments/web-components 1.1.11 → 1.1.13
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 +277 -252
- package/dist/one-payment.d.ts.map +1 -1
- package/dist/one-payment.js +97 -25
- package/dist/one-payment.js.map +1 -1
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
5
|
*/
|
|
6
|
-
const ye = globalThis, qe = ye.ShadowRoot && (ye.ShadyCSS === void 0 || ye.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Ve = Symbol(),
|
|
6
|
+
const ye = globalThis, qe = ye.ShadowRoot && (ye.ShadyCSS === void 0 || ye.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Ve = Symbol(), Ze = /* @__PURE__ */ new WeakMap();
|
|
7
7
|
let ht = class {
|
|
8
8
|
constructor(e, n, r) {
|
|
9
9
|
if (this._$cssResult$ = !0, r !== Ve) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
@@ -14,7 +14,7 @@ let ht = class {
|
|
|
14
14
|
const n = this.t;
|
|
15
15
|
if (qe && e === void 0) {
|
|
16
16
|
const r = n !== void 0 && n.length === 1;
|
|
17
|
-
r && (e =
|
|
17
|
+
r && (e = Ze.get(n)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), r && Ze.set(n, e));
|
|
18
18
|
}
|
|
19
19
|
return e;
|
|
20
20
|
}
|
|
@@ -22,14 +22,14 @@ let ht = class {
|
|
|
22
22
|
return this.cssText;
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
|
-
const
|
|
25
|
+
const Lt = (t) => new ht(typeof t == "string" ? t : t + "", void 0, Ve), Bt = (t, ...e) => {
|
|
26
26
|
const n = t.length === 1 ? t[0] : e.reduce((r, i, o) => r + ((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
31
|
return new ht(n, t, Ve);
|
|
32
|
-
},
|
|
32
|
+
}, Ft = (t, e) => {
|
|
33
33
|
if (qe) t.adoptedStyleSheets = e.map((n) => n instanceof CSSStyleSheet ? n : n.styleSheet);
|
|
34
34
|
else for (const n of e) {
|
|
35
35
|
const r = document.createElement("style"), i = ye.litNonce;
|
|
@@ -38,17 +38,17 @@ const Rt = (t) => new ht(typeof t == "string" ? t : t + "", void 0, Ve), Bt = (t
|
|
|
38
38
|
}, We = qe ? (t) => t : (t) => t instanceof CSSStyleSheet ? ((e) => {
|
|
39
39
|
let n = "";
|
|
40
40
|
for (const r of e.cssRules) n += r.cssText;
|
|
41
|
-
return
|
|
41
|
+
return Lt(n);
|
|
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: Ut, defineProperty: Ot, getOwnPropertyDescriptor: zt, getOwnPropertyNames: qt, getOwnPropertySymbols: Vt, getPrototypeOf: Ht } = Object, O = globalThis, Xe = O.trustedTypes,
|
|
48
|
+
const { is: Ut, defineProperty: Ot, getOwnPropertyDescriptor: zt, getOwnPropertyNames: qt, getOwnPropertySymbols: Vt, getPrototypeOf: Ht } = Object, O = globalThis, Xe = O.trustedTypes, Yt = Xe ? Xe.emptyScript : "", Pe = O.reactiveElementPolyfillSupport, ie = (t, e) => t, be = { toAttribute(t, e) {
|
|
49
49
|
switch (e) {
|
|
50
50
|
case Boolean:
|
|
51
|
-
t = t ?
|
|
51
|
+
t = t ? Yt : null;
|
|
52
52
|
break;
|
|
53
53
|
case Object:
|
|
54
54
|
case Array:
|
|
@@ -159,7 +159,7 @@ let Q = class extends HTMLElement {
|
|
|
159
159
|
}
|
|
160
160
|
createRenderRoot() {
|
|
161
161
|
const e = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
162
|
-
return
|
|
162
|
+
return Ft(e, this.constructor.elementStyles), e;
|
|
163
163
|
}
|
|
164
164
|
connectedCallback() {
|
|
165
165
|
var e;
|
|
@@ -278,20 +278,20 @@ let Q = class extends HTMLElement {
|
|
|
278
278
|
firstUpdated(e) {
|
|
279
279
|
}
|
|
280
280
|
};
|
|
281
|
-
Q.elementStyles = [], Q.shadowRootOptions = { mode: "open" }, Q[ie("elementProperties")] = /* @__PURE__ */ new Map(), Q[ie("finalized")] = /* @__PURE__ */ new Map(),
|
|
281
|
+
Q.elementStyles = [], Q.shadowRootOptions = { mode: "open" }, Q[ie("elementProperties")] = /* @__PURE__ */ new Map(), Q[ie("finalized")] = /* @__PURE__ */ new Map(), Pe == null || Pe({ ReactiveElement: Q }), (O.reactiveElementVersions ?? (O.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, we = oe.trustedTypes, tt = we ? we.createPolicy("lit-html", { createHTML: (t) => t }) : void 0, ft = "$lit$",
|
|
288
|
-
\f\r]`, re = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, nt = /-->/g, rt = />/g, q = RegExp(`>|${
|
|
289
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), it = /'/g, ot = /"/g, pt = /^(?:script|style|textarea|title)$/i, Qt = (t) => (e, ...n) => ({ _$litType$: t, strings: e, values: n }), A = Qt(1),
|
|
287
|
+
const oe = globalThis, we = oe.trustedTypes, tt = we ? we.createPolicy("lit-html", { createHTML: (t) => t }) : void 0, ft = "$lit$", F = `lit$${Math.random().toFixed(9).slice(2)}$`, mt = "?" + F, jt = `<${mt}>`, j = document, le = () => j.createComment(""), de = (t) => t === null || typeof t != "object" && typeof t != "function", Ye = Array.isArray, Kt = (t) => Ye(t) || typeof (t == null ? void 0 : t[Symbol.iterator]) == "function", De = `[
|
|
288
|
+
\f\r]`, re = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, nt = /-->/g, rt = />/g, q = RegExp(`>|${De}(?:([^\\s"'>=/]+)(${De}*=${De}*(?:[^
|
|
289
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), it = /'/g, ot = /"/g, pt = /^(?:script|style|textarea|title)$/i, Qt = (t) => (e, ...n) => ({ _$litType$: t, strings: e, values: n }), A = Qt(1), J = Symbol.for("lit-noChange"), P = Symbol.for("lit-nothing"), st = /* @__PURE__ */ new WeakMap(), V = j.createTreeWalker(j, 129);
|
|
290
290
|
function gt(t, e) {
|
|
291
|
-
if (!
|
|
291
|
+
if (!Ye(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
292
292
|
return tt !== void 0 ? tt.createHTML(e) : e;
|
|
293
293
|
}
|
|
294
|
-
const
|
|
294
|
+
const Gt = (t, e) => {
|
|
295
295
|
const n = t.length - 1, r = [];
|
|
296
296
|
let i, o = e === 2 ? "<svg>" : e === 3 ? "<math>" : "", s = re;
|
|
297
297
|
for (let l = 0; l < n; l++) {
|
|
@@ -299,7 +299,7 @@ const Zt = (t, e) => {
|
|
|
299
299
|
let d, c, h = -1, f = 0;
|
|
300
300
|
for (; f < a.length && (s.lastIndex = f, c = s.exec(a), c !== null); ) f = s.lastIndex, s === re ? c[1] === "!--" ? s = nt : c[1] !== void 0 ? s = rt : c[2] !== void 0 ? (pt.test(c[2]) && (i = RegExp("</" + c[2], "g")), s = q) : c[3] !== void 0 && (s = q) : s === q ? c[0] === ">" ? (s = i ?? re, h = -1) : c[1] === void 0 ? h = -2 : (h = s.lastIndex - c[2].length, d = c[1], s = c[3] === void 0 ? q : c[3] === '"' ? ot : it) : s === ot || s === it ? s = q : s === nt || s === rt ? s = re : (s = q, i = void 0);
|
|
301
301
|
const u = s === q && t[l + 1].startsWith("/>") ? " " : "";
|
|
302
|
-
o += s === re ? a +
|
|
302
|
+
o += s === re ? a + jt : h >= 0 ? (r.push(d), a.slice(0, h) + ft + a.slice(h) + F + u) : a + F + (h === -2 ? l : u);
|
|
303
303
|
}
|
|
304
304
|
return [gt(t, o + (t[n] || "<?>") + (e === 2 ? "</svg>" : e === 3 ? "</math>" : "")), r];
|
|
305
305
|
};
|
|
@@ -308,7 +308,7 @@ class ce {
|
|
|
308
308
|
let i;
|
|
309
309
|
this.parts = [];
|
|
310
310
|
let o = 0, s = 0;
|
|
311
|
-
const l = e.length - 1, a = this.parts, [d, c] =
|
|
311
|
+
const l = e.length - 1, a = this.parts, [d, c] = Gt(e, n);
|
|
312
312
|
if (this.el = ce.createElement(d, r), V.currentNode = this.el.content, n === 2 || n === 3) {
|
|
313
313
|
const h = this.el.content.firstChild;
|
|
314
314
|
h.replaceWith(...h.childNodes);
|
|
@@ -316,11 +316,11 @@ class ce {
|
|
|
316
316
|
for (; (i = V.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(ft)) {
|
|
319
|
-
const f = c[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 f = c[s++], u = i.getAttribute(h).split(F), m = /([.?@])?(.*)/.exec(f);
|
|
320
|
+
a.push({ type: 1, index: o, name: m[2], strings: u, ctor: m[1] === "." ? Zt : m[1] === "?" ? Wt : m[1] === "@" ? Xt : Se }), i.removeAttribute(h);
|
|
321
|
+
} else h.startsWith(F) && (a.push({ type: 6, index: o }), i.removeAttribute(h));
|
|
322
322
|
if (pt.test(i.tagName)) {
|
|
323
|
-
const h = i.textContent.split(
|
|
323
|
+
const h = i.textContent.split(F), f = h.length - 1;
|
|
324
324
|
if (f > 0) {
|
|
325
325
|
i.textContent = we ? we.emptyScript : "";
|
|
326
326
|
for (let u = 0; u < f; u++) i.append(h[u], le()), V.nextNode(), a.push({ type: 2, index: ++o });
|
|
@@ -330,24 +330,24 @@ class ce {
|
|
|
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
|
}
|
|
337
337
|
}
|
|
338
338
|
static createElement(e, n) {
|
|
339
|
-
const r =
|
|
339
|
+
const r = j.createElement("template");
|
|
340
340
|
return r.innerHTML = e, r;
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
|
-
function
|
|
343
|
+
function Z(t, e, n = t, r) {
|
|
344
344
|
var s, l;
|
|
345
|
-
if (e ===
|
|
345
|
+
if (e === J) return e;
|
|
346
346
|
let i = r !== void 0 ? (s = n._$Co) == null ? void 0 : s[r] : n._$Cl;
|
|
347
347
|
const o = de(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, n, r)), r !== void 0 ? (n._$Co ?? (n._$Co = []))[r] = i : n._$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, n, r)), r !== void 0 ? (n._$Co ?? (n._$Co = []))[r] = i : n._$Cl = i), i !== void 0 && (e = Z(t, i._$AS(t, e.values), i, r)), e;
|
|
349
349
|
}
|
|
350
|
-
class
|
|
350
|
+
class Jt {
|
|
351
351
|
constructor(e, n) {
|
|
352
352
|
this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = n;
|
|
353
353
|
}
|
|
@@ -358,7 +358,7 @@ class Gt {
|
|
|
358
358
|
return this._$AM._$AU;
|
|
359
359
|
}
|
|
360
360
|
u(e) {
|
|
361
|
-
const { el: { content: n }, parts: r } = this._$AD, i = ((e == null ? void 0 : e.creationScope) ??
|
|
361
|
+
const { el: { content: n }, parts: r } = this._$AD, i = ((e == null ? void 0 : e.creationScope) ?? j).importNode(n, !0);
|
|
362
362
|
V.currentNode = i;
|
|
363
363
|
let o = V.nextNode(), s = 0, l = 0, a = r[0];
|
|
364
364
|
for (; a !== void 0; ) {
|
|
@@ -368,7 +368,7 @@ class Gt {
|
|
|
368
368
|
}
|
|
369
369
|
s !== (a == null ? void 0 : a.index) && (o = V.nextNode(), s++);
|
|
370
370
|
}
|
|
371
|
-
return V.currentNode =
|
|
371
|
+
return V.currentNode = j, i;
|
|
372
372
|
}
|
|
373
373
|
p(e) {
|
|
374
374
|
let n = 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, n, r, i) {
|
|
384
|
-
this.type = 2, this._$AH =
|
|
384
|
+
this.type = 2, this._$AH = P, this._$AN = void 0, this._$AA = e, this._$AB = n, this._$AM = r, 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, n = this) {
|
|
398
|
-
e =
|
|
398
|
+
e = Z(this, e, n), de(e) ? e === P || e == null || e === "" ? (this._$AH !== P && this._$AR(), this._$AH = P) : e !== this._$AH && e !== J && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : Kt(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 !== P && de(this._$AH) ? this._$AA.nextSibling.data = e : this.T(j.createTextNode(e)), this._$AH = e;
|
|
408
408
|
}
|
|
409
409
|
$(e) {
|
|
410
410
|
var o;
|
|
411
411
|
const { values: n, _$litType$: r } = e, i = typeof r == "number" ? this._$AC(e) : (r.el === void 0 && (r.el = ce.createElement(gt(r.h, r.h[0]), this.options)), r);
|
|
412
412
|
if (((o = this._$AH) == null ? void 0 : o._$AD) === i) this._$AH.p(n);
|
|
413
413
|
else {
|
|
414
|
-
const s = new
|
|
414
|
+
const s = new Jt(i, this), l = s.u(this.options);
|
|
415
415
|
s.p(n), this.T(l), this._$AH = s;
|
|
416
416
|
}
|
|
417
417
|
}
|
|
@@ -420,7 +420,7 @@ class he {
|
|
|
420
420
|
return n === void 0 && st.set(e.strings, n = new ce(e)), n;
|
|
421
421
|
}
|
|
422
422
|
k(e) {
|
|
423
|
-
|
|
423
|
+
Ye(this._$AH) || (this._$AH = [], this._$AR());
|
|
424
424
|
const n = this._$AH;
|
|
425
425
|
let r, i = 0;
|
|
426
426
|
for (const o of e) i === n.length ? n.push(r = new he(this.O(le()), this.O(le()), this, this.options)) : r = n[i], r._$AI(o), i++;
|
|
@@ -446,29 +446,29 @@ class Se {
|
|
|
446
446
|
return this._$AM._$AU;
|
|
447
447
|
}
|
|
448
448
|
constructor(e, n, r, i, o) {
|
|
449
|
-
this.type = 1, this._$AH =
|
|
449
|
+
this.type = 1, this._$AH = P, this._$AN = void 0, this.element = e, this.name = n, this._$AM = i, this.options = o, r.length > 2 || r[0] !== "" || r[1] !== "" ? (this._$AH = Array(r.length - 1).fill(new String()), this.strings = r) : this._$AH = P;
|
|
450
450
|
}
|
|
451
451
|
_$AI(e, n = this, r, 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, n, 0), s = !de(e) || e !== this._$AH && e !== J, s && (this._$AH = e);
|
|
455
455
|
else {
|
|
456
456
|
const l = e;
|
|
457
457
|
let a, d;
|
|
458
|
-
for (e = o[0], a = 0; a < o.length - 1; a++) d =
|
|
458
|
+
for (e = o[0], a = 0; a < o.length - 1; a++) d = Z(this, l[r + a], n, a), d === J && (d = this._$AH[a]), s || (s = !de(d) || d !== this._$AH[a]), d === P ? e = P : e !== P && (e += (d ?? "") + o[a + 1]), this._$AH[a] = d;
|
|
459
459
|
}
|
|
460
460
|
s && !i && this.j(e);
|
|
461
461
|
}
|
|
462
462
|
j(e) {
|
|
463
|
-
e ===
|
|
463
|
+
e === P ? 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 === P ? void 0 : e;
|
|
472
472
|
}
|
|
473
473
|
}
|
|
474
474
|
class Wt extends Se {
|
|
@@ -476,7 +476,7 @@ class Wt extends Se {
|
|
|
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 !== P);
|
|
480
480
|
}
|
|
481
481
|
}
|
|
482
482
|
class Xt extends Se {
|
|
@@ -484,8 +484,8 @@ class Xt extends Se {
|
|
|
484
484
|
super(e, n, r, i, o), this.type = 5;
|
|
485
485
|
}
|
|
486
486
|
_$AI(e, n = this) {
|
|
487
|
-
if ((e =
|
|
488
|
-
const r = this._$AH, i = e ===
|
|
487
|
+
if ((e = Z(this, e, n, 0) ?? P) === J) return;
|
|
488
|
+
const r = this._$AH, i = e === P && r !== P || e.capture !== r.capture || e.once !== r.once || e.passive !== r.passive, o = e !== P && (r === P || i);
|
|
489
489
|
i && this.element.removeEventListener(this.name, this, r), o && this.element.addEventListener(this.name, this, e), this._$AH = e;
|
|
490
490
|
}
|
|
491
491
|
handleEvent(e) {
|
|
@@ -501,11 +501,11 @@ class en {
|
|
|
501
501
|
return this._$AM._$AU;
|
|
502
502
|
}
|
|
503
503
|
_$AI(e) {
|
|
504
|
-
|
|
504
|
+
Z(this, e);
|
|
505
505
|
}
|
|
506
506
|
}
|
|
507
|
-
const
|
|
508
|
-
|
|
507
|
+
const _e = oe.litHtmlPolyfillSupport;
|
|
508
|
+
_e == null || _e(ce, he), (oe.litHtmlVersions ?? (oe.litHtmlVersions = [])).push("3.3.1");
|
|
509
509
|
const tn = (t, e, n) => {
|
|
510
510
|
const r = (n == null ? void 0 : n.renderBefore) ?? e;
|
|
511
511
|
let i = r._$litPart$;
|
|
@@ -520,7 +520,7 @@ const tn = (t, e, n) => {
|
|
|
520
520
|
* Copyright 2017 Google LLC
|
|
521
521
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
522
522
|
*/
|
|
523
|
-
const
|
|
523
|
+
const Y = globalThis;
|
|
524
524
|
class se extends Q {
|
|
525
525
|
constructor() {
|
|
526
526
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
@@ -543,14 +543,14 @@ class se extends Q {
|
|
|
543
543
|
super.disconnectedCallback(), (e = this._$Do) == null || e.setConnected(!1);
|
|
544
544
|
}
|
|
545
545
|
render() {
|
|
546
|
-
return
|
|
546
|
+
return J;
|
|
547
547
|
}
|
|
548
548
|
}
|
|
549
549
|
var ut;
|
|
550
|
-
se._$litElement$ = !0, se.finalized = !0, (ut =
|
|
551
|
-
const Me =
|
|
550
|
+
se._$litElement$ = !0, se.finalized = !0, (ut = Y.litElementHydrateSupport) == null || ut.call(Y, { LitElement: se });
|
|
551
|
+
const Me = Y.litElementPolyfillSupport;
|
|
552
552
|
Me == null || Me({ LitElement: se });
|
|
553
|
-
(
|
|
553
|
+
(Y.litElementVersions ?? (Y.litElementVersions = [])).push("4.2.1");
|
|
554
554
|
/**
|
|
555
555
|
* @license
|
|
556
556
|
* Copyright 2017 Google LLC
|
|
@@ -598,7 +598,7 @@ function $(t) {
|
|
|
598
598
|
* Copyright 2017 Google LLC
|
|
599
599
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
600
600
|
*/
|
|
601
|
-
function
|
|
601
|
+
function D(t) {
|
|
602
602
|
return $({ ...t, state: !0, attribute: !1 });
|
|
603
603
|
}
|
|
604
604
|
function sn(t) {
|
|
@@ -724,7 +724,7 @@ var ln = class {
|
|
|
724
724
|
this.stop(), this.onStatusUpdate(e);
|
|
725
725
|
return;
|
|
726
726
|
}
|
|
727
|
-
if (t.result.status === "in_progress") {
|
|
727
|
+
if (t.result.status === "in_progress" || (this.config.ignore3DS || this.config.ignoreQR) && (t.result.status === "requires_action" || t.result.status === "processing")) {
|
|
728
728
|
this.scheduleNextPoll();
|
|
729
729
|
return;
|
|
730
730
|
}
|
|
@@ -952,8 +952,8 @@ var cn = class {
|
|
|
952
952
|
...t.metadata && { metadata: t.metadata }
|
|
953
953
|
}, c = a.result.paymentMethods.map((h, f) => {
|
|
954
954
|
let u = null;
|
|
955
|
-
const m = h.type.toLowerCase(),
|
|
956
|
-
return m.includes("card") ? u = "card" : (m.includes("paynow") || m.includes("bank transfer") ||
|
|
955
|
+
const m = h.type.toLowerCase(), p = h.capabilities || [];
|
|
956
|
+
return m.includes("card") ? u = "card" : (m.includes("paynow") || m.includes("bank transfer") || p.includes("payments_pay_now")) && (u = "paynow"), u === null ? null : {
|
|
957
957
|
id: u,
|
|
958
958
|
enabled: !0,
|
|
959
959
|
priority: f
|
|
@@ -1351,7 +1351,7 @@ var cn = class {
|
|
|
1351
1351
|
n(t);
|
|
1352
1352
|
});
|
|
1353
1353
|
}
|
|
1354
|
-
},
|
|
1354
|
+
}, G = typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, H = function(t, e, n, r, i, o, s, l, a, d) {
|
|
1355
1355
|
var c = this;
|
|
1356
1356
|
c.numeralDecimalMark = t || ".", c.numeralIntegerScale = e > 0 ? e : 0, c.numeralDecimalScale = n >= 0 ? n : 2, c.numeralThousandsGroupStyle = r || H.groupStyle.thousand, c.numeralPositiveOnly = !!i, c.stripLeadingZeroes = o !== !1, c.prefix = s || s === "" ? s : "", c.signBeforePrefix = !!l, c.tailPrefix = !!a, c.delimiter = d || d === "" ? d : ",", c.delimiterRE = d ? new RegExp("\\" + d, "g") : "";
|
|
1357
1357
|
};
|
|
@@ -1422,29 +1422,29 @@ yt.prototype = {
|
|
|
1422
1422
|
},
|
|
1423
1423
|
getFixedDateString: function(t) {
|
|
1424
1424
|
var e = this, n = e.datePattern, r = [], i = 0, o = 0, s = 0, l = 0, a = 0, d = 0, c, h, f, u = !1;
|
|
1425
|
-
t.length === 4 && n[0].toLowerCase() !== "y" && n[1].toLowerCase() !== "y" && (l = n[0] === "d" ? 0 : 2, a = 2 - l, c = parseInt(t.slice(l, l + 2), 10), h = parseInt(t.slice(a, a + 2), 10), r = this.getFixedDate(c, h, 0)), t.length === 8 && (n.forEach(function(
|
|
1426
|
-
switch (
|
|
1425
|
+
t.length === 4 && n[0].toLowerCase() !== "y" && n[1].toLowerCase() !== "y" && (l = n[0] === "d" ? 0 : 2, a = 2 - l, c = parseInt(t.slice(l, l + 2), 10), h = parseInt(t.slice(a, a + 2), 10), r = this.getFixedDate(c, h, 0)), t.length === 8 && (n.forEach(function(p, E) {
|
|
1426
|
+
switch (p) {
|
|
1427
1427
|
case "d":
|
|
1428
|
-
i =
|
|
1428
|
+
i = E;
|
|
1429
1429
|
break;
|
|
1430
1430
|
case "m":
|
|
1431
|
-
o =
|
|
1431
|
+
o = E;
|
|
1432
1432
|
break;
|
|
1433
1433
|
default:
|
|
1434
|
-
s =
|
|
1434
|
+
s = E;
|
|
1435
1435
|
break;
|
|
1436
1436
|
}
|
|
1437
1437
|
}), d = s * 2, l = i <= s ? i * 2 : i * 2 + 2, a = o <= s ? o * 2 : o * 2 + 2, c = parseInt(t.slice(l, l + 2), 10), h = parseInt(t.slice(a, a + 2), 10), f = parseInt(t.slice(d, d + 4), 10), u = t.slice(d, d + 4).length === 4, r = this.getFixedDate(c, h, f)), t.length === 4 && (n[0] === "y" || n[1] === "y") && (a = n[0] === "m" ? 0 : 2, d = 2 - a, h = parseInt(t.slice(a, a + 2), 10), f = parseInt(t.slice(d, d + 2), 10), u = t.slice(d, d + 2).length === 2, r = [0, h, f]), t.length === 6 && (n[0] === "Y" || n[1] === "Y") && (a = n[0] === "m" ? 0 : 4, d = 2 - 0.5 * a, h = parseInt(t.slice(a, a + 2), 10), f = parseInt(t.slice(d, d + 4), 10), u = t.slice(d, d + 4).length === 4, r = [0, h, f]), r = e.getRangeFixedDate(r), e.date = r;
|
|
1438
|
-
var m = r.length === 0 ? t : n.reduce(function(
|
|
1439
|
-
switch (
|
|
1438
|
+
var m = r.length === 0 ? t : n.reduce(function(p, E) {
|
|
1439
|
+
switch (E) {
|
|
1440
1440
|
case "d":
|
|
1441
|
-
return
|
|
1441
|
+
return p + (r[0] === 0 ? "" : e.addLeadingZero(r[0]));
|
|
1442
1442
|
case "m":
|
|
1443
|
-
return
|
|
1443
|
+
return p + (r[1] === 0 ? "" : e.addLeadingZero(r[1]));
|
|
1444
1444
|
case "y":
|
|
1445
|
-
return
|
|
1445
|
+
return p + (u ? e.addLeadingZeroForYear(r[2], !1) : "");
|
|
1446
1446
|
case "Y":
|
|
1447
|
-
return
|
|
1447
|
+
return p + (u ? e.addLeadingZeroForYear(r[2], !0) : "");
|
|
1448
1448
|
}
|
|
1449
1449
|
}, "");
|
|
1450
1450
|
return m;
|
|
@@ -1778,7 +1778,7 @@ var mn = wt, Be = {
|
|
|
1778
1778
|
// for now just keep it as simple
|
|
1779
1779
|
assign: function(t, e) {
|
|
1780
1780
|
return t = t || {}, e = e || {}, t.creditCard = !!e.creditCard, t.creditCardStrictMode = !!e.creditCardStrictMode, t.creditCardType = "", t.onCreditCardTypeChanged = e.onCreditCardTypeChanged || function() {
|
|
1781
|
-
}, 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
|
|
1781
|
+
}, 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() {
|
|
1782
1782
|
}, t;
|
|
1783
1783
|
}
|
|
1784
1784
|
}, wn = bn, x = function(t, e) {
|
|
@@ -1959,11 +1959,11 @@ x.PhoneFormatter = mn;
|
|
|
1959
1959
|
x.CreditCardDetector = pn;
|
|
1960
1960
|
x.Util = yn;
|
|
1961
1961
|
x.DefaultProperties = wn;
|
|
1962
|
-
(typeof
|
|
1962
|
+
(typeof G == "object" && G ? G : window).Cleave = x;
|
|
1963
1963
|
var at = x, fe = {}, vn = function() {
|
|
1964
1964
|
return typeof Promise == "function" && Promise.prototype && Promise.prototype.then;
|
|
1965
|
-
}, vt = {},
|
|
1966
|
-
let
|
|
1965
|
+
}, vt = {}, _ = {};
|
|
1966
|
+
let je;
|
|
1967
1967
|
const xn = [
|
|
1968
1968
|
0,
|
|
1969
1969
|
// Not used
|
|
@@ -2008,30 +2008,30 @@ const xn = [
|
|
|
2008
2008
|
3532,
|
|
2009
2009
|
3706
|
|
2010
2010
|
];
|
|
2011
|
-
|
|
2011
|
+
_.getSymbolSize = function(e) {
|
|
2012
2012
|
if (!e) throw new Error('"version" cannot be null or undefined');
|
|
2013
2013
|
if (e < 1 || e > 40) throw new Error('"version" should be in range from 1 to 40');
|
|
2014
2014
|
return e * 4 + 17;
|
|
2015
2015
|
};
|
|
2016
|
-
|
|
2016
|
+
_.getSymbolTotalCodewords = function(e) {
|
|
2017
2017
|
return xn[e];
|
|
2018
2018
|
};
|
|
2019
|
-
|
|
2019
|
+
_.getBCHDigit = function(t) {
|
|
2020
2020
|
let e = 0;
|
|
2021
2021
|
for (; t !== 0; )
|
|
2022
2022
|
e++, t >>>= 1;
|
|
2023
2023
|
return e;
|
|
2024
2024
|
};
|
|
2025
|
-
|
|
2025
|
+
_.setToSJISFunction = function(e) {
|
|
2026
2026
|
if (typeof e != "function")
|
|
2027
2027
|
throw new Error('"toSJISFunc" is not a valid function.');
|
|
2028
|
-
|
|
2028
|
+
je = e;
|
|
2029
2029
|
};
|
|
2030
|
-
|
|
2031
|
-
return typeof
|
|
2030
|
+
_.isKanjiModeEnabled = function() {
|
|
2031
|
+
return typeof je < "u";
|
|
2032
2032
|
};
|
|
2033
|
-
|
|
2034
|
-
return
|
|
2033
|
+
_.toSJIS = function(e) {
|
|
2034
|
+
return je(e);
|
|
2035
2035
|
};
|
|
2036
2036
|
var Ce = {};
|
|
2037
2037
|
(function(t) {
|
|
@@ -2109,7 +2109,7 @@ me.prototype.isReserved = function(t, e) {
|
|
|
2109
2109
|
};
|
|
2110
2110
|
var Cn = me, St = {};
|
|
2111
2111
|
(function(t) {
|
|
2112
|
-
const e =
|
|
2112
|
+
const e = _.getSymbolSize;
|
|
2113
2113
|
t.getRowColCoords = function(r) {
|
|
2114
2114
|
if (r === 1) return [];
|
|
2115
2115
|
const i = Math.floor(r / 7) + 2, o = e(r), s = o === 145 ? 26 : Math.ceil((o - 13) / (2 * i - 2)) * 2, l = [o - 7];
|
|
@@ -2127,9 +2127,9 @@ var Cn = me, St = {};
|
|
|
2127
2127
|
};
|
|
2128
2128
|
})(St);
|
|
2129
2129
|
var Ct = {};
|
|
2130
|
-
const
|
|
2130
|
+
const En = _.getSymbolSize, lt = 7;
|
|
2131
2131
|
Ct.getPositions = function(e) {
|
|
2132
|
-
const n =
|
|
2132
|
+
const n = En(e);
|
|
2133
2133
|
return [
|
|
2134
2134
|
// top-left
|
|
2135
2135
|
[0, 0],
|
|
@@ -2139,7 +2139,7 @@ Ct.getPositions = function(e) {
|
|
|
2139
2139
|
[0, n - lt]
|
|
2140
2140
|
];
|
|
2141
2141
|
};
|
|
2142
|
-
var
|
|
2142
|
+
var Et = {};
|
|
2143
2143
|
(function(t) {
|
|
2144
2144
|
t.Patterns = {
|
|
2145
2145
|
PATTERN000: 0,
|
|
@@ -2234,8 +2234,8 @@ var kt = {};
|
|
|
2234
2234
|
}
|
|
2235
2235
|
return l;
|
|
2236
2236
|
};
|
|
2237
|
-
})(
|
|
2238
|
-
var
|
|
2237
|
+
})(Et);
|
|
2238
|
+
var Ee = {};
|
|
2239
2239
|
const U = Ce, pe = [
|
|
2240
2240
|
// L M Q H
|
|
2241
2241
|
1,
|
|
@@ -2561,7 +2561,7 @@ const U = Ce, pe = [
|
|
|
2561
2561
|
2040,
|
|
2562
2562
|
2430
|
|
2563
2563
|
];
|
|
2564
|
-
|
|
2564
|
+
Ee.getBlocksCount = function(e, n) {
|
|
2565
2565
|
switch (n) {
|
|
2566
2566
|
case U.L:
|
|
2567
2567
|
return pe[(e - 1) * 4 + 0];
|
|
@@ -2575,7 +2575,7 @@ ke.getBlocksCount = function(e, n) {
|
|
|
2575
2575
|
return;
|
|
2576
2576
|
}
|
|
2577
2577
|
};
|
|
2578
|
-
|
|
2578
|
+
Ee.getTotalCodewordsCount = function(e, n) {
|
|
2579
2579
|
switch (n) {
|
|
2580
2580
|
case U.L:
|
|
2581
2581
|
return ge[(e - 1) * 4 + 0];
|
|
@@ -2589,7 +2589,7 @@ ke.getTotalCodewordsCount = function(e, n) {
|
|
|
2589
2589
|
return;
|
|
2590
2590
|
}
|
|
2591
2591
|
};
|
|
2592
|
-
var
|
|
2592
|
+
var kt = {}, ke = {};
|
|
2593
2593
|
const ae = new Uint8Array(512), ve = new Uint8Array(256);
|
|
2594
2594
|
(function() {
|
|
2595
2595
|
let e = 1;
|
|
@@ -2598,18 +2598,18 @@ const ae = new Uint8Array(512), ve = new Uint8Array(256);
|
|
|
2598
2598
|
for (let n = 255; n < 512; n++)
|
|
2599
2599
|
ae[n] = ae[n - 255];
|
|
2600
2600
|
})();
|
|
2601
|
-
|
|
2601
|
+
ke.log = function(e) {
|
|
2602
2602
|
if (e < 1) throw new Error("log(" + e + ")");
|
|
2603
2603
|
return ve[e];
|
|
2604
2604
|
};
|
|
2605
|
-
|
|
2605
|
+
ke.exp = function(e) {
|
|
2606
2606
|
return ae[e];
|
|
2607
2607
|
};
|
|
2608
|
-
|
|
2608
|
+
ke.mul = function(e, n) {
|
|
2609
2609
|
return e === 0 || n === 0 ? 0 : ae[ve[e] + ve[n]];
|
|
2610
2610
|
};
|
|
2611
2611
|
(function(t) {
|
|
2612
|
-
const e =
|
|
2612
|
+
const e = ke;
|
|
2613
2613
|
t.mul = function(r, i) {
|
|
2614
2614
|
const o = new Uint8Array(r.length + i.length - 1);
|
|
2615
2615
|
for (let s = 0; s < r.length; s++)
|
|
@@ -2633,8 +2633,8 @@ Ee.mul = function(e, n) {
|
|
|
2633
2633
|
i = t.mul(i, new Uint8Array([1, e.exp(o)]));
|
|
2634
2634
|
return i;
|
|
2635
2635
|
};
|
|
2636
|
-
})(
|
|
2637
|
-
const At =
|
|
2636
|
+
})(kt);
|
|
2637
|
+
const At = kt;
|
|
2638
2638
|
function Ke(t) {
|
|
2639
2639
|
this.genPoly = void 0, this.degree = t, this.degree && this.initialize(this.degree);
|
|
2640
2640
|
}
|
|
@@ -2653,33 +2653,33 @@ Ke.prototype.encode = function(e) {
|
|
|
2653
2653
|
}
|
|
2654
2654
|
return r;
|
|
2655
2655
|
};
|
|
2656
|
-
var
|
|
2656
|
+
var kn = Ke, It = {}, z = {}, Qe = {};
|
|
2657
2657
|
Qe.isValid = function(e) {
|
|
2658
2658
|
return !isNaN(e) && e >= 1 && e <= 40;
|
|
2659
2659
|
};
|
|
2660
|
-
var
|
|
2661
|
-
const
|
|
2660
|
+
var R = {};
|
|
2661
|
+
const Pt = "[0-9]+", An = "[A-Z $%*+\\-./:]+";
|
|
2662
2662
|
let ue = "(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";
|
|
2663
2663
|
ue = ue.replace(/u/g, "\\u");
|
|
2664
|
-
const
|
|
2664
|
+
const In = "(?:(?![A-Z0-9 $%*+\\-./:]|" + ue + `)(?:.|[\r
|
|
2665
2665
|
]))+`;
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
const
|
|
2672
|
-
|
|
2673
|
-
return
|
|
2666
|
+
R.KANJI = new RegExp(ue, "g");
|
|
2667
|
+
R.BYTE_KANJI = new RegExp("[^A-Z0-9 $%*+\\-./:]+", "g");
|
|
2668
|
+
R.BYTE = new RegExp(In, "g");
|
|
2669
|
+
R.NUMERIC = new RegExp(Pt, "g");
|
|
2670
|
+
R.ALPHANUMERIC = new RegExp(An, "g");
|
|
2671
|
+
const Pn = new RegExp("^" + ue + "$"), Dn = new RegExp("^" + Pt + "$"), _n = new RegExp("^[A-Z0-9 $%*+\\-./:]+$");
|
|
2672
|
+
R.testKanji = function(e) {
|
|
2673
|
+
return Pn.test(e);
|
|
2674
2674
|
};
|
|
2675
|
-
|
|
2676
|
-
return _n.test(e);
|
|
2677
|
-
};
|
|
2678
|
-
F.testAlphanumeric = function(e) {
|
|
2675
|
+
R.testNumeric = function(e) {
|
|
2679
2676
|
return Dn.test(e);
|
|
2680
2677
|
};
|
|
2678
|
+
R.testAlphanumeric = function(e) {
|
|
2679
|
+
return _n.test(e);
|
|
2680
|
+
};
|
|
2681
2681
|
(function(t) {
|
|
2682
|
-
const e = Qe, n =
|
|
2682
|
+
const e = Qe, n = R;
|
|
2683
2683
|
t.NUMERIC = {
|
|
2684
2684
|
id: "Numeric",
|
|
2685
2685
|
bit: 1,
|
|
@@ -2738,20 +2738,20 @@ F.testAlphanumeric = function(e) {
|
|
|
2738
2738
|
};
|
|
2739
2739
|
})(z);
|
|
2740
2740
|
(function(t) {
|
|
2741
|
-
const e =
|
|
2741
|
+
const e = _, n = Ee, r = Ce, i = z, o = Qe, s = 7973, l = e.getBCHDigit(s);
|
|
2742
2742
|
function a(f, u, m) {
|
|
2743
|
-
for (let
|
|
2744
|
-
if (u <= t.getCapacity(
|
|
2745
|
-
return
|
|
2743
|
+
for (let p = 1; p <= 40; p++)
|
|
2744
|
+
if (u <= t.getCapacity(p, m, f))
|
|
2745
|
+
return p;
|
|
2746
2746
|
}
|
|
2747
2747
|
function d(f, u) {
|
|
2748
2748
|
return i.getCharCountIndicator(f, u) + 4;
|
|
2749
2749
|
}
|
|
2750
2750
|
function c(f, u) {
|
|
2751
2751
|
let m = 0;
|
|
2752
|
-
return f.forEach(function(
|
|
2753
|
-
const
|
|
2754
|
-
m +=
|
|
2752
|
+
return f.forEach(function(p) {
|
|
2753
|
+
const E = d(p.mode, u);
|
|
2754
|
+
m += E + p.getBitsLength();
|
|
2755
2755
|
}), m;
|
|
2756
2756
|
}
|
|
2757
2757
|
function h(f, u) {
|
|
@@ -2761,14 +2761,14 @@ F.testAlphanumeric = function(e) {
|
|
|
2761
2761
|
}
|
|
2762
2762
|
t.from = function(u, m) {
|
|
2763
2763
|
return o.isValid(u) ? parseInt(u, 10) : m;
|
|
2764
|
-
}, t.getCapacity = function(u, m,
|
|
2764
|
+
}, t.getCapacity = function(u, m, p) {
|
|
2765
2765
|
if (!o.isValid(u))
|
|
2766
2766
|
throw new Error("Invalid QR Code version");
|
|
2767
|
-
typeof
|
|
2768
|
-
const
|
|
2769
|
-
if (
|
|
2770
|
-
const y = w - d(
|
|
2771
|
-
switch (
|
|
2767
|
+
typeof p > "u" && (p = i.BYTE);
|
|
2768
|
+
const E = e.getSymbolTotalCodewords(u), b = n.getTotalCodewordsCount(u, m), w = (E - b) * 8;
|
|
2769
|
+
if (p === i.MIXED) return w;
|
|
2770
|
+
const y = w - d(p, u);
|
|
2771
|
+
switch (p) {
|
|
2772
2772
|
case i.NUMERIC:
|
|
2773
2773
|
return Math.floor(y / 10 * 3);
|
|
2774
2774
|
case i.ALPHANUMERIC:
|
|
@@ -2780,17 +2780,17 @@ F.testAlphanumeric = function(e) {
|
|
|
2780
2780
|
return Math.floor(y / 8);
|
|
2781
2781
|
}
|
|
2782
2782
|
}, t.getBestVersionForData = function(u, m) {
|
|
2783
|
-
let
|
|
2784
|
-
const
|
|
2783
|
+
let p;
|
|
2784
|
+
const E = r.from(m, r.M);
|
|
2785
2785
|
if (Array.isArray(u)) {
|
|
2786
2786
|
if (u.length > 1)
|
|
2787
|
-
return h(u,
|
|
2787
|
+
return h(u, E);
|
|
2788
2788
|
if (u.length === 0)
|
|
2789
2789
|
return 1;
|
|
2790
|
-
|
|
2790
|
+
p = u[0];
|
|
2791
2791
|
} else
|
|
2792
|
-
|
|
2793
|
-
return a(
|
|
2792
|
+
p = u;
|
|
2793
|
+
return a(p.mode, p.getLength(), E);
|
|
2794
2794
|
}, t.getEncodedBits = function(u) {
|
|
2795
2795
|
if (!o.isValid(u) || u < 7)
|
|
2796
2796
|
throw new Error("Invalid QR Code version");
|
|
@@ -2799,14 +2799,14 @@ F.testAlphanumeric = function(e) {
|
|
|
2799
2799
|
m ^= s << e.getBCHDigit(m) - l;
|
|
2800
2800
|
return u << 12 | m;
|
|
2801
2801
|
};
|
|
2802
|
-
})(
|
|
2803
|
-
var
|
|
2804
|
-
const
|
|
2805
|
-
|
|
2802
|
+
})(It);
|
|
2803
|
+
var Dt = {};
|
|
2804
|
+
const Fe = _, _t = 1335, Mn = 21522, dt = Fe.getBCHDigit(_t);
|
|
2805
|
+
Dt.getEncodedBits = function(e, n) {
|
|
2806
2806
|
const r = e.bit << 3 | n;
|
|
2807
2807
|
let i = r << 10;
|
|
2808
|
-
for (;
|
|
2809
|
-
i ^=
|
|
2808
|
+
for (; Fe.getBCHDigit(i) - dt >= 0; )
|
|
2809
|
+
i ^= _t << Fe.getBCHDigit(i) - dt;
|
|
2810
2810
|
return (r << 10 | i) ^ Mn;
|
|
2811
2811
|
};
|
|
2812
2812
|
var Mt = {};
|
|
@@ -2898,10 +2898,10 @@ X.prototype.write = function(e) {
|
|
|
2898
2898
|
}
|
|
2899
2899
|
this.data.length % 2 && e.put($e.indexOf(this.data[n]), 6);
|
|
2900
2900
|
};
|
|
2901
|
-
var
|
|
2902
|
-
const
|
|
2901
|
+
var Rn = X;
|
|
2902
|
+
const Ln = z;
|
|
2903
2903
|
function ee(t) {
|
|
2904
|
-
this.mode =
|
|
2904
|
+
this.mode = Ln.BYTE, typeof t == "string" ? this.data = new TextEncoder().encode(t) : this.data = new Uint8Array(t);
|
|
2905
2905
|
}
|
|
2906
2906
|
ee.getBitsLength = function(e) {
|
|
2907
2907
|
return e * 8;
|
|
@@ -2917,9 +2917,9 @@ ee.prototype.write = function(t) {
|
|
|
2917
2917
|
t.put(this.data[e], 8);
|
|
2918
2918
|
};
|
|
2919
2919
|
var Bn = ee;
|
|
2920
|
-
const
|
|
2920
|
+
const Fn = z, Un = _;
|
|
2921
2921
|
function te(t) {
|
|
2922
|
-
this.mode =
|
|
2922
|
+
this.mode = Fn.KANJI, this.data = t;
|
|
2923
2923
|
}
|
|
2924
2924
|
te.getBitsLength = function(e) {
|
|
2925
2925
|
return e * 13;
|
|
@@ -2954,10 +2954,10 @@ var On = te, $t = { exports: {} };
|
|
|
2954
2954
|
s[r] = 0;
|
|
2955
2955
|
var l = e.PriorityQueue.make();
|
|
2956
2956
|
l.push(r, 0);
|
|
2957
|
-
for (var a, d, c, h, f, u, m,
|
|
2957
|
+
for (var a, d, c, h, f, u, m, p, E; !l.empty(); ) {
|
|
2958
2958
|
a = l.pop(), d = a.value, h = a.cost, f = n[d] || {};
|
|
2959
2959
|
for (c in f)
|
|
2960
|
-
f.hasOwnProperty(c) && (u = f[c], m = h + u,
|
|
2960
|
+
f.hasOwnProperty(c) && (u = f[c], m = h + u, p = s[c], E = typeof s[c] > "u", (E || p > m) && (s[c] = m, l.push(c, m), o[c] = d));
|
|
2961
2961
|
}
|
|
2962
2962
|
if (typeof i < "u" && typeof s[i] > "u") {
|
|
2963
2963
|
var b = ["Could not find a path from ", r, " to ", i, "."].join("");
|
|
@@ -3014,32 +3014,32 @@ var On = te, $t = { exports: {} };
|
|
|
3014
3014
|
})($t);
|
|
3015
3015
|
var zn = $t.exports;
|
|
3016
3016
|
(function(t) {
|
|
3017
|
-
const e = z, n = Nn, r =
|
|
3017
|
+
const e = z, n = Nn, r = Rn, i = Bn, o = On, s = R, l = _, a = zn;
|
|
3018
3018
|
function d(b) {
|
|
3019
3019
|
return unescape(encodeURIComponent(b)).length;
|
|
3020
3020
|
}
|
|
3021
3021
|
function c(b, w, y) {
|
|
3022
|
-
const
|
|
3022
|
+
const g = [];
|
|
3023
3023
|
let C;
|
|
3024
3024
|
for (; (C = b.exec(y)) !== null; )
|
|
3025
|
-
|
|
3025
|
+
g.push({
|
|
3026
3026
|
data: C[0],
|
|
3027
3027
|
index: C.index,
|
|
3028
3028
|
mode: w,
|
|
3029
3029
|
length: C[0].length
|
|
3030
3030
|
});
|
|
3031
|
-
return
|
|
3031
|
+
return g;
|
|
3032
3032
|
}
|
|
3033
3033
|
function h(b) {
|
|
3034
3034
|
const w = c(s.NUMERIC, e.NUMERIC, b), y = c(s.ALPHANUMERIC, e.ALPHANUMERIC, b);
|
|
3035
|
-
let
|
|
3036
|
-
return l.isKanjiModeEnabled() ? (
|
|
3037
|
-
return
|
|
3038
|
-
}).map(function(
|
|
3035
|
+
let g, C;
|
|
3036
|
+
return l.isKanjiModeEnabled() ? (g = c(s.BYTE, e.BYTE, b), C = c(s.KANJI, e.KANJI, b)) : (g = c(s.BYTE_KANJI, e.BYTE, b), C = []), w.concat(y, g, C).sort(function(I, N) {
|
|
3037
|
+
return I.index - N.index;
|
|
3038
|
+
}).map(function(I) {
|
|
3039
3039
|
return {
|
|
3040
|
-
data:
|
|
3041
|
-
mode:
|
|
3042
|
-
length:
|
|
3040
|
+
data: I.data,
|
|
3041
|
+
mode: I.mode,
|
|
3042
|
+
length: I.length
|
|
3043
3043
|
};
|
|
3044
3044
|
});
|
|
3045
3045
|
}
|
|
@@ -3057,67 +3057,67 @@ var zn = $t.exports;
|
|
|
3057
3057
|
}
|
|
3058
3058
|
function u(b) {
|
|
3059
3059
|
return b.reduce(function(w, y) {
|
|
3060
|
-
const
|
|
3061
|
-
return
|
|
3060
|
+
const g = w.length - 1 >= 0 ? w[w.length - 1] : null;
|
|
3061
|
+
return g && g.mode === y.mode ? (w[w.length - 1].data += y.data, w) : (w.push(y), w);
|
|
3062
3062
|
}, []);
|
|
3063
3063
|
}
|
|
3064
3064
|
function m(b) {
|
|
3065
3065
|
const w = [];
|
|
3066
3066
|
for (let y = 0; y < b.length; y++) {
|
|
3067
|
-
const
|
|
3068
|
-
switch (
|
|
3067
|
+
const g = b[y];
|
|
3068
|
+
switch (g.mode) {
|
|
3069
3069
|
case e.NUMERIC:
|
|
3070
3070
|
w.push([
|
|
3071
|
-
|
|
3072
|
-
{ data:
|
|
3073
|
-
{ data:
|
|
3071
|
+
g,
|
|
3072
|
+
{ data: g.data, mode: e.ALPHANUMERIC, length: g.length },
|
|
3073
|
+
{ data: g.data, mode: e.BYTE, length: g.length }
|
|
3074
3074
|
]);
|
|
3075
3075
|
break;
|
|
3076
3076
|
case e.ALPHANUMERIC:
|
|
3077
3077
|
w.push([
|
|
3078
|
-
|
|
3079
|
-
{ data:
|
|
3078
|
+
g,
|
|
3079
|
+
{ data: g.data, mode: e.BYTE, length: g.length }
|
|
3080
3080
|
]);
|
|
3081
3081
|
break;
|
|
3082
3082
|
case e.KANJI:
|
|
3083
3083
|
w.push([
|
|
3084
|
-
|
|
3085
|
-
{ data:
|
|
3084
|
+
g,
|
|
3085
|
+
{ data: g.data, mode: e.BYTE, length: d(g.data) }
|
|
3086
3086
|
]);
|
|
3087
3087
|
break;
|
|
3088
3088
|
case e.BYTE:
|
|
3089
3089
|
w.push([
|
|
3090
|
-
{ data:
|
|
3090
|
+
{ data: g.data, mode: e.BYTE, length: d(g.data) }
|
|
3091
3091
|
]);
|
|
3092
3092
|
}
|
|
3093
3093
|
}
|
|
3094
3094
|
return w;
|
|
3095
3095
|
}
|
|
3096
|
-
function
|
|
3097
|
-
const y = {},
|
|
3096
|
+
function p(b, w) {
|
|
3097
|
+
const y = {}, g = { start: {} };
|
|
3098
3098
|
let C = ["start"];
|
|
3099
|
-
for (let
|
|
3100
|
-
const
|
|
3101
|
-
for (let B = 0; B <
|
|
3102
|
-
const T =
|
|
3103
|
-
N.push(ne), y[ne] = { node: T, lastCount: 0 },
|
|
3104
|
-
for (let
|
|
3105
|
-
const
|
|
3106
|
-
y[
|
|
3099
|
+
for (let k = 0; k < b.length; k++) {
|
|
3100
|
+
const I = b[k], N = [];
|
|
3101
|
+
for (let B = 0; B < I.length; B++) {
|
|
3102
|
+
const T = I[B], ne = "" + k + B;
|
|
3103
|
+
N.push(ne), y[ne] = { node: T, lastCount: 0 }, g[ne] = {};
|
|
3104
|
+
for (let Ie = 0; Ie < C.length; Ie++) {
|
|
3105
|
+
const L = C[Ie];
|
|
3106
|
+
y[L] && y[L].node.mode === T.mode ? (g[L][ne] = f(y[L].lastCount + T.length, T.mode) - f(y[L].lastCount, T.mode), y[L].lastCount += T.length) : (y[L] && (y[L].lastCount = T.length), g[L][ne] = f(T.length, T.mode) + 4 + e.getCharCountIndicator(T.mode, w));
|
|
3107
3107
|
}
|
|
3108
3108
|
}
|
|
3109
3109
|
C = N;
|
|
3110
3110
|
}
|
|
3111
|
-
for (let
|
|
3112
|
-
|
|
3113
|
-
return { map:
|
|
3111
|
+
for (let k = 0; k < C.length; k++)
|
|
3112
|
+
g[C[k]].end = 0;
|
|
3113
|
+
return { map: g, table: y };
|
|
3114
3114
|
}
|
|
3115
|
-
function
|
|
3115
|
+
function E(b, w) {
|
|
3116
3116
|
let y;
|
|
3117
|
-
const
|
|
3118
|
-
if (y = e.from(w,
|
|
3117
|
+
const g = e.getBestModeForData(b);
|
|
3118
|
+
if (y = e.from(w, g), y !== e.BYTE && y.bit < g.bit)
|
|
3119
3119
|
throw new Error('"' + b + '" cannot be encoded with mode ' + e.toString(y) + `.
|
|
3120
|
-
Suggested mode is: ` + e.toString(
|
|
3120
|
+
Suggested mode is: ` + e.toString(g));
|
|
3121
3121
|
switch (y === e.KANJI && !l.isKanjiModeEnabled() && (y = e.BYTE), y) {
|
|
3122
3122
|
case e.NUMERIC:
|
|
3123
3123
|
return new n(b);
|
|
@@ -3130,13 +3130,13 @@ var zn = $t.exports;
|
|
|
3130
3130
|
}
|
|
3131
3131
|
}
|
|
3132
3132
|
t.fromArray = function(w) {
|
|
3133
|
-
return w.reduce(function(y,
|
|
3134
|
-
return typeof
|
|
3133
|
+
return w.reduce(function(y, g) {
|
|
3134
|
+
return typeof g == "string" ? y.push(E(g, null)) : g.data && y.push(E(g.data, g.mode)), y;
|
|
3135
3135
|
}, []);
|
|
3136
3136
|
}, t.fromString = function(w, y) {
|
|
3137
|
-
const
|
|
3138
|
-
for (let B = 1; B <
|
|
3139
|
-
N.push(
|
|
3137
|
+
const g = h(w, l.isKanjiModeEnabled()), C = m(g), k = p(C, y), I = a.find_path(k.map, "start", "end"), N = [];
|
|
3138
|
+
for (let B = 1; B < I.length - 1; B++)
|
|
3139
|
+
N.push(k.table[I[B]].node);
|
|
3140
3140
|
return t.fromArray(u(N));
|
|
3141
3141
|
}, t.rawSplit = function(w) {
|
|
3142
3142
|
return t.fromArray(
|
|
@@ -3144,9 +3144,9 @@ var zn = $t.exports;
|
|
|
3144
3144
|
);
|
|
3145
3145
|
};
|
|
3146
3146
|
})(Mt);
|
|
3147
|
-
const Ae =
|
|
3148
|
-
function
|
|
3149
|
-
const n = t.size, r =
|
|
3147
|
+
const Ae = _, Ne = Ce, qn = Sn, Vn = Cn, Hn = St, Yn = Ct, Ue = Et, Oe = Ee, jn = kn, xe = It, Kn = Dt, Qn = z, Te = Mt;
|
|
3148
|
+
function Gn(t, e) {
|
|
3149
|
+
const n = t.size, r = Yn.getPositions(e);
|
|
3150
3150
|
for (let i = 0; i < r.length; i++) {
|
|
3151
3151
|
const o = r[i][0], s = r[i][1];
|
|
3152
3152
|
for (let l = -1; l <= 7; l++)
|
|
@@ -3155,14 +3155,14 @@ function Zn(t, e) {
|
|
|
3155
3155
|
s + a <= -1 || n <= 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));
|
|
3156
3156
|
}
|
|
3157
3157
|
}
|
|
3158
|
-
function
|
|
3158
|
+
function Jn(t) {
|
|
3159
3159
|
const e = t.size;
|
|
3160
3160
|
for (let n = 8; n < e - 8; n++) {
|
|
3161
3161
|
const r = n % 2 === 0;
|
|
3162
3162
|
t.set(n, 6, r, !0), t.set(6, n, r, !0);
|
|
3163
3163
|
}
|
|
3164
3164
|
}
|
|
3165
|
-
function
|
|
3165
|
+
function Zn(t, e) {
|
|
3166
3166
|
const n = Hn.getPositions(e);
|
|
3167
3167
|
for (let r = 0; r < n.length; r++) {
|
|
3168
3168
|
const i = n[r][0], o = n[r][1];
|
|
@@ -3177,7 +3177,7 @@ function Wn(t, e) {
|
|
|
3177
3177
|
for (let l = 0; l < 18; l++)
|
|
3178
3178
|
i = Math.floor(l / 3), o = l % 3 + n - 8 - 3, s = (r >> l & 1) === 1, t.set(i, o, s, !0), t.set(o, i, s, !0);
|
|
3179
3179
|
}
|
|
3180
|
-
function
|
|
3180
|
+
function Re(t, e, n) {
|
|
3181
3181
|
const r = t.size, i = Kn.getEncodedBits(e, n);
|
|
3182
3182
|
let o, s;
|
|
3183
3183
|
for (o = 0; o < 15; o++)
|
|
@@ -3214,23 +3214,23 @@ function er(t, e, n) {
|
|
|
3214
3214
|
return tr(r, t, e);
|
|
3215
3215
|
}
|
|
3216
3216
|
function tr(t, e, n) {
|
|
3217
|
-
const r = Ae.getSymbolTotalCodewords(e), i = Oe.getTotalCodewordsCount(e, n), o = r - i, s = Oe.getBlocksCount(e, n), l = r % s, a = s - l, d = Math.floor(r / s), c = Math.floor(o / s), h = c + 1, f = d - c, u = new
|
|
3217
|
+
const r = Ae.getSymbolTotalCodewords(e), i = Oe.getTotalCodewordsCount(e, n), o = r - i, s = Oe.getBlocksCount(e, n), l = r % s, a = s - l, d = Math.floor(r / s), c = Math.floor(o / s), h = c + 1, f = d - c, u = new jn(f);
|
|
3218
3218
|
let m = 0;
|
|
3219
|
-
const
|
|
3219
|
+
const p = new Array(s), E = new Array(s);
|
|
3220
3220
|
let b = 0;
|
|
3221
3221
|
const w = new Uint8Array(t.buffer);
|
|
3222
|
-
for (let
|
|
3223
|
-
const N =
|
|
3224
|
-
|
|
3222
|
+
for (let I = 0; I < s; I++) {
|
|
3223
|
+
const N = I < a ? c : h;
|
|
3224
|
+
p[I] = w.slice(m, m + N), E[I] = u.encode(p[I]), m += N, b = Math.max(b, N);
|
|
3225
3225
|
}
|
|
3226
3226
|
const y = new Uint8Array(r);
|
|
3227
|
-
let
|
|
3227
|
+
let g = 0, C, k;
|
|
3228
3228
|
for (C = 0; C < b; C++)
|
|
3229
|
-
for (
|
|
3230
|
-
C <
|
|
3229
|
+
for (k = 0; k < s; k++)
|
|
3230
|
+
C < p[k].length && (y[g++] = p[k][C]);
|
|
3231
3231
|
for (C = 0; C < f; C++)
|
|
3232
|
-
for (
|
|
3233
|
-
y[
|
|
3232
|
+
for (k = 0; k < s; k++)
|
|
3233
|
+
y[g++] = E[k][C];
|
|
3234
3234
|
return y;
|
|
3235
3235
|
}
|
|
3236
3236
|
function nr(t, e, n, r) {
|
|
@@ -3259,10 +3259,10 @@ Minimum version required to store current data is: ` + o + `.
|
|
|
3259
3259
|
`
|
|
3260
3260
|
);
|
|
3261
3261
|
const s = er(e, n, i), l = Ae.getSymbolSize(e), a = new Vn(l);
|
|
3262
|
-
return
|
|
3262
|
+
return Gn(a, e), Jn(a), Zn(a, e), Re(a, n, 0), e >= 7 && Wn(a, e), Xn(a, s), isNaN(r) && (r = Ue.getBestMask(
|
|
3263
3263
|
a,
|
|
3264
|
-
|
|
3265
|
-
)), Ue.applyMask(r, a),
|
|
3264
|
+
Re.bind(null, a, n)
|
|
3265
|
+
)), Ue.applyMask(r, a), Re(a, n, r), {
|
|
3266
3266
|
modules: a,
|
|
3267
3267
|
version: e,
|
|
3268
3268
|
errorCorrectionLevel: n,
|
|
@@ -3276,7 +3276,7 @@ vt.create = function(e, n) {
|
|
|
3276
3276
|
let r = Ne.M, i, o;
|
|
3277
3277
|
return typeof n < "u" && (r = Ne.from(n.errorCorrectionLevel, Ne.M), i = xe.from(n.version), o = Ue.from(n.maskPattern), n.toSJISFunc && Ae.setToSJISFunction(n.toSJISFunc)), nr(e, i, r, o);
|
|
3278
3278
|
};
|
|
3279
|
-
var Nt = {},
|
|
3279
|
+
var Nt = {}, Ge = {};
|
|
3280
3280
|
(function(t) {
|
|
3281
3281
|
function e(n) {
|
|
3282
3282
|
if (typeof n == "number" && (n = n.toString()), typeof n != "string")
|
|
@@ -3319,17 +3319,17 @@ var Nt = {}, Ze = {};
|
|
|
3319
3319
|
const s = i.modules.size, l = i.modules.data, a = t.getScale(s, o), d = Math.floor((s + o.margin * 2) * a), c = o.margin * a, h = [o.color.light, o.color.dark];
|
|
3320
3320
|
for (let f = 0; f < d; f++)
|
|
3321
3321
|
for (let u = 0; u < d; u++) {
|
|
3322
|
-
let m = (f * d + u) * 4,
|
|
3322
|
+
let m = (f * d + u) * 4, p = o.color.light;
|
|
3323
3323
|
if (f >= c && u >= c && f < d - c && u < d - c) {
|
|
3324
|
-
const
|
|
3325
|
-
|
|
3324
|
+
const E = Math.floor((f - c) / a), b = Math.floor((u - c) / a);
|
|
3325
|
+
p = h[l[E * s + b] ? 1 : 0];
|
|
3326
3326
|
}
|
|
3327
|
-
r[m++] =
|
|
3327
|
+
r[m++] = p.r, r[m++] = p.g, r[m++] = p.b, r[m] = p.a;
|
|
3328
3328
|
}
|
|
3329
3329
|
};
|
|
3330
|
-
})(
|
|
3330
|
+
})(Ge);
|
|
3331
3331
|
(function(t) {
|
|
3332
|
-
const e =
|
|
3332
|
+
const e = Ge;
|
|
3333
3333
|
function n(i, o, s) {
|
|
3334
3334
|
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";
|
|
3335
3335
|
}
|
|
@@ -3353,12 +3353,12 @@ var Nt = {}, Ze = {};
|
|
|
3353
3353
|
};
|
|
3354
3354
|
})(Nt);
|
|
3355
3355
|
var Tt = {};
|
|
3356
|
-
const rr =
|
|
3356
|
+
const rr = Ge;
|
|
3357
3357
|
function ct(t, e) {
|
|
3358
3358
|
const n = t.a / 255, r = e + '="' + t.hex + '"';
|
|
3359
3359
|
return n < 1 ? r + " " + e + '-opacity="' + n.toFixed(2).slice(1) + '"' : r;
|
|
3360
3360
|
}
|
|
3361
|
-
function
|
|
3361
|
+
function Le(t, e, n) {
|
|
3362
3362
|
let r = t + e;
|
|
3363
3363
|
return typeof n < "u" && (r += " " + n), r;
|
|
3364
3364
|
}
|
|
@@ -3366,7 +3366,7 @@ function ir(t, e, n) {
|
|
|
3366
3366
|
let r = "", i = 0, o = !1, s = 0;
|
|
3367
3367
|
for (let l = 0; l < t.length; l++) {
|
|
3368
3368
|
const a = Math.floor(l % e), d = Math.floor(l / e);
|
|
3369
|
-
!a && !o && (o = !0), t[l] ? (s++, l > 0 && a > 0 && t[l - 1] || (r += o ?
|
|
3369
|
+
!a && !o && (o = !0), t[l] ? (s++, l > 0 && a > 0 && t[l - 1] || (r += o ? Le("M", a + n, 0.5 + d + n) : Le("m", i, 0), i = 0, o = !1), a + 1 < e && t[l + 1] || (r += Le("h", s), s = 0)) : i++;
|
|
3370
3370
|
}
|
|
3371
3371
|
return r;
|
|
3372
3372
|
}
|
|
@@ -3375,8 +3375,8 @@ Tt.render = function(e, n, r) {
|
|
|
3375
3375
|
`;
|
|
3376
3376
|
return typeof r == "function" && r(null, f), f;
|
|
3377
3377
|
};
|
|
3378
|
-
const or = vn, ze = vt,
|
|
3379
|
-
function
|
|
3378
|
+
const or = vn, ze = vt, Rt = Nt, sr = Tt;
|
|
3379
|
+
function Je(t, e, n, r, i) {
|
|
3380
3380
|
const o = [].slice.call(arguments, 1), s = o.length, l = typeof o[s - 1] == "function";
|
|
3381
3381
|
if (!l && !or())
|
|
3382
3382
|
throw new Error("Callback required as last argument");
|
|
@@ -3404,9 +3404,9 @@ function Ge(t, e, n, r, i) {
|
|
|
3404
3404
|
}
|
|
3405
3405
|
}
|
|
3406
3406
|
fe.create = ze.create;
|
|
3407
|
-
fe.toCanvas =
|
|
3408
|
-
fe.toDataURL =
|
|
3409
|
-
fe.toString =
|
|
3407
|
+
fe.toCanvas = Je.bind(null, Rt.render);
|
|
3408
|
+
fe.toDataURL = Je.bind(null, Rt.renderToDataURL);
|
|
3409
|
+
fe.toString = Je.bind(null, function(t, e, n) {
|
|
3410
3410
|
return sr.render(t, n);
|
|
3411
3411
|
});
|
|
3412
3412
|
var ar = Object.defineProperty, lr = Object.getOwnPropertyDescriptor, S = (t, e, n, r) => {
|
|
@@ -3428,7 +3428,9 @@ let v = class extends se {
|
|
|
3428
3428
|
// --- Lifecycle ---
|
|
3429
3429
|
connectedCallback() {
|
|
3430
3430
|
super.connectedCallback(), window.addEventListener("message", this.handle3DSPostMessage), this.addEventListener("force-close-3ds-modal", () => {
|
|
3431
|
-
console.log(
|
|
3431
|
+
console.log(
|
|
3432
|
+
"[3DS] force-close-3ds-modal event received - closing modal immediately (React Native fix)"
|
|
3433
|
+
), this.show3DSModal && (this.show3DSModal = !1, this.nextActionUrl = null, this.leaveEventsCounter = 0);
|
|
3432
3434
|
});
|
|
3433
3435
|
}
|
|
3434
3436
|
firstUpdated() {
|
|
@@ -3515,7 +3517,9 @@ let v = class extends se {
|
|
|
3515
3517
|
}
|
|
3516
3518
|
this.isInitialized || (this.isInitialized = !0, (t = this.sdk) == null || t.destroy(), this.sdk = new cn(this.config, this.adapters), this.sdk.subscribe((e) => {
|
|
3517
3519
|
var n, r;
|
|
3518
|
-
console.log("[3DS] State changed:", (n = this.previousState) == null ? void 0 : n.status, "→", e.status), ((r = this.previousState) == null ? void 0 : r.status) === "requires_action" && e.status !== "requires_action" && this.show3DSModal && (console.log(
|
|
3520
|
+
console.log("[3DS] State changed:", (n = this.previousState) == null ? void 0 : n.status, "→", e.status), ((r = this.previousState) == null ? void 0 : r.status) === "requires_action" && e.status !== "requires_action" && this.show3DSModal && (console.log(
|
|
3521
|
+
"[3DS] State changed from requires_action - closing modal and resuming polling"
|
|
3522
|
+
), this.show3DSModal = !1, this.nextActionUrl = null, this.leaveEventsCounter = 0, this.sdk && this.sdk.resumePolling()), this.previousState = e, this.currentState = e, this.dispatchEvent(
|
|
3519
3523
|
new CustomEvent("state-change", {
|
|
3520
3524
|
detail: { state: e },
|
|
3521
3525
|
bubbles: !0,
|
|
@@ -3543,7 +3547,7 @@ let v = class extends se {
|
|
|
3543
3547
|
}), this.sdk.on("payment_requires_action", (e) => {
|
|
3544
3548
|
console.log("[3DS] payment_requires_action event - showing modal with nextActionUrl"), this.nextActionUrl = e.payload.actionUrl, this.show3DSModal = !0, this.paymentLocked = !0, this.leaveEventsCounter = 0;
|
|
3545
3549
|
}), this.sdk.on("poll_started", () => {
|
|
3546
|
-
console.log("[3DS] poll_started event -
|
|
3550
|
+
console.log("[3DS] poll_started event - first poll request sent, closing modal"), this.show3DSModal && (console.log("[3DS] Closing 3DS modal and resuming polling (React Native fix)"), this.show3DSModal = !1, this.nextActionUrl = null, this.leaveEventsCounter = 0, this.sdk && this.sdk.resumePolling());
|
|
3547
3551
|
}), this.sdk.on(
|
|
3548
3552
|
"qr_code_received",
|
|
3549
3553
|
async (e) => {
|
|
@@ -3586,7 +3590,10 @@ let v = class extends se {
|
|
|
3586
3590
|
console.log("[3DS] handle3DSComplete called - closing modal and resuming polling"), this.show3DSModal = !1, this.nextActionUrl = null, this.leaveEventsCounter = 0, this.sdk && this.sdk.resumePolling();
|
|
3587
3591
|
}
|
|
3588
3592
|
handleInputChange(t, e) {
|
|
3589
|
-
this.cardFormData = { ...this.cardFormData, [t]: e }
|
|
3593
|
+
if (this.cardFormData = { ...this.cardFormData, [t]: e }, this.formErrors[t]) {
|
|
3594
|
+
const n = { ...this.formErrors };
|
|
3595
|
+
delete n[t], this.formErrors = n;
|
|
3596
|
+
}
|
|
3590
3597
|
}
|
|
3591
3598
|
// Luhn algorithm check for card number validation
|
|
3592
3599
|
luhnCheck(t) {
|
|
@@ -3604,18 +3611,31 @@ let v = class extends se {
|
|
|
3604
3611
|
}
|
|
3605
3612
|
// Validate expiry date (MM/YY format)
|
|
3606
3613
|
validateExpiry(t) {
|
|
3614
|
+
console.log("[EXPIRY VALIDATION] Raw input:", JSON.stringify(t)), console.log("[EXPIRY VALIDATION] Input length:", t.length), console.log("[EXPIRY VALIDATION] Input char codes:", Array.from(t).map((f) => f.charCodeAt(0)));
|
|
3607
3615
|
const e = t.trim();
|
|
3608
|
-
|
|
3616
|
+
console.log("[EXPIRY VALIDATION] After trim:", JSON.stringify(e));
|
|
3617
|
+
const r = /^\d{1,2}\/\d{2}$/.test(e);
|
|
3618
|
+
if (console.log("[EXPIRY VALIDATION] Format regex test:", r), !r)
|
|
3619
|
+
return console.log("[EXPIRY VALIDATION] ❌ FAILED - Invalid format"), { valid: !1, error: "Invalid format (MM/YY)" };
|
|
3620
|
+
const i = e.split("/"), o = i[0], s = i[1];
|
|
3621
|
+
if (!o || !s)
|
|
3609
3622
|
return { valid: !1, error: "Invalid format (MM/YY)" };
|
|
3610
|
-
const
|
|
3611
|
-
if (
|
|
3612
|
-
return { valid: !1, error: "Invalid format (MM/YY)" };
|
|
3613
|
-
const o = parseInt(r, 10);
|
|
3614
|
-
let s;
|
|
3615
|
-
if (i.length === 2 ? s = parseInt("20" + i, 10) : s = parseInt(i, 10), o < 1 || o > 12)
|
|
3623
|
+
const l = parseInt(o, 10);
|
|
3624
|
+
if (l < 1 || l > 12)
|
|
3616
3625
|
return { valid: !1, error: "Invalid month (01-12)" };
|
|
3617
|
-
const
|
|
3618
|
-
|
|
3626
|
+
const a = /* @__PURE__ */ new Date(), d = a.getFullYear(), c = a.getMonth() + 1;
|
|
3627
|
+
let h;
|
|
3628
|
+
if (s.length === 2) {
|
|
3629
|
+
const f = parseInt(s, 10), u = d % 100, m = Math.floor(d / 100) * 100;
|
|
3630
|
+
f < u && u - f > 80 ? h = m + 100 + f : h = m + f;
|
|
3631
|
+
} else
|
|
3632
|
+
return { valid: !1, error: "Invalid year format" };
|
|
3633
|
+
return console.log("[EXPIRY DEBUG] Input:", t), console.log("[EXPIRY DEBUG] Parsed - Month:", l, "Year:", h), console.log("[EXPIRY DEBUG] Current - Month:", c, "Year:", d), h < d ? (console.log("[EXPIRY DEBUG] EXPIRED - year", h, "is less than current year", d), { valid: !1, error: "Card has expired" }) : h === d && l < c ? (console.log(
|
|
3634
|
+
"[EXPIRY DEBUG] EXPIRED - same year but month",
|
|
3635
|
+
l,
|
|
3636
|
+
"is less than current month",
|
|
3637
|
+
c
|
|
3638
|
+
), { valid: !1, error: "Card has expired" }) : (console.log("[EXPIRY DEBUG] VALID - card not expired"), { valid: !0 });
|
|
3619
3639
|
}
|
|
3620
3640
|
validateCardForm() {
|
|
3621
3641
|
const t = {};
|
|
@@ -3829,7 +3849,12 @@ let v = class extends se {
|
|
|
3829
3849
|
class="input ${this.formErrors.expiry ? "input-error" : ""}"
|
|
3830
3850
|
placeholder="MM/YY"
|
|
3831
3851
|
.value=${this.cardFormData.expiry}
|
|
3832
|
-
@input=${(n) =>
|
|
3852
|
+
@input=${(n) => {
|
|
3853
|
+
const r = n.target;
|
|
3854
|
+
setTimeout(() => {
|
|
3855
|
+
this.handleInputChange("expiry", r.value);
|
|
3856
|
+
}, 0);
|
|
3857
|
+
}}
|
|
3833
3858
|
/>
|
|
3834
3859
|
${this.formErrors.expiry ? A`<div class="error-message">${this.formErrors.expiry}</div>` : ""}
|
|
3835
3860
|
</div>
|
|
@@ -5330,52 +5355,52 @@ S([
|
|
|
5330
5355
|
$({ type: String })
|
|
5331
5356
|
], v.prototype, "maxWidth", 2);
|
|
5332
5357
|
S([
|
|
5333
|
-
|
|
5358
|
+
D()
|
|
5334
5359
|
], v.prototype, "currentState", 2);
|
|
5335
5360
|
S([
|
|
5336
|
-
|
|
5361
|
+
D()
|
|
5337
5362
|
], v.prototype, "selectedMethod", 2);
|
|
5338
5363
|
S([
|
|
5339
|
-
|
|
5364
|
+
D()
|
|
5340
5365
|
], v.prototype, "cardFormData", 2);
|
|
5341
5366
|
S([
|
|
5342
|
-
|
|
5367
|
+
D()
|
|
5343
5368
|
], v.prototype, "formErrors", 2);
|
|
5344
5369
|
S([
|
|
5345
|
-
|
|
5370
|
+
D()
|
|
5346
5371
|
], v.prototype, "paymentData", 2);
|
|
5347
5372
|
S([
|
|
5348
|
-
|
|
5373
|
+
D()
|
|
5349
5374
|
], v.prototype, "feesExpanded", 2);
|
|
5350
5375
|
S([
|
|
5351
|
-
|
|
5376
|
+
D()
|
|
5352
5377
|
], v.prototype, "isInitializing", 2);
|
|
5353
5378
|
S([
|
|
5354
|
-
|
|
5379
|
+
D()
|
|
5355
5380
|
], v.prototype, "cardBrand", 2);
|
|
5356
5381
|
S([
|
|
5357
|
-
|
|
5382
|
+
D()
|
|
5358
5383
|
], v.prototype, "paymentLocked", 2);
|
|
5359
5384
|
S([
|
|
5360
|
-
|
|
5385
|
+
D()
|
|
5361
5386
|
], v.prototype, "show3DSModal", 2);
|
|
5362
5387
|
S([
|
|
5363
|
-
|
|
5388
|
+
D()
|
|
5364
5389
|
], v.prototype, "showQRModal", 2);
|
|
5365
5390
|
S([
|
|
5366
|
-
|
|
5391
|
+
D()
|
|
5367
5392
|
], v.prototype, "nextActionUrl", 2);
|
|
5368
5393
|
S([
|
|
5369
|
-
|
|
5394
|
+
D()
|
|
5370
5395
|
], v.prototype, "qrCode", 2);
|
|
5371
5396
|
S([
|
|
5372
|
-
|
|
5397
|
+
D()
|
|
5373
5398
|
], v.prototype, "qrCodeDataUrl", 2);
|
|
5374
5399
|
S([
|
|
5375
|
-
|
|
5400
|
+
D()
|
|
5376
5401
|
], v.prototype, "qrAutoResumeTimer", 2);
|
|
5377
5402
|
S([
|
|
5378
|
-
|
|
5403
|
+
D()
|
|
5379
5404
|
], v.prototype, "qrPollingInProgress", 2);
|
|
5380
5405
|
v = S([
|
|
5381
5406
|
nn("one-payment")
|