@invoice-sdk/widget 1.118.0 → 1.118.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.
@@ -9,84 +9,84 @@ var ee = (i, t, e) => t in i ? ie(i, t, { enumerable: !0, configurable: !0, writ
9
9
  se.call(t, e) && ee(i, e, t[e]);
10
10
  return i;
11
11
  };
12
- var R = (i, t, e) => new Promise((n, o) => {
12
+ var j = (i, t, e) => new Promise((r, d) => {
13
13
  var s = (p) => {
14
14
  try {
15
15
  g(e.next(p));
16
16
  } catch (N) {
17
- o(N);
17
+ d(N);
18
18
  }
19
19
  }, a = (p) => {
20
20
  try {
21
21
  g(e.throw(p));
22
22
  } catch (N) {
23
- o(N);
23
+ d(N);
24
24
  }
25
- }, g = (p) => p.done ? n(p.value) : Promise.resolve(p.value).then(s, a);
25
+ }, g = (p) => p.done ? r(p.value) : Promise.resolve(p.value).then(s, a);
26
26
  g((e = e.apply(i, t)).next());
27
27
  });
28
- import { c as G, f as te, e as oe, b as le, o as ne, s as de } from "./loading-BBaWO-p-.js";
29
- import { t as r, c as J } from "./index-D7Tgbbr0.js";
28
+ import { c as G, f as te, e as oe, b as de, o as ne, s as le } from "./loading-C9dC-rXa.js";
29
+ import { t as n, c as J, j as ce } from "./index-B-xYoQuR.js";
30
30
  function z(i) {
31
31
  const t = i.trim();
32
- return t ? t.length < 2 || t.length > 250 ? { valid: !1, error: r("length_2_250") } : /[<>:"\/\\|?*@#$%!^]/.test(t) ? { valid: !1, error: r("invalid_characters") } : { valid: !0 } : { valid: !1, error: r("equired_name") };
32
+ return t ? t.length < 2 || t.length > 250 ? { valid: !1, error: n("length_2_250") } : /[<>:"\/\\|?*@#$%!^]/.test(t) ? { valid: !1, error: n("invalid_characters") } : { valid: !0 } : { valid: !1, error: n("equired_name") };
33
33
  }
34
34
  function X(i, t = !1) {
35
35
  const e = i.trim();
36
- return e ? e.length < 2 || e.length > 250 ? { valid: !1, error: r("length_2_250") } : /[<>:"\/\\|?*@#$%!^]/.test(e) ? { valid: !1, error: r("invalid_characters") } : { valid: !0 } : t ? { valid: !1, error: r("required_address") } : { valid: !0 };
36
+ return e ? e.length < 2 || e.length > 250 ? { valid: !1, error: n("length_2_250") } : /[<>:"\/\\|?*@#$%!^]/.test(e) ? { valid: !1, error: n("invalid_characters") } : { valid: !0 } : t ? { valid: !1, error: n("required_address") } : { valid: !0 };
37
37
  }
38
38
  function K(i) {
39
39
  const t = i.trim();
40
- return t ? t.length < 6 || t.length > 254 ? { valid: !1, error: r("email_length") } : /[<>:"\/\\|?*#$%!\s]/.test(t) ? { valid: !1, error: r("email_invalid_format") } : /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(t) ? t.includes("@@") ? { valid: !1, error: r("email_invalid_format") } : { valid: !0 } : { valid: !1, error: r("email_invalid_format") } : { valid: !1, error: r("required_email") };
40
+ return t ? t.length < 6 || t.length > 254 ? { valid: !1, error: n("email_length") } : /[<>:"\/\\|?*#$%!\s]/.test(t) ? { valid: !1, error: n("email_invalid_format") } : /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(t) ? t.includes("@@") ? { valid: !1, error: n("email_invalid_format") } : { valid: !0 } : { valid: !1, error: n("email_invalid_format") } : { valid: !1, error: n("required_email") };
41
41
  }
42
42
  function Y(i, t = !1) {
43
43
  const e = i.trim();
44
44
  if (!e)
45
- return t ? { valid: !1, error: r("required_phone") } : { valid: !0 };
46
- const n = e.replace(/\s/g, "");
47
- if (/[<>:"\/\\|?*@#$%!A-Za-z]/.test(n))
48
- return { valid: !1, error: r("phone_invalid") };
45
+ return t ? { valid: !1, error: n("required_phone") } : { valid: !0 };
46
+ const r = e.replace(/\s/g, "");
47
+ if (/[<>:"\/\\|?*@#$%!A-Za-z]/.test(r))
48
+ return { valid: !1, error: n("phone_invalid") };
49
49
  const s = /^0\d{9}$/, a = /^\+84\d{9}$/;
50
- return !s.test(n) && !a.test(n) ? { valid: !1, error: r("phone_invalid_format") } : { valid: !0 };
50
+ return !s.test(r) && !a.test(r) ? { valid: !1, error: n("phone_invalid_format") } : { valid: !0 };
51
51
  }
52
52
  function Q(i) {
53
53
  const t = i.trim();
54
- if (!t) return { valid: !1, error: r("required_tax_code") };
54
+ if (!t) return { valid: !1, error: n("required_tax_code") };
55
55
  const e = t.replace(/\s/g, "");
56
56
  if (/[<>:"\/\\|?*@#$%!A-Za-z\s]/.test(e))
57
- return { valid: !1, error: r("tax_code_invalid") };
57
+ return { valid: !1, error: n("tax_code_invalid") };
58
58
  if ((e.match(/-/g) || []).length > 1)
59
- return { valid: !1, error: r("tax_code_invalid_format") };
59
+ return { valid: !1, error: n("tax_code_invalid_format") };
60
60
  const s = /^\d{10}$/, a = /^\d{10}-\d{3}$/;
61
- return !s.test(e) && !a.test(e) ? { valid: !1, error: r("tax_code_invalid_format") } : { valid: !0 };
61
+ return !s.test(e) && !a.test(e) ? { valid: !1, error: n("tax_code_invalid_format") } : { valid: !0 };
62
62
  }
63
- function ce({ defaultValues: i = {}, onChange: t } = {}) {
63
+ function pe({ defaultValues: i = {}, onChange: t } = {}) {
64
64
  const e = {
65
65
  representativeName: i.representativeName || "",
66
66
  buyerAddress: i.buyerAddress || "",
67
67
  email: i.email || "",
68
68
  phone: i.phone || ""
69
- }, n = document.createElement("div");
70
- n.className = "wgt:space-y-2";
71
- function o() {
69
+ }, r = document.createElement("div");
70
+ r.className = "wgt:space-y-2";
71
+ function d() {
72
72
  typeof t == "function" && t($({}, e));
73
73
  }
74
- function s({ label: v, required: y, name: M, type: B = "text", placeholder: b }) {
75
- const H = document.createElement("div");
76
- H.className = "";
74
+ function s({ label: v, required: y, name: H, type: Z = "text", placeholder: b }) {
75
+ const A = document.createElement("div");
76
+ A.className = "";
77
77
  const _ = document.createElement("label");
78
- _.className = "wgt:text-sm wgt:font-medium wgt:text-strong-950", _.htmlFor = M, _.innerHTML = y ? `${v} <span class="wgt:text-semantic-error wgt:text-[#ED1C24]">*</span>` : v;
78
+ _.className = "wgt:text-sm wgt:font-medium wgt:text-strong-950", _.htmlFor = H, _.innerHTML = y ? `${v} <span class="wgt:text-semantic-error wgt:text-[#ED1C24]">*</span>` : v;
79
79
  const m = document.createElement("input");
80
- m.id = M, m.name = M, m.type = B, m.placeholder = b || "", m.className = "wgt:w-full wgt:rounded-lg wgt:border wgt:border-[#E4E7EC] wgt:mt-2 wgt:bg-white wgt:px-3 wgt:py-2.5 wgt:text-sm wgt:text-strong-950 focus:wgt:outline-none focus:wgt:border-primary focus:wgt:ring-1 focus:wgt:ring-primary", m.value = e[M] || "";
80
+ m.id = H, m.name = H, m.type = Z, m.placeholder = b || "", m.className = "wgt:w-full wgt:rounded-lg wgt:border wgt:border-[#E4E7EC] wgt:mt-2 wgt:bg-white wgt:px-3 wgt:py-2.5 wgt:text-sm wgt:text-strong-950 focus:wgt:outline-none focus:wgt:border-primary focus:wgt:ring-1 focus:wgt:ring-primary", m.value = e[H] || "";
81
81
  const T = document.createElement("div");
82
- return T.className = "wgt:text-xs wgt:text-[#ED1C24] wgt:mt-1 wgt:hidden", T.setAttribute("data-error-for", M), m.addEventListener("input", () => {
83
- e[M] = m.value, m.classList.remove(
82
+ return T.className = "wgt:text-xs wgt:text-[#ED1C24] wgt:mt-1 wgt:hidden", T.setAttribute("data-error-for", H), m.addEventListener("input", () => {
83
+ e[H] = m.value, m.classList.remove(
84
84
  "wgt:border-semantic-error",
85
85
  "wgt:bg-semantic-error-50"
86
- ), T.classList.add("wgt:hidden"), o();
86
+ ), T.classList.add("wgt:hidden"), d();
87
87
  }), m.addEventListener("blur", () => {
88
88
  let u;
89
- switch (M) {
89
+ switch (H) {
90
90
  case "representativeName":
91
91
  u = z(m.value);
92
92
  break;
@@ -106,79 +106,79 @@ function ce({ defaultValues: i = {}, onChange: t } = {}) {
106
106
  "wgt:border-semantic-error",
107
107
  "wgt:bg-semantic-error-50"
108
108
  ), T.textContent = u.error, T.classList.remove("wgt:hidden"));
109
- }), H.appendChild(_), H.appendChild(m), H.appendChild(T), { field: H, input: m, errorEl: T };
109
+ }), A.appendChild(_), A.appendChild(m), A.appendChild(T), { field: A, input: m, errorEl: T };
110
110
  }
111
111
  const {
112
112
  field: a,
113
113
  input: g,
114
114
  errorEl: p
115
115
  } = s({
116
- label: r("representativeName"),
116
+ label: n("representativeName"),
117
117
  required: !0,
118
118
  name: "representativeName",
119
- placeholder: r("representativeName_input")
120
- }), { field: N, errorEl: A } = s({
121
- label: r("buyerAddress"),
119
+ placeholder: n("representativeName_input")
120
+ }), { field: N, errorEl: k } = s({
121
+ label: n("buyerAddress"),
122
122
  required: !1,
123
123
  name: "buyerAddress",
124
- placeholder: r("buyerAddress_input")
124
+ placeholder: n("buyerAddress_input")
125
125
  }), {
126
126
  field: F,
127
- input: k,
128
- errorEl: d
127
+ input: M,
128
+ errorEl: l
129
129
  } = s({
130
- label: r("email"),
130
+ label: n("email"),
131
131
  required: !0,
132
132
  name: "email",
133
133
  type: "email",
134
- placeholder: r("email_input")
134
+ placeholder: n("email_input")
135
135
  }), {
136
136
  field: x,
137
- input: l,
137
+ input: o,
138
138
  errorEl: w
139
139
  } = s({
140
- label: r("phone"),
140
+ label: n("phone"),
141
141
  required: !1,
142
142
  name: "phone",
143
143
  type: "tel",
144
- placeholder: r("phone_input")
144
+ placeholder: n("phone_input")
145
145
  });
146
- n.appendChild(a), n.appendChild(N), n.appendChild(F), n.appendChild(x);
147
- function h() {
146
+ r.appendChild(a), r.appendChild(N), r.appendChild(F), r.appendChild(x);
147
+ function f() {
148
148
  let v = !0;
149
- function y(b, H, _) {
149
+ function y(b, A, _) {
150
150
  b.classList.add(
151
151
  "wgt:border-semantic-error",
152
152
  "wgt:bg-semantic-error-50"
153
- ), _ && H && (H.textContent = _, H.classList.remove("wgt:hidden")), v = !1;
153
+ ), _ && A && (A.textContent = _, A.classList.remove("wgt:hidden")), v = !1;
154
154
  }
155
- const M = z(e.representativeName);
156
- if (M.valid || y(g, p, M.error), e.buyerAddress.trim()) {
155
+ const H = z(e.representativeName);
156
+ if (H.valid || y(g, p, H.error), e.buyerAddress.trim()) {
157
157
  const b = X(e.buyerAddress);
158
158
  b.valid || y(
159
159
  document.querySelector('input[name="buyerAddress"]'),
160
- A,
160
+ k,
161
161
  b.error
162
162
  );
163
163
  }
164
- const B = K(e.email);
165
- if (B.valid || y(k, d, B.error), e.phone.trim()) {
164
+ const Z = K(e.email);
165
+ if (Z.valid || y(M, l, Z.error), e.phone.trim()) {
166
166
  const b = Y(e.phone, !1);
167
- b.valid || y(l, w, b.error);
167
+ b.valid || y(o, w, b.error);
168
168
  }
169
169
  return v;
170
170
  }
171
171
  function c() {
172
172
  return $({}, e);
173
173
  }
174
- return { container: n, getValues: c, validate: h };
174
+ return { container: r, getValues: c, validate: f };
175
175
  }
176
- function pe({
176
+ function ge({
177
177
  defaultValues: i = {},
178
178
  onChange: t,
179
179
  onFetchByTaxCode: e
180
180
  } = {}) {
181
- const n = {
181
+ const r = {
182
182
  noTaxCode: !!i.noTaxCode,
183
183
  taxCode: i.taxCode || "",
184
184
  representativeName: i.representativeName || "",
@@ -186,28 +186,28 @@ function pe({
186
186
  performerName: i.performerName || "",
187
187
  email: i.email || "",
188
188
  phone: i.phone || ""
189
- }, o = document.createElement("div");
190
- o.className = "wgt:space-y-2";
189
+ }, d = document.createElement("div");
190
+ d.className = "wgt:space-y-2";
191
191
  function s() {
192
- typeof t == "function" && t($({}, n));
192
+ typeof t == "function" && t($({}, r));
193
193
  }
194
- function a({ label: C, required: L, name: f, type: W = "text", placeholder: I }) {
194
+ function a({ label: C, required: L, name: h, type: W = "text", placeholder: I }) {
195
195
  const O = document.createElement("div");
196
196
  O.className = "";
197
- const j = document.createElement("label");
198
- j.className = "wgt:text-sm wgt:font-medium wgt:text-strong-950", j.htmlFor = f, j.innerHTML = L ? `${C} <span class="wgt:text-[#ED1C24]">*</span>` : C;
197
+ const P = document.createElement("label");
198
+ P.className = "wgt:text-sm wgt:font-medium wgt:text-strong-950", P.htmlFor = h, P.innerHTML = L ? `${C} <span class="wgt:text-[#ED1C24]">*</span>` : C;
199
199
  const E = document.createElement("input");
200
- E.id = f, E.name = f, E.type = W, E.placeholder = I || "", E.className = "wgt:w-full wgt:rounded-lg wgt:border wgt:border-[#E4E7EC] wgt:mt-2 wgt:bg-white wgt:px-3 wgt:py-2.5 wgt:text-sm wgt:text-strong-950 focus:wgt:outline-none focus:wgt:border-primary focus:wgt:ring-1 focus:wgt:ring-primary", E.value = n[f] || "";
201
- const P = document.createElement("div");
202
- return P.className = "wgt:text-xs wgt:text-[#ED1C24] wgt:mt-1 wgt:hidden", P.setAttribute("data-error-for", f), E.addEventListener("input", () => {
203
- n[f] = E.value, E.classList.remove(
200
+ E.id = h, E.name = h, E.type = W, E.placeholder = I || "", E.className = "wgt:w-full wgt:rounded-lg wgt:border wgt:border-[#E4E7EC] wgt:mt-2 wgt:bg-white wgt:px-3 wgt:py-2.5 wgt:text-sm wgt:text-strong-950 focus:wgt:outline-none focus:wgt:border-primary focus:wgt:ring-1 focus:wgt:ring-primary", E.value = r[h] || "";
201
+ const R = document.createElement("div");
202
+ return R.className = "wgt:text-xs wgt:text-[#ED1C24] wgt:mt-1 wgt:hidden", R.setAttribute("data-error-for", h), E.addEventListener("input", () => {
203
+ r[h] = E.value, E.classList.remove(
204
204
  "wgt:border-semantic-error",
205
205
  "wgt:bg-semantic-error-50"
206
- ), P.classList.add("wgt:hidden"), s();
206
+ ), R.classList.add("wgt:hidden"), s();
207
207
  }), E.addEventListener("blur", () => {
208
208
  if (!E.value.trim() && !L) return;
209
209
  let U;
210
- switch (f) {
210
+ switch (h) {
211
211
  case "business_name":
212
212
  case "representativeName":
213
213
  U = z(E.value);
@@ -227,52 +227,52 @@ function pe({
227
227
  !U.valid && U.error && (E.classList.add(
228
228
  "wgt:border-semantic-error",
229
229
  "wgt:bg-semantic-error-50"
230
- ), P.textContent = U.error, P.classList.remove("wgt:hidden"));
231
- }), O.appendChild(j), O.appendChild(E), O.appendChild(P), { field: O, input: E, errorEl: P };
230
+ ), R.textContent = U.error, R.classList.remove("wgt:hidden"));
231
+ }), O.appendChild(P), O.appendChild(E), O.appendChild(R), { field: O, input: E, errorEl: R };
232
232
  }
233
233
  const g = document.createElement("label");
234
234
  g.className = "wgt:flex wgt:items-center wgt:gap-2 wgt:font-medium wgt:text-strong-950 wgt:text-sm";
235
235
  const p = document.createElement("input");
236
- p.type = "checkbox", p.className = "wgt:h-4 wgt:w-4 wgt:rounded wgt:border-[#E4E7EC] focus:wgt:outline-none focus:wgt:ring-primary", p.checked = n.noTaxCode;
236
+ p.type = "checkbox", p.className = "wgt:h-4 wgt:w-4 wgt:rounded wgt:border-[#E4E7EC] focus:wgt:outline-none focus:wgt:ring-primary", p.checked = r.noTaxCode;
237
237
  const N = document.createElement("span");
238
- N.textContent = r("business_noTaxCode"), N.className = "wgt:italic wgt:font-normal wgt:text-[14px] wgt:leading-[20px] wgt:tracking-[0px] wgt:align-middle wgt:text-[#525866]", N.style.fontFamily = "Inter, sans-serif", p.addEventListener("change", () => {
239
- n.noTaxCode = p.checked, d.disabled = n.noTaxCode, l.disabled = n.noTaxCode, d.classList.remove(
238
+ N.textContent = n("business_noTaxCode"), N.className = "wgt:italic wgt:font-normal wgt:text-[14px] wgt:leading-[20px] wgt:tracking-[0px] wgt:align-middle wgt:text-[#525866]", N.style.fontFamily = "Inter, sans-serif", p.addEventListener("change", () => {
239
+ r.noTaxCode = p.checked, l.disabled = r.noTaxCode, o.disabled = r.noTaxCode, l.classList.remove(
240
240
  "wgt:border-semantic-error",
241
241
  "wgt:bg-semantic-error-50"
242
242
  ), x.classList.add("wgt:hidden"), s();
243
243
  }), g.appendChild(p), g.appendChild(N);
244
- const A = document.createElement("div");
245
- A.className = "wgt:space-y-2";
246
- const F = document.createElement("label");
247
- F.className = "wgt:text-sm wgt:font-medium wgt:text-strong-950 ", F.innerHTML = r("confirmation_popup_taxCode") + '<span class="wgt:text-[#ED1C24]">*</span>';
248
244
  const k = document.createElement("div");
249
- k.className = "wgt:flex wgt:gap-2 wgt:mt-2";
250
- const d = document.createElement("input");
251
- d.type = "text", d.name = "taxCode", d.placeholder = r("taxCode_input"), d.value = n.taxCode, d.className = "wgt:flex-1 wgt:rounded-lg wgt:border wgt:border-[#E4E7EC] wgt:bg-white wgt:px-3 wgt:py-2.5 wgt:text-sm wgt:text-strong-950 focus:wgt:outline-none focus:wgt:border-primary focus:wgt:ring-1 focus:wgt:ring-primary";
245
+ k.className = "wgt:space-y-2";
246
+ const F = document.createElement("label");
247
+ F.className = "wgt:text-sm wgt:font-medium wgt:text-strong-950 ", F.innerHTML = n("confirmation_popup_taxCode") + '<span class="wgt:text-[#ED1C24]">*</span>';
248
+ const M = document.createElement("div");
249
+ M.className = "wgt:flex wgt:gap-2 wgt:mt-2";
250
+ const l = document.createElement("input");
251
+ l.type = "text", l.name = "taxCode", l.placeholder = n("taxCode_input"), l.value = r.taxCode, l.className = "wgt:flex-1 wgt:rounded-lg wgt:border wgt:border-[#E4E7EC] wgt:bg-white wgt:px-3 wgt:py-2.5 wgt:text-sm wgt:text-strong-950 focus:wgt:outline-none focus:wgt:border-primary focus:wgt:ring-1 focus:wgt:ring-primary";
252
252
  const x = document.createElement("div");
253
- x.className = "wgt:text-xs wgt:text-[#ED1C24] wgt:mt-1 wgt:hidden", d.addEventListener("input", () => {
254
- n.taxCode = d.value, d.classList.remove(
253
+ x.className = "wgt:text-xs wgt:text-[#ED1C24] wgt:mt-1 wgt:hidden", l.addEventListener("input", () => {
254
+ r.taxCode = l.value, l.classList.remove(
255
255
  "wgt:border-semantic-error",
256
256
  "wgt:bg-semantic-error-50"
257
257
  ), x.classList.add("wgt:hidden"), s();
258
- }), d.addEventListener("blur", () => {
259
- if (n.noTaxCode || !d.value.trim()) return;
260
- const C = Q(d.value);
261
- C.valid || (d.classList.add(
258
+ }), l.addEventListener("blur", () => {
259
+ if (r.noTaxCode || !l.value.trim()) return;
260
+ const C = Q(l.value);
261
+ C.valid || (l.classList.add(
262
262
  "wgt:border-semantic-error",
263
263
  "wgt:bg-semantic-error-50"
264
264
  ), x.textContent = C.error, x.classList.remove("wgt:hidden"));
265
265
  });
266
- const l = G({
266
+ const o = G({
267
267
  type: "button",
268
- title: r("fetch_info"),
268
+ title: n("fetch_info"),
269
269
  className: "wgt:px-3 wgt:py-2.5 wgt:text-sm wgt:font-semibold wgt:rounded-lg wgt:flex-shrink-0 wgt:text-primary wgt:bg-white wgt:border wgt:border-primary",
270
- handleClick: () => R(null, null, function* () {
271
- if (n.noTaxCode || typeof e != "function")
270
+ handleClick: () => j(null, null, function* () {
271
+ if (r.noTaxCode || typeof e != "function")
272
272
  return;
273
- const C = String(n.taxCode || "").trim();
273
+ const C = String(r.taxCode || "").trim();
274
274
  if (!C) {
275
- d.classList.add(
275
+ l.classList.add(
276
276
  "wgt:border-semantic-error",
277
277
  "wgt:bg-semantic-error-50"
278
278
  ), x.textContent = "Vui lòng nhập MST", x.classList.remove("wgt:hidden");
@@ -280,133 +280,133 @@ function pe({
280
280
  }
281
281
  const L = Q(C);
282
282
  if (!L.valid) {
283
- d.classList.add(
283
+ l.classList.add(
284
284
  "wgt:border-semantic-error",
285
285
  "wgt:bg-semantic-error-50"
286
286
  ), x.textContent = L.error, x.classList.remove("wgt:hidden");
287
287
  return;
288
288
  }
289
289
  try {
290
- l.disabled = !0;
291
- const f = yield e(C, $({}, n));
292
- if (!f || typeof f != "object") return;
293
- f.representativeName != null && (n.representativeName = String(f.representativeName || ""), h.value = n.representativeName), f.buyerAddress != null && (n.buyerAddress = String(f.buyerAddress || ""), b.value = n.buyerAddress), s();
294
- } catch (f) {
295
- d.classList.add(
290
+ o.disabled = !0;
291
+ const h = yield e(C, $({}, r));
292
+ if (!h || typeof h != "object") return;
293
+ h.representativeName != null && (r.representativeName = String(h.representativeName || ""), f.value = r.representativeName), h.buyerAddress != null && (r.buyerAddress = String(h.buyerAddress || ""), b.value = r.buyerAddress), s();
294
+ } catch (h) {
295
+ l.classList.add(
296
296
  "wgt:border-semantic-error",
297
297
  "wgt:bg-semantic-error-50"
298
298
  ), x.textContent = "Không tìm thấy thông tin MST", x.classList.remove("wgt:hidden");
299
299
  } finally {
300
- l.disabled = n.noTaxCode;
300
+ o.disabled = r.noTaxCode;
301
301
  }
302
302
  })
303
303
  });
304
- k.appendChild(d), k.appendChild(l), A.appendChild(F), A.appendChild(k), A.appendChild(x);
304
+ M.appendChild(l), M.appendChild(o), k.appendChild(F), k.appendChild(M), k.appendChild(x);
305
305
  const {
306
306
  field: w,
307
- input: h,
307
+ input: f,
308
308
  errorEl: c
309
309
  } = a({
310
- label: r("business_name"),
310
+ label: n("business_name"),
311
311
  required: !0,
312
312
  name: "business_name",
313
- placeholder: r("business_name_input")
313
+ placeholder: n("business_name_input")
314
314
  }), {
315
315
  field: v,
316
316
  input: y,
317
- errorEl: M
317
+ errorEl: H
318
318
  } = a({
319
- label: r("representativeName"),
319
+ label: n("representativeName"),
320
320
  required: !0,
321
321
  name: "representativeName",
322
- placeholder: r("representativeName_input")
322
+ placeholder: n("representativeName_input")
323
323
  }), {
324
- field: B,
324
+ field: Z,
325
325
  input: b,
326
- errorEl: H
326
+ errorEl: A
327
327
  } = a({
328
- label: r("buyerAddress"),
328
+ label: n("buyerAddress"),
329
329
  required: !1,
330
330
  name: "buyerAddress",
331
- placeholder: r("buyerAddress_input")
331
+ placeholder: n("buyerAddress_input")
332
332
  }), {
333
333
  field: _,
334
334
  input: m,
335
335
  errorEl: T
336
336
  } = a({
337
- label: r("email"),
337
+ label: n("email"),
338
338
  required: !0,
339
339
  name: "email",
340
340
  type: "email",
341
- placeholder: r("email_input")
341
+ placeholder: n("email_input")
342
342
  }), {
343
343
  field: u,
344
344
  input: V,
345
- errorEl: Z
345
+ errorEl: S
346
346
  } = a({
347
- label: r("phone"),
347
+ label: n("phone"),
348
348
  required: !0,
349
349
  name: "phone",
350
350
  type: "tel",
351
- placeholder: r("phone_input")
351
+ placeholder: n("phone_input")
352
352
  });
353
- o.appendChild(g), o.appendChild(A), o.appendChild(w), o.appendChild(v), o.appendChild(B), o.appendChild(_), o.appendChild(u), d.disabled = n.noTaxCode, l.disabled = n.noTaxCode;
354
- function S() {
353
+ d.appendChild(g), d.appendChild(k), d.appendChild(w), d.appendChild(v), d.appendChild(Z), d.appendChild(_), d.appendChild(u), l.disabled = r.noTaxCode, o.disabled = r.noTaxCode;
354
+ function B() {
355
355
  let C = !0;
356
- function L(j, E, P) {
357
- j.classList.add(
356
+ function L(P, E, R) {
357
+ P.classList.add(
358
358
  "wgt:border-semantic-error",
359
359
  "wgt:bg-semantic-error-50 ",
360
360
  "wgt:mt-2"
361
- ), P && E && (E.textContent = P, E.classList.remove("wgt:hidden")), C = !1;
361
+ ), R && E && (E.textContent = R, E.classList.remove("wgt:hidden")), C = !1;
362
362
  }
363
- if (!n.noTaxCode) {
364
- const j = Q(n.taxCode);
365
- j.valid || L(d, x, j.error);
363
+ if (!r.noTaxCode) {
364
+ const P = Q(r.taxCode);
365
+ P.valid || L(l, x, P.error);
366
366
  }
367
- const f = z(n.representativeName);
368
- f.valid || L(h, c, f.error);
369
- const W = z(n.performerName);
370
- if (W.valid || L(y, M, W.error), n.buyerAddress.trim()) {
371
- const j = X(n.buyerAddress);
372
- j.valid || L(b, H, j.error);
367
+ const h = z(r.representativeName);
368
+ h.valid || L(f, c, h.error);
369
+ const W = z(r.performerName);
370
+ if (W.valid || L(y, H, W.error), r.buyerAddress.trim()) {
371
+ const P = X(r.buyerAddress);
372
+ P.valid || L(b, A, P.error);
373
373
  }
374
- const I = K(n.email);
374
+ const I = K(r.email);
375
375
  I.valid || L(m, T, I.error);
376
- const O = Y(n.phone, !0);
377
- return O.valid || L(V, Z, O.error), C;
376
+ const O = Y(r.phone, !0);
377
+ return O.valid || L(V, S, O.error), C;
378
378
  }
379
379
  function q() {
380
- return $({}, n);
380
+ return $({}, r);
381
381
  }
382
- return { container: o, getValues: q, validate: S };
382
+ return { container: d, getValues: q, validate: B };
383
383
  }
384
- function ge({
384
+ function me({
385
385
  type: i,
386
386
  data: t,
387
387
  orderInfo: e,
388
- theme: n,
389
- onClose: o,
388
+ theme: r,
389
+ onClose: d,
390
390
  onConfirm: s
391
391
  }) {
392
392
  const a = document.createElement("div");
393
393
  a.className = "wgt:fixed wgt:inset-0 wgt:flex wgt:items-center wgt:justify-center wgt:z-50 wgt:p-4", a.style.cssText = `
394
394
  background-color: rgba(0, 0, 0, 0.5);
395
395
  backdrop-filter: blur(4px);
396
- `, n && a.setAttribute("data-theme", n);
396
+ `, r && a.setAttribute("data-theme", r);
397
397
  const g = document.createElement("div");
398
398
  g.className = "wgt:w-full wgt:max-w-md wgt:bg-white wgt:rounded-2xl wgt:shadow-xl wgt:max-h-[90vh] wgt:overflow-y-auto";
399
399
  const p = document.createElement("div");
400
400
  p.className = "wgt:px-6 wgt:pt-6 wgt:pb-4 wgt:space-y-2";
401
401
  const N = document.createElement("h3");
402
- N.className = "wgt:text-xl wgt:font-semibold wgt:text-center wgt:text-strong-950", N.textContent = r("confirmation_popup_title");
403
- const A = document.createElement("p");
404
- A.className = "wgt:text-sm wgt:text-center wgt:text-[#525866]", A.textContent = r("confirmation_popup_subtitle"), p.appendChild(N), p.appendChild(A), g.appendChild(p);
402
+ N.className = "wgt:text-xl wgt:font-semibold wgt:text-center wgt:text-strong-950", N.textContent = n("confirmation_popup_title");
403
+ const k = document.createElement("p");
404
+ k.className = "wgt:text-sm wgt:text-center wgt:text-[#525866]", k.textContent = n("confirmation_popup_subtitle"), p.appendChild(N), p.appendChild(k), g.appendChild(p);
405
405
  const F = document.createElement("div");
406
406
  F.className = "wgt:px-6 wgt:pb-4";
407
- const k = document.createElement("div");
408
- k.className = "wgt:space-y-3 wgt:rounded-xl wgt:bg-weak-50 wgt:px-4 wgt:py-3";
409
- function d(b, H, _) {
407
+ const M = document.createElement("div");
408
+ M.className = "wgt:space-y-3 wgt:rounded-xl wgt:bg-weak-50 wgt:px-4 wgt:py-3";
409
+ function l(b, A, _) {
410
410
  const m = document.createElement("div");
411
411
  m.className = "wgt:flex wgt:items-start wgt:gap-3";
412
412
  const T = document.createElement("span");
@@ -414,77 +414,77 @@ function ge({
414
414
  const u = document.createElement("div");
415
415
  u.className = "wgt:flex wgt:items-start wgt:justify-between wgt:flex-1 wgt:gap-2";
416
416
  const V = document.createElement("span");
417
- V.className = "wgt:text-sm wgt:text-[#525866] wgt:w-1/3", V.textContent = H;
418
- const Z = document.createElement("span");
419
- return Z.className = "wgt:text-sm wgt:font-semibold wgt:text-strong-950 wgt:text-right wgt:w-2/3", Z.textContent = _ || "-", u.appendChild(V), u.appendChild(Z), m.appendChild(T), m.appendChild(u), m;
417
+ V.className = "wgt:text-sm wgt:text-[#525866] wgt:w-1/3", V.textContent = A;
418
+ const S = document.createElement("span");
419
+ return S.className = "wgt:text-sm wgt:font-semibold wgt:text-strong-950 wgt:text-right wgt:w-2/3", S.textContent = _ || "-", u.appendChild(V), u.appendChild(S), m.appendChild(T), m.appendChild(u), m;
420
420
  }
421
- const x = '<svg class="wgt:w-4 wgt:h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /></svg>', l = '<svg class="wgt:w-4 wgt:h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z" /><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 11a3 3 0 11-6 0 3 3 0 016 0z" /></svg>', w = '<svg class="wgt:w-4 wgt:h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>';
422
- k.appendChild(
423
- d(
421
+ const x = '<svg class="wgt:w-4 wgt:h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /></svg>', o = '<svg class="wgt:w-4 wgt:h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z" /><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 11a3 3 0 11-6 0 3 3 0 016 0z" /></svg>', w = '<svg class="wgt:w-4 wgt:h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>';
422
+ M.appendChild(
423
+ l(
424
424
  x,
425
- r("confirmation_popup_orderCode"),
425
+ n("confirmation_popup_orderCode"),
426
426
  e == null ? void 0 : e.billNo
427
427
  )
428
- ), k.appendChild(
429
- d(
430
- l,
431
- r("confirmation_popup_address"),
428
+ ), M.appendChild(
429
+ l(
430
+ o,
431
+ n("confirmation_popup_address"),
432
432
  e == null ? void 0 : e.merchantAddress
433
433
  )
434
- ), k.appendChild(
435
- d(
434
+ ), M.appendChild(
435
+ l(
436
436
  w,
437
- r("confirmation_popup_totalAmount"),
437
+ n("confirmation_popup_totalAmount"),
438
438
  te(e == null ? void 0 : e.amount) + " VND"
439
439
  )
440
- ), F.appendChild(k), g.appendChild(F);
441
- const h = document.createElement("div");
442
- h.className = "wgt:px-6 wgt:pb-6";
440
+ ), F.appendChild(M), g.appendChild(F);
441
+ const f = document.createElement("div");
442
+ f.className = "wgt:px-6 wgt:pb-6";
443
443
  const c = document.createElement("div");
444
444
  c.className = "wgt:space-y-3 wgt:rounded-xl wgt:border wgt:border-[#E1E4EA] wgt:px-4 wgt:py-4";
445
- function v(b, H) {
445
+ function v(b, A) {
446
446
  const _ = document.createElement("div");
447
447
  _.className = "wgt:flex wgt:items-start wgt:justify-between wgt:gap-4";
448
448
  const m = document.createElement("span");
449
449
  m.className = "wgt:text-sm wgt:text-[#0E121B] wgt:w-1/3", m.textContent = b;
450
450
  const T = document.createElement("span");
451
- return T.className = "wgt:text-sm wgt:font-semibold wgt:text-strong-950 wgt:text-right wgt:w-2/3", T.textContent = H || "-", _.appendChild(m), _.appendChild(T), _;
451
+ return T.className = "wgt:text-sm wgt:font-semibold wgt:text-strong-950 wgt:text-right wgt:w-2/3", T.textContent = A || "-", _.appendChild(m), _.appendChild(T), _;
452
452
  }
453
453
  i === "business" ? (c.appendChild(
454
- v(r("confirmation_popup_taxCode"), t.taxCode)
454
+ v(n("confirmation_popup_taxCode"), t.taxCode)
455
455
  ), c.appendChild(
456
456
  v(
457
- r("confirmation_popup_representativeName"),
457
+ n("confirmation_popup_representativeName"),
458
458
  t.representativeName
459
459
  )
460
460
  ), c.appendChild(
461
- v(r("confirmation_popup_buyerAddress"), t.buyerAddress)
461
+ v(n("confirmation_popup_buyerAddress"), t.buyerAddress)
462
462
  ), c.appendChild(
463
- v(r("confirmation_popup_performerName"), t.performerName)
463
+ v(n("confirmation_popup_performerName"), t.performerName)
464
464
  ), c.appendChild(
465
- v(r("confirmation_popup_email"), t.email)
465
+ v(n("confirmation_popup_email"), t.email)
466
466
  ), c.appendChild(
467
- v(r("confirmation_popup_phone"), t.phone)
467
+ v(n("confirmation_popup_phone"), t.phone)
468
468
  )) : (c.appendChild(
469
469
  v(
470
- r("confirmation_popup_representativeName"),
470
+ n("confirmation_popup_representativeName"),
471
471
  t.representativeName
472
472
  )
473
473
  ), c.appendChild(
474
- v(r("confirmation_popup_buyerAddress"), t.buyerAddress)
474
+ v(n("confirmation_popup_buyerAddress"), t.buyerAddress)
475
475
  ), c.appendChild(
476
- v(r("confirmation_popup_email"), t.email)
477
- )), h.appendChild(c), g.appendChild(h);
476
+ v(n("confirmation_popup_email"), t.email)
477
+ )), f.appendChild(c), g.appendChild(f);
478
478
  const y = document.createElement("div");
479
479
  y.className = "wgt:px-6 wgt:pb-6 wgt:flex wgt:gap-3";
480
- const M = G({
480
+ const H = G({
481
481
  type: "button",
482
482
  title: "Đóng",
483
483
  className: "wgt:flex-1 wgt:py-3 wgt:text-sm wgt:font-semibold wgt:rounded-[8px] wgt:bg-white wgt:text-primary wgt:border wgt:border-primary",
484
484
  handleClick: () => {
485
- typeof o == "function" && o(), a.remove();
485
+ typeof d == "function" && d(), a.remove();
486
486
  }
487
- }), B = G({
487
+ }), Z = G({
488
488
  type: "button",
489
489
  title: "Xác nhận",
490
490
  className: "wgt:flex-1 wgt:py-3 wgt:text-sm wgt:font-semibold wgt:rounded-[8px] wgt:bg-primary wgt:text-white",
@@ -492,16 +492,16 @@ function ge({
492
492
  typeof s == "function" && s({ type: i, data: t }), a.remove();
493
493
  }
494
494
  });
495
- return y.appendChild(M), y.appendChild(B), g.appendChild(y), a.appendChild(g), a.addEventListener("click", (b) => {
496
- b.target === a && (typeof o == "function" && o(), a.remove());
495
+ return y.appendChild(H), y.appendChild(Z), g.appendChild(y), a.appendChild(g), a.addEventListener("click", (b) => {
496
+ b.target === a && (typeof d == "function" && d(), a.remove());
497
497
  }), { overlay: a };
498
498
  }
499
- function me({
499
+ function we({
500
500
  orderInfo: i,
501
501
  onPreview: t,
502
502
  theme: e,
503
- onSubmit: n,
504
- taxCode: o = ""
503
+ onSubmit: r,
504
+ taxCode: d = ""
505
505
  }) {
506
506
  const s = document.createElement("div");
507
507
  s.className = "wgt:flex wgt:flex-col wgt:items-center wgt:justify-between wgt:h-full wgt:shadow wgt:rounded-xl", e && s.setAttribute("data-theme", e);
@@ -513,63 +513,63 @@ function me({
513
513
  close: N
514
514
  } = oe();
515
515
  s.style.position = s.style.position || "relative", s.appendChild(g);
516
- const A = document.createElement("div");
517
- A.className = "wgt:space-y-1";
516
+ const k = document.createElement("div");
517
+ k.className = "wgt:space-y-1";
518
518
  const F = document.createElement("h3");
519
- F.className = "wgt:text-2xl wgt:font-semibold wgt:text-text-black wgt:text-center wgt:justify-center", F.textContent = r("invoiceform_title");
520
- const k = document.createElement("p");
521
- k.className = "wgt:text-sm wgt:text-weak-700 wgt:text-center wgt:justify-center", k.textContent = r("invoiceform_subtitle"), A.appendChild(F), A.appendChild(k), a.appendChild(A);
522
- const d = document.createElement("div");
523
- d.className = "wgt:mt-2 wgt:space-y-3 wgt:rounded-xl wgt:bg-weak-50 wgt:px-6 wgt:py-6";
519
+ F.className = "wgt:text-2xl wgt:font-semibold wgt:text-text-black wgt:text-center wgt:justify-center", F.textContent = n("invoiceform_title");
520
+ const M = document.createElement("p");
521
+ M.className = "wgt:text-sm wgt:text-weak-700 wgt:text-center wgt:justify-center", M.textContent = n("invoiceform_subtitle"), k.appendChild(F), k.appendChild(M), a.appendChild(k);
522
+ const l = document.createElement("div");
523
+ l.className = "wgt:mt-2 wgt:space-y-3 wgt:rounded-xl wgt:bg-weak-50 wgt:px-6 wgt:py-6";
524
524
  function x(u, V) {
525
- const Z = document.createElement("div");
526
- Z.className = "wgt:flex wgt:items-start";
527
525
  const S = document.createElement("div");
528
- S.className = "wgt:flex wgt:items-center wgt:gap-2 wgt:w-1/3";
526
+ S.className = "wgt:flex wgt:items-start";
527
+ const B = document.createElement("div");
528
+ B.className = "wgt:flex wgt:items-center wgt:gap-2 wgt:w-1/3";
529
529
  const q = document.createElement("span");
530
530
  q.className = "wgt:inline-flex wgt:items-center wgt:justify-center wgt:w-4 wgt:h-4 wgt:text-icon-primary";
531
531
  let C = "";
532
- u === r("orderCode") ? C = `
532
+ u === n("orderCode") ? C = `
533
533
  <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
534
534
  <path d="M12.7996 14H3.19961C3.04048 14 2.88787 13.9368 2.77535 13.8243C2.66282 13.7117 2.59961 13.5591 2.59961 13.4V2.6C2.59961 2.44087 2.66282 2.28826 2.77535 2.17574C2.88787 2.06321 3.04048 2 3.19961 2H12.7996C12.9587 2 13.1114 2.06321 13.2239 2.17574C13.3364 2.28826 13.3996 2.44087 13.3996 2.6V13.4C13.3996 13.5591 13.3364 13.7117 13.2239 13.8243C13.1114 13.9368 12.9587 14 12.7996 14ZM12.1996 12.8V3.2H3.79961V12.8H12.1996ZM5.59961 6.2H10.3996V7.4H5.59961V6.2ZM5.59961 8.6H10.3996V9.8H5.59961V8.6Z" fill="currentColor"/>
535
535
  </svg>
536
536
 
537
- ` : u === r("address_form") ? C = `
537
+ ` : u === n("address_form") ? C = `
538
538
  <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
539
539
  <path d="M7.99961 13.34L10.9696 10.37C11.557 9.78256 11.9569 9.03419 12.1189 8.21948C12.281 7.40477 12.1978 6.56031 11.8799 5.79289C11.562 5.02546 11.0236 4.36954 10.333 3.90805C9.64229 3.44657 8.83028 3.20026 7.99961 3.20026C7.16895 3.20026 6.35694 3.44657 5.66626 3.90805C4.97558 4.36954 4.43726 5.02546 4.11936 5.79289C3.80146 6.56031 3.71826 7.40477 3.88028 8.21948C4.04231 9.03419 4.44227 9.78256 5.02961 10.37L7.99961 13.34ZM7.99961 15.0368L4.18121 11.2184C3.42602 10.4631 2.91172 9.50096 2.70337 8.45346C2.49501 7.40597 2.60195 6.32021 3.01067 5.33349C3.41938 4.34678 4.11152 3.50342 4.99954 2.91006C5.88756 2.3167 6.9316 2 7.99961 2C9.06763 2 10.1117 2.3167 10.9997 2.91006C11.8877 3.50342 12.5798 4.34678 12.9886 5.33349C13.3973 6.32021 13.5042 7.40597 13.2959 8.45346C13.0875 9.50096 12.5732 10.4631 11.818 11.2184L7.99961 15.0368ZM7.99961 8.59995C8.31787 8.59995 8.6231 8.47353 8.84814 8.24848C9.07318 8.02344 9.19961 7.71821 9.19961 7.39995C9.19961 7.08169 9.07318 6.77647 8.84814 6.55143C8.6231 6.32638 8.31787 6.19995 7.99961 6.19995C7.68135 6.19995 7.37613 6.32638 7.15108 6.55143C6.92604 6.77647 6.79961 7.08169 6.79961 7.39995C6.79961 7.71821 6.92604 8.02344 7.15108 8.24848C7.37613 8.47353 7.68135 8.59995 7.99961 8.59995ZM7.99961 9.79995C7.36309 9.79995 6.75264 9.5471 6.30256 9.09701C5.85247 8.64692 5.59961 8.03647 5.59961 7.39995C5.59961 6.76343 5.85247 6.15298 6.30256 5.7029C6.75264 5.25281 7.36309 4.99995 7.99961 4.99995C8.63613 4.99995 9.24658 5.25281 9.69667 5.7029C10.1468 6.15298 10.3996 6.76343 10.3996 7.39995C10.3996 8.03647 10.1468 8.64692 9.69667 9.09701C9.24658 9.5471 8.63613 9.79995 7.99961 9.79995Z" fill="currentColor"/>
540
540
  </svg>
541
541
 
542
- ` : u === r("total_amount") && (C = `
542
+ ` : u === n("total_amount") && (C = `
543
543
  <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
544
544
  <path d="M8 14C4.6862 14 2 11.3138 2 8C2 4.6862 4.6862 2 8 2C11.3138 2 14 4.6862 14 8C14 11.3138 11.3138 14 8 14ZM8 12.8C9.27304 12.8 10.4939 12.2943 11.3941 11.3941C12.2943 10.4939 12.8 9.27304 12.8 8C12.8 6.72696 12.2943 5.50606 11.3941 4.60589C10.4939 3.70571 9.27304 3.2 8 3.2C6.72696 3.2 5.50606 3.70571 4.60589 4.60589C3.70571 5.50606 3.2 6.72696 3.2 8C3.2 9.27304 3.70571 10.4939 4.60589 11.3941C5.50606 12.2943 6.72696 12.8 8 12.8V12.8ZM5.9 9.2H9.2C9.27957 9.2 9.35587 9.16839 9.41213 9.11213C9.46839 9.05587 9.5 8.97957 9.5 8.9C9.5 8.82044 9.46839 8.74413 9.41213 8.68787C9.35587 8.63161 9.27957 8.6 9.2 8.6H6.8C6.40218 8.6 6.02064 8.44197 5.73934 8.16066C5.45804 7.87936 5.3 7.49783 5.3 7.1C5.3 6.70218 5.45804 6.32065 5.73934 6.03934C6.02064 5.75804 6.40218 5.6 6.8 5.6H7.4V4.4H8.6V5.6H10.1V6.8H6.8C6.72044 6.8 6.64413 6.83161 6.58787 6.88787C6.53161 6.94413 6.5 7.02044 6.5 7.1C6.5 7.17957 6.53161 7.25587 6.58787 7.31213C6.64413 7.36839 6.72044 7.4 6.8 7.4H9.2C9.59783 7.4 9.97936 7.55804 10.2607 7.83934C10.542 8.12065 10.7 8.50218 10.7 8.9C10.7 9.29783 10.542 9.67936 10.2607 9.96066C9.97936 10.242 9.59783 10.4 9.2 10.4H8.6V11.6H7.4V10.4H5.9V9.2Z" fill="currentColor"/>
545
545
  </svg>
546
546
 
547
547
  `), q.innerHTML = C;
548
548
  const L = document.createElement("span");
549
- L.className = "wgt:text-sm wgt:text-weak-700", L.textContent = u, S.appendChild(q), S.appendChild(L);
550
- const f = document.createElement("span");
551
- return f.className = "wgt:text-sm wgt:font-semibold wgt:text-strong-950 wgt:w-2/3 wgt:text-right", f.textContent = V, Z.appendChild(S), Z.appendChild(f), Z;
549
+ L.className = "wgt:text-sm wgt:text-weak-700", L.textContent = u, B.appendChild(q), B.appendChild(L);
550
+ const h = document.createElement("span");
551
+ return h.className = "wgt:text-sm wgt:font-semibold wgt:text-strong-950 wgt:w-2/3 wgt:text-right", h.textContent = V, S.appendChild(B), S.appendChild(h), S;
552
552
  }
553
- d.appendChild(x(r("orderCode"), i == null ? void 0 : i.billNo)), d.appendChild(
554
- x(r("address_form"), i == null ? void 0 : i.merchantAddress)
555
- ), d.appendChild(
553
+ l.appendChild(x(n("orderCode"), i == null ? void 0 : i.billNo)), l.appendChild(
554
+ x(n("address_form"), i == null ? void 0 : i.merchantAddress)
555
+ ), l.appendChild(
556
556
  x(
557
- r("total_amount"),
557
+ n("total_amount"),
558
558
  te(i == null ? void 0 : i.amount) + " VND"
559
559
  )
560
- ), a.appendChild(d);
561
- const l = document.createElement("div");
562
- l.className = "wgt:mt-4 wgt:rounded-xl wgt:border wgt:border-[#E1E4EA] wgt:bg-white wgt:pb-6", a.appendChild(l);
560
+ ), a.appendChild(l);
561
+ const o = document.createElement("div");
562
+ o.className = "wgt:mt-4 wgt:rounded-xl wgt:border wgt:border-[#E1E4EA] wgt:bg-white wgt:pb-6", a.appendChild(o);
563
563
  const w = document.createElement("div");
564
- w.className = "wgt:flex wgt:border-b wgt:border-[#E1E4EA]", l.appendChild(w);
565
- const h = document.createElement("button");
566
- h.type = "button", h.className = "wgt:relative wgt:flex-1 wgt:py-4 wgt:text-sm wgt:font-semibold ", h.innerHTML = `
564
+ w.className = "wgt:flex wgt:border-b wgt:border-[#E1E4EA]", o.appendChild(w);
565
+ const f = document.createElement("button");
566
+ f.type = "button", f.className = "wgt:relative wgt:flex-1 wgt:py-4 wgt:text-sm wgt:font-semibold ", f.innerHTML = `
567
567
  <span class="wgt:flex wgt:items-center wgt:justify-center wgt:gap-2">
568
568
  <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
569
569
  <path d="M10 12C11.4587 12 12.8572 12.5799 13.8887 13.6113C14.8016 14.5242 15.3592 15.7247 15.4756 17H14.9746C14.8598 15.8576 14.3542 14.7839 13.5352 13.9648C12.5975 13.0272 11.3261 12.5 10 12.5C8.67392 12.5 7.40253 13.0272 6.46484 13.9648C5.64577 14.7839 5.14018 15.8576 5.02539 17H4.52441C4.64082 15.7247 5.19843 14.5242 6.11133 13.6113C7.07838 12.6443 8.36805 12.0742 9.72754 12.0068L10 12ZM10 2.25C12.2101 2.25 14 4.03989 14 6.25C14 8.46011 12.2101 10.25 10 10.25C7.78989 10.25 6 8.46011 6 6.25C6 4.03989 7.78989 2.25 10 2.25ZM10 2.75C8.06636 2.75 6.5 4.31636 6.5 6.25C6.5 8.18364 8.06636 9.75 10 9.75C11.9336 9.75 13.5 8.18364 13.5 6.25C13.5 4.31636 11.9336 2.75 10 2.75Z" fill="currentColor" stroke="currentColor"/>
570
570
  </svg>
571
571
 
572
- ${r("individual")}
572
+ ${n("individual")}
573
573
  </span>
574
574
  `;
575
575
  const c = document.createElement("button");
@@ -579,44 +579,44 @@ function me({
579
579
  <path d="M4 3.875H11.5C11.5332 3.875 11.5654 3.88769 11.5889 3.91113C11.6123 3.93457 11.625 3.96685 11.625 4V15.875H15.875V8.625H14.375V8.375H16C16.0332 8.375 16.0654 8.38769 16.0889 8.41113C16.1123 8.43457 16.125 8.46685 16.125 8.5V15.875H17.625V16.125H2.375V15.875H3.875V4C3.875 3.96685 3.88769 3.93457 3.91113 3.91113C3.93457 3.88769 3.96685 3.875 4 3.875ZM4.125 15.875H11.375V4.125H4.125V15.875ZM8.625 9.875V10.125H6.875V9.875H8.625ZM8.625 6.875V7.125H6.875V6.875H8.625Z" fill="currentColor" stroke="currentColor" stroke-width="1.25"/>
580
580
  </svg>
581
581
 
582
- ${r("business")}
582
+ ${n("business")}
583
583
  </span>
584
- `, w.appendChild(h), w.appendChild(c);
584
+ `, w.appendChild(f), w.appendChild(c);
585
585
  const v = document.createElement("div");
586
- v.className = "wgt:mt-4 wgt:px-4", l.appendChild(v);
587
- const y = ce(), M = pe({
588
- defaultValues: { taxCode: o || "" },
589
- onFetchByTaxCode: (u) => R(null, null, function* () {
590
- var Z, S;
591
- const V = yield le(u);
586
+ v.className = "wgt:mt-4 wgt:px-4", o.appendChild(v);
587
+ const y = pe(), H = ge({
588
+ defaultValues: { taxCode: d || "" },
589
+ onFetchByTaxCode: (u) => j(null, null, function* () {
590
+ var S, B;
591
+ const V = yield de(u);
592
592
  return {
593
- representativeName: (Z = V.nguoi_dai_dien) != null ? Z : "",
594
- buyerAddress: (S = V.dia_chi) != null ? S : ""
593
+ representativeName: (S = V.nguoi_dai_dien) != null ? S : "",
594
+ buyerAddress: (B = V.dia_chi) != null ? B : ""
595
595
  };
596
596
  })
597
597
  });
598
- let B = "individual", b = y;
599
- function H(u) {
600
- B = u, h.style.borderBottom = "none", c.style.borderBottom = "none";
598
+ let Z = "individual", b = y;
599
+ function A(u) {
600
+ Z = u, f.style.borderBottom = "none", c.style.borderBottom = "none";
601
601
  const V = "wgt:relative wgt:flex-1 wgt:py-4 wgt:text-sm wgt:font-semibold";
602
- u === "individual" ? (h.className = `${V} wgt:text-strong-950`, h.style.borderBottom = "2px solid var(--primary)", c.className = `${V} wgt:text-soft-400`, v.innerHTML = "", v.appendChild(y.container), b = y) : (c.className = `${V} wgt:text-strong-950`, c.style.borderBottom = "2px solid var(--primary)", h.className = `${V} wgt:text-soft-400`, v.innerHTML = "", v.appendChild(M.container), b = M);
602
+ u === "individual" ? (f.className = `${V} wgt:text-strong-950`, f.style.borderBottom = "2px solid var(--primary)", c.className = `${V} wgt:text-soft-400`, v.innerHTML = "", v.appendChild(y.container), b = y) : (c.className = `${V} wgt:text-strong-950`, c.style.borderBottom = "2px solid var(--primary)", f.className = `${V} wgt:text-soft-400`, v.innerHTML = "", v.appendChild(H.container), b = H);
603
603
  }
604
- h.addEventListener("click", () => H("individual")), c.addEventListener("click", () => H("business")), H("individual");
604
+ f.addEventListener("click", () => A("individual")), c.addEventListener("click", () => A("business")), A("individual");
605
605
  const _ = document.createElement("p");
606
- _.className = "wgt:mt-2 wgt:text-xs wgt:text-[#FF8447] wgt:text-left wgt:justify-center", _.textContent = r("invoiceform_note"), a.appendChild(_);
606
+ _.className = "wgt:mt-2 wgt:text-xs wgt:text-[#FF8447] wgt:text-left wgt:justify-center", _.textContent = n("invoiceform_note"), a.appendChild(_);
607
607
  const m = document.createElement("div");
608
608
  m.className = "wgt:mt-6 wgt:w-full wgt:flex wgt:justify-center wgt:items-center";
609
609
  const T = G({
610
610
  type: "button",
611
- title: r("btn_preview"),
611
+ title: n("btn_preview"),
612
612
  className: "wgt:min-w-[163px] wgt:text-white",
613
613
  handleClick: () => {
614
614
  if (!b.validate())
615
615
  return;
616
616
  const u = {
617
- type: B,
617
+ type: Z,
618
618
  data: b.getValues()
619
- }, { overlay: V } = ge({
619
+ }, { overlay: V } = me({
620
620
  type: u.type,
621
621
  data: u.data,
622
622
  orderInfo: i,
@@ -624,19 +624,19 @@ function me({
624
624
  onClose: () => {
625
625
  console.log("Popup closed");
626
626
  },
627
- onConfirm: () => R(null, null, function* () {
628
- var Z, S, q;
627
+ onConfirm: () => j(null, null, function* () {
628
+ var S, B, q;
629
629
  V.remove(), p();
630
630
  try {
631
- if (typeof n != "function") return;
632
- const C = yield n({
631
+ if (typeof r != "function") return;
632
+ const C = yield r({
633
633
  type: u.type,
634
634
  data: u.data
635
- }), L = (q = (S = (Z = C == null ? void 0 : C.finalData) != null ? Z : C == null ? void 0 : C.data) != null ? S : C) != null ? q : {}, f = String((L == null ? void 0 : L.status) || "").trim().toLowerCase();
636
- if (N(), f === "invoiced") {
635
+ }), L = (q = (B = (S = C == null ? void 0 : C.finalData) != null ? S : C == null ? void 0 : C.data) != null ? B : C) != null ? q : {}, h = String((L == null ? void 0 : L.status) || "").trim().toLowerCase();
636
+ if (N(), h === "invoiced") {
637
637
  J({
638
- message: r("invoice_success"),
639
- description: r("invoice_description"),
638
+ message: n("invoice_success"),
639
+ description: n("invoice_description"),
640
640
  // okLabel: t('close'),
641
641
  isSuccess: !0,
642
642
  hideOkButton: !0,
@@ -645,10 +645,10 @@ function me({
645
645
  }).open();
646
646
  return;
647
647
  }
648
- if (f === "failed") {
648
+ if (h === "failed") {
649
649
  J({
650
- message: r("invoice_failed"),
651
- description: r("invoice_description_failed"),
650
+ message: n("invoice_failed"),
651
+ description: n("invoice_description_failed"),
652
652
  // okLabel: t('close'),
653
653
  isSuccess: !1,
654
654
  hideOkButton: !0,
@@ -659,8 +659,8 @@ function me({
659
659
  }
660
660
  } catch (C) {
661
661
  N(), J({
662
- message: r("invoice_failed"),
663
- description: r("invoice_description_failed"),
662
+ message: n("invoice_failed"),
663
+ description: n("invoice_description_failed"),
664
664
  // okLabel: t('close'),
665
665
  isSuccess: !1,
666
666
  hideOkButton: !0,
@@ -675,32 +675,32 @@ function me({
675
675
  });
676
676
  return m.appendChild(T), a.appendChild(m), { container: s };
677
677
  }
678
- function we({ theme: i, onClose: t } = {}) {
678
+ function ue({ theme: i, onClose: t } = {}) {
679
679
  const e = document.createElement("div");
680
680
  e.className = " wgt:flex wgt:h-screen wgt:bg-[#F3F4F6] wgt:p-4", i && e.setAttribute("data-theme", i);
681
- const n = document.createElement("div");
682
- n.className = "wgt:w-full wgt:max-w-md wgt:max-h-[208px] wgt:bg-white wgt:rounded-2xl wgt:shadow-sm wgt:p-8 wgt:text-center";
683
- const o = document.createElement("div");
684
- o.className = "wgt:flex wgt:justify-center wgt:mb-4";
681
+ const r = document.createElement("div");
682
+ r.className = "wgt:w-full wgt:max-w-md wgt:max-h-[208px] wgt:bg-white wgt:rounded-2xl wgt:shadow-sm wgt:p-8 wgt:text-center";
683
+ const d = document.createElement("div");
684
+ d.className = "wgt:flex wgt:justify-center wgt:mb-4";
685
685
  const s = document.createElement("div");
686
686
  s.className = "wgt:w-12 wgt:h-12 wgt:rounded-full wgt:flex wgt:items-center wgt:justify-center", s.style.backgroundColor = "#335CFF", s.innerHTML = `
687
687
  <svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">
688
688
  <path d="M20.7996 22.75H5.19961C4.94102 22.75 4.69303 22.6473 4.51018 22.4644C4.32733 22.2816 4.22461 22.0336 4.22461 21.775V4.225C4.22461 3.96641 4.32733 3.71842 4.51018 3.53557C4.69303 3.35272 4.94102 3.25 5.19961 3.25H20.7996C21.0582 3.25 21.3062 3.35272 21.489 3.53557C21.6719 3.71842 21.7746 3.96641 21.7746 4.225V21.775C21.7746 22.0336 21.6719 22.2816 21.489 22.4644C21.3062 22.6473 21.0582 22.75 20.7996 22.75ZM9.09961 10.075V12.025H16.8996V10.075H9.09961ZM9.09961 13.975V15.925H16.8996V13.975H9.09961Z" fill="white"/>
689
689
  </svg>
690
690
 
691
- `, o.appendChild(s), n.appendChild(o);
691
+ `, d.appendChild(s), r.appendChild(d);
692
692
  const a = document.createElement("h2");
693
- a.className = "wgt:text-base wgt:font-semibold wgt:text-[#0E121B] wgt:mb-2", a.textContent = r("invoiceCheckout_title"), n.appendChild(a);
693
+ a.className = "wgt:text-base wgt:font-semibold wgt:text-[#0E121B] wgt:mb-2", a.textContent = n("invoiceCheckout_title"), r.appendChild(a);
694
694
  const g = document.createElement("p");
695
- return g.className = "wgt:text-sm wgt:text-[#525866] wgt:leading-relaxed", g.textContent = r("invoiceCheckout_description"), n.appendChild(g), e.appendChild(n), { container: e };
695
+ return g.className = "wgt:text-sm wgt:text-[#525866] wgt:leading-relaxed", g.textContent = n("invoiceCheckout_description"), r.appendChild(g), e.appendChild(r), { container: e };
696
696
  }
697
- function ue({ theme: i, onClose: t } = {}) {
697
+ function Ce({ theme: i, onClose: t } = {}) {
698
698
  const e = document.createElement("div");
699
699
  e.className = "wgt:min-h-screen wgt:flex wgt:bg-[#F3F4F6] wgt:p-4", i && e.setAttribute("data-theme", i);
700
- const n = document.createElement("div");
701
- n.className = "wgt:w-full wgt:max-w-md wgt:max-h-[252px] wgt:bg-white wgt:rounded-2xl wgt:shadow-sm wgt:px-4 wgt:py-5 wgt:text-center";
702
- const o = document.createElement("div");
703
- o.className = "wgt:flex wgt:justify-center wgt:mb-2";
700
+ const r = document.createElement("div");
701
+ r.className = "wgt:w-full wgt:max-w-md wgt:max-h-[252px] wgt:bg-white wgt:rounded-2xl wgt:shadow-sm wgt:px-4 wgt:py-5 wgt:text-center";
702
+ const d = document.createElement("div");
703
+ d.className = "wgt:flex wgt:justify-center wgt:mb-2";
704
704
  const s = document.createElement("div");
705
705
  s.innerHTML = `
706
706
  <svg width="60" height="60" viewBox="0 0 60 60" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -720,82 +720,54 @@ function ue({ theme: i, onClose: t } = {}) {
720
720
  <path fill-rule="evenodd" clip-rule="evenodd" d="M38.7788 33.9142C39.4439 33.9142 39.9696 34.4369 39.9696 35.1051C39.9696 35.7748 39.4447 36.2959 38.7788 36.2959C38.1144 36.2959 37.5879 35.7748 37.5879 35.1051C37.5879 34.4361 38.1144 33.9142 38.7788 33.9142ZM44.1494 28.6799C43.9468 28.6837 43.7479 28.7675 43.6039 28.9146L39.9376 32.59C39.5826 32.4232 39.1925 32.3234 38.7788 32.3234C37.2542 32.3234 36.0039 33.5813 36.0039 35.1051C36.0039 36.6296 37.2542 37.8891 38.7788 37.8891C40.3033 37.8891 41.5544 36.6296 41.5544 35.1051C41.5544 34.5679 41.3944 34.0712 41.1285 33.6445L44.727 30.0376C45.2367 29.5317 44.8702 28.6632 44.1494 28.6799Z" fill="#808080"/>
721
721
  </svg>
722
722
 
723
- `, o.appendChild(s), n.appendChild(o);
723
+ `, d.appendChild(s), r.appendChild(d);
724
724
  const a = document.createElement("h2");
725
- a.className = "wgt:text-base wgt:font-semibold wgt:text-[#0E121B] wgt:mb-2", a.textContent = r("invoiceExpired_title"), n.appendChild(a);
725
+ a.className = "wgt:text-base wgt:font-semibold wgt:text-[#0E121B] wgt:mb-2", a.textContent = n("invoiceExpired_title"), r.appendChild(a);
726
726
  const g = document.createElement("p");
727
- g.className = "wgt:text-sm wgt:text-[#525866] wgt:leading-relaxed wgt:px-2 wgt:mb-3", g.textContent = r("invoiceExpired_description"), n.appendChild(g);
727
+ g.className = "wgt:text-sm wgt:text-[#525866] wgt:leading-relaxed wgt:px-2 wgt:mb-3", g.textContent = n("invoiceExpired_description"), r.appendChild(g);
728
728
  const p = document.createElement("p");
729
- return p.className = "wgt:text-sm wgt:text-[#99A0AE] wgt:italic wgt:leading-relaxed wgt:px-4", p.textContent = r("invoiceExpired_note"), n.appendChild(p), e.appendChild(n), { container: e };
730
- }
731
- function Ce({ theme: i, onClose: t } = {}) {
732
- const e = document.createElement("div");
733
- e.className = "wgt:min-h-screen wgt:flex wgt:items-center wgt:bg-[#F3F4F6] wgt:p-4 wgt:justify-center", i && e.setAttribute("data-theme", i);
734
- const n = document.createElement("div");
735
- n.className = "wgt:w-full wgt:items-center wgt:flex wgt:flex-col wgt:min-h-screen wgt:justify-center wgt:bg-white wgt:rounded-2xl wgt:shadow-sm wgt:px-4 wgt:py-5 wgt:text-center";
736
- const o = document.createElement("div");
737
- o.className = "wgt:flex wgt:justify-center wgt:mb-2 wgt:items-center wgt:justify-center";
738
- const s = document.createElement("div");
739
- s.innerHTML = `
740
- <svg width="148" height="148" viewBox="0 0 148 148" fill="none" xmlns="http://www.w3.org/2000/svg">
741
- <path d="M135.244 83.385C135.244 100.471 128.265 115.873 117.075 126.943C106.125 137.892 90.9645 144.51 74.2393 144.51C57.6344 144.51 42.4734 137.772 31.4035 126.943C20.2132 115.873 13.2344 100.471 13.2344 83.385C13.2344 49.5736 40.5482 22.2598 74.2393 22.2598C107.93 22.2598 135.244 49.6939 135.244 83.385Z" fill="#F1F3FA" stroke="#D5DAE5" stroke-width="1.58571" stroke-miterlimit="10"/>
742
- <path d="M65.7815 28.5312L61.2562 44.4926L72.0884 51.9999L71.3267 70.3394L84.999 45.2472L78.6484 40.1734L85.9114 28.5312H94.065L118.732 55.3638L119.694 132.853C119.694 135.5 117.528 137.546 114.881 137.546H39.317C36.6697 137.546 34.5039 135.38 34.5039 132.853V33.224C34.5039 30.5768 36.6697 28.5312 39.317 28.5312H65.7815Z" fill="white" stroke="#D5DAE5" stroke-width="1.58571" stroke-miterlimit="10" stroke-linejoin="round"/>
743
- <path d="M60.7974 44.7749H46.2381C45.3958 44.7749 44.6738 44.053 44.6738 43.2107C44.6738 42.3684 45.3958 41.6465 46.2381 41.6465H60.7974C61.6397 41.6465 62.3616 42.3684 62.3616 43.2107C62.3616 44.053 61.6397 44.7749 60.7974 44.7749Z" fill="#D5DAE5"/>
744
- <path d="M60.1958 53.437H46.2381C45.3958 53.437 44.6738 52.7151 44.6738 51.8728C44.6738 51.0305 45.3958 50.3086 46.2381 50.3086H60.0755C60.9177 50.3086 61.6397 51.0305 61.6397 51.8728C61.6397 52.7151 60.9177 53.437 60.1958 53.437Z" fill="#D5DAE5"/>
745
- <path d="M93.0469 28.5312V49.9491C93.0469 52.9573 95.694 55.3638 98.7022 55.3638H117.714" fill="#D5DAE5"/>
746
- <path d="M61.7026 21.3768L57.1523 14.5273" stroke="#AAB2C5" stroke-width="1.58571"/>
747
- <path d="M73.8365 17.9519L74.3711 0.601562" stroke="#AAB2C5" stroke-width="1.58571"/>
748
- <path d="M84.7168 21.5372L91.9805 5.77148" stroke="#AAB2C5" stroke-width="1.58571"/>
749
- <path d="M60.0089 108.149C59.5035 108.149 59.0991 107.947 58.6948 107.644C57.9872 106.936 57.9872 105.723 58.6948 105.016C63.3449 100.467 69.5112 97.9395 76.082 97.9395C82.6528 97.9395 88.8192 100.467 93.4692 105.016C94.1769 105.723 94.1769 106.936 93.4692 107.644C92.7616 108.352 91.5486 108.352 90.8409 107.644C86.8985 103.701 81.6419 101.579 76.082 101.579C70.5221 101.579 65.2655 103.701 61.3231 107.644C60.9187 107.947 60.5144 108.149 60.0089 108.149Z" fill="#AAB2C5"/>
750
- <path d="M66.3775 81.0578L68.8036 78.6317C69.5113 77.9241 69.5113 76.711 68.8036 76.0034C68.096 75.2958 66.883 75.2958 66.1753 76.0034L63.7492 78.4295L61.3231 76.0034C60.6155 75.2958 59.4024 75.2958 58.6948 76.0034C57.9872 76.711 57.9872 77.9241 58.6948 78.6317L61.1209 81.0578L58.6948 83.4839C57.9872 84.1915 57.9872 85.4046 58.6948 86.1122C59.0991 86.5166 59.5035 86.6177 60.0089 86.6177C60.5144 86.6177 60.9187 86.4155 61.3231 86.1122L63.7492 83.6861L66.1753 86.1122C66.5797 86.5166 66.984 86.6177 67.4895 86.6177C67.9949 86.6177 68.3993 86.4155 68.8036 86.1122C69.5113 85.4046 69.5113 84.1915 68.8036 83.4839L66.3775 81.0578Z" fill="#AAB2C5"/>
751
- <path d="M90.942 81.0578L93.3681 78.6317C94.0757 77.9241 94.0757 76.711 93.3681 76.0034C92.6605 75.2958 91.4474 75.2958 90.7398 76.0034L88.3137 78.4295L85.8875 76.0034C85.1799 75.2958 83.9669 75.2958 83.2592 76.0034C82.5516 76.711 82.5516 77.9241 83.2592 78.6317L85.6853 81.0578L83.2592 83.4839C82.5516 84.1915 82.5516 85.4046 83.2592 86.1122C83.6636 86.5166 84.0679 86.6177 84.5734 86.6177C85.0788 86.6177 85.4832 86.4155 85.8875 86.1122L88.3137 83.6861L90.7398 86.1122C91.1441 86.5166 91.5485 86.6177 92.0539 86.6177C92.5594 86.6177 92.9637 86.4155 93.3681 86.1122C94.0757 85.4046 94.0757 84.1915 93.3681 83.4839L90.942 81.0578Z" fill="#AAB2C5"/>
752
- </svg>
753
-
754
-
755
- `, o.appendChild(s), n.appendChild(o);
756
- const a = document.createElement("h2");
757
- return a.className = "wgt:text-base wgt:font-medium wgt:text-[#99A0AE] wgt:mb-2", a.textContent = r("order_not_found_title"), n.appendChild(a), e.appendChild(n), { container: e };
729
+ return p.className = "wgt:text-sm wgt:text-[#99A0AE] wgt:italic wgt:leading-relaxed wgt:px-4", p.textContent = n("invoiceExpired_note"), r.appendChild(p), e.appendChild(r), { container: e };
758
730
  }
759
731
  function re(i) {
760
732
  return String(i || "").trim().toLowerCase();
761
733
  }
762
734
  function Ne({ uuid: i, orderInfo: t, theme: e }) {
763
- const n = document.createElement("div");
764
- n.className = "wgt:w-full wgt:min-h-screen";
765
- let o = !1;
766
- function s(l) {
767
- o || (n.innerHTML = "", l && n.appendChild(l));
735
+ const r = document.createElement("div");
736
+ r.className = "wgt:w-full wgt:min-h-screen";
737
+ let d = !1;
738
+ function s(o) {
739
+ d || (r.innerHTML = "", o && r.appendChild(o));
768
740
  }
769
- function a(l) {
770
- l && console.log("[DEBUG] renderFailedPage:", l);
771
- const w = Ce({
741
+ function a(o) {
742
+ o && console.log("[DEBUG] renderFailedPage:", o);
743
+ const w = ce({
772
744
  theme: e,
773
745
  onClose: F
774
746
  });
775
747
  s(w.container);
776
748
  }
777
749
  function g() {
778
- const l = ue({
750
+ const o = Ce({
779
751
  theme: e
780
752
  });
781
- s(l.container);
753
+ s(o.container);
782
754
  }
783
- function p(l) {
784
- const w = we({
755
+ function p(o) {
756
+ const w = ue({
785
757
  theme: e
786
758
  });
787
759
  s(w.container);
788
760
  }
789
- function N(l) {
790
- const w = me({
791
- orderInfo: l || {},
761
+ function N(o) {
762
+ const w = we({
763
+ orderInfo: o || {},
792
764
  theme: e,
793
- onSubmit: (v) => R(null, [v], function* ({ type: h, data: c }) {
794
- const y = A();
765
+ onSubmit: (v) => j(null, [v], function* ({ type: f, data: c }) {
766
+ const y = k();
795
767
  if (!y)
796
768
  return a({ reason: "MISSING_UUID_ON_SUBMIT" }), { ok: !1 };
797
- const M = fe(h, c);
798
- return yield de(y, M), { ok: !0, finalData: yield ve(y, {
769
+ const H = he(f, c);
770
+ return yield le(y, H), { ok: !0, finalData: yield ve(y, {
799
771
  maxTries: 20,
800
772
  intervalMs: 1500
801
773
  }) };
@@ -804,64 +776,64 @@ function Ne({ uuid: i, orderInfo: t, theme: e }) {
804
776
  });
805
777
  s(w.container);
806
778
  }
807
- function A() {
808
- var h;
809
- const l = new URLSearchParams(window.location.search || "");
810
- return String((h = l.get("uuid")) != null ? h : "").trim() || String(i || "").trim() || String((t == null ? void 0 : t.uuid) || "").trim();
779
+ function k() {
780
+ var f;
781
+ const o = new URLSearchParams(window.location.search || "");
782
+ return String((f = o.get("uuid")) != null ? f : "").trim() || String(i || "").trim() || String((t == null ? void 0 : t.uuid) || "").trim();
811
783
  }
812
784
  function F() {
813
- return R(this, null, function* () {
814
- yield k();
785
+ return j(this, null, function* () {
786
+ yield M();
815
787
  });
816
788
  }
817
- function k() {
818
- return R(this, null, function* () {
789
+ function M() {
790
+ return j(this, null, function* () {
819
791
  try {
820
- const l = A();
821
- if (!l)
792
+ const o = k();
793
+ if (!o)
822
794
  return a({ reason: "EMPTY_UUID_NO_API_CALL" });
823
- const w = yield ne(l), h = String((w == null ? void 0 : w.message) || "").trim();
824
- if (h)
825
- return a({ reason: "API_MESSAGE", apiMsg: h, res: w });
795
+ const w = yield ne(o), f = String((w == null ? void 0 : w.message) || "").trim();
796
+ if (f)
797
+ return a({ reason: "API_MESSAGE", apiMsg: f, res: w });
826
798
  const c = re(w == null ? void 0 : w.status);
827
799
  return c === "expired" ? g() : c === "invoiced" ? p(w) : c === "pending" || c === "waiting" ? N(w || t || {}) : c === "" && w && Object.keys(w).length > 0 ? N(w) : a({ reason: "UNKNOWN_STATUS", status: c, res: w });
828
- } catch (l) {
829
- return console.log("[DEBUG] loadAndRender error:", l), a({ reason: "EXCEPTION", error: (l == null ? void 0 : l.message) || l });
800
+ } catch (o) {
801
+ return console.log("[DEBUG] loadAndRender error:", o), a({ reason: "EXCEPTION", error: (o == null ? void 0 : o.message) || o });
830
802
  }
831
803
  });
832
804
  }
833
- function d() {
834
- return R(this, null, function* () {
805
+ function l() {
806
+ return j(this, null, function* () {
835
807
  a({ reason: "INIT_DEFAULT_RENDER" });
836
808
  try {
837
- yield k();
838
- } catch (l) {
809
+ yield M();
810
+ } catch (o) {
839
811
  return a({
840
812
  reason: "INIT_EXCEPTION",
841
- error: (l == null ? void 0 : l.message) || l
813
+ error: (o == null ? void 0 : o.message) || o
842
814
  });
843
815
  }
844
816
  });
845
817
  }
846
818
  function x() {
847
- o = !0, n.innerHTML = "";
819
+ d = !0, r.innerHTML = "";
848
820
  }
849
- return { container: n, init: d, destroy: x };
821
+ return { container: r, init: l, destroy: x };
850
822
  }
851
- function he(i) {
823
+ function fe(i) {
852
824
  return String(i || "").trim().toLowerCase() === "business" ? "enterprise" : "individual";
853
825
  }
854
- function fe(i, t) {
855
- const e = he(i), n = {
826
+ function he(i, t) {
827
+ const e = fe(i), r = {
856
828
  invoiceType: e,
857
829
  buyerName: (t == null ? void 0 : t.representativeName) || "",
858
830
  address: (t == null ? void 0 : t.buyerAddress) || "",
859
831
  email: (t == null ? void 0 : t.email) || ""
860
832
  };
861
- return e === "enterprise" && (n.taxCode = t != null && t.noTaxCode ? "" : (t == null ? void 0 : t.taxCode) || "", n.performerName = (t == null ? void 0 : t.performerName) || ""), n;
833
+ return e === "enterprise" && (r.taxCode = t != null && t.noTaxCode ? "" : (t == null ? void 0 : t.taxCode) || "", r.performerName = (t == null ? void 0 : t.performerName) || ""), r;
862
834
  }
863
- function ve(n) {
864
- return R(this, arguments, function* (i, { maxTries: t = 20, intervalMs: e = 1500 } = {}) {
835
+ function ve(r) {
836
+ return j(this, arguments, function* (i, { maxTries: t = 20, intervalMs: e = 1500 } = {}) {
865
837
  for (let s = 0; s < t; s++) {
866
838
  yield xe(e);
867
839
  const a = yield ne(i), g = re(a == null ? void 0 : a.status);
@@ -871,8 +843,8 @@ function ve(n) {
871
843
  throw p.code = "EXPIRED", p.data = a, p;
872
844
  }
873
845
  }
874
- const o = new Error("Polling timeout: status not invoiced");
875
- throw o.code = "POLL_TIMEOUT", o;
846
+ const d = new Error("Polling timeout: status not invoiced");
847
+ throw d.code = "POLL_TIMEOUT", d;
876
848
  });
877
849
  }
878
850
  function xe(i) {