@invoice-sdk/widget 1.94.0 → 1.94.1
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 Z = (g, A, E) => new Promise((C, B) => {
|
|
|
35
35
|
}, n = (I) => I.done ? C(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 iB, a as nQ, b as tQ, C as hQ, G as cQ, c as wQ, d as sB, e as wg, f as eQ, h as aQ, i as Gg, O as UC, s as cg, j as fB, k as oQ, l as DQ, m as uQ, n as iQ, o as sQ, p as fQ, v as mQ } from "./index-
|
|
38
|
+
import { t as o, g as iB, a as nQ, b as tQ, C as hQ, G as cQ, c as wQ, d as sB, e as wg, f as eQ, h as aQ, i as Gg, O as UC, s as cg, j as fB, k as oQ, l as DQ, m as uQ, n as iQ, o as sQ, p as fQ, v as mQ } from "./index-Zc_B_gEP.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 PQ({
|
|
|
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 = w.name, c.appendChild(f), c.appendChild(u), c.appendChild(Y);
|
|
305
|
-
const { container:
|
|
305
|
+
const { container: T } = Lg({
|
|
306
306
|
checked: r,
|
|
307
307
|
onChange: (k) => {
|
|
308
308
|
k && (A = w.route, typeof E == "function" && E(w), t());
|
|
309
309
|
},
|
|
310
310
|
disabled: !1
|
|
311
311
|
});
|
|
312
|
-
D.appendChild(c), D.appendChild(
|
|
312
|
+
D.appendChild(c), D.appendChild(T), Q.appendChild(D);
|
|
313
313
|
});
|
|
314
314
|
}
|
|
315
315
|
t();
|
|
@@ -432,9 +432,9 @@ function jg({
|
|
|
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, T = null, k = [...E];
|
|
436
436
|
const q = () => {
|
|
437
|
-
const i = E.find((s) => s.id ? s.id ===
|
|
437
|
+
const i = E.find((s) => s.id ? s.id === T : s.value === Y);
|
|
438
438
|
return i ? i.label : "";
|
|
439
439
|
};
|
|
440
440
|
c.value = q();
|
|
@@ -452,9 +452,9 @@ function jg({
|
|
|
452
452
|
"wgt:cursor-pointer",
|
|
453
453
|
"wgt:hover:bg-gray-100",
|
|
454
454
|
"wgt:text-sm",
|
|
455
|
-
s.id ?
|
|
455
|
+
s.id ? T === s.id ? "wgt:bg-blue-50 wgt:text-blue-700" : "" : Y === s.value ? "wgt:bg-blue-50 wgt:text-blue-700" : ""
|
|
456
456
|
].filter(Boolean).join(" "), M.innerText = s.label, M.dataset.value = s.value, M.addEventListener("click", () => {
|
|
457
|
-
if (s.id && (
|
|
457
|
+
if (s.id && (T = s.id), Y = s.value, c.value = s.label, f.classList.add("wgt:hidden"), typeof t == "function") {
|
|
458
458
|
const J = { target: { value: s.value } };
|
|
459
459
|
s.id && (J.target.id = s.id), t(J);
|
|
460
460
|
}
|
|
@@ -489,7 +489,7 @@ function jg({
|
|
|
489
489
|
return Y;
|
|
490
490
|
},
|
|
491
491
|
setValue(i, s, M) {
|
|
492
|
-
|
|
492
|
+
T = M || null, Y = i || "";
|
|
493
493
|
const J = E.find((F) => F.id ? F.id === M : F.value === i);
|
|
494
494
|
J ? (c.value = J.label, x.value = i, P()) : (c.value = s || "", x.value = i || "", P());
|
|
495
495
|
},
|
|
@@ -542,8 +542,8 @@ function jg({
|
|
|
542
542
|
for (; D.options.length > 1; )
|
|
543
543
|
D.remove(1);
|
|
544
544
|
u.forEach((Y) => {
|
|
545
|
-
const
|
|
546
|
-
|
|
545
|
+
const T = document.createElement("option");
|
|
546
|
+
T.value = Y.value, T.innerText = Y.label, D.appendChild(T);
|
|
547
547
|
});
|
|
548
548
|
},
|
|
549
549
|
setDisabled(u) {
|
|
@@ -634,13 +634,13 @@ function hC({
|
|
|
634
634
|
const x = 1024, v = Math.max(0, P), i = ["Bytes", "KB", "MB", "GB", "TB"], s = Math.floor(Math.log(q) / Math.log(x));
|
|
635
635
|
return parseFloat((q / Math.pow(x, s)).toFixed(v)) + " " + i[s];
|
|
636
636
|
}
|
|
637
|
-
function
|
|
637
|
+
function T(q) {
|
|
638
638
|
const P = q.type.toLowerCase(), x = "." + q.name.split(".").pop().toLowerCase();
|
|
639
639
|
return w.accept.split(",").map((i) => i.trim().toLowerCase()).filter(Boolean).some((i) => i.startsWith(".") ? i === x : i.endsWith("/*") ? P.startsWith(i.replace("/*", "")) : P === i);
|
|
640
640
|
}
|
|
641
641
|
function k(q) {
|
|
642
642
|
if (r.innerHTML = "", f(null), q) {
|
|
643
|
-
|
|
643
|
+
T(q) || f(`File không hợp lệ. Chỉ chấp nhận: ${w.accept}`), q.size <= 500 * 1024 || f("Dung lượng file vượt quá 500KB.");
|
|
644
644
|
const x = document.createElement("div");
|
|
645
645
|
if (x.className = "wgt:flex wgt:items-center wgt:gap-4", x.addEventListener("click", () => {
|
|
646
646
|
w.click();
|
|
@@ -769,7 +769,7 @@ function cC({
|
|
|
769
769
|
f = P, P ? (c.innerText = P, c.style.display = "block", typeof B == "function" && B(P)) : (c.innerText = "", c.style.display = "none", typeof B == "function" && B(null));
|
|
770
770
|
}
|
|
771
771
|
let Y = g || null;
|
|
772
|
-
function
|
|
772
|
+
function T(P, x = 2) {
|
|
773
773
|
if (P === 0) return "0 Bytes";
|
|
774
774
|
const v = 1024, i = Math.max(0, x), s = ["Bytes", "KB", "MB", "GB", "TB"], M = Math.floor(Math.log(P) / Math.log(v));
|
|
775
775
|
return parseFloat((P / Math.pow(v, M)).toFixed(i)) + " " + s[M];
|
|
@@ -790,7 +790,7 @@ function cC({
|
|
|
790
790
|
const M = document.createElement("p");
|
|
791
791
|
M.className = "wgt:text-sm wgt:font-medium wgt:text-gray-800", M.innerText = P.name;
|
|
792
792
|
const J = document.createElement("p");
|
|
793
|
-
J.className = "wgt:text-sm wgt:text-gray-500", J.innerText =
|
|
793
|
+
J.className = "wgt:text-sm wgt:text-gray-500", J.innerText = T(P.size), s.appendChild(M), s.appendChild(J), i.appendChild(s), n.appendChild(i), typeof C == "function" && C(null, P);
|
|
794
794
|
}
|
|
795
795
|
}
|
|
796
796
|
function q(P) {
|
|
@@ -893,17 +893,17 @@ const lQ = ({
|
|
|
893
893
|
B.forEach((m) => {
|
|
894
894
|
u.append(new Option(Y[m], m));
|
|
895
895
|
}), D.appendChild(u), w.append(D);
|
|
896
|
-
const
|
|
897
|
-
|
|
896
|
+
const T = document.createElement("div");
|
|
897
|
+
T.className = "wgt:w-full wgt:flex wgt:flex-col wgt:items-start wgt:space-y-2";
|
|
898
898
|
const k = document.createElement("span");
|
|
899
899
|
k.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", k.textContent = o("codeType");
|
|
900
900
|
const q = document.createElement("span");
|
|
901
|
-
q.className = "wgt:text-red-500 wgt:ml-1", q.innerText = "*", k.appendChild(q),
|
|
901
|
+
q.className = "wgt:text-red-500 wgt:ml-1", q.innerText = "*", k.appendChild(q), T.appendChild(k);
|
|
902
902
|
const P = document.createElement("select");
|
|
903
903
|
P.className = `${r} wgt:@max-2xl:w-full wgt:w-40`, P.title = o("codeTypeTooltip", "C: Có mã CQT, K: Không mã"), Q.forEach((m) => {
|
|
904
904
|
const H = m === "C" ? o("codeTypeC", "C (Có mã CQT)") : o("codeTypeK", "K (Không mã)");
|
|
905
905
|
P.append(new Option(H, m));
|
|
906
|
-
}),
|
|
906
|
+
}), T.appendChild(P), w.append(T);
|
|
907
907
|
const x = document.createElement("div");
|
|
908
908
|
x.className = "wgt:w-full wgt:flex wgt:flex-col wgt:items-start wgt:space-y-2";
|
|
909
909
|
const v = document.createElement("span");
|
|
@@ -920,7 +920,7 @@ const lQ = ({
|
|
|
920
920
|
F.className = "wgt:text-red-500 wgt:ml-1", F.innerText = "*", J.appendChild(F), M.appendChild(J);
|
|
921
921
|
const X = document.createElement("select");
|
|
922
922
|
X.className = `${r} wgt:@max-2xl:w-full wgt:w-40`, X.title = o("invoiceTypeTooltip", "Loại hóa đơn");
|
|
923
|
-
const
|
|
923
|
+
const l = {
|
|
924
924
|
T: o("invoiceTypeT", "T (Đăng ký)"),
|
|
925
925
|
D: o("invoiceTypeD", "D (Tài sản)"),
|
|
926
926
|
L: o("invoiceTypeL", "L (CQT)"),
|
|
@@ -932,7 +932,7 @@ const lQ = ({
|
|
|
932
932
|
X: o("invoiceTypeX", "X (Thương mại)")
|
|
933
933
|
};
|
|
934
934
|
t.forEach((m) => {
|
|
935
|
-
X.append(new Option(
|
|
935
|
+
X.append(new Option(l[m], m));
|
|
936
936
|
}), M.appendChild(X), w.append(M);
|
|
937
937
|
const G = document.createElement("div");
|
|
938
938
|
G.className = "wgt:w-full wgt:flex wgt:flex-col wgt:items-start wgt:space-y-2";
|
|
@@ -1057,7 +1057,7 @@ function YQ() {
|
|
|
1057
1057
|
return h === 0 || h === 6;
|
|
1058
1058
|
}, Y = function(e) {
|
|
1059
1059
|
return e % 4 === 0 && e % 100 !== 0 || e % 400 === 0;
|
|
1060
|
-
},
|
|
1060
|
+
}, T = function(e, h) {
|
|
1061
1061
|
return [31, Y(e) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][h];
|
|
1062
1062
|
}, k = function(e) {
|
|
1063
1063
|
f(e) && e.setHours(0, 0, 0, 0);
|
|
@@ -1182,7 +1182,7 @@ function YQ() {
|
|
|
1182
1182
|
return '<td class="pika-week">' + b + "</td>";
|
|
1183
1183
|
}, X = function(e, h, m, H) {
|
|
1184
1184
|
return '<tr class="pika-row' + (m ? " pick-whole-week" : "") + (H ? " is-selected" : "") + '">' + (h ? e.reverse() : e).join("") + "</tr>";
|
|
1185
|
-
},
|
|
1185
|
+
}, l = function(e) {
|
|
1186
1186
|
return "<tbody>" + e.join("") + "</tbody>";
|
|
1187
1187
|
}, G = function(e) {
|
|
1188
1188
|
var h, m = [];
|
|
@@ -1197,7 +1197,7 @@ function YQ() {
|
|
|
1197
1197
|
N >= U.minYear && W.push('<option value="' + N + '"' + (N === m ? ' selected="selected"' : "") + ">" + N + "</option>");
|
|
1198
1198
|
return XA = '<div class="pika-label">' + m + U.yearSuffix + '<select class="pika-select pika-select-year" tabindex="-1">' + W.join("") + "</select></div>", U.showMonthAfterYear ? iA += XA + MA : iA += MA + XA, nA && (H === 0 || U.minMonth >= H) && (TA = !1), hA && (H === 11 || U.maxMonth <= H) && (qA = !1), h === 0 && (iA += '<button class="pika-prev' + (TA ? "" : " is-disabled") + '" type="button">' + U.i18n.previousMonth + "</button>"), h === e._o.numberOfMonths - 1 && (iA += '<button class="pika-next' + (qA ? "" : " is-disabled") + '" type="button">' + U.i18n.nextMonth + "</button>"), iA += "</div>";
|
|
1199
1199
|
}, K = function(e, h, m) {
|
|
1200
|
-
return '<table cellpadding="0" cellspacing="0" class="pika-table" role="grid" aria-labelledby="' + m + '">' + G(e) +
|
|
1200
|
+
return '<table cellpadding="0" cellspacing="0" class="pika-table" role="grid" aria-labelledby="' + m + '">' + G(e) + l(h) + "</table>";
|
|
1201
1201
|
}, R = function(e) {
|
|
1202
1202
|
var h = this, m = h.config(e);
|
|
1203
1203
|
h._onMouseDown = function(d) {
|
|
@@ -1435,9 +1435,9 @@ function YQ() {
|
|
|
1435
1435
|
* render HTML for a particular month
|
|
1436
1436
|
*/
|
|
1437
1437
|
render: function(e, h, m) {
|
|
1438
|
-
var H = this._o, d = /* @__PURE__ */ new Date(), b =
|
|
1438
|
+
var H = this._o, d = /* @__PURE__ */ new Date(), b = T(e, h), N = new Date(e, h, 1).getDay(), EA = [], W = [];
|
|
1439
1439
|
k(d), H.firstDay > 0 && (N -= H.firstDay, N < 0 && (N += 7));
|
|
1440
|
-
for (var U = h === 0 ? 11 : h - 1, nA = h === 11 ? 0 : h + 1, hA = h === 0 ? e - 1 : e, iA = h === 11 ? e + 1 : e, MA =
|
|
1440
|
+
for (var U = h === 0 ? 11 : h - 1, nA = h === 11 ? 0 : h + 1, hA = h === 0 ? e - 1 : e, iA = h === 11 ? e + 1 : e, MA = T(hA, U), XA = b + N, TA = XA; TA > 7; )
|
|
1441
1441
|
TA -= 7;
|
|
1442
1442
|
XA += 7 - TA;
|
|
1443
1443
|
for (var qA = !1, vA = 0, FA = 0; vA < XA; vA++) {
|
|
@@ -1711,7 +1711,7 @@ function jQ(g, A, E = 200) {
|
|
|
1711
1711
|
const c = yQ();
|
|
1712
1712
|
t.setTransform(...c), t.drawImage(C, 0, 0), t.setTransform(1, 0, 0, 1, 0, 0);
|
|
1713
1713
|
} else if (A.length === 4) {
|
|
1714
|
-
const [c, f, u, Y] = A,
|
|
1714
|
+
const [c, f, u, Y] = A, T = u - c, k = Y - f, q = T * 0.05, P = k * 0.05, x = Math.max(0, c - q), v = Math.max(0, f - P), i = Math.min(C.width, u + q), s = Math.min(C.height, Y + P), M = i - x, J = s - v;
|
|
1715
1715
|
t.drawImage(
|
|
1716
1716
|
C,
|
|
1717
1717
|
x,
|
|
@@ -1732,8 +1732,8 @@ function jQ(g, A, E = 200) {
|
|
|
1732
1732
|
E
|
|
1733
1733
|
), I = new ImageData(E, E), a = n.data, w = I.data;
|
|
1734
1734
|
for (let c = 0; c < a.length; c += 4) {
|
|
1735
|
-
const f = a[c], u = a[c + 1], Y = a[c + 2],
|
|
1736
|
-
w[c] = w[c + 1] = w[c + 2] =
|
|
1735
|
+
const f = a[c], u = a[c + 1], Y = a[c + 2], T = 0.2989 * f + 0.587 * u + 0.114 * Y;
|
|
1736
|
+
w[c] = w[c + 1] = w[c + 2] = T, w[c + 3] = 255;
|
|
1737
1737
|
}
|
|
1738
1738
|
const r = new ImageData(E, E), D = KQ(w, E, E, 10);
|
|
1739
1739
|
return r.data.set(D), {
|
|
@@ -1781,20 +1781,20 @@ function UQ(g, A, E, C, B = 0.5) {
|
|
|
1781
1781
|
for (let n = 0; n < t; n++) {
|
|
1782
1782
|
const I = g.data[n * 37 + 4];
|
|
1783
1783
|
if (I < B) continue;
|
|
1784
|
-
const a = g.data[n * 37], w = g.data[n * 37 + 1], r = g.data[n * 37 + 2], D = g.data[n * 37 + 3], c = E / 640, f = C / 640, u = [a * c, w * f, r * c, D * f], Y = g.data.slice(n * 37 + 5, n * 37 + 37),
|
|
1785
|
-
for (let
|
|
1784
|
+
const a = g.data[n * 37], w = g.data[n * 37 + 1], r = g.data[n * 37 + 2], D = g.data[n * 37 + 3], c = E / 640, f = C / 640, u = [a * c, w * f, r * c, D * f], Y = g.data.slice(n * 37 + 5, n * 37 + 37), T = new Float32Array(25600);
|
|
1785
|
+
for (let l = 0; l < 160; l++)
|
|
1786
1786
|
for (let G = 0; G < 160; G++) {
|
|
1787
1787
|
let y = 0;
|
|
1788
1788
|
for (let K = 0; K < 32; K++)
|
|
1789
|
-
y += Y[K] * A.data[K * 160 * 160 +
|
|
1790
|
-
l
|
|
1789
|
+
y += Y[K] * A.data[K * 160 * 160 + l * 160 + G];
|
|
1790
|
+
T[l * 160 + G] = y > 0 ? 1 : 0;
|
|
1791
1791
|
}
|
|
1792
1792
|
const k = SQ();
|
|
1793
1793
|
let q = k.length > 0 ? k[0] : [], P = q.length >= 4 ? q.slice(0, 4) : u;
|
|
1794
|
-
P = P.map((
|
|
1795
|
-
const x = 0.1, v = Math.min(...P.map((
|
|
1796
|
-
|
|
1797
|
-
|
|
1794
|
+
P = P.map((l) => [l[0] * c, l[1] * f]);
|
|
1795
|
+
const x = 0.1, v = Math.min(...P.map((l) => l[0])), i = Math.max(...P.map((l) => l[0])), s = Math.min(...P.map((l) => l[1])), M = Math.max(...P.map((l) => l[1])), J = i - v, F = M - s, X = P.map((l) => [
|
|
1796
|
+
l[0] + (l[0] < (v + i) / 2 ? -x * J : x * J),
|
|
1797
|
+
l[1] + (l[1] < (s + M) / 2 ? -x * F : x * F)
|
|
1798
1798
|
]);
|
|
1799
1799
|
Q.push({
|
|
1800
1800
|
bbox_xyxy: u,
|
|
@@ -1804,7 +1804,7 @@ function UQ(g, A, E, C, B = 0.5) {
|
|
|
1804
1804
|
(u[1] + u[3]) / 2
|
|
1805
1805
|
],
|
|
1806
1806
|
wh: [u[2] - u[0], u[3] - u[1]],
|
|
1807
|
-
polygon_xy: q.map((
|
|
1807
|
+
polygon_xy: q.map((l) => [l[0] * c, l[1] * f]),
|
|
1808
1808
|
quad_xy: P,
|
|
1809
1809
|
padded_quad_xy: X,
|
|
1810
1810
|
image_shape: [C, E]
|
|
@@ -1926,7 +1926,7 @@ function $Q(r) {
|
|
|
1926
1926
|
const O = PA();
|
|
1927
1927
|
typeof g == "function" && g(O);
|
|
1928
1928
|
}), D.appendChild(c);
|
|
1929
|
-
let f, u, Y,
|
|
1929
|
+
let f, u, Y, T, k, q, P, x, v, i, s, M, J, F, X, l, G, y, K, R, e, h, m, H, d;
|
|
1930
1930
|
const b = document.createElement("button");
|
|
1931
1931
|
f = YA({
|
|
1932
1932
|
name: "taxCode",
|
|
@@ -1989,7 +1989,7 @@ function $Q(r) {
|
|
|
1989
1989
|
label: z["tên cqt"],
|
|
1990
1990
|
id: z["ma xa"]
|
|
1991
1991
|
}));
|
|
1992
|
-
if (
|
|
1992
|
+
if (T = jg({
|
|
1993
1993
|
name: "companyTaxManagement",
|
|
1994
1994
|
label: o("taxAuthority"),
|
|
1995
1995
|
value: ((fg = (UA = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : UA.organization) == null ? void 0 : fg.taxAuthority) || "",
|
|
@@ -2005,7 +2005,7 @@ function $Q(r) {
|
|
|
2005
2005
|
const z = N.find(
|
|
2006
2006
|
(O) => O.id === B
|
|
2007
2007
|
);
|
|
2008
|
-
z &&
|
|
2008
|
+
z && T.setValue && T.setValue(
|
|
2009
2009
|
z.value,
|
|
2010
2010
|
z.label,
|
|
2011
2011
|
z.id
|
|
@@ -2133,7 +2133,7 @@ function $Q(r) {
|
|
|
2133
2133
|
onChange: (z) => {
|
|
2134
2134
|
z.target.value;
|
|
2135
2135
|
}
|
|
2136
|
-
}),
|
|
2136
|
+
}), l = YA({
|
|
2137
2137
|
name: "contactAddressDetail",
|
|
2138
2138
|
label: o("permanentAddress"),
|
|
2139
2139
|
required: !0,
|
|
@@ -2145,14 +2145,14 @@ function $Q(r) {
|
|
|
2145
2145
|
onInput: (z) => {
|
|
2146
2146
|
const O = z.target.value;
|
|
2147
2147
|
if (!/^[\p{L}0-9\s,.\-/()]*$/u.test(O)) {
|
|
2148
|
-
|
|
2148
|
+
l.setError(
|
|
2149
2149
|
o("errorInvalidAddress", "Địa chỉ không được chứa ký tự đặc biệt")
|
|
2150
2150
|
);
|
|
2151
2151
|
return;
|
|
2152
2152
|
}
|
|
2153
|
-
O.trim() === "" ?
|
|
2153
|
+
O.trim() === "" ? l.setError(
|
|
2154
2154
|
o("errorRequired", "Địa chỉ thường trú bắt buộc")
|
|
2155
|
-
) :
|
|
2155
|
+
) : l.setError(null);
|
|
2156
2156
|
}
|
|
2157
2157
|
}), m = hC({
|
|
2158
2158
|
label: o("businessLicense", "Giấy phép đăng ký kinh doanh"),
|
|
@@ -2341,20 +2341,20 @@ function $Q(r) {
|
|
|
2341
2341
|
if (O !== U)
|
|
2342
2342
|
return;
|
|
2343
2343
|
if (_.error)
|
|
2344
|
-
u.inputEl.value = "", Y.inputEl.value = "",
|
|
2344
|
+
u.inputEl.value = "", Y.inputEl.value = "", T.setValue && T.setValue("", "", ""), T.setDisabled(!1);
|
|
2345
2345
|
else {
|
|
2346
2346
|
if (u.inputEl.value = _.ten_cty || "", Y.inputEl.value = _.dia_chi || "", _.cqthue_ql) {
|
|
2347
2347
|
const DA = (GA) => GA.toLowerCase().replace(/phường\s+/i, "").replace(/xã\s+/i, "").replace(/quận\s+/i, "").trim(), RA = DA(_.cqthue_ql), JA = N.find((GA) => {
|
|
2348
2348
|
const SA = DA(GA.label);
|
|
2349
2349
|
return SA.includes(RA) || RA.includes(SA);
|
|
2350
2350
|
});
|
|
2351
|
-
JA && (
|
|
2351
|
+
JA && (T.setValue && T.setValue(
|
|
2352
2352
|
JA.value,
|
|
2353
2353
|
JA.label,
|
|
2354
2354
|
JA.id
|
|
2355
|
-
), IA.taxAuthority = JA.id || "",
|
|
2355
|
+
), IA.taxAuthority = JA.id || "", T.setDisabled(!1));
|
|
2356
2356
|
} else
|
|
2357
|
-
|
|
2357
|
+
T.setValue && T.setValue("", "", ""), T.setDisabled(!1);
|
|
2358
2358
|
return IA.name = _.ten_cty || "", IA.address = _.dia_chi || "", IA.taxCode = z, f.setError(null), IA;
|
|
2359
2359
|
}
|
|
2360
2360
|
} catch (_) {
|
|
@@ -2378,7 +2378,7 @@ function $Q(r) {
|
|
|
2378
2378
|
const iA = document.createElement("h3");
|
|
2379
2379
|
iA.className = "wgt:text-lg wgt:font-semibold wgt:mb-4", iA.innerText = o("unitInfo", "1. Thông tin đơn vị"), hA.appendChild(iA);
|
|
2380
2380
|
const MA = document.createElement("div");
|
|
2381
|
-
MA.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", hA.appendChild(MA), MA.appendChild(f.container), MA.appendChild(u.container), MA.appendChild(Y.container), MA.appendChild(
|
|
2381
|
+
MA.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", hA.appendChild(MA), MA.appendChild(f.container), MA.appendChild(u.container), MA.appendChild(Y.container), MA.appendChild(T.container);
|
|
2382
2382
|
const XA = document.createElement("div");
|
|
2383
2383
|
XA.className = "wgt:w-full wgt:grid wgt:grid-cols-1 wgt:@min-2xl:grid-cols-2 wgt:space-x-4", hA.appendChild(XA), XA.appendChild(h.container), c.appendChild(hA);
|
|
2384
2384
|
const TA = document.createElement("div");
|
|
@@ -2404,7 +2404,7 @@ function $Q(r) {
|
|
|
2404
2404
|
function Dg(z) {
|
|
2405
2405
|
FA = !1, aA = !1, VA();
|
|
2406
2406
|
const O = () => {
|
|
2407
|
-
J.inputEl.value = "", v.inputEl.value = "", i.inputEl.value = "",
|
|
2407
|
+
J.inputEl.value = "", v.inputEl.value = "", i.inputEl.value = "", l.inputEl.value = "", s.selectEl.value = "", X.selectEl.value = "", J.setError(null), v.setError(null), i.setError(null), l.setError(null), s.setError(null), X.setError(null), t && typeof t.setDate == "function" && t.setDate(null);
|
|
2408
2408
|
}, _ = (DA) => {
|
|
2409
2409
|
if (!DA) return "";
|
|
2410
2410
|
if (/^\d{8}$/.test(DA)) {
|
|
@@ -2431,7 +2431,7 @@ function $Q(r) {
|
|
|
2431
2431
|
const { address: GA, date_of_birth: SA, full_name: zg, id_number: vg, sex: kg } = DA;
|
|
2432
2432
|
if (!vg || !/^\d{12}$/.test(vg) ? (yA(
|
|
2433
2433
|
o("errorInvalidCard", "Số CCCD phải có 12 chữ số")
|
|
2434
|
-
), J.inputEl.value = "") : (J.inputEl.value = vg, J.setError(null)), v.inputEl.value = zg || "", i.inputEl.value = _(SA),
|
|
2434
|
+
), J.inputEl.value = "") : (J.inputEl.value = vg, J.setError(null)), v.inputEl.value = zg || "", i.inputEl.value = _(SA), l.inputEl.value = GA || "", kg) {
|
|
2435
2435
|
const hg = wC.find(
|
|
2436
2436
|
(Ng) => Ng.label.toLowerCase() === kg.toLowerCase()
|
|
2437
2437
|
);
|
|
@@ -2502,7 +2502,7 @@ function $Q(r) {
|
|
|
2502
2502
|
const Bg = document.createElement("div");
|
|
2503
2503
|
Bg.className = "wgt:grid wgt:grid-cols-1 wgt:@min-2xl:grid-cols-2 wgt:gap-4", NA.appendChild(Bg), Bg.appendChild(i.container), Bg.appendChild(s.container), vA.appendChild(NA);
|
|
2504
2504
|
const dA = document.createElement("div");
|
|
2505
|
-
dA.className = "wgt:grid wgt:grid-cols-1 wgt:@min-2xl:grid-cols-4 wgt:gap-4 wgt:items-start", dA.appendChild(J.container), dA.appendChild(F.container), dA.appendChild(M.container), dA.appendChild(X.container), TA.appendChild(vA), TA.appendChild(dA), TA.appendChild(
|
|
2505
|
+
dA.className = "wgt:grid wgt:grid-cols-1 wgt:@min-2xl:grid-cols-4 wgt:gap-4 wgt:items-start", dA.appendChild(J.container), dA.appendChild(F.container), dA.appendChild(M.container), dA.appendChild(X.container), TA.appendChild(vA), TA.appendChild(dA), TA.appendChild(l.container), TA.appendChild(m.container);
|
|
2506
2506
|
const ig = document.createElement("ul");
|
|
2507
2507
|
ig.className = "wgt:list-inside wgt:list-disc wgt:-mt-2";
|
|
2508
2508
|
const sg = document.createElement("li");
|
|
@@ -2620,7 +2620,7 @@ function $Q(r) {
|
|
|
2620
2620
|
name: u == null ? void 0 : u.getValue(),
|
|
2621
2621
|
address: Y == null ? void 0 : Y.getValue(),
|
|
2622
2622
|
taxCode: f == null ? void 0 : f.getValue(),
|
|
2623
|
-
taxAuthority:
|
|
2623
|
+
taxAuthority: T == null ? void 0 : T.getValue()
|
|
2624
2624
|
},
|
|
2625
2625
|
contactPerson: {
|
|
2626
2626
|
name: k == null ? void 0 : k.getValue(),
|
|
@@ -2636,7 +2636,7 @@ function $Q(r) {
|
|
|
2636
2636
|
idCard: J == null ? void 0 : J.getValue(),
|
|
2637
2637
|
passportNumber: F == null ? void 0 : F.getValue(),
|
|
2638
2638
|
nationality: X == null ? void 0 : X.getValue(),
|
|
2639
|
-
permanentAddress:
|
|
2639
|
+
permanentAddress: l == null ? void 0 : l.getValue()
|
|
2640
2640
|
},
|
|
2641
2641
|
hasUsedEInvoice: y == null ? void 0 : y.checked,
|
|
2642
2642
|
isUsedEInvoiceBefore: K == null ? void 0 : K.checked,
|
|
@@ -2660,12 +2660,12 @@ function $Q(r) {
|
|
|
2660
2660
|
i,
|
|
2661
2661
|
M,
|
|
2662
2662
|
J,
|
|
2663
|
-
|
|
2663
|
+
l,
|
|
2664
2664
|
e,
|
|
2665
2665
|
R
|
|
2666
2666
|
].forEach((z) => {
|
|
2667
2667
|
z.inputEl.addEventListener("input", gA);
|
|
2668
|
-
}), [s,
|
|
2668
|
+
}), [s, T].forEach((z) => {
|
|
2669
2669
|
z.selectEl.addEventListener("change", gA);
|
|
2670
2670
|
}), [y, K].forEach((z) => {
|
|
2671
2671
|
z.addEventListener("change", gA);
|
|
@@ -2767,15 +2767,15 @@ function BE({
|
|
|
2767
2767
|
c.appendChild(u), I.appendChild(c);
|
|
2768
2768
|
const Y = document.createElement("div");
|
|
2769
2769
|
Y.className = "wgt:mt-4";
|
|
2770
|
-
const
|
|
2771
|
-
|
|
2770
|
+
const T = document.createElement("span");
|
|
2771
|
+
T.className = [
|
|
2772
2772
|
"wgt:block",
|
|
2773
2773
|
"wgt:text-2xl",
|
|
2774
2774
|
"wgt:font-bold",
|
|
2775
2775
|
B ? "wgt:text-primary" : "wgt:text-text-sub-600"
|
|
2776
2776
|
].join(" ");
|
|
2777
2777
|
let k = t ? (P = g == null ? void 0 : g.renewPrice) != null ? P : 0 : (x = g == null ? void 0 : g.price) != null ? x : 0;
|
|
2778
|
-
|
|
2778
|
+
T.innerText = xA((g == null ? void 0 : g.limit) * k), Y.appendChild(T);
|
|
2779
2779
|
const q = document.createElement("span");
|
|
2780
2780
|
return q.className = "wgt:text-sm wgt:text-text-sub-600", q.innerText = `VND/${o("package")}`, Y.appendChild(q), n.appendChild(Y), { container: n };
|
|
2781
2781
|
}
|
|
@@ -2843,7 +2843,7 @@ function aC({
|
|
|
2843
2843
|
}
|
|
2844
2844
|
};
|
|
2845
2845
|
}
|
|
2846
|
-
const CE = "1.94.
|
|
2846
|
+
const CE = "1.94.1";
|
|
2847
2847
|
function QE(E) {
|
|
2848
2848
|
return Z(this, arguments, function* ({ search: g, bank: A }) {
|
|
2849
2849
|
return (yield zA.get(`${Gg}`, {
|
|
@@ -3091,7 +3091,7 @@ function eE({
|
|
|
3091
3091
|
function Y(k) {
|
|
3092
3092
|
return B.find((q) => q._id === k) || null;
|
|
3093
3093
|
}
|
|
3094
|
-
function
|
|
3094
|
+
function T() {
|
|
3095
3095
|
f.contains(u) && f.removeChild(u);
|
|
3096
3096
|
}
|
|
3097
3097
|
return {
|
|
@@ -3106,7 +3106,7 @@ function eE({
|
|
|
3106
3106
|
getInvoicePackages: () => B,
|
|
3107
3107
|
getFilteredInvoiceOptions: () => Q,
|
|
3108
3108
|
findInvoiceById: Y,
|
|
3109
|
-
removeLoading:
|
|
3109
|
+
removeLoading: T
|
|
3110
3110
|
};
|
|
3111
3111
|
}
|
|
3112
3112
|
function aE() {
|
|
@@ -3216,9 +3216,9 @@ function iE(k) {
|
|
|
3216
3216
|
setSelectedPromotions: f,
|
|
3217
3217
|
setPackages: u,
|
|
3218
3218
|
setPromotionCodes: Y,
|
|
3219
|
-
isNewCustomer:
|
|
3219
|
+
isNewCustomer: T
|
|
3220
3220
|
}) {
|
|
3221
|
-
let q = "", P = C ? C._id : null, x = B ? B._id : null, v = D ? D.map((j) => j) : [], i = [], s = [], M = [], J = [], F = null, X = 1,
|
|
3221
|
+
let q = "", P = C ? C._id : null, x = B ? B._id : null, v = D ? D.map((j) => j) : [], i = [], s = [], M = [], J = [], F = null, X = 1, l = 1, G = 1;
|
|
3222
3222
|
function y(j) {
|
|
3223
3223
|
return i.find((QA) => QA._id === j) || null;
|
|
3224
3224
|
}
|
|
@@ -3312,7 +3312,7 @@ function iE(k) {
|
|
|
3312
3312
|
],
|
|
3313
3313
|
packages: S,
|
|
3314
3314
|
promotionCodes: V,
|
|
3315
|
-
isRenew: !
|
|
3315
|
+
isRenew: !T
|
|
3316
3316
|
});
|
|
3317
3317
|
I(uA.orderId), g();
|
|
3318
3318
|
} catch (uA) {
|
|
@@ -3330,10 +3330,10 @@ function iE(k) {
|
|
|
3330
3330
|
(BA) => BA._id === x
|
|
3331
3331
|
);
|
|
3332
3332
|
let AA = null;
|
|
3333
|
-
|
|
3333
|
+
T && !(j != null && j.withoutInitialFee) ? (AA = LA(rA({}, s[0]), {
|
|
3334
3334
|
quantity: X
|
|
3335
3335
|
}), Q(AA)) : Q(null);
|
|
3336
|
-
let V = LA(rA({}, j), { quantity:
|
|
3336
|
+
let V = LA(rA({}, j), { quantity: l }), $ = LA(rA({}, QA), { quantity: G });
|
|
3337
3337
|
t(V), n($), f(v), yield Dg(
|
|
3338
3338
|
AA,
|
|
3339
3339
|
V,
|
|
@@ -3355,7 +3355,7 @@ function iE(k) {
|
|
|
3355
3355
|
] = yield Promise.allSettled([
|
|
3356
3356
|
hE(),
|
|
3357
3357
|
EE({ bank: w }),
|
|
3358
|
-
IE({ bank: w, hasRenew: !
|
|
3358
|
+
IE({ bank: w, hasRenew: !T }),
|
|
3359
3359
|
nE({ bank: w })
|
|
3360
3360
|
]);
|
|
3361
3361
|
if (V.status === "fulfilled" ? s = V.value || [] : (console.error(
|
|
@@ -3382,7 +3382,7 @@ function iE(k) {
|
|
|
3382
3382
|
}), Object.keys(M).length > 0 && (v = D || Object.keys(M).filter(
|
|
3383
3383
|
(S) => M[S].bank === w && M[S].expiredAt >= (/* @__PURE__ */ new Date()).toISOString() && M[S].limit > M[S].used
|
|
3384
3384
|
), sg())) : console.error("Failed to load promotions:", AA.reason), $.status === "fulfilled") {
|
|
3385
|
-
const S =
|
|
3385
|
+
const S = T ? $.value : $.value.filter((p) => p.renewPrice !== 0);
|
|
3386
3386
|
if (b(S || []), $.value.length > 0) {
|
|
3387
3387
|
const p = $.value.find(
|
|
3388
3388
|
(uA) => J.includes(uA.code)
|
|
@@ -3451,14 +3451,14 @@ function iE(k) {
|
|
|
3451
3451
|
disCountedPackages: J,
|
|
3452
3452
|
promotion: o("discount"),
|
|
3453
3453
|
selectedPackageId: P,
|
|
3454
|
-
isRenew: !
|
|
3454
|
+
isRenew: !T,
|
|
3455
3455
|
handlePackageSelect: (j) => {
|
|
3456
3456
|
var V, $;
|
|
3457
3457
|
let QA = (V = N().find(
|
|
3458
3458
|
(BA) => BA._id === P
|
|
3459
3459
|
)) == null ? void 0 : V.code, AA = ($ = N().find((BA) => BA._id === j)) == null ? void 0 : $.code;
|
|
3460
3460
|
jA(QA, AA, () => {
|
|
3461
|
-
P = j, yA.setSelectedPackageId(j), W(N()), ig(), Bg(), KA(),
|
|
3461
|
+
P = j, yA.setSelectedPackageId(j), W(N()), ig(), Bg(), KA(), l = 1, kA();
|
|
3462
3462
|
});
|
|
3463
3463
|
}
|
|
3464
3464
|
}), d.appendChild(yA.container);
|
|
@@ -3510,7 +3510,7 @@ function iE(k) {
|
|
|
3510
3510
|
// getCurrentLanguage() === "vi"
|
|
3511
3511
|
// ? initPackages[0].name
|
|
3512
3512
|
// : initPackages[0].nameEn,
|
|
3513
|
-
isChecked:
|
|
3513
|
+
isChecked: T && !(j != null && j.withoutInitialFee)
|
|
3514
3514
|
});
|
|
3515
3515
|
NA.appendChild(QA);
|
|
3516
3516
|
}
|
|
@@ -3624,7 +3624,7 @@ function iE(k) {
|
|
|
3624
3624
|
const j = N().find(
|
|
3625
3625
|
(L) => L._id === P
|
|
3626
3626
|
);
|
|
3627
|
-
if (
|
|
3627
|
+
if (T && (s == null ? void 0 : s.length) > 0 && !(j != null && j.withoutInitialFee)) {
|
|
3628
3628
|
const L = document.createElement("tr");
|
|
3629
3629
|
L.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";
|
|
3630
3630
|
const CA = document.createElement("td");
|
|
@@ -3681,20 +3681,20 @@ function iE(k) {
|
|
|
3681
3681
|
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";
|
|
3682
3682
|
const wA = document.createElement("button");
|
|
3683
3683
|
wA.type = "button", wA.ariaLabel = o("decrease");
|
|
3684
|
-
const oA =
|
|
3685
|
-
wA.disabled =
|
|
3686
|
-
|
|
3684
|
+
const oA = T ? (gg = L == null ? void 0 : L.price) != null ? gg : 0 : (Cg = L == null ? void 0 : L.renewPrice) != null ? Cg : 0;
|
|
3685
|
+
wA.disabled = l <= 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", () => {
|
|
3686
|
+
l > 1 && (l -= 1, kA());
|
|
3687
3687
|
}), cA.appendChild(wA);
|
|
3688
3688
|
const mA = document.createElement("span");
|
|
3689
|
-
mA.className = "wgt:max-w-10 wgt:text-center wgt:text-sm wgt:font-medium wgt:text-text-black wgt:focus:outline-none wgt:@max-2xl:text-lg wgt:@max-2xl:min-w-[60px] wgt:@max-2xl:font-semibold", mA.innerText =
|
|
3689
|
+
mA.className = "wgt:max-w-10 wgt:text-center wgt:text-sm wgt:font-medium wgt:text-text-black wgt:focus:outline-none wgt:@max-2xl:text-lg wgt:@max-2xl:min-w-[60px] wgt:@max-2xl:font-semibold", mA.innerText = l, cA.appendChild(mA);
|
|
3690
3690
|
const sA = document.createElement("button");
|
|
3691
3691
|
sA.type = "button", sA.ariaLabel = o("increase"), sA.disabled = (L == null ? void 0 : L.price) === 0, sA.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", sA.innerText = "+", sA.addEventListener("click", () => {
|
|
3692
|
-
|
|
3692
|
+
l += 1, kA();
|
|
3693
3693
|
}), cA.appendChild(sA), eA.appendChild(cA), CA.appendChild(eA);
|
|
3694
3694
|
const HA = document.createElement("td");
|
|
3695
3695
|
HA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:@max-2xl:hidden", HA.innerText = xA(oA * (L == null ? void 0 : L.limit)) + " VND", CA.appendChild(HA);
|
|
3696
3696
|
const UA = document.createElement("td");
|
|
3697
|
-
UA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:@max-2xl:hidden", UA.innerText = xA(oA * (L == null ? void 0 : L.limit) *
|
|
3697
|
+
UA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:@max-2xl:hidden", UA.innerText = xA(oA * (L == null ? void 0 : L.limit) * l) + " VND", CA.appendChild(UA);
|
|
3698
3698
|
const fg = document.createElement("div");
|
|
3699
3699
|
fg.className = "wgt:hidden wgt:@max-2xl:flex wgt:flex-col wgt:gap-1 wgt:mt-2 wgt:pt-2 wgt:border-t wgt:border-soft-200", fg.innerHTML = `
|
|
3700
3700
|
<div class="wgt:flex wgt:justify-between wgt:text-sm wgt:text-text-sub-600">
|
|
@@ -3706,7 +3706,7 @@ function iE(k) {
|
|
|
3706
3706
|
<div class="wgt:flex wgt:justify-between wgt:text-base wgt:font-semibold wgt:text-strong-950">
|
|
3707
3707
|
<span>${o("total")}:</span>
|
|
3708
3708
|
<span class="wgt:text-primary">${xA(
|
|
3709
|
-
oA * (L == null ? void 0 : L.limit) *
|
|
3709
|
+
oA * (L == null ? void 0 : L.limit) * l
|
|
3710
3710
|
)} VND</span>
|
|
3711
3711
|
</div>
|
|
3712
3712
|
`, gA.appendChild(fg), qA.appendChild(CA);
|
|
@@ -3783,7 +3783,7 @@ function iE(k) {
|
|
|
3783
3783
|
"package"
|
|
3784
3784
|
)} ${(HA = (sA = L == null ? void 0 : L.reward) == null ? void 0 : sA.packageCodes) == null ? void 0 : HA.join(", ")}`, eA.style.color = "#12B76A") : eA.innerText = "", CA.appendChild(eA), qA.appendChild(CA);
|
|
3785
3785
|
});
|
|
3786
|
-
const V =
|
|
3786
|
+
const V = T && s.length > 0 && !(j != null && j.withoutInitialFee) ? ((Qg = s[0]) == null ? void 0 : Qg.price) * X : 0, $ = U(P), BA = $ ? T ? (xg = $.price) != null ? xg : 0 : (dg = $.renewPrice) != null ? dg : 0 : 0, S = $ ? BA * $.limit * l : 0, p = y(x), uA = p ? p.price * p.limit * G : 0, tA = V + S + uA - AA;
|
|
3787
3787
|
a(tA);
|
|
3788
3788
|
{
|
|
3789
3789
|
const L = document.createElement("tr");
|
|
@@ -3829,26 +3829,26 @@ function sE({
|
|
|
3829
3829
|
const X = document.createElement("img");
|
|
3830
3830
|
X.src = F, X.alt = "Logo", X.className = `wgt:w-${I === "ocb" ? "28" : "8"} wgt:object-contain`, Y.appendChild(X);
|
|
3831
3831
|
}), D.appendChild(Y);
|
|
3832
|
-
const
|
|
3833
|
-
|
|
3832
|
+
const T = document.createElement("div");
|
|
3833
|
+
T.className = "wgt:text-center wgt:flex wgt:flex-col wgt:gap-1";
|
|
3834
3834
|
const k = document.createElement("h3");
|
|
3835
|
-
k.className = "wgt:text-lg wgt:font-bold wgt:text-text-black", k.innerText = C,
|
|
3835
|
+
k.className = "wgt:text-lg wgt:font-bold wgt:text-text-black", k.innerText = C, T.appendChild(k);
|
|
3836
3836
|
const q = document.createElement("p");
|
|
3837
3837
|
q.className = "wgt:text-sm wgt:text-grey-8", q.innerHTML = `${o(
|
|
3838
3838
|
"accountNumber"
|
|
3839
|
-
)}: <span class="wgt:font-medium">${B}</span>`,
|
|
3839
|
+
)}: <span class="wgt:font-medium">${B}</span>`, T.appendChild(q);
|
|
3840
3840
|
const P = document.createElement("p");
|
|
3841
3841
|
P.className = "wgt:text-sm wgt:text-grey-8", P.innerHTML = `${o(
|
|
3842
3842
|
"beneficiaryBank"
|
|
3843
|
-
)}: <span class="wgt:font-medium">${Q}</span>`,
|
|
3843
|
+
)}: <span class="wgt:font-medium">${Q}</span>`, T.appendChild(P), D.appendChild(T), w.appendChild(D), a.appendChild(w);
|
|
3844
3844
|
const x = document.createElement("div");
|
|
3845
3845
|
x.className = "wgt:flex wgt:flex-col wgt:justify-between wgt:@min-2xl:w-1/2";
|
|
3846
3846
|
const v = document.createElement("div"), i = document.createElement("h3");
|
|
3847
3847
|
i.className = "wgt:text-lg wgt:font-semibold wgt:text-gray-800 wgt:mb-4", i.innerText = o("paymentInstructionsTitle"), v.appendChild(i);
|
|
3848
3848
|
const s = document.createElement("ol");
|
|
3849
3849
|
s.className = "wgt:space-y-4", t.forEach((F, X) => {
|
|
3850
|
-
const
|
|
3851
|
-
|
|
3850
|
+
const l = document.createElement("li");
|
|
3851
|
+
l.className = "wgt:flex wgt:items-start";
|
|
3852
3852
|
const G = document.createElement("div");
|
|
3853
3853
|
G.className = "wgt:flex-shrink-0 wgt:mt-0.5";
|
|
3854
3854
|
const y = document.createElement("div");
|
|
@@ -3856,7 +3856,7 @@ function sE({
|
|
|
3856
3856
|
const K = document.createElement("span");
|
|
3857
3857
|
K.className = "wgt:text-white wgt:text-sm wgt:font-semibold", K.innerText = String(X + 1), y.appendChild(K), G.appendChild(y);
|
|
3858
3858
|
const R = document.createElement("p");
|
|
3859
|
-
R.className = "wgt:ml-3 wgt:text-text-sub-600", R.innerText = F,
|
|
3859
|
+
R.className = "wgt:ml-3 wgt:text-text-sub-600", R.innerText = F, l.appendChild(G), l.appendChild(R), s.appendChild(l);
|
|
3860
3860
|
}), v.appendChild(s), x.appendChild(v);
|
|
3861
3861
|
const M = document.createElement("div");
|
|
3862
3862
|
M.className = "wgt:h-[300px] wgt:flex wgt:justify-center";
|
|
@@ -3865,13 +3865,13 @@ function sE({
|
|
|
3865
3865
|
container: a,
|
|
3866
3866
|
update(F = {}) {
|
|
3867
3867
|
F.qrSrc != null && (u.src = F.qrSrc), F.logos && (Y.innerHTML = "", F.logos.forEach((X) => {
|
|
3868
|
-
const
|
|
3869
|
-
|
|
3868
|
+
const l = document.createElement("img");
|
|
3869
|
+
l.src = X, l.alt = "Logo", l.className = "wgt:w-8 wgt:object-contain", Y.appendChild(l);
|
|
3870
3870
|
})), F.accountName != null && (k.innerText = F.accountName), F.accountNumber != null && (q.innerHTML = `${o(
|
|
3871
3871
|
"accountNumber"
|
|
3872
3872
|
)}: <span class="wgt:font-medium">${F.accountNumber}</span>`), F.bankName != null && (P.innerHTML = `${o(
|
|
3873
3873
|
"beneficiaryBank"
|
|
3874
|
-
)}: <span class="wgt:font-medium">${F.bankName}</span>`), F.instructions && (s.innerHTML = "", F.instructions.forEach((X,
|
|
3874
|
+
)}: <span class="wgt:font-medium">${F.bankName}</span>`), F.instructions && (s.innerHTML = "", F.instructions.forEach((X, l) => {
|
|
3875
3875
|
const G = document.createElement("li");
|
|
3876
3876
|
G.className = "wgt:flex wgt:items-start";
|
|
3877
3877
|
const y = document.createElement("div");
|
|
@@ -3879,7 +3879,7 @@ function sE({
|
|
|
3879
3879
|
const K = document.createElement("div");
|
|
3880
3880
|
K.className = "wgt:w-6 wgt:h-6 wgt:rounded-full wgt:bg-primary wgt:flex wgt:items-center wgt:justify-center";
|
|
3881
3881
|
const R = document.createElement("span");
|
|
3882
|
-
R.className = "wgt:text-white wgt:text-sm wgt:font-semibold", R.innerText = String(
|
|
3882
|
+
R.className = "wgt:text-white wgt:text-sm wgt:font-semibold", R.innerText = String(l + 1), K.appendChild(R), y.appendChild(K);
|
|
3883
3883
|
const e = document.createElement("p");
|
|
3884
3884
|
e.className = "wgt:ml-3 wgt:text-text-sub-600", e.innerText = X, G.appendChild(y), G.appendChild(e), s.appendChild(G);
|
|
3885
3885
|
})), F.illustrationSrc != null && (J.src = F.illustrationSrc);
|
|
@@ -3972,28 +3972,28 @@ function mE({
|
|
|
3972
3972
|
"wgt:gap-10",
|
|
3973
3973
|
"wgt:shadow-[0px_2px_6px_0px_rgba(31,34,41,0.04)]"
|
|
3974
3974
|
].join(" ");
|
|
3975
|
-
const
|
|
3976
|
-
|
|
3975
|
+
const T = document.createElement("div");
|
|
3976
|
+
T.className = "wgt:w-full wgt:flex wgt:flex-col wgt:gap-4";
|
|
3977
3977
|
const k = document.createElement("h2");
|
|
3978
|
-
k.className = "wgt:text-xl wgt:font-semibold wgt:leading-6 wgt:text-black", k.innerText = o("orderInfo"),
|
|
3978
|
+
k.className = "wgt:text-xl wgt:font-semibold wgt:leading-6 wgt:text-black", k.innerText = o("orderInfo"), T.appendChild(k);
|
|
3979
3979
|
const q = document.createElement("div");
|
|
3980
3980
|
q.className = "wgt:w-full wgt:flex wgt:items-center wgt:justify-between";
|
|
3981
3981
|
const P = document.createElement("h4");
|
|
3982
3982
|
P.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", P.innerText = o("provider");
|
|
3983
3983
|
const x = document.createElement("img");
|
|
3984
|
-
g && g.logoUrl && (x.src = g.logoUrl, x.alt = g.name, x.className = "wgt:h-6 wgt:object-contain"), q.appendChild(P), q.appendChild(x),
|
|
3984
|
+
g && g.logoUrl && (x.src = g.logoUrl, x.alt = g.name, x.className = "wgt:h-6 wgt:object-contain"), q.appendChild(P), q.appendChild(x), T.appendChild(q);
|
|
3985
3985
|
const v = document.createElement("div");
|
|
3986
3986
|
v.className = "wgt:w-full wgt:flex wgt:items-center wgt:justify-between";
|
|
3987
3987
|
const i = document.createElement("h4");
|
|
3988
3988
|
i.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", i.innerText = o("subscriptionPackage");
|
|
3989
3989
|
const s = document.createElement("span");
|
|
3990
|
-
s.className = "wgt:text-base wgt:font-semibold wgt:leading-6 wgt:text-text-black", s.innerText = A ? `${String(A == null ? void 0 : A.code)}` : "", v.appendChild(i), v.appendChild(s),
|
|
3990
|
+
s.className = "wgt:text-base wgt:font-semibold wgt:leading-6 wgt:text-text-black", s.innerText = A ? `${String(A == null ? void 0 : A.code)}` : "", v.appendChild(i), v.appendChild(s), T.appendChild(v);
|
|
3991
3991
|
const M = document.createElement("div");
|
|
3992
3992
|
M.className = "wgt:w-full wgt:flex wgt:items-center wgt:justify-between";
|
|
3993
3993
|
const J = document.createElement("h4");
|
|
3994
3994
|
J.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", J.innerText = o("digitalSignaturePackage");
|
|
3995
3995
|
const F = document.createElement("span");
|
|
3996
|
-
if (F.className = "wgt:text-base wgt:font-semibold wgt:leading-6 wgt:text-text-black", F.innerText = E ? `${String(E == null ? void 0 : E.code)}` : "", M.appendChild(J), M.appendChild(F),
|
|
3996
|
+
if (F.className = "wgt:text-base wgt:font-semibold wgt:leading-6 wgt:text-text-black", F.innerText = E ? `${String(E == null ? void 0 : E.code)}` : "", M.appendChild(J), M.appendChild(F), T.appendChild(M), Q && Q.length > 0) {
|
|
3997
3997
|
const R = document.createElement("div");
|
|
3998
3998
|
R.className = "wgt:w-full wgt:flex wgt:items-start wgt:justify-between wgt:gap-[0.5rem]";
|
|
3999
3999
|
const e = document.createElement("h4");
|
|
@@ -4002,16 +4002,16 @@ function mE({
|
|
|
4002
4002
|
h.className = "wgt:flex wgt:items-center wgt:justify-end wgt:flex-wrap wgt:gap-2", Q.forEach((m) => {
|
|
4003
4003
|
const H = document.createElement("div");
|
|
4004
4004
|
H.className = "wgt:w-fit wgt:px-3 wgt:py-1 wgt:text-xs wgt:font-normal wgt:text-primary wgt:border wgt:border-primary", H.innerText = m, h.appendChild(H);
|
|
4005
|
-
}), R.appendChild(e), R.appendChild(h),
|
|
4005
|
+
}), R.appendChild(e), R.appendChild(h), T.appendChild(R);
|
|
4006
4006
|
}
|
|
4007
4007
|
const X = document.createElement("hr");
|
|
4008
|
-
|
|
4009
|
-
const
|
|
4010
|
-
|
|
4008
|
+
T.appendChild(X);
|
|
4009
|
+
const l = document.createElement("div");
|
|
4010
|
+
l.className = "wgt:w-full wgt:flex wgt:items-center wgt:justify-between";
|
|
4011
4011
|
const G = document.createElement("h4");
|
|
4012
4012
|
G.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", G.innerText = o("paymentAmount");
|
|
4013
4013
|
const y = document.createElement("span");
|
|
4014
|
-
y.className = "wgt:text-2xl wgt:font-bold wgt:leading-6 wgt:text-[#ED1C24]", y.innerText = typeof B == "number" ? B.toLocaleString("vi-VN") + " VND" : B,
|
|
4014
|
+
y.className = "wgt:text-2xl wgt:font-bold wgt:leading-6 wgt:text-[#ED1C24]", y.innerText = typeof B == "number" ? B.toLocaleString("vi-VN") + " VND" : B, l.appendChild(G), l.appendChild(y), T.appendChild(l), Y.appendChild(T);
|
|
4015
4015
|
const K = Ig({
|
|
4016
4016
|
title: o("cancelTransaction"),
|
|
4017
4017
|
className: "wgt:bg-transparent wgt:border wgt:border-primary wgt:text-primary wgt:hover:bg-transparent",
|
|
@@ -4911,7 +4911,7 @@ function dE() {
|
|
|
4911
4911
|
if (!Q.isValid(c))
|
|
4912
4912
|
throw new Error("Invalid QR Code version");
|
|
4913
4913
|
typeof u == "undefined" && (u = B.BYTE);
|
|
4914
|
-
const Y = A.getSymbolTotalCodewords(c),
|
|
4914
|
+
const Y = A.getSymbolTotalCodewords(c), T = E.getTotalCodewordsCount(c, f), k = (Y - T) * 8;
|
|
4915
4915
|
if (u === B.MIXED) return k;
|
|
4916
4916
|
const q = k - a(u, c);
|
|
4917
4917
|
switch (u) {
|
|
@@ -5116,8 +5116,8 @@ function FE() {
|
|
|
5116
5116
|
D.hasOwnProperty(w) && (c = D[w], f = r + c, u = t[w], Y = typeof t[w] == "undefined", (Y || u > f) && (t[w] = f, n.push(w, f), Q[w] = a));
|
|
5117
5117
|
}
|
|
5118
5118
|
if (typeof B != "undefined" && typeof t[B] == "undefined") {
|
|
5119
|
-
var
|
|
5120
|
-
throw new Error(
|
|
5119
|
+
var T = ["Could not find a path from ", C, " to ", B, "."].join("");
|
|
5120
|
+
throw new Error(T);
|
|
5121
5121
|
}
|
|
5122
5122
|
return Q;
|
|
5123
5123
|
},
|
|
@@ -5173,13 +5173,13 @@ var OC;
|
|
|
5173
5173
|
function OE() {
|
|
5174
5174
|
return OC || (OC = 1, function(g) {
|
|
5175
5175
|
const A = og(), E = RE(), C = YE(), B = JE(), Q = XE(), t = AQ(), n = ag(), I = FE();
|
|
5176
|
-
function a(
|
|
5177
|
-
return unescape(encodeURIComponent(
|
|
5176
|
+
function a(T) {
|
|
5177
|
+
return unescape(encodeURIComponent(T)).length;
|
|
5178
5178
|
}
|
|
5179
|
-
function w(
|
|
5179
|
+
function w(T, k, q) {
|
|
5180
5180
|
const P = [];
|
|
5181
5181
|
let x;
|
|
5182
|
-
for (; (x =
|
|
5182
|
+
for (; (x = T.exec(q)) !== null; )
|
|
5183
5183
|
P.push({
|
|
5184
5184
|
data: x[0],
|
|
5185
5185
|
index: x.index,
|
|
@@ -5188,10 +5188,10 @@ function OE() {
|
|
|
5188
5188
|
});
|
|
5189
5189
|
return P;
|
|
5190
5190
|
}
|
|
5191
|
-
function r(
|
|
5192
|
-
const k = w(t.NUMERIC, A.NUMERIC,
|
|
5191
|
+
function r(T) {
|
|
5192
|
+
const k = w(t.NUMERIC, A.NUMERIC, T), q = w(t.ALPHANUMERIC, A.ALPHANUMERIC, T);
|
|
5193
5193
|
let P, x;
|
|
5194
|
-
return n.isKanjiModeEnabled() ? (P = w(t.BYTE, A.BYTE,
|
|
5194
|
+
return n.isKanjiModeEnabled() ? (P = w(t.BYTE, A.BYTE, T), x = w(t.KANJI, A.KANJI, T)) : (P = w(t.BYTE_KANJI, A.BYTE, T), x = []), k.concat(q, P, x).sort(function(i, s) {
|
|
5195
5195
|
return i.index - s.index;
|
|
5196
5196
|
}).map(function(i) {
|
|
5197
5197
|
return {
|
|
@@ -5201,28 +5201,28 @@ function OE() {
|
|
|
5201
5201
|
};
|
|
5202
5202
|
});
|
|
5203
5203
|
}
|
|
5204
|
-
function D(
|
|
5204
|
+
function D(T, k) {
|
|
5205
5205
|
switch (k) {
|
|
5206
5206
|
case A.NUMERIC:
|
|
5207
|
-
return E.getBitsLength(
|
|
5207
|
+
return E.getBitsLength(T);
|
|
5208
5208
|
case A.ALPHANUMERIC:
|
|
5209
|
-
return C.getBitsLength(
|
|
5209
|
+
return C.getBitsLength(T);
|
|
5210
5210
|
case A.KANJI:
|
|
5211
|
-
return Q.getBitsLength(
|
|
5211
|
+
return Q.getBitsLength(T);
|
|
5212
5212
|
case A.BYTE:
|
|
5213
|
-
return B.getBitsLength(
|
|
5213
|
+
return B.getBitsLength(T);
|
|
5214
5214
|
}
|
|
5215
5215
|
}
|
|
5216
|
-
function c(
|
|
5217
|
-
return
|
|
5216
|
+
function c(T) {
|
|
5217
|
+
return T.reduce(function(k, q) {
|
|
5218
5218
|
const P = k.length - 1 >= 0 ? k[k.length - 1] : null;
|
|
5219
5219
|
return P && P.mode === q.mode ? (k[k.length - 1].data += q.data, k) : (k.push(q), k);
|
|
5220
5220
|
}, []);
|
|
5221
5221
|
}
|
|
5222
|
-
function f(
|
|
5222
|
+
function f(T) {
|
|
5223
5223
|
const k = [];
|
|
5224
|
-
for (let q = 0; q <
|
|
5225
|
-
const P =
|
|
5224
|
+
for (let q = 0; q < T.length; q++) {
|
|
5225
|
+
const P = T[q];
|
|
5226
5226
|
switch (P.mode) {
|
|
5227
5227
|
case A.NUMERIC:
|
|
5228
5228
|
k.push([
|
|
@@ -5251,17 +5251,17 @@ function OE() {
|
|
|
5251
5251
|
}
|
|
5252
5252
|
return k;
|
|
5253
5253
|
}
|
|
5254
|
-
function u(
|
|
5254
|
+
function u(T, k) {
|
|
5255
5255
|
const q = {}, P = { start: {} };
|
|
5256
5256
|
let x = ["start"];
|
|
5257
|
-
for (let v = 0; v <
|
|
5258
|
-
const i =
|
|
5257
|
+
for (let v = 0; v < T.length; v++) {
|
|
5258
|
+
const i = T[v], s = [];
|
|
5259
5259
|
for (let M = 0; M < i.length; M++) {
|
|
5260
5260
|
const J = i[M], F = "" + v + M;
|
|
5261
5261
|
s.push(F), q[F] = { node: J, lastCount: 0 }, P[F] = {};
|
|
5262
5262
|
for (let X = 0; X < x.length; X++) {
|
|
5263
|
-
const
|
|
5264
|
-
q[
|
|
5263
|
+
const l = x[X];
|
|
5264
|
+
q[l] && q[l].node.mode === J.mode ? (P[l][F] = D(q[l].lastCount + J.length, J.mode) - D(q[l].lastCount, J.mode), q[l].lastCount += J.length) : (q[l] && (q[l].lastCount = J.length), P[l][F] = D(J.length, J.mode) + 4 + A.getCharCountIndicator(J.mode, k));
|
|
5265
5265
|
}
|
|
5266
5266
|
}
|
|
5267
5267
|
x = s;
|
|
@@ -5270,21 +5270,21 @@ function OE() {
|
|
|
5270
5270
|
P[x[v]].end = 0;
|
|
5271
5271
|
return { map: P, table: q };
|
|
5272
5272
|
}
|
|
5273
|
-
function Y(
|
|
5273
|
+
function Y(T, k) {
|
|
5274
5274
|
let q;
|
|
5275
|
-
const P = A.getBestModeForData(
|
|
5275
|
+
const P = A.getBestModeForData(T);
|
|
5276
5276
|
if (q = A.from(k, P), q !== A.BYTE && q.bit < P.bit)
|
|
5277
|
-
throw new Error('"' +
|
|
5277
|
+
throw new Error('"' + T + '" cannot be encoded with mode ' + A.toString(q) + `.
|
|
5278
5278
|
Suggested mode is: ` + A.toString(P));
|
|
5279
5279
|
switch (q === A.KANJI && !n.isKanjiModeEnabled() && (q = A.BYTE), q) {
|
|
5280
5280
|
case A.NUMERIC:
|
|
5281
|
-
return new E(
|
|
5281
|
+
return new E(T);
|
|
5282
5282
|
case A.ALPHANUMERIC:
|
|
5283
|
-
return new C(
|
|
5283
|
+
return new C(T);
|
|
5284
5284
|
case A.KANJI:
|
|
5285
|
-
return new Q(
|
|
5285
|
+
return new Q(T);
|
|
5286
5286
|
case A.BYTE:
|
|
5287
|
-
return new B(
|
|
5287
|
+
return new B(T);
|
|
5288
5288
|
}
|
|
5289
5289
|
}
|
|
5290
5290
|
g.fromArray = function(k) {
|
|
@@ -5312,10 +5312,10 @@ function GE() {
|
|
|
5312
5312
|
const s = v.size, M = Q.getPositions(i);
|
|
5313
5313
|
for (let J = 0; J < M.length; J++) {
|
|
5314
5314
|
const F = M[J][0], X = M[J][1];
|
|
5315
|
-
for (let
|
|
5316
|
-
if (!(F +
|
|
5315
|
+
for (let l = -1; l <= 7; l++)
|
|
5316
|
+
if (!(F + l <= -1 || s <= F + l))
|
|
5317
5317
|
for (let G = -1; G <= 7; G++)
|
|
5318
|
-
X + G <= -1 || s <= X + G || (
|
|
5318
|
+
X + G <= -1 || s <= X + G || (l >= 0 && l <= 6 && (G === 0 || G === 6) || G >= 0 && G <= 6 && (l === 0 || l === 6) || l >= 2 && l <= 4 && G >= 2 && G <= 4 ? v.set(F + l, X + G, !0, !0) : v.set(F + l, X + G, !1, !0));
|
|
5319
5319
|
}
|
|
5320
5320
|
}
|
|
5321
5321
|
function f(v) {
|
|
@@ -5330,17 +5330,17 @@ function GE() {
|
|
|
5330
5330
|
for (let M = 0; M < s.length; M++) {
|
|
5331
5331
|
const J = s[M][0], F = s[M][1];
|
|
5332
5332
|
for (let X = -2; X <= 2; X++)
|
|
5333
|
-
for (let
|
|
5334
|
-
X === -2 || X === 2 ||
|
|
5333
|
+
for (let l = -2; l <= 2; l++)
|
|
5334
|
+
X === -2 || X === 2 || l === -2 || l === 2 || X === 0 && l === 0 ? v.set(J + X, F + l, !0, !0) : v.set(J + X, F + l, !1, !0);
|
|
5335
5335
|
}
|
|
5336
5336
|
}
|
|
5337
5337
|
function Y(v, i) {
|
|
5338
5338
|
const s = v.size, M = a.getEncodedBits(i);
|
|
5339
5339
|
let J, F, X;
|
|
5340
|
-
for (let
|
|
5341
|
-
J = Math.floor(
|
|
5340
|
+
for (let l = 0; l < 18; l++)
|
|
5341
|
+
J = Math.floor(l / 3), F = l % 3 + s - 8 - 3, X = (M >> l & 1) === 1, v.set(J, F, X, !0), v.set(F, J, X, !0);
|
|
5342
5342
|
}
|
|
5343
|
-
function
|
|
5343
|
+
function T(v, i, s) {
|
|
5344
5344
|
const M = v.size, J = w.getEncodedBits(i, s);
|
|
5345
5345
|
let F, X;
|
|
5346
5346
|
for (F = 0; F < 15; F++)
|
|
@@ -5350,12 +5350,12 @@ function GE() {
|
|
|
5350
5350
|
function k(v, i) {
|
|
5351
5351
|
const s = v.size;
|
|
5352
5352
|
let M = -1, J = s - 1, F = 7, X = 0;
|
|
5353
|
-
for (let
|
|
5354
|
-
for (
|
|
5353
|
+
for (let l = s - 1; l > 0; l -= 2)
|
|
5354
|
+
for (l === 6 && l--; ; ) {
|
|
5355
5355
|
for (let G = 0; G < 2; G++)
|
|
5356
|
-
if (!v.isReserved(J,
|
|
5356
|
+
if (!v.isReserved(J, l - G)) {
|
|
5357
5357
|
let y = !1;
|
|
5358
|
-
X < i.length && (y = (i[X] >>> F & 1) === 1), v.set(J,
|
|
5358
|
+
X < i.length && (y = (i[X] >>> F & 1) === 1), v.set(J, l - G, y), F--, F === -1 && (X++, F = 7);
|
|
5359
5359
|
}
|
|
5360
5360
|
if (J += M, J < 0 || s <= J) {
|
|
5361
5361
|
J -= M, M = -M;
|
|
@@ -5371,13 +5371,13 @@ function GE() {
|
|
|
5371
5371
|
const J = g.getSymbolTotalCodewords(v), F = n.getTotalCodewordsCount(v, i), X = (J - F) * 8;
|
|
5372
5372
|
for (M.getLengthInBits() + 4 <= X && M.put(0, 4); M.getLengthInBits() % 8 !== 0; )
|
|
5373
5373
|
M.putBit(0);
|
|
5374
|
-
const
|
|
5375
|
-
for (let G = 0; G <
|
|
5374
|
+
const l = (X - M.getLengthInBits()) / 8;
|
|
5375
|
+
for (let G = 0; G < l; G++)
|
|
5376
5376
|
M.put(G % 2 ? 17 : 236, 8);
|
|
5377
5377
|
return P(M, v, i);
|
|
5378
5378
|
}
|
|
5379
5379
|
function P(v, i, s) {
|
|
5380
|
-
const M = g.getSymbolTotalCodewords(i), J = n.getTotalCodewordsCount(i, s), F = M - J, X = n.getBlocksCount(i, s),
|
|
5380
|
+
const M = g.getSymbolTotalCodewords(i), J = n.getTotalCodewordsCount(i, s), F = M - J, X = n.getBlocksCount(i, s), l = M % X, G = X - l, y = Math.floor(M / X), K = Math.floor(F / X), R = K + 1, e = y - K, h = new I(e);
|
|
5381
5381
|
let m = 0;
|
|
5382
5382
|
const H = new Array(X), d = new Array(X);
|
|
5383
5383
|
let b = 0;
|
|
@@ -5421,11 +5421,11 @@ The chosen QR Code version cannot contain this amount of data.
|
|
|
5421
5421
|
Minimum version required to store current data is: ` + F + `.
|
|
5422
5422
|
`
|
|
5423
5423
|
);
|
|
5424
|
-
const X = q(i, s, J),
|
|
5425
|
-
return c(G, i), f(G), u(G, i),
|
|
5424
|
+
const X = q(i, s, J), l = g.getSymbolSize(i), G = new C(l);
|
|
5425
|
+
return c(G, i), f(G), u(G, i), T(G, s, 0), i >= 7 && Y(G, i), k(G, X), isNaN(M) && (M = t.getBestMask(
|
|
5426
5426
|
G,
|
|
5427
|
-
|
|
5428
|
-
)), t.applyMask(M, G),
|
|
5427
|
+
T.bind(null, G, s)
|
|
5428
|
+
)), t.applyMask(M, G), T(G, s, M), {
|
|
5429
5429
|
modules: G,
|
|
5430
5430
|
version: i,
|
|
5431
5431
|
errorCorrectionLevel: s,
|
|
@@ -5486,8 +5486,8 @@ function gQ() {
|
|
|
5486
5486
|
for (let c = 0; c < a; c++) {
|
|
5487
5487
|
let f = (D * a + c) * 4, u = Q.color.light;
|
|
5488
5488
|
if (D >= w && c >= w && D < a - w && c < a - w) {
|
|
5489
|
-
const Y = Math.floor((D - w) / I),
|
|
5490
|
-
u = r[n[Y * t +
|
|
5489
|
+
const Y = Math.floor((D - w) / I), T = Math.floor((c - w) / I);
|
|
5490
|
+
u = r[n[Y * t + T] ? 1 : 0];
|
|
5491
5491
|
}
|
|
5492
5492
|
C[f++] = u.r, C[f++] = u.g, C[f++] = u.b, C[f] = u.a;
|
|
5493
5493
|
}
|
|
@@ -5602,7 +5602,7 @@ function KE(n) {
|
|
|
5602
5602
|
const {
|
|
5603
5603
|
container: u,
|
|
5604
5604
|
open: Y,
|
|
5605
|
-
close:
|
|
5605
|
+
close: T
|
|
5606
5606
|
} = rB();
|
|
5607
5607
|
f.appendChild(u);
|
|
5608
5608
|
const k = document.createElement("div");
|
|
@@ -5654,16 +5654,16 @@ function KE(n) {
|
|
|
5654
5654
|
packages: R.packages,
|
|
5655
5655
|
promotionCodes: R.promotionCodes
|
|
5656
5656
|
})).orderId;
|
|
5657
|
-
d !== r && (r = d, Q(d), yield
|
|
5657
|
+
d !== r && (r = d, Q(d), yield l(d), M());
|
|
5658
5658
|
} catch (H) {
|
|
5659
5659
|
console.error("Error creating order:", H), cg(o("errorCreatingOrder") || "Failed to create order");
|
|
5660
5660
|
return;
|
|
5661
5661
|
} finally {
|
|
5662
|
-
|
|
5662
|
+
T();
|
|
5663
5663
|
}
|
|
5664
5664
|
});
|
|
5665
5665
|
}
|
|
5666
|
-
function
|
|
5666
|
+
function l(R) {
|
|
5667
5667
|
return Z(this, null, function* () {
|
|
5668
5668
|
var e, h, m, H;
|
|
5669
5669
|
if (D) {
|
|
@@ -5724,11 +5724,11 @@ function KE(n) {
|
|
|
5724
5724
|
}
|
|
5725
5725
|
);
|
|
5726
5726
|
} finally {
|
|
5727
|
-
|
|
5727
|
+
T(), D = !1;
|
|
5728
5728
|
}
|
|
5729
5729
|
});
|
|
5730
5730
|
}
|
|
5731
|
-
r && (yield
|
|
5731
|
+
r && (yield l(r));
|
|
5732
5732
|
let G = !1;
|
|
5733
5733
|
function y() {
|
|
5734
5734
|
G = !navigator.onLine, console.log("Network status changed:", G ? "offline" : "online");
|
|
@@ -5815,8 +5815,8 @@ function UE({
|
|
|
5815
5815
|
u.className = "wgt:text-sm wgt:leading-relaxed wgt:text-strong-950", u.innerText = o("notice2"), f.appendChild(u);
|
|
5816
5816
|
const Y = document.createElement("div");
|
|
5817
5817
|
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);
|
|
5818
|
-
const
|
|
5819
|
-
|
|
5818
|
+
const T = document.createElement("div");
|
|
5819
|
+
T.className = "wgt:flex wgt:items-center wgt:gap-2 wgt:text-sm wgt:text-strong-950", Y.appendChild(T);
|
|
5820
5820
|
const k = document.createElement("div");
|
|
5821
5821
|
k.innerHTML = `
|
|
5822
5822
|
<svg
|
|
@@ -5836,9 +5836,9 @@ function UE({
|
|
|
5836
5836
|
stroke-linejoin="round"
|
|
5837
5837
|
/>
|
|
5838
5838
|
</svg>
|
|
5839
|
-
`,
|
|
5839
|
+
`, T.appendChild(k);
|
|
5840
5840
|
const q = DQ(sB(), C, Q), P = document.createElement("span");
|
|
5841
|
-
P.innerHTML = `${o("hotlineDomestic")} <b>${(q == null ? void 0 : q.hotline) || ""}</b> ${o("hotlineDesc")} `,
|
|
5841
|
+
P.innerHTML = `${o("hotlineDomestic")} <b>${(q == null ? void 0 : q.hotline) || ""}</b> ${o("hotlineDesc")} `, T.appendChild(P);
|
|
5842
5842
|
const x = document.createElement("div");
|
|
5843
5843
|
x.className = "wgt:flex wgt:items-center wgt:gap-2 wgt:text-sm wgt:text-strong-950", Y.appendChild(x);
|
|
5844
5844
|
const v = document.createElement("div");
|
|
@@ -5882,10 +5882,10 @@ function UE({
|
|
|
5882
5882
|
F.className = "wgt:flex wgt:items-center wgt:gap-4", n.appendChild(F);
|
|
5883
5883
|
const X = document.createElement("div");
|
|
5884
5884
|
X.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", X.innerText = "3", F.appendChild(X);
|
|
5885
|
-
const
|
|
5886
|
-
|
|
5885
|
+
const l = document.createElement("p");
|
|
5886
|
+
l.className = "wgt:text-sm wgt:leading-relaxed wgt:text-strong-950", l.appendChild(document.createTextNode(o("notice3.1") + " "));
|
|
5887
5887
|
const G = document.createElement("a");
|
|
5888
|
-
G.className = "wgt:text-primary wgt:font-semibold wgt:hover:underline wgt:cursor-pointer", G.textContent = o("settings") + " ", G.href = B, G.target = "_blank",
|
|
5888
|
+
G.className = "wgt:text-primary wgt:font-semibold wgt:hover:underline wgt:cursor-pointer", G.textContent = o("settings") + " ", G.href = B, G.target = "_blank", l.appendChild(G), l.appendChild(document.createTextNode(o("notice3.2") + " ")), F.appendChild(l);
|
|
5889
5889
|
const y = document.createElement("div");
|
|
5890
5890
|
y.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(y);
|
|
5891
5891
|
const K = document.createElement("div");
|
|
@@ -6049,14 +6049,18 @@ function gI(g) {
|
|
|
6049
6049
|
}
|
|
6050
6050
|
};
|
|
6051
6051
|
}
|
|
6052
|
-
function oB(g, A, E) {
|
|
6052
|
+
function oB(g, A, E, C = !1) {
|
|
6053
6053
|
return Z(this, null, function* () {
|
|
6054
6054
|
try {
|
|
6055
|
-
|
|
6056
|
-
|
|
6057
|
-
|
|
6058
|
-
|
|
6059
|
-
|
|
6055
|
+
if (!C) {
|
|
6056
|
+
E(!0, null);
|
|
6057
|
+
return;
|
|
6058
|
+
}
|
|
6059
|
+
const B = yield xQ(g, A, "HDTT");
|
|
6060
|
+
let Q = null;
|
|
6061
|
+
B.isNewCustomer || (Q = yield dQ(g, A)), E(B.isNewCustomer, Q);
|
|
6062
|
+
} catch (B) {
|
|
6063
|
+
console.error("Error checking new customer:", B), E(!0, null);
|
|
6060
6064
|
}
|
|
6061
6065
|
});
|
|
6062
6066
|
}
|
|
@@ -6117,7 +6121,7 @@ function EI(g, A, E, C, B, Q) {
|
|
|
6117
6121
|
idCardBack: null,
|
|
6118
6122
|
packages: [],
|
|
6119
6123
|
promotionCodes: []
|
|
6120
|
-
}, Y = !0,
|
|
6124
|
+
}, Y = !0, T = !Q, k = null, q = null, P = null, x = null, v = 0, i = null, s = null, M = null;
|
|
6121
6125
|
function J() {
|
|
6122
6126
|
f = n[0], u = {
|
|
6123
6127
|
eInvoiceRegistration: {
|
|
@@ -6205,11 +6209,10 @@ function EI(g, A, E, C, B, Q) {
|
|
|
6205
6209
|
function X() {
|
|
6206
6210
|
J(), c = 1, r(c, I()), y(c);
|
|
6207
6211
|
}
|
|
6208
|
-
function
|
|
6212
|
+
function l() {
|
|
6209
6213
|
typeof window != "undefined" && window.scrollTo({
|
|
6210
6214
|
top: 0,
|
|
6211
6215
|
behavior: "smooth"
|
|
6212
|
-
// smooth scrolling animation
|
|
6213
6216
|
});
|
|
6214
6217
|
}
|
|
6215
6218
|
function G(d, b) {
|
|
@@ -6239,17 +6242,34 @@ function EI(g, A, E, C, B, Q) {
|
|
|
6239
6242
|
N.route,
|
|
6240
6243
|
(W = (EA = u == null ? void 0 : u.eInvoiceRegistration) == null ? void 0 : EA.organization) == null ? void 0 : W.taxCode,
|
|
6241
6244
|
(U, nA) => {
|
|
6242
|
-
G(nA);
|
|
6243
|
-
}
|
|
6245
|
+
T = U, G(nA);
|
|
6246
|
+
},
|
|
6247
|
+
Q
|
|
6244
6248
|
);
|
|
6245
6249
|
})
|
|
6246
6250
|
},
|
|
6251
|
+
// formProps: {
|
|
6252
|
+
// isNewCustomer,
|
|
6253
|
+
// handleCheckNewCustomer: (provider, taxCode, callback) => {
|
|
6254
|
+
// return handleCheckNewCustomer(
|
|
6255
|
+
// provider,
|
|
6256
|
+
// taxCode,
|
|
6257
|
+
// callback,
|
|
6258
|
+
// isRenewal,
|
|
6259
|
+
// );
|
|
6260
|
+
// },
|
|
6261
|
+
// updateRegistrationData,
|
|
6262
|
+
// onSubmit: (data) => {
|
|
6263
|
+
// registrationData.eInvoiceRegistration = {
|
|
6264
|
+
// ...registrationData.eInvoiceRegistration,
|
|
6265
|
+
// ...data.eInvoiceRegistration,
|
|
6266
|
+
// };
|
|
6247
6267
|
formProps: {
|
|
6248
|
-
isNewCustomer:
|
|
6268
|
+
isNewCustomer: T,
|
|
6249
6269
|
handleCheckNewCustomer: oB,
|
|
6250
6270
|
updateRegistrationData: G,
|
|
6251
6271
|
onSubmit: (N) => {
|
|
6252
|
-
u.eInvoiceRegistration = rA(rA({}, u.eInvoiceRegistration), N.eInvoiceRegistration), u.logo = N.logo || null, u.license = N.license || null, u.idCard = N.idCard || null, u.idCardBack = N.idCardBack || null, u.provider = f.route, c = 2, r(c, I()), y(c),
|
|
6272
|
+
u.eInvoiceRegistration = rA(rA({}, u.eInvoiceRegistration), N.eInvoiceRegistration), u.logo = N.logo || null, u.license = N.license || null, u.idCard = N.idCard || null, u.idCardBack = N.idCardBack || null, u.provider = f.route, c = 2, r(c, I()), y(c), l();
|
|
6253
6273
|
},
|
|
6254
6274
|
registrationData: u,
|
|
6255
6275
|
theme: B || "default",
|
|
@@ -6269,10 +6289,10 @@ function EI(g, A, E, C, B, Q) {
|
|
|
6269
6289
|
} else if (d === 2) {
|
|
6270
6290
|
const { container: b } = yield iE({
|
|
6271
6291
|
onNext: () => Z(null, null, function* () {
|
|
6272
|
-
c = 3, r(c, I()), y(c),
|
|
6292
|
+
c = 3, r(c, I()), y(c), l();
|
|
6273
6293
|
}),
|
|
6274
6294
|
onPrev: () => {
|
|
6275
|
-
c = 1, r(c, I()), y(c),
|
|
6295
|
+
c = 1, r(c, I()), y(c), l();
|
|
6276
6296
|
},
|
|
6277
6297
|
setSelectedInitPackage: (N) => {
|
|
6278
6298
|
q = N;
|
|
@@ -6305,16 +6325,16 @@ function EI(g, A, E, C, B, Q) {
|
|
|
6305
6325
|
theme: B,
|
|
6306
6326
|
selectedProvider: f,
|
|
6307
6327
|
registrationData: u,
|
|
6308
|
-
isNewCustomer:
|
|
6328
|
+
isNewCustomer: T
|
|
6309
6329
|
});
|
|
6310
6330
|
D(b);
|
|
6311
6331
|
} else if (d === 3) {
|
|
6312
6332
|
const { container: b } = yield KE({
|
|
6313
6333
|
onNext: () => {
|
|
6314
|
-
c = 4, r(c, I()), y(c),
|
|
6334
|
+
c = 4, r(c, I()), y(c), l();
|
|
6315
6335
|
},
|
|
6316
6336
|
onPrev: () => {
|
|
6317
|
-
c = 2, r(c, I()), y(c),
|
|
6337
|
+
c = 2, r(c, I()), y(c), l();
|
|
6318
6338
|
},
|
|
6319
6339
|
step: 3,
|
|
6320
6340
|
checkoutProps: {
|
|
@@ -6332,7 +6352,7 @@ function EI(g, A, E, C, B, Q) {
|
|
|
6332
6352
|
selectedPromotions: s,
|
|
6333
6353
|
totalAmountText: v,
|
|
6334
6354
|
onCancel: () => {
|
|
6335
|
-
c = 2, r(c, I()), y(c),
|
|
6355
|
+
c = 2, r(c, I()), y(c), l();
|
|
6336
6356
|
},
|
|
6337
6357
|
onResetToStep1: X
|
|
6338
6358
|
},
|
|
@@ -6345,7 +6365,7 @@ function EI(g, A, E, C, B, Q) {
|
|
|
6345
6365
|
const { container: b } = UE({
|
|
6346
6366
|
orderId: k || "",
|
|
6347
6367
|
onPrev: () => {
|
|
6348
|
-
c = 3, r(c, I()), y(c),
|
|
6368
|
+
c = 3, r(c, I()), y(c), l();
|
|
6349
6369
|
},
|
|
6350
6370
|
onReturnHome: A || (() => {
|
|
6351
6371
|
}),
|
|
@@ -6358,15 +6378,16 @@ function EI(g, A, E, C, B, Q) {
|
|
|
6358
6378
|
});
|
|
6359
6379
|
}
|
|
6360
6380
|
a.updateTitle(
|
|
6361
|
-
|
|
6381
|
+
T ? o("eInvoiceRegister") : o("eInvoiceRenewal")
|
|
6362
6382
|
);
|
|
6363
6383
|
const { container: K, open: R } = rB();
|
|
6364
6384
|
Y && (D(K), R()), yield oB(
|
|
6365
6385
|
f.route,
|
|
6366
6386
|
(H = (m = u == null ? void 0 : u.eInvoiceRegistration) == null ? void 0 : m.organization) == null ? void 0 : H.taxCode,
|
|
6367
6387
|
(d, b) => Z(null, null, function* () {
|
|
6368
|
-
Y = !1, G(b);
|
|
6369
|
-
})
|
|
6388
|
+
Y = !1, T = d, G(b);
|
|
6389
|
+
}),
|
|
6390
|
+
Q
|
|
6370
6391
|
);
|
|
6371
6392
|
const e = BQ(
|
|
6372
6393
|
() => {
|