@invoice-sdk/widget 1.120.0 → 1.120.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.
- package/dist/{index-s-u_RqX7.js → index-CdN3aILt.js} +2 -2
- package/dist/{index-Dwm5GXG-.js → index-DveBzjNY.js} +3 -3
- package/dist/index.esm.js +1 -1
- package/dist/index.umd.js +21 -21
- package/dist/{loading-CMCk5aav.js → loading-pdqPXs86.js} +2 -2
- package/dist/{widget-Ca5n6Fsq.js → widget-DbDXoK_-.js} +463 -477
- package/package.json +1 -1
|
@@ -35,8 +35,8 @@ var sn = (t, n, e) => new Promise((c, h) => {
|
|
|
35
35
|
}, o = (u) => u.done ? c(u.value) : Promise.resolve(u.value).then(a, A);
|
|
36
36
|
o((e = e.apply(t, n)).next());
|
|
37
37
|
});
|
|
38
|
-
import { t as g, g as _h, a as $h, b as Pt, s as n0, c as Jt, d as Tc, e as xc, f as dc, m as wc, h as pc, i as Cc, v as fc } from "./index-
|
|
39
|
-
import { c as vt, a as c0, g as t0, b as Xc, f as Vn, d as Bc, e as e0, h as Nc, i as Ec, j as Hc, k as yc, l as Pc, m as kc, n as vc } from "./loading-
|
|
38
|
+
import { t as g, g as _h, a as $h, b as Pt, s as n0, c as Jt, d as Tc, e as xc, f as dc, m as wc, h as pc, i as Cc, v as fc } from "./index-DveBzjNY.js";
|
|
39
|
+
import { c as vt, a as c0, g as t0, b as Xc, f as Vn, d as Bc, e as e0, h as Nc, i as Ec, j as Hc, k as yc, l as Pc, m as kc, n as vc } from "./loading-pdqPXs86.js";
|
|
40
40
|
import { g as nc } from "./_commonjsHelpers-bAxELxBV.js";
|
|
41
41
|
function lh({ steps: t = [], currentStep: n = 1 } = {}) {
|
|
42
42
|
const e = document.createElement("div");
|
|
@@ -903,7 +903,7 @@ const Mc = ({
|
|
|
903
903
|
f.className = "wgt:text-red-500 wgt:ml-1", f.innerText = "*", V.appendChild(f), I.appendChild(V);
|
|
904
904
|
const N = document.createElement("select");
|
|
905
905
|
N.className = `${l} wgt:@max-2xl:w-full wgt:w-40`, N.title = g("invoiceTypeTooltip", "Loại hóa đơn");
|
|
906
|
-
const
|
|
906
|
+
const G = {
|
|
907
907
|
T: g("invoiceTypeT", "T (Đăng ký)"),
|
|
908
908
|
D: g("invoiceTypeD", "D (Tài sản)"),
|
|
909
909
|
L: g("invoiceTypeL", "L (CQT)"),
|
|
@@ -915,7 +915,7 @@ const Mc = ({
|
|
|
915
915
|
X: g("invoiceTypeX", "X (Thương mại)")
|
|
916
916
|
};
|
|
917
917
|
u.forEach((L) => {
|
|
918
|
-
N.append(new Option(
|
|
918
|
+
N.append(new Option(G[L], L));
|
|
919
919
|
}), I.appendChild(N), s.append(I);
|
|
920
920
|
const F = document.createElement("div");
|
|
921
921
|
F.className = "wgt:w-full wgt:flex wgt:flex-col wgt:items-start wgt:space-y-2";
|
|
@@ -1112,11 +1112,11 @@ function Kc() {
|
|
|
1112
1112
|
return T.isDisabled && m.push("is-disabled"), T.isToday && m.push("is-today"), T.isSelected && (m.push("is-selected"), P = "true"), T.hasEvent && m.push("has-event"), T.isInRange && m.push("is-inrange"), T.isStartRange && m.push("is-startrange"), T.isEndRange && m.push("is-endrange"), '<td data-day="' + T.day + '" class="' + m.join(" ") + '" aria-selected="' + P + '"><button class="pika-button pika-day" type="button" data-pika-year="' + T.year + '" data-pika-month="' + T.month + '" data-pika-day="' + T.day + '">' + T.day + "</button></td>";
|
|
1113
1113
|
}, v = function(T, m) {
|
|
1114
1114
|
T.setHours(0, 0, 0, 0);
|
|
1115
|
-
var P = T.getDate(), H = T.getDay(), L = m, J = L - 1, D = 7,
|
|
1116
|
-
return (
|
|
1115
|
+
var P = T.getDate(), H = T.getDay(), L = m, J = L - 1, D = 7, _ = function(U) {
|
|
1116
|
+
return (U + D - 1) % D;
|
|
1117
1117
|
};
|
|
1118
|
-
T.setDate(P + J -
|
|
1119
|
-
var
|
|
1118
|
+
T.setDate(P + J - _(H));
|
|
1119
|
+
var nn = new Date(T.getFullYear(), 0, L), R = 1440 * 60 * 1e3, W = (T.getTime() - nn.getTime()) / R, S = 1 + Math.round((W - J + _(nn.getDay())) / D);
|
|
1120
1120
|
return S;
|
|
1121
1121
|
}, I = function(T, m, P, H) {
|
|
1122
1122
|
var L = new Date(P, m, T), J = c ? e(L).isoWeek() : v(L, H);
|
|
@@ -1130,13 +1130,13 @@ function Kc() {
|
|
|
1130
1130
|
for (T.showWeekNumber && P.push("<th></th>"), m = 0; m < 7; m++)
|
|
1131
1131
|
P.push('<th scope="col"><abbr title="' + C(T, m) + '">' + C(T, m, !0) + "</abbr></th>");
|
|
1132
1132
|
return "<thead><tr>" + (T.isRTL ? P.reverse() : P).join("") + "</tr></thead>";
|
|
1133
|
-
},
|
|
1134
|
-
var D,
|
|
1135
|
-
for (
|
|
1136
|
-
|
|
1137
|
-
for (
|
|
1138
|
-
D >= R.minYear &&
|
|
1139
|
-
return
|
|
1133
|
+
}, G = function(T, m, P, H, L, J) {
|
|
1134
|
+
var D, _, nn, R = T._o, W = P === R.minYear, S = P === R.maxYear, U = '<div id="' + J + '" class="pika-title" role="heading" aria-live="assertive">', ln, fn, mn = !0, Rn = !0;
|
|
1135
|
+
for (nn = [], D = 0; D < 12; D++)
|
|
1136
|
+
nn.push('<option value="' + (P === L ? D - m : 12 + D - m) + '"' + (D === H ? ' selected="selected"' : "") + (W && D < R.minMonth || S && D > R.maxMonth ? ' disabled="disabled"' : "") + ">" + R.i18n.months[D] + "</option>");
|
|
1137
|
+
for (ln = '<div class="pika-label">' + R.i18n.months[H] + '<select class="pika-select pika-select-month" tabindex="-1">' + nn.join("") + "</select></div>", l(R.yearRange) ? (D = R.yearRange[0], _ = R.yearRange[1] + 1) : (D = P - R.yearRange, _ = 1 + P + R.yearRange), nn = []; D < _ && D <= R.maxYear; D++)
|
|
1138
|
+
D >= R.minYear && nn.push('<option value="' + D + '"' + (D === P ? ' selected="selected"' : "") + ">" + D + "</option>");
|
|
1139
|
+
return fn = '<div class="pika-label">' + P + R.yearSuffix + '<select class="pika-select pika-select-year" tabindex="-1">' + nn.join("") + "</select></div>", R.showMonthAfterYear ? U += fn + ln : U += ln + fn, W && (H === 0 || R.minMonth >= H) && (mn = !1), S && (H === 11 || R.maxMonth <= H) && (Rn = !1), m === 0 && (U += '<button class="pika-prev' + (mn ? "" : " is-disabled") + '" type="button">' + R.i18n.previousMonth + "</button>"), m === T._o.numberOfMonths - 1 && (U += '<button class="pika-next' + (Rn ? "" : " is-disabled") + '" type="button">' + R.i18n.nextMonth + "</button>"), U += "</div>";
|
|
1140
1140
|
}, F = function(T, m, P) {
|
|
1141
1141
|
return '<table cellpadding="0" cellspacing="0" class="pika-table" role="grid" aria-labelledby="' + P + '">' + N(T) + f(m) + "</table>";
|
|
1142
1142
|
}, z = function(T) {
|
|
@@ -1352,38 +1352,38 @@ function Kc() {
|
|
|
1352
1352
|
*/
|
|
1353
1353
|
draw: function(T) {
|
|
1354
1354
|
if (!(!this._v && !T)) {
|
|
1355
|
-
var m = this._o, P = m.minYear, H = m.maxYear, L = m.minMonth, J = m.maxMonth, D = "",
|
|
1355
|
+
var m = this._o, P = m.minYear, H = m.maxYear, L = m.minMonth, J = m.maxMonth, D = "", _;
|
|
1356
1356
|
this._y <= P && (this._y = P, !isNaN(L) && this._m < L && (this._m = L)), this._y >= H && (this._y = H, !isNaN(J) && this._m > J && (this._m = J));
|
|
1357
|
-
for (var
|
|
1358
|
-
|
|
1357
|
+
for (var nn = 0; nn < m.numberOfMonths; nn++)
|
|
1358
|
+
_ = "pika-title-" + Math.random().toString(36).replace(/[^a-z]+/g, "").substr(0, 2), D += '<div class="pika-lendar">' + G(this, nn, this.calendars[nn].year, this.calendars[nn].month, this.calendars[0].year, _) + this.render(this.calendars[nn].year, this.calendars[nn].month, _) + "</div>";
|
|
1359
1359
|
this.el.innerHTML = D, m.bound && m.field.type !== "hidden" && A(function() {
|
|
1360
1360
|
m.trigger.focus();
|
|
1361
1361
|
}, 1), typeof this._o.onDraw == "function" && this._o.onDraw(this), m.bound && m.field.setAttribute("aria-label", m.ariaLabel);
|
|
1362
1362
|
}
|
|
1363
1363
|
},
|
|
1364
1364
|
adjustPosition: function() {
|
|
1365
|
-
var T, m, P, H, L, J, D,
|
|
1365
|
+
var T, m, P, H, L, J, D, _, nn, R, W, S;
|
|
1366
1366
|
if (!this._o.container) {
|
|
1367
|
-
if (this.el.style.position = "absolute", T = this._o.trigger, m = T, P = this.el.offsetWidth, H = this.el.offsetHeight, L = window.innerWidth || a.documentElement.clientWidth, J = window.innerHeight || a.documentElement.clientHeight, D = window.pageYOffset || a.body.scrollTop || a.documentElement.scrollTop,
|
|
1368
|
-
R = T.getBoundingClientRect(),
|
|
1367
|
+
if (this.el.style.position = "absolute", T = this._o.trigger, m = T, P = this.el.offsetWidth, H = this.el.offsetHeight, L = window.innerWidth || a.documentElement.clientWidth, J = window.innerHeight || a.documentElement.clientHeight, D = window.pageYOffset || a.body.scrollTop || a.documentElement.scrollTop, W = !0, S = !0, typeof T.getBoundingClientRect == "function")
|
|
1368
|
+
R = T.getBoundingClientRect(), _ = R.left + window.pageXOffset, nn = R.bottom + window.pageYOffset;
|
|
1369
1369
|
else
|
|
1370
|
-
for (
|
|
1371
|
-
|
|
1372
|
-
(this._o.reposition &&
|
|
1370
|
+
for (_ = m.offsetLeft, nn = m.offsetTop + m.offsetHeight; m = m.offsetParent; )
|
|
1371
|
+
_ += m.offsetLeft, nn += m.offsetTop;
|
|
1372
|
+
(this._o.reposition && _ + P > L || this._o.position.indexOf("right") > -1 && _ - P + T.offsetWidth > 0) && (_ = _ - P + T.offsetWidth, W = !1), (this._o.reposition && nn + H > J + D || this._o.position.indexOf("top") > -1 && nn - H - T.offsetHeight > 0) && (nn = nn - H - T.offsetHeight, S = !1), this.el.style.left = _ + "px", this.el.style.top = nn + "px", r(this.el, W ? "left-aligned" : "right-aligned"), r(this.el, S ? "bottom-aligned" : "top-aligned"), s(this.el, W ? "right-aligned" : "left-aligned"), s(this.el, S ? "top-aligned" : "bottom-aligned");
|
|
1373
1373
|
}
|
|
1374
1374
|
},
|
|
1375
1375
|
/**
|
|
1376
1376
|
* render HTML for a particular month
|
|
1377
1377
|
*/
|
|
1378
1378
|
render: function(T, m, P) {
|
|
1379
|
-
var H = this._o, L = /* @__PURE__ */ new Date(), J = k(T, m), D = new Date(T, m, 1).getDay(),
|
|
1379
|
+
var H = this._o, L = /* @__PURE__ */ new Date(), J = k(T, m), D = new Date(T, m, 1).getDay(), _ = [], nn = [];
|
|
1380
1380
|
b(L), H.firstDay > 0 && (D -= H.firstDay, D < 0 && (D += 7));
|
|
1381
|
-
for (var R = m === 0 ? 11 : m - 1,
|
|
1381
|
+
for (var R = m === 0 ? 11 : m - 1, W = m === 11 ? 0 : m + 1, S = m === 0 ? T - 1 : T, U = m === 11 ? T + 1 : T, ln = k(S, R), fn = J + D, mn = fn; mn > 7; )
|
|
1382
1382
|
mn -= 7;
|
|
1383
|
-
|
|
1384
|
-
for (var Rn = !1, Dn = 0, Sn = 0; Dn <
|
|
1383
|
+
fn += 7 - mn;
|
|
1384
|
+
for (var Rn = !1, Dn = 0, Sn = 0; Dn < fn; Dn++) {
|
|
1385
1385
|
var pn = new Date(T, m, 1 + (Dn - D)), _n = x(this._d) ? p(pn, this._d) : !1, ct = p(pn, L), Zn = H.events.indexOf(pn.toDateString()) !== -1, ot = Dn < D || Dn >= J + D, Mn = 1 + (Dn - D), jn = m, Kn = T, mt = H.startRange && p(H.startRange, pn), qt = H.endRange && p(H.endRange, pn), Un = H.startRange && H.endRange && H.startRange < pn && pn < H.endRange, st = H.minDate && pn < H.minDate || H.maxDate && pn > H.maxDate || H.disableWeekends && d(pn) || H.disableDayFn && H.disableDayFn(pn);
|
|
1386
|
-
ot && (Dn < D ? (Mn =
|
|
1386
|
+
ot && (Dn < D ? (Mn = ln + Mn, jn = R, Kn = S) : (Mn = Mn - J, jn = W, Kn = U));
|
|
1387
1387
|
var Tt = {
|
|
1388
1388
|
day: Mn,
|
|
1389
1389
|
month: jn,
|
|
@@ -1399,9 +1399,9 @@ function Kc() {
|
|
|
1399
1399
|
showDaysInNextAndPreviousMonths: H.showDaysInNextAndPreviousMonths,
|
|
1400
1400
|
enableSelectionDaysInNextAndPreviousMonths: H.enableSelectionDaysInNextAndPreviousMonths
|
|
1401
1401
|
};
|
|
1402
|
-
H.pickWholeWeek && _n && (Rn = !0),
|
|
1402
|
+
H.pickWholeWeek && _n && (Rn = !0), nn.push(y(Tt)), ++Sn === 7 && (H.showWeekNumber && nn.unshift(I(Dn - D, m, T, H.firstWeekOfYearMinDays)), _.push(V(nn, H.isRTL, H.pickWholeWeek, Rn)), nn = [], Sn = 0, Rn = !1);
|
|
1403
1403
|
}
|
|
1404
|
-
return F(H,
|
|
1404
|
+
return F(H, _, P);
|
|
1405
1405
|
},
|
|
1406
1406
|
isVisible: function() {
|
|
1407
1407
|
return this._v;
|
|
@@ -1788,10 +1788,10 @@ function m1(t, n, e, c, h = 0.5) {
|
|
|
1788
1788
|
const i = t.data[o * 37], q = t.data[o * 37 + 1], r = t.data[o * 37 + 2], s = t.data[o * 37 + 3], l = 1, x = 1, d = [i, q, r, s], Q = t.data.slice(o * 37 + 5, o * 37 + 37), k = new Float32Array(25600);
|
|
1789
1789
|
for (let f = 0; f < 160; f++)
|
|
1790
1790
|
for (let N = 0; N < 160; N++) {
|
|
1791
|
-
let
|
|
1791
|
+
let G = 0;
|
|
1792
1792
|
for (let F = 0; F < 32; F++)
|
|
1793
|
-
|
|
1794
|
-
k[f * 160 + N] =
|
|
1793
|
+
G += Q[F] * n.data[F * 160 * 160 + f * 160 + N];
|
|
1794
|
+
k[f * 160 + N] = G > 0 ? 1 : 0;
|
|
1795
1795
|
}
|
|
1796
1796
|
const b = o1();
|
|
1797
1797
|
let p = b.length > 0 ? b[0] : [], w = p.length >= 4 ? p.slice(0, 4) : d;
|
|
@@ -2100,12 +2100,12 @@ function r1(l) {
|
|
|
2100
2100
|
p.className = "wgt:flex wgt:flex-col wgt:gap-4 wgt:w-full";
|
|
2101
2101
|
const w = document.createElement("form");
|
|
2102
2102
|
w.className = "wgt:w-full wgt:max-w-[1072px] wgt:mx-auto wgt:space-y-4", w.addEventListener("submit", (K) => {
|
|
2103
|
-
if (K.preventDefault(), !
|
|
2103
|
+
if (K.preventDefault(), !Bn()) return;
|
|
2104
2104
|
const M = Ln();
|
|
2105
2105
|
typeof t == "function" && t(M);
|
|
2106
2106
|
}), p.appendChild(w);
|
|
2107
|
-
let E, B, X, C, y, v, I, V, f, N,
|
|
2108
|
-
const
|
|
2107
|
+
let E, B, X, C, y, v, I, V, f, N, G, F, z, T, m, P, H, L, J, D, _, nn, R, W, S;
|
|
2108
|
+
const U = document.createElement("button");
|
|
2109
2109
|
E = Jn({
|
|
2110
2110
|
name: "taxCode",
|
|
2111
2111
|
label: g("taxCode"),
|
|
@@ -2119,9 +2119,9 @@ function r1(l) {
|
|
|
2119
2119
|
),
|
|
2120
2120
|
horizontal: !0,
|
|
2121
2121
|
onInput: (K) => {
|
|
2122
|
-
const M = K.target.value,
|
|
2123
|
-
|
|
2124
|
-
const on =
|
|
2122
|
+
const M = K.target.value, cn = M.replace(/[^\d-]/g, "");
|
|
2123
|
+
cn !== M && (K.target.value = cn);
|
|
2124
|
+
const on = cn.trim();
|
|
2125
2125
|
if (n._userHasEditedTaxCode = !0, k(), on.length === 0) {
|
|
2126
2126
|
E.setError(g("errorRequired", "Mã số thuế bắt buộc")), un();
|
|
2127
2127
|
return;
|
|
@@ -2153,7 +2153,7 @@ function r1(l) {
|
|
|
2153
2153
|
readOnly: !1,
|
|
2154
2154
|
horizontal: !0
|
|
2155
2155
|
});
|
|
2156
|
-
const
|
|
2156
|
+
const ln = Gc.map((K) => ({
|
|
2157
2157
|
value: K["cqt quản lý"],
|
|
2158
2158
|
label: K["tên cqt"],
|
|
2159
2159
|
id: K["ma xa"]
|
|
@@ -2162,7 +2162,7 @@ function r1(l) {
|
|
|
2162
2162
|
name: "companyTaxManagement",
|
|
2163
2163
|
label: g("taxAuthority"),
|
|
2164
2164
|
value: ((Tn = (An = n == null ? void 0 : n.eInvoiceRegistration) == null ? void 0 : An.organization) == null ? void 0 : Tn.taxAuthority) || "",
|
|
2165
|
-
options:
|
|
2165
|
+
options: ln,
|
|
2166
2166
|
required: !0,
|
|
2167
2167
|
error: null,
|
|
2168
2168
|
horizontal: !0,
|
|
@@ -2171,7 +2171,7 @@ function r1(l) {
|
|
|
2171
2171
|
K.target.id && a(K.target.id), un();
|
|
2172
2172
|
}
|
|
2173
2173
|
}), h) {
|
|
2174
|
-
const K =
|
|
2174
|
+
const K = ln.find(
|
|
2175
2175
|
(M) => M.id === h
|
|
2176
2176
|
);
|
|
2177
2177
|
K && C.setValue && C.setValue(
|
|
@@ -2180,7 +2180,7 @@ function r1(l) {
|
|
|
2180
2180
|
K.id
|
|
2181
2181
|
);
|
|
2182
2182
|
}
|
|
2183
|
-
|
|
2183
|
+
nn = ih({
|
|
2184
2184
|
label: g("uploadLogo", "Tải logo lên"),
|
|
2185
2185
|
required: !1,
|
|
2186
2186
|
file: (n == null ? void 0 : n.logo) || null,
|
|
@@ -2214,12 +2214,12 @@ function r1(l) {
|
|
|
2214
2214
|
readOnly: !0,
|
|
2215
2215
|
value: ((dn = (xn = n == null ? void 0 : n.eInvoiceRegistration) == null ? void 0 : xn.legalRepresentative) == null ? void 0 : dn.dob) || ""
|
|
2216
2216
|
});
|
|
2217
|
-
let
|
|
2217
|
+
let fn = new Yc({
|
|
2218
2218
|
field: N.inputEl,
|
|
2219
2219
|
format: "DD/MM/YYYY",
|
|
2220
2220
|
toString(K) {
|
|
2221
|
-
const M = String(K.getMonth() + 1).padStart(2, "0"),
|
|
2222
|
-
return `${
|
|
2221
|
+
const M = String(K.getMonth() + 1).padStart(2, "0"), cn = String(K.getDate()).padStart(2, "0"), on = K.getFullYear();
|
|
2222
|
+
return `${cn}/${M}/${on}`;
|
|
2223
2223
|
},
|
|
2224
2224
|
onSelect: (K) => {
|
|
2225
2225
|
N.setError(null), un();
|
|
@@ -2232,7 +2232,7 @@ function r1(l) {
|
|
|
2232
2232
|
showYearDropdown: !0,
|
|
2233
2233
|
yearRange: [1900, (/* @__PURE__ */ new Date()).getFullYear()]
|
|
2234
2234
|
});
|
|
2235
|
-
o(
|
|
2235
|
+
o(fn), G = q0({
|
|
2236
2236
|
name: "repGender",
|
|
2237
2237
|
label: g("gender"),
|
|
2238
2238
|
options: rh.map((K) => ({
|
|
@@ -2256,8 +2256,8 @@ function r1(l) {
|
|
|
2256
2256
|
value: ((In = (Nn = n == null ? void 0 : n.eInvoiceRegistration) == null ? void 0 : Nn.legalRepresentative) == null ? void 0 : In.idCard) || "",
|
|
2257
2257
|
onInput: (K) => {
|
|
2258
2258
|
let M = K.target.value;
|
|
2259
|
-
const
|
|
2260
|
-
if (
|
|
2259
|
+
const cn = M.replace(/[^0-9]/g, "");
|
|
2260
|
+
if (cn !== M && (K.target.value = cn, M = cn), M.trim() === "") {
|
|
2261
2261
|
z.setError(g("errorRequired"));
|
|
2262
2262
|
return;
|
|
2263
2263
|
}
|
|
@@ -2283,8 +2283,8 @@ function r1(l) {
|
|
|
2283
2283
|
value: ((K0 = (D0 = n == null ? void 0 : n.eInvoiceRegistration) == null ? void 0 : D0.legalRepresentative) == null ? void 0 : K0.phone) || "",
|
|
2284
2284
|
onInput: (K) => {
|
|
2285
2285
|
let M = K.target.value;
|
|
2286
|
-
const
|
|
2287
|
-
if (
|
|
2286
|
+
const cn = M.replace(/[^\d+().\-\s]/g, ""), on = cn.replace(/[\s.\-()]/g, "");
|
|
2287
|
+
if (cn !== M && (K.target.value = cn, M = cn), on.trim() === "") {
|
|
2288
2288
|
F.setError(g("errorRequired", "Số điện thoại bắt buộc"));
|
|
2289
2289
|
return;
|
|
2290
2290
|
}
|
|
@@ -2370,14 +2370,14 @@ function r1(l) {
|
|
|
2370
2370
|
);
|
|
2371
2371
|
return;
|
|
2372
2372
|
}
|
|
2373
|
-
const
|
|
2373
|
+
const cn = 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}$");
|
|
2374
2374
|
if (M.length > 254) {
|
|
2375
2375
|
v.setError(
|
|
2376
2376
|
g("errorInvalidEmailLength", "Email quá dài (tối đa 254 ký tự).")
|
|
2377
2377
|
);
|
|
2378
2378
|
return;
|
|
2379
2379
|
}
|
|
2380
|
-
|
|
2380
|
+
cn.test(M) ? v.setError(null) : v.setError(
|
|
2381
2381
|
g("errorInvalidEmail", "Email không hợp lệ")
|
|
2382
2382
|
);
|
|
2383
2383
|
}
|
|
@@ -2391,8 +2391,8 @@ function r1(l) {
|
|
|
2391
2391
|
value: ((U0 = (j0 = n == null ? void 0 : n.eInvoiceRegistration) == null ? void 0 : j0.contactPerson) == null ? void 0 : U0.phone) || "",
|
|
2392
2392
|
onInput: (K) => {
|
|
2393
2393
|
let M = K.target.value;
|
|
2394
|
-
const
|
|
2395
|
-
if (
|
|
2394
|
+
const cn = M.replace(/[^\d+().\-\s]/g, ""), on = cn.replace(/[\s.\-()]/g, "");
|
|
2395
|
+
if (cn !== M && (K.target.value = cn, M = cn), on.trim() === "") {
|
|
2396
2396
|
I.setError(
|
|
2397
2397
|
g("errorRequired", "Số điện thoại bắt buộc")
|
|
2398
2398
|
);
|
|
@@ -2438,14 +2438,14 @@ function r1(l) {
|
|
|
2438
2438
|
});
|
|
2439
2439
|
H = Mc({
|
|
2440
2440
|
isRenewal: s,
|
|
2441
|
-
initialValue: r || ((th = n == null ? void 0 : n.eInvoiceRegistration) == null ? void 0 : th.invoiceSymbol) || "
|
|
2441
|
+
initialValue: r || ((th = n == null ? void 0 : n.eInvoiceRegistration) == null ? void 0 : th.invoiceSymbol) || "1C26MYY",
|
|
2442
2442
|
onChange: (K) => {
|
|
2443
2443
|
mn.inputEl.value = K, un();
|
|
2444
2444
|
}
|
|
2445
2445
|
}), L = document.createElement("input"), L.type = "checkbox", L.name = "hasUsedEInvoiceCB", L.className = "wgt:cursor-pointer", L.checked = (hh = n == null ? void 0 : n.eInvoiceRegistration) == null ? void 0 : hh.hasUsedEInvoice, L.addEventListener("change", (K) => {
|
|
2446
|
-
K.target.checked ? (On.appendChild(
|
|
2446
|
+
K.target.checked ? (On.appendChild(Y), On.appendChild(j)) : (J.checked = !1, _.inputEl.value = "", _.setError(null), D && (D.inputEl.value = "", D.setError(null), j.contains(D.container) && j.removeChild(D.container)), On.removeChild(Y), On.removeChild(j));
|
|
2447
2447
|
}), J = document.createElement("input"), J.type = "checkbox", J.name = "hasUsedEInvoiceBeforeCB", J.className = "wgt:cursor-pointer", J.checked = (ch = n == null ? void 0 : n.eInvoiceRegistration) == null ? void 0 : ch.isUsedEInvoiceBefore, J.addEventListener("change", (K) => {
|
|
2448
|
-
K.target.checked ?
|
|
2448
|
+
K.target.checked ? j.appendChild(D.container) : (D.inputEl.value = "", D.setError(null), j.contains(D.container) && j.removeChild(D.container));
|
|
2449
2449
|
}), D = Jn({
|
|
2450
2450
|
name: "previousOtherProviderNameField",
|
|
2451
2451
|
label: g("providerName", "Tên NCC"),
|
|
@@ -2470,7 +2470,7 @@ function r1(l) {
|
|
|
2470
2470
|
)
|
|
2471
2471
|
);
|
|
2472
2472
|
}
|
|
2473
|
-
}),
|
|
2473
|
+
}), _ = Jn({
|
|
2474
2474
|
name: "previousIssuedByTaxCodeField",
|
|
2475
2475
|
label: g("taxAuthorityCode", "Mã CQT đã phát hành hóa đơn"),
|
|
2476
2476
|
required: !0,
|
|
@@ -2482,12 +2482,12 @@ function r1(l) {
|
|
|
2482
2482
|
onInput: (K) => {
|
|
2483
2483
|
const M = K.target.value;
|
|
2484
2484
|
if (M.trim() === "") {
|
|
2485
|
-
|
|
2485
|
+
_.setError(
|
|
2486
2486
|
g("errorRequired", "Mã CQT bắt buộc")
|
|
2487
2487
|
);
|
|
2488
2488
|
return;
|
|
2489
2489
|
}
|
|
2490
|
-
/^[A-Za-z0-9_]+$/.test(M) ?
|
|
2490
|
+
/^[A-Za-z0-9_]+$/.test(M) ? _.setError(null) : _.setError(
|
|
2491
2491
|
g(
|
|
2492
2492
|
"errorInvalidTaxAuthorityCode",
|
|
2493
2493
|
"Mã CQT không hợp lệ. Chỉ được dùng chữ cái, số và dấu gạch dưới"
|
|
@@ -2501,7 +2501,7 @@ function r1(l) {
|
|
|
2501
2501
|
const M = ++Rn;
|
|
2502
2502
|
E.setError(null);
|
|
2503
2503
|
try {
|
|
2504
|
-
const
|
|
2504
|
+
const cn = yield Xc(K.trim());
|
|
2505
2505
|
let on = {
|
|
2506
2506
|
name: "",
|
|
2507
2507
|
address: "",
|
|
@@ -2510,10 +2510,10 @@ function r1(l) {
|
|
|
2510
2510
|
};
|
|
2511
2511
|
if (M !== Rn)
|
|
2512
2512
|
return;
|
|
2513
|
-
if (E.setError(null), B.inputEl.value =
|
|
2514
|
-
const bn = (Fn) => Fn.toLowerCase().replace(/phường\s+/i, "").replace(/xã\s+/i, "").replace(/quận\s+/i, "").trim(),
|
|
2513
|
+
if (E.setError(null), B.inputEl.value = cn.ten_cty || "", X.inputEl.value = cn.dia_chi || "", cn.cqthue_ql) {
|
|
2514
|
+
const bn = (Fn) => Fn.toLowerCase().replace(/phường\s+/i, "").replace(/xã\s+/i, "").replace(/quận\s+/i, "").trim(), gn = bn(cn.cqthue_ql), En = ln.find((Fn) => {
|
|
2515
2515
|
const ht = bn(Fn.label);
|
|
2516
|
-
return ht.includes(
|
|
2516
|
+
return ht.includes(gn) || gn.includes(ht);
|
|
2517
2517
|
});
|
|
2518
2518
|
En && (C.setValue && C.setValue(
|
|
2519
2519
|
En.value,
|
|
@@ -2522,8 +2522,8 @@ function r1(l) {
|
|
|
2522
2522
|
), on.taxAuthority = En.id || "", C.setDisabled(!1));
|
|
2523
2523
|
} else
|
|
2524
2524
|
C.setValue && C.setValue("", "", ""), C.setDisabled(!1);
|
|
2525
|
-
return on.name =
|
|
2526
|
-
} catch (
|
|
2525
|
+
return on.name = cn.ten_cty || "", on.address = cn.dia_chi || "", on.taxCode = K, E.setError(null), on;
|
|
2526
|
+
} catch (cn) {
|
|
2527
2527
|
M === Rn && (Xt.error(
|
|
2528
2528
|
g("errorFetchTaxInfo", "Lỗi khi lấy thông tin mã số thuế."),
|
|
2529
2529
|
{
|
|
@@ -2546,7 +2546,7 @@ function r1(l) {
|
|
|
2546
2546
|
const _n = document.createElement("div");
|
|
2547
2547
|
_n.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", Sn.appendChild(_n), _n.appendChild(E.container), _n.appendChild(B.container), _n.appendChild(X.container), _n.appendChild(C.container);
|
|
2548
2548
|
const ct = document.createElement("div");
|
|
2549
|
-
ct.className = "wgt:w-full wgt:grid wgt:grid-cols-1 wgt:@min-2xl:grid-cols-2 wgt:space-x-4", Sn.appendChild(ct), ct.appendChild(
|
|
2549
|
+
ct.className = "wgt:w-full wgt:grid wgt:grid-cols-1 wgt:@min-2xl:grid-cols-2 wgt:space-x-4", Sn.appendChild(ct), ct.appendChild(nn.container), w.appendChild(Sn);
|
|
2550
2550
|
const Zn = document.createElement("div");
|
|
2551
2551
|
Zn.className = "wgt:space-y-4";
|
|
2552
2552
|
const ot = document.createElement("h3");
|
|
@@ -2570,56 +2570,56 @@ function r1(l) {
|
|
|
2570
2570
|
function Un(K) {
|
|
2571
2571
|
return new Promise((M) => {
|
|
2572
2572
|
jn = !1, Kn = !1, qt();
|
|
2573
|
-
const
|
|
2574
|
-
z.inputEl.value = "", f.inputEl.value = "", N.inputEl.value = "", P.inputEl.value = "",
|
|
2575
|
-
}, on = (
|
|
2576
|
-
if (!
|
|
2577
|
-
if (/^\d{8}$/.test(
|
|
2578
|
-
const yt =
|
|
2573
|
+
const cn = () => {
|
|
2574
|
+
z.inputEl.value = "", f.inputEl.value = "", N.inputEl.value = "", P.inputEl.value = "", G.selectEl.value = "", m.selectEl.value = "", z.setError(null), f.setError(null), N.setError(null), P.setError(null), G.setError(null), m.setError(null), A && typeof A.setDate == "function" && A.setDate(null);
|
|
2575
|
+
}, on = (gn) => {
|
|
2576
|
+
if (!gn) return "";
|
|
2577
|
+
if (/^\d{8}$/.test(gn)) {
|
|
2578
|
+
const yt = gn.slice(0, 2), m0 = gn.slice(2, 4), lc = gn.slice(4, 8);
|
|
2579
2579
|
return `${yt}/${m0}/${lc}`;
|
|
2580
2580
|
}
|
|
2581
|
-
const [En, Fn, ht] =
|
|
2581
|
+
const [En, Fn, ht] = gn.split("/"), pt = new Date(+ht, +Fn - 1, +En);
|
|
2582
2582
|
if (isNaN(pt)) return "";
|
|
2583
2583
|
const Ct = String(pt.getDate()).padStart(2, "0"), Gt = String(pt.getMonth() + 1).padStart(2, "0"), Rt = pt.getFullYear();
|
|
2584
2584
|
return `${Ct}/${Gt}/${Rt}`;
|
|
2585
2585
|
}, bn = new Image();
|
|
2586
2586
|
bn.src = URL.createObjectURL(K), bn.onload = () => sn(null, null, function* () {
|
|
2587
2587
|
try {
|
|
2588
|
-
const
|
|
2589
|
-
if (
|
|
2588
|
+
const gn = yield i1(bn).then((En) => JSON.parse(En).status !== "success" ? (jn = !0, Kn = !1, cn(), qt(), null) : JSON.parse(En).data);
|
|
2589
|
+
if (gn || M({ success: !1, reason: "No data detected" }), gn) {
|
|
2590
2590
|
jn = !1, Kn = !0, qt();
|
|
2591
|
-
const Fn = Object.values(
|
|
2592
|
-
|
|
2591
|
+
const Fn = Object.values(gn).every((yt) => !yt);
|
|
2592
|
+
cn(), Fn && (lt(
|
|
2593
2593
|
g("errorInvalidCard", "Vui lòng tải lên ảnh CMND/CCCD hợp lệ")
|
|
2594
|
-
),
|
|
2595
|
-
const { address: ht, date_of_birth: pt, full_name: Ct, id_number: Gt, sex: Rt } =
|
|
2594
|
+
), cn(), M({ success: !1, reason: "Invalid card data" }));
|
|
2595
|
+
const { address: ht, date_of_birth: pt, full_name: Ct, id_number: Gt, sex: Rt } = gn;
|
|
2596
2596
|
if (!Gt || !/^\d{12}$/.test(Gt) ? (lt(
|
|
2597
2597
|
g("errorInvalidCard", "Số CCCD phải có 12 chữ số")
|
|
2598
2598
|
), z.inputEl.value = "") : (z.inputEl.value = Gt, z.setError(null)), f.inputEl.value = Ct || "", N.inputEl.value = on(pt), P.inputEl.value = ht || "", Rt) {
|
|
2599
2599
|
const yt = rh.find(
|
|
2600
2600
|
(m0) => m0.label.toLowerCase() === Rt.toLowerCase()
|
|
2601
2601
|
);
|
|
2602
|
-
|
|
2602
|
+
G.selectEl.value = (yt == null ? void 0 : yt.value) || "";
|
|
2603
2603
|
}
|
|
2604
2604
|
}
|
|
2605
|
-
M({ success: !0, data:
|
|
2606
|
-
} catch (
|
|
2607
|
-
console.error("readIdentityCard failed",
|
|
2605
|
+
M({ success: !0, data: gn });
|
|
2606
|
+
} catch (gn) {
|
|
2607
|
+
console.error("readIdentityCard failed", gn);
|
|
2608
2608
|
} finally {
|
|
2609
2609
|
un();
|
|
2610
2610
|
}
|
|
2611
2611
|
});
|
|
2612
2612
|
});
|
|
2613
2613
|
}
|
|
2614
|
-
function st(K, M,
|
|
2614
|
+
function st(K, M, cn) {
|
|
2615
2615
|
const on = new Image();
|
|
2616
2616
|
on.src = URL.createObjectURL(K), on.onload = () => sn(null, null, function* () {
|
|
2617
2617
|
yield u1(on).then((bn) => {
|
|
2618
2618
|
var En, Fn;
|
|
2619
|
-
const
|
|
2620
|
-
M && !((En =
|
|
2619
|
+
const gn = JSON.parse(bn);
|
|
2620
|
+
M && !((En = gn == null ? void 0 : gn.data) != null && En.isFront) ? lt(
|
|
2621
2621
|
g("errorInvalidCard", "Vui lòng tải lên ảnh CMND/CCCD hợp lệ")
|
|
2622
|
-
) :
|
|
2622
|
+
) : cn && !((Fn = gn == null ? void 0 : gn.data) != null && Fn.isBack) && u0(
|
|
2623
2623
|
g("errorInvalidCard", "Vui lòng tải lên ảnh CMND/CCCD hợp lệ")
|
|
2624
2624
|
);
|
|
2625
2625
|
});
|
|
@@ -2637,12 +2637,12 @@ function r1(l) {
|
|
|
2637
2637
|
frontFile: n == null ? void 0 : n.idCard,
|
|
2638
2638
|
backFile: n == null ? void 0 : n.idCardBack,
|
|
2639
2639
|
onFrontChange: (K) => sn(null, null, function* () {
|
|
2640
|
-
var
|
|
2641
|
-
if (
|
|
2640
|
+
var cn, on;
|
|
2641
|
+
if (W = K, st(K, !0, !1), xt() || dt() || !o0()) {
|
|
2642
2642
|
jn = !1, Kn = !1, qt(), un();
|
|
2643
2643
|
return;
|
|
2644
2644
|
}
|
|
2645
|
-
if ((on = (
|
|
2645
|
+
if ((on = (cn = n == null ? void 0 : n.eInvoiceRegistration) == null ? void 0 : cn.legalRepresentative) == null ? void 0 : on.idCard) {
|
|
2646
2646
|
un();
|
|
2647
2647
|
return;
|
|
2648
2648
|
}
|
|
@@ -2666,7 +2666,7 @@ function r1(l) {
|
|
|
2666
2666
|
const It = document.createElement("div");
|
|
2667
2667
|
It.className = "wgt:space-y-4", It.appendChild(f.container);
|
|
2668
2668
|
const Nt = document.createElement("div");
|
|
2669
|
-
Nt.className = "wgt:grid wgt:grid-cols-1 wgt:@min-2xl:grid-cols-2 wgt:gap-4", It.appendChild(Nt), Nt.appendChild(N.container), Nt.appendChild(
|
|
2669
|
+
Nt.className = "wgt:grid wgt:grid-cols-1 wgt:@min-2xl:grid-cols-2 wgt:gap-4", It.appendChild(Nt), Nt.appendChild(N.container), Nt.appendChild(G.container), Mn.appendChild(It);
|
|
2670
2670
|
const nt = document.createElement("div");
|
|
2671
2671
|
nt.className = "wgt:grid wgt:grid-cols-1 wgt:@min-2xl:grid-cols-4 wgt:gap-4 wgt:items-start", nt.appendChild(z.container), nt.appendChild(T.container), nt.appendChild(F.container), nt.appendChild(m.container), Zn.appendChild(Mn), Zn.appendChild(nt), Zn.appendChild(P.container), Zn.appendChild(R.container);
|
|
2672
2672
|
const Et = document.createElement("ul");
|
|
@@ -2697,20 +2697,20 @@ function r1(l) {
|
|
|
2697
2697
|
"hasUsedEInvoice",
|
|
2698
2698
|
"Bạn đã sử dụng hoá đơn điện tử?"
|
|
2699
2699
|
), kn.appendChild(Vt), s || On.appendChild(kn), L.checked = s, L.disabled = s;
|
|
2700
|
-
const
|
|
2701
|
-
if (
|
|
2702
|
-
|
|
2700
|
+
const Y = document.createElement("div");
|
|
2701
|
+
if (Y.className = "wgt:flex wgt:gap-3 wgt:items-center wgt:text-sm wgt:text-strong-950 ", !s) {
|
|
2702
|
+
Y.appendChild(J);
|
|
2703
2703
|
const K = document.createElement("h4");
|
|
2704
2704
|
K.className = "wgt:font-semibold wgt:italic", K.innerText = g(
|
|
2705
2705
|
"hasUsedEInvoiceBefore",
|
|
2706
2706
|
"Bạn đang sử dụng nhà NCC hoá đơn điện tử khác M-invoice không?"
|
|
2707
|
-
),
|
|
2707
|
+
), Y.appendChild(K);
|
|
2708
2708
|
}
|
|
2709
|
-
const U = document.createElement("div");
|
|
2710
|
-
U.className = "wgt:w-full wgt:flex wgt:flex-row-reverse wgt:space-x-4 wgt:gap-4 wgt:items-start wgt:justify-start wgt:@max-2xl:flex-col wgt:@max-2xl:flex-col-reverse", U.appendChild(Z.container);
|
|
2711
2709
|
const j = document.createElement("div");
|
|
2712
|
-
j.className = "wgt:flex wgt:
|
|
2713
|
-
|
|
2710
|
+
j.className = "wgt:w-full wgt:flex wgt:flex-row-reverse wgt:space-x-4 wgt:gap-4 wgt:items-start wgt:justify-start wgt:@max-2xl:flex-col wgt:@max-2xl:flex-col-reverse", j.appendChild(_.container);
|
|
2711
|
+
const Z = document.createElement("div");
|
|
2712
|
+
Z.className = "wgt:flex wgt:items-center wgt:space-x-2 wgt:mt-4";
|
|
2713
|
+
let tn = !0;
|
|
2714
2714
|
const an = document.createElement("div");
|
|
2715
2715
|
an.className = [
|
|
2716
2716
|
"wgt:w-4",
|
|
@@ -2728,28 +2728,28 @@ function r1(l) {
|
|
|
2728
2728
|
].join(" ");
|
|
2729
2729
|
const $ = "http://www.w3.org/2000/svg", en = document.createElementNS($, "svg");
|
|
2730
2730
|
en.setAttribute("viewBox", "0 0 24 24"), en.setAttribute("class", "wgt:w-4 wgt:h-4 wgt:text-white");
|
|
2731
|
-
const
|
|
2732
|
-
|
|
2731
|
+
const hn = document.createElementNS($, "path");
|
|
2732
|
+
hn.setAttribute("fill-rule", "evenodd"), hn.setAttribute("clip-rule", "evenodd"), hn.setAttribute(
|
|
2733
2733
|
"d",
|
|
2734
2734
|
"M5.23 12.03a.75.75 0 011.06.02L10 15.94l7.71-7.71a.75.75 0 111.06 1.06l-8.24 8.24a.75.75 0 01-1.06 0L5.21 13.09a.75.75 0 01.02-1.06z"
|
|
2735
|
-
),
|
|
2735
|
+
), hn.setAttribute("fill", "white"), en.appendChild(hn), an.appendChild(en);
|
|
2736
2736
|
const qn = document.createElement("label");
|
|
2737
2737
|
qn.className = "wgt:text-sm wgt:text-strong-950 wgt:leading-tight", qn.appendChild(
|
|
2738
2738
|
document.createTextNode(g("agreeWith", "Tôi đồng ý với ") + " ")
|
|
2739
2739
|
);
|
|
2740
2740
|
const rn = (K) => {
|
|
2741
2741
|
const M = document.createElement("button");
|
|
2742
|
-
return M.className = "wgt:text-primary wgt:font-semibold wgt:hover:underline wgt:cursor-pointer", M.textContent = K, M.onclick = (
|
|
2743
|
-
|
|
2742
|
+
return M.className = "wgt:text-primary wgt:font-semibold wgt:hover:underline wgt:cursor-pointer", M.textContent = K, M.onclick = (cn) => {
|
|
2743
|
+
cn.preventDefault(), typeof c == "function" && c();
|
|
2744
2744
|
}, M;
|
|
2745
|
-
},
|
|
2745
|
+
}, Xn = bc(e);
|
|
2746
2746
|
qn.appendChild(
|
|
2747
2747
|
rn(g("termsAndUsagePolicy", "Điều khoản và Chính sách sử dụng"))
|
|
2748
|
-
), qn.appendChild(document.createTextNode(` ${g("of", "của")} ${
|
|
2749
|
-
|
|
2748
|
+
), qn.appendChild(document.createTextNode(` ${g("of", "của")} ${Xn}.`)), Z.appendChild(an), Z.appendChild(qn), w.appendChild(Z), an.addEventListener("click", () => {
|
|
2749
|
+
tn = !tn, tn ? (an.classList.add("wgt:bg-primary"), en.classList.remove("wgt:hidden")) : (an.classList.remove("wgt:bg-primary"), en.classList.add("wgt:hidden")), un();
|
|
2750
2750
|
});
|
|
2751
2751
|
const vn = document.createElement("div");
|
|
2752
|
-
vn.className = "wgt:flex wgt:mt-6 wgt:items-center wgt:justify-end wgt:gap-2 ",
|
|
2752
|
+
vn.className = "wgt:flex wgt:mt-6 wgt:items-center wgt:justify-end wgt:gap-2 ", U.type = "submit", U.innerText = g("next"), U.className = [
|
|
2753
2753
|
"wgt:bg-primary",
|
|
2754
2754
|
"wgt:hover:bg-primary-dark",
|
|
2755
2755
|
"wgt:text-text-primary",
|
|
@@ -2760,31 +2760,31 @@ function r1(l) {
|
|
|
2760
2760
|
"wgt:disabled:cursor-not-allowed",
|
|
2761
2761
|
"wgt:cursor-pointer",
|
|
2762
2762
|
"wgt:hover:text-primary-hover-text"
|
|
2763
|
-
].join(" "), vn.appendChild(
|
|
2764
|
-
function
|
|
2765
|
-
const K = Ln(), M = K.eInvoiceRegistration,
|
|
2766
|
-
if (!M.contactPerson.address || !M.organization.name || !M.organization.address || !
|
|
2763
|
+
].join(" "), vn.appendChild(U), p.appendChild(vn);
|
|
2764
|
+
function Bn() {
|
|
2765
|
+
const K = Ln(), M = K.eInvoiceRegistration, cn = (M.organization.taxCode || "").trim();
|
|
2766
|
+
if (!M.contactPerson.address || !M.organization.name || !M.organization.address || !cn || !M.organization.taxAuthority || !M.contactPerson.name || !M.contactPerson.email || !M.contactPerson.phone || !M.legalRepresentative.name || !M.legalRepresentative.dob || !M.legalRepresentative.gender || !M.legalRepresentative.phone || !M.legalRepresentative.idCard || !M.legalRepresentative.permanentAddress || !M.invoiceSymbol || !s && M.hasUsedEInvoice && !M.taxAuthorityCode || M.isUsedEInvoiceBefore && !M.previousEInvoiceProvider || !jt(M.contactPerson.name) || !jt(M.legalRepresentative.name) || !/^[\p{L}0-9\s,.\-/()]*$/u.test(M.contactPerson.address) || !/^[\p{L}0-9\s,.\-/()]*$/u.test(
|
|
2767
2767
|
M.legalRepresentative.permanentAddress
|
|
2768
2768
|
) || M.isUsedEInvoiceBefore && !/^[\p{L}0-9_]+(?: [\p{L}0-9_]+)*$/u.test(M.previousEInvoiceProvider) || !s && M.hasUsedEInvoice && !/^[A-Za-z0-9_]+$/.test(M.taxAuthorityCode))
|
|
2769
2769
|
return !1;
|
|
2770
|
-
const
|
|
2770
|
+
const gn = M.contactPerson.phone.replace(
|
|
2771
2771
|
/[^\d+().\-\s]/g,
|
|
2772
2772
|
""
|
|
2773
2773
|
).replace(
|
|
2774
2774
|
/[\s.\-()]/g,
|
|
2775
2775
|
""
|
|
2776
2776
|
), Fn = M.legalRepresentative.phone.replace(/[^\d+().\-\s]/g, "").replace(/[\s.\-()]/g, ""), ht = /^(?:\+84|0)(?:2\d|3\d|5\d|7\d|8\d|9\d)\d{7}$/;
|
|
2777
|
-
return !(!ht.test(
|
|
2777
|
+
return !(!ht.test(gn) || !ht.test(Fn) || !/^\d{12}$/.test(M.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(M.contactPerson.email) || !/^[1-9][CK]\d{2}[TDLMNBGHX][A-Z]{2}$/.test(M.invoiceSymbol) || !K.license || !K.idCard || !K.idCardBack);
|
|
2778
2778
|
}
|
|
2779
2779
|
function un() {
|
|
2780
2780
|
const K = e === "bvb" && !s && u === !1 && !n._userHasEditedTaxCode;
|
|
2781
|
-
|
|
2781
|
+
U.disabled = !Bn() || !tn || xt() || dt() || nn.getError() || R.getError() || K;
|
|
2782
2782
|
}
|
|
2783
2783
|
function Ln() {
|
|
2784
2784
|
var K, M;
|
|
2785
2785
|
return {
|
|
2786
2786
|
eInvoiceRegistration: {
|
|
2787
|
-
taxAuthorityCode: s ? "1" : (K =
|
|
2787
|
+
taxAuthorityCode: s ? "1" : (K = _ == null ? void 0 : _.getValue()) != null ? K : "",
|
|
2788
2788
|
previousEInvoiceProvider: (M = D == null ? void 0 : D.getValue()) != null ? M : "",
|
|
2789
2789
|
organization: {
|
|
2790
2790
|
name: B == null ? void 0 : B.getValue(),
|
|
@@ -2801,7 +2801,7 @@ function r1(l) {
|
|
|
2801
2801
|
legalRepresentative: {
|
|
2802
2802
|
name: f == null ? void 0 : f.getValue(),
|
|
2803
2803
|
dob: N == null ? void 0 : N.getValue(),
|
|
2804
|
-
gender:
|
|
2804
|
+
gender: G == null ? void 0 : G.getValue(),
|
|
2805
2805
|
phone: F == null ? void 0 : F.getValue(),
|
|
2806
2806
|
idCard: z == null ? void 0 : z.getValue(),
|
|
2807
2807
|
passportNumber: T == null ? void 0 : T.getValue(),
|
|
@@ -2813,8 +2813,8 @@ function r1(l) {
|
|
|
2813
2813
|
invoiceSymbol: H == null ? void 0 : H.getValue()
|
|
2814
2814
|
},
|
|
2815
2815
|
license: R == null ? void 0 : R.getValues(),
|
|
2816
|
-
logo:
|
|
2817
|
-
idCard:
|
|
2816
|
+
logo: nn == null ? void 0 : nn.getValues(),
|
|
2817
|
+
idCard: W,
|
|
2818
2818
|
idCardBack: S
|
|
2819
2819
|
};
|
|
2820
2820
|
}
|
|
@@ -2831,17 +2831,17 @@ function r1(l) {
|
|
|
2831
2831
|
F,
|
|
2832
2832
|
z,
|
|
2833
2833
|
P,
|
|
2834
|
-
|
|
2834
|
+
_,
|
|
2835
2835
|
D
|
|
2836
2836
|
].forEach((K) => {
|
|
2837
2837
|
K.inputEl.addEventListener("input", un);
|
|
2838
|
-
}), [
|
|
2838
|
+
}), [G, C].forEach((K) => {
|
|
2839
2839
|
K.selectEl.addEventListener("change", un);
|
|
2840
2840
|
}), [L, J].forEach((K) => {
|
|
2841
2841
|
K.addEventListener("change", un);
|
|
2842
|
-
}),
|
|
2843
|
-
var bn,
|
|
2844
|
-
if (K.preventDefault(), !
|
|
2842
|
+
}), U.addEventListener("click", (K) => sn(null, null, function* () {
|
|
2843
|
+
var bn, gn;
|
|
2844
|
+
if (K.preventDefault(), !Bn()) return;
|
|
2845
2845
|
const M = E.getValue().trim();
|
|
2846
2846
|
if (!wh(M)) {
|
|
2847
2847
|
E.setError(g("errorInvalidTaxCode", "Mã số thuế không hợp lệ")), Xt.error(g("errorInvalidTaxCode", "Mã số thuế không hợp lệ")), b();
|
|
@@ -2863,13 +2863,13 @@ function r1(l) {
|
|
|
2863
2863
|
}), t(Ln());
|
|
2864
2864
|
return;
|
|
2865
2865
|
}
|
|
2866
|
-
|
|
2867
|
-
let
|
|
2866
|
+
U.disabled = !0;
|
|
2867
|
+
let cn = null, on = !1;
|
|
2868
2868
|
try {
|
|
2869
2869
|
const En = (n == null ? void 0 : n.provider) || "m-invoice";
|
|
2870
2870
|
console.log("Current theme:", e), console.log("Provider being used:", En);
|
|
2871
|
-
const Fn = ((bn = H == null ? void 0 : H.getValue) == null ? void 0 : bn.call(H)) || ((
|
|
2872
|
-
if (
|
|
2871
|
+
const Fn = ((bn = H == null ? void 0 : H.getValue) == null ? void 0 : bn.call(H)) || ((gn = mn == null ? void 0 : mn.inputEl) == null ? void 0 : gn.value) || "", ht = d(Fn);
|
|
2872
|
+
if (cn = (yield c0(En, M, ht)).isNewCustomer, cn)
|
|
2873
2873
|
k();
|
|
2874
2874
|
else {
|
|
2875
2875
|
n._userHasEditedTaxCode = !1;
|
|
@@ -2890,9 +2890,9 @@ function r1(l) {
|
|
|
2890
2890
|
} catch (En) {
|
|
2891
2891
|
on = !0, console.error("Error checking customer:", En);
|
|
2892
2892
|
} finally {
|
|
2893
|
-
|
|
2893
|
+
U.disabled = !1, U.innerText = g("next");
|
|
2894
2894
|
}
|
|
2895
|
-
on ||
|
|
2895
|
+
on || cn === !1 || cn === !0 && (Gn(Wn.STEP1_COMPLETED, {
|
|
2896
2896
|
theme: e,
|
|
2897
2897
|
isRenewal: !1,
|
|
2898
2898
|
isNewCustomer: !0,
|
|
@@ -2900,7 +2900,7 @@ function r1(l) {
|
|
|
2900
2900
|
}), t(Ln()));
|
|
2901
2901
|
}));
|
|
2902
2902
|
const rt = (((uh = (Ah = n == null ? void 0 : n.eInvoiceRegistration) == null ? void 0 : Ah.organization) == null ? void 0 : uh.taxCode) || "").trim();
|
|
2903
|
-
return rt.length >= 10 && Dn(rt), ac($h(), _h().invoiceHubBaseUrl), n != null && n.idCard && (
|
|
2903
|
+
return rt.length >= 10 && Dn(rt), ac($h(), _h().invoiceHubBaseUrl), n != null && n.idCard && (W = n == null ? void 0 : n.idCard), un(), {
|
|
2904
2904
|
container: p,
|
|
2905
2905
|
getValues: Ln
|
|
2906
2906
|
};
|
|
@@ -3030,21 +3030,21 @@ function ph({
|
|
|
3030
3030
|
.hide-scrollbar::-webkit-scrollbar { display: none; }
|
|
3031
3031
|
`, u.appendChild(s);
|
|
3032
3032
|
function l(N) {
|
|
3033
|
-
const
|
|
3034
|
-
return
|
|
3033
|
+
const G = document.createElement("button");
|
|
3034
|
+
return G.type = "button", G.className = "wgt:flex wgt:@max-md:hidden wgt:absolute wgt:z-20 wgt:h-10 wgt:w-10 wgt:items-center wgt:justify-center wgt:rounded-full wgt:bg-white wgt:border wgt:border-soft-200 wgt:shadow wgt:hover:bg-weak-50 wgt:disabled:opacity-50 wgt:disabled:cursor-not-allowed", G.innerHTML = N === "prev" ? `<svg width="18" height="18" viewBox="0 0 24 24" fill="none">
|
|
3035
3035
|
<path d="M15 18L9 12L15 6" stroke="#0E121B" stroke-width="2"
|
|
3036
3036
|
stroke-linecap="round" stroke-linejoin="round"/>
|
|
3037
3037
|
</svg>` : `<svg width="18" height="18" viewBox="0 0 24 24" fill="none">
|
|
3038
3038
|
<path d="M9 6L15 12L9 18" stroke="#0E121B" stroke-width="2"
|
|
3039
3039
|
stroke-linecap="round" stroke-linejoin="round"/>
|
|
3040
|
-
</svg>`,
|
|
3040
|
+
</svg>`, G;
|
|
3041
3041
|
}
|
|
3042
3042
|
const x = l("prev"), d = l("next");
|
|
3043
3043
|
x.style.left = "8px", d.style.right = "8px", i.appendChild(x), i.appendChild(d);
|
|
3044
3044
|
let Q = n, k = e, b = h;
|
|
3045
3045
|
const p = () => window.matchMedia("(max-width: 414px)").matches;
|
|
3046
3046
|
function w() {
|
|
3047
|
-
const N = r.getBoundingClientRect(),
|
|
3047
|
+
const N = r.getBoundingClientRect(), G = i.getBoundingClientRect(), F = N.top - G.top + N.height / 2;
|
|
3048
3048
|
x.style.top = `${F}px`, d.style.top = `${F}px`, x.style.transform = "translateY(-50%)", d.style.transform = "translateY(-50%)";
|
|
3049
3049
|
}
|
|
3050
3050
|
function E() {
|
|
@@ -3067,15 +3067,15 @@ function ph({
|
|
|
3067
3067
|
return;
|
|
3068
3068
|
}
|
|
3069
3069
|
Q.forEach((N) => {
|
|
3070
|
-
const
|
|
3070
|
+
const G = N._id === b, F = k.includes(N.code), { container: z } = x1({
|
|
3071
3071
|
pkg: N,
|
|
3072
3072
|
type: t,
|
|
3073
3073
|
isDiscounted: F,
|
|
3074
3074
|
promotion: c,
|
|
3075
|
-
isSelected:
|
|
3075
|
+
isSelected: G,
|
|
3076
3076
|
isRenew: o,
|
|
3077
3077
|
onSelect: () => {
|
|
3078
|
-
A((a || o) &&
|
|
3078
|
+
A((a || o) && G ? "" : N._id);
|
|
3079
3079
|
}
|
|
3080
3080
|
});
|
|
3081
3081
|
z.classList.add("wgt:snap-start"), r.appendChild(z);
|
|
@@ -3107,8 +3107,8 @@ function ph({
|
|
|
3107
3107
|
setSelectedPackageId(N) {
|
|
3108
3108
|
b = N, C();
|
|
3109
3109
|
},
|
|
3110
|
-
updateData(N,
|
|
3111
|
-
Q = N || Q,
|
|
3110
|
+
updateData(N, G = null, F = null) {
|
|
3111
|
+
Q = N || Q, G !== null && (k = G), F !== null && (b = F), C();
|
|
3112
3112
|
},
|
|
3113
3113
|
updateDiscountedOnly(N) {
|
|
3114
3114
|
k = N, C();
|
|
@@ -3429,19 +3429,19 @@ function E1(B) {
|
|
|
3429
3429
|
console.log("Invoice Symbol", X);
|
|
3430
3430
|
const C = (X == null ? void 0 : X[4]) === "M";
|
|
3431
3431
|
let y = [];
|
|
3432
|
-
function v(
|
|
3433
|
-
return Array.isArray(
|
|
3434
|
-
var
|
|
3435
|
-
return (
|
|
3436
|
-
}) :
|
|
3437
|
-
var
|
|
3438
|
-
return !((
|
|
3432
|
+
function v(Y, j) {
|
|
3433
|
+
return Array.isArray(Y) ? j === "household" ? Y.filter((Z) => {
|
|
3434
|
+
var tn;
|
|
3435
|
+
return (tn = Z == null ? void 0 : Z.code) == null ? void 0 : tn.includes("HKD");
|
|
3436
|
+
}) : Y.filter((Z) => {
|
|
3437
|
+
var tn;
|
|
3438
|
+
return !((tn = Z == null ? void 0 : Z.code) != null && tn.includes("HKD"));
|
|
3439
3439
|
}) : [];
|
|
3440
3440
|
}
|
|
3441
3441
|
let I = "", V = {
|
|
3442
3442
|
company: c ? c._id : null,
|
|
3443
3443
|
household: null
|
|
3444
|
-
}, f = c ? c._id : null, N = h ? h._id : null,
|
|
3444
|
+
}, f = c ? c._id : null, N = h ? h._id : null, G = l ? l.map((Y) => Y) : [], F = [], z = [], T = [], m = [], P = null, H = (p == null ? void 0 : p.qtyRegFee) || 1, L = (p == null ? void 0 : p.qtyInvoicePkg) || 1, J = (p == null ? void 0 : p.qtySignaturePkg) || 1;
|
|
3445
3445
|
function D() {
|
|
3446
3446
|
w && w({
|
|
3447
3447
|
qtyRegFee: H,
|
|
@@ -3449,19 +3449,19 @@ function E1(B) {
|
|
|
3449
3449
|
qtySignaturePkg: J
|
|
3450
3450
|
});
|
|
3451
3451
|
}
|
|
3452
|
-
function
|
|
3453
|
-
return
|
|
3452
|
+
function _(Y) {
|
|
3453
|
+
return Y.find((j) => m.includes(j.code));
|
|
3454
3454
|
}
|
|
3455
|
-
function
|
|
3455
|
+
function nn({ registrationData: Y, onChange: j }) {
|
|
3456
3456
|
var vn;
|
|
3457
|
-
let
|
|
3458
|
-
const
|
|
3459
|
-
|
|
3457
|
+
let Z = ((vn = Y == null ? void 0 : Y.eInvoiceRegistration) == null ? void 0 : vn.businessType) || "company";
|
|
3458
|
+
const tn = document.createElement("div");
|
|
3459
|
+
tn.className = "wgt:flex wgt:items-center wgt:gap-4 wgt:flex-wrap";
|
|
3460
3460
|
const an = document.createElement("div");
|
|
3461
|
-
an.className = "wgt:text-sm wgt:font-medium wgt:text-black", an.innerHTML = `${g("businessRegistrationType") || "Hình thức đăng ký kinh doanh"} <span class="wgt:text-red-500">*</span>`,
|
|
3461
|
+
an.className = "wgt:text-sm wgt:font-medium wgt:text-black", an.innerHTML = `${g("businessRegistrationType") || "Hình thức đăng ký kinh doanh"} <span class="wgt:text-red-500">*</span>`, tn.appendChild(an);
|
|
3462
3462
|
const $ = document.createElement("div");
|
|
3463
|
-
$.className = "wgt:inline-flex wgt:items-center wgt:rounded-xl wgt:bg-white wgt:border wgt:border-soft-200 wgt:p-1 wgt:gap-1",
|
|
3464
|
-
function en(
|
|
3463
|
+
$.className = "wgt:inline-flex wgt:items-center wgt:rounded-xl wgt:bg-white wgt:border wgt:border-soft-200 wgt:p-1 wgt:gap-1", tn.appendChild($);
|
|
3464
|
+
function en(Bn, un) {
|
|
3465
3465
|
const Ln = document.createElement("button");
|
|
3466
3466
|
Ln.type = "button", Ln.className = "wgt:flex wgt:items-center wgt:gap-2 wgt:px-4 wgt:py-2 wgt:rounded-lg wgt:text-sm wgt:font-medium wgt:transition wgt:hover:bg-weak-50";
|
|
3467
3467
|
const rt = document.createElement("span");
|
|
@@ -3469,65 +3469,65 @@ function E1(B) {
|
|
|
3469
3469
|
const tt = document.createElement("span");
|
|
3470
3470
|
tt.className = "wgt:h-2 wgt:w-2 wgt:rounded-full ", tt.style.backgroundColor = "#1e2a7b", tt.style.opacity = "0", rt.appendChild(tt);
|
|
3471
3471
|
const at = document.createElement("span");
|
|
3472
|
-
return at.className = "wgt:text-sm wgt:font-semibold", at.innerText =
|
|
3473
|
-
|
|
3472
|
+
return at.className = "wgt:text-sm wgt:font-semibold", at.innerText = Bn, Ln.appendChild(rt), Ln.appendChild(at), Ln.addEventListener("click", () => {
|
|
3473
|
+
Z = un, Xn(), Y != null && Y.eInvoiceRegistration && (Y.eInvoiceRegistration.businessType = Z), j == null || j(Z);
|
|
3474
3474
|
}), { btn: Ln, inner: tt, textSpan: at, value: un };
|
|
3475
3475
|
}
|
|
3476
|
-
const
|
|
3476
|
+
const hn = en(g("company") || "Doanh nghiệp", "company"), qn = en(
|
|
3477
3477
|
g("householdBusiness") || "Hộ kinh doanh",
|
|
3478
3478
|
"household"
|
|
3479
3479
|
);
|
|
3480
|
-
$.appendChild(
|
|
3481
|
-
function rn(
|
|
3482
|
-
|
|
3483
|
-
const Ln =
|
|
3484
|
-
Ln.classList.toggle("wgt:border-[#1e2a7b]", un), Ln.classList.toggle("wgt:border-[#D0D5DD]", !un),
|
|
3480
|
+
$.appendChild(hn.btn), $.appendChild(qn.btn);
|
|
3481
|
+
function rn(Bn, un) {
|
|
3482
|
+
Bn.btn.classList.toggle("wgt:bg-weak-50", un), Bn.inner.style.opacity = un ? "1" : "0";
|
|
3483
|
+
const Ln = Bn.inner.parentElement;
|
|
3484
|
+
Ln.classList.toggle("wgt:border-[#1e2a7b]", un), Ln.classList.toggle("wgt:border-[#D0D5DD]", !un), Bn.textSpan.style.color = un ? "#1e2a7b" : "", Bn.textSpan.classList.toggle("wgt:text-text-sub-600", !un);
|
|
3485
3485
|
}
|
|
3486
|
-
function
|
|
3487
|
-
rn(
|
|
3486
|
+
function Xn() {
|
|
3487
|
+
rn(hn, Z === "company"), rn(qn, Z === "household");
|
|
3488
3488
|
}
|
|
3489
|
-
return
|
|
3490
|
-
container:
|
|
3491
|
-
getValue: () =>
|
|
3492
|
-
setValue: (
|
|
3493
|
-
|
|
3489
|
+
return Xn(), {
|
|
3490
|
+
container: tn,
|
|
3491
|
+
getValue: () => Z,
|
|
3492
|
+
setValue: (Bn) => {
|
|
3493
|
+
Z = Bn, Xn();
|
|
3494
3494
|
}
|
|
3495
3495
|
};
|
|
3496
3496
|
}
|
|
3497
|
-
function R(
|
|
3498
|
-
return F.find((
|
|
3497
|
+
function R(Y) {
|
|
3498
|
+
return F.find((j) => j._id === Y) || null;
|
|
3499
3499
|
}
|
|
3500
|
-
const
|
|
3501
|
-
|
|
3500
|
+
const W = document.createElement("div");
|
|
3501
|
+
W.className = "wgt:relative wgt:flex wgt:w-full wgt:h-full wgt:flex-col wgt:gap-4 wgt:py-6";
|
|
3502
3502
|
const {
|
|
3503
3503
|
container: S,
|
|
3504
|
-
open:
|
|
3505
|
-
close:
|
|
3504
|
+
open: U,
|
|
3505
|
+
close: ln
|
|
3506
3506
|
} = e0();
|
|
3507
|
-
|
|
3508
|
-
let
|
|
3507
|
+
W.appendChild(S);
|
|
3508
|
+
let fn = null;
|
|
3509
3509
|
if (C) {
|
|
3510
|
-
|
|
3510
|
+
fn = nn({
|
|
3511
3511
|
registrationData: x,
|
|
3512
|
-
onChange: (
|
|
3512
|
+
onChange: (j) => {
|
|
3513
3513
|
var an;
|
|
3514
|
-
const
|
|
3515
|
-
Sn(
|
|
3516
|
-
const
|
|
3517
|
-
if (V[
|
|
3518
|
-
f = V[
|
|
3514
|
+
const Z = v(y, j);
|
|
3515
|
+
Sn(Z || []), ct(Z || []);
|
|
3516
|
+
const tn = j === "company" ? "household" : "company";
|
|
3517
|
+
if (V[tn] = f, V[j])
|
|
3518
|
+
f = V[j];
|
|
3519
3519
|
else {
|
|
3520
|
-
const $ = Z
|
|
3521
|
-
f = $ ? $._id : ((an =
|
|
3520
|
+
const $ = _(Z);
|
|
3521
|
+
f = $ ? $._id : ((an = Z == null ? void 0 : Z[0]) == null ? void 0 : an._id) || null, V[j] = f;
|
|
3522
3522
|
}
|
|
3523
|
-
|
|
3523
|
+
G = [], gt(), Et(), $n(), On(), kn();
|
|
3524
3524
|
}
|
|
3525
3525
|
});
|
|
3526
|
-
const
|
|
3527
|
-
|
|
3526
|
+
const Y = document.createElement("div");
|
|
3527
|
+
Y.className = "wgt:mx-auto wgt:w-full wgt:max-w-[1072px] wgt:px-6 wgt:@max-2xl:px-3", Y.appendChild(fn.container), W.appendChild(Y);
|
|
3528
3528
|
}
|
|
3529
3529
|
const mn = document.createElement("div");
|
|
3530
|
-
mn.className = "wgt:mx-auto wgt:w-full wgt:max-w-[1072px] wgt:flex wgt:flex-col wgt:gap-8 wgt:rounded-3xl wgt:bg-weak-50 wgt:px-6 wgt:py-4 wgt:@max-2xl:px-3 wgt:@max-2xl:py-3 wgt:@max-2xl:gap-6 wgt:@max-2xl:rounded-none",
|
|
3530
|
+
mn.className = "wgt:mx-auto wgt:w-full wgt:max-w-[1072px] wgt:flex wgt:flex-col wgt:gap-8 wgt:rounded-3xl wgt:bg-weak-50 wgt:px-6 wgt:py-4 wgt:@max-2xl:px-3 wgt:@max-2xl:py-3 wgt:@max-2xl:gap-6 wgt:@max-2xl:rounded-none", W.appendChild(mn);
|
|
3531
3531
|
const {
|
|
3532
3532
|
container: Rn,
|
|
3533
3533
|
invoiceSelectorWrapper: Dn,
|
|
@@ -3548,8 +3548,8 @@ function E1(B) {
|
|
|
3548
3548
|
mn.appendChild(Rn);
|
|
3549
3549
|
let Mn = null, jn = null;
|
|
3550
3550
|
if (!E) {
|
|
3551
|
-
const
|
|
3552
|
-
jn =
|
|
3551
|
+
const Y = f1(E);
|
|
3552
|
+
jn = Y.container, Mn = Y.signatureSelectorWrapper, mn.appendChild(jn);
|
|
3553
3553
|
}
|
|
3554
3554
|
const Kn = document.createElement("div");
|
|
3555
3555
|
Kn.className = "wgt:flex wgt:items-center wgt:justify-center wgt:py-4", Kn.innerHTML = `
|
|
@@ -3565,37 +3565,37 @@ function E1(B) {
|
|
|
3565
3565
|
const xt = document.createElement("span");
|
|
3566
3566
|
xt.className = "wgt:text-xl wgt:font-bold wgt:text-primary", xt.innerText = "0 VND", st.appendChild(xt);
|
|
3567
3567
|
const dt = document.createElement("div");
|
|
3568
|
-
dt.className = "wgt:flex wgt:justify-between wgt:gap-2",
|
|
3568
|
+
dt.className = "wgt:flex wgt:justify-between wgt:gap-2", W.appendChild(dt);
|
|
3569
3569
|
const lt = document.createElement("button");
|
|
3570
3570
|
lt.type = "button", lt.innerText = g("back"), lt.className = "wgt:bg-transparent wgt:text-primary wgt:hover:text-primary-dark wgt:hover:bg-transparent wgt:underline", lt.addEventListener("click", n), dt.appendChild(lt);
|
|
3571
|
-
const u0 = (
|
|
3572
|
-
|
|
3573
|
-
const
|
|
3571
|
+
const u0 = (Y, j, Z, tn) => sn(null, null, function* () {
|
|
3572
|
+
U();
|
|
3573
|
+
const hn = x.eInvoiceRegistration, { isUsedEInvoiceBefore: an } = hn, $ = sh(hn, ["isUsedEInvoiceBefore"]);
|
|
3574
3574
|
let en = [
|
|
3575
3575
|
{
|
|
3576
|
-
code:
|
|
3577
|
-
quantity:
|
|
3576
|
+
code: j.code,
|
|
3577
|
+
quantity: j.quantity,
|
|
3578
3578
|
isCashRegister: C
|
|
3579
3579
|
}
|
|
3580
3580
|
];
|
|
3581
|
-
|
|
3582
|
-
code:
|
|
3583
|
-
quantity:
|
|
3581
|
+
Z && en.push({
|
|
3582
|
+
code: Z.code,
|
|
3583
|
+
quantity: Z.quantity,
|
|
3584
3584
|
isCashRegister: C
|
|
3585
|
-
}),
|
|
3586
|
-
code:
|
|
3587
|
-
quantity:
|
|
3585
|
+
}), Y && en.push({
|
|
3586
|
+
code: Y.code,
|
|
3587
|
+
quantity: Y.quantity,
|
|
3588
3588
|
isCashRegister: C
|
|
3589
|
-
}),
|
|
3589
|
+
}), tn.length > 0 && tn.forEach((qn) => {
|
|
3590
3590
|
const rn = T[qn];
|
|
3591
|
-
rn.reward.packageCodes.length > 0 && rn.reward.packageCodes.forEach((
|
|
3591
|
+
rn.reward.packageCodes.length > 0 && rn.reward.packageCodes.forEach((Xn) => {
|
|
3592
3592
|
en.push({
|
|
3593
|
-
code:
|
|
3593
|
+
code: Xn,
|
|
3594
3594
|
quantity: 1,
|
|
3595
3595
|
isCashRegister: C
|
|
3596
3596
|
});
|
|
3597
3597
|
});
|
|
3598
|
-
}), Q(en), k(
|
|
3598
|
+
}), Q(en), k(tn);
|
|
3599
3599
|
try {
|
|
3600
3600
|
const qn = yield Nc({
|
|
3601
3601
|
eInvoiceRegistration: Hn({}, $),
|
|
@@ -3608,13 +3608,13 @@ function E1(B) {
|
|
|
3608
3608
|
x.idCardBack
|
|
3609
3609
|
],
|
|
3610
3610
|
packages: en,
|
|
3611
|
-
promotionCodes:
|
|
3611
|
+
promotionCodes: tn,
|
|
3612
3612
|
isRenew: E,
|
|
3613
3613
|
isCashRegister: C
|
|
3614
|
-
}), rn = qn.orderId,
|
|
3615
|
-
u(rn), q ? q(
|
|
3614
|
+
}), rn = qn.orderId, Xn = qn.amount || 0;
|
|
3615
|
+
u(rn), q ? q(Xn) : console.warn("setOrderAmount is not defined!"), yield new Promise((vn) => setTimeout(vn, 100)), ln(), t();
|
|
3616
3616
|
} catch (qn) {
|
|
3617
|
-
n0(g("errorCreatingOrder") || "Failed to create order"),
|
|
3617
|
+
n0(g("errorCreatingOrder") || "Failed to create order"), ln();
|
|
3618
3618
|
return;
|
|
3619
3619
|
}
|
|
3620
3620
|
}), Ft = vt({
|
|
@@ -3622,40 +3622,40 @@ function E1(B) {
|
|
|
3622
3622
|
title: g("next"),
|
|
3623
3623
|
className: "wgt:text-text-primary wgt:bg-primary",
|
|
3624
3624
|
handleClick: () => sn(null, null, function* () {
|
|
3625
|
-
const
|
|
3625
|
+
const Y = pn().find(
|
|
3626
3626
|
($) => $._id === f
|
|
3627
|
-
),
|
|
3627
|
+
), j = F.find(
|
|
3628
3628
|
($) => $._id === N
|
|
3629
3629
|
);
|
|
3630
|
-
if (!E && !
|
|
3630
|
+
if (!E && !j) {
|
|
3631
3631
|
Xt.error(g("errorSelectSignature") || "Vui lòng chọn gói chữ ký số");
|
|
3632
3632
|
return;
|
|
3633
3633
|
}
|
|
3634
|
-
let
|
|
3635
|
-
!E && !(
|
|
3634
|
+
let Z = null;
|
|
3635
|
+
!E && !(Y != null && Y.withoutInitialFee) ? (Z = Yn(Hn({}, z[0]), {
|
|
3636
3636
|
quantity: H
|
|
3637
|
-
}), a(
|
|
3638
|
-
let
|
|
3639
|
-
A(
|
|
3637
|
+
}), a(Z)) : a(null);
|
|
3638
|
+
let tn = Yn(Hn({}, Y), { quantity: L }), an = j ? Yn(Hn({}, j), { quantity: J }) : null;
|
|
3639
|
+
A(tn), o(an), d(G), D(), w && w({
|
|
3640
3640
|
qtyRegFee: H,
|
|
3641
3641
|
qtyInvoicePkg: L,
|
|
3642
3642
|
qtySignaturePkg: J
|
|
3643
3643
|
}), yield u0(
|
|
3644
|
-
|
|
3645
|
-
|
|
3644
|
+
Z,
|
|
3645
|
+
tn,
|
|
3646
3646
|
an,
|
|
3647
|
-
|
|
3647
|
+
G
|
|
3648
3648
|
);
|
|
3649
3649
|
})
|
|
3650
3650
|
});
|
|
3651
3651
|
dt.appendChild(Ft);
|
|
3652
3652
|
function o0() {
|
|
3653
3653
|
return sn(this, null, function* () {
|
|
3654
|
-
var
|
|
3654
|
+
var Y, j;
|
|
3655
3655
|
try {
|
|
3656
3656
|
const [
|
|
3657
|
-
|
|
3658
|
-
|
|
3657
|
+
Z,
|
|
3658
|
+
tn,
|
|
3659
3659
|
an,
|
|
3660
3660
|
$
|
|
3661
3661
|
] = yield Promise.allSettled([
|
|
@@ -3671,12 +3671,12 @@ function E1(B) {
|
|
|
3671
3671
|
}),
|
|
3672
3672
|
E ? Promise.resolve([]) : Pc({ bank: r })
|
|
3673
3673
|
]);
|
|
3674
|
-
if (
|
|
3674
|
+
if (tn.status === "fulfilled" ? z = tn.value || [] : (console.error(
|
|
3675
3675
|
"Failed to load init packages:",
|
|
3676
|
-
|
|
3676
|
+
tn.reason
|
|
3677
3677
|
), Xt.error(
|
|
3678
3678
|
g("errorLoadingInitPackages") || "Failed to load registration packages"
|
|
3679
|
-
), z = []),
|
|
3679
|
+
), z = []), Z.status === "fulfilled" ? (((Y = Z == null ? void 0 : Z.value) == null ? void 0 : Y.length) > 0 && Z.value.forEach((en) => {
|
|
3680
3680
|
en.codes.length > 0 && (T[en.codes[0].code] = {
|
|
3681
3681
|
id: en.id,
|
|
3682
3682
|
name: en.name,
|
|
@@ -3693,19 +3693,19 @@ function E1(B) {
|
|
|
3693
3693
|
isHidden: !1,
|
|
3694
3694
|
reward: en.reward
|
|
3695
3695
|
});
|
|
3696
|
-
}), Object.keys(T).length > 0 && (
|
|
3696
|
+
}), Object.keys(T).length > 0 && (G = l ? [...l] : [], Ht())) : console.error("Failed to load promotions:", Z.reason), an.status === "fulfilled") {
|
|
3697
3697
|
y = (E ? an.value.filter((qn) => qn.renewPrice !== 0) : an.value) || [];
|
|
3698
|
-
const
|
|
3698
|
+
const hn = C ? v(
|
|
3699
3699
|
y,
|
|
3700
|
-
|
|
3700
|
+
fn.getValue()
|
|
3701
3701
|
) : y;
|
|
3702
|
-
if (Sn(
|
|
3703
|
-
const qn =
|
|
3704
|
-
if (c ? f = c._id : qn ? f = qn._id : f =
|
|
3705
|
-
const rn =
|
|
3702
|
+
if (Sn(hn || []), ct(hn || []), an.value.length > 0) {
|
|
3703
|
+
const qn = _(hn);
|
|
3704
|
+
if (c ? f = c._id : qn ? f = qn._id : f = hn == null ? void 0 : hn[0]._id, C) {
|
|
3705
|
+
const rn = fn.getValue();
|
|
3706
3706
|
V[rn] = f;
|
|
3707
3707
|
}
|
|
3708
|
-
ct(
|
|
3708
|
+
ct(hn);
|
|
3709
3709
|
}
|
|
3710
3710
|
ot();
|
|
3711
3711
|
} else
|
|
@@ -3718,9 +3718,9 @@ function E1(B) {
|
|
|
3718
3718
|
if ($.status === "fulfilled")
|
|
3719
3719
|
if (F = $.value || [], F.length > 0) {
|
|
3720
3720
|
const en = F.find(
|
|
3721
|
-
(
|
|
3721
|
+
(hn) => m.includes(hn.code)
|
|
3722
3722
|
);
|
|
3723
|
-
E ? N = h ? h._id : null : N = h ? h._id : en ? en._id : E ? null : (
|
|
3723
|
+
E ? N = h ? h._id : null : N = h ? h._id : en ? en._id : E ? null : (j = F == null ? void 0 : F.filter((hn) => !hn.isBonusPackage)[0]) == null ? void 0 : j._id;
|
|
3724
3724
|
} else {
|
|
3725
3725
|
if (console.error(
|
|
3726
3726
|
"Failed to load signature packages:",
|
|
@@ -3734,8 +3734,8 @@ function E1(B) {
|
|
|
3734
3734
|
F = [];
|
|
3735
3735
|
}
|
|
3736
3736
|
It();
|
|
3737
|
-
} catch (
|
|
3738
|
-
console.error("Unexpected error during data loading:",
|
|
3737
|
+
} catch (Z) {
|
|
3738
|
+
console.error("Unexpected error during data loading:", Z), Xt.error(g("errorLoadingData") || "Failed to load data", {
|
|
3739
3739
|
autoClose: 5e3,
|
|
3740
3740
|
closeButton: !0,
|
|
3741
3741
|
icon: !0
|
|
@@ -3746,28 +3746,28 @@ function E1(B) {
|
|
|
3746
3746
|
function It() {
|
|
3747
3747
|
gt(), Et(), E || bt(), $n(), On(), kn();
|
|
3748
3748
|
}
|
|
3749
|
-
function Nt(
|
|
3750
|
-
const
|
|
3751
|
-
(
|
|
3752
|
-
), an = m.includes(
|
|
3753
|
-
!
|
|
3754
|
-
(
|
|
3755
|
-
), en = m.includes(
|
|
3749
|
+
function Nt(Y, j, Z) {
|
|
3750
|
+
const tn = Object.values(T).find(
|
|
3751
|
+
(hn) => hn.bank === r && hn.appliedPackages.includes(Y)
|
|
3752
|
+
), an = m.includes(Y) || tn && // !currentPackagePromotion.isDisabled &&
|
|
3753
|
+
!tn.isHidden && !(tn.expiredAt < (/* @__PURE__ */ new Date()).toISOString()) && tn.limit !== tn.used, $ = Object.values(T).find(
|
|
3754
|
+
(hn) => hn.bank === r && hn.appliedPackages.includes(j)
|
|
3755
|
+
), en = m.includes(j) || $ && // !newPackagePromotion.isDisabled &&
|
|
3756
3756
|
!$.isHidden && !($.expiredAt < (/* @__PURE__ */ new Date()).toISOString()) && $.limit !== $.used && $.isActive;
|
|
3757
3757
|
if (an && !en) {
|
|
3758
|
-
const { container:
|
|
3758
|
+
const { container: hn, open: qn } = Jt({
|
|
3759
3759
|
message: g("errorDiscountPackage"),
|
|
3760
3760
|
description: g("errorDiscountPackageDes"),
|
|
3761
3761
|
okLabel: g("ok"),
|
|
3762
3762
|
cancelLabel: g("cancel"),
|
|
3763
|
-
onClose:
|
|
3763
|
+
onClose: Z,
|
|
3764
3764
|
isWarning: !0,
|
|
3765
3765
|
isSuccess: !1,
|
|
3766
3766
|
theme: r
|
|
3767
3767
|
});
|
|
3768
|
-
|
|
3768
|
+
W.appendChild(hn), qn();
|
|
3769
3769
|
} else
|
|
3770
|
-
|
|
3770
|
+
Z();
|
|
3771
3771
|
}
|
|
3772
3772
|
let nt = null;
|
|
3773
3773
|
function Et() {
|
|
@@ -3779,23 +3779,23 @@ function E1(B) {
|
|
|
3779
3779
|
promotion: g("discount"),
|
|
3780
3780
|
selectedPackageId: f,
|
|
3781
3781
|
isRenew: E,
|
|
3782
|
-
handlePackageSelect: (
|
|
3783
|
-
var
|
|
3784
|
-
let
|
|
3782
|
+
handlePackageSelect: (Y) => {
|
|
3783
|
+
var tn, an;
|
|
3784
|
+
let j = (tn = pn().find(
|
|
3785
3785
|
($) => $._id === f
|
|
3786
|
-
)) == null ? void 0 :
|
|
3787
|
-
Nt(
|
|
3788
|
-
if (f =
|
|
3789
|
-
const $ =
|
|
3790
|
-
V[$] =
|
|
3786
|
+
)) == null ? void 0 : tn.code, Z = (an = pn().find(($) => $._id === Y)) == null ? void 0 : an.code;
|
|
3787
|
+
Nt(j, Z, () => {
|
|
3788
|
+
if (f = Y, C && fn) {
|
|
3789
|
+
const $ = fn.getValue();
|
|
3790
|
+
V[$] = Y;
|
|
3791
3791
|
}
|
|
3792
|
-
nt.setSelectedPackageId(
|
|
3792
|
+
nt.setSelectedPackageId(Y), gt(), $n(), On(), kn();
|
|
3793
3793
|
});
|
|
3794
3794
|
}
|
|
3795
3795
|
}), Dn.appendChild(nt.container);
|
|
3796
3796
|
else {
|
|
3797
|
-
const
|
|
3798
|
-
|
|
3797
|
+
const Y = document.createElement("span");
|
|
3798
|
+
Y.className = "wgt:text-text-sub-600", Y.innerText = g("noPackageFound"), Dn.appendChild(Y), nt = null;
|
|
3799
3799
|
}
|
|
3800
3800
|
}
|
|
3801
3801
|
let it = null;
|
|
@@ -3804,39 +3804,39 @@ function E1(B) {
|
|
|
3804
3804
|
if (Mn.innerHTML = "", F.length > 0)
|
|
3805
3805
|
it = ph({
|
|
3806
3806
|
type: "signature",
|
|
3807
|
-
packageOptions: F.filter((
|
|
3807
|
+
packageOptions: F.filter((Y) => !Y.isBonusPackage),
|
|
3808
3808
|
disCountedPackages: m,
|
|
3809
3809
|
promotion: g("gift"),
|
|
3810
3810
|
selectedPackageId: N,
|
|
3811
3811
|
allowDeselect: E,
|
|
3812
|
-
handlePackageSelect: (
|
|
3813
|
-
var
|
|
3814
|
-
let
|
|
3812
|
+
handlePackageSelect: (Y) => {
|
|
3813
|
+
var tn, an;
|
|
3814
|
+
let j = (tn = F.find(
|
|
3815
3815
|
($) => $._id === N
|
|
3816
|
-
)) == null ? void 0 :
|
|
3817
|
-
if (E && N ===
|
|
3816
|
+
)) == null ? void 0 : tn.code, Z = (an = F.find(($) => $._id === Y)) == null ? void 0 : an.code;
|
|
3817
|
+
if (E && N === Y) {
|
|
3818
3818
|
N = null, it.setSelectedPackageId(null), gt(), $n(), On(), kn();
|
|
3819
3819
|
return;
|
|
3820
3820
|
}
|
|
3821
|
-
Nt(
|
|
3822
|
-
N =
|
|
3821
|
+
Nt(j, Z, () => {
|
|
3822
|
+
N = Y, it.setSelectedPackageId(Y), ct(pn()), gt(), $n(), On(), kn();
|
|
3823
3823
|
});
|
|
3824
3824
|
}
|
|
3825
3825
|
}), Mn.appendChild(it.container);
|
|
3826
3826
|
else {
|
|
3827
|
-
const
|
|
3828
|
-
|
|
3827
|
+
const Y = document.createElement("span");
|
|
3828
|
+
Y.className = "wgt:text-text-sub-600", Y.innerText = g("noPackageFound"), Mn.appendChild(Y), it = null;
|
|
3829
3829
|
}
|
|
3830
3830
|
}
|
|
3831
3831
|
const wt = document.createElement("div");
|
|
3832
3832
|
wt.className = "wgt:w-full", mn.appendChild(wt);
|
|
3833
3833
|
function $n() {
|
|
3834
3834
|
Kn.remove(), wt.innerHTML = "";
|
|
3835
|
-
const
|
|
3836
|
-
(
|
|
3835
|
+
const Y = pn().find(
|
|
3836
|
+
(j) => j._id === f
|
|
3837
3837
|
);
|
|
3838
3838
|
if (z.length > 0) {
|
|
3839
|
-
const { container:
|
|
3839
|
+
const { container: j } = d1({
|
|
3840
3840
|
name: "registrationFee",
|
|
3841
3841
|
value: "standard",
|
|
3842
3842
|
feeLabel: `${g("registrationFee")}: ${Vn(
|
|
@@ -3844,80 +3844,80 @@ function E1(B) {
|
|
|
3844
3844
|
)} VND`,
|
|
3845
3845
|
required: !0,
|
|
3846
3846
|
description: z[0][zt(Pt())],
|
|
3847
|
-
isChecked: !E && !(
|
|
3847
|
+
isChecked: !E && !(Y != null && Y.withoutInitialFee)
|
|
3848
3848
|
});
|
|
3849
|
-
wt.appendChild(
|
|
3849
|
+
wt.appendChild(j);
|
|
3850
3850
|
}
|
|
3851
3851
|
}
|
|
3852
3852
|
const zn = document.createElement("div");
|
|
3853
3853
|
zn.className = "promotion-wrapper wgt:w-full wgt:flex wgt:flex-col wgt:gap-4";
|
|
3854
3854
|
function gt() {
|
|
3855
|
-
const
|
|
3855
|
+
const Y = pn().find(
|
|
3856
3856
|
(an) => an._id === f
|
|
3857
|
-
),
|
|
3857
|
+
), j = F.find(
|
|
3858
3858
|
(an) => an._id === N
|
|
3859
|
-
),
|
|
3860
|
-
|
|
3859
|
+
), Z = !E && (z == null ? void 0 : z.length) > 0 && !(Y != null && Y.withoutInitialFee), tn = [];
|
|
3860
|
+
Y != null && Y.code && tn.push(Y.code), j != null && j.code && tn.push(j.code), Z && tn.push("INITIAL_FEE"), Object.keys(T).forEach((an) => {
|
|
3861
3861
|
var vn;
|
|
3862
3862
|
const $ = T[an];
|
|
3863
3863
|
if ($.bank !== r) {
|
|
3864
|
-
$.isHidden = !0,
|
|
3865
|
-
(
|
|
3864
|
+
$.isHidden = !0, G = G.filter(
|
|
3865
|
+
(Bn) => Bn !== $.code
|
|
3866
3866
|
);
|
|
3867
3867
|
return;
|
|
3868
3868
|
}
|
|
3869
|
-
const en = $.expiredAt < (/* @__PURE__ */ new Date()).toISOString(),
|
|
3870
|
-
(
|
|
3871
|
-
)) && !en && !
|
|
3872
|
-
$.isHidden = !
|
|
3873
|
-
(
|
|
3869
|
+
const en = $.expiredAt < (/* @__PURE__ */ new Date()).toISOString(), hn = $.limit <= $.used, qn = !$.isActive, Xn = ((vn = $.appliedPackages) == null ? void 0 : vn.some(
|
|
3870
|
+
(Bn) => tn.includes(Bn)
|
|
3871
|
+
)) && !en && !hn && !qn;
|
|
3872
|
+
$.isHidden = !Xn, Xn ? G.includes($.code) || G.push($.code) : G = G.filter(
|
|
3873
|
+
(Bn) => Bn !== $.code
|
|
3874
3874
|
);
|
|
3875
3875
|
}), Ht();
|
|
3876
3876
|
}
|
|
3877
3877
|
function Ht() {
|
|
3878
3878
|
m = [
|
|
3879
3879
|
...new Set(
|
|
3880
|
-
Object.values(T).filter((
|
|
3881
|
-
(
|
|
3880
|
+
Object.values(T).filter((Y) => Y.bank === r).flatMap(
|
|
3881
|
+
(Y) => Y.appliedPackages.filter((j) => j !== "INITIAL_FEE")
|
|
3882
3882
|
)
|
|
3883
3883
|
)
|
|
3884
3884
|
];
|
|
3885
3885
|
}
|
|
3886
3886
|
function On() {
|
|
3887
3887
|
if (Object.values(T).filter(
|
|
3888
|
-
(
|
|
3888
|
+
(hn) => hn.bank === r
|
|
3889
3889
|
).length === 0) {
|
|
3890
3890
|
mn.contains(zn) && mn.removeChild(zn);
|
|
3891
3891
|
return;
|
|
3892
3892
|
}
|
|
3893
3893
|
zn.innerHTML = "";
|
|
3894
|
-
const
|
|
3895
|
-
|
|
3896
|
-
const
|
|
3897
|
-
|
|
3898
|
-
const
|
|
3899
|
-
|
|
3894
|
+
const j = document.createElement("h3");
|
|
3895
|
+
j.className = "wgt:text-xl wgt:font-bold wgt:text-strong-950", j.innerText = g("applyPromotion"), zn.appendChild(j), mn.appendChild(zn);
|
|
3896
|
+
const Z = document.createElement("div");
|
|
3897
|
+
Z.className = "wgt:w-full wgt:flex wgt:items-center wgt:gap-2 wgt:@max-2xl:flex-col wgt:@max-2xl:items-start";
|
|
3898
|
+
const tn = document.createElement("div");
|
|
3899
|
+
tn.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(tn), G && G.length > 0 && G.filter((qn) => {
|
|
3900
3900
|
const rn = Object.values(T).find(
|
|
3901
|
-
(
|
|
3901
|
+
(Xn) => Xn.code === qn
|
|
3902
3902
|
);
|
|
3903
3903
|
return rn && rn.bank === r;
|
|
3904
3904
|
}).forEach((qn) => {
|
|
3905
3905
|
const rn = document.createElement("div");
|
|
3906
3906
|
rn.className = "wgt:flex wgt:w-fit wgt:h-fit wgt:items-center wgt:gap-2 wgt:px-2 wgt:py-1.5 wgt:rounded-md wgt:bg-primary/10 wgt:border wgt:border-primary wgt:text-sm wgt:font-medium wgt:text-primary", rn.innerText = qn;
|
|
3907
|
-
const
|
|
3907
|
+
const Xn = vt({
|
|
3908
3908
|
type: "button",
|
|
3909
3909
|
title: "x",
|
|
3910
3910
|
handleClick: () => {
|
|
3911
|
-
|
|
3911
|
+
G = G.filter(
|
|
3912
3912
|
(vn) => vn !== qn
|
|
3913
3913
|
), On(), kn();
|
|
3914
3914
|
}
|
|
3915
3915
|
});
|
|
3916
|
-
|
|
3916
|
+
Xn.className = "wgt:w-fit wgt:h-fit wgt:p-0 wgt:bg-transparent wgt:cursor-pointer", Xn.innerHTML = `<svg width="8" height="8" viewBox="0 0 8 8" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3917
3917
|
<path d="M1.17157 1.17163L6.82842 6.82848" stroke="#0E121B" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3918
3918
|
<path d="M1.17158 6.82849L6.82843 1.17163" stroke="#0E121B" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3919
3919
|
</svg>
|
|
3920
|
-
`, rn.appendChild(
|
|
3920
|
+
`, rn.appendChild(Xn), tn.appendChild(rn);
|
|
3921
3921
|
});
|
|
3922
3922
|
const an = vt({
|
|
3923
3923
|
type: "button",
|
|
@@ -3927,20 +3927,20 @@ function E1(B) {
|
|
|
3927
3927
|
console.log("Apply promotion");
|
|
3928
3928
|
}
|
|
3929
3929
|
});
|
|
3930
|
-
|
|
3930
|
+
Z.appendChild(an), zn.appendChild(Z);
|
|
3931
3931
|
const $ = document.createElement("div");
|
|
3932
3932
|
$.className = "wgt:w-full wgt:grid wgt:grid-cols-3 wgt:gap-4 wgt:@max-2xl:flex wgt:@max-2xl:flex-col", zn.appendChild($);
|
|
3933
|
-
const en = Object.values(T).filter((
|
|
3933
|
+
const en = Object.values(T).filter((hn) => hn.bank === r).filter((hn) => !hn.isHidden);
|
|
3934
3934
|
if (en.length > 0)
|
|
3935
|
-
en.forEach((
|
|
3936
|
-
|
|
3935
|
+
en.forEach((hn) => {
|
|
3936
|
+
G.includes(hn.code);
|
|
3937
3937
|
const { container: qn } = w1({
|
|
3938
|
-
promotion: Yn(Hn({},
|
|
3939
|
-
isSelected:
|
|
3938
|
+
promotion: Yn(Hn({}, hn), {
|
|
3939
|
+
isSelected: G.includes(hn.code)
|
|
3940
3940
|
}),
|
|
3941
3941
|
// onSelect: (promotionCode, isSelected) => {
|
|
3942
|
-
onSelect: (rn,
|
|
3943
|
-
|
|
3942
|
+
onSelect: (rn, Xn) => {
|
|
3943
|
+
Xn ? G.includes(rn) || G.push(rn) : G = G.filter(
|
|
3944
3944
|
(vn) => vn !== rn
|
|
3945
3945
|
), On(), kn();
|
|
3946
3946
|
},
|
|
@@ -3950,12 +3950,12 @@ function E1(B) {
|
|
|
3950
3950
|
$.appendChild(qn);
|
|
3951
3951
|
});
|
|
3952
3952
|
else {
|
|
3953
|
-
const
|
|
3954
|
-
|
|
3953
|
+
const hn = document.createElement("span");
|
|
3954
|
+
hn.className = "wgt:text-text-sub-600", hn.innerText = g("noPromotionFound"), zn.appendChild(hn);
|
|
3955
3955
|
}
|
|
3956
3956
|
}
|
|
3957
3957
|
function kn() {
|
|
3958
|
-
var
|
|
3958
|
+
var Bn, un, Ln, rt, tt, at, Kt, Ot, Yt;
|
|
3959
3959
|
if (D(), Un.innerHTML = "", mn.appendChild(qt), mn.appendChild(st), mn.appendChild(mt), pn().length === 0 && F.length === 0) {
|
|
3960
3960
|
const O = document.createElement("tr");
|
|
3961
3961
|
O.innerHTML = `
|
|
@@ -3965,10 +3965,10 @@ function E1(B) {
|
|
|
3965
3965
|
`, Un.appendChild(O), i(0);
|
|
3966
3966
|
return;
|
|
3967
3967
|
}
|
|
3968
|
-
const
|
|
3968
|
+
const Y = pn().find(
|
|
3969
3969
|
(O) => O._id === f
|
|
3970
3970
|
);
|
|
3971
|
-
if (!E && (z == null ? void 0 : z.length) > 0 && !(
|
|
3971
|
+
if (!E && (z == null ? void 0 : z.length) > 0 && !(Y != null && Y.withoutInitialFee)) {
|
|
3972
3972
|
const O = document.createElement("tr");
|
|
3973
3973
|
O.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";
|
|
3974
3974
|
const An = document.createElement("td");
|
|
@@ -3990,7 +3990,7 @@ function E1(B) {
|
|
|
3990
3990
|
H += 1, kn();
|
|
3991
3991
|
}), Cn.appendChild(wn), Qn.appendChild(Cn), O.appendChild(Qn);
|
|
3992
3992
|
const Pn = document.createElement("td");
|
|
3993
|
-
Pn.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", Pn.innerText = Vn((
|
|
3993
|
+
Pn.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", Pn.innerText = Vn((Bn = z[0]) == null ? void 0 : Bn.price) + " VND", O.appendChild(Pn);
|
|
3994
3994
|
const Nn = document.createElement("td");
|
|
3995
3995
|
Nn.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:min-w-[16rem] wgt:@max-2xl:hidden", Nn.innerText = Vn(((un = z[0]) == null ? void 0 : un.price) * H) + " VND", O.appendChild(Nn);
|
|
3996
3996
|
const In = document.createElement("div");
|
|
@@ -4100,13 +4100,13 @@ function E1(B) {
|
|
|
4100
4100
|
`, Tn.appendChild(et), Un.appendChild(An);
|
|
4101
4101
|
}
|
|
4102
4102
|
}
|
|
4103
|
-
const
|
|
4103
|
+
const j = G.map(
|
|
4104
4104
|
(O) => Object.values(T).find(
|
|
4105
4105
|
(An) => An.code === O && An.bank === r
|
|
4106
4106
|
)
|
|
4107
4107
|
).filter((O) => O !== void 0);
|
|
4108
|
-
let
|
|
4109
|
-
|
|
4108
|
+
let Z = 0;
|
|
4109
|
+
j.length > 0 && j.forEach((O) => {
|
|
4110
4110
|
var xn, dn, wn, Pn, Nn, In;
|
|
4111
4111
|
const An = document.createElement("tr");
|
|
4112
4112
|
An.className = "wgt:@max-2xl:block wgt:@max-2xl:mb-3 wgt:@max-2xl:p-3 wgt:@max-2xl:bg-weak-50 wgt:@max-2xl:rounded-lg wgt:@max-2xl:border wgt:@max-2xl:border-soft-200";
|
|
@@ -4122,11 +4122,11 @@ function E1(B) {
|
|
|
4122
4122
|
const Cn = document.createElement("td");
|
|
4123
4123
|
Cn.className = "wgt:px-3 wgt:py-2 wgt:text-sm wgt:font-semibold wgt:@max-2xl:text-base wgt:@max-2xl:font-bold wgt:@max-2xl:p-0", O.type === "discount" ? (Cn.innerText = `-${Vn(
|
|
4124
4124
|
(xn = O == null ? void 0 : O.reward) == null ? void 0 : xn.discountAmount
|
|
4125
|
-
)} VND`, Cn.style.color = "#F04438",
|
|
4125
|
+
)} VND`, Cn.style.color = "#F04438", Z += (dn = O == null ? void 0 : O.reward) == null ? void 0 : dn.discountAmount) : (O == null ? void 0 : O.type) === "free_item" ? (Cn.innerText = `+${(Pn = (wn = O == null ? void 0 : O.reward) == null ? void 0 : wn.packageCodes) == null ? void 0 : Pn.length} ${g(
|
|
4126
4126
|
"package"
|
|
4127
4127
|
)} ${(In = (Nn = O == null ? void 0 : O.reward) == null ? void 0 : Nn.packageCodes) == null ? void 0 : In.join(", ")}`, Cn.style.color = "#12B76A") : Cn.innerText = "", An.appendChild(Cn), Un.appendChild(An);
|
|
4128
4128
|
});
|
|
4129
|
-
const
|
|
4129
|
+
const tn = !E && z.length > 0 && !(Y != null && Y.withoutInitialFee) ? ((Kt = z[0]) == null ? void 0 : Kt.price) * H : 0, an = Zn(f), $ = an ? E ? (Yt = an.renewPrice) != null ? Yt : 0 : (Ot = an.price) != null ? Ot : 0 : 0, en = an ? $ * an.limit * L : 0, hn = R(N), qn = hn ? hn.price * hn.limit * J : 0, rn = tn + en + qn, Xn = Math.min(Z, rn), vn = Math.max(rn - Xn, 0);
|
|
4130
4130
|
i(vn);
|
|
4131
4131
|
{
|
|
4132
4132
|
const O = document.createElement("tr");
|
|
@@ -4138,7 +4138,7 @@ function E1(B) {
|
|
|
4138
4138
|
}
|
|
4139
4139
|
xt.innerText = Vn(vn) + " VND";
|
|
4140
4140
|
}
|
|
4141
|
-
return o0(), { container:
|
|
4141
|
+
return o0(), { container: W };
|
|
4142
4142
|
});
|
|
4143
4143
|
}
|
|
4144
4144
|
function H1({
|
|
@@ -4194,10 +4194,10 @@ function H1({
|
|
|
4194
4194
|
f.className = "wgt:flex wgt:items-start";
|
|
4195
4195
|
const N = document.createElement("div");
|
|
4196
4196
|
N.className = "wgt:flex-shrink-0 wgt:mt-0.5";
|
|
4197
|
-
const
|
|
4198
|
-
|
|
4197
|
+
const G = document.createElement("div");
|
|
4198
|
+
G.className = "wgt:w-6 wgt:h-6 wgt:rounded-full wgt:bg-primary wgt:flex wgt:items-center wgt:justify-center";
|
|
4199
4199
|
const F = document.createElement("span");
|
|
4200
|
-
F.className = "wgt:text-white wgt:text-sm wgt:font-semibold", F.innerText = String(V + 1),
|
|
4200
|
+
F.className = "wgt:text-white wgt:text-sm wgt:font-semibold", F.innerText = String(V + 1), G.appendChild(F), N.appendChild(G);
|
|
4201
4201
|
const z = document.createElement("p");
|
|
4202
4202
|
z.className = "wgt:ml-3 wgt:text-text-sub-600", z.innerText = I, f.appendChild(N), f.appendChild(z), C.appendChild(f);
|
|
4203
4203
|
}), B.appendChild(C), E.appendChild(B);
|
|
@@ -4217,14 +4217,14 @@ function H1({
|
|
|
4217
4217
|
)}: <span class="wgt:font-medium">${I.bankName}</span>`), I.instructions && (C.innerHTML = "", I.instructions.forEach((V, f) => {
|
|
4218
4218
|
const N = document.createElement("li");
|
|
4219
4219
|
N.className = "wgt:flex wgt:items-start";
|
|
4220
|
-
const
|
|
4221
|
-
|
|
4220
|
+
const G = document.createElement("div");
|
|
4221
|
+
G.className = "wgt:flex-shrink-0 wgt:mt-0.5";
|
|
4222
4222
|
const F = document.createElement("div");
|
|
4223
4223
|
F.className = "wgt:w-6 wgt:h-6 wgt:rounded-full wgt:bg-primary wgt:flex wgt:items-center wgt:justify-center";
|
|
4224
4224
|
const z = document.createElement("span");
|
|
4225
|
-
z.className = "wgt:text-white wgt:text-sm wgt:font-semibold", z.innerText = String(f + 1), F.appendChild(z),
|
|
4225
|
+
z.className = "wgt:text-white wgt:text-sm wgt:font-semibold", z.innerText = String(f + 1), F.appendChild(z), G.appendChild(F);
|
|
4226
4226
|
const T = document.createElement("p");
|
|
4227
|
-
T.className = "wgt:ml-3 wgt:text-text-sub-600", T.innerText = V, N.appendChild(
|
|
4227
|
+
T.className = "wgt:ml-3 wgt:text-text-sub-600", T.innerText = V, N.appendChild(G), N.appendChild(T), C.appendChild(N);
|
|
4228
4228
|
})), I.illustrationSrc != null && (v.src = I.illustrationSrc);
|
|
4229
4229
|
}
|
|
4230
4230
|
};
|
|
@@ -4283,8 +4283,8 @@ function v1({
|
|
|
4283
4283
|
const x = document.createElement("p");
|
|
4284
4284
|
x.className = "wgt:text-base wgt:font-medium wgt:leading-6 wgt:text-primary";
|
|
4285
4285
|
const d = (S) => {
|
|
4286
|
-
const
|
|
4287
|
-
return `${
|
|
4286
|
+
const U = Math.floor(S / 60).toString().padStart(2, "0"), ln = (S % 60).toString().padStart(2, "0");
|
|
4287
|
+
return `${U}:${ln}`;
|
|
4288
4288
|
}, Q = () => {
|
|
4289
4289
|
x.innerHTML = `${g(
|
|
4290
4290
|
"completePaymentIn"
|
|
@@ -4319,21 +4319,21 @@ function v1({
|
|
|
4319
4319
|
if (I.className = "wgt:text-base wgt:font-semibold wgt:leading-6 wgt:text-text-black", I.innerText = n ? String(n.code) : "", y.appendChild(v), y.appendChild(I), w.appendChild(y), !u) {
|
|
4320
4320
|
const S = document.createElement("div");
|
|
4321
4321
|
S.className = "wgt:w-full wgt:flex wgt:items-center wgt:justify-between";
|
|
4322
|
-
const
|
|
4323
|
-
|
|
4324
|
-
const
|
|
4325
|
-
|
|
4322
|
+
const U = document.createElement("h4");
|
|
4323
|
+
U.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", U.innerText = g("digitalSignaturePackage");
|
|
4324
|
+
const ln = document.createElement("span");
|
|
4325
|
+
ln.className = "wgt:text-base wgt:font-semibold wgt:leading-6 wgt:text-text-black", ln.innerText = e ? String(e.code) : "", S.appendChild(U), S.appendChild(ln), w.appendChild(S);
|
|
4326
4326
|
}
|
|
4327
4327
|
if (a && a.length > 0) {
|
|
4328
4328
|
const S = document.createElement("div");
|
|
4329
4329
|
S.className = "wgt:w-full wgt:flex wgt:items-start wgt:justify-between wgt:gap-[0.5rem]";
|
|
4330
|
-
const
|
|
4331
|
-
|
|
4332
|
-
const
|
|
4333
|
-
|
|
4330
|
+
const U = document.createElement("h4");
|
|
4331
|
+
U.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", U.innerText = g("promotion");
|
|
4332
|
+
const ln = document.createElement("div");
|
|
4333
|
+
ln.className = "wgt:flex wgt:items-center wgt:justify-end wgt:flex-wrap wgt:gap-2", a.forEach((fn) => {
|
|
4334
4334
|
const mn = document.createElement("div");
|
|
4335
|
-
mn.className = "wgt:w-fit wgt:px-3 wgt:py-1 wgt:text-xs wgt:font-normal wgt:text-primary wgt:border wgt:border-primary", mn.innerText =
|
|
4336
|
-
}), S.appendChild(
|
|
4335
|
+
mn.className = "wgt:w-fit wgt:px-3 wgt:py-1 wgt:text-xs wgt:font-normal wgt:text-primary wgt:border wgt:border-primary", mn.innerText = fn, ln.appendChild(mn);
|
|
4336
|
+
}), S.appendChild(U), S.appendChild(ln), w.appendChild(S);
|
|
4337
4337
|
}
|
|
4338
4338
|
const V = document.createElement("hr");
|
|
4339
4339
|
w.appendChild(V);
|
|
@@ -4341,8 +4341,8 @@ function v1({
|
|
|
4341
4341
|
f.className = "wgt:w-full wgt:flex wgt:items-center wgt:justify-between";
|
|
4342
4342
|
const N = document.createElement("h4");
|
|
4343
4343
|
N.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", N.innerText = g("paymentAmount");
|
|
4344
|
-
const
|
|
4345
|
-
|
|
4344
|
+
const G = document.createElement("span");
|
|
4345
|
+
G.className = "wgt:text-2xl wgt:font-bold wgt:leading-6 wgt:text-[#ED1C24]", G.innerText = typeof h == "number" ? h.toLocaleString("vi-VN") + " VND" : h, f.appendChild(N), f.appendChild(G), w.appendChild(f);
|
|
4346
4346
|
const F = document.createElement("div");
|
|
4347
4347
|
F.className = "wgt:w-full wgt:flex wgt:flex-col wgt:gap-2 wgt:p-4 wgt:rounded-lg wgt:mt-8", F.style.backgroundColor = "#47c2ff29";
|
|
4348
4348
|
const z = document.createElement("div");
|
|
@@ -4371,8 +4371,8 @@ function v1({
|
|
|
4371
4371
|
J.className = "wgt:flex wgt:gap-4 wgt:mt-6";
|
|
4372
4372
|
const {
|
|
4373
4373
|
container: D,
|
|
4374
|
-
open:
|
|
4375
|
-
close:
|
|
4374
|
+
open: _,
|
|
4375
|
+
close: nn
|
|
4376
4376
|
} = e0();
|
|
4377
4377
|
document.body.appendChild(D);
|
|
4378
4378
|
const R = vt({
|
|
@@ -4381,31 +4381,31 @@ function v1({
|
|
|
4381
4381
|
handleClick: i ? () => sn(null, null, function* () {
|
|
4382
4382
|
R.disabled = !0;
|
|
4383
4383
|
const S = R.textContent;
|
|
4384
|
-
R.textContent = g("processing") || "Đang xử lý...",
|
|
4384
|
+
R.textContent = g("processing") || "Đang xử lý...", _();
|
|
4385
4385
|
try {
|
|
4386
4386
|
yield kc(c), R.className = R.className.replace(
|
|
4387
4387
|
/bg-primary|bg-\[\#0066cc\]/g,
|
|
4388
4388
|
"bg-green-500"
|
|
4389
4389
|
), R.textContent = g("confirmed") || "Đã xác nhận";
|
|
4390
|
-
const
|
|
4390
|
+
const U = Jt({
|
|
4391
4391
|
message: g("freeOrderSuccess") || "Thông tin đăng ký đã được ghi nhận thành công!",
|
|
4392
4392
|
okLabel: g("next") || "Tiếp tục",
|
|
4393
4393
|
theme: "bvb",
|
|
4394
4394
|
isSuccess: !0,
|
|
4395
4395
|
preventClose: !0,
|
|
4396
4396
|
onClose: () => {
|
|
4397
|
-
clearInterval(s), o(),
|
|
4397
|
+
clearInterval(s), o(), nn();
|
|
4398
4398
|
}
|
|
4399
4399
|
});
|
|
4400
|
-
q.appendChild(
|
|
4401
|
-
} catch (
|
|
4400
|
+
q.appendChild(U.container), U.open();
|
|
4401
|
+
} catch (U) {
|
|
4402
4402
|
R.disabled = !1, R.textContent = S;
|
|
4403
|
-
const
|
|
4403
|
+
const ln = Jt({
|
|
4404
4404
|
message: "Xác nhận đơn hàng thất bại. Vui lòng thử lại.",
|
|
4405
4405
|
okLabel: "OK",
|
|
4406
4406
|
isSuccess: !1
|
|
4407
4407
|
});
|
|
4408
|
-
q.appendChild(
|
|
4408
|
+
q.appendChild(ln.container), ln.open(), nn();
|
|
4409
4409
|
}
|
|
4410
4410
|
}) : () => {
|
|
4411
4411
|
s && clearInterval(s);
|
|
@@ -4419,7 +4419,7 @@ function v1({
|
|
|
4419
4419
|
});
|
|
4420
4420
|
q.appendChild(S.container), S.open();
|
|
4421
4421
|
}
|
|
4422
|
-
}),
|
|
4422
|
+
}), W = vt({
|
|
4423
4423
|
title: g("cancelTransaction") || "Hủy giao dịch",
|
|
4424
4424
|
className: "wgt:flex-1 wgt:py-4 wgt:rounded-lg wgt:bg-transparent wgt:border wgt:border-primary wgt:text-primary hover:wgt:bg-transparent",
|
|
4425
4425
|
handleClick: () => {
|
|
@@ -4436,7 +4436,7 @@ function v1({
|
|
|
4436
4436
|
q.appendChild(S.container), S.open();
|
|
4437
4437
|
}
|
|
4438
4438
|
});
|
|
4439
|
-
return J.appendChild(R), i && J.appendChild(
|
|
4439
|
+
return J.appendChild(R), i && J.appendChild(W), p.appendChild(J), q.appendChild(p), {
|
|
4440
4440
|
container: q,
|
|
4441
4441
|
resetCountdown() {
|
|
4442
4442
|
clearInterval(s), s = null, r = 3600, Q(), k();
|
|
@@ -4446,28 +4446,28 @@ function v1({
|
|
|
4446
4446
|
},
|
|
4447
4447
|
setTotalAmountText(S) {
|
|
4448
4448
|
h = S;
|
|
4449
|
-
const
|
|
4450
|
-
|
|
4449
|
+
const U = q.querySelector(".wgt:text-2xl.wgt:font-bold");
|
|
4450
|
+
U && (U.innerText = typeof S == "number" ? S.toLocaleString("vi-VN") + " VND" : S);
|
|
4451
4451
|
},
|
|
4452
4452
|
setSelectedProvider(S) {
|
|
4453
4453
|
t = S;
|
|
4454
|
-
const
|
|
4455
|
-
|
|
4454
|
+
const U = q.querySelector("img");
|
|
4455
|
+
U && (S != null && S.logoUrl) && (U.src = S.logoUrl, U.alt = S.name || "");
|
|
4456
4456
|
},
|
|
4457
4457
|
setSelectedInvoicePackage(S) {
|
|
4458
4458
|
n = S;
|
|
4459
|
-
const
|
|
4459
|
+
const U = q.querySelectorAll(
|
|
4460
4460
|
".wgt:text-base.wgt:font-semibold.wgt:leading-6.wgt:text-text-black"
|
|
4461
4461
|
)[0];
|
|
4462
|
-
|
|
4462
|
+
U && (U.innerText = S ? String(S.code || "") : "");
|
|
4463
4463
|
},
|
|
4464
4464
|
setSelectedSignaturePackage(S) {
|
|
4465
4465
|
if (u) return;
|
|
4466
4466
|
e = S;
|
|
4467
|
-
const
|
|
4467
|
+
const U = q.querySelectorAll(
|
|
4468
4468
|
".wgt:text-base.wgt:font-semibold.wgt:leading-6.wgt:text-text-black"
|
|
4469
4469
|
);
|
|
4470
|
-
|
|
4470
|
+
U[1] && (U[1].innerText = S ? String(S.code || "") : "");
|
|
4471
4471
|
}
|
|
4472
4472
|
};
|
|
4473
4473
|
}
|
|
@@ -5754,8 +5754,8 @@ function Z1() {
|
|
|
5754
5754
|
for (f === 6 && f--; ; ) {
|
|
5755
5755
|
for (let N = 0; N < 2; N++)
|
|
5756
5756
|
if (!B.isReserved(v, f - N)) {
|
|
5757
|
-
let
|
|
5758
|
-
V < X.length && (
|
|
5757
|
+
let G = !1;
|
|
5758
|
+
V < X.length && (G = (X[V] >>> I & 1) === 1), B.set(v, f - N, G), I--, I === -1 && (V++, I = 7);
|
|
5759
5759
|
}
|
|
5760
5760
|
if (v += y, v < 0 || C <= v) {
|
|
5761
5761
|
v -= y, y = -y;
|
|
@@ -5777,36 +5777,36 @@ function Z1() {
|
|
|
5777
5777
|
return w(y, B, X);
|
|
5778
5778
|
}
|
|
5779
5779
|
function w(B, X, C) {
|
|
5780
|
-
const y = t.getSymbolTotalCodewords(X), v = o.getTotalCodewordsCount(X, C), I = y - v, V = o.getBlocksCount(X, C), f = y % V, N = V - f,
|
|
5780
|
+
const y = t.getSymbolTotalCodewords(X), v = o.getTotalCodewordsCount(X, C), I = y - v, V = o.getBlocksCount(X, C), f = y % V, N = V - f, G = Math.floor(y / V), F = Math.floor(I / V), z = F + 1, T = G - F, m = new u(T);
|
|
5781
5781
|
let P = 0;
|
|
5782
5782
|
const H = new Array(V), L = new Array(V);
|
|
5783
5783
|
let J = 0;
|
|
5784
5784
|
const D = new Uint8Array(B.buffer);
|
|
5785
5785
|
for (let S = 0; S < V; S++) {
|
|
5786
|
-
const
|
|
5787
|
-
H[S] = D.slice(P, P +
|
|
5786
|
+
const U = S < N ? F : z;
|
|
5787
|
+
H[S] = D.slice(P, P + U), L[S] = m.encode(H[S]), P += U, J = Math.max(J, U);
|
|
5788
5788
|
}
|
|
5789
|
-
const
|
|
5790
|
-
let
|
|
5789
|
+
const _ = new Uint8Array(y);
|
|
5790
|
+
let nn = 0, R, W;
|
|
5791
5791
|
for (R = 0; R < J; R++)
|
|
5792
|
-
for (
|
|
5793
|
-
R < H[
|
|
5792
|
+
for (W = 0; W < V; W++)
|
|
5793
|
+
R < H[W].length && (_[nn++] = H[W][R]);
|
|
5794
5794
|
for (R = 0; R < T; R++)
|
|
5795
|
-
for (
|
|
5796
|
-
|
|
5797
|
-
return
|
|
5795
|
+
for (W = 0; W < V; W++)
|
|
5796
|
+
_[nn++] = L[W][R];
|
|
5797
|
+
return _;
|
|
5798
5798
|
}
|
|
5799
5799
|
function E(B, X, C, y) {
|
|
5800
5800
|
let v;
|
|
5801
5801
|
if (Array.isArray(B))
|
|
5802
5802
|
v = s.fromArray(B);
|
|
5803
5803
|
else if (typeof B == "string") {
|
|
5804
|
-
let
|
|
5805
|
-
if (!
|
|
5804
|
+
let G = X;
|
|
5805
|
+
if (!G) {
|
|
5806
5806
|
const F = s.rawSplit(B);
|
|
5807
|
-
|
|
5807
|
+
G = i.getBestVersionForData(F, C);
|
|
5808
5808
|
}
|
|
5809
|
-
v = s.fromString(B,
|
|
5809
|
+
v = s.fromString(B, G || 40);
|
|
5810
5810
|
} else
|
|
5811
5811
|
throw new Error("Invalid data");
|
|
5812
5812
|
const I = i.getBestVersionForData(v, C);
|
|
@@ -6255,7 +6255,7 @@ function Aa(o) {
|
|
|
6255
6255
|
}), t();
|
|
6256
6256
|
}
|
|
6257
6257
|
}));
|
|
6258
|
-
function
|
|
6258
|
+
function G() {
|
|
6259
6259
|
if (v.innerHTML = "", I.innerHTML = "", x)
|
|
6260
6260
|
v.className = "wgt:w-full wgt:flex wgt:items-center wgt:justify-center wgt:min-h-[400px]", v.appendChild(N);
|
|
6261
6261
|
else {
|
|
@@ -6293,12 +6293,12 @@ function Aa(o) {
|
|
|
6293
6293
|
provider: Q,
|
|
6294
6294
|
theme: A,
|
|
6295
6295
|
isFreeOrder: x
|
|
6296
|
-
}),
|
|
6296
|
+
}), G(), !x && r && (yield m(r));
|
|
6297
6297
|
});
|
|
6298
6298
|
}
|
|
6299
6299
|
function m(J) {
|
|
6300
6300
|
return sn(this, null, function* () {
|
|
6301
|
-
var D,
|
|
6301
|
+
var D, _, nn, R;
|
|
6302
6302
|
if (!(s || x)) {
|
|
6303
6303
|
s = !0, C();
|
|
6304
6304
|
try {
|
|
@@ -6327,13 +6327,13 @@ function Aa(o) {
|
|
|
6327
6327
|
accountNumber: (u == null ? void 0 : u.va_account_no) || "",
|
|
6328
6328
|
bankName: (u == null ? void 0 : u.bank_code) || ""
|
|
6329
6329
|
}), P();
|
|
6330
|
-
} catch (
|
|
6331
|
-
if (((
|
|
6330
|
+
} catch (W) {
|
|
6331
|
+
if (((_ = (D = W.response) == null ? void 0 : D.data) == null ? void 0 : _.error_code) === "BILL_ID_EXISTED") {
|
|
6332
6332
|
if (l++, xh.failed({
|
|
6333
6333
|
orderId: J != null ? J : h == null ? void 0 : h.orderId,
|
|
6334
6334
|
amount: d,
|
|
6335
6335
|
errorCode: "BILL_ID_EXISTED",
|
|
6336
|
-
errorMessage:
|
|
6336
|
+
errorMessage: W == null ? void 0 : W.message,
|
|
6337
6337
|
provider: Q,
|
|
6338
6338
|
theme: A,
|
|
6339
6339
|
retryCount: l
|
|
@@ -6344,7 +6344,7 @@ function Aa(o) {
|
|
|
6344
6344
|
s = !1;
|
|
6345
6345
|
return;
|
|
6346
6346
|
} else {
|
|
6347
|
-
if (((
|
|
6347
|
+
if (((nn = W.response) == null ? void 0 : nn.status) === 401 || ((R = W.response) == null ? void 0 : R.status) === 403)
|
|
6348
6348
|
return;
|
|
6349
6349
|
n0(
|
|
6350
6350
|
g(
|
|
@@ -6364,7 +6364,7 @@ function Aa(o) {
|
|
|
6364
6364
|
}
|
|
6365
6365
|
function P() {
|
|
6366
6366
|
x || q || (q = setInterval(() => sn(null, null, function* () {
|
|
6367
|
-
var J, D,
|
|
6367
|
+
var J, D, _, nn, R, W;
|
|
6368
6368
|
try {
|
|
6369
6369
|
const S = yield vc(r);
|
|
6370
6370
|
if (S.paymentStatus === "pending") return;
|
|
@@ -6373,7 +6373,7 @@ function Aa(o) {
|
|
|
6373
6373
|
orderId: r,
|
|
6374
6374
|
expectedAmount: d,
|
|
6375
6375
|
receivedAmount: (D = (J = S == null ? void 0 : S.receivedAmount) != null ? J : S == null ? void 0 : S.amount) != null ? D : null,
|
|
6376
|
-
difference: ((
|
|
6376
|
+
difference: ((nn = (_ = S == null ? void 0 : S.receivedAmount) != null ? _ : S == null ? void 0 : S.amount) != null ? nn : 0) - (d != null ? d : 0),
|
|
6377
6377
|
paymentMethod: k,
|
|
6378
6378
|
provider: Q,
|
|
6379
6379
|
theme: A
|
|
@@ -6385,17 +6385,17 @@ function Aa(o) {
|
|
|
6385
6385
|
provider: Q,
|
|
6386
6386
|
theme: A
|
|
6387
6387
|
});
|
|
6388
|
-
const
|
|
6388
|
+
const fn = aa({
|
|
6389
6389
|
onClose: () => {
|
|
6390
6390
|
var mn;
|
|
6391
6391
|
return (mn = h == null ? void 0 : h.onResetToStep1) == null ? void 0 : mn.call(h);
|
|
6392
6392
|
}
|
|
6393
6393
|
});
|
|
6394
|
-
B.appendChild(
|
|
6394
|
+
B.appendChild(fn.container), fn.open();
|
|
6395
6395
|
return;
|
|
6396
6396
|
}
|
|
6397
6397
|
clearInterval(q), q = null;
|
|
6398
|
-
const
|
|
6398
|
+
const U = p ? Math.round((Date.now() - p) / 1e3) : null;
|
|
6399
6399
|
S.paymentStatus === "paid" ? _t.success({
|
|
6400
6400
|
orderId: r,
|
|
6401
6401
|
amount: d,
|
|
@@ -6403,7 +6403,7 @@ function Aa(o) {
|
|
|
6403
6403
|
paymentMethod: k,
|
|
6404
6404
|
provider: Q,
|
|
6405
6405
|
theme: A,
|
|
6406
|
-
duration:
|
|
6406
|
+
duration: U
|
|
6407
6407
|
}) : _t.failed({
|
|
6408
6408
|
orderId: r,
|
|
6409
6409
|
amount: d,
|
|
@@ -6421,7 +6421,7 @@ function Aa(o) {
|
|
|
6421
6421
|
provider: Q,
|
|
6422
6422
|
theme: A
|
|
6423
6423
|
});
|
|
6424
|
-
const
|
|
6424
|
+
const ln = Jt({
|
|
6425
6425
|
message: S.paymentStatus === "paid" ? g("paymentSuccess") : g("paymentFailed"),
|
|
6426
6426
|
okLabel: "OK",
|
|
6427
6427
|
theme: A,
|
|
@@ -6429,9 +6429,9 @@ function Aa(o) {
|
|
|
6429
6429
|
onClose: () => t(),
|
|
6430
6430
|
preventClose: !0
|
|
6431
6431
|
});
|
|
6432
|
-
B.appendChild(
|
|
6432
|
+
B.appendChild(ln.container), ln.open();
|
|
6433
6433
|
} catch (S) {
|
|
6434
|
-
!navigator.onLine || !S.response ? n0(g("errorNetwork"), { isOffline: !0 }) : (((R = S.response) == null ? void 0 : R.status) === 404 || ((
|
|
6434
|
+
!navigator.onLine || !S.response ? n0(g("errorNetwork"), { isOffline: !0 }) : (((R = S.response) == null ? void 0 : R.status) === 404 || ((W = S.response) == null ? void 0 : W.status) === 410) && (clearInterval(q), q = null);
|
|
6435
6435
|
}
|
|
6436
6436
|
}), 5e3));
|
|
6437
6437
|
}
|
|
@@ -6545,8 +6545,8 @@ function ua({
|
|
|
6545
6545
|
f.className = "wgt:text-sm wgt:leading-relaxed wgt:text-strong-950", f.appendChild(document.createTextNode(g("notice3.1") + " "));
|
|
6546
6546
|
const N = document.createElement("a");
|
|
6547
6547
|
N.className = "wgt:text-primary wgt:font-semibold wgt:hover:underline wgt:cursor-pointer", N.textContent = g("settings") + " ", N.href = h, N.target = "_blank", f.appendChild(N), f.appendChild(document.createTextNode(g("notice3.2") + " ")), I.appendChild(f);
|
|
6548
|
-
const
|
|
6549
|
-
|
|
6548
|
+
const G = document.createElement("div");
|
|
6549
|
+
G.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", o.appendChild(G);
|
|
6550
6550
|
const F = document.createElement("div");
|
|
6551
6551
|
F.className = "wgt:w-5 wgt:h-5 wgt:flex wgt:items-center wgt:justify-center", F.innerHTML = `
|
|
6552
6552
|
<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -6554,7 +6554,7 @@ function ua({
|
|
|
6554
6554
|
</svg>
|
|
6555
6555
|
`;
|
|
6556
6556
|
const z = document.createElement("label");
|
|
6557
|
-
z.className = "wgt:text-sm wgt:font-medium wgt:text-strong-950 wgt:leading-tight", z.appendChild(document.createTextNode(g("informationSent"))),
|
|
6557
|
+
z.className = "wgt:text-sm wgt:font-medium wgt:text-strong-950 wgt:leading-tight", z.appendChild(document.createTextNode(g("informationSent"))), G.appendChild(F), G.appendChild(z);
|
|
6558
6558
|
const T = document.createElement("div");
|
|
6559
6559
|
T.className = "wgt:w-full wgt:flex wgt:justify-center", o.appendChild(T);
|
|
6560
6560
|
const m = vt({
|
|
@@ -7111,13 +7111,13 @@ function Na(t, n, e, c, h, a) {
|
|
|
7111
7111
|
function N() {
|
|
7112
7112
|
V(), l = 1, r(l, u()), z(l);
|
|
7113
7113
|
}
|
|
7114
|
-
function
|
|
7114
|
+
function G() {
|
|
7115
7115
|
typeof window != "undefined" && window.scrollTo({
|
|
7116
7116
|
top: 0,
|
|
7117
7117
|
behavior: "smooth"
|
|
7118
7118
|
});
|
|
7119
7119
|
}
|
|
7120
|
-
function F(D,
|
|
7120
|
+
function F(D, _) {
|
|
7121
7121
|
return sn(this, null, function* () {
|
|
7122
7122
|
D ? d = Yn(Hn({}, d), {
|
|
7123
7123
|
eInvoiceRegistration: {
|
|
@@ -7128,25 +7128,26 @@ function Na(t, n, e, c, h, a) {
|
|
|
7128
7128
|
invoiceSymbol: D.invoiceSymbol,
|
|
7129
7129
|
previousEInvoiceProvider: D.previousEInvoiceProvider
|
|
7130
7130
|
}
|
|
7131
|
-
}) :
|
|
7131
|
+
}) : _ && f(_), yield z(l);
|
|
7132
7132
|
});
|
|
7133
7133
|
}
|
|
7134
7134
|
function z(D) {
|
|
7135
7135
|
return sn(this, null, function* () {
|
|
7136
|
+
const _ = "1C26MYY", nn = /^[1-9][CK]\d{2}[TDLMNBGHX][A-Z]{2}$/;
|
|
7136
7137
|
if (D === 1) {
|
|
7137
|
-
const { container:
|
|
7138
|
+
const { container: R } = yield T1({
|
|
7138
7139
|
isNewCustomer: k,
|
|
7139
7140
|
isRenewal: a,
|
|
7140
7141
|
providerProps: {
|
|
7141
7142
|
providers: o,
|
|
7142
7143
|
selectedRoute: x.route,
|
|
7143
|
-
onProviderChange: (
|
|
7144
|
-
var
|
|
7145
|
-
x =
|
|
7146
|
-
|
|
7147
|
-
(
|
|
7148
|
-
(
|
|
7149
|
-
k =
|
|
7144
|
+
onProviderChange: (W) => sn(null, null, function* () {
|
|
7145
|
+
var S, U;
|
|
7146
|
+
x = W, yield b0(
|
|
7147
|
+
W.route,
|
|
7148
|
+
(U = (S = d == null ? void 0 : d.eInvoiceRegistration) == null ? void 0 : S.organization) == null ? void 0 : U.taxCode,
|
|
7149
|
+
(ln, fn) => {
|
|
7150
|
+
k = ln, F(fn);
|
|
7150
7151
|
},
|
|
7151
7152
|
a,
|
|
7152
7153
|
h,
|
|
@@ -7154,46 +7155,31 @@ function Na(t, n, e, c, h, a) {
|
|
|
7154
7155
|
);
|
|
7155
7156
|
})
|
|
7156
7157
|
},
|
|
7157
|
-
// formProps: {
|
|
7158
|
-
// isNewCustomer,
|
|
7159
|
-
// handleCheckNewCustomer: (provider, taxCode, callback) => {
|
|
7160
|
-
// return handleCheckNewCustomer(
|
|
7161
|
-
// provider,
|
|
7162
|
-
// taxCode,
|
|
7163
|
-
// callback,
|
|
7164
|
-
// isRenewal,
|
|
7165
|
-
// );
|
|
7166
|
-
// },
|
|
7167
|
-
// updateRegistrationData,
|
|
7168
|
-
// onSubmit: (data) => {
|
|
7169
|
-
// registrationData.eInvoiceRegistration = {
|
|
7170
|
-
// ...registrationData.eInvoiceRegistration,
|
|
7171
|
-
// ...data.eInvoiceRegistration,
|
|
7172
|
-
// };
|
|
7173
7158
|
formProps: {
|
|
7174
7159
|
isNewCustomer: k,
|
|
7175
7160
|
isRenewal: a,
|
|
7176
7161
|
handleCheckNewCustomer: b0,
|
|
7177
7162
|
updateRegistrationData: F,
|
|
7178
|
-
serial:
|
|
7179
|
-
|
|
7180
|
-
|
|
7163
|
+
// serial: data?.serial || '',
|
|
7164
|
+
serial: nn.test((c == null ? void 0 : c.serial) || "") ? c.serial : _,
|
|
7165
|
+
onSubmit: (W) => {
|
|
7166
|
+
d.eInvoiceRegistration = Hn(Hn({}, d.eInvoiceRegistration), W.eInvoiceRegistration), d.logo = W.logo || null, d.license = W.license || null, d.idCard = W.idCard || null, d.idCardBack = W.idCardBack || null, d.provider = x.route, l = 2, r(l, u()), z(l), G();
|
|
7181
7167
|
},
|
|
7182
7168
|
registrationData: d,
|
|
7183
7169
|
theme: h || "default",
|
|
7184
7170
|
onShowPolicy: e || (() => {
|
|
7185
7171
|
}),
|
|
7186
7172
|
selectedTaxAuthority: C,
|
|
7187
|
-
setSelectedTaxAuthority: (
|
|
7188
|
-
C =
|
|
7173
|
+
setSelectedTaxAuthority: (W) => {
|
|
7174
|
+
C = W;
|
|
7189
7175
|
},
|
|
7190
7176
|
dobPicker: v,
|
|
7191
|
-
setDobPicker: (
|
|
7192
|
-
v =
|
|
7177
|
+
setDobPicker: (W) => {
|
|
7178
|
+
v = W;
|
|
7193
7179
|
}
|
|
7194
7180
|
}
|
|
7195
7181
|
});
|
|
7196
|
-
s(
|
|
7182
|
+
s(R);
|
|
7197
7183
|
} else if (D === 2) {
|
|
7198
7184
|
Gn(Wn.STEP2_VIEWED, {
|
|
7199
7185
|
theme: h,
|
|
@@ -7201,7 +7187,7 @@ function Na(t, n, e, c, h, a) {
|
|
|
7201
7187
|
provider: x == null ? void 0 : x.route,
|
|
7202
7188
|
isNewCustomer: k
|
|
7203
7189
|
});
|
|
7204
|
-
const { container:
|
|
7190
|
+
const { container: R } = yield E1({
|
|
7205
7191
|
onNext: () => sn(null, null, function* () {
|
|
7206
7192
|
Gn(Wn.STEP2_COMPLETED, {
|
|
7207
7193
|
theme: h,
|
|
@@ -7209,40 +7195,40 @@ function Na(t, n, e, c, h, a) {
|
|
|
7209
7195
|
totalAmount: B,
|
|
7210
7196
|
orderAmount: X,
|
|
7211
7197
|
isFreeOrder: B === 0
|
|
7212
|
-
}), l = 3, r(l, u()), z(l),
|
|
7198
|
+
}), l = 3, r(l, u()), z(l), G();
|
|
7213
7199
|
}),
|
|
7214
7200
|
onPrev: () => {
|
|
7215
|
-
l = 1, r(l, u()), z(l),
|
|
7201
|
+
l = 1, r(l, u()), z(l), G();
|
|
7216
7202
|
},
|
|
7217
|
-
setOrderAmount: (
|
|
7218
|
-
X =
|
|
7203
|
+
setOrderAmount: (W) => {
|
|
7204
|
+
X = W;
|
|
7219
7205
|
},
|
|
7220
|
-
setSelectedInitPackage: (
|
|
7221
|
-
p =
|
|
7206
|
+
setSelectedInitPackage: (W) => {
|
|
7207
|
+
p = W;
|
|
7222
7208
|
},
|
|
7223
|
-
setSelectedInvoiceOtp: (
|
|
7224
|
-
w =
|
|
7209
|
+
setSelectedInvoiceOtp: (W) => {
|
|
7210
|
+
w = W;
|
|
7225
7211
|
},
|
|
7226
|
-
setSelectedSignatureOtp: (
|
|
7227
|
-
E =
|
|
7212
|
+
setSelectedSignatureOtp: (W) => {
|
|
7213
|
+
E = W;
|
|
7228
7214
|
},
|
|
7229
|
-
setOrderId: (
|
|
7230
|
-
b =
|
|
7215
|
+
setOrderId: (W) => {
|
|
7216
|
+
b = W;
|
|
7231
7217
|
},
|
|
7232
|
-
setTotalAmount: (
|
|
7233
|
-
B =
|
|
7218
|
+
setTotalAmount: (W) => {
|
|
7219
|
+
B = W;
|
|
7234
7220
|
},
|
|
7235
|
-
setOrderAmount: (
|
|
7236
|
-
X =
|
|
7221
|
+
setOrderAmount: (W) => {
|
|
7222
|
+
X = W;
|
|
7237
7223
|
},
|
|
7238
|
-
setSelectedPromotions: (
|
|
7239
|
-
y =
|
|
7224
|
+
setSelectedPromotions: (W) => {
|
|
7225
|
+
y = W;
|
|
7240
7226
|
},
|
|
7241
|
-
setPackages: (
|
|
7242
|
-
d.packages =
|
|
7227
|
+
setPackages: (W) => {
|
|
7228
|
+
d.packages = W;
|
|
7243
7229
|
},
|
|
7244
|
-
setPromotionCodes: (
|
|
7245
|
-
d.promotionCodes =
|
|
7230
|
+
setPromotionCodes: (W) => {
|
|
7231
|
+
d.promotionCodes = W;
|
|
7246
7232
|
},
|
|
7247
7233
|
selectedInitPackage: p,
|
|
7248
7234
|
selectedInvoiceOtp: w,
|
|
@@ -7254,18 +7240,18 @@ function Na(t, n, e, c, h, a) {
|
|
|
7254
7240
|
isNewCustomer: k,
|
|
7255
7241
|
savedQuantities: I,
|
|
7256
7242
|
isRenewal: a,
|
|
7257
|
-
setSavedQuantities: (
|
|
7258
|
-
I =
|
|
7243
|
+
setSavedQuantities: (W) => {
|
|
7244
|
+
I = W;
|
|
7259
7245
|
}
|
|
7260
7246
|
});
|
|
7261
|
-
s(
|
|
7247
|
+
s(R);
|
|
7262
7248
|
} else if (D === 3) {
|
|
7263
|
-
const { container:
|
|
7249
|
+
const { container: R } = yield Aa({
|
|
7264
7250
|
onNext: () => {
|
|
7265
|
-
l = 4, r(l, u()), z(l),
|
|
7251
|
+
l = 4, r(l, u()), z(l), G();
|
|
7266
7252
|
},
|
|
7267
7253
|
onPrev: () => {
|
|
7268
|
-
l = 2, r(l, u()), z(l),
|
|
7254
|
+
l = 2, r(l, u()), z(l), G();
|
|
7269
7255
|
},
|
|
7270
7256
|
step: 3,
|
|
7271
7257
|
checkoutProps: {
|
|
@@ -7286,20 +7272,20 @@ function Na(t, n, e, c, h, a) {
|
|
|
7286
7272
|
isRenewal: a,
|
|
7287
7273
|
isNewCustomer: k,
|
|
7288
7274
|
onCancel: () => {
|
|
7289
|
-
l = 2, r(l, u()), z(l),
|
|
7275
|
+
l = 2, r(l, u()), z(l), G();
|
|
7290
7276
|
},
|
|
7291
7277
|
onResetToStep1: N
|
|
7292
7278
|
},
|
|
7293
|
-
setOrderId: (
|
|
7294
|
-
b =
|
|
7279
|
+
setOrderId: (W) => {
|
|
7280
|
+
b = W;
|
|
7295
7281
|
}
|
|
7296
7282
|
});
|
|
7297
|
-
s(
|
|
7283
|
+
s(R);
|
|
7298
7284
|
} else if (D === 4) {
|
|
7299
|
-
const { container:
|
|
7285
|
+
const { container: R } = ua({
|
|
7300
7286
|
orderId: b || "",
|
|
7301
7287
|
onPrev: () => {
|
|
7302
|
-
l = 3, r(l, u()), z(l),
|
|
7288
|
+
l = 3, r(l, u()), z(l), G();
|
|
7303
7289
|
},
|
|
7304
7290
|
// onReturnHome: close ? close : () => {},
|
|
7305
7291
|
onReturnHome: () => {
|
|
@@ -7310,7 +7296,7 @@ function Na(t, n, e, c, h, a) {
|
|
|
7310
7296
|
serial: (c == null ? void 0 : c.serial) || "1C26MYY",
|
|
7311
7297
|
provider: x.route
|
|
7312
7298
|
});
|
|
7313
|
-
s(
|
|
7299
|
+
s(R);
|
|
7314
7300
|
}
|
|
7315
7301
|
});
|
|
7316
7302
|
}
|
|
@@ -7318,8 +7304,8 @@ function Na(t, n, e, c, h, a) {
|
|
|
7318
7304
|
Q && (s(T), m()), yield b0(
|
|
7319
7305
|
x.route,
|
|
7320
7306
|
(J = (L = d == null ? void 0 : d.eInvoiceRegistration) == null ? void 0 : L.organization) == null ? void 0 : J.taxCode,
|
|
7321
|
-
(D,
|
|
7322
|
-
Q = !1, k = D, F(
|
|
7307
|
+
(D, _) => sn(null, null, function* () {
|
|
7308
|
+
Q = !1, k = D, F(_), i.updateTitle(
|
|
7323
7309
|
a ? g("eInvoiceRenewal") : g("eInvoiceRegister")
|
|
7324
7310
|
);
|
|
7325
7311
|
}),
|