@invoice-sdk/widget 1.95.2 → 1.96.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.
|
@@ -35,7 +35,7 @@ var W = (g, A, E) => new Promise((B, C) => {
|
|
|
35
35
|
}, n = (I) => I.done ? B(I.value) : Promise.resolve(I.value).then(Q, t);
|
|
36
36
|
n((E = E.apply(g, A)).next());
|
|
37
37
|
});
|
|
38
|
-
import { t as o, g as mB, a as hQ, b as cQ, C as wQ, G as eQ, c as aQ, d as rB, e as og, f as oQ, h as DQ, i as zg, O as UC, s as ag, j as PB, k as uQ, l as iQ, m as sQ, n as fQ, o as mQ, p as rQ, v as PQ } from "./index-
|
|
38
|
+
import { t as o, g as mB, a as hQ, b as cQ, C as wQ, G as eQ, c as aQ, d as rB, e as og, f as oQ, h as DQ, i as zg, O as UC, s as ag, j as PB, k as uQ, l as iQ, m as sQ, n as fQ, o as mQ, p as rQ, v as PQ } from "./index-DzdVIF5D.js";
|
|
39
39
|
import { g as SC } from "./_commonjsHelpers-bAxELxBV.js";
|
|
40
40
|
function tC({ steps: g = [], currentStep: A = 1 } = {}) {
|
|
41
41
|
const E = document.createElement("div");
|
|
@@ -302,14 +302,14 @@ function vQ({
|
|
|
302
302
|
u.className = "wgt:w-[1px] wgt:h-8 wgt:bg-border-light";
|
|
303
303
|
const Y = document.createElement("label");
|
|
304
304
|
Y.className = "wgt:text-base wgt:font-semibold wgt:leading-5 wgt:text-black wgt:uppercase", Y.innerText = c.name, e.appendChild(f), e.appendChild(u), e.appendChild(Y);
|
|
305
|
-
const { container:
|
|
305
|
+
const { container: H } = Ng({
|
|
306
306
|
checked: s,
|
|
307
307
|
onChange: (l) => {
|
|
308
308
|
l && (A = c.route, typeof E == "function" && E(c), t());
|
|
309
309
|
},
|
|
310
310
|
disabled: !1
|
|
311
311
|
});
|
|
312
|
-
D.appendChild(e), D.appendChild(
|
|
312
|
+
D.appendChild(e), D.appendChild(H), Q.appendChild(D);
|
|
313
313
|
});
|
|
314
314
|
}
|
|
315
315
|
t();
|
|
@@ -432,9 +432,9 @@ function Kg({
|
|
|
432
432
|
f.className = "wgt:absolute wgt:top-full wgt:left-0 wgt:right-0 wgt:bg-white wgt:border wgt:border-gray-300 wgt:rounded wgt:shadow-lg wgt:z-50 wgt:hidden wgt:max-h-[500px] wgt:overflow-y-auto";
|
|
433
433
|
const u = document.createElement("div");
|
|
434
434
|
u.className = "wgt:divide-y wgt:divide-gray-200";
|
|
435
|
-
let Y = A,
|
|
435
|
+
let Y = A, H = null, l = [...E];
|
|
436
436
|
const P = () => {
|
|
437
|
-
const m = E.find((i) => i.id ? i.id ===
|
|
437
|
+
const m = E.find((i) => i.id ? i.id === H : i.value === Y);
|
|
438
438
|
return m ? m.label : "";
|
|
439
439
|
};
|
|
440
440
|
e.value = P();
|
|
@@ -452,9 +452,9 @@ function Kg({
|
|
|
452
452
|
"wgt:cursor-pointer",
|
|
453
453
|
"wgt:hover:bg-gray-100",
|
|
454
454
|
"wgt:text-sm",
|
|
455
|
-
i.id ?
|
|
455
|
+
i.id ? H === i.id ? "wgt:bg-blue-50 wgt:text-blue-700" : "" : Y === i.value ? "wgt:bg-blue-50 wgt:text-blue-700" : ""
|
|
456
456
|
].filter(Boolean).join(" "), v.innerText = i.label, v.dataset.value = i.value, v.addEventListener("click", () => {
|
|
457
|
-
if (i.id && (
|
|
457
|
+
if (i.id && (H = i.id), Y = i.value, e.value = i.label, f.classList.add("wgt:hidden"), typeof t == "function") {
|
|
458
458
|
const d = { target: { value: i.value } };
|
|
459
459
|
i.id && (d.target.id = i.id), t(d);
|
|
460
460
|
}
|
|
@@ -489,8 +489,8 @@ function Kg({
|
|
|
489
489
|
return Y;
|
|
490
490
|
},
|
|
491
491
|
setValue(m, i, v) {
|
|
492
|
-
|
|
493
|
-
const d = E.find((
|
|
492
|
+
H = v || null, Y = m || "";
|
|
493
|
+
const d = E.find((x) => x.id ? x.id === v : x.value === m);
|
|
494
494
|
d ? (e.value = d.label, J.value = m, q()) : (e.value = i || "", J.value = m || "", q());
|
|
495
495
|
},
|
|
496
496
|
setOptions(m) {
|
|
@@ -542,8 +542,8 @@ function Kg({
|
|
|
542
542
|
for (; D.options.length > 1; )
|
|
543
543
|
D.remove(1);
|
|
544
544
|
u.forEach((Y) => {
|
|
545
|
-
const
|
|
546
|
-
|
|
545
|
+
const H = document.createElement("option");
|
|
546
|
+
H.value = Y.value, H.innerText = Y.label, D.appendChild(H);
|
|
547
547
|
});
|
|
548
548
|
},
|
|
549
549
|
setDisabled(u) {
|
|
@@ -634,13 +634,13 @@ function hC({
|
|
|
634
634
|
const J = 1024, M = Math.max(0, q), m = ["Bytes", "KB", "MB", "GB", "TB"], i = Math.floor(Math.log(P) / Math.log(J));
|
|
635
635
|
return parseFloat((P / Math.pow(J, i)).toFixed(M)) + " " + m[i];
|
|
636
636
|
}
|
|
637
|
-
function
|
|
637
|
+
function H(P) {
|
|
638
638
|
const q = P.type.toLowerCase(), J = "." + P.name.split(".").pop().toLowerCase();
|
|
639
639
|
return c.accept.split(",").map((m) => m.trim().toLowerCase()).filter(Boolean).some((m) => m.startsWith(".") ? m === J : m.endsWith("/*") ? q.startsWith(m.replace("/*", "")) : q === m);
|
|
640
640
|
}
|
|
641
641
|
function l(P) {
|
|
642
642
|
if (s.innerHTML = "", f(null), P) {
|
|
643
|
-
|
|
643
|
+
H(P) || f(`File không hợp lệ. Chỉ chấp nhận: ${c.accept}`), P.size <= 500 * 1024 || f("Dung lượng file vượt quá 500KB.");
|
|
644
644
|
const J = document.createElement("div");
|
|
645
645
|
if (J.className = "wgt:flex wgt:items-center wgt:gap-4", J.addEventListener("click", () => {
|
|
646
646
|
c.click();
|
|
@@ -769,7 +769,7 @@ function cC({
|
|
|
769
769
|
f = q, q ? (e.innerText = q, e.style.display = "block", typeof C == "function" && C(q)) : (e.innerText = "", e.style.display = "none", typeof C == "function" && C(null));
|
|
770
770
|
}
|
|
771
771
|
let Y = g || null;
|
|
772
|
-
function
|
|
772
|
+
function H(q, J = 2) {
|
|
773
773
|
if (q === 0) return "0 Bytes";
|
|
774
774
|
const M = 1024, m = Math.max(0, J), i = ["Bytes", "KB", "MB", "GB", "TB"], v = Math.floor(Math.log(q) / Math.log(M));
|
|
775
775
|
return parseFloat((q / Math.pow(M, v)).toFixed(m)) + " " + i[v];
|
|
@@ -790,7 +790,7 @@ function cC({
|
|
|
790
790
|
const v = document.createElement("p");
|
|
791
791
|
v.className = "wgt:text-sm wgt:font-medium wgt:text-gray-800", v.innerText = q.name;
|
|
792
792
|
const d = document.createElement("p");
|
|
793
|
-
d.className = "wgt:text-sm wgt:text-gray-500", d.innerText =
|
|
793
|
+
d.className = "wgt:text-sm wgt:text-gray-500", d.innerText = H(q.size), i.appendChild(v), i.appendChild(d), m.appendChild(i), n.appendChild(m), typeof B == "function" && B(null, q);
|
|
794
794
|
}
|
|
795
795
|
}
|
|
796
796
|
function P(q) {
|
|
@@ -893,17 +893,17 @@ const xQ = ({
|
|
|
893
893
|
C.forEach((r) => {
|
|
894
894
|
u.append(new Option(Y[r], r));
|
|
895
895
|
}), D.appendChild(u), c.append(D);
|
|
896
|
-
const
|
|
897
|
-
|
|
896
|
+
const H = document.createElement("div");
|
|
897
|
+
H.className = "wgt:w-full wgt:flex wgt:flex-col wgt:items-start wgt:space-y-2";
|
|
898
898
|
const l = document.createElement("span");
|
|
899
899
|
l.className = "wgt:font-medium wgt:text-text-black wgt:whitespace-nowrap wgt:col-span-2 wgt:@max-2xl:whitespace-normal wgt:@max-2xl:block wgt:hidden", l.textContent = o("codeType");
|
|
900
900
|
const P = document.createElement("span");
|
|
901
|
-
P.className = "wgt:text-red-500 wgt:ml-1", P.innerText = "*", l.appendChild(P),
|
|
901
|
+
P.className = "wgt:text-red-500 wgt:ml-1", P.innerText = "*", l.appendChild(P), H.appendChild(l);
|
|
902
902
|
const q = document.createElement("select");
|
|
903
903
|
q.className = `${s} wgt:@max-2xl:w-full wgt:w-40`, q.title = o("codeTypeTooltip", "C: Có mã CQT, K: Không mã"), Q.forEach((r) => {
|
|
904
904
|
const T = r === "C" ? o("codeTypeC", "C (Có mã CQT)") : o("codeTypeK", "K (Không mã)");
|
|
905
905
|
q.append(new Option(T, r));
|
|
906
|
-
}),
|
|
906
|
+
}), H.appendChild(q), c.append(H);
|
|
907
907
|
const J = document.createElement("div");
|
|
908
908
|
J.className = "wgt:w-full wgt:flex wgt:flex-col wgt:items-start wgt:space-y-2";
|
|
909
909
|
const M = document.createElement("span");
|
|
@@ -916,8 +916,8 @@ const xQ = ({
|
|
|
916
916
|
v.className = "wgt:w-full wgt:flex wgt:flex-col wgt:items-start wgt:space-y-2";
|
|
917
917
|
const d = document.createElement("span");
|
|
918
918
|
d.className = "wgt:font-medium wgt:text-text-black wgt:whitespace-nowrap wgt:col-span-2 wgt:@max-2xl:whitespace-normal wgt:@max-2xl:block wgt:hidden", d.textContent = o("typeOfEInvoice");
|
|
919
|
-
const
|
|
920
|
-
|
|
919
|
+
const x = document.createElement("span");
|
|
920
|
+
x.className = "wgt:text-red-500 wgt:ml-1", x.innerText = "*", d.appendChild(x), v.appendChild(d);
|
|
921
921
|
const G = document.createElement("select");
|
|
922
922
|
G.className = `${s} wgt:@max-2xl:w-full wgt:w-40`, G.title = o("invoiceTypeTooltip", "Loại hóa đơn");
|
|
923
923
|
const k = {
|
|
@@ -1057,7 +1057,7 @@ function XQ() {
|
|
|
1057
1057
|
return h === 0 || h === 6;
|
|
1058
1058
|
}, Y = function(w) {
|
|
1059
1059
|
return w % 4 === 0 && w % 100 !== 0 || w % 400 === 0;
|
|
1060
|
-
},
|
|
1060
|
+
}, H = function(w, h) {
|
|
1061
1061
|
return [31, Y(w) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][h];
|
|
1062
1062
|
}, l = function(w) {
|
|
1063
1063
|
f(w) && w.setHours(0, 0, 0, 0);
|
|
@@ -1177,7 +1177,7 @@ function XQ() {
|
|
|
1177
1177
|
w.setDate(r + L - y(T));
|
|
1178
1178
|
var AA = new Date(w.getFullYear(), 0, N), S = 1440 * 60 * 1e3, EA = (w.getTime() - AA.getTime()) / S, nA = 1 + Math.round((EA - L + y(AA.getDay())) / b);
|
|
1179
1179
|
return nA;
|
|
1180
|
-
},
|
|
1180
|
+
}, x = function(w, h, r, T) {
|
|
1181
1181
|
var N = new Date(r, h, w), L = B ? E(N).isoWeek() : d(N, T);
|
|
1182
1182
|
return '<td class="pika-week">' + L + "</td>";
|
|
1183
1183
|
}, G = function(w, h, r, T) {
|
|
@@ -1435,9 +1435,9 @@ function XQ() {
|
|
|
1435
1435
|
* render HTML for a particular month
|
|
1436
1436
|
*/
|
|
1437
1437
|
render: function(w, h, r) {
|
|
1438
|
-
var T = this._o, N = /* @__PURE__ */ new Date(), L =
|
|
1438
|
+
var T = this._o, N = /* @__PURE__ */ new Date(), L = H(w, h), b = new Date(w, h, 1).getDay(), y = [], AA = [];
|
|
1439
1439
|
l(N), T.firstDay > 0 && (b -= T.firstDay, b < 0 && (b += 7));
|
|
1440
|
-
for (var S = h === 0 ? 11 : h - 1, EA = h === 11 ? 0 : h + 1, nA = h === 0 ? w - 1 : w, uA = h === 11 ? w + 1 : w, LA =
|
|
1440
|
+
for (var S = h === 0 ? 11 : h - 1, EA = h === 11 ? 0 : h + 1, nA = h === 0 ? w - 1 : w, uA = h === 11 ? w + 1 : w, LA = H(nA, S), HA = L + b, kA = HA; kA > 7; )
|
|
1441
1441
|
kA -= 7;
|
|
1442
1442
|
HA += 7 - kA;
|
|
1443
1443
|
for (var mA = !1, RA = 0, VA = 0; RA < HA; RA++) {
|
|
@@ -1458,7 +1458,7 @@ function XQ() {
|
|
|
1458
1458
|
showDaysInNextAndPreviousMonths: T.showDaysInNextAndPreviousMonths,
|
|
1459
1459
|
enableSelectionDaysInNextAndPreviousMonths: T.enableSelectionDaysInNextAndPreviousMonths
|
|
1460
1460
|
};
|
|
1461
|
-
T.pickWholeWeek && YA && (mA = !0), AA.push(v(fg)), ++VA === 7 && (T.showWeekNumber && AA.unshift(
|
|
1461
|
+
T.pickWholeWeek && YA && (mA = !0), AA.push(v(fg)), ++VA === 7 && (T.showWeekNumber && AA.unshift(x(RA - b, h, w, T.firstWeekOfYearMinDays)), y.push(G(AA, T.isRTL, T.pickWholeWeek, mA)), AA = [], VA = 0, mA = !1);
|
|
1462
1462
|
}
|
|
1463
1463
|
return j(T, y, r);
|
|
1464
1464
|
},
|
|
@@ -1760,7 +1760,7 @@ function _Q(g, A, E = 200) {
|
|
|
1760
1760
|
const e = $Q();
|
|
1761
1761
|
t.setTransform(...e), t.drawImage(B, 0, 0), t.setTransform(1, 0, 0, 1, 0, 0);
|
|
1762
1762
|
} else if (A.length === 4) {
|
|
1763
|
-
const [e, f, u, Y] = A,
|
|
1763
|
+
const [e, f, u, Y] = A, H = u - e, l = Y - f, P = H * 0.05, q = l * 0.05, J = Math.max(0, e - P), M = Math.max(0, f - q), m = Math.min(B.width, u + P), i = Math.min(B.height, Y + q), v = m - J, d = i - M;
|
|
1764
1764
|
t.drawImage(
|
|
1765
1765
|
B,
|
|
1766
1766
|
J,
|
|
@@ -1781,8 +1781,8 @@ function _Q(g, A, E = 200) {
|
|
|
1781
1781
|
E
|
|
1782
1782
|
), I = new ImageData(E, E), a = n.data, c = I.data;
|
|
1783
1783
|
for (let e = 0; e < a.length; e += 4) {
|
|
1784
|
-
const f = a[e], u = a[e + 1], Y = a[e + 2],
|
|
1785
|
-
c[e] = c[e + 1] = c[e + 2] =
|
|
1784
|
+
const f = a[e], u = a[e + 1], Y = a[e + 2], H = 0.2989 * f + 0.587 * u + 0.114 * Y;
|
|
1785
|
+
c[e] = c[e + 1] = c[e + 2] = H, c[e + 3] = 255;
|
|
1786
1786
|
}
|
|
1787
1787
|
const s = new ImageData(E, E), D = AE(c, E, E, 10);
|
|
1788
1788
|
return s.data.set(D), {
|
|
@@ -1844,20 +1844,20 @@ function CE(g, A, E, B, C = 0.5) {
|
|
|
1844
1844
|
for (let n = 0; n < t; n++) {
|
|
1845
1845
|
const I = g.data[n * 37 + 4];
|
|
1846
1846
|
if (I < C) continue;
|
|
1847
|
-
const a = g.data[n * 37], c = g.data[n * 37 + 1], s = g.data[n * 37 + 2], D = g.data[n * 37 + 3], e = 1, f = 1, u = [a, c, s, D], Y = g.data.slice(n * 37 + 5, n * 37 + 37),
|
|
1847
|
+
const a = g.data[n * 37], c = g.data[n * 37 + 1], s = g.data[n * 37 + 2], D = g.data[n * 37 + 3], e = 1, f = 1, u = [a, c, s, D], Y = g.data.slice(n * 37 + 5, n * 37 + 37), H = new Float32Array(25600);
|
|
1848
1848
|
for (let k = 0; k < 160; k++)
|
|
1849
1849
|
for (let X = 0; X < 160; X++) {
|
|
1850
1850
|
let U = 0;
|
|
1851
1851
|
for (let j = 0; j < 32; j++)
|
|
1852
1852
|
U += Y[j] * A.data[j * 160 * 160 + k * 160 + X];
|
|
1853
|
-
|
|
1853
|
+
H[k * 160 + X] = U > 0 ? 1 : 0;
|
|
1854
1854
|
}
|
|
1855
1855
|
const l = BE();
|
|
1856
1856
|
let P = l.length > 0 ? l[0] : [], q = P.length >= 4 ? P.slice(0, 4) : u;
|
|
1857
1857
|
q = q.map((k) => [k[0] * e, k[1] * f]);
|
|
1858
|
-
const J = 0.1, M = Math.min(...q.map((k) => k[0])), m = Math.max(...q.map((k) => k[0])), i = Math.min(...q.map((k) => k[1])), v = Math.max(...q.map((k) => k[1])), d = m - M,
|
|
1858
|
+
const J = 0.1, M = Math.min(...q.map((k) => k[0])), m = Math.max(...q.map((k) => k[0])), i = Math.min(...q.map((k) => k[1])), v = Math.max(...q.map((k) => k[1])), d = m - M, x = v - i, G = q.map((k) => [
|
|
1859
1859
|
k[0] + (k[0] < (M + m) / 2 ? -J * d : J * d),
|
|
1860
|
-
k[1] + (k[1] < (i + v) / 2 ? -J *
|
|
1860
|
+
k[1] + (k[1] < (i + v) / 2 ? -J * x : J * x)
|
|
1861
1861
|
]);
|
|
1862
1862
|
Q.push({
|
|
1863
1863
|
bbox_xyxy: u,
|
|
@@ -1989,7 +1989,7 @@ function hE(D) {
|
|
|
1989
1989
|
const O = BA();
|
|
1990
1990
|
typeof g == "function" && g(O);
|
|
1991
1991
|
}), e.appendChild(f);
|
|
1992
|
-
let u, Y,
|
|
1992
|
+
let u, Y, H, l, P, q, J, M, m, i, v, d, x, G, k, X, U, j, F, w, h, r, T, N, L;
|
|
1993
1993
|
const b = document.createElement("button");
|
|
1994
1994
|
u = dA({
|
|
1995
1995
|
name: "taxCode",
|
|
@@ -2036,7 +2036,7 @@ function hE(D) {
|
|
|
2036
2036
|
value: ((wA = (cA = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : cA.organization) == null ? void 0 : wA.name) || "",
|
|
2037
2037
|
readOnly: !1,
|
|
2038
2038
|
horizontal: !0
|
|
2039
|
-
}),
|
|
2039
|
+
}), H = dA({
|
|
2040
2040
|
name: "companyAddressDetail",
|
|
2041
2041
|
label: o("address"),
|
|
2042
2042
|
required: !0,
|
|
@@ -2076,7 +2076,7 @@ function hE(D) {
|
|
|
2076
2076
|
}
|
|
2077
2077
|
r = hC({
|
|
2078
2078
|
label: o("uploadLogo", "Tải logo lên"),
|
|
2079
|
-
required: !
|
|
2079
|
+
required: !1,
|
|
2080
2080
|
file: (A == null ? void 0 : A.logo) || null,
|
|
2081
2081
|
onFileChange: (z) => {
|
|
2082
2082
|
R();
|
|
@@ -2140,7 +2140,7 @@ function hE(D) {
|
|
|
2140
2140
|
onChange: (z) => {
|
|
2141
2141
|
z.target.value;
|
|
2142
2142
|
}
|
|
2143
|
-
}),
|
|
2143
|
+
}), x = dA({
|
|
2144
2144
|
name: "repIdCardField",
|
|
2145
2145
|
label: o("idNumber"),
|
|
2146
2146
|
required: !0,
|
|
@@ -2152,10 +2152,10 @@ function hE(D) {
|
|
|
2152
2152
|
let O = z.target.value;
|
|
2153
2153
|
const $ = O.replace(/[^0-9]/g, "");
|
|
2154
2154
|
if ($ !== O && (z.target.value = $, O = $), O.trim() === "") {
|
|
2155
|
-
|
|
2155
|
+
x.setError(o("errorRequired"));
|
|
2156
2156
|
return;
|
|
2157
2157
|
}
|
|
2158
|
-
/^\d{12}$/.test(O) ?
|
|
2158
|
+
/^\d{12}$/.test(O) ? x.setError(null) : x.setError(
|
|
2159
2159
|
o("errorInvalidIdCard", "Số CCCD phải có 12 chữ số")
|
|
2160
2160
|
);
|
|
2161
2161
|
}
|
|
@@ -2406,9 +2406,9 @@ function hE(D) {
|
|
|
2406
2406
|
if (O !== EA)
|
|
2407
2407
|
return;
|
|
2408
2408
|
if ($.error)
|
|
2409
|
-
Y.inputEl.value = "",
|
|
2409
|
+
Y.inputEl.value = "", H.inputEl.value = "", l.setValue && l.setValue("", "", ""), l.setDisabled(!1);
|
|
2410
2410
|
else {
|
|
2411
|
-
if (Y.inputEl.value = $.ten_cty || "",
|
|
2411
|
+
if (Y.inputEl.value = $.ten_cty || "", H.inputEl.value = $.dia_chi || "", $.cqthue_ql) {
|
|
2412
2412
|
const DA = (FA) => FA.toLowerCase().replace(/phường\s+/i, "").replace(/xã\s+/i, "").replace(/quận\s+/i, "").trim(), xA = DA($.cqthue_ql), JA = y.find((FA) => {
|
|
2413
2413
|
const SA = DA(FA.label);
|
|
2414
2414
|
return SA.includes(xA) || xA.includes(SA);
|
|
@@ -2443,7 +2443,7 @@ function hE(D) {
|
|
|
2443
2443
|
const LA = document.createElement("h3");
|
|
2444
2444
|
LA.className = "wgt:text-lg wgt:font-semibold wgt:mb-4", LA.innerText = o("unitInfo", "1. Thông tin đơn vị"), uA.appendChild(LA);
|
|
2445
2445
|
const HA = document.createElement("div");
|
|
2446
|
-
HA.className = "wgt:grid wgt:@max-2xl:grid-cols-1 wgt:@max-2xl:p-4 wgt:@max-2xl:gap-y-3 wgt:grid-cols-2 wgt:gap-y-2 wgt:gap-x-4 wgt:px-6 wgt:py-4 wgt:rounded-xl wgt:bg-weak-50", uA.appendChild(HA), HA.appendChild(u.container), HA.appendChild(Y.container), HA.appendChild(
|
|
2446
|
+
HA.className = "wgt:grid wgt:@max-2xl:grid-cols-1 wgt:@max-2xl:p-4 wgt:@max-2xl:gap-y-3 wgt:grid-cols-2 wgt:gap-y-2 wgt:gap-x-4 wgt:px-6 wgt:py-4 wgt:rounded-xl wgt:bg-weak-50", uA.appendChild(HA), HA.appendChild(u.container), HA.appendChild(Y.container), HA.appendChild(H.container), HA.appendChild(l.container);
|
|
2447
2447
|
const kA = document.createElement("div");
|
|
2448
2448
|
kA.className = "wgt:w-full wgt:grid wgt:grid-cols-1 wgt:@min-2xl:grid-cols-2 wgt:space-x-4", uA.appendChild(kA), kA.appendChild(r.container), f.appendChild(uA);
|
|
2449
2449
|
const mA = document.createElement("div");
|
|
@@ -2469,7 +2469,7 @@ function hE(D) {
|
|
|
2469
2469
|
function yA(z) {
|
|
2470
2470
|
tA = !1, YA = !1, zA();
|
|
2471
2471
|
const O = () => {
|
|
2472
|
-
|
|
2472
|
+
x.inputEl.value = "", m.inputEl.value = "", i.inputEl.value = "", X.inputEl.value = "", v.selectEl.value = "", k.selectEl.value = "", x.setError(null), m.setError(null), i.setError(null), X.setError(null), v.setError(null), k.setError(null), t && typeof t.setDate == "function" && t.setDate(null);
|
|
2473
2473
|
}, $ = (DA) => {
|
|
2474
2474
|
if (!DA) return "";
|
|
2475
2475
|
if (/^\d{8}$/.test(DA)) {
|
|
@@ -2496,7 +2496,7 @@ function hE(D) {
|
|
|
2496
2496
|
const { address: FA, date_of_birth: SA, full_name: bg, id_number: Hg, sex: Yg } = DA;
|
|
2497
2497
|
if (!Hg || !/^\d{12}$/.test(Hg) ? (tg(
|
|
2498
2498
|
o("errorInvalidCard", "Số CCCD phải có 12 chữ số")
|
|
2499
|
-
),
|
|
2499
|
+
), x.inputEl.value = "") : (x.inputEl.value = Hg, x.setError(null)), m.inputEl.value = bg || "", i.inputEl.value = $(SA), X.inputEl.value = FA || "", Yg) {
|
|
2500
2500
|
const eg = wC.find(
|
|
2501
2501
|
(jg) => jg.label.toLowerCase() === Yg.toLowerCase()
|
|
2502
2502
|
);
|
|
@@ -2567,7 +2567,7 @@ function hE(D) {
|
|
|
2567
2567
|
const mg = document.createElement("div");
|
|
2568
2568
|
mg.className = "wgt:grid wgt:grid-cols-1 wgt:@min-2xl:grid-cols-2 wgt:gap-4", $A.appendChild(mg), mg.appendChild(i.container), mg.appendChild(v.container), VA.appendChild($A);
|
|
2569
2569
|
const jA = document.createElement("div");
|
|
2570
|
-
jA.className = "wgt:grid wgt:grid-cols-1 wgt:@min-2xl:grid-cols-4 wgt:gap-4 wgt:items-start", jA.appendChild(
|
|
2570
|
+
jA.className = "wgt:grid wgt:grid-cols-1 wgt:@min-2xl:grid-cols-4 wgt:gap-4 wgt:items-start", jA.appendChild(x.container), jA.appendChild(G.container), jA.appendChild(d.container), jA.appendChild(k.container), mA.appendChild(VA), mA.appendChild(jA), mA.appendChild(X.container), mA.appendChild(T.container);
|
|
2571
2571
|
const hg = document.createElement("ul");
|
|
2572
2572
|
hg.className = "wgt:list-inside wgt:list-disc wgt:-mt-2";
|
|
2573
2573
|
const XA = document.createElement("li");
|
|
@@ -2670,7 +2670,7 @@ function hE(D) {
|
|
|
2670
2670
|
/[\s.\-()]/g,
|
|
2671
2671
|
""
|
|
2672
2672
|
), JA = O.legalRepresentative.phone.replace(/[^\d+().\-\s]/g, "").replace(/[\s.\-()]/g, ""), FA = /^(?:\+84|0)(?:2\d|3\d|5\d|7\d|8\d|9\d)\d{7}$/;
|
|
2673
|
-
return !(!FA.test(DA) || !FA.test(JA) || !/^\d{12}$/.test(O.legalRepresentative.idCard) || !new RegExp("^(?!\\.)(?!.*\\.\\.)[A-Za-z0-9.!#$%&'*+/=?^_`{|}~-]{1,64}(?<!\\.)@(?:[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?\\.)+[A-Za-z0-9-]{2,63}$").test(O.contactPerson.email) || !/^[1-9][CK]\d{2}[TDLMNBGHX][A-Z]{2}$/.test(O.invoiceSymbol) || !z.license || !z.
|
|
2673
|
+
return !(!FA.test(DA) || !FA.test(JA) || !/^\d{12}$/.test(O.legalRepresentative.idCard) || !new RegExp("^(?!\\.)(?!.*\\.\\.)[A-Za-z0-9.!#$%&'*+/=?^_`{|}~-]{1,64}(?<!\\.)@(?:[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?\\.)+[A-Za-z0-9-]{2,63}$").test(O.contactPerson.email) || !/^[1-9][CK]\d{2}[TDLMNBGHX][A-Z]{2}$/.test(O.invoiceSymbol) || !z.license || !z.idCard || !z.idCardBack);
|
|
2674
2674
|
}
|
|
2675
2675
|
function R() {
|
|
2676
2676
|
b.disabled = !qg() || !iA || WA() || ng() || r.getError() || T.getError();
|
|
@@ -2683,7 +2683,7 @@ function hE(D) {
|
|
|
2683
2683
|
previousEInvoiceProvider: (O = w == null ? void 0 : w.getValue()) != null ? O : "",
|
|
2684
2684
|
organization: {
|
|
2685
2685
|
name: Y == null ? void 0 : Y.getValue(),
|
|
2686
|
-
address:
|
|
2686
|
+
address: H == null ? void 0 : H.getValue(),
|
|
2687
2687
|
taxCode: u == null ? void 0 : u.getValue(),
|
|
2688
2688
|
taxAuthority: l == null ? void 0 : l.getValue()
|
|
2689
2689
|
},
|
|
@@ -2698,7 +2698,7 @@ function hE(D) {
|
|
|
2698
2698
|
dob: i == null ? void 0 : i.getValue(),
|
|
2699
2699
|
gender: v == null ? void 0 : v.getValue(),
|
|
2700
2700
|
phone: d == null ? void 0 : d.getValue(),
|
|
2701
|
-
idCard:
|
|
2701
|
+
idCard: x == null ? void 0 : x.getValue(),
|
|
2702
2702
|
passportNumber: G == null ? void 0 : G.getValue(),
|
|
2703
2703
|
nationality: k == null ? void 0 : k.getValue(),
|
|
2704
2704
|
permanentAddress: X == null ? void 0 : X.getValue()
|
|
@@ -2716,7 +2716,7 @@ function hE(D) {
|
|
|
2716
2716
|
[
|
|
2717
2717
|
Y,
|
|
2718
2718
|
u,
|
|
2719
|
-
|
|
2719
|
+
H,
|
|
2720
2720
|
P,
|
|
2721
2721
|
q,
|
|
2722
2722
|
J,
|
|
@@ -2724,7 +2724,7 @@ function hE(D) {
|
|
|
2724
2724
|
m,
|
|
2725
2725
|
i,
|
|
2726
2726
|
d,
|
|
2727
|
-
|
|
2727
|
+
x,
|
|
2728
2728
|
X,
|
|
2729
2729
|
h,
|
|
2730
2730
|
w
|
|
@@ -2832,15 +2832,15 @@ function eE({
|
|
|
2832
2832
|
e.appendChild(u), I.appendChild(e);
|
|
2833
2833
|
const Y = document.createElement("div");
|
|
2834
2834
|
Y.className = "wgt:mt-4";
|
|
2835
|
-
const
|
|
2836
|
-
|
|
2835
|
+
const H = document.createElement("span");
|
|
2836
|
+
H.className = [
|
|
2837
2837
|
"wgt:block",
|
|
2838
2838
|
"wgt:text-2xl",
|
|
2839
2839
|
"wgt:font-bold",
|
|
2840
2840
|
C ? "wgt:text-primary" : "wgt:text-text-sub-600"
|
|
2841
2841
|
].join(" ");
|
|
2842
2842
|
let l = t ? (q = g == null ? void 0 : g.renewPrice) != null ? q : 0 : (J = g == null ? void 0 : g.price) != null ? J : 0;
|
|
2843
|
-
|
|
2843
|
+
H.innerText = lA((g == null ? void 0 : g.limit) * l), Y.appendChild(H);
|
|
2844
2844
|
const P = document.createElement("span");
|
|
2845
2845
|
return P.className = "wgt:text-sm wgt:text-text-sub-600", P.innerText = `VND/${o("package")}`, Y.appendChild(P), n.appendChild(Y), { container: n };
|
|
2846
2846
|
}
|
|
@@ -2908,7 +2908,7 @@ function aC({
|
|
|
2908
2908
|
}
|
|
2909
2909
|
};
|
|
2910
2910
|
}
|
|
2911
|
-
const aE = "1.
|
|
2911
|
+
const aE = "1.96.0";
|
|
2912
2912
|
function oE(E) {
|
|
2913
2913
|
return W(this, arguments, function* ({ search: g, bank: A }) {
|
|
2914
2914
|
return (yield GA.get(`${zg}`, {
|
|
@@ -3156,7 +3156,7 @@ function PE({
|
|
|
3156
3156
|
function Y(l) {
|
|
3157
3157
|
return C.find((P) => P._id === l) || null;
|
|
3158
3158
|
}
|
|
3159
|
-
function
|
|
3159
|
+
function H() {
|
|
3160
3160
|
f.contains(u) && f.removeChild(u);
|
|
3161
3161
|
}
|
|
3162
3162
|
return {
|
|
@@ -3171,18 +3171,20 @@ function PE({
|
|
|
3171
3171
|
getInvoicePackages: () => C,
|
|
3172
3172
|
getFilteredInvoiceOptions: () => Q,
|
|
3173
3173
|
findInvoiceById: Y,
|
|
3174
|
-
removeLoading:
|
|
3174
|
+
removeLoading: H
|
|
3175
3175
|
};
|
|
3176
3176
|
}
|
|
3177
|
-
function qE() {
|
|
3178
|
-
const
|
|
3179
|
-
|
|
3180
|
-
const
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3177
|
+
function qE(g = !1) {
|
|
3178
|
+
const A = document.createElement("div");
|
|
3179
|
+
A.className = "wgt:flex wgt:flex-col wgt:gap-4";
|
|
3180
|
+
const E = document.createElement("h2");
|
|
3181
|
+
if (E.className = "wgt:text-xl wgt:font-bold wgt:text-text-black", E.innerText = o("selectSignaturePackage"), !g) {
|
|
3182
|
+
const Q = document.createElement("span");
|
|
3183
|
+
Q.className = "wgt:text-sm wgt:text-red-500 wgt:ml-1", Q.innerText = "*", E.appendChild(Q);
|
|
3184
|
+
}
|
|
3185
|
+
A.appendChild(E);
|
|
3184
3186
|
const B = document.createElement("div");
|
|
3185
|
-
|
|
3187
|
+
A.appendChild(B);
|
|
3186
3188
|
const C = document.createElement("div");
|
|
3187
3189
|
return C.className = "wgt:flex wgt:items-center wgt:justify-center wgt:py-8", C.innerHTML = `
|
|
3188
3190
|
<div class="wgt:flex wgt:flex-col wgt:items-center wgt:gap-2">
|
|
@@ -3190,7 +3192,7 @@ function qE() {
|
|
|
3190
3192
|
<span class="wgt:text-sm wgt:text-text-sub-600">${o("loading")}...</span>
|
|
3191
3193
|
</div>
|
|
3192
3194
|
`, B.appendChild(C), {
|
|
3193
|
-
container:
|
|
3195
|
+
container: A,
|
|
3194
3196
|
signatureSelectorWrapper: B
|
|
3195
3197
|
};
|
|
3196
3198
|
}
|
|
@@ -3281,11 +3283,11 @@ function lE(q) {
|
|
|
3281
3283
|
setSelectedPromotions: f,
|
|
3282
3284
|
setPackages: u,
|
|
3283
3285
|
setPromotionCodes: Y,
|
|
3284
|
-
isNewCustomer:
|
|
3286
|
+
isNewCustomer: H,
|
|
3285
3287
|
savedQuantities: l,
|
|
3286
3288
|
setSavedQuantities: P
|
|
3287
3289
|
}) {
|
|
3288
|
-
let J = "", M = B ? B._id : null, m = C ? C._id : null, i = D ? D.map((K) => K) : [], v = [], d = [],
|
|
3290
|
+
let J = "", M = B ? B._id : null, m = C ? C._id : null, i = D ? D.map((K) => K) : [], v = [], d = [], x = [], G = [], k = null, X = (l == null ? void 0 : l.qtyRegFee) || 1, U = (l == null ? void 0 : l.qtyInvoicePkg) || 1, j = (l == null ? void 0 : l.qtySignaturePkg) || 1;
|
|
3289
3291
|
function F() {
|
|
3290
3292
|
P && P({
|
|
3291
3293
|
qtyRegFee: X,
|
|
@@ -3324,7 +3326,7 @@ function lE(q) {
|
|
|
3324
3326
|
}
|
|
3325
3327
|
});
|
|
3326
3328
|
L.appendChild(b);
|
|
3327
|
-
const { container: HA, signatureSelectorWrapper: kA } = qE();
|
|
3329
|
+
const { container: HA, signatureSelectorWrapper: kA } = qE(!H);
|
|
3328
3330
|
L.appendChild(HA);
|
|
3329
3331
|
const mA = document.createElement("div");
|
|
3330
3332
|
mA.className = "wgt:flex wgt:items-center wgt:justify-center wgt:py-4", mA.innerHTML = `
|
|
@@ -3365,7 +3367,7 @@ function lE(q) {
|
|
|
3365
3367
|
code: K.code,
|
|
3366
3368
|
quantity: K.quantity
|
|
3367
3369
|
}), _.length > 0 && _.forEach((aA) => {
|
|
3368
|
-
const iA =
|
|
3370
|
+
const iA = x[aA];
|
|
3369
3371
|
iA.reward.packageCodes.length > 0 && iA.reward.packageCodes.forEach((qA) => {
|
|
3370
3372
|
V.push({
|
|
3371
3373
|
code: qA,
|
|
@@ -3386,7 +3388,7 @@ function lE(q) {
|
|
|
3386
3388
|
],
|
|
3387
3389
|
packages: V,
|
|
3388
3390
|
promotionCodes: _,
|
|
3389
|
-
isRenew: !
|
|
3391
|
+
isRenew: !H
|
|
3390
3392
|
});
|
|
3391
3393
|
I(aA.orderId), g();
|
|
3392
3394
|
} catch (aA) {
|
|
@@ -3404,7 +3406,7 @@ function lE(q) {
|
|
|
3404
3406
|
(gA) => gA._id === m
|
|
3405
3407
|
);
|
|
3406
3408
|
let Z = null;
|
|
3407
|
-
|
|
3409
|
+
H && !(K != null && K.withoutInitialFee) ? (Z = OA(PA({}, d[0]), {
|
|
3408
3410
|
quantity: X
|
|
3409
3411
|
}), Q(Z)) : Q(null);
|
|
3410
3412
|
let _ = OA(PA({}, K), { quantity: U }), CA = OA(PA({}, QA), { quantity: j });
|
|
@@ -3433,7 +3435,7 @@ function lE(q) {
|
|
|
3433
3435
|
] = yield Promise.allSettled([
|
|
3434
3436
|
fE(),
|
|
3435
3437
|
DE({ bank: c }),
|
|
3436
|
-
uE({ bank: c, hasRenew: !
|
|
3438
|
+
uE({ bank: c, hasRenew: !H }),
|
|
3437
3439
|
iE({ bank: c })
|
|
3438
3440
|
]);
|
|
3439
3441
|
if (_.status === "fulfilled" ? d = _.value || [] : (console.error(
|
|
@@ -3442,7 +3444,7 @@ function lE(q) {
|
|
|
3442
3444
|
), Tg.error(
|
|
3443
3445
|
o("errorLoadingInitPackages") || "Failed to load registration packages"
|
|
3444
3446
|
), d = []), Z.status === "fulfilled" ? (((K = Z == null ? void 0 : Z.value) == null ? void 0 : K.length) > 0 && Z.value.forEach((V) => {
|
|
3445
|
-
V.codes.length > 0 && (
|
|
3447
|
+
V.codes.length > 0 && (x[V.codes[0].code] = {
|
|
3446
3448
|
id: V.id,
|
|
3447
3449
|
name: V.name,
|
|
3448
3450
|
nameEn: V.nameEn,
|
|
@@ -3457,10 +3459,10 @@ function lE(q) {
|
|
|
3457
3459
|
isDisabled: !1,
|
|
3458
3460
|
reward: V.reward
|
|
3459
3461
|
});
|
|
3460
|
-
}), Object.keys(
|
|
3461
|
-
(V) =>
|
|
3462
|
+
}), Object.keys(x).length > 0 && (i = D || Object.keys(x).filter(
|
|
3463
|
+
(V) => x[V].bank === c && x[V].expiredAt >= (/* @__PURE__ */ new Date()).toISOString() && x[V].limit > x[V].used
|
|
3462
3464
|
), rg())) : console.error("Failed to load promotions:", Z.reason), CA.status === "fulfilled") {
|
|
3463
|
-
const V =
|
|
3465
|
+
const V = H ? CA.value : CA.value.filter((p) => p.renewPrice !== 0);
|
|
3464
3466
|
if (AA(V || []), CA.value.length > 0) {
|
|
3465
3467
|
const p = CA.value.find(
|
|
3466
3468
|
(aA) => G.includes(aA.code)
|
|
@@ -3480,7 +3482,7 @@ function lE(q) {
|
|
|
3480
3482
|
const V = v.find(
|
|
3481
3483
|
(p) => G.includes(p.code)
|
|
3482
3484
|
);
|
|
3483
|
-
m = C ? C._id : V ? V._id : (QA = v == null ? void 0 : v.filter((p) => !p.isBonusPackage)[0]) == null ? void 0 : QA._id;
|
|
3485
|
+
m = C ? C._id : V ? V._id : H ? (QA = v == null ? void 0 : v.filter((p) => !p.isBonusPackage)[0]) == null ? void 0 : QA._id : null;
|
|
3484
3486
|
}
|
|
3485
3487
|
} else
|
|
3486
3488
|
console.error(
|
|
@@ -3503,9 +3505,9 @@ function lE(q) {
|
|
|
3503
3505
|
fg(), mg(), hg(), NA(), vA();
|
|
3504
3506
|
}
|
|
3505
3507
|
function sg(K, QA, Z) {
|
|
3506
|
-
const _ = Object.values(
|
|
3508
|
+
const _ = Object.values(x).find(
|
|
3507
3509
|
(p) => p.bank === c && p.appliedPackages.includes(K)
|
|
3508
|
-
), CA = _ && !_.isDisabled && !(_.expiredAt < (/* @__PURE__ */ new Date()).toISOString()) && _.limit !== _.used, gA = Object.values(
|
|
3510
|
+
), CA = _ && !_.isDisabled && !(_.expiredAt < (/* @__PURE__ */ new Date()).toISOString()) && _.limit !== _.used, gA = Object.values(x).find(
|
|
3509
3511
|
(p) => p.bank === c && p.appliedPackages.includes(QA)
|
|
3510
3512
|
), V = gA && !gA.isDisabled && !(gA.expiredAt < (/* @__PURE__ */ new Date()).toISOString()) && gA.limit !== gA.used;
|
|
3511
3513
|
if (CA && !V) {
|
|
@@ -3529,7 +3531,7 @@ function lE(q) {
|
|
|
3529
3531
|
disCountedPackages: G,
|
|
3530
3532
|
promotion: o("discount"),
|
|
3531
3533
|
selectedPackageId: M,
|
|
3532
|
-
isRenew: !
|
|
3534
|
+
isRenew: !H,
|
|
3533
3535
|
handlePackageSelect: (K) => {
|
|
3534
3536
|
var _, CA;
|
|
3535
3537
|
let QA = (_ = S().find(
|
|
@@ -3588,7 +3590,7 @@ function lE(q) {
|
|
|
3588
3590
|
// getCurrentLanguage() === "vi"
|
|
3589
3591
|
// ? initPackages[0].name
|
|
3590
3592
|
// : initPackages[0].nameEn,
|
|
3591
|
-
isChecked:
|
|
3593
|
+
isChecked: H && !(K != null && K.withoutInitialFee)
|
|
3592
3594
|
});
|
|
3593
3595
|
jA.appendChild(QA);
|
|
3594
3596
|
}
|
|
@@ -3601,8 +3603,8 @@ function lE(q) {
|
|
|
3601
3603
|
), QA = v.find(
|
|
3602
3604
|
(Z) => Z._id === m
|
|
3603
3605
|
);
|
|
3604
|
-
Object.keys(
|
|
3605
|
-
const _ =
|
|
3606
|
+
Object.keys(x).forEach((Z) => {
|
|
3607
|
+
const _ = x[Z];
|
|
3606
3608
|
if (_.bank !== c)
|
|
3607
3609
|
return;
|
|
3608
3610
|
let CA = !1;
|
|
@@ -3618,10 +3620,10 @@ function lE(q) {
|
|
|
3618
3620
|
}), rg();
|
|
3619
3621
|
}
|
|
3620
3622
|
function rg() {
|
|
3621
|
-
G = Object.values(
|
|
3623
|
+
G = Object.values(x).filter((K) => K.bank === c).map((K) => K.appliedPackages[0]);
|
|
3622
3624
|
}
|
|
3623
3625
|
function NA() {
|
|
3624
|
-
if (Object.values(
|
|
3626
|
+
if (Object.values(x).filter(
|
|
3625
3627
|
(p) => p.bank === c
|
|
3626
3628
|
).length === 0) {
|
|
3627
3629
|
L.contains(XA) && L.removeChild(XA);
|
|
@@ -3634,7 +3636,7 @@ function lE(q) {
|
|
|
3634
3636
|
Z.className = "wgt:w-full wgt:flex wgt:items-center wgt:gap-2 wgt:@max-2xl:flex-col wgt:@max-2xl:items-start";
|
|
3635
3637
|
const _ = document.createElement("div");
|
|
3636
3638
|
_.className = "wgt:flex wgt:min-w-[500px] wgt:h-11 wgt:items-center wgt:gap-3 wgt:px-3 wgt:py-2 wgt:rounded-lg wgt:bg-white wgt:border wgt:border-[#E4E7EC] wgt:@max-2xl:min-w-full wgt:@max-2xl:flex-wrap wgt:@max-2xl:h-fit", Z.appendChild(_), i && i.length > 0 && i.filter((aA) => {
|
|
3637
|
-
const iA = Object.values(
|
|
3639
|
+
const iA = Object.values(x).find(
|
|
3638
3640
|
(qA) => qA.code === aA
|
|
3639
3641
|
);
|
|
3640
3642
|
return iA && iA.bank === c;
|
|
@@ -3667,7 +3669,7 @@ function lE(q) {
|
|
|
3667
3669
|
Z.appendChild(CA), XA.appendChild(Z);
|
|
3668
3670
|
const gA = document.createElement("div");
|
|
3669
3671
|
gA.className = "wgt:w-full wgt:grid wgt:grid-cols-3 wgt:gap-4 wgt:@max-2xl:flex wgt:@max-2xl:flex-col", XA.appendChild(gA);
|
|
3670
|
-
const V = Object.values(
|
|
3672
|
+
const V = Object.values(x).filter(
|
|
3671
3673
|
(p) => p.bank === c
|
|
3672
3674
|
);
|
|
3673
3675
|
if (V.length > 0)
|
|
@@ -3702,7 +3704,7 @@ function lE(q) {
|
|
|
3702
3704
|
const K = S().find(
|
|
3703
3705
|
(R) => R._id === M
|
|
3704
3706
|
);
|
|
3705
|
-
if (
|
|
3707
|
+
if (H && (d == null ? void 0 : d.length) > 0 && !(K != null && K.withoutInitialFee)) {
|
|
3706
3708
|
const R = document.createElement("tr");
|
|
3707
3709
|
R.className = "wgt:@max-2xl:block wgt:@max-2xl:mb-4 wgt:@max-2xl:p-4 wgt:@max-2xl:bg-white wgt:@max-2xl:rounded-lg wgt:@max-2xl:border wgt:@max-2xl:border-soft-200 wgt:@max-2xl:shadow-sm";
|
|
3708
3710
|
const BA = document.createElement("td");
|
|
@@ -3759,7 +3761,7 @@ function lE(q) {
|
|
|
3759
3761
|
cA.className = "wgt:w-full wgt:justify-between wgt:inline-flex wgt:items-center wgt:border wgt:border-soft-200 wgt:rounded-lg wgt:@max-2xl:w-full wgt:@max-2xl:max-w-[200px] wgt:@max-2xl:mx-auto";
|
|
3760
3762
|
const wA = document.createElement("button");
|
|
3761
3763
|
wA.type = "button", wA.ariaLabel = o("decrease");
|
|
3762
|
-
const oA =
|
|
3764
|
+
const oA = H ? (Cg = R == null ? void 0 : R.price) != null ? Cg : 0 : (kg = R == null ? void 0 : R.renewPrice) != null ? kg : 0;
|
|
3763
3765
|
wA.disabled = U <= 1 || oA === 0, wA.className = "wgt:flex wgt:h-8 wgt:w-8 wgt:items-center wgt:justify-center wgt:rounded-lg wgt:bg-weak-50 wgt:text-strong-950 wgt:disabled:cursor-not-allowed wgt:disabled:opacity-50 wgt:@max-2xl:h-12 wgt:@max-2xl:w-12 wgt:@max-2xl:text-lg wgt:@max-2xl:font-bold", wA.innerText = "–", wA.addEventListener("click", () => {
|
|
3764
3766
|
U > 1 && (U -= 1, vA());
|
|
3765
3767
|
}), cA.appendChild(wA);
|
|
@@ -3836,7 +3838,7 @@ function lE(q) {
|
|
|
3836
3838
|
}
|
|
3837
3839
|
}
|
|
3838
3840
|
const QA = i.map(
|
|
3839
|
-
(R) => Object.values(
|
|
3841
|
+
(R) => Object.values(x).find(
|
|
3840
3842
|
(BA) => BA.code === R && BA.bank === c
|
|
3841
3843
|
)
|
|
3842
3844
|
).filter((R) => R !== void 0);
|
|
@@ -3861,7 +3863,7 @@ function lE(q) {
|
|
|
3861
3863
|
"package"
|
|
3862
3864
|
)} ${(TA = (sA = R == null ? void 0 : R.reward) == null ? void 0 : sA.packageCodes) == null ? void 0 : TA.join(", ")}`, eA.style.color = "#12B76A") : eA.innerText = "", BA.appendChild(eA), tA.appendChild(BA);
|
|
3863
3865
|
});
|
|
3864
|
-
const _ =
|
|
3866
|
+
const _ = H && d.length > 0 && !(K != null && K.withoutInitialFee) ? ((Rg = d[0]) == null ? void 0 : Rg.price) * X : 0, CA = uA(M), gA = CA ? H ? (Pg = CA.price) != null ? Pg : 0 : (qg = CA.renewPrice) != null ? qg : 0 : 0, V = CA ? gA * CA.limit * U : 0, p = w(m), aA = p ? p.price * p.limit * j : 0, iA = _ + V + aA - Z;
|
|
3865
3867
|
a(iA);
|
|
3866
3868
|
{
|
|
3867
3869
|
const R = document.createElement("tr");
|
|
@@ -3894,37 +3896,37 @@ function HE({
|
|
|
3894
3896
|
const D = document.createElement("div");
|
|
3895
3897
|
D.className = "wgt:bg-white wgt:rounded-md wgt:p-6 wgt:flex wgt:flex-col wgt:gap-3 wgt:border wgt:border-[#E4E7EC]";
|
|
3896
3898
|
const e = document.createElement("div");
|
|
3897
|
-
e.className = "wgt:flex wgt:justify-between wgt:items-center wgt:gap-4 wgt:flex-wrap", (E == null ? void 0 : E.length) > 0 && (E.forEach((
|
|
3899
|
+
e.className = "wgt:flex wgt:justify-between wgt:items-center wgt:gap-4 wgt:flex-wrap", (E == null ? void 0 : E.length) > 0 && (E.forEach((x) => {
|
|
3898
3900
|
const G = document.createElement("img");
|
|
3899
|
-
G.src =
|
|
3901
|
+
G.src = x, G.alt = "Logo", G.className = "wgt:w-14 wgt:object-contain", e.appendChild(G);
|
|
3900
3902
|
}), D.appendChild(e));
|
|
3901
3903
|
const f = document.createElement("div");
|
|
3902
3904
|
f.className = "wgt:flex wgt:justify-center wgt:w-[17.5rem] wgt:@max-2xl:w-[12.5rem] wgt:mx-auto";
|
|
3903
3905
|
const u = document.createElement("img");
|
|
3904
3906
|
u.src = g, u.alt = "QR code", u.className = "wgt:w-full wgt:w-full wgt:aspect-square wgt:object-contain", f.appendChild(u), D.appendChild(f);
|
|
3905
3907
|
const Y = document.createElement("div");
|
|
3906
|
-
Y.className = "wgt:flex wgt:justify-center wgt:items-center wgt:gap-4 wgt:flex-wrap", A.forEach((
|
|
3908
|
+
Y.className = "wgt:flex wgt:justify-center wgt:items-center wgt:gap-4 wgt:flex-wrap", A.forEach((x) => {
|
|
3907
3909
|
const G = document.createElement("img");
|
|
3908
|
-
G.src =
|
|
3910
|
+
G.src = x, G.alt = "Logo", G.className = `wgt:w-${I === "ocb" ? "28" : "8"} wgt:object-contain`, Y.appendChild(G);
|
|
3909
3911
|
}), D.appendChild(Y);
|
|
3910
|
-
const
|
|
3911
|
-
|
|
3912
|
+
const H = document.createElement("div");
|
|
3913
|
+
H.className = "wgt:text-center wgt:flex wgt:flex-col wgt:gap-1";
|
|
3912
3914
|
const l = document.createElement("h3");
|
|
3913
|
-
l.className = "wgt:text-lg wgt:font-bold wgt:text-text-black", l.innerText = B,
|
|
3915
|
+
l.className = "wgt:text-lg wgt:font-bold wgt:text-text-black", l.innerText = B, H.appendChild(l);
|
|
3914
3916
|
const P = document.createElement("p");
|
|
3915
3917
|
P.className = "wgt:text-sm wgt:text-grey-8", P.innerHTML = `${o(
|
|
3916
3918
|
"accountNumber"
|
|
3917
|
-
)}: <span class="wgt:font-medium">${C}</span>`,
|
|
3919
|
+
)}: <span class="wgt:font-medium">${C}</span>`, H.appendChild(P);
|
|
3918
3920
|
const q = document.createElement("p");
|
|
3919
3921
|
q.className = "wgt:text-sm wgt:text-grey-8", q.innerHTML = `${o(
|
|
3920
3922
|
"beneficiaryBank"
|
|
3921
|
-
)}: <span class="wgt:font-medium">${Q}</span>`,
|
|
3923
|
+
)}: <span class="wgt:font-medium">${Q}</span>`, H.appendChild(q), D.appendChild(H), c.appendChild(D), a.appendChild(c);
|
|
3922
3924
|
const J = document.createElement("div");
|
|
3923
3925
|
J.className = "wgt:flex wgt:flex-col wgt:justify-between wgt:@min-2xl:w-1/2";
|
|
3924
3926
|
const M = document.createElement("div"), m = document.createElement("h3");
|
|
3925
3927
|
m.className = "wgt:text-lg wgt:font-semibold wgt:text-gray-800 wgt:mb-4", m.innerText = o("paymentInstructionsTitle"), M.appendChild(m);
|
|
3926
3928
|
const i = document.createElement("ol");
|
|
3927
|
-
i.className = "wgt:space-y-4", t.forEach((
|
|
3929
|
+
i.className = "wgt:space-y-4", t.forEach((x, G) => {
|
|
3928
3930
|
const k = document.createElement("li");
|
|
3929
3931
|
k.className = "wgt:flex wgt:items-start";
|
|
3930
3932
|
const X = document.createElement("div");
|
|
@@ -3934,22 +3936,22 @@ function HE({
|
|
|
3934
3936
|
const j = document.createElement("span");
|
|
3935
3937
|
j.className = "wgt:text-white wgt:text-sm wgt:font-semibold", j.innerText = String(G + 1), U.appendChild(j), X.appendChild(U);
|
|
3936
3938
|
const F = document.createElement("p");
|
|
3937
|
-
F.className = "wgt:ml-3 wgt:text-text-sub-600", F.innerText =
|
|
3939
|
+
F.className = "wgt:ml-3 wgt:text-text-sub-600", F.innerText = x, k.appendChild(X), k.appendChild(F), i.appendChild(k);
|
|
3938
3940
|
}), M.appendChild(i), J.appendChild(M);
|
|
3939
3941
|
const v = document.createElement("div");
|
|
3940
3942
|
v.className = "wgt:h-[300px] wgt:flex wgt:justify-center";
|
|
3941
3943
|
const d = document.createElement("img");
|
|
3942
3944
|
return d.src = n, d.alt = "QR payment illustration", d.className = "wgt:h-full wgt:object-contain", v.appendChild(d), J.appendChild(v), a.appendChild(J), {
|
|
3943
3945
|
container: a,
|
|
3944
|
-
update(
|
|
3945
|
-
|
|
3946
|
+
update(x = {}) {
|
|
3947
|
+
x.qrSrc != null && (u.src = x.qrSrc), x.logos && (Y.innerHTML = "", x.logos.forEach((G) => {
|
|
3946
3948
|
const k = document.createElement("img");
|
|
3947
3949
|
k.src = G, k.alt = "Logo", k.className = "wgt:w-8 wgt:object-contain", Y.appendChild(k);
|
|
3948
|
-
})),
|
|
3950
|
+
})), x.accountName != null && (l.innerText = x.accountName), x.accountNumber != null && (P.innerHTML = `${o(
|
|
3949
3951
|
"accountNumber"
|
|
3950
|
-
)}: <span class="wgt:font-medium">${
|
|
3952
|
+
)}: <span class="wgt:font-medium">${x.accountNumber}</span>`), x.bankName != null && (q.innerHTML = `${o(
|
|
3951
3953
|
"beneficiaryBank"
|
|
3952
|
-
)}: <span class="wgt:font-medium">${
|
|
3954
|
+
)}: <span class="wgt:font-medium">${x.bankName}</span>`), x.instructions && (i.innerHTML = "", x.instructions.forEach((G, k) => {
|
|
3953
3955
|
const X = document.createElement("li");
|
|
3954
3956
|
X.className = "wgt:flex wgt:items-start";
|
|
3955
3957
|
const U = document.createElement("div");
|
|
@@ -3960,7 +3962,7 @@ function HE({
|
|
|
3960
3962
|
F.className = "wgt:text-white wgt:text-sm wgt:font-semibold", F.innerText = String(k + 1), j.appendChild(F), U.appendChild(j);
|
|
3961
3963
|
const w = document.createElement("p");
|
|
3962
3964
|
w.className = "wgt:ml-3 wgt:text-text-sub-600", w.innerText = G, X.appendChild(U), X.appendChild(w), i.appendChild(X);
|
|
3963
|
-
})),
|
|
3965
|
+
})), x.illustrationSrc != null && (d.src = x.illustrationSrc);
|
|
3964
3966
|
}
|
|
3965
3967
|
};
|
|
3966
3968
|
}
|
|
@@ -4050,28 +4052,28 @@ function dE({
|
|
|
4050
4052
|
"wgt:gap-10",
|
|
4051
4053
|
"wgt:shadow-[0px_2px_6px_0px_rgba(31,34,41,0.04)]"
|
|
4052
4054
|
].join(" ");
|
|
4053
|
-
const
|
|
4054
|
-
|
|
4055
|
+
const H = document.createElement("div");
|
|
4056
|
+
H.className = "wgt:w-full wgt:flex wgt:flex-col wgt:gap-4";
|
|
4055
4057
|
const l = document.createElement("h2");
|
|
4056
|
-
l.className = "wgt:text-xl wgt:font-semibold wgt:leading-6 wgt:text-black", l.innerText = o("orderInfo"),
|
|
4058
|
+
l.className = "wgt:text-xl wgt:font-semibold wgt:leading-6 wgt:text-black", l.innerText = o("orderInfo"), H.appendChild(l);
|
|
4057
4059
|
const P = document.createElement("div");
|
|
4058
4060
|
P.className = "wgt:w-full wgt:flex wgt:items-center wgt:justify-between";
|
|
4059
4061
|
const q = document.createElement("h4");
|
|
4060
4062
|
q.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", q.innerText = o("provider");
|
|
4061
4063
|
const J = document.createElement("img");
|
|
4062
|
-
g && g.logoUrl && (J.src = g.logoUrl, J.alt = g.name, J.className = "wgt:h-6 wgt:object-contain"), P.appendChild(q), P.appendChild(J),
|
|
4064
|
+
g && g.logoUrl && (J.src = g.logoUrl, J.alt = g.name, J.className = "wgt:h-6 wgt:object-contain"), P.appendChild(q), P.appendChild(J), H.appendChild(P);
|
|
4063
4065
|
const M = document.createElement("div");
|
|
4064
4066
|
M.className = "wgt:w-full wgt:flex wgt:items-center wgt:justify-between";
|
|
4065
4067
|
const m = document.createElement("h4");
|
|
4066
4068
|
m.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", m.innerText = o("subscriptionPackage");
|
|
4067
4069
|
const i = document.createElement("span");
|
|
4068
|
-
i.className = "wgt:text-base wgt:font-semibold wgt:leading-6 wgt:text-text-black", i.innerText = A ? `${String(A == null ? void 0 : A.code)}` : "", M.appendChild(m), M.appendChild(i),
|
|
4070
|
+
i.className = "wgt:text-base wgt:font-semibold wgt:leading-6 wgt:text-text-black", i.innerText = A ? `${String(A == null ? void 0 : A.code)}` : "", M.appendChild(m), M.appendChild(i), H.appendChild(M);
|
|
4069
4071
|
const v = document.createElement("div");
|
|
4070
4072
|
v.className = "wgt:w-full wgt:flex wgt:items-center wgt:justify-between";
|
|
4071
4073
|
const d = document.createElement("h4");
|
|
4072
4074
|
d.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", d.innerText = o("digitalSignaturePackage");
|
|
4073
|
-
const
|
|
4074
|
-
if (
|
|
4075
|
+
const x = document.createElement("span");
|
|
4076
|
+
if (x.className = "wgt:text-base wgt:font-semibold wgt:leading-6 wgt:text-text-black", x.innerText = E ? `${String(E == null ? void 0 : E.code)}` : "", v.appendChild(d), v.appendChild(x), H.appendChild(v), Q && Q.length > 0) {
|
|
4075
4077
|
const F = document.createElement("div");
|
|
4076
4078
|
F.className = "wgt:w-full wgt:flex wgt:items-start wgt:justify-between wgt:gap-[0.5rem]";
|
|
4077
4079
|
const w = document.createElement("h4");
|
|
@@ -4080,16 +4082,16 @@ function dE({
|
|
|
4080
4082
|
h.className = "wgt:flex wgt:items-center wgt:justify-end wgt:flex-wrap wgt:gap-2", Q.forEach((r) => {
|
|
4081
4083
|
const T = document.createElement("div");
|
|
4082
4084
|
T.className = "wgt:w-fit wgt:px-3 wgt:py-1 wgt:text-xs wgt:font-normal wgt:text-primary wgt:border wgt:border-primary", T.innerText = r, h.appendChild(T);
|
|
4083
|
-
}), F.appendChild(w), F.appendChild(h),
|
|
4085
|
+
}), F.appendChild(w), F.appendChild(h), H.appendChild(F);
|
|
4084
4086
|
}
|
|
4085
4087
|
const G = document.createElement("hr");
|
|
4086
|
-
|
|
4088
|
+
H.appendChild(G);
|
|
4087
4089
|
const k = document.createElement("div");
|
|
4088
4090
|
k.className = "wgt:w-full wgt:flex wgt:items-center wgt:justify-between";
|
|
4089
4091
|
const X = document.createElement("h4");
|
|
4090
4092
|
X.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", X.innerText = o("paymentAmount");
|
|
4091
4093
|
const U = document.createElement("span");
|
|
4092
|
-
U.className = "wgt:text-2xl wgt:font-bold wgt:leading-6 wgt:text-[#ED1C24]", U.innerText = typeof C == "number" ? C.toLocaleString("vi-VN") + " VND" : C, k.appendChild(X), k.appendChild(U),
|
|
4094
|
+
U.className = "wgt:text-2xl wgt:font-bold wgt:leading-6 wgt:text-[#ED1C24]", U.innerText = typeof C == "number" ? C.toLocaleString("vi-VN") + " VND" : C, k.appendChild(X), k.appendChild(U), H.appendChild(k), Y.appendChild(H);
|
|
4093
4095
|
const j = Eg({
|
|
4094
4096
|
title: o("cancelTransaction"),
|
|
4095
4097
|
className: "wgt:bg-transparent wgt:border wgt:border-primary wgt:text-primary wgt:hover:bg-transparent",
|
|
@@ -4989,7 +4991,7 @@ function zE() {
|
|
|
4989
4991
|
if (!Q.isValid(e))
|
|
4990
4992
|
throw new Error("Invalid QR Code version");
|
|
4991
4993
|
typeof u == "undefined" && (u = C.BYTE);
|
|
4992
|
-
const Y = A.getSymbolTotalCodewords(e),
|
|
4994
|
+
const Y = A.getSymbolTotalCodewords(e), H = E.getTotalCodewordsCount(e, f), l = (Y - H) * 8;
|
|
4993
4995
|
if (u === C.MIXED) return l;
|
|
4994
4996
|
const P = l - a(u, e);
|
|
4995
4997
|
switch (u) {
|
|
@@ -5194,8 +5196,8 @@ function UE() {
|
|
|
5194
5196
|
D.hasOwnProperty(c) && (e = D[c], f = s + e, u = t[c], Y = typeof t[c] == "undefined", (Y || u > f) && (t[c] = f, n.push(c, f), Q[c] = a));
|
|
5195
5197
|
}
|
|
5196
5198
|
if (typeof C != "undefined" && typeof t[C] == "undefined") {
|
|
5197
|
-
var
|
|
5198
|
-
throw new Error(
|
|
5199
|
+
var H = ["Could not find a path from ", B, " to ", C, "."].join("");
|
|
5200
|
+
throw new Error(H);
|
|
5199
5201
|
}
|
|
5200
5202
|
return Q;
|
|
5201
5203
|
},
|
|
@@ -5251,13 +5253,13 @@ var OC;
|
|
|
5251
5253
|
function SE() {
|
|
5252
5254
|
return OC || (OC = 1, function(g) {
|
|
5253
5255
|
const A = ig(), E = bE(), B = jE(), C = yE(), Q = KE(), t = BQ(), n = ug(), I = UE();
|
|
5254
|
-
function a(
|
|
5255
|
-
return unescape(encodeURIComponent(
|
|
5256
|
+
function a(H) {
|
|
5257
|
+
return unescape(encodeURIComponent(H)).length;
|
|
5256
5258
|
}
|
|
5257
|
-
function c(
|
|
5259
|
+
function c(H, l, P) {
|
|
5258
5260
|
const q = [];
|
|
5259
5261
|
let J;
|
|
5260
|
-
for (; (J =
|
|
5262
|
+
for (; (J = H.exec(P)) !== null; )
|
|
5261
5263
|
q.push({
|
|
5262
5264
|
data: J[0],
|
|
5263
5265
|
index: J.index,
|
|
@@ -5266,10 +5268,10 @@ function SE() {
|
|
|
5266
5268
|
});
|
|
5267
5269
|
return q;
|
|
5268
5270
|
}
|
|
5269
|
-
function s(
|
|
5270
|
-
const l = c(t.NUMERIC, A.NUMERIC,
|
|
5271
|
+
function s(H) {
|
|
5272
|
+
const l = c(t.NUMERIC, A.NUMERIC, H), P = c(t.ALPHANUMERIC, A.ALPHANUMERIC, H);
|
|
5271
5273
|
let q, J;
|
|
5272
|
-
return n.isKanjiModeEnabled() ? (q = c(t.BYTE, A.BYTE,
|
|
5274
|
+
return n.isKanjiModeEnabled() ? (q = c(t.BYTE, A.BYTE, H), J = c(t.KANJI, A.KANJI, H)) : (q = c(t.BYTE_KANJI, A.BYTE, H), J = []), l.concat(P, q, J).sort(function(m, i) {
|
|
5273
5275
|
return m.index - i.index;
|
|
5274
5276
|
}).map(function(m) {
|
|
5275
5277
|
return {
|
|
@@ -5279,28 +5281,28 @@ function SE() {
|
|
|
5279
5281
|
};
|
|
5280
5282
|
});
|
|
5281
5283
|
}
|
|
5282
|
-
function D(
|
|
5284
|
+
function D(H, l) {
|
|
5283
5285
|
switch (l) {
|
|
5284
5286
|
case A.NUMERIC:
|
|
5285
|
-
return E.getBitsLength(
|
|
5287
|
+
return E.getBitsLength(H);
|
|
5286
5288
|
case A.ALPHANUMERIC:
|
|
5287
|
-
return B.getBitsLength(
|
|
5289
|
+
return B.getBitsLength(H);
|
|
5288
5290
|
case A.KANJI:
|
|
5289
|
-
return Q.getBitsLength(
|
|
5291
|
+
return Q.getBitsLength(H);
|
|
5290
5292
|
case A.BYTE:
|
|
5291
|
-
return C.getBitsLength(
|
|
5293
|
+
return C.getBitsLength(H);
|
|
5292
5294
|
}
|
|
5293
5295
|
}
|
|
5294
|
-
function e(
|
|
5295
|
-
return
|
|
5296
|
+
function e(H) {
|
|
5297
|
+
return H.reduce(function(l, P) {
|
|
5296
5298
|
const q = l.length - 1 >= 0 ? l[l.length - 1] : null;
|
|
5297
5299
|
return q && q.mode === P.mode ? (l[l.length - 1].data += P.data, l) : (l.push(P), l);
|
|
5298
5300
|
}, []);
|
|
5299
5301
|
}
|
|
5300
|
-
function f(
|
|
5302
|
+
function f(H) {
|
|
5301
5303
|
const l = [];
|
|
5302
|
-
for (let P = 0; P <
|
|
5303
|
-
const q =
|
|
5304
|
+
for (let P = 0; P < H.length; P++) {
|
|
5305
|
+
const q = H[P];
|
|
5304
5306
|
switch (q.mode) {
|
|
5305
5307
|
case A.NUMERIC:
|
|
5306
5308
|
l.push([
|
|
@@ -5329,17 +5331,17 @@ function SE() {
|
|
|
5329
5331
|
}
|
|
5330
5332
|
return l;
|
|
5331
5333
|
}
|
|
5332
|
-
function u(
|
|
5334
|
+
function u(H, l) {
|
|
5333
5335
|
const P = {}, q = { start: {} };
|
|
5334
5336
|
let J = ["start"];
|
|
5335
|
-
for (let M = 0; M <
|
|
5336
|
-
const m =
|
|
5337
|
+
for (let M = 0; M < H.length; M++) {
|
|
5338
|
+
const m = H[M], i = [];
|
|
5337
5339
|
for (let v = 0; v < m.length; v++) {
|
|
5338
|
-
const d = m[v],
|
|
5339
|
-
i.push(
|
|
5340
|
+
const d = m[v], x = "" + M + v;
|
|
5341
|
+
i.push(x), P[x] = { node: d, lastCount: 0 }, q[x] = {};
|
|
5340
5342
|
for (let G = 0; G < J.length; G++) {
|
|
5341
5343
|
const k = J[G];
|
|
5342
|
-
P[k] && P[k].node.mode === d.mode ? (q[k][
|
|
5344
|
+
P[k] && P[k].node.mode === d.mode ? (q[k][x] = D(P[k].lastCount + d.length, d.mode) - D(P[k].lastCount, d.mode), P[k].lastCount += d.length) : (P[k] && (P[k].lastCount = d.length), q[k][x] = D(d.length, d.mode) + 4 + A.getCharCountIndicator(d.mode, l));
|
|
5343
5345
|
}
|
|
5344
5346
|
}
|
|
5345
5347
|
J = i;
|
|
@@ -5348,21 +5350,21 @@ function SE() {
|
|
|
5348
5350
|
q[J[M]].end = 0;
|
|
5349
5351
|
return { map: q, table: P };
|
|
5350
5352
|
}
|
|
5351
|
-
function Y(
|
|
5353
|
+
function Y(H, l) {
|
|
5352
5354
|
let P;
|
|
5353
|
-
const q = A.getBestModeForData(
|
|
5355
|
+
const q = A.getBestModeForData(H);
|
|
5354
5356
|
if (P = A.from(l, q), P !== A.BYTE && P.bit < q.bit)
|
|
5355
|
-
throw new Error('"' +
|
|
5357
|
+
throw new Error('"' + H + '" cannot be encoded with mode ' + A.toString(P) + `.
|
|
5356
5358
|
Suggested mode is: ` + A.toString(q));
|
|
5357
5359
|
switch (P === A.KANJI && !n.isKanjiModeEnabled() && (P = A.BYTE), P) {
|
|
5358
5360
|
case A.NUMERIC:
|
|
5359
|
-
return new E(
|
|
5361
|
+
return new E(H);
|
|
5360
5362
|
case A.ALPHANUMERIC:
|
|
5361
|
-
return new B(
|
|
5363
|
+
return new B(H);
|
|
5362
5364
|
case A.KANJI:
|
|
5363
|
-
return new Q(
|
|
5365
|
+
return new Q(H);
|
|
5364
5366
|
case A.BYTE:
|
|
5365
|
-
return new C(
|
|
5367
|
+
return new C(H);
|
|
5366
5368
|
}
|
|
5367
5369
|
}
|
|
5368
5370
|
g.fromArray = function(l) {
|
|
@@ -5389,11 +5391,11 @@ function pE() {
|
|
|
5389
5391
|
function e(M, m) {
|
|
5390
5392
|
const i = M.size, v = Q.getPositions(m);
|
|
5391
5393
|
for (let d = 0; d < v.length; d++) {
|
|
5392
|
-
const
|
|
5394
|
+
const x = v[d][0], G = v[d][1];
|
|
5393
5395
|
for (let k = -1; k <= 7; k++)
|
|
5394
|
-
if (!(
|
|
5396
|
+
if (!(x + k <= -1 || i <= x + k))
|
|
5395
5397
|
for (let X = -1; X <= 7; X++)
|
|
5396
|
-
G + X <= -1 || i <= G + X || (k >= 0 && k <= 6 && (X === 0 || X === 6) || X >= 0 && X <= 6 && (k === 0 || k === 6) || k >= 2 && k <= 4 && X >= 2 && X <= 4 ? M.set(
|
|
5398
|
+
G + X <= -1 || i <= G + X || (k >= 0 && k <= 6 && (X === 0 || X === 6) || X >= 0 && X <= 6 && (k === 0 || k === 6) || k >= 2 && k <= 4 && X >= 2 && X <= 4 ? M.set(x + k, G + X, !0, !0) : M.set(x + k, G + X, !1, !0));
|
|
5397
5399
|
}
|
|
5398
5400
|
}
|
|
5399
5401
|
function f(M) {
|
|
@@ -5406,34 +5408,34 @@ function pE() {
|
|
|
5406
5408
|
function u(M, m) {
|
|
5407
5409
|
const i = C.getPositions(m);
|
|
5408
5410
|
for (let v = 0; v < i.length; v++) {
|
|
5409
|
-
const d = i[v][0],
|
|
5411
|
+
const d = i[v][0], x = i[v][1];
|
|
5410
5412
|
for (let G = -2; G <= 2; G++)
|
|
5411
5413
|
for (let k = -2; k <= 2; k++)
|
|
5412
|
-
G === -2 || G === 2 || k === -2 || k === 2 || G === 0 && k === 0 ? M.set(d + G,
|
|
5414
|
+
G === -2 || G === 2 || k === -2 || k === 2 || G === 0 && k === 0 ? M.set(d + G, x + k, !0, !0) : M.set(d + G, x + k, !1, !0);
|
|
5413
5415
|
}
|
|
5414
5416
|
}
|
|
5415
5417
|
function Y(M, m) {
|
|
5416
5418
|
const i = M.size, v = a.getEncodedBits(m);
|
|
5417
|
-
let d,
|
|
5419
|
+
let d, x, G;
|
|
5418
5420
|
for (let k = 0; k < 18; k++)
|
|
5419
|
-
d = Math.floor(k / 3),
|
|
5421
|
+
d = Math.floor(k / 3), x = k % 3 + i - 8 - 3, G = (v >> k & 1) === 1, M.set(d, x, G, !0), M.set(x, d, G, !0);
|
|
5420
5422
|
}
|
|
5421
|
-
function
|
|
5423
|
+
function H(M, m, i) {
|
|
5422
5424
|
const v = M.size, d = c.getEncodedBits(m, i);
|
|
5423
|
-
let
|
|
5424
|
-
for (
|
|
5425
|
-
G = (d >>
|
|
5425
|
+
let x, G;
|
|
5426
|
+
for (x = 0; x < 15; x++)
|
|
5427
|
+
G = (d >> x & 1) === 1, x < 6 ? M.set(x, 8, G, !0) : x < 8 ? M.set(x + 1, 8, G, !0) : M.set(v - 15 + x, 8, G, !0), x < 8 ? M.set(8, v - x - 1, G, !0) : x < 9 ? M.set(8, 15 - x - 1 + 1, G, !0) : M.set(8, 15 - x - 1, G, !0);
|
|
5426
5428
|
M.set(v - 8, 8, 1, !0);
|
|
5427
5429
|
}
|
|
5428
5430
|
function l(M, m) {
|
|
5429
5431
|
const i = M.size;
|
|
5430
|
-
let v = -1, d = i - 1,
|
|
5432
|
+
let v = -1, d = i - 1, x = 7, G = 0;
|
|
5431
5433
|
for (let k = i - 1; k > 0; k -= 2)
|
|
5432
5434
|
for (k === 6 && k--; ; ) {
|
|
5433
5435
|
for (let X = 0; X < 2; X++)
|
|
5434
5436
|
if (!M.isReserved(d, k - X)) {
|
|
5435
5437
|
let U = !1;
|
|
5436
|
-
G < m.length && (U = (m[G] >>>
|
|
5438
|
+
G < m.length && (U = (m[G] >>> x & 1) === 1), M.set(d, k - X, U), x--, x === -1 && (G++, x = 7);
|
|
5437
5439
|
}
|
|
5438
5440
|
if (d += v, d < 0 || i <= d) {
|
|
5439
5441
|
d -= v, v = -v;
|
|
@@ -5446,7 +5448,7 @@ function pE() {
|
|
|
5446
5448
|
i.forEach(function(X) {
|
|
5447
5449
|
v.put(X.mode.bit, 4), v.put(X.getLength(), s.getCharCountIndicator(X.mode, M)), X.write(v);
|
|
5448
5450
|
});
|
|
5449
|
-
const d = g.getSymbolTotalCodewords(M),
|
|
5451
|
+
const d = g.getSymbolTotalCodewords(M), x = n.getTotalCodewordsCount(M, m), G = (d - x) * 8;
|
|
5450
5452
|
for (v.getLengthInBits() + 4 <= G && v.put(0, 4); v.getLengthInBits() % 8 !== 0; )
|
|
5451
5453
|
v.putBit(0);
|
|
5452
5454
|
const k = (G - v.getLengthInBits()) / 8;
|
|
@@ -5455,7 +5457,7 @@ function pE() {
|
|
|
5455
5457
|
return q(v, M, m);
|
|
5456
5458
|
}
|
|
5457
5459
|
function q(M, m, i) {
|
|
5458
|
-
const v = g.getSymbolTotalCodewords(m), d = n.getTotalCodewordsCount(m, i),
|
|
5460
|
+
const v = g.getSymbolTotalCodewords(m), d = n.getTotalCodewordsCount(m, i), x = v - d, G = n.getBlocksCount(m, i), k = v % G, X = G - k, U = Math.floor(v / G), j = Math.floor(x / G), F = j + 1, w = U - j, h = new I(w);
|
|
5459
5461
|
let r = 0;
|
|
5460
5462
|
const T = new Array(G), N = new Array(G);
|
|
5461
5463
|
let L = 0;
|
|
@@ -5487,23 +5489,23 @@ function pE() {
|
|
|
5487
5489
|
d = D.fromString(M, U || 40);
|
|
5488
5490
|
} else
|
|
5489
5491
|
throw new Error("Invalid data");
|
|
5490
|
-
const
|
|
5491
|
-
if (!
|
|
5492
|
+
const x = a.getBestVersionForData(d, i);
|
|
5493
|
+
if (!x)
|
|
5492
5494
|
throw new Error("The amount of data is too big to be stored in a QR Code");
|
|
5493
5495
|
if (!m)
|
|
5494
|
-
m =
|
|
5495
|
-
else if (m <
|
|
5496
|
+
m = x;
|
|
5497
|
+
else if (m < x)
|
|
5496
5498
|
throw new Error(
|
|
5497
5499
|
`
|
|
5498
5500
|
The chosen QR Code version cannot contain this amount of data.
|
|
5499
|
-
Minimum version required to store current data is: ` +
|
|
5501
|
+
Minimum version required to store current data is: ` + x + `.
|
|
5500
5502
|
`
|
|
5501
5503
|
);
|
|
5502
5504
|
const G = P(m, i, d), k = g.getSymbolSize(m), X = new B(k);
|
|
5503
|
-
return e(X, m), f(X), u(X, m),
|
|
5505
|
+
return e(X, m), f(X), u(X, m), H(X, i, 0), m >= 7 && Y(X, m), l(X, G), isNaN(v) && (v = t.getBestMask(
|
|
5504
5506
|
X,
|
|
5505
|
-
|
|
5506
|
-
)), t.applyMask(v, X),
|
|
5507
|
+
H.bind(null, X, i)
|
|
5508
|
+
)), t.applyMask(v, X), H(X, i, v), {
|
|
5507
5509
|
modules: X,
|
|
5508
5510
|
version: m,
|
|
5509
5511
|
errorCorrectionLevel: i,
|
|
@@ -5514,8 +5516,8 @@ Minimum version required to store current data is: ` + H + `.
|
|
|
5514
5516
|
return pg.create = function(m, i) {
|
|
5515
5517
|
if (typeof m == "undefined" || m === "")
|
|
5516
5518
|
throw new Error("No input text");
|
|
5517
|
-
let v = A.M, d,
|
|
5518
|
-
return typeof i != "undefined" && (v = A.from(i.errorCorrectionLevel, A.M), d = a.from(i.version),
|
|
5519
|
+
let v = A.M, d, x;
|
|
5520
|
+
return typeof i != "undefined" && (v = A.from(i.errorCorrectionLevel, A.M), d = a.from(i.version), x = t.from(i.maskPattern), i.toSJISFunc && g.setToSJISFunction(i.toSJISFunc)), J(m, d, v, x);
|
|
5519
5521
|
}, pg;
|
|
5520
5522
|
}
|
|
5521
5523
|
var aB = {}, oB = {}, LC;
|
|
@@ -5564,8 +5566,8 @@ function CQ() {
|
|
|
5564
5566
|
for (let e = 0; e < a; e++) {
|
|
5565
5567
|
let f = (D * a + e) * 4, u = Q.color.light;
|
|
5566
5568
|
if (D >= c && e >= c && D < a - c && e < a - c) {
|
|
5567
|
-
const Y = Math.floor((D - c) / I),
|
|
5568
|
-
u = s[n[Y * t +
|
|
5569
|
+
const Y = Math.floor((D - c) / I), H = Math.floor((e - c) / I);
|
|
5570
|
+
u = s[n[Y * t + H] ? 1 : 0];
|
|
5569
5571
|
}
|
|
5570
5572
|
B[f++] = u.r, B[f++] = u.g, B[f++] = u.b, B[f] = u.a;
|
|
5571
5573
|
}
|
|
@@ -5680,7 +5682,7 @@ function gI(n) {
|
|
|
5680
5682
|
const {
|
|
5681
5683
|
container: u,
|
|
5682
5684
|
open: Y,
|
|
5683
|
-
close:
|
|
5685
|
+
close: H
|
|
5684
5686
|
} = qB();
|
|
5685
5687
|
f.appendChild(u);
|
|
5686
5688
|
const l = document.createElement("div");
|
|
@@ -5706,7 +5708,7 @@ function gI(n) {
|
|
|
5706
5708
|
l.appendChild(i), f.appendChild(l);
|
|
5707
5709
|
const d = document.createElement("div");
|
|
5708
5710
|
d.className = "wgt:flex wgt:items-center wgt:justify-between wgt:gap-2";
|
|
5709
|
-
const
|
|
5711
|
+
const x = Eg({
|
|
5710
5712
|
type: "button",
|
|
5711
5713
|
title: o("back"),
|
|
5712
5714
|
className: "wgt:bg-transparent wgt:!text-primary wgt:hover:bg-transparent wgt:underline",
|
|
@@ -5714,7 +5716,7 @@ function gI(n) {
|
|
|
5714
5716
|
A && (clearInterval(c), c = null, A());
|
|
5715
5717
|
}
|
|
5716
5718
|
});
|
|
5717
|
-
d.appendChild(
|
|
5719
|
+
d.appendChild(x), f.appendChild(d);
|
|
5718
5720
|
function G() {
|
|
5719
5721
|
return W(this, null, function* () {
|
|
5720
5722
|
const { registrationData: F } = C, r = F.eInvoiceRegistration, { isUsedEInvoiceBefore: w } = r, h = yg(r, ["isUsedEInvoiceBefore"]);
|
|
@@ -5737,7 +5739,7 @@ function gI(n) {
|
|
|
5737
5739
|
console.error("Error creating order:", T), ag(o("errorCreatingOrder") || "Failed to create order");
|
|
5738
5740
|
return;
|
|
5739
5741
|
} finally {
|
|
5740
|
-
|
|
5742
|
+
H();
|
|
5741
5743
|
}
|
|
5742
5744
|
});
|
|
5743
5745
|
}
|
|
@@ -5802,7 +5804,7 @@ function gI(n) {
|
|
|
5802
5804
|
}
|
|
5803
5805
|
);
|
|
5804
5806
|
} finally {
|
|
5805
|
-
|
|
5807
|
+
H(), D = !1;
|
|
5806
5808
|
}
|
|
5807
5809
|
});
|
|
5808
5810
|
}
|
|
@@ -5893,8 +5895,8 @@ function BI({
|
|
|
5893
5895
|
u.className = "wgt:text-sm wgt:leading-relaxed wgt:text-strong-950", u.innerText = o("notice2"), f.appendChild(u);
|
|
5894
5896
|
const Y = document.createElement("div");
|
|
5895
5897
|
Y.className = "wgt:w-full wgt:flex wgt:flex-col wgt:gap-2 wgt:rounded-lg wgt:bg-weak-50 wgt:px-4 wgt:py-3", f.appendChild(Y);
|
|
5896
|
-
const
|
|
5897
|
-
|
|
5898
|
+
const H = document.createElement("div");
|
|
5899
|
+
H.className = "wgt:flex wgt:items-center wgt:gap-2 wgt:text-sm wgt:text-strong-950", Y.appendChild(H);
|
|
5898
5900
|
const l = document.createElement("div");
|
|
5899
5901
|
l.innerHTML = `
|
|
5900
5902
|
<svg
|
|
@@ -5914,9 +5916,9 @@ function BI({
|
|
|
5914
5916
|
stroke-linejoin="round"
|
|
5915
5917
|
/>
|
|
5916
5918
|
</svg>
|
|
5917
|
-
`,
|
|
5919
|
+
`, H.appendChild(l);
|
|
5918
5920
|
const P = iQ(rB(), B, Q), q = document.createElement("span");
|
|
5919
|
-
q.innerHTML = `${o("hotlineDomestic")} <b>${(P == null ? void 0 : P.hotline) || ""}</b> ${o("hotlineDesc")} `,
|
|
5921
|
+
q.innerHTML = `${o("hotlineDomestic")} <b>${(P == null ? void 0 : P.hotline) || ""}</b> ${o("hotlineDesc")} `, H.appendChild(q);
|
|
5920
5922
|
const J = document.createElement("div");
|
|
5921
5923
|
J.className = "wgt:flex wgt:items-center wgt:gap-2 wgt:text-sm wgt:text-strong-950", Y.appendChild(J);
|
|
5922
5924
|
const M = document.createElement("div");
|
|
@@ -5956,14 +5958,14 @@ function BI({
|
|
|
5956
5958
|
`, i.appendChild(v), i.appendChild(document.createTextNode(o("website") + ": "));
|
|
5957
5959
|
const d = document.createElement("a");
|
|
5958
5960
|
d.className = "wgt:text-strong-950 wgt:hover:underline wgt:cursor-pointer", d.innerHTML = `<b>${(P == null ? void 0 : P.link) || ""}</b>`, d.href = (P == null ? void 0 : P.link) || "#", d.target = "_blank", i.appendChild(d);
|
|
5959
|
-
const
|
|
5960
|
-
|
|
5961
|
+
const x = document.createElement("div");
|
|
5962
|
+
x.className = "wgt:flex wgt:items-center wgt:gap-4", n.appendChild(x);
|
|
5961
5963
|
const G = document.createElement("div");
|
|
5962
|
-
G.className = "wgt:flex wgt:h-8 wgt:w-8 wgt:shrink-0 wgt:items-center wgt:justify-center wgt:rounded-full wgt:bg-primary wgt:text-xs wgt:font-semibold wgt:text-white", G.innerText = "3",
|
|
5964
|
+
G.className = "wgt:flex wgt:h-8 wgt:w-8 wgt:shrink-0 wgt:items-center wgt:justify-center wgt:rounded-full wgt:bg-primary wgt:text-xs wgt:font-semibold wgt:text-white", G.innerText = "3", x.appendChild(G);
|
|
5963
5965
|
const k = document.createElement("p");
|
|
5964
5966
|
k.className = "wgt:text-sm wgt:leading-relaxed wgt:text-strong-950", k.appendChild(document.createTextNode(o("notice3.1") + " "));
|
|
5965
5967
|
const X = document.createElement("a");
|
|
5966
|
-
X.className = "wgt:text-primary wgt:font-semibold wgt:hover:underline wgt:cursor-pointer", X.textContent = o("settings") + " ", X.href = C, X.target = "_blank", k.appendChild(X), k.appendChild(document.createTextNode(o("notice3.2") + " ")),
|
|
5968
|
+
X.className = "wgt:text-primary wgt:font-semibold wgt:hover:underline wgt:cursor-pointer", X.textContent = o("settings") + " ", X.href = C, X.target = "_blank", k.appendChild(X), k.appendChild(document.createTextNode(o("notice3.2") + " ")), x.appendChild(k);
|
|
5967
5969
|
const U = document.createElement("div");
|
|
5968
5970
|
U.className = "wgt:flex wgt:items-center wgt:justify-center wgt:gap-2 wgt:py-3 wgt:px-5 wgt:bg-primary/15 wgt:rounded-[10px] wgt:w-fit wgt:mx-auto", n.appendChild(U);
|
|
5969
5971
|
const j = document.createElement("div");
|
|
@@ -6199,12 +6201,12 @@ function DI(g, A, E, B, C, Q) {
|
|
|
6199
6201
|
idCardBack: null,
|
|
6200
6202
|
packages: [],
|
|
6201
6203
|
promotionCodes: []
|
|
6202
|
-
}, Y = !0,
|
|
6204
|
+
}, Y = !0, H = !Q, l = null, P = null, q = null, J = null, M = 0, m = null, i = null, v = null, d = {
|
|
6203
6205
|
qtyRegFee: 1,
|
|
6204
6206
|
qtyInvoicePkg: 1,
|
|
6205
6207
|
qtySignaturePkg: 1
|
|
6206
6208
|
};
|
|
6207
|
-
function
|
|
6209
|
+
function x() {
|
|
6208
6210
|
f = n[0], u = {
|
|
6209
6211
|
eInvoiceRegistration: {
|
|
6210
6212
|
taxAuthorityCode: "",
|
|
@@ -6293,7 +6295,7 @@ function DI(g, A, E, B, C, Q) {
|
|
|
6293
6295
|
});
|
|
6294
6296
|
}
|
|
6295
6297
|
function k() {
|
|
6296
|
-
|
|
6298
|
+
x(), e = 1, s(e, I()), j(e);
|
|
6297
6299
|
}
|
|
6298
6300
|
function X() {
|
|
6299
6301
|
typeof window != "undefined" && window.scrollTo({
|
|
@@ -6328,7 +6330,7 @@ function DI(g, A, E, B, C, Q) {
|
|
|
6328
6330
|
y.route,
|
|
6329
6331
|
(S = (AA = u == null ? void 0 : u.eInvoiceRegistration) == null ? void 0 : AA.organization) == null ? void 0 : S.taxCode,
|
|
6330
6332
|
(EA, nA) => {
|
|
6331
|
-
|
|
6333
|
+
H = EA, U(nA);
|
|
6332
6334
|
},
|
|
6333
6335
|
Q
|
|
6334
6336
|
);
|
|
@@ -6351,7 +6353,7 @@ function DI(g, A, E, B, C, Q) {
|
|
|
6351
6353
|
// ...data.eInvoiceRegistration,
|
|
6352
6354
|
// };
|
|
6353
6355
|
formProps: {
|
|
6354
|
-
isNewCustomer:
|
|
6356
|
+
isNewCustomer: H,
|
|
6355
6357
|
handleCheckNewCustomer: uB,
|
|
6356
6358
|
updateRegistrationData: U,
|
|
6357
6359
|
serial: (B == null ? void 0 : B.serial) || "",
|
|
@@ -6412,7 +6414,7 @@ function DI(g, A, E, B, C, Q) {
|
|
|
6412
6414
|
theme: C,
|
|
6413
6415
|
selectedProvider: f,
|
|
6414
6416
|
registrationData: u,
|
|
6415
|
-
isNewCustomer:
|
|
6417
|
+
isNewCustomer: H,
|
|
6416
6418
|
savedQuantities: d,
|
|
6417
6419
|
setSavedQuantities: (y) => {
|
|
6418
6420
|
d = y;
|
|
@@ -6470,14 +6472,14 @@ function DI(g, A, E, B, C, Q) {
|
|
|
6470
6472
|
});
|
|
6471
6473
|
}
|
|
6472
6474
|
a.updateTitle(
|
|
6473
|
-
|
|
6475
|
+
H ? o("eInvoiceRegister") : o("eInvoiceRenewal")
|
|
6474
6476
|
);
|
|
6475
6477
|
const { container: F, open: w } = qB();
|
|
6476
6478
|
Y && (D(F), w()), yield uB(
|
|
6477
6479
|
f.route,
|
|
6478
6480
|
(N = (T = u == null ? void 0 : u.eInvoiceRegistration) == null ? void 0 : T.organization) == null ? void 0 : N.taxCode,
|
|
6479
6481
|
(L, b) => W(null, null, function* () {
|
|
6480
|
-
Y = !1,
|
|
6482
|
+
Y = !1, H = L, U(b);
|
|
6481
6483
|
}),
|
|
6482
6484
|
Q
|
|
6483
6485
|
);
|