@invoice-sdk/widget 1.57.0 → 1.57.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.
|
@@ -2576,7 +2576,7 @@ let de = null, he = null;
|
|
|
2576
2576
|
function yl(o) {
|
|
2577
2577
|
return re(this, null, function* () {
|
|
2578
2578
|
if (o.mode && st(o.mode), o.language && ct(o.language), !he) {
|
|
2579
|
-
const { InvoiceRegisterWidget: n } = yield import("./widget-
|
|
2579
|
+
const { InvoiceRegisterWidget: n } = yield import("./widget-BZ3nvlsE.js");
|
|
2580
2580
|
he = n;
|
|
2581
2581
|
}
|
|
2582
2582
|
const e = typeof o.selector == "string" ? document.querySelector(o.selector) : o.selector;
|
|
@@ -2599,7 +2599,7 @@ function yl(o) {
|
|
|
2599
2599
|
function vl(o) {
|
|
2600
2600
|
return re(this, null, function* () {
|
|
2601
2601
|
if (o.mode && st(o.mode), o.language && ct(o.language), !de) {
|
|
2602
|
-
const { EContractWidget: n } = yield import("./widget-
|
|
2602
|
+
const { EContractWidget: n } = yield import("./widget-BZ3nvlsE.js");
|
|
2603
2603
|
de = n;
|
|
2604
2604
|
}
|
|
2605
2605
|
const e = typeof o.selector == "string" ? document.querySelector(o.selector) : o.selector;
|
package/dist/index.esm.js
CHANGED
package/dist/index.umd.js
CHANGED
|
@@ -92,7 +92,7 @@ Minimum version required to store current data is: `+G+`.
|
|
|
92
92
|
d="M16.0945 14.9672L12.7523 12.5508V6.75C12.7523 6.64687 12.668 6.5625 12.5648 6.5625H11.4375C11.3344 6.5625 11.25 6.64687 11.25 6.75V13.2047C11.25 13.2656 11.2781 13.3219 11.3273 13.357L15.2039 16.1836C15.2883 16.2445 15.4055 16.2258 15.4664 16.1437L16.1367 15.2297C16.1976 15.1429 16.1789 15.0258 16.0945 14.9672Z"
|
|
93
93
|
fill="#1D963E"
|
|
94
94
|
/>
|
|
95
|
-
`,a.appendChild(m),h.appendChild(a);const M=document.createElement("div");M.className=["wgt:p-6","wgt:w-full","wgt:flex","wgt:flex-col","wgt:gap-10","wgt:shadow-[0px_2px_6px_0px_rgba(31,34,41,0.04)]"].join(" ");const l=document.createElement("div");l.className="wgt:w-full wgt:flex wgt:flex-col wgt:gap-4";const T=document.createElement("h2");T.className="wgt:text-xl wgt:font-semibold wgt:leading-6 wgt:text-black",T.innerText=f("orderInfo"),l.appendChild(T);const H=document.createElement("div");H.className="wgt:w-full wgt:flex wgt:items-center wgt:justify-between";const v=document.createElement("h4");v.className="wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]",v.innerText=f("provider");const P=document.createElement("img");g&&g.logoUrl&&(P.src=g.logoUrl,P.alt=g.name,P.className="wgt:h-6 wgt:object-contain"),H.appendChild(v),H.appendChild(P),l.appendChild(H);const J=document.createElement("div");J.className="wgt:w-full wgt:flex wgt:items-center wgt:justify-between";const F=document.createElement("h4");F.className="wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]",F.innerText=f("subscriptionPackage");const G=document.createElement("span");G.className="wgt:text-base wgt:font-semibold wgt:leading-6 wgt:text-text-black",G.innerText=A?`${String(A==null?void 0:A.limit)} ${f("unitsPerMonth")}`:"",J.appendChild(F),J.appendChild(G),l.appendChild(J);const X=document.createElement("div");X.className="wgt:w-full wgt:flex wgt:items-center wgt:justify-between";const L=document.createElement("h4");L.className="wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]",L.innerText=f("digitalSignaturePackage");const O=document.createElement("span");O.className="wgt:text-base wgt:font-semibold wgt:leading-6 wgt:text-text-black",O.innerText=C?`${String(C==null?void 0:C.name.split("-")[1])}`:"",X.appendChild(L),X.appendChild(O),l.appendChild(X);const d=document.createElement("hr");l.appendChild(d);const z=document.createElement("div");z.className="wgt:w-full wgt:flex wgt:items-center wgt:justify-between";const p=document.createElement("h4");p.className="wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]",p.innerText=f("paymentAmount");const r=document.createElement("span");r.className="wgt:text-2xl wgt:font-bold wgt:leading-6 wgt:text-[#ED1C24]",r.innerText=I.toLocaleString("vi-VN")+" VND",z.appendChild(p),z.appendChild(r),l.appendChild(z),M.appendChild(l);const o=Og({title:f("cancelTransaction"),className:"wgt:bg-transparent wgt:border wgt:border-primary wgt:text-primary wgt:hover:bg-transparent",handleClick:()=>{i&&clearInterval(i);const{container:u,open:D}=_g({message:f("transactionCanceled"),okLabel:f("ok"),onClose:()=>{typeof e=="function"&&e()}});h.appendChild(u),D()}});return M.appendChild(o),h.appendChild(M),{container:h,setSelectedProvider(u){g=u,P.src=(u==null?void 0:u.logo)||"",P.alt=(u==null?void 0:u.name)||""},setSelectedInvoicePackage(u){A=u,G.innerText=u?String(u.limit):""},setSelectedSignaturePackage(u){C=u,O.innerText=u?String(C==null?void 0:C.name.split("-")[1]):""},setTotalAmountText(u){I=u,r.innerText=u},cleanup(){i&&clearInterval(i)}}}function Jo(E){return U(this,arguments,function*({onNext:g,onPrev:A,step:C,checkoutProps:B,orderInfoProps:Q,theme:I}){let n=null,t="",e=null;const h=document.createElement("div");h.className="wgt:flex wgt:flex-col wgt:gap-6 wgt:relative";const{container:c,open:i,close:a}=bE();h.appendChild(c);const s=iC(),w=document.createElement("div");w.className="wgt:w-full wgt:flex wgt:items-start wgt:gap-6 wgt:max-lg:flex-col-reverse";const q=document.createElement("div");q.className="wgt:flex-1 wgt:max-lg:w-full";const k=f("paymentInstructions"),m=Array.isArray(k)?k:[k],{container:M,update:l}=Bo(mA(j({qrSrc:"",accountName:"",accountNumber:"",bankName:""},B),{instructions:m}));q.appendChild(M),w.appendChild(q);const{container:T,cleanup:H}=Po(mA(j({},Q),{qrData:null,qrSrc:"",theme:I,onResetToStep1:()=>{H&&H(),Q!=null&&Q.onResetToStep1&&Q.onResetToStep1(),clearInterval(e)}}));w.appendChild(T),h.appendChild(w);const v=document.createElement("div");v.className="wgt:flex wgt:items-center wgt:justify-between wgt:gap-2";const P=Og({type:"button",title:f("back"),className:"wgt:bg-transparent wgt:!text-primary wgt:hover:bg-transparent wgt:underline",handleClick:A});v.appendChild(P),h.appendChild(v);function J(){return U(this,null,function*(){i();try{n=yield jE({token:Q==null?void 0:Q.token,orderId:Q==null?void 0:Q.orderId,amount:Q==null?void 0:Q.totalAmountText,baseURL:I==="ocb"?s.posOcbApiUrl:I==="bvb"?s.posBvbApiUrl:""}),t=yield dn.toDataURL(n.qr_string,{errorCorrectionLevel:"H",margin:1,width:200,color:{dark:"#000000",light:"#ffffff"}}),l&&l({qrSrc:t,accountName:(n==null?void 0:n.merchant_name)||"",accountNumber:(n==null?void 0:n.va_account_no)||"",bankName:(n==null?void 0:n.bank_code)||""})}catch(G){console.error("Error fetching QR payment data:",G),sB(f("errorQRGeneration","Không thể tạo mã QR thanh toán. Vui lòng thử lại."),{onClose:()=>{A()}})}finally{a()}})}yield J();function F(){e&&clearInterval(e),e=setInterval(()=>U(null,null,function*(){try{const G=yield _c(Q.orderId);if(G.paymentStatus==="pending")return;clearInterval(e),e=null,H&&H();const X=G.paymentStatus==="paid"?f("paymentSuccess"):f("paymentFailed"),L=_g({message:X,okLabel:"OK",isSuccess:G.paymentStatus==="paid",onClose:function(){g()}});h.appendChild(L.container),L.open()}catch(G){clearInterval(e),e=null,H&&H(),console.error("Error fetching order status:",G),sB(`${f("errorOrderStatus","Không thể kiểm tra trạng thái thanh toán đơn hàng. Vui lòng thử lại.")+`
|
|
95
|
+
`,a.appendChild(m),h.appendChild(a);const M=document.createElement("div");M.className=["wgt:p-6","wgt:w-full","wgt:flex","wgt:flex-col","wgt:gap-10","wgt:shadow-[0px_2px_6px_0px_rgba(31,34,41,0.04)]"].join(" ");const l=document.createElement("div");l.className="wgt:w-full wgt:flex wgt:flex-col wgt:gap-4";const T=document.createElement("h2");T.className="wgt:text-xl wgt:font-semibold wgt:leading-6 wgt:text-black",T.innerText=f("orderInfo"),l.appendChild(T);const H=document.createElement("div");H.className="wgt:w-full wgt:flex wgt:items-center wgt:justify-between";const v=document.createElement("h4");v.className="wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]",v.innerText=f("provider");const P=document.createElement("img");g&&g.logoUrl&&(P.src=g.logoUrl,P.alt=g.name,P.className="wgt:h-6 wgt:object-contain"),H.appendChild(v),H.appendChild(P),l.appendChild(H);const J=document.createElement("div");J.className="wgt:w-full wgt:flex wgt:items-center wgt:justify-between";const F=document.createElement("h4");F.className="wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]",F.innerText=f("subscriptionPackage");const G=document.createElement("span");G.className="wgt:text-base wgt:font-semibold wgt:leading-6 wgt:text-text-black",G.innerText=A?`${String(A==null?void 0:A.limit)} ${f("unitsPerMonth")}`:"",J.appendChild(F),J.appendChild(G),l.appendChild(J);const X=document.createElement("div");X.className="wgt:w-full wgt:flex wgt:items-center wgt:justify-between";const L=document.createElement("h4");L.className="wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]",L.innerText=f("digitalSignaturePackage");const O=document.createElement("span");O.className="wgt:text-base wgt:font-semibold wgt:leading-6 wgt:text-text-black",O.innerText=C?`${String(C==null?void 0:C.name.split("-")[1])}`:"",X.appendChild(L),X.appendChild(O),l.appendChild(X);const d=document.createElement("hr");l.appendChild(d);const z=document.createElement("div");z.className="wgt:w-full wgt:flex wgt:items-center wgt:justify-between";const p=document.createElement("h4");p.className="wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]",p.innerText=f("paymentAmount");const r=document.createElement("span");r.className="wgt:text-2xl wgt:font-bold wgt:leading-6 wgt:text-[#ED1C24]",r.innerText=I.toLocaleString("vi-VN")+" VND",z.appendChild(p),z.appendChild(r),l.appendChild(z),M.appendChild(l);const o=Og({title:f("cancelTransaction"),className:"wgt:bg-transparent wgt:border wgt:border-primary wgt:text-primary wgt:hover:bg-transparent",handleClick:()=>{i&&clearInterval(i);const{container:u,open:D}=_g({message:f("transactionCanceled"),okLabel:f("ok"),onClose:()=>{typeof e=="function"&&e()}});h.appendChild(u),D()}});return M.appendChild(o),h.appendChild(M),{container:h,setSelectedProvider(u){g=u,P.src=(u==null?void 0:u.logo)||"",P.alt=(u==null?void 0:u.name)||""},setSelectedInvoicePackage(u){A=u,G.innerText=u?String(u.limit):""},setSelectedSignaturePackage(u){C=u,O.innerText=u?String(C==null?void 0:C.name.split("-")[1]):""},setTotalAmountText(u){I=u,r.innerText=u},cleanup(){i&&clearInterval(i)}}}function Jo(E){return U(this,arguments,function*({onNext:g,onPrev:A,step:C,checkoutProps:B,orderInfoProps:Q,theme:I}){let n=null,t="",e=null;const h=document.createElement("div");h.className="wgt:flex wgt:flex-col wgt:gap-6 wgt:relative";const{container:c,open:i,close:a}=bE();h.appendChild(c);const s=iC(),w=document.createElement("div");w.className="wgt:w-full wgt:flex wgt:items-start wgt:gap-6 wgt:max-lg:flex-col-reverse";const q=document.createElement("div");q.className="wgt:flex-1 wgt:max-lg:w-full";const k=f("paymentInstructions"),m=Array.isArray(k)?k:[k],{container:M,update:l}=Bo(mA(j({qrSrc:"",accountName:"",accountNumber:"",bankName:""},B),{instructions:m}));q.appendChild(M),w.appendChild(q);const{container:T,cleanup:H}=Po(mA(j({},Q),{qrData:null,qrSrc:"",theme:I,onResetToStep1:()=>{H&&H(),Q!=null&&Q.onResetToStep1&&Q.onResetToStep1(),clearInterval(e)}}));w.appendChild(T),h.appendChild(w);const v=document.createElement("div");v.className="wgt:flex wgt:items-center wgt:justify-between wgt:gap-2";const P=Og({type:"button",title:f("back"),className:"wgt:bg-transparent wgt:!text-primary wgt:hover:bg-transparent wgt:underline",handleClick:()=>{A&&A(),e&&clearInterval(e),H&&H()}});v.appendChild(P),h.appendChild(v);function J(){return U(this,null,function*(){i();try{n=yield jE({token:Q==null?void 0:Q.token,orderId:Q==null?void 0:Q.orderId,amount:Q==null?void 0:Q.totalAmountText,baseURL:I==="ocb"?s.posOcbApiUrl:I==="bvb"?s.posBvbApiUrl:""}),t=yield dn.toDataURL(n.qr_string,{errorCorrectionLevel:"H",margin:1,width:200,color:{dark:"#000000",light:"#ffffff"}}),l&&l({qrSrc:t,accountName:(n==null?void 0:n.merchant_name)||"",accountNumber:(n==null?void 0:n.va_account_no)||"",bankName:(n==null?void 0:n.bank_code)||""})}catch(G){console.error("Error fetching QR payment data:",G),sB(f("errorQRGeneration","Không thể tạo mã QR thanh toán. Vui lòng thử lại."),{onClose:()=>{A(),e&&clearInterval(e),H&&H()}})}finally{a()}})}yield J();function F(){e&&clearInterval(e),e=setInterval(()=>U(null,null,function*(){try{const G=yield _c(Q.orderId);if(G.paymentStatus==="pending")return;clearInterval(e),e=null,H&&H();const X=G.paymentStatus==="paid"?f("paymentSuccess"):f("paymentFailed"),L=_g({message:X,okLabel:"OK",isSuccess:G.paymentStatus==="paid",onClose:function(){g()}});h.appendChild(L.container),L.open()}catch(G){clearInterval(e),e=null,H&&H(),console.error("Error fetching order status:",G),sB(`${f("errorOrderStatus","Không thể kiểm tra trạng thái thanh toán đơn hàng. Vui lòng thử lại.")+`
|
|
96
96
|
`+(G==null?void 0:G.message)}`,{okLabel:"Thử lại",onClose:function(){F()}})}}),5e3)}return n&&F(),window.addEventListener("beforeunload",function(){e&&clearInterval(e),H&&H()}),{container:h}})}function To({orderId:g,onPrev:A,onReturnHome:C,theme:B,mode:Q,settingUrl:I,provider:E}){if(g){const D=new URL(window.location);D.searchParams.get("orderId")!==g&&(D.searchParams.set("orderId",g),window.history.replaceState({},"",D))}const n=document.createElement("div");n.className="wgt:flex wgt:flex-col wgt:items-center wgt:justify-between wgt:h-full";const t=document.createElement("div");t.className="wgt:w-full wgt:max-w-3xl wgt:space-y-4 wgt:rounded-xl wgt:bg-white",n.appendChild(t);const e=document.createElement("h3");e.className="wgt:text-sm wgt:font-semibold wgt:text-text-black",e.innerText=f("confirmationTitle"),t.appendChild(e);const h=document.createElement("div");h.className="wgt:flex wgt:items-center wgt:gap-4",t.appendChild(h);const c=document.createElement("div");c.className="wgt:flex wgt:h-8 wgt:w-8 wgt:shrink-0 wgt:items-center wgt:justify-center wgt:rounded-full wgt:bg-primary wgt:text-xs wgt:font-semibold wgt:text-white",c.innerText="1",h.appendChild(c);const i=document.createElement("p");i.className="wgt:text-sm wgt:leading-relaxed wgt:text-strong-950",i.innerText=f("notice1"),h.appendChild(i);const a=document.createElement("div");a.className="wgt:flex wgt:items-start wgt:gap-4",t.appendChild(a);const s=document.createElement("div");s.className="wgt:flex wgt:h-8 wgt:w-8 wgt:shrink-0 wgt:items-center wgt:justify-center wgt:rounded-full wgt:bg-primary wgt:text-xs wgt:font-semibold wgt:text-white",s.innerText="2",a.appendChild(s);const w=document.createElement("div");w.className="wgt:flex wgt:flex-col wgt:gap-2",a.appendChild(w);const q=document.createElement("p");q.className="wgt:text-sm wgt:leading-relaxed wgt:text-strong-950",q.innerText=f("notice2"),w.appendChild(q);const k=document.createElement("div");k.className="wgt:w-full wgt:flex wgt:flex-col wgt:gap-2 wgt:rounded-lg wgt:bg-weak-50 wgt:px-4 wgt:py-3",w.appendChild(k);const m=document.createElement("div");m.className="wgt:flex wgt:items-center wgt:gap-2 wgt:text-sm wgt:text-strong-950",k.appendChild(m);const M=document.createElement("div");M.innerHTML=`
|
|
97
97
|
<svg
|
|
98
98
|
width="14"
|
|
@@ -67,7 +67,7 @@ var K = (g, A, B) => new Promise((C, Q) => {
|
|
|
67
67
|
throw I;
|
|
68
68
|
}, "return" in A && C("return"), Q;
|
|
69
69
|
}, rQ = (g, A, B) => (A = g[Dg("asyncIterator")]) ? A.call(g) : (g = g[Dg("iterator")](), A = {}, B = (C, Q) => (Q = g[C]) && (A[C] = (I) => new Promise((E, n, t) => (I = Q.call(g, I), t = I.done, Promise.resolve(I.value).then((c) => E({ value: c, done: t }), n)))), B("next"), B("return"), A);
|
|
70
|
-
import { t as D, g as _g, a as bE, r as yI, u as jI } from "./index-
|
|
70
|
+
import { t as D, g as _g, a as bE, r as yI, u as jI } from "./index-VMoQE495.js";
|
|
71
71
|
import { g as qB } from "./_commonjsHelpers-bAxELxBV.js";
|
|
72
72
|
function fQ({ steps: g = [], currentStep: A = 1 } = {}) {
|
|
73
73
|
const B = document.createElement("div");
|
|
@@ -592,17 +592,17 @@ function oC({
|
|
|
592
592
|
}), i.addEventListener("keydown", (P) => {
|
|
593
593
|
P.key === "Escape" && a.classList.add("wgt:hidden");
|
|
594
594
|
}), a.appendChild(r), o.appendChild(i), o.appendChild(a), M();
|
|
595
|
-
const
|
|
596
|
-
|
|
595
|
+
const l = document.createElement("select");
|
|
596
|
+
l.style.display = "none", l.name = g, l.id = g, B.forEach((P) => {
|
|
597
597
|
const d = document.createElement("option");
|
|
598
|
-
d.value = P.value, d.innerText = P.label, P.value === A && (d.selected = !0),
|
|
599
|
-
}), h.appendChild(o), h.appendChild(
|
|
600
|
-
const
|
|
601
|
-
return
|
|
598
|
+
d.value = P.value, d.innerText = P.label, P.value === A && (d.selected = !0), l.appendChild(d);
|
|
599
|
+
}), h.appendChild(o), h.appendChild(l);
|
|
600
|
+
const J = document.createElement("span");
|
|
601
|
+
return J.className = "wgt:text-red-500 wgt:text-sm wgt:mt-1", J.innerText = I || "", I || (J.style.display = "none"), h.appendChild(J), {
|
|
602
602
|
container: h,
|
|
603
|
-
selectEl:
|
|
603
|
+
selectEl: l,
|
|
604
604
|
setError(P) {
|
|
605
|
-
P ? (
|
|
605
|
+
P ? (J.innerText = P, J.style.display = "block", i.classList.remove("wgt:border-gray-300"), i.classList.add("wgt:border-red-500")) : (J.innerText = "", J.style.display = "none", i.classList.remove("wgt:border-red-500"), i.classList.add("wgt:border-gray-300"));
|
|
606
606
|
},
|
|
607
607
|
getValue() {
|
|
608
608
|
return v;
|
|
@@ -612,18 +612,18 @@ function oC({
|
|
|
612
612
|
const X = B.find(
|
|
613
613
|
(Y) => Y.id ? Y.id === T : Y.value === P
|
|
614
614
|
);
|
|
615
|
-
X ? (i.value = X.label,
|
|
615
|
+
X ? (i.value = X.label, l.value = P, M()) : (i.value = d || "", l.value = P || "", M());
|
|
616
616
|
},
|
|
617
617
|
setOptions(P) {
|
|
618
|
-
for (B.splice(0, B.length, ...P), q = [...P];
|
|
619
|
-
|
|
618
|
+
for (B.splice(0, B.length, ...P), q = [...P]; l.options.length > 0; )
|
|
619
|
+
l.remove(0);
|
|
620
620
|
P.forEach((d) => {
|
|
621
621
|
const T = document.createElement("option");
|
|
622
|
-
T.value = d.value, T.innerText = d.label,
|
|
622
|
+
T.value = d.value, T.innerText = d.label, l.appendChild(T);
|
|
623
623
|
}), M();
|
|
624
624
|
},
|
|
625
625
|
setDisabled(P) {
|
|
626
|
-
i.disabled = !!P,
|
|
626
|
+
i.disabled = !!P, l.disabled = !!P, P ? (o.classList.add("wgt:opacity-75"), a.classList.add("wgt:hidden")) : o.classList.remove("wgt:opacity-75");
|
|
627
627
|
}
|
|
628
628
|
};
|
|
629
629
|
} else {
|
|
@@ -749,29 +749,29 @@ function qQ({
|
|
|
749
749
|
});
|
|
750
750
|
function v(m, M = 2) {
|
|
751
751
|
if (m === 0) return "0 Bytes";
|
|
752
|
-
const
|
|
753
|
-
return parseFloat((m / Math.pow(
|
|
752
|
+
const l = 1024, J = Math.max(0, M), P = ["Bytes", "KB", "MB", "GB", "TB"], d = Math.floor(Math.log(m) / Math.log(l));
|
|
753
|
+
return parseFloat((m / Math.pow(l, d)).toFixed(J)) + " " + P[d];
|
|
754
754
|
}
|
|
755
755
|
function H(m) {
|
|
756
|
-
const M = m.type.toLowerCase(),
|
|
757
|
-
return h.accept.split(",").map((P) => P.trim().toLowerCase()).filter(Boolean).some((P) => P.startsWith(".") ? P ===
|
|
756
|
+
const M = m.type.toLowerCase(), l = "." + m.name.split(".").pop().toLowerCase();
|
|
757
|
+
return h.accept.split(",").map((P) => P.trim().toLowerCase()).filter(Boolean).some((P) => P.startsWith(".") ? P === l : P.endsWith("/*") ? M.startsWith(P.replace("/*", "")) : M === P);
|
|
758
758
|
}
|
|
759
759
|
function q(m) {
|
|
760
760
|
if (w.innerHTML = "", a(null), m) {
|
|
761
761
|
H(m) || a(`File không hợp lệ. Chỉ chấp nhận: ${h.accept}`), m.size <= 500 * 1024 || a("Dung lượng file vượt quá 500KB.");
|
|
762
|
-
const
|
|
763
|
-
if (
|
|
762
|
+
const l = document.createElement("div");
|
|
763
|
+
if (l.className = "wgt:flex wgt:items-center wgt:gap-4", l.addEventListener("click", () => {
|
|
764
764
|
h.click();
|
|
765
765
|
}), m.type.startsWith("image/")) {
|
|
766
766
|
const T = document.createElement("img");
|
|
767
|
-
T.src = URL.createObjectURL(m), T.alt = "Preview", T.className = "wgt:h-20 wgt:w-20 wgt:rounded wgt:object-contain wgt:rounded",
|
|
767
|
+
T.src = URL.createObjectURL(m), T.alt = "Preview", T.className = "wgt:h-20 wgt:w-20 wgt:rounded wgt:object-contain wgt:rounded", l.appendChild(T);
|
|
768
768
|
}
|
|
769
|
-
const
|
|
770
|
-
|
|
769
|
+
const J = document.createElement("div");
|
|
770
|
+
J.className = "wgt:flex wgt:flex-col";
|
|
771
771
|
const P = document.createElement("p");
|
|
772
772
|
P.className = "wgt:text-sm wgt:font-medium wgt:text-gray-800", P.innerText = m.name;
|
|
773
773
|
const d = document.createElement("p");
|
|
774
|
-
d.className = "wgt:text-sm wgt:text-gray-500", d.innerText = v(m.size),
|
|
774
|
+
d.className = "wgt:text-sm wgt:text-gray-500", d.innerText = v(m.size), J.appendChild(P), J.appendChild(d), l.appendChild(J), w.appendChild(l), B = m, typeof C == "function" && C(m);
|
|
775
775
|
} else {
|
|
776
776
|
const M = document.createElement("div");
|
|
777
777
|
M.className = "wgt:flex wgt:items-center", M.appendChild(r), w.appendChild(M);
|
|
@@ -843,31 +843,31 @@ function mQ({
|
|
|
843
843
|
let a = g || null;
|
|
844
844
|
function r(q, m = 2) {
|
|
845
845
|
if (q === 0) return "0 Bytes";
|
|
846
|
-
const M = 1024,
|
|
847
|
-
return parseFloat((q / Math.pow(M, P)).toFixed(
|
|
846
|
+
const M = 1024, l = Math.max(0, m), J = ["Bytes", "KB", "MB", "GB", "TB"], P = Math.floor(Math.log(q) / Math.log(M));
|
|
847
|
+
return parseFloat((q / Math.pow(M, P)).toFixed(l)) + " " + J[P];
|
|
848
848
|
}
|
|
849
849
|
function v(q) {
|
|
850
850
|
E.innerHTML = "", i(null);
|
|
851
851
|
const m = document.createElement("img");
|
|
852
852
|
if (m.alt = A, m.className = "wgt:max-w-full wgt:max-h-full wgt:object-contain", H(q) || i(`File không hợp lệ. Chỉ chấp nhận: ${n.accept}`), q.size <= 500 * 1024 || i("Dung lượng file vượt quá 500KB."), q.type.startsWith("image/")) {
|
|
853
|
-
const
|
|
854
|
-
|
|
855
|
-
m.src =
|
|
856
|
-
},
|
|
853
|
+
const l = new FileReader();
|
|
854
|
+
l.onload = () => {
|
|
855
|
+
m.src = l.result, typeof C == "function" && C(q);
|
|
856
|
+
}, l.readAsDataURL(q), E.appendChild(m);
|
|
857
857
|
} else {
|
|
858
|
-
const J = document.createElement("div");
|
|
859
|
-
J.className = "wgt:flex wgt:items-center wgt:gap-4";
|
|
860
858
|
const l = document.createElement("div");
|
|
861
|
-
l.className = "wgt:flex wgt:
|
|
859
|
+
l.className = "wgt:flex wgt:items-center wgt:gap-4";
|
|
860
|
+
const J = document.createElement("div");
|
|
861
|
+
J.className = "wgt:flex wgt:flex-col";
|
|
862
862
|
const P = document.createElement("p");
|
|
863
863
|
P.className = "wgt:text-sm wgt:font-medium wgt:text-gray-800", P.innerText = q.name;
|
|
864
864
|
const d = document.createElement("p");
|
|
865
|
-
d.className = "wgt:text-sm wgt:text-gray-500", d.innerText = r(q.size),
|
|
865
|
+
d.className = "wgt:text-sm wgt:text-gray-500", d.innerText = r(q.size), J.appendChild(P), J.appendChild(d), l.appendChild(J), E.appendChild(l), typeof C == "function" && C(null, q);
|
|
866
866
|
}
|
|
867
867
|
}
|
|
868
868
|
function H(q) {
|
|
869
869
|
const m = q.type.toLowerCase(), M = "." + q.name.split(".").pop().toLowerCase();
|
|
870
|
-
return n.accept.split(",").map((
|
|
870
|
+
return n.accept.split(",").map((J) => J.trim().toLowerCase()).filter(Boolean).some((J) => J.startsWith(".") ? J === M : J.endsWith("/*") ? m.startsWith(J.replace("/*", "")) : m === J);
|
|
871
871
|
}
|
|
872
872
|
return n.addEventListener("change", () => {
|
|
873
873
|
var m;
|
|
@@ -916,11 +916,11 @@ const $E = ({
|
|
|
916
916
|
} = {}) => {
|
|
917
917
|
Array.from(
|
|
918
918
|
{ length: 26 },
|
|
919
|
-
(
|
|
919
|
+
(l, J) => String.fromCharCode(65 + J)
|
|
920
920
|
);
|
|
921
921
|
const B = (/* @__PURE__ */ new Date()).getFullYear(), C = Array.from(
|
|
922
922
|
{ length: 2 },
|
|
923
|
-
(
|
|
923
|
+
(l, J) => String(B + J).slice(-2)
|
|
924
924
|
), Q = ["1", "2", "3", "4", "5", "6", "7", "8", "9"], I = ["C", "K"], E = ["T", "D", "L", "M", "N", "B", "G", "H", "X"], n = document.createElement("div");
|
|
925
925
|
n.className = "wgt:w-full wgt:flex wgt:flex-col wgt:items-start wgt:space-y-2";
|
|
926
926
|
const t = document.createElement("span");
|
|
@@ -953,16 +953,16 @@ const $E = ({
|
|
|
953
953
|
8: D("invoiceTemplateTypes.8"),
|
|
954
954
|
9: D("invoiceTemplateTypes.9")
|
|
955
955
|
};
|
|
956
|
-
Q.forEach((
|
|
957
|
-
o.append(new Option(i[
|
|
956
|
+
Q.forEach((l) => {
|
|
957
|
+
o.append(new Option(i[l], l));
|
|
958
958
|
}), h.append(o);
|
|
959
959
|
const a = document.createElement("select");
|
|
960
|
-
a.className = `${w} wgt:w-40`, a.title = D("codeTypeTooltip", "C: Có mã CQT, K: Không mã"), I.forEach((
|
|
961
|
-
const
|
|
962
|
-
a.append(new Option(
|
|
960
|
+
a.className = `${w} wgt:w-40`, a.title = D("codeTypeTooltip", "C: Có mã CQT, K: Không mã"), I.forEach((l) => {
|
|
961
|
+
const J = l === "C" ? D("codeTypeC", "C (Có mã CQT)") : D("codeTypeK", "K (Không mã)");
|
|
962
|
+
a.append(new Option(J, l));
|
|
963
963
|
}), h.append(a);
|
|
964
964
|
const r = document.createElement("select");
|
|
965
|
-
r.className = `${w} wgt:w-16`, r.title = D("yearTooltip", "Năm phát hành (2 chữ số cuối)"), C.forEach((
|
|
965
|
+
r.className = `${w} wgt:w-16`, r.title = D("yearTooltip", "Năm phát hành (2 chữ số cuối)"), C.forEach((l) => r.append(new Option(l, l))), r.value = String(B).slice(-2), h.append(r);
|
|
966
966
|
const v = document.createElement("select");
|
|
967
967
|
v.className = `${w} wgt:w-40`, v.title = D("invoiceTypeTooltip", "Loại hóa đơn");
|
|
968
968
|
const H = {
|
|
@@ -976,8 +976,8 @@ const $E = ({
|
|
|
976
976
|
H: D("invoiceTypeH", "H (Tem bán hàng)"),
|
|
977
977
|
X: D("invoiceTypeX", "X (Thương mại)")
|
|
978
978
|
};
|
|
979
|
-
E.forEach((
|
|
980
|
-
v.append(new Option(H[
|
|
979
|
+
E.forEach((l) => {
|
|
980
|
+
v.append(new Option(H[l], l));
|
|
981
981
|
}), h.append(v);
|
|
982
982
|
const q = document.createElement("input");
|
|
983
983
|
q.type = "text", q.maxLength = 2, q.placeholder = "AB", q.defaultValue = "YY", q.className = `${w} wgt:w-16`, q.title = D("customLettersTooltip"), h.append(q);
|
|
@@ -988,12 +988,12 @@ const $E = ({
|
|
|
988
988
|
q.value = q.value.toUpperCase().replace(/[^A-Z]/g, "").slice(0, 2), typeof g == "function" && g(m());
|
|
989
989
|
}
|
|
990
990
|
return [o, a, r, v].forEach(
|
|
991
|
-
(
|
|
991
|
+
(l) => l.addEventListener("change", M)
|
|
992
992
|
), q.addEventListener("input", M), q.addEventListener("blur", M), /^[1-9][CK]\d{2}[TDLMNBGHX][A-Z]{2}$/.test(A) ? (o.value = A[0], a.value = A[1], r.value = A.slice(2, 4), v.value = A[4], q.value = A.slice(5, 7)) : (o.value = "1", a.value = "C", v.value = "T", q.value = "YY"), M(), {
|
|
993
993
|
container: n,
|
|
994
994
|
getValue: m,
|
|
995
|
-
setValue: (
|
|
996
|
-
typeof
|
|
995
|
+
setValue: (l) => {
|
|
996
|
+
typeof l != "string" || l.length !== 7 || /^[1-9][CK]\d{2}[TDLMNBGHX][A-Z]{2}$/.test(l) && (o.value = l[0], a.value = l[1], r.value = l.slice(2, 4), v.value = l[4], q.value = l.slice(5, 7), M());
|
|
997
997
|
}
|
|
998
998
|
};
|
|
999
999
|
}, $g = "/core-api/packages", An = "/core-api/orders", gn = "/core-api/orders/create", Cn = "/core-api/customers/is-new", Bn = "core-api/convert/iframe-signature", Qn = "/tax-code", In = "/invoice/gen-qr";
|
|
@@ -2013,7 +2013,7 @@ const eE = (g) => {
|
|
|
2013
2013
|
return;
|
|
2014
2014
|
const m = zA.from(
|
|
2015
2015
|
"getAllResponseHeaders" in v && v.getAllResponseHeaders()
|
|
2016
|
-
),
|
|
2016
|
+
), l = {
|
|
2017
2017
|
data: !n || n === "text" || n === "json" ? v.responseText : v.response,
|
|
2018
2018
|
status: v.status,
|
|
2019
2019
|
statusText: v.statusText,
|
|
@@ -2025,7 +2025,7 @@ const eE = (g) => {
|
|
|
2025
2025
|
B(P), r();
|
|
2026
2026
|
}, function(P) {
|
|
2027
2027
|
C(P), r();
|
|
2028
|
-
},
|
|
2028
|
+
}, l), v = null;
|
|
2029
2029
|
}
|
|
2030
2030
|
"onloadend" in v ? v.onloadend = H : v.onreadystatechange = function() {
|
|
2031
2031
|
!v || v.readyState !== 4 || v.status === 0 && !(v.responseURL && v.responseURL.indexOf("file:") === 0) || setTimeout(H);
|
|
@@ -2035,15 +2035,15 @@ const eE = (g) => {
|
|
|
2035
2035
|
C(new $("Network Error", $.ERR_NETWORK, g, v)), v = null;
|
|
2036
2036
|
}, v.ontimeout = function() {
|
|
2037
2037
|
let M = Q.timeout ? "timeout of " + Q.timeout + "ms exceeded" : "timeout exceeded";
|
|
2038
|
-
const
|
|
2038
|
+
const l = Q.transitional || EE;
|
|
2039
2039
|
Q.timeoutErrorMessage && (M = Q.timeoutErrorMessage), C(new $(
|
|
2040
2040
|
M,
|
|
2041
|
-
|
|
2041
|
+
l.clarifyTimeoutError ? $.ETIMEDOUT : $.ECONNABORTED,
|
|
2042
2042
|
g,
|
|
2043
2043
|
v
|
|
2044
2044
|
)), v = null;
|
|
2045
|
-
}, I === void 0 && E.setContentType(null), "setRequestHeader" in v && k.forEach(E.toJSON(), function(M,
|
|
2046
|
-
v.setRequestHeader(
|
|
2045
|
+
}, I === void 0 && E.setContentType(null), "setRequestHeader" in v && k.forEach(E.toJSON(), function(M, l) {
|
|
2046
|
+
v.setRequestHeader(l, M);
|
|
2047
2047
|
}), k.isUndefined(Q.withCredentials) || (v.withCredentials = !!Q.withCredentials), n && n !== "json" && (v.responseType = Q.responseType), c && ([o, a] = Ug(c, !0), v.addEventListener("progress", o)), t && v.upload && ([w, i] = Ug(t), v.upload.addEventListener("progress", w), v.upload.addEventListener("loadend", i)), (Q.cancelToken || Q.signal) && (h = (m) => {
|
|
2048
2048
|
v && (C(!m || m.type ? new mg(null, g, v) : m), v.abort(), v = null);
|
|
2049
2049
|
}, Q.cancelToken && Q.cancelToken.subscribe(h), Q.signal && (Q.signal.aborted ? h() : Q.signal.addEventListener("abort", h)));
|
|
@@ -2221,17 +2221,17 @@ const Tt = (g) => K(null, null, function* () {
|
|
|
2221
2221
|
let v;
|
|
2222
2222
|
try {
|
|
2223
2223
|
if (t && lt && B !== "get" && B !== "head" && (v = yield Ht(h, C)) !== 0) {
|
|
2224
|
-
let
|
|
2224
|
+
let l = new Request(A, {
|
|
2225
2225
|
method: "POST",
|
|
2226
2226
|
body: C,
|
|
2227
2227
|
duplex: "half"
|
|
2228
|
-
}),
|
|
2229
|
-
if (k.isFormData(C) && (
|
|
2228
|
+
}), J;
|
|
2229
|
+
if (k.isFormData(C) && (J = l.headers.get("content-type")) && h.setContentType(J), l.body) {
|
|
2230
2230
|
const [P, d] = lQ(
|
|
2231
2231
|
v,
|
|
2232
2232
|
Ug(TQ(t))
|
|
2233
2233
|
);
|
|
2234
|
-
C = kQ(
|
|
2234
|
+
C = kQ(l.body, RQ, P, d);
|
|
2235
2235
|
}
|
|
2236
2236
|
}
|
|
2237
2237
|
k.isString(w) || (w = w ? "include" : "omit");
|
|
@@ -2247,25 +2247,25 @@ const Tt = (g) => K(null, null, function* () {
|
|
|
2247
2247
|
let q = yield fetch(a, o);
|
|
2248
2248
|
const m = eB && (c === "stream" || c === "response");
|
|
2249
2249
|
if (eB && (n || m && r)) {
|
|
2250
|
-
const
|
|
2250
|
+
const l = {};
|
|
2251
2251
|
["status", "statusText", "headers"].forEach((T) => {
|
|
2252
|
-
|
|
2252
|
+
l[T] = q[T];
|
|
2253
2253
|
});
|
|
2254
|
-
const
|
|
2255
|
-
|
|
2254
|
+
const J = k.toFiniteNumber(q.headers.get("content-length")), [P, d] = n && lQ(
|
|
2255
|
+
J,
|
|
2256
2256
|
Ug(TQ(n), !0)
|
|
2257
2257
|
) || [];
|
|
2258
2258
|
q = new Response(
|
|
2259
2259
|
kQ(q.body, RQ, P, () => {
|
|
2260
2260
|
d && d(), r && r();
|
|
2261
2261
|
}),
|
|
2262
|
-
|
|
2262
|
+
l
|
|
2263
2263
|
);
|
|
2264
2264
|
}
|
|
2265
2265
|
c = c || "text";
|
|
2266
2266
|
let M = yield pg[k.findKey(pg, c) || "text"](q, g);
|
|
2267
|
-
return !m && r && r(), yield new Promise((
|
|
2268
|
-
hE(
|
|
2267
|
+
return !m && r && r(), yield new Promise((l, J) => {
|
|
2268
|
+
hE(l, J, {
|
|
2269
2269
|
data: M,
|
|
2270
2270
|
headers: zA.from(q.headers),
|
|
2271
2271
|
status: q.status,
|
|
@@ -2920,21 +2920,21 @@ function yt() {
|
|
|
2920
2920
|
}
|
|
2921
2921
|
function M() {
|
|
2922
2922
|
}
|
|
2923
|
-
function
|
|
2923
|
+
function l() {
|
|
2924
2924
|
}
|
|
2925
|
-
var
|
|
2926
|
-
w(
|
|
2925
|
+
var J = {};
|
|
2926
|
+
w(J, t, function() {
|
|
2927
2927
|
return this;
|
|
2928
2928
|
});
|
|
2929
2929
|
var P = Object.getPrototypeOf, d = P && P(P(uA([])));
|
|
2930
|
-
d && d !== C && Q.call(d, t) && (
|
|
2931
|
-
var T =
|
|
2932
|
-
M.prototype =
|
|
2933
|
-
|
|
2930
|
+
d && d !== C && Q.call(d, t) && (J = d);
|
|
2931
|
+
var T = l.prototype = m.prototype = Object.create(J);
|
|
2932
|
+
M.prototype = l, I(T, "constructor", { value: l, configurable: !0 }), I(
|
|
2933
|
+
l,
|
|
2934
2934
|
"constructor",
|
|
2935
2935
|
{ value: M, configurable: !0 }
|
|
2936
2936
|
), M.displayName = w(
|
|
2937
|
-
|
|
2937
|
+
l,
|
|
2938
2938
|
h,
|
|
2939
2939
|
"GeneratorFunction"
|
|
2940
2940
|
);
|
|
@@ -2951,7 +2951,7 @@ function yt() {
|
|
|
2951
2951
|
// do is to check its .name property.
|
|
2952
2952
|
(u.displayName || u.name) === "GeneratorFunction" : !1;
|
|
2953
2953
|
}, B.mark = function(e) {
|
|
2954
|
-
return Object.setPrototypeOf ? Object.setPrototypeOf(e,
|
|
2954
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(e, l) : (e.__proto__ = l, w(e, h, "GeneratorFunction")), e.prototype = Object.create(T), e;
|
|
2955
2955
|
}, B.awrap = function(e) {
|
|
2956
2956
|
return { __await: e };
|
|
2957
2957
|
};
|
|
@@ -3282,8 +3282,8 @@ function jt() {
|
|
|
3282
3282
|
n.shift(), E[M.id] = m;
|
|
3283
3283
|
try {
|
|
3284
3284
|
H(yield M[r].apply(this, [...v, m.id]));
|
|
3285
|
-
} catch (
|
|
3286
|
-
q(
|
|
3285
|
+
} catch (l) {
|
|
3286
|
+
q(l);
|
|
3287
3287
|
} finally {
|
|
3288
3288
|
delete E[M.id], h();
|
|
3289
3289
|
}
|
|
@@ -3461,7 +3461,7 @@ function fE() {
|
|
|
3461
3461
|
} = aA, M = cC(aA, [
|
|
3462
3462
|
"logger",
|
|
3463
3463
|
"errorHandler"
|
|
3464
|
-
]),
|
|
3464
|
+
]), l = {}, J = typeof o == "string" ? o.split("+") : o;
|
|
3465
3465
|
let P = i, d = r;
|
|
3466
3466
|
const T = [Q.DEFAULT, Q.LSTM_ONLY].includes(i) && !M.legacyCore;
|
|
3467
3467
|
let X, Y;
|
|
@@ -3475,7 +3475,7 @@ function fE() {
|
|
|
3475
3475
|
const b = ({ id: p, action: _, payload: hA }) => new Promise((AA, IA) => {
|
|
3476
3476
|
B(`[${H}]: Start ${p}, action=${_}`);
|
|
3477
3477
|
const nA = `${_}-${p}`;
|
|
3478
|
-
|
|
3478
|
+
l[nA] = { resolve: AA, reject: IA }, h(z, {
|
|
3479
3479
|
workerId: H,
|
|
3480
3480
|
jobId: p,
|
|
3481
3481
|
action: _,
|
|
@@ -3525,8 +3525,8 @@ function fE() {
|
|
|
3525
3525
|
P = IA;
|
|
3526
3526
|
const nA = hA || d;
|
|
3527
3527
|
d = nA;
|
|
3528
|
-
const mA = (typeof p == "string" ? p.split("+") : p).filter((MA) => !
|
|
3529
|
-
return
|
|
3528
|
+
const mA = (typeof p == "string" ? p.split("+") : p).filter((MA) => !J.includes(MA));
|
|
3529
|
+
return J.push(...mA), mA.length > 0 ? R(mA, AA).then(() => x(p, IA, nA, AA)) : x(p, IA, nA, AA);
|
|
3530
3530
|
}, S = (p = {}, _) => b(A({
|
|
3531
3531
|
id: _,
|
|
3532
3532
|
action: "setParameters",
|
|
@@ -3558,9 +3558,9 @@ function fE() {
|
|
|
3558
3558
|
}) => {
|
|
3559
3559
|
const nA = `${AA}-${_}`;
|
|
3560
3560
|
if (hA === "resolve")
|
|
3561
|
-
B(`[${p}]: Complete ${_}`),
|
|
3561
|
+
B(`[${p}]: Complete ${_}`), l[nA].resolve({ jobId: _, data: IA }), delete l[nA];
|
|
3562
3562
|
else if (hA === "reject")
|
|
3563
|
-
if (
|
|
3563
|
+
if (l[nA].reject(IA), delete l[nA], AA === "load" && X(IA), m)
|
|
3564
3564
|
m(IA);
|
|
3565
3565
|
else
|
|
3566
3566
|
throw Error(IA);
|
|
@@ -4097,7 +4097,7 @@ function T0(g, A, B, {
|
|
|
4097
4097
|
}
|
|
4098
4098
|
a = -1;
|
|
4099
4099
|
let q = [], m = 1, M = h + w;
|
|
4100
|
-
const
|
|
4100
|
+
const l = 1 << h - 1;
|
|
4101
4101
|
for (let P = 0; P < h; P += 1) {
|
|
4102
4102
|
let d = 0, T = M;
|
|
4103
4103
|
for (; d < T; )
|
|
@@ -4113,7 +4113,7 @@ function T0(g, A, B, {
|
|
|
4113
4113
|
G[Y + 1] = (1 << P) - 1;
|
|
4114
4114
|
for (let z = Y; z >= X; z -= 1) {
|
|
4115
4115
|
let b = z - 1, BA = B[g.charAt(b)];
|
|
4116
|
-
if (r && (v[b] = +!!BA), G[z] = (G[z + 1] << 1 | 1) & BA, P && (G[z] |= (q[z + 1] | q[z]) << 1 | 1 | q[z + 1]), G[z] &
|
|
4116
|
+
if (r && (v[b] = +!!BA), G[z] = (G[z + 1] << 1 | 1) & BA, P && (G[z] |= (q[z + 1] | q[z]) << 1 | 1 | q[z + 1]), G[z] & l && (m = Fg(A, {
|
|
4117
4117
|
errors: P,
|
|
4118
4118
|
currentLocation: b,
|
|
4119
4119
|
expectedLocation: o,
|
|
@@ -4135,16 +4135,16 @@ function T0(g, A, B, {
|
|
|
4135
4135
|
break;
|
|
4136
4136
|
q = G;
|
|
4137
4137
|
}
|
|
4138
|
-
const
|
|
4138
|
+
const J = {
|
|
4139
4139
|
isMatch: a >= 0,
|
|
4140
4140
|
// Count exact matches (those with a score of 0) to be "almost" exact
|
|
4141
4141
|
score: Math.max(1e-3, m)
|
|
4142
4142
|
};
|
|
4143
4143
|
if (r) {
|
|
4144
4144
|
const P = l0(v, n);
|
|
4145
|
-
P.length ? t && (
|
|
4145
|
+
P.length ? t && (J.indices = P) : J.isMatch = !1;
|
|
4146
4146
|
}
|
|
4147
|
-
return
|
|
4147
|
+
return J;
|
|
4148
4148
|
}
|
|
4149
4149
|
function H0(g) {
|
|
4150
4150
|
let A = {};
|
|
@@ -5060,10 +5060,10 @@ function rh() {
|
|
|
5060
5060
|
for (f in e)
|
|
5061
5061
|
R = s[f] !== void 0, R && typeof e[f] == "object" && e[f] !== null && e[f].nodeName === void 0 ? a(e[f]) ? u && (s[f] = new Date(e[f].getTime())) : i(e[f]) ? u && (s[f] = e[f].slice(0)) : s[f] = M({}, e[f], u) : (u || !R) && (s[f] = e[f]);
|
|
5062
5062
|
return s;
|
|
5063
|
-
},
|
|
5063
|
+
}, l = function(s, e, u) {
|
|
5064
5064
|
var f;
|
|
5065
5065
|
I.createEvent ? (f = I.createEvent("HTMLEvents"), f.initEvent(e, !0, !1), f = M(f, u), s.dispatchEvent(f)) : I.createEventObject && (f = I.createEventObject(), f = M(f, u), s.fireEvent("on" + e, f));
|
|
5066
|
-
},
|
|
5066
|
+
}, J = function(s) {
|
|
5067
5067
|
return s.month < 0 && (s.year -= Math.ceil(Math.abs(s.month) / 12), s.month += 12), s.month > 11 && (s.year += Math.floor(Math.abs(s.month) / 12), s.month -= 12), s;
|
|
5068
5068
|
}, P = {
|
|
5069
5069
|
// bind the picker to a form field
|
|
@@ -5318,10 +5318,10 @@ function rh() {
|
|
|
5318
5318
|
*/
|
|
5319
5319
|
setDate: function(s, e) {
|
|
5320
5320
|
if (!s)
|
|
5321
|
-
return this._d = null, this._o.field && (this._o.field.value = "",
|
|
5321
|
+
return this._d = null, this._o.field && (this._o.field.value = "", l(this._o.field, "change", { firedBy: this })), this.draw();
|
|
5322
5322
|
if (typeof s == "string" && (s = new Date(Date.parse(s))), !!a(s)) {
|
|
5323
5323
|
var u = this._o.minDate, f = this._o.maxDate;
|
|
5324
|
-
a(u) && s < u ? s = u : a(f) && s > f && (s = f), this._d = new Date(s.getTime()), q(this._d), this.gotoDate(this._d), this._o.field && (this._o.field.value = this.toString(),
|
|
5324
|
+
a(u) && s < u ? s = u : a(f) && s > f && (s = f), this._d = new Date(s.getTime()), q(this._d), this.gotoDate(this._d), this._o.field && (this._o.field.value = this.toString(), l(this._o.field, "change", { firedBy: this })), !e && typeof this._o.onSelect == "function" && this._o.onSelect.call(this, this.getDate());
|
|
5325
5325
|
}
|
|
5326
5326
|
},
|
|
5327
5327
|
/**
|
|
@@ -5351,9 +5351,9 @@ function rh() {
|
|
|
5351
5351
|
s === "add" ? R = new Date(u.valueOf() + f) : s === "subtract" && (R = new Date(u.valueOf() - f)), this.setDate(R);
|
|
5352
5352
|
},
|
|
5353
5353
|
adjustCalendars: function() {
|
|
5354
|
-
this.calendars[0] =
|
|
5354
|
+
this.calendars[0] = J(this.calendars[0]);
|
|
5355
5355
|
for (var s = 1; s < this._o.numberOfMonths; s++)
|
|
5356
|
-
this.calendars[s] =
|
|
5356
|
+
this.calendars[s] = J({
|
|
5357
5357
|
month: this.calendars[0].month + s,
|
|
5358
5358
|
year: this.calendars[0].year
|
|
5359
5359
|
});
|
|
@@ -5502,7 +5502,7 @@ function Ph(E) {
|
|
|
5502
5502
|
const F = eA();
|
|
5503
5503
|
typeof g == "function" && g(F);
|
|
5504
5504
|
}), n.appendChild(t);
|
|
5505
|
-
let c, h, w, o, i, a, r, v, H, q, m, M,
|
|
5505
|
+
let c, h, w, o, i, a, r, v, H, q, m, M, l, J, P, d, T, X, Y, G, O, z, b, BA, uA;
|
|
5506
5506
|
const s = document.createElement("button");
|
|
5507
5507
|
c = TA({
|
|
5508
5508
|
name: "taxCode",
|
|
@@ -5634,7 +5634,7 @@ function Ph(E) {
|
|
|
5634
5634
|
onChange: (N) => {
|
|
5635
5635
|
N.target.value;
|
|
5636
5636
|
}
|
|
5637
|
-
}),
|
|
5637
|
+
}), l = TA({
|
|
5638
5638
|
name: "repIdCardField",
|
|
5639
5639
|
label: D("idNumber"),
|
|
5640
5640
|
required: !0,
|
|
@@ -5647,14 +5647,14 @@ function Ph(E) {
|
|
|
5647
5647
|
let F = N.target.value;
|
|
5648
5648
|
const fA = F.replace(/[^0-9]/g, "");
|
|
5649
5649
|
if (fA !== F && (N.target.value = fA, F = fA), F.trim() === "") {
|
|
5650
|
-
|
|
5650
|
+
l.setError(D("errorRequired"));
|
|
5651
5651
|
return;
|
|
5652
5652
|
}
|
|
5653
|
-
/^\d{12}$/.test(F) ?
|
|
5653
|
+
/^\d{12}$/.test(F) ? l.setError(null) : l.setError(
|
|
5654
5654
|
D("errorInvalidIdCard", "Số CCCD phải có 12 chữ số")
|
|
5655
5655
|
);
|
|
5656
5656
|
}
|
|
5657
|
-
}),
|
|
5657
|
+
}), J = TA({
|
|
5658
5658
|
name: "repPassportNumberField",
|
|
5659
5659
|
label: D("passport", "Hộ chiếu"),
|
|
5660
5660
|
required: !1,
|
|
@@ -5942,7 +5942,7 @@ function Ph(E) {
|
|
|
5942
5942
|
return;
|
|
5943
5943
|
}
|
|
5944
5944
|
const fA = () => {
|
|
5945
|
-
|
|
5945
|
+
l.inputEl.value = "", H.inputEl.value = "", q.inputEl.value = "", d.inputEl.value = "", m.selectEl.value = "", P.selectEl.value = "";
|
|
5946
5946
|
}, sg = (NA) => {
|
|
5947
5947
|
if (!NA) return "";
|
|
5948
5948
|
const [vg, iQ, dg] = NA.split("/"), Jg = new Date(+dg, +iQ - 1, +vg), nC = Jg.getFullYear(), tC = String(Jg.getMonth() + 1).padStart(2, "0"), Gg = String(Jg.getDate()).padStart(2, "0");
|
|
@@ -5964,7 +5964,7 @@ function Ph(E) {
|
|
|
5964
5964
|
sex: Gg,
|
|
5965
5965
|
nationality: aQ
|
|
5966
5966
|
} = NA;
|
|
5967
|
-
if (!dg || !/^\d{12}$/.test(dg) ? (hA(D("errorInvalidCard", "Số CCCD phải có 12 chữ số")),
|
|
5967
|
+
if (!dg || !/^\d{12}$/.test(dg) ? (hA(D("errorInvalidCard", "Số CCCD phải có 12 chữ số")), l.inputEl.value = "") : (l.inputEl.value = dg, l.setError(null)), H.inputEl.value = Jg || "", q.inputEl.value = sg(nC), d.inputEl.value = tC || "", Gg) {
|
|
5968
5968
|
const _A = XQ.find(
|
|
5969
5969
|
(hC) => hC.label.toLowerCase() === Gg.toLowerCase()
|
|
5970
5970
|
);
|
|
@@ -5990,7 +5990,7 @@ function Ph(E) {
|
|
|
5990
5990
|
const IA = document.createElement("div");
|
|
5991
5991
|
IA.className = "wgt:grid wgt:grid-cols-1 wgt:md:grid-cols-2 wgt:gap-4", AA.appendChild(IA), IA.appendChild(q.container), IA.appendChild(m.container), QA.appendChild(AA);
|
|
5992
5992
|
const nA = document.createElement("div");
|
|
5993
|
-
nA.className = "wgt:grid wgt:grid-cols-1 wgt:md:grid-cols-4 wgt:gap-4 wgt:items-start", nA.appendChild(
|
|
5993
|
+
nA.className = "wgt:grid wgt:grid-cols-1 wgt:md:grid-cols-4 wgt:gap-4 wgt:items-start", nA.appendChild(l.container), nA.appendChild(J.container), nA.appendChild(M.container), nA.appendChild(P.container), y.appendChild(QA), y.appendChild(nA), y.appendChild(d.container), y.appendChild(b.container);
|
|
5994
5994
|
const tA = document.createElement("ul");
|
|
5995
5995
|
tA.className = "wgt:list-inside wgt:list-disc wgt:-mt-2";
|
|
5996
5996
|
const mA = document.createElement("li");
|
|
@@ -6123,8 +6123,8 @@ function Ph(E) {
|
|
|
6123
6123
|
dob: q == null ? void 0 : q.getValue(),
|
|
6124
6124
|
gender: m == null ? void 0 : m.getValue(),
|
|
6125
6125
|
phone: M == null ? void 0 : M.getValue(),
|
|
6126
|
-
idCard:
|
|
6127
|
-
passportNumber:
|
|
6126
|
+
idCard: l == null ? void 0 : l.getValue(),
|
|
6127
|
+
passportNumber: J == null ? void 0 : J.getValue(),
|
|
6128
6128
|
nationality: P == null ? void 0 : P.getValue(),
|
|
6129
6129
|
permanentAddress: d == null ? void 0 : d.getValue()
|
|
6130
6130
|
},
|
|
@@ -6150,7 +6150,7 @@ function Ph(E) {
|
|
|
6150
6150
|
H,
|
|
6151
6151
|
q,
|
|
6152
6152
|
M,
|
|
6153
|
-
|
|
6153
|
+
l,
|
|
6154
6154
|
d,
|
|
6155
6155
|
// invoiceSymbolField,
|
|
6156
6156
|
O,
|
|
@@ -6269,15 +6269,15 @@ function wI({
|
|
|
6269
6269
|
)} ${D("electronicInvoices")} / ${D("month")}` : m.innerText = "", H.appendChild(m), i.appendChild(H);
|
|
6270
6270
|
const M = document.createElement("div");
|
|
6271
6271
|
M.className = "wgt:mt-4";
|
|
6272
|
-
const
|
|
6273
|
-
|
|
6272
|
+
const l = document.createElement("span");
|
|
6273
|
+
l.className = [
|
|
6274
6274
|
"wgt:block",
|
|
6275
6275
|
"wgt:text-2xl",
|
|
6276
6276
|
"wgt:font-bold",
|
|
6277
6277
|
w ? "wgt:text-primary" : "wgt:text-text-sub-600"
|
|
6278
|
-
].join(" "),
|
|
6279
|
-
const
|
|
6280
|
-
|
|
6278
|
+
].join(" "), l.innerText = $A((h == null ? void 0 : h.limit) * (h == null ? void 0 : h.price)), M.appendChild(l);
|
|
6279
|
+
const J = document.createElement("span");
|
|
6280
|
+
J.className = "wgt:text-sm wgt:text-text-sub-600", J.innerText = `VND/${D("package")}`, M.appendChild(J), o.appendChild(M), I.appendChild(o);
|
|
6281
6281
|
});
|
|
6282
6282
|
}
|
|
6283
6283
|
E();
|
|
@@ -6465,16 +6465,16 @@ function xh(i) {
|
|
|
6465
6465
|
m.className = "wgt:flex wgt:flex-col wgt:gap-3", q.appendChild(m);
|
|
6466
6466
|
const M = document.createElement("div");
|
|
6467
6467
|
M.className = "wgt:flex wgt:flex-col wgt:gap-4", m.appendChild(M);
|
|
6468
|
-
const
|
|
6469
|
-
|
|
6470
|
-
const
|
|
6468
|
+
const l = document.createElement("h2");
|
|
6469
|
+
l.className = "wgt:text-xl wgt:font-bold wgt:text-text-black", l.innerText = D("selectInvoicePackage"), M.appendChild(l);
|
|
6470
|
+
const J = dh({
|
|
6471
6471
|
value: "",
|
|
6472
6472
|
placeholder: "",
|
|
6473
6473
|
onInputChange: (V) => {
|
|
6474
6474
|
hA = V.target.value.replace(/\D/g, ""), zg();
|
|
6475
6475
|
}
|
|
6476
6476
|
});
|
|
6477
|
-
M.appendChild(
|
|
6477
|
+
M.appendChild(J.container);
|
|
6478
6478
|
const P = document.createElement("div");
|
|
6479
6479
|
P.className = "wgt:flex wgt:flex-col wgt:gap-2", m.appendChild(P);
|
|
6480
6480
|
const d = document.createElement("h3");
|
|
@@ -6679,7 +6679,7 @@ function xh(i) {
|
|
|
6679
6679
|
D("errorLoadingInitPackages") || "Failed to load registration packages"
|
|
6680
6680
|
), MA = []), CA.status === "fulfilled") {
|
|
6681
6681
|
if (tA = CA.value || [], tA.length > 0) {
|
|
6682
|
-
AA = C ? C._id : tA[0]._id,
|
|
6682
|
+
AA = C ? C._id : tA[0]._id, J.placeholder = ((LA = tA[0]) == null ? void 0 : LA.limit) + " " + D("invoicesPerMonth");
|
|
6683
6683
|
const rA = tA;
|
|
6684
6684
|
rA.some((oA) => oA._id === AA) ? nA = rA : nA = Lg(
|
|
6685
6685
|
tA,
|
|
@@ -6928,8 +6928,8 @@ function zh({
|
|
|
6928
6928
|
q.className = "wgt:flex wgt:flex-col wgt:justify-between wgt:md:w-1/2";
|
|
6929
6929
|
const m = document.createElement("div"), M = document.createElement("h3");
|
|
6930
6930
|
M.className = "wgt:text-lg wgt:font-semibold wgt:text-gray-800 mb-4", M.innerText = D("paymentInstructionsTitle"), m.appendChild(M);
|
|
6931
|
-
const
|
|
6932
|
-
|
|
6931
|
+
const l = document.createElement("ol");
|
|
6932
|
+
l.className = "wgt:space-y-4", I.forEach((d, T) => {
|
|
6933
6933
|
const X = document.createElement("li");
|
|
6934
6934
|
X.className = "wgt:flex wgt:items-start";
|
|
6935
6935
|
const Y = document.createElement("div");
|
|
@@ -6939,18 +6939,18 @@ function zh({
|
|
|
6939
6939
|
const O = document.createElement("span");
|
|
6940
6940
|
O.className = "wgt:text-white wgt:text-sm wgt:font-semibold", O.innerText = String(T + 1), G.appendChild(O), Y.appendChild(G);
|
|
6941
6941
|
const z = document.createElement("p");
|
|
6942
|
-
z.className = "wgt:ml-3 wgt:text-text-sub-600", z.innerText = d, X.appendChild(Y), X.appendChild(z),
|
|
6943
|
-
}), m.appendChild(
|
|
6944
|
-
const
|
|
6945
|
-
|
|
6942
|
+
z.className = "wgt:ml-3 wgt:text-text-sub-600", z.innerText = d, X.appendChild(Y), X.appendChild(z), l.appendChild(X);
|
|
6943
|
+
}), m.appendChild(l), q.appendChild(m);
|
|
6944
|
+
const J = document.createElement("div");
|
|
6945
|
+
J.className = "wgt:h-[300px] wgt:flex wgt:justify-center";
|
|
6946
6946
|
const P = document.createElement("img");
|
|
6947
|
-
return P.src = E, P.alt = "QR payment illustration", P.className = "wgt:h-full wgt:object-contain",
|
|
6947
|
+
return P.src = E, P.alt = "QR payment illustration", P.className = "wgt:h-full wgt:object-contain", J.appendChild(P), q.appendChild(J), n.appendChild(q), {
|
|
6948
6948
|
container: n,
|
|
6949
6949
|
update(d = {}) {
|
|
6950
6950
|
d.qrSrc != null && (o.src = d.qrSrc), d.logos && (i.innerHTML = "", d.logos.forEach((T) => {
|
|
6951
6951
|
const X = document.createElement("img");
|
|
6952
6952
|
X.src = T, X.alt = "Logo", X.className = "wgt:w-8 wgt:object-contain", i.appendChild(X);
|
|
6953
|
-
})), d.accountName != null && (r.innerText = d.accountName), d.accountNumber != null && (v.innerHTML = `${D("accountNumber")}: <span class="wgt:font-medium">${d.accountNumber}</span>`), d.bankName != null && (H.innerHTML = `${D("beneficiaryBank")}: <span class="wgt:font-medium">${d.bankName}</span>`), d.instructions && (
|
|
6953
|
+
})), d.accountName != null && (r.innerText = d.accountName), d.accountNumber != null && (v.innerHTML = `${D("accountNumber")}: <span class="wgt:font-medium">${d.accountNumber}</span>`), d.bankName != null && (H.innerHTML = `${D("beneficiaryBank")}: <span class="wgt:font-medium">${d.bankName}</span>`), d.instructions && (l.innerHTML = "", d.instructions.forEach((T, X) => {
|
|
6954
6954
|
const Y = document.createElement("li");
|
|
6955
6955
|
Y.className = "wgt:flex wgt:items-start";
|
|
6956
6956
|
const G = document.createElement("div");
|
|
@@ -6960,7 +6960,7 @@ function zh({
|
|
|
6960
6960
|
const z = document.createElement("span");
|
|
6961
6961
|
z.className = "wgt:text-white wgt:text-sm wgt:font-semibold", z.innerText = String(X + 1), O.appendChild(z), G.appendChild(O);
|
|
6962
6962
|
const b = document.createElement("p");
|
|
6963
|
-
b.className = "wgt:ml-3 wgt:text-text-sub-600", b.innerText = T, Y.appendChild(G), Y.appendChild(b),
|
|
6963
|
+
b.className = "wgt:ml-3 wgt:text-text-sub-600", b.innerText = T, Y.appendChild(G), Y.appendChild(b), l.appendChild(Y);
|
|
6964
6964
|
})), d.illustrationSrc != null && (P.src = d.illustrationSrc);
|
|
6965
6965
|
}
|
|
6966
6966
|
};
|
|
@@ -8124,20 +8124,20 @@ function $h() {
|
|
|
8124
8124
|
}
|
|
8125
8125
|
function h(H, q, m) {
|
|
8126
8126
|
const M = [];
|
|
8127
|
-
let
|
|
8128
|
-
for (; (
|
|
8127
|
+
let l;
|
|
8128
|
+
for (; (l = H.exec(m)) !== null; )
|
|
8129
8129
|
M.push({
|
|
8130
|
-
data:
|
|
8131
|
-
index:
|
|
8130
|
+
data: l[0],
|
|
8131
|
+
index: l.index,
|
|
8132
8132
|
mode: q,
|
|
8133
|
-
length:
|
|
8133
|
+
length: l[0].length
|
|
8134
8134
|
});
|
|
8135
8135
|
return M;
|
|
8136
8136
|
}
|
|
8137
8137
|
function w(H) {
|
|
8138
8138
|
const q = h(E.NUMERIC, A.NUMERIC, H), m = h(E.ALPHANUMERIC, A.ALPHANUMERIC, H);
|
|
8139
|
-
let M,
|
|
8140
|
-
return n.isKanjiModeEnabled() ? (M = h(E.BYTE, A.BYTE, H),
|
|
8139
|
+
let M, l;
|
|
8140
|
+
return n.isKanjiModeEnabled() ? (M = h(E.BYTE, A.BYTE, H), l = h(E.KANJI, A.KANJI, H)) : (M = h(E.BYTE_KANJI, A.BYTE, H), l = []), q.concat(m, M, l).sort(function(P, d) {
|
|
8141
8141
|
return P.index - d.index;
|
|
8142
8142
|
}).map(function(P) {
|
|
8143
8143
|
return {
|
|
@@ -8199,21 +8199,21 @@ function $h() {
|
|
|
8199
8199
|
}
|
|
8200
8200
|
function r(H, q) {
|
|
8201
8201
|
const m = {}, M = { start: {} };
|
|
8202
|
-
let
|
|
8203
|
-
for (let
|
|
8204
|
-
const P = H[
|
|
8202
|
+
let l = ["start"];
|
|
8203
|
+
for (let J = 0; J < H.length; J++) {
|
|
8204
|
+
const P = H[J], d = [];
|
|
8205
8205
|
for (let T = 0; T < P.length; T++) {
|
|
8206
|
-
const X = P[T], Y = "" +
|
|
8206
|
+
const X = P[T], Y = "" + J + T;
|
|
8207
8207
|
d.push(Y), m[Y] = { node: X, lastCount: 0 }, M[Y] = {};
|
|
8208
|
-
for (let G = 0; G <
|
|
8209
|
-
const O =
|
|
8208
|
+
for (let G = 0; G < l.length; G++) {
|
|
8209
|
+
const O = l[G];
|
|
8210
8210
|
m[O] && m[O].node.mode === X.mode ? (M[O][Y] = o(m[O].lastCount + X.length, X.mode) - o(m[O].lastCount, X.mode), m[O].lastCount += X.length) : (m[O] && (m[O].lastCount = X.length), M[O][Y] = o(X.length, X.mode) + 4 + A.getCharCountIndicator(X.mode, q));
|
|
8211
8211
|
}
|
|
8212
8212
|
}
|
|
8213
|
-
|
|
8213
|
+
l = d;
|
|
8214
8214
|
}
|
|
8215
|
-
for (let
|
|
8216
|
-
M[J
|
|
8215
|
+
for (let J = 0; J < l.length; J++)
|
|
8216
|
+
M[l[J]].end = 0;
|
|
8217
8217
|
return { map: M, table: m };
|
|
8218
8218
|
}
|
|
8219
8219
|
function v(H, q) {
|
|
@@ -8238,9 +8238,9 @@ function $h() {
|
|
|
8238
8238
|
return typeof M == "string" ? m.push(v(M, null)) : M.data && m.push(v(M.data, M.mode)), m;
|
|
8239
8239
|
}, []);
|
|
8240
8240
|
}, g.fromString = function(q, m) {
|
|
8241
|
-
const M = w(q, n.isKanjiModeEnabled()),
|
|
8241
|
+
const M = w(q, n.isKanjiModeEnabled()), l = a(M), J = r(l, m), P = t.find_path(J.map, "start", "end"), d = [];
|
|
8242
8242
|
for (let T = 1; T < P.length - 1; T++)
|
|
8243
|
-
d.push(
|
|
8243
|
+
d.push(J.table[P[T]].node);
|
|
8244
8244
|
return g.fromArray(i(d));
|
|
8245
8245
|
}, g.rawSplit = function(q) {
|
|
8246
8246
|
return g.fromArray(
|
|
@@ -8254,54 +8254,54 @@ function Ac() {
|
|
|
8254
8254
|
if (GI) return LC;
|
|
8255
8255
|
GI = 1;
|
|
8256
8256
|
const g = ig(), A = HB(), B = Oh(), C = Fh(), Q = Lh(), I = Nh(), E = yh(), n = zE(), t = bh(), c = Sh(), h = Uh(), w = ag(), o = $h();
|
|
8257
|
-
function i(
|
|
8258
|
-
const d =
|
|
8257
|
+
function i(J, P) {
|
|
8258
|
+
const d = J.size, T = I.getPositions(P);
|
|
8259
8259
|
for (let X = 0; X < T.length; X++) {
|
|
8260
8260
|
const Y = T[X][0], G = T[X][1];
|
|
8261
8261
|
for (let O = -1; O <= 7; O++)
|
|
8262
8262
|
if (!(Y + O <= -1 || d <= Y + O))
|
|
8263
8263
|
for (let z = -1; z <= 7; z++)
|
|
8264
|
-
G + z <= -1 || d <= G + z || (O >= 0 && O <= 6 && (z === 0 || z === 6) || z >= 0 && z <= 6 && (O === 0 || O === 6) || O >= 2 && O <= 4 && z >= 2 && z <= 4 ?
|
|
8264
|
+
G + z <= -1 || d <= G + z || (O >= 0 && O <= 6 && (z === 0 || z === 6) || z >= 0 && z <= 6 && (O === 0 || O === 6) || O >= 2 && O <= 4 && z >= 2 && z <= 4 ? J.set(Y + O, G + z, !0, !0) : J.set(Y + O, G + z, !1, !0));
|
|
8265
8265
|
}
|
|
8266
8266
|
}
|
|
8267
|
-
function a(
|
|
8268
|
-
const P =
|
|
8267
|
+
function a(J) {
|
|
8268
|
+
const P = J.size;
|
|
8269
8269
|
for (let d = 8; d < P - 8; d++) {
|
|
8270
8270
|
const T = d % 2 === 0;
|
|
8271
|
-
|
|
8271
|
+
J.set(d, 6, T, !0), J.set(6, d, T, !0);
|
|
8272
8272
|
}
|
|
8273
8273
|
}
|
|
8274
|
-
function r(
|
|
8274
|
+
function r(J, P) {
|
|
8275
8275
|
const d = Q.getPositions(P);
|
|
8276
8276
|
for (let T = 0; T < d.length; T++) {
|
|
8277
8277
|
const X = d[T][0], Y = d[T][1];
|
|
8278
8278
|
for (let G = -2; G <= 2; G++)
|
|
8279
8279
|
for (let O = -2; O <= 2; O++)
|
|
8280
|
-
G === -2 || G === 2 || O === -2 || O === 2 || G === 0 && O === 0 ?
|
|
8280
|
+
G === -2 || G === 2 || O === -2 || O === 2 || G === 0 && O === 0 ? J.set(X + G, Y + O, !0, !0) : J.set(X + G, Y + O, !1, !0);
|
|
8281
8281
|
}
|
|
8282
8282
|
}
|
|
8283
|
-
function v(
|
|
8284
|
-
const d =
|
|
8283
|
+
function v(J, P) {
|
|
8284
|
+
const d = J.size, T = c.getEncodedBits(P);
|
|
8285
8285
|
let X, Y, G;
|
|
8286
8286
|
for (let O = 0; O < 18; O++)
|
|
8287
|
-
X = Math.floor(O / 3), Y = O % 3 + d - 8 - 3, G = (T >> O & 1) === 1,
|
|
8287
|
+
X = Math.floor(O / 3), Y = O % 3 + d - 8 - 3, G = (T >> O & 1) === 1, J.set(X, Y, G, !0), J.set(Y, X, G, !0);
|
|
8288
8288
|
}
|
|
8289
|
-
function H(
|
|
8290
|
-
const T =
|
|
8289
|
+
function H(J, P, d) {
|
|
8290
|
+
const T = J.size, X = h.getEncodedBits(P, d);
|
|
8291
8291
|
let Y, G;
|
|
8292
8292
|
for (Y = 0; Y < 15; Y++)
|
|
8293
|
-
G = (X >> Y & 1) === 1, Y < 6 ?
|
|
8294
|
-
|
|
8293
|
+
G = (X >> Y & 1) === 1, Y < 6 ? J.set(Y, 8, G, !0) : Y < 8 ? J.set(Y + 1, 8, G, !0) : J.set(T - 15 + Y, 8, G, !0), Y < 8 ? J.set(8, T - Y - 1, G, !0) : Y < 9 ? J.set(8, 15 - Y - 1 + 1, G, !0) : J.set(8, 15 - Y - 1, G, !0);
|
|
8294
|
+
J.set(T - 8, 8, 1, !0);
|
|
8295
8295
|
}
|
|
8296
|
-
function q(
|
|
8297
|
-
const d =
|
|
8296
|
+
function q(J, P) {
|
|
8297
|
+
const d = J.size;
|
|
8298
8298
|
let T = -1, X = d - 1, Y = 7, G = 0;
|
|
8299
8299
|
for (let O = d - 1; O > 0; O -= 2)
|
|
8300
8300
|
for (O === 6 && O--; ; ) {
|
|
8301
8301
|
for (let z = 0; z < 2; z++)
|
|
8302
|
-
if (!
|
|
8302
|
+
if (!J.isReserved(X, O - z)) {
|
|
8303
8303
|
let b = !1;
|
|
8304
|
-
G < P.length && (b = (P[G] >>> Y & 1) === 1),
|
|
8304
|
+
G < P.length && (b = (P[G] >>> Y & 1) === 1), J.set(X, O - z, b), Y--, Y === -1 && (G++, Y = 7);
|
|
8305
8305
|
}
|
|
8306
8306
|
if (X += T, X < 0 || d <= X) {
|
|
8307
8307
|
X -= T, T = -T;
|
|
@@ -8309,25 +8309,25 @@ function Ac() {
|
|
|
8309
8309
|
}
|
|
8310
8310
|
}
|
|
8311
8311
|
}
|
|
8312
|
-
function m(
|
|
8312
|
+
function m(J, P, d) {
|
|
8313
8313
|
const T = new B();
|
|
8314
8314
|
d.forEach(function(z) {
|
|
8315
|
-
T.put(z.mode.bit, 4), T.put(z.getLength(), w.getCharCountIndicator(z.mode,
|
|
8315
|
+
T.put(z.mode.bit, 4), T.put(z.getLength(), w.getCharCountIndicator(z.mode, J)), z.write(T);
|
|
8316
8316
|
});
|
|
8317
|
-
const X = g.getSymbolTotalCodewords(
|
|
8317
|
+
const X = g.getSymbolTotalCodewords(J), Y = n.getTotalCodewordsCount(J, P), G = (X - Y) * 8;
|
|
8318
8318
|
for (T.getLengthInBits() + 4 <= G && T.put(0, 4); T.getLengthInBits() % 8 !== 0; )
|
|
8319
8319
|
T.putBit(0);
|
|
8320
8320
|
const O = (G - T.getLengthInBits()) / 8;
|
|
8321
8321
|
for (let z = 0; z < O; z++)
|
|
8322
8322
|
T.put(z % 2 ? 17 : 236, 8);
|
|
8323
|
-
return M(T,
|
|
8323
|
+
return M(T, J, P);
|
|
8324
8324
|
}
|
|
8325
|
-
function M(
|
|
8325
|
+
function M(J, P, d) {
|
|
8326
8326
|
const T = g.getSymbolTotalCodewords(P), X = n.getTotalCodewordsCount(P, d), Y = T - X, G = n.getBlocksCount(P, d), O = T % G, z = G - O, b = Math.floor(T / G), BA = Math.floor(Y / G), uA = BA + 1, s = b - BA, e = new t(s);
|
|
8327
8327
|
let u = 0;
|
|
8328
8328
|
const f = new Array(G), R = new Array(G);
|
|
8329
8329
|
let x = 0;
|
|
8330
|
-
const L = new Uint8Array(
|
|
8330
|
+
const L = new Uint8Array(J.buffer);
|
|
8331
8331
|
for (let QA = 0; QA < G; QA++) {
|
|
8332
8332
|
const aA = QA < z ? BA : uA;
|
|
8333
8333
|
f[QA] = L.slice(u, u + aA), R[QA] = e.encode(f[QA]), u += aA, x = Math.max(x, aA);
|
|
@@ -8342,17 +8342,17 @@ function Ac() {
|
|
|
8342
8342
|
S[j++] = R[W][y];
|
|
8343
8343
|
return S;
|
|
8344
8344
|
}
|
|
8345
|
-
function J
|
|
8345
|
+
function l(J, P, d, T) {
|
|
8346
8346
|
let X;
|
|
8347
|
-
if (Array.isArray(
|
|
8348
|
-
X = o.fromArray(
|
|
8349
|
-
else if (typeof
|
|
8347
|
+
if (Array.isArray(J))
|
|
8348
|
+
X = o.fromArray(J);
|
|
8349
|
+
else if (typeof J == "string") {
|
|
8350
8350
|
let b = P;
|
|
8351
8351
|
if (!b) {
|
|
8352
|
-
const BA = o.rawSplit(
|
|
8352
|
+
const BA = o.rawSplit(J);
|
|
8353
8353
|
b = c.getBestVersionForData(BA, d);
|
|
8354
8354
|
}
|
|
8355
|
-
X = o.fromString(
|
|
8355
|
+
X = o.fromString(J, b || 40);
|
|
8356
8356
|
} else
|
|
8357
8357
|
throw new Error("Invalid data");
|
|
8358
8358
|
const Y = c.getBestVersionForData(X, d);
|
|
@@ -8383,7 +8383,7 @@ Minimum version required to store current data is: ` + Y + `.
|
|
|
8383
8383
|
if (typeof P == "undefined" || P === "")
|
|
8384
8384
|
throw new Error("No input text");
|
|
8385
8385
|
let T = A.M, X, Y;
|
|
8386
|
-
return typeof d != "undefined" && (T = A.from(d.errorCorrectionLevel, A.M), X = c.from(d.version), Y = E.from(d.maskPattern), d.toSJISFunc && g.setToSJISFunction(d.toSJISFunc)),
|
|
8386
|
+
return typeof d != "undefined" && (T = A.from(d.errorCorrectionLevel, A.M), X = c.from(d.version), Y = E.from(d.maskPattern), d.toSJISFunc && g.setToSJISFunction(d.toSJISFunc)), l(P, X, T, Y);
|
|
8387
8387
|
}, LC;
|
|
8388
8388
|
}
|
|
8389
8389
|
var IB = {}, EB = {}, XI;
|
|
@@ -8630,14 +8630,14 @@ function Ic({
|
|
|
8630
8630
|
].join(" ");
|
|
8631
8631
|
const M = document.createElement("div");
|
|
8632
8632
|
M.className = "wgt:w-full wgt:flex wgt:flex-col wgt:gap-4";
|
|
8633
|
-
const
|
|
8634
|
-
|
|
8635
|
-
const
|
|
8636
|
-
|
|
8633
|
+
const l = document.createElement("h2");
|
|
8634
|
+
l.className = "wgt:text-xl wgt:font-semibold wgt:leading-6 wgt:text-black", l.innerText = D("orderInfo"), M.appendChild(l);
|
|
8635
|
+
const J = document.createElement("div");
|
|
8636
|
+
J.className = "wgt:w-full wgt:flex wgt:items-center wgt:justify-between";
|
|
8637
8637
|
const P = document.createElement("h4");
|
|
8638
8638
|
P.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", P.innerText = D("provider");
|
|
8639
8639
|
const d = document.createElement("img");
|
|
8640
|
-
g && g.logoUrl && (d.src = g.logoUrl, d.alt = g.name, d.className = "wgt:h-6 wgt:object-contain"),
|
|
8640
|
+
g && g.logoUrl && (d.src = g.logoUrl, d.alt = g.name, d.className = "wgt:h-6 wgt:object-contain"), J.appendChild(P), J.appendChild(d), M.appendChild(J);
|
|
8641
8641
|
const T = document.createElement("div");
|
|
8642
8642
|
T.className = "wgt:w-full wgt:flex wgt:items-center wgt:justify-between";
|
|
8643
8643
|
const X = document.createElement("h4");
|
|
@@ -8726,22 +8726,24 @@ function Ec(E) {
|
|
|
8726
8726
|
instructions: q
|
|
8727
8727
|
}));
|
|
8728
8728
|
v.appendChild(m), r.appendChild(v);
|
|
8729
|
-
const { container:
|
|
8729
|
+
const { container: l, cleanup: J } = Ic(XA(cA({}, Q), {
|
|
8730
8730
|
qrData: null,
|
|
8731
8731
|
qrSrc: "",
|
|
8732
8732
|
theme: I,
|
|
8733
8733
|
onResetToStep1: () => {
|
|
8734
|
-
|
|
8734
|
+
J && J(), Q != null && Q.onResetToStep1 && Q.onResetToStep1(), clearInterval(c);
|
|
8735
8735
|
}
|
|
8736
8736
|
}));
|
|
8737
|
-
r.appendChild(
|
|
8737
|
+
r.appendChild(l), h.appendChild(r);
|
|
8738
8738
|
const P = document.createElement("div");
|
|
8739
8739
|
P.className = "wgt:flex wgt:items-center wgt:justify-between wgt:gap-2";
|
|
8740
8740
|
const d = fg({
|
|
8741
8741
|
type: "button",
|
|
8742
8742
|
title: D("back"),
|
|
8743
8743
|
className: "wgt:bg-transparent wgt:!text-primary wgt:hover:bg-transparent wgt:underline",
|
|
8744
|
-
handleClick:
|
|
8744
|
+
handleClick: () => {
|
|
8745
|
+
A && A(), c && clearInterval(c), J && J();
|
|
8746
|
+
}
|
|
8745
8747
|
});
|
|
8746
8748
|
P.appendChild(d), h.appendChild(P);
|
|
8747
8749
|
function T() {
|
|
@@ -8777,7 +8779,7 @@ function Ec(E) {
|
|
|
8777
8779
|
),
|
|
8778
8780
|
{
|
|
8779
8781
|
onClose: () => {
|
|
8780
|
-
A();
|
|
8782
|
+
A(), c && clearInterval(c), J && J();
|
|
8781
8783
|
}
|
|
8782
8784
|
}
|
|
8783
8785
|
);
|
|
@@ -8793,7 +8795,7 @@ function Ec(E) {
|
|
|
8793
8795
|
const Y = yield Rh(Q.orderId);
|
|
8794
8796
|
if (Y.paymentStatus === "pending")
|
|
8795
8797
|
return;
|
|
8796
|
-
clearInterval(c), c = null,
|
|
8798
|
+
clearInterval(c), c = null, J && J();
|
|
8797
8799
|
const G = Y.paymentStatus === "paid" ? D("paymentSuccess") : D("paymentFailed"), O = Rg({
|
|
8798
8800
|
message: G,
|
|
8799
8801
|
okLabel: "OK",
|
|
@@ -8804,7 +8806,7 @@ function Ec(E) {
|
|
|
8804
8806
|
});
|
|
8805
8807
|
h.appendChild(O.container), O.open();
|
|
8806
8808
|
} catch (Y) {
|
|
8807
|
-
clearInterval(c), c = null,
|
|
8809
|
+
clearInterval(c), c = null, J && J(), console.error("Error fetching order status:", Y), iB(
|
|
8808
8810
|
`${D(
|
|
8809
8811
|
"errorOrderStatus",
|
|
8810
8812
|
"Không thể kiểm tra trạng thái thanh toán đơn hàng. Vui lòng thử lại."
|
|
@@ -8821,7 +8823,7 @@ function Ec(E) {
|
|
|
8821
8823
|
}), 5e3);
|
|
8822
8824
|
}
|
|
8823
8825
|
return n && X(), window.addEventListener("beforeunload", function() {
|
|
8824
|
-
c && clearInterval(c),
|
|
8826
|
+
c && clearInterval(c), J && J();
|
|
8825
8827
|
}), { container: h };
|
|
8826
8828
|
});
|
|
8827
8829
|
}
|
|
@@ -8882,10 +8884,10 @@ function nc({
|
|
|
8882
8884
|
/>
|
|
8883
8885
|
</svg>
|
|
8884
8886
|
`, q.appendChild(m);
|
|
8885
|
-
const M = bE(Q, C, E),
|
|
8886
|
-
|
|
8887
|
-
const
|
|
8888
|
-
|
|
8887
|
+
const M = bE(Q, C, E), l = document.createElement("span");
|
|
8888
|
+
l.innerHTML = `${D("hotlineDomestic")} <b>${(M == null ? void 0 : M.hotline) || ""}</b> ${D("hotlineDesc")} `, q.appendChild(l);
|
|
8889
|
+
const J = document.createElement("div");
|
|
8890
|
+
J.className = "wgt:flex wgt:items-center wgt:gap-2 wgt:text-sm wgt:text-strong-950", H.appendChild(J);
|
|
8889
8891
|
const P = document.createElement("div");
|
|
8890
8892
|
P.innerHTML = `
|
|
8891
8893
|
<svg
|
|
@@ -8903,9 +8905,9 @@ function nc({
|
|
|
8903
8905
|
stroke-linejoin="round"
|
|
8904
8906
|
/>
|
|
8905
8907
|
</svg>
|
|
8906
|
-
`,
|
|
8908
|
+
`, J.appendChild(P);
|
|
8907
8909
|
const d = document.createElement("span");
|
|
8908
|
-
d.innerHTML = `${D("email")}: <b>${(M == null ? void 0 : M.email) || ""}</b>`,
|
|
8910
|
+
d.innerHTML = `${D("email")}: <b>${(M == null ? void 0 : M.email) || ""}</b>`, J.appendChild(d);
|
|
8909
8911
|
const T = document.createElement("div");
|
|
8910
8912
|
T.className = "wgt:flex wgt:items-center wgt:gap-2 wgt:text-sm wgt:text-strong-950", H.appendChild(T);
|
|
8911
8913
|
const X = document.createElement("div");
|
|
@@ -9099,8 +9101,8 @@ function Oc(g, A, B, C, Q, I) {
|
|
|
9099
9101
|
idCard: null,
|
|
9100
9102
|
idCardBack: null,
|
|
9101
9103
|
packages: []
|
|
9102
|
-
}, v = null, H = null, q = null, m = null, M = 0,
|
|
9103
|
-
function
|
|
9104
|
+
}, v = null, H = null, q = null, m = null, M = 0, l = null;
|
|
9105
|
+
function J() {
|
|
9104
9106
|
a = n[0], r = {
|
|
9105
9107
|
eInvoiceRegistration: {
|
|
9106
9108
|
taxAuthorityCode: "",
|
|
@@ -9141,7 +9143,7 @@ function Oc(g, A, B, C, Q, I) {
|
|
|
9141
9143
|
}, v = null, H = null, q = null, m = null, M = 0;
|
|
9142
9144
|
}
|
|
9143
9145
|
function P() {
|
|
9144
|
-
|
|
9146
|
+
J(), i = 1, w(i, t()), T(i);
|
|
9145
9147
|
}
|
|
9146
9148
|
function d() {
|
|
9147
9149
|
return K(this, null, function* () {
|
|
@@ -9167,9 +9169,9 @@ function Oc(g, A, B, C, Q, I) {
|
|
|
9167
9169
|
theme: Q || "default",
|
|
9168
9170
|
onShowPolicy: B || (() => {
|
|
9169
9171
|
}),
|
|
9170
|
-
selectedTaxAuthority:
|
|
9172
|
+
selectedTaxAuthority: l,
|
|
9171
9173
|
setSelectedTaxAuthority: (z) => {
|
|
9172
|
-
|
|
9174
|
+
l = z;
|
|
9173
9175
|
}
|
|
9174
9176
|
}
|
|
9175
9177
|
});
|