@miden-npm/vue 0.0.13 → 0.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),$0=Symbol("MidenPGConfig");function fr(o){if(!(o!=null&&o.publishableKey))throw new Error("[@miden-npm/vue] publishableKey is required");return{install(e){e.provide($0,o)}}}function pr(){const o=a.inject($0);if(!o)throw new Error("[@miden-npm/vue] Missing provider. Did you forget to app.use(createMidenPG(...))?");return o}const ze=o=>o==null||typeof o!="object"?!1:Object.values(o).every(Boolean),Ht=o=>{const e={};return new URL(o).searchParams.forEach((r,n)=>{e[n]=r}),e},ge=o=>o==="sandbox"?"https://sandbox-api.midencards.io/payment-gateway-api":"",vr=o=>o==="USD"?"$":o==="NGN"?"₦":o==="EUR"?"€":o==="GBP"?"£":o==="JPY"||o==="CNY"?"¥":o==="USDC"||o==="usdc"?"$⧫":o==="USDT"||o==="usdt"?"₮":"$",Se=(o,e)=>{const t=typeof o=="string"?parseFloat(o):o;return isNaN(t)?"0":`${e?vr(e):""} ${t==null?void 0:t.toLocaleString("en-US")}`},mr=(o,e)=>o.length<=e?o:o.slice(0,e)+"...",Cr=o=>{const e=["Backspace","Tab","ArrowLeft","ArrowRight","Delete","Home","End","."];(o.ctrlKey||o.metaKey)&&["a","c","v","x"].includes(o.key.toLowerCase())||(!e.includes(o.key)&&!/^\d$/.test(o.key)&&o.preventDefault(),o.key==="."&&o.target.value.includes(".")&&o.preventDefault())},xe=(o,e)=>e.test(o);function gr(o){return o?o.split("|").map(e=>{const[t,r]=e.split(":");return{rule:t,value:r}}):[]}function Br(o,e,t){const r=[],n=gr(o),s=(t||"This field").toLowerCase(),u=e??"",l=Number(u),f=!Number.isNaN(l);for(const i of n)switch(i.rule){case"required":u||r.push(`The ${s} field is required`);break;case"alpha":xe(u,/^[a-zA-Z]+$/)||r.push(`The ${s} field must only contain alphabetic characters`);break;case"at_least_one_uppercase":xe(u,/.*[A-Z].*/)||r.push(`The ${s} field must contain at least one uppercase character`);break;case"at_least_one_lowercase":xe(u,/.*[a-z].*/)||r.push(`The ${s} field must contain at least one lowercase character`);break;case"at_least_one_number":xe(u,/.*\d.*/)||r.push(`The ${s} field must contain at least one number`);break;case"alpha_num":xe(u,/^[a-z0-9]+$/i)||r.push(`The ${s} field must only contain alphabetic characters and numbers`);break;case"num_spaces":xe(u,/^[0-9\s]+$/i)||r.push(`The ${s} field must only contain space and numbers`);break;case"alpha_spaces":xe(u,/^[A-Za-z\s]*$/)||r.push(`The ${s} field must only contain alphabetic characters and spaces`);break;case"numeric":xe(u,/^\d+$/)||r.push(`The ${s} field must only contain numbers`);break;case"no_special":xe(u,/[^a-zA-Z0-9\s]/)&&r.push(`The ${s} field must not contain special characters`);break;case"at_least_one_special":xe(u,/[^a-zA-Z0-9\s]/)||r.push(`The ${s} field must contain at least one special character`);break;case"email":xe(u,/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,})+$/)||r.push("Please enter a valid email address");break;case"is":i.value!==u&&r.push(`Value entered must be ${i.value}`);break;case"is_not":i.value===u&&r.push(`Value entered must not be ${i.value}`);break;case"char_length":u.length!==Number(i.value)&&r.push(`The ${s} field must be ${i.value} characters long`);break;case"min_char_length":u.length<Number(i.value)&&r.push(`The ${s} field must not be less than ${i.value} characters long`);break;case"max_char_length":u.length>Number(i.value)&&r.push(`The ${s} field must not be greater than ${i.value} characters long`);break;case"age":(!f||l!==Number(i.value))&&r.push(`Age entered must be ${i.value}`);break;case"min_age":(!f||l<Number(i.value))&&r.push(`Age entered must not be less than ${i.value}`);break;case"max_age":(!f||l>Number(i.value))&&r.push(`Age entered must not be greater than ${i.value}`);break;case"num_is":(!f||l!==Number(i.value))&&r.push(`Number entered must be ${i.value}`);break;case"num_is_not":f&&l===Number(i.value)&&r.push(`Number entered must not be ${i.value}`);break;case"min_number":(!f||l<Number(i.value))&&r.push(`Number entered must not be less than ${i.value}`);break;case"max_number":(!f||l>Number(i.value))&&r.push(`Number entered must not be greater than ${i.value}`);break}return r.length>0?r[0]:null}const je=(o,e,t)=>{const r={};for(const[n,s]of Object.entries(e)){if(!s)continue;const u=(t==null?void 0:t[n])??n,l=Br(s,o[n]??"",u);l&&(r[n]=l)}return r};var L0=(o=>(o[o.Visa=1]="Visa",o[o.MasterCard=2]="MasterCard",o[o.Verve=3]="Verve",o[o.MastercardAndVisa=4]="MastercardAndVisa",o[o.AmericanExpress=5]="AmericanExpress",o[o.Discover=6]="Discover",o[o.JCB=7]="JCB",o[o.DinersClub=8]="DinersClub",o[o.Maestro=9]="Maestro",o[o.UnionPay=10]="UnionPay",o[o.UnionPay3DS=11]="UnionPay3DS",o[o.UnionPayNon3DS=12]="UnionPayNon3DS",o[o.UATP=13]="UATP",o[o.PayPak=14]="PayPak",o[o.Jaywan=15]="Jaywan",o[o.Mada=16]="Mada",o[o.MadaVisa=17]="MadaVisa",o[o.MadaMastercard=18]="MadaMastercard",o[o.Unknown=19]="Unknown",o))(L0||{});const e0=/^4\d{12}(\d{3}){0,2}$/,t0=/^(?:5[1-5]\d{14}|2(?:2(?:2[1-9]|[3-9]\d)|[3-6]\d{2}|7(?:[01]\d|20))\d{12})(?:\d{0,3})?$/,_r=/^(34|37)\d{13}$/,Er=/^(?:6011|65|64[4-9]|622(?:12[6-9]|1[3-9]\d|[2-8]\d{2}|9(?:0\d|1\d|2[0-5])))\d{12,15}$/,yr=/^(?:35(?:2[8-9]|[3-8]\d))\d{12,15}$/,kr=/^(?:3(?:0[0-5]\d|095|6\d|[89]\d))\d{11,13}$/,Ar=/^(?:50|5[6-9]|6[0-9])\d{10,17}$/,et=/^62\d{14,17}$/,br=/^1\d{14}$/,Fr=[[506099,506198],[650002,650027]],Dr=new Set([507865,507866]),wr=new Set([220545,220543]),Sr=new Set([6690109]),Vr=new Set([968209,873646]),Nr=new Set([422818,486094]),Rr=new Set([529741,543357]),Ir=new Set([620108]),Tr=new Set([621423]);function Mr(o){const e=Pr(o);return L0[e]}function Pr(o){if(!o||!o.trim())return 19;const e=o.replace(/\D/g,"");if(e.length<12||e.length>19)return 19;if(e.length>=6){const t=parseInt(e.slice(0,6),10);if(Vr.has(t)&&e.length>=16&&e.length<=19)return 16;if(Nr.has(t)&&e0.test(e))return 17;if(Rr.has(t)&&t0.test(e))return 18;if(wr.has(t)&&e.length===16)return 14;if(Ir.has(t)&&et.test(e))return 11;if(Tr.has(t)&&et.test(e))return 12;if(Or(t,e.length))return 3}if(e.length>=7){const t=parseInt(e.slice(0,7),10);if(Sr.has(t)&&e.length===16)return 15}return br.test(e)?13:_r.test(e)?5:Er.test(e)?6:yr.test(e)?7:kr.test(e)?8:t0.test(e)?2:e0.test(e)?1:et.test(e)?10:Ar.test(e)?9:19}function Or(o,e){return e<16||e>19?!1:Fr.some(([r,n])=>o>=r&&o<=n)||Dr.has(o)}const Hr=["width","height"],$r=["stroke"],Lr=["fill"],z0=a.defineComponent({__name:"icon-loader",props:{size:{default:24},color:{default:"currentColor"},className:{default:""}},setup(o){const e=o,t=a.useAttrs(),{size:r,color:n,className:s}=e;return(u,l)=>(a.openBlock(),a.createElementBlock("svg",a.mergeProps({class:["animate-spin",a.unref(s)],xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",width:a.unref(r),height:a.unref(r),role:"img","aria-label":"loading"},a.unref(t)),[a.createElementVNode("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:a.unref(n),"stroke-width":"4"},null,8,$r),a.createElementVNode("path",{class:"opacity-75",fill:a.unref(n),d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"},null,8,Lr)],16,Hr))}}),zr=["disabled"],Ur={key:1},Ve=a.defineComponent({__name:"button",props:{label:{default:""},type:{default:"neutral"},size:{default:"de"},paddingClassX:{default:"px-8"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},customClass:{default:""}},emits:["click"],setup(o,{emit:e}){const t=o,r=e,n=a.computed(()=>t.disabled||t.loading);function s(){n.value||r("click")}function u(i,c){if(c)return"bg-gray-200 text-gray-400 cursor-not-allowed border-gray-200";switch(i){case"primary":return"bg-primary text-white hover:bg-primary-black hover:border-primary-black border-primary";case"secondary":return"bg-gray-200 border-gray-200 hover:bg-gray-300 text-heading-text";case"danger":return"bg-red-500 border-red-500 text-white hover:bg-red-600";case"neutral":default:return"bg-off-white border-grey-border hover:bg-gray-100"}}function l(i){switch(i){case"de":return"h-68px rounded-xl";case"md":return"h-42px rounded-lg";case"sm":return"h-32px rounded-md";default:return"h-68px rounded-xl"}}function f(i){switch(i){case"de":case"md":case"sm":return"text-body-2xs font-normal";default:return"text-body-xs font-normal"}}return(i,c)=>(a.openBlock(),a.createElementBlock("button",{class:a.normalizeClass(["flex items-center justify-center gap-2 py-3 border font-normal text-input-grey transition-colors duration-300 ease-in-out",u(i.type,n.value),l(i.size),i.paddingClassX,i.customClass]),type:"button",disabled:n.value,onClick:s},[a.renderSlot(i.$slots,"prefix"),i.loading?(a.openBlock(),a.createBlock(z0,{key:0})):(a.openBlock(),a.createElementBlock("div",Ur,[i.label?(a.openBlock(),a.createElementBlock("p",{key:0,class:a.normalizeClass(["mb-0",f(i.size)])},a.toDisplayString(i.label),3)):a.renderSlot(i.$slots,"default",{key:1})])),a.renderSlot(i.$slots,"suffix")],10,zr))}}),qr={class:"mb-0 text-body-3xs font-normal text-red-500"},U0=a.defineComponent({__name:"input-error",props:{errorMessage:{}},setup(o){return(e,t)=>(a.openBlock(),a.createElementBlock("p",qr,a.toDisplayString(e.errorMessage),1))}});async function Ue(o,e,t){try{const r=ge(e);return await(await fetch(`${r}/api/v1/checkout/generate-payment-link2`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",merchantId:t},body:JSON.stringify({...o,LinkName:`${Date.now()}-Link`})})).json()}catch{}}async function jr(o,{merchantId:e,...t}){try{const r=ge(o);return await(await fetch(`${r}/api/v1/checkout/authorize-card-3ds-payment-sdk`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",merchantId:e},body:JSON.stringify(t)})).json()}catch{}}async function Kr(o,{merchantId:e,...t}){try{const r=ge(o);return await(await fetch(`${r}/api/v1/checkout/generate-payment-account`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",merchantId:e},body:JSON.stringify(t)})).json()}catch{}}async function q0(o,e){try{const t=ge(o);return await(await fetch(`${t}/api/v1/checkout/details/${e}`,{method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json"}})).json()}catch{}}async function Wr(o,{merchantId:e,...t}){try{const r=ge(o);return await(await fetch(`${r}/api/v1/checkout/generate-payment-walletaddress`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",merchantId:e},body:JSON.stringify(t)})).json()}catch{}}const Gr={key:0,class:"absolute inset-0 grid place-items-center bg-white/60"},j0=a.defineComponent({__name:"checkout-iframe",props:{style:{default:()=>({width:"100%",height:"100vh",border:"0",borderRadius:"6px",overflow:"hidden"})},url:{default:void 0},secretKey:{},environment:{default:"sandbox"},paymentObject:{default:()=>({amount:0,currency:"",email:"",phoneNumber:"",narration:"",redirectUrl:"https://sandbox-merchant.buzapay.com/account/three-ds-status"})}},setup(o){const e=o,t=a.computed(()=>({...e.style})),r=a.ref(null),n=a.ref(null),s=a.ref(""),u=a.ref(!1);function l(){n.value&&n.value.parentNode&&n.value.parentNode.removeChild(n.value),n.value=null}function f(c){var m;l();const g=document.createElement("iframe");g.src=c;const d=e.style;d.width&&(g.style.width=d.width),d.height&&(g.style.height=d.height),d.border&&(g.style.border=d.border),d.borderRadius&&(g.style.borderRadius=d.borderRadius),d.overflow&&(g.style.overflow=d.overflow),(m=r.value)==null||m.appendChild(g),n.value=g}async function i(){if(e.url){f(e.url);return}if(!e.secretKey){s.value="Secret key is required.";return}if(!ze(e.paymentObject)){s.value="Kindly ensure you are passing all the required data.";return}u.value=!0,s.value="";try{const c=await Ue(e.paymentObject,e.environment,e.secretKey);c!=null&&c.isSuccessful&&c.launchUrl?(s.value="Payment link created successfully",f(`${c.launchUrl}&merchantId=${btoa(e.secretKey)}`)):s.value="Failed to create payment link"}catch(c){s.value=(c==null?void 0:c.message)||"Failed to create payment link"}finally{u.value=!1}}return a.onMounted(()=>{r.value&&i()}),a.watch(()=>e.url,c=>{c&&f(c)}),a.onBeforeUnmount(()=>{l()}),(c,g)=>(a.openBlock(),a.createElementBlock("div",{class:"relative",style:a.normalizeStyle(t.value)},[a.createElementVNode("div",{ref_key:"containerRef",ref:r,class:"w-full h-full"},null,512),u.value?(a.openBlock(),a.createElementBlock("div",Gr,[a.createVNode(z0)])):a.createCommentVNode("",!0)],4))}}),Zr={key:1},Xr=a.defineComponent({__name:"checkout-button",props:{secretKey:{},environment:{default:"sandbox"},paymentObject:{default:()=>({amount:0,currency:"",email:"",phoneNumber:"",narration:"",redirectUrl:"https://sandbox-merchant.buzapay.com/account/three-ds-status"})},mode:{default:"redirect"}},setup(o){const e=o,t=a.ref(""),r=a.ref(""),n=a.ref(""),s=a.ref(!1);async function u(){if(!e.secretKey){t.value="Secret key is required.";return}if(!ze(e.paymentObject)){t.value="Kindly ensure you are passing all the required data.";return}s.value=!0,t.value="";try{const c=await Ue(e.paymentObject,e.environment,e.secretKey);c!=null&&c.isSuccessful&&c.launchUrl?(r.value=c.launchUrl,n.value=`${c.launchUrl}&merchantId=${btoa(e.secretKey)}`,t.value="Payment link created successfully",e.mode==="redirect"&&window.open(c.launchUrl,"_blank","noopener,noreferrer")):t.value="Failed to create payment link"}catch(c){t.value=(c==null?void 0:c.message)||"Failed to create payment link"}finally{s.value=!1}}const{secretKey:l,environment:f,mode:i}=e;return(c,g)=>n.value&&a.unref(i)==="iframe"?(a.openBlock(),a.createBlock(j0,{key:0,url:n.value,secretKey:a.unref(l),environment:a.unref(f)},null,8,["url","secretKey","environment"])):(a.openBlock(),a.createElementBlock("div",Zr,[a.createVNode(Ve,{label:"Pay",type:"primary",customClass:"w-full",loading:s.value,onClick:u},null,8,["loading"]),a.createVNode(U0,{errorMessage:t.value},null,8,["errorMessage"])]))}}),Yr=["width","height"],Qr=["fill"],Jr=a.defineComponent({__name:"icon-chevron-left",props:{width:{default:17},height:{default:17},color:{default:"currentColor"}},setup(o){const e=o,t=a.useAttrs(),{width:r,height:n,color:s}=e;return(u,l)=>(a.openBlock(),a.createElementBlock("svg",a.mergeProps({width:a.unref(r),height:a.unref(n),viewBox:"0 0 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.unref(t)),[a.createElementVNode("path",{d:"M10.5 14.28C10.3734 14.28 10.2467 14.2333 10.1467 14.1333L5.80002 9.78668C5.09335 9.08001 5.09335 7.92001 5.80002 7.21335L10.1467 2.86668C10.34 2.67335 10.66 2.67335 10.8534 2.86668C11.0467 3.06001 11.0467 3.38001 10.8534 3.57335L6.50669 7.92001C6.18669 8.24001 6.18669 8.76001 6.50669 9.08001L10.8534 13.4267C11.0467 13.62 11.0467 13.94 10.8534 14.1333C10.7534 14.2267 10.6267 14.28 10.5 14.28Z",fill:a.unref(s)},null,8,Qr)],16,Yr))}}),ea=a.defineComponent({__name:"back",emits:["back"],setup(o,{emit:e}){return(t,r)=>(a.openBlock(),a.createElementBlock("div",{class:"flex items-center gap-2 cursor-pointer",onClick:r[0]||(r[0]=n=>t.$emit("back"))},[a.createVNode(Jr),r[1]||(r[1]=a.createElementVNode("p",{class:"mb-0 text-body-xs font-normal"},"Back",-1))]))}}),ta=["width","height"],ra=["fill"],aa=a.defineComponent({__name:"icon-buzapay-icon",props:{width:{default:15},height:{default:13},color:{default:"currentColor"}},setup(o){const e=o,t=a.useAttrs(),{width:r,height:n,color:s}=e;return(u,l)=>(a.openBlock(),a.createElementBlock("svg",a.mergeProps({width:a.unref(r),height:a.unref(n),viewBox:"0 0 15 13",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.unref(t)),[a.createElementVNode("path",{d:"M9.97919 0.5C10.8854 0.5 11.6276 0.585938 12.2057 0.757812C12.7891 0.924479 13.2188 1.22396 13.4948 1.65625C13.7761 2.08333 13.9167 2.6901 13.9167 3.47656C13.9167 4.1849 13.7526 4.77083 13.4245 5.23438C13.0964 5.69792 12.5938 5.95312 11.9167 6C12.8021 6.08854 13.4401 6.40625 13.8307 6.95312C14.2214 7.49479 14.4167 8.17708 14.4167 9C14.4167 9.71354 14.3334 10.2995 14.1667 10.7578C14.0052 11.2161 13.7318 11.5729 13.3464 11.8281C12.961 12.0781 12.4375 12.2526 11.7761 12.3516C11.1198 12.4505 10.2995 12.5 9.31512 12.5H0.416687V0.5H9.97919ZM2.91669 7.77344H5.97235V11.167L10.2497 5.22754H7.19501V1.83398L2.91669 7.77344ZM5.97235 6.07617H8.2702L7.19501 7.57324V6.9248H4.89716L5.97235 5.42676V6.07617Z",fill:a.unref(s)},null,8,ra)],16,ta))}}),na={class:"checkout-card w-full h-screen flex flex-col items-center justify-center text-white"},sa={class:"flex w-1/2"},ia={class:"flex gap-2 w-full"},oa={class:"flex flex-col gap-8 w-full"},la={class:"bg-off-white rounded-xl"},ua={class:"flex items-center gap-2 justify-center"},ca=a.defineComponent({__name:"card",props:{showBackButton:{type:Boolean,default:!1}},emits:["back","close"],setup(o,{emit:e}){const t=e;return(r,n)=>(a.openBlock(),a.createElementBlock("div",na,[a.createElementVNode("div",sa,[r.showBackButton?(a.openBlock(),a.createBlock(ea,{key:0,onBack:n[0]||(n[0]=s=>t("back"))})):a.createCommentVNode("",!0),a.createElementVNode("div",ia,[a.createElementVNode("div",oa,[a.createElementVNode("div",la,[a.renderSlot(r.$slots,"default")]),a.createElementVNode("div",ua,[n[2]||(n[2]=a.createElementVNode("p",{class:"text-light-white-100 text-body-2xs font-regular"}," Powered by Buzapay ",-1)),a.createVNode(aa,{color:"#E8F4FF"})])]),a.createElementVNode("div",{class:"close-icon flex flex-col items-center justify-center self-start cursor-pointer hover:bg-gray-500",onClick:n[1]||(n[1]=s=>t("close")),role:"button","aria-label":"Close"},[...n[3]||(n[3]=[a.createElementVNode("p",{class:"text-white"},"x",-1)])])])])]))}}),da=["aria-orientation"],xa=["aria-checked","onClick"],ha={key:0,class:"bg-white w-2 h-2 rounded-full"},fa={class:"mb-0 text-body-2xs font-medium text-heading-text"},pa=a.defineComponent({__name:"radio-group",props:{options:{default:()=>[]},type:{default:"vertical"},modelValue:{default:void 0},defaultValue:{default:void 0},className:{default:""}},emits:["update:modelValue","selectedChange"],setup(o,{emit:e}){const t=o,r=e,n=a.computed(()=>t.modelValue!==void 0),s=a.ref("");a.onMounted(()=>{if(n.value)return;const d=t.defaultValue??(t.options.length?t.options[0].value:"");s.value=d,d&&(r("update:modelValue",d),r("selectedChange",d))}),a.watch(()=>t.modelValue,d=>{n.value&&(s.value=d??"")},{immediate:!0});const u=a.computed(()=>n.value?t.modelValue??"":s.value);function l(d){n.value||(s.value=d),r("update:modelValue",d),r("selectedChange",d)}const f=a.computed(()=>t.type==="horizontal"?"flex-row gap-5":"flex-col gap-6"),{options:i,type:c,className:g}=t;return(d,m)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["flex",f.value,a.unref(g)]),role:"radiogroup","aria-orientation":a.unref(c)==="horizontal"?"horizontal":"vertical",tabindex:"0"},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(i),x=>(a.openBlock(),a.createElementBlock("div",{key:x.value,role:"radio","aria-checked":u.value===x.value,tabindex:"-1",onClick:C=>l(x.value),class:"flex items-center gap-2 cursor-pointer transition-colors duration-200"},[a.createElementVNode("div",{class:a.normalizeClass(["w-4 h-4 rounded-full border flex items-center justify-center",u.value===x.value?"bg-orange-500 border-orange-500":"bg-white border-grey-200"])},[u.value===x.value?(a.openBlock(),a.createElementBlock("div",ha)):a.createCommentVNode("",!0)],2),a.createElementVNode("p",fa,a.toDisplayString(x.label),1)],8,xa))),128))],10,da))}}),va=["src","height","alt"],Ae=a.defineComponent({__name:"image",props:{src:{},height:{default:50},width:{default:50},alt:{default:"Image"},customClass:{default:""},isFullWidth:{type:Boolean,default:!1}},emits:["click"],setup(o,{emit:e}){const t=o,r=e,{src:n,height:s,width:u,alt:l,customClass:f,isFullWidth:i}=t;return(c,g)=>(a.openBlock(),a.createElementBlock("img",{src:a.unref(n),height:a.unref(s),alt:a.unref(l),class:a.normalizeClass([a.unref(f),a.unref(i)?"w-full":""]),style:a.normalizeStyle({width:a.unref(i)?"100%":a.unref(u)+"px"}),onClick:g[0]||(g[0]=d=>r("click"))},null,14,va))}});var W=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ma(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}function Ca(o){if(o.__esModule)return o;var e=o.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(o).forEach(function(r){var n=Object.getOwnPropertyDescriptor(o,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return o[r]}})}),t}var K0={exports:{}};function ga(o){throw new Error('Could not dynamically require "'+o+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var tt={exports:{}};const Ba={},_a=Object.freeze(Object.defineProperty({__proto__:null,default:Ba},Symbol.toStringTag,{value:"Module"})),Ea=Ca(_a);var r0;function G(){return r0||(r0=1,function(o,e){(function(t,r){o.exports=r()})(W,function(){var t=t||function(r,n){var s;if(typeof window<"u"&&window.crypto&&(s=window.crypto),typeof self<"u"&&self.crypto&&(s=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(s=globalThis.crypto),!s&&typeof window<"u"&&window.msCrypto&&(s=window.msCrypto),!s&&typeof W<"u"&&W.crypto&&(s=W.crypto),!s&&typeof ga=="function")try{s=Ea}catch{}var u=function(){if(s){if(typeof s.getRandomValues=="function")try{return s.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof s.randomBytes=="function")try{return s.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},l=Object.create||function(){function p(){}return function(h){var _;return p.prototype=h,_=new p,p.prototype=null,_}}(),f={},i=f.lib={},c=i.Base=function(){return{extend:function(p){var h=l(this);return p&&h.mixIn(p),(!h.hasOwnProperty("init")||this.init===h.init)&&(h.init=function(){h.$super.init.apply(this,arguments)}),h.init.prototype=h,h.$super=this,h},create:function(){var p=this.extend();return p.init.apply(p,arguments),p},init:function(){},mixIn:function(p){for(var h in p)p.hasOwnProperty(h)&&(this[h]=p[h]);p.hasOwnProperty("toString")&&(this.toString=p.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),g=i.WordArray=c.extend({init:function(p,h){p=this.words=p||[],h!=n?this.sigBytes=h:this.sigBytes=p.length*4},toString:function(p){return(p||m).stringify(this)},concat:function(p){var h=this.words,_=p.words,b=this.sigBytes,A=p.sigBytes;if(this.clamp(),b%4)for(var w=0;w<A;w++){var V=_[w>>>2]>>>24-w%4*8&255;h[b+w>>>2]|=V<<24-(b+w)%4*8}else for(var T=0;T<A;T+=4)h[b+T>>>2]=_[T>>>2];return this.sigBytes+=A,this},clamp:function(){var p=this.words,h=this.sigBytes;p[h>>>2]&=4294967295<<32-h%4*8,p.length=r.ceil(h/4)},clone:function(){var p=c.clone.call(this);return p.words=this.words.slice(0),p},random:function(p){for(var h=[],_=0;_<p;_+=4)h.push(u());return new g.init(h,p)}}),d=f.enc={},m=d.Hex={stringify:function(p){for(var h=p.words,_=p.sigBytes,b=[],A=0;A<_;A++){var w=h[A>>>2]>>>24-A%4*8&255;b.push((w>>>4).toString(16)),b.push((w&15).toString(16))}return b.join("")},parse:function(p){for(var h=p.length,_=[],b=0;b<h;b+=2)_[b>>>3]|=parseInt(p.substr(b,2),16)<<24-b%8*4;return new g.init(_,h/2)}},x=d.Latin1={stringify:function(p){for(var h=p.words,_=p.sigBytes,b=[],A=0;A<_;A++){var w=h[A>>>2]>>>24-A%4*8&255;b.push(String.fromCharCode(w))}return b.join("")},parse:function(p){for(var h=p.length,_=[],b=0;b<h;b++)_[b>>>2]|=(p.charCodeAt(b)&255)<<24-b%4*8;return new g.init(_,h)}},C=d.Utf8={stringify:function(p){try{return decodeURIComponent(escape(x.stringify(p)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(p){return x.parse(unescape(encodeURIComponent(p)))}},v=i.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new g.init,this._nDataBytes=0},_append:function(p){typeof p=="string"&&(p=C.parse(p)),this._data.concat(p),this._nDataBytes+=p.sigBytes},_process:function(p){var h,_=this._data,b=_.words,A=_.sigBytes,w=this.blockSize,V=w*4,T=A/V;p?T=r.ceil(T):T=r.max((T|0)-this._minBufferSize,0);var k=T*w,S=r.min(k*4,A);if(k){for(var F=0;F<k;F+=w)this._doProcessBlock(b,F);h=b.splice(0,k),_.sigBytes-=S}return new g.init(h,S)},clone:function(){var p=c.clone.call(this);return p._data=this._data.clone(),p},_minBufferSize:0});i.Hasher=v.extend({cfg:c.extend(),init:function(p){this.cfg=this.cfg.extend(p),this.reset()},reset:function(){v.reset.call(this),this._doReset()},update:function(p){return this._append(p),this._process(),this},finalize:function(p){p&&this._append(p);var h=this._doFinalize();return h},blockSize:16,_createHelper:function(p){return function(h,_){return new p.init(_).finalize(h)}},_createHmacHelper:function(p){return function(h,_){return new E.HMAC.init(p,_).finalize(h)}}});var E=f.algo={};return f}(Math);return t})}(tt)),tt.exports}var rt={exports:{}},a0;function Ze(){return a0||(a0=1,function(o,e){(function(t,r){o.exports=r(G())})(W,function(t){return function(r){var n=t,s=n.lib,u=s.Base,l=s.WordArray,f=n.x64={};f.Word=u.extend({init:function(i,c){this.high=i,this.low=c}}),f.WordArray=u.extend({init:function(i,c){i=this.words=i||[],c!=r?this.sigBytes=c:this.sigBytes=i.length*8},toX32:function(){for(var i=this.words,c=i.length,g=[],d=0;d<c;d++){var m=i[d];g.push(m.high),g.push(m.low)}return l.create(g,this.sigBytes)},clone:function(){for(var i=u.clone.call(this),c=i.words=this.words.slice(0),g=c.length,d=0;d<g;d++)c[d]=c[d].clone();return i}})}(),t})}(rt)),rt.exports}var at={exports:{}},n0;function ya(){return n0||(n0=1,function(o,e){(function(t,r){o.exports=r(G())})(W,function(t){return function(){if(typeof ArrayBuffer=="function"){var r=t,n=r.lib,s=n.WordArray,u=s.init,l=s.init=function(f){if(f instanceof ArrayBuffer&&(f=new Uint8Array(f)),(f instanceof Int8Array||typeof Uint8ClampedArray<"u"&&f instanceof Uint8ClampedArray||f instanceof Int16Array||f instanceof Uint16Array||f instanceof Int32Array||f instanceof Uint32Array||f instanceof Float32Array||f instanceof Float64Array)&&(f=new Uint8Array(f.buffer,f.byteOffset,f.byteLength)),f instanceof Uint8Array){for(var i=f.byteLength,c=[],g=0;g<i;g++)c[g>>>2]|=f[g]<<24-g%4*8;u.call(this,c,i)}else u.apply(this,arguments)};l.prototype=s}}(),t.lib.WordArray})}(at)),at.exports}var nt={exports:{}},s0;function ka(){return s0||(s0=1,function(o,e){(function(t,r){o.exports=r(G())})(W,function(t){return function(){var r=t,n=r.lib,s=n.WordArray,u=r.enc;u.Utf16=u.Utf16BE={stringify:function(f){for(var i=f.words,c=f.sigBytes,g=[],d=0;d<c;d+=2){var m=i[d>>>2]>>>16-d%4*8&65535;g.push(String.fromCharCode(m))}return g.join("")},parse:function(f){for(var i=f.length,c=[],g=0;g<i;g++)c[g>>>1]|=f.charCodeAt(g)<<16-g%2*16;return s.create(c,i*2)}},u.Utf16LE={stringify:function(f){for(var i=f.words,c=f.sigBytes,g=[],d=0;d<c;d+=2){var m=l(i[d>>>2]>>>16-d%4*8&65535);g.push(String.fromCharCode(m))}return g.join("")},parse:function(f){for(var i=f.length,c=[],g=0;g<i;g++)c[g>>>1]|=l(f.charCodeAt(g)<<16-g%2*16);return s.create(c,i*2)}};function l(f){return f<<8&4278255360|f>>>8&16711935}}(),t.enc.Utf16})}(nt)),nt.exports}var st={exports:{}},i0;function Ne(){return i0||(i0=1,function(o,e){(function(t,r){o.exports=r(G())})(W,function(t){return function(){var r=t,n=r.lib,s=n.WordArray,u=r.enc;u.Base64={stringify:function(f){var i=f.words,c=f.sigBytes,g=this._map;f.clamp();for(var d=[],m=0;m<c;m+=3)for(var x=i[m>>>2]>>>24-m%4*8&255,C=i[m+1>>>2]>>>24-(m+1)%4*8&255,v=i[m+2>>>2]>>>24-(m+2)%4*8&255,E=x<<16|C<<8|v,p=0;p<4&&m+p*.75<c;p++)d.push(g.charAt(E>>>6*(3-p)&63));var h=g.charAt(64);if(h)for(;d.length%4;)d.push(h);return d.join("")},parse:function(f){var i=f.length,c=this._map,g=this._reverseMap;if(!g){g=this._reverseMap=[];for(var d=0;d<c.length;d++)g[c.charCodeAt(d)]=d}var m=c.charAt(64);if(m){var x=f.indexOf(m);x!==-1&&(i=x)}return l(f,i,g)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function l(f,i,c){for(var g=[],d=0,m=0;m<i;m++)if(m%4){var x=c[f.charCodeAt(m-1)]<<m%4*2,C=c[f.charCodeAt(m)]>>>6-m%4*2,v=x|C;g[d>>>2]|=v<<24-d%4*8,d++}return s.create(g,d)}}(),t.enc.Base64})}(st)),st.exports}var it={exports:{}},o0;function Aa(){return o0||(o0=1,function(o,e){(function(t,r){o.exports=r(G())})(W,function(t){return function(){var r=t,n=r.lib,s=n.WordArray,u=r.enc;u.Base64url={stringify:function(f,i){i===void 0&&(i=!0);var c=f.words,g=f.sigBytes,d=i?this._safe_map:this._map;f.clamp();for(var m=[],x=0;x<g;x+=3)for(var C=c[x>>>2]>>>24-x%4*8&255,v=c[x+1>>>2]>>>24-(x+1)%4*8&255,E=c[x+2>>>2]>>>24-(x+2)%4*8&255,p=C<<16|v<<8|E,h=0;h<4&&x+h*.75<g;h++)m.push(d.charAt(p>>>6*(3-h)&63));var _=d.charAt(64);if(_)for(;m.length%4;)m.push(_);return m.join("")},parse:function(f,i){i===void 0&&(i=!0);var c=f.length,g=i?this._safe_map:this._map,d=this._reverseMap;if(!d){d=this._reverseMap=[];for(var m=0;m<g.length;m++)d[g.charCodeAt(m)]=m}var x=g.charAt(64);if(x){var C=f.indexOf(x);C!==-1&&(c=C)}return l(f,c,d)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function l(f,i,c){for(var g=[],d=0,m=0;m<i;m++)if(m%4){var x=c[f.charCodeAt(m-1)]<<m%4*2,C=c[f.charCodeAt(m)]>>>6-m%4*2,v=x|C;g[d>>>2]|=v<<24-d%4*8,d++}return s.create(g,d)}}(),t.enc.Base64url})}(it)),it.exports}var ot={exports:{}},l0;function Re(){return l0||(l0=1,function(o,e){(function(t,r){o.exports=r(G())})(W,function(t){return function(r){var n=t,s=n.lib,u=s.WordArray,l=s.Hasher,f=n.algo,i=[];(function(){for(var C=0;C<64;C++)i[C]=r.abs(r.sin(C+1))*4294967296|0})();var c=f.MD5=l.extend({_doReset:function(){this._hash=new u.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(C,v){for(var E=0;E<16;E++){var p=v+E,h=C[p];C[p]=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360}var _=this._hash.words,b=C[v+0],A=C[v+1],w=C[v+2],V=C[v+3],T=C[v+4],k=C[v+5],S=C[v+6],F=C[v+7],B=C[v+8],y=C[v+9],M=C[v+10],$=C[v+11],L=C[v+12],H=C[v+13],P=C[v+14],O=C[v+15],D=_[0],R=_[1],I=_[2],N=_[3];D=g(D,R,I,N,b,7,i[0]),N=g(N,D,R,I,A,12,i[1]),I=g(I,N,D,R,w,17,i[2]),R=g(R,I,N,D,V,22,i[3]),D=g(D,R,I,N,T,7,i[4]),N=g(N,D,R,I,k,12,i[5]),I=g(I,N,D,R,S,17,i[6]),R=g(R,I,N,D,F,22,i[7]),D=g(D,R,I,N,B,7,i[8]),N=g(N,D,R,I,y,12,i[9]),I=g(I,N,D,R,M,17,i[10]),R=g(R,I,N,D,$,22,i[11]),D=g(D,R,I,N,L,7,i[12]),N=g(N,D,R,I,H,12,i[13]),I=g(I,N,D,R,P,17,i[14]),R=g(R,I,N,D,O,22,i[15]),D=d(D,R,I,N,A,5,i[16]),N=d(N,D,R,I,S,9,i[17]),I=d(I,N,D,R,$,14,i[18]),R=d(R,I,N,D,b,20,i[19]),D=d(D,R,I,N,k,5,i[20]),N=d(N,D,R,I,M,9,i[21]),I=d(I,N,D,R,O,14,i[22]),R=d(R,I,N,D,T,20,i[23]),D=d(D,R,I,N,y,5,i[24]),N=d(N,D,R,I,P,9,i[25]),I=d(I,N,D,R,V,14,i[26]),R=d(R,I,N,D,B,20,i[27]),D=d(D,R,I,N,H,5,i[28]),N=d(N,D,R,I,w,9,i[29]),I=d(I,N,D,R,F,14,i[30]),R=d(R,I,N,D,L,20,i[31]),D=m(D,R,I,N,k,4,i[32]),N=m(N,D,R,I,B,11,i[33]),I=m(I,N,D,R,$,16,i[34]),R=m(R,I,N,D,P,23,i[35]),D=m(D,R,I,N,A,4,i[36]),N=m(N,D,R,I,T,11,i[37]),I=m(I,N,D,R,F,16,i[38]),R=m(R,I,N,D,M,23,i[39]),D=m(D,R,I,N,H,4,i[40]),N=m(N,D,R,I,b,11,i[41]),I=m(I,N,D,R,V,16,i[42]),R=m(R,I,N,D,S,23,i[43]),D=m(D,R,I,N,y,4,i[44]),N=m(N,D,R,I,L,11,i[45]),I=m(I,N,D,R,O,16,i[46]),R=m(R,I,N,D,w,23,i[47]),D=x(D,R,I,N,b,6,i[48]),N=x(N,D,R,I,F,10,i[49]),I=x(I,N,D,R,P,15,i[50]),R=x(R,I,N,D,k,21,i[51]),D=x(D,R,I,N,L,6,i[52]),N=x(N,D,R,I,V,10,i[53]),I=x(I,N,D,R,M,15,i[54]),R=x(R,I,N,D,A,21,i[55]),D=x(D,R,I,N,B,6,i[56]),N=x(N,D,R,I,O,10,i[57]),I=x(I,N,D,R,S,15,i[58]),R=x(R,I,N,D,H,21,i[59]),D=x(D,R,I,N,T,6,i[60]),N=x(N,D,R,I,$,10,i[61]),I=x(I,N,D,R,w,15,i[62]),R=x(R,I,N,D,y,21,i[63]),_[0]=_[0]+D|0,_[1]=_[1]+R|0,_[2]=_[2]+I|0,_[3]=_[3]+N|0},_doFinalize:function(){var C=this._data,v=C.words,E=this._nDataBytes*8,p=C.sigBytes*8;v[p>>>5]|=128<<24-p%32;var h=r.floor(E/4294967296),_=E;v[(p+64>>>9<<4)+15]=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360,v[(p+64>>>9<<4)+14]=(_<<8|_>>>24)&16711935|(_<<24|_>>>8)&4278255360,C.sigBytes=(v.length+1)*4,this._process();for(var b=this._hash,A=b.words,w=0;w<4;w++){var V=A[w];A[w]=(V<<8|V>>>24)&16711935|(V<<24|V>>>8)&4278255360}return b},clone:function(){var C=l.clone.call(this);return C._hash=this._hash.clone(),C}});function g(C,v,E,p,h,_,b){var A=C+(v&E|~v&p)+h+b;return(A<<_|A>>>32-_)+v}function d(C,v,E,p,h,_,b){var A=C+(v&p|E&~p)+h+b;return(A<<_|A>>>32-_)+v}function m(C,v,E,p,h,_,b){var A=C+(v^E^p)+h+b;return(A<<_|A>>>32-_)+v}function x(C,v,E,p,h,_,b){var A=C+(E^(v|~p))+h+b;return(A<<_|A>>>32-_)+v}n.MD5=l._createHelper(c),n.HmacMD5=l._createHmacHelper(c)}(Math),t.MD5})}(ot)),ot.exports}var lt={exports:{}},u0;function W0(){return u0||(u0=1,function(o,e){(function(t,r){o.exports=r(G())})(W,function(t){return function(){var r=t,n=r.lib,s=n.WordArray,u=n.Hasher,l=r.algo,f=[],i=l.SHA1=u.extend({_doReset:function(){this._hash=new s.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(c,g){for(var d=this._hash.words,m=d[0],x=d[1],C=d[2],v=d[3],E=d[4],p=0;p<80;p++){if(p<16)f[p]=c[g+p]|0;else{var h=f[p-3]^f[p-8]^f[p-14]^f[p-16];f[p]=h<<1|h>>>31}var _=(m<<5|m>>>27)+E+f[p];p<20?_+=(x&C|~x&v)+1518500249:p<40?_+=(x^C^v)+1859775393:p<60?_+=(x&C|x&v|C&v)-1894007588:_+=(x^C^v)-899497514,E=v,v=C,C=x<<30|x>>>2,x=m,m=_}d[0]=d[0]+m|0,d[1]=d[1]+x|0,d[2]=d[2]+C|0,d[3]=d[3]+v|0,d[4]=d[4]+E|0},_doFinalize:function(){var c=this._data,g=c.words,d=this._nDataBytes*8,m=c.sigBytes*8;return g[m>>>5]|=128<<24-m%32,g[(m+64>>>9<<4)+14]=Math.floor(d/4294967296),g[(m+64>>>9<<4)+15]=d,c.sigBytes=g.length*4,this._process(),this._hash},clone:function(){var c=u.clone.call(this);return c._hash=this._hash.clone(),c}});r.SHA1=u._createHelper(i),r.HmacSHA1=u._createHmacHelper(i)}(),t.SHA1})}(lt)),lt.exports}var ut={exports:{}},c0;function $t(){return c0||(c0=1,function(o,e){(function(t,r){o.exports=r(G())})(W,function(t){return function(r){var n=t,s=n.lib,u=s.WordArray,l=s.Hasher,f=n.algo,i=[],c=[];(function(){function m(E){for(var p=r.sqrt(E),h=2;h<=p;h++)if(!(E%h))return!1;return!0}function x(E){return(E-(E|0))*4294967296|0}for(var C=2,v=0;v<64;)m(C)&&(v<8&&(i[v]=x(r.pow(C,1/2))),c[v]=x(r.pow(C,1/3)),v++),C++})();var g=[],d=f.SHA256=l.extend({_doReset:function(){this._hash=new u.init(i.slice(0))},_doProcessBlock:function(m,x){for(var C=this._hash.words,v=C[0],E=C[1],p=C[2],h=C[3],_=C[4],b=C[5],A=C[6],w=C[7],V=0;V<64;V++){if(V<16)g[V]=m[x+V]|0;else{var T=g[V-15],k=(T<<25|T>>>7)^(T<<14|T>>>18)^T>>>3,S=g[V-2],F=(S<<15|S>>>17)^(S<<13|S>>>19)^S>>>10;g[V]=k+g[V-7]+F+g[V-16]}var B=_&b^~_&A,y=v&E^v&p^E&p,M=(v<<30|v>>>2)^(v<<19|v>>>13)^(v<<10|v>>>22),$=(_<<26|_>>>6)^(_<<21|_>>>11)^(_<<7|_>>>25),L=w+$+B+c[V]+g[V],H=M+y;w=A,A=b,b=_,_=h+L|0,h=p,p=E,E=v,v=L+H|0}C[0]=C[0]+v|0,C[1]=C[1]+E|0,C[2]=C[2]+p|0,C[3]=C[3]+h|0,C[4]=C[4]+_|0,C[5]=C[5]+b|0,C[6]=C[6]+A|0,C[7]=C[7]+w|0},_doFinalize:function(){var m=this._data,x=m.words,C=this._nDataBytes*8,v=m.sigBytes*8;return x[v>>>5]|=128<<24-v%32,x[(v+64>>>9<<4)+14]=r.floor(C/4294967296),x[(v+64>>>9<<4)+15]=C,m.sigBytes=x.length*4,this._process(),this._hash},clone:function(){var m=l.clone.call(this);return m._hash=this._hash.clone(),m}});n.SHA256=l._createHelper(d),n.HmacSHA256=l._createHmacHelper(d)}(Math),t.SHA256})}(ut)),ut.exports}var ct={exports:{}},d0;function ba(){return d0||(d0=1,function(o,e){(function(t,r,n){o.exports=r(G(),$t())})(W,function(t){return function(){var r=t,n=r.lib,s=n.WordArray,u=r.algo,l=u.SHA256,f=u.SHA224=l.extend({_doReset:function(){this._hash=new s.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var i=l._doFinalize.call(this);return i.sigBytes-=4,i}});r.SHA224=l._createHelper(f),r.HmacSHA224=l._createHmacHelper(f)}(),t.SHA224})}(ct)),ct.exports}var dt={exports:{}},x0;function G0(){return x0||(x0=1,function(o,e){(function(t,r,n){o.exports=r(G(),Ze())})(W,function(t){return function(){var r=t,n=r.lib,s=n.Hasher,u=r.x64,l=u.Word,f=u.WordArray,i=r.algo;function c(){return l.create.apply(l,arguments)}var g=[c(1116352408,3609767458),c(1899447441,602891725),c(3049323471,3964484399),c(3921009573,2173295548),c(961987163,4081628472),c(1508970993,3053834265),c(2453635748,2937671579),c(2870763221,3664609560),c(3624381080,2734883394),c(310598401,1164996542),c(607225278,1323610764),c(1426881987,3590304994),c(1925078388,4068182383),c(2162078206,991336113),c(2614888103,633803317),c(3248222580,3479774868),c(3835390401,2666613458),c(4022224774,944711139),c(264347078,2341262773),c(604807628,2007800933),c(770255983,1495990901),c(1249150122,1856431235),c(1555081692,3175218132),c(1996064986,2198950837),c(2554220882,3999719339),c(2821834349,766784016),c(2952996808,2566594879),c(3210313671,3203337956),c(3336571891,1034457026),c(3584528711,2466948901),c(113926993,3758326383),c(338241895,168717936),c(666307205,1188179964),c(773529912,1546045734),c(1294757372,1522805485),c(1396182291,2643833823),c(1695183700,2343527390),c(1986661051,1014477480),c(2177026350,1206759142),c(2456956037,344077627),c(2730485921,1290863460),c(2820302411,3158454273),c(3259730800,3505952657),c(3345764771,106217008),c(3516065817,3606008344),c(3600352804,1432725776),c(4094571909,1467031594),c(275423344,851169720),c(430227734,3100823752),c(506948616,1363258195),c(659060556,3750685593),c(883997877,3785050280),c(958139571,3318307427),c(1322822218,3812723403),c(1537002063,2003034995),c(1747873779,3602036899),c(1955562222,1575990012),c(2024104815,1125592928),c(2227730452,2716904306),c(2361852424,442776044),c(2428436474,593698344),c(2756734187,3733110249),c(3204031479,2999351573),c(3329325298,3815920427),c(3391569614,3928383900),c(3515267271,566280711),c(3940187606,3454069534),c(4118630271,4000239992),c(116418474,1914138554),c(174292421,2731055270),c(289380356,3203993006),c(460393269,320620315),c(685471733,587496836),c(852142971,1086792851),c(1017036298,365543100),c(1126000580,2618297676),c(1288033470,3409855158),c(1501505948,4234509866),c(1607167915,987167468),c(1816402316,1246189591)],d=[];(function(){for(var x=0;x<80;x++)d[x]=c()})();var m=i.SHA512=s.extend({_doReset:function(){this._hash=new f.init([new l.init(1779033703,4089235720),new l.init(3144134277,2227873595),new l.init(1013904242,4271175723),new l.init(2773480762,1595750129),new l.init(1359893119,2917565137),new l.init(2600822924,725511199),new l.init(528734635,4215389547),new l.init(1541459225,327033209)])},_doProcessBlock:function(x,C){for(var v=this._hash.words,E=v[0],p=v[1],h=v[2],_=v[3],b=v[4],A=v[5],w=v[6],V=v[7],T=E.high,k=E.low,S=p.high,F=p.low,B=h.high,y=h.low,M=_.high,$=_.low,L=b.high,H=b.low,P=A.high,O=A.low,D=w.high,R=w.low,I=V.high,N=V.low,X=T,Z=k,Q=S,j=F,Be=B,ve=y,Ie=M,_e=$,ae=L,ee=H,De=P,Ee=O,he=D,Y=R,oe=I,de=N,le=0;le<80;le++){var ne,U,ye=d[le];if(le<16)U=ye.high=x[C+le*2]|0,ne=ye.low=x[C+le*2+1]|0;else{var Te=d[le-15],fe=Te.high,Pe=Te.low,tr=(fe>>>1|Pe<<31)^(fe>>>8|Pe<<24)^fe>>>7,Ut=(Pe>>>1|fe<<31)^(Pe>>>8|fe<<24)^(Pe>>>7|fe<<25),qt=d[le-2],Me=qt.high,Oe=qt.low,rr=(Me>>>19|Oe<<13)^(Me<<3|Oe>>>29)^Me>>>6,jt=(Oe>>>19|Me<<13)^(Oe<<3|Me>>>29)^(Oe>>>6|Me<<26),Kt=d[le-7],ar=Kt.high,nr=Kt.low,Wt=d[le-16],sr=Wt.high,Gt=Wt.low;ne=Ut+nr,U=tr+ar+(ne>>>0<Ut>>>0?1:0),ne=ne+jt,U=U+rr+(ne>>>0<jt>>>0?1:0),ne=ne+Gt,U=U+sr+(ne>>>0<Gt>>>0?1:0),ye.high=U,ye.low=ne}var ir=ae&De^~ae&he,Zt=ee&Ee^~ee&Y,or=X&Q^X&Be^Q&Be,lr=Z&j^Z&ve^j&ve,ur=(X>>>28|Z<<4)^(X<<30|Z>>>2)^(X<<25|Z>>>7),Xt=(Z>>>28|X<<4)^(Z<<30|X>>>2)^(Z<<25|X>>>7),cr=(ae>>>14|ee<<18)^(ae>>>18|ee<<14)^(ae<<23|ee>>>9),dr=(ee>>>14|ae<<18)^(ee>>>18|ae<<14)^(ee<<23|ae>>>9),Yt=g[le],xr=Yt.high,Qt=Yt.low,se=de+dr,ke=oe+cr+(se>>>0<de>>>0?1:0),se=se+Zt,ke=ke+ir+(se>>>0<Zt>>>0?1:0),se=se+Qt,ke=ke+xr+(se>>>0<Qt>>>0?1:0),se=se+ne,ke=ke+U+(se>>>0<ne>>>0?1:0),Jt=Xt+lr,hr=ur+or+(Jt>>>0<Xt>>>0?1:0);oe=he,de=Y,he=De,Y=Ee,De=ae,Ee=ee,ee=_e+se|0,ae=Ie+ke+(ee>>>0<_e>>>0?1:0)|0,Ie=Be,_e=ve,Be=Q,ve=j,Q=X,j=Z,Z=se+Jt|0,X=ke+hr+(Z>>>0<se>>>0?1:0)|0}k=E.low=k+Z,E.high=T+X+(k>>>0<Z>>>0?1:0),F=p.low=F+j,p.high=S+Q+(F>>>0<j>>>0?1:0),y=h.low=y+ve,h.high=B+Be+(y>>>0<ve>>>0?1:0),$=_.low=$+_e,_.high=M+Ie+($>>>0<_e>>>0?1:0),H=b.low=H+ee,b.high=L+ae+(H>>>0<ee>>>0?1:0),O=A.low=O+Ee,A.high=P+De+(O>>>0<Ee>>>0?1:0),R=w.low=R+Y,w.high=D+he+(R>>>0<Y>>>0?1:0),N=V.low=N+de,V.high=I+oe+(N>>>0<de>>>0?1:0)},_doFinalize:function(){var x=this._data,C=x.words,v=this._nDataBytes*8,E=x.sigBytes*8;C[E>>>5]|=128<<24-E%32,C[(E+128>>>10<<5)+30]=Math.floor(v/4294967296),C[(E+128>>>10<<5)+31]=v,x.sigBytes=C.length*4,this._process();var p=this._hash.toX32();return p},clone:function(){var x=s.clone.call(this);return x._hash=this._hash.clone(),x},blockSize:1024/32});r.SHA512=s._createHelper(m),r.HmacSHA512=s._createHmacHelper(m)}(),t.SHA512})}(dt)),dt.exports}var xt={exports:{}},h0;function Fa(){return h0||(h0=1,function(o,e){(function(t,r,n){o.exports=r(G(),Ze(),G0())})(W,function(t){return function(){var r=t,n=r.x64,s=n.Word,u=n.WordArray,l=r.algo,f=l.SHA512,i=l.SHA384=f.extend({_doReset:function(){this._hash=new u.init([new s.init(3418070365,3238371032),new s.init(1654270250,914150663),new s.init(2438529370,812702999),new s.init(355462360,4144912697),new s.init(1731405415,4290775857),new s.init(2394180231,1750603025),new s.init(3675008525,1694076839),new s.init(1203062813,3204075428)])},_doFinalize:function(){var c=f._doFinalize.call(this);return c.sigBytes-=16,c}});r.SHA384=f._createHelper(i),r.HmacSHA384=f._createHmacHelper(i)}(),t.SHA384})}(xt)),xt.exports}var ht={exports:{}},f0;function Da(){return f0||(f0=1,function(o,e){(function(t,r,n){o.exports=r(G(),Ze())})(W,function(t){return function(r){var n=t,s=n.lib,u=s.WordArray,l=s.Hasher,f=n.x64,i=f.Word,c=n.algo,g=[],d=[],m=[];(function(){for(var v=1,E=0,p=0;p<24;p++){g[v+5*E]=(p+1)*(p+2)/2%64;var h=E%5,_=(2*v+3*E)%5;v=h,E=_}for(var v=0;v<5;v++)for(var E=0;E<5;E++)d[v+5*E]=E+(2*v+3*E)%5*5;for(var b=1,A=0;A<24;A++){for(var w=0,V=0,T=0;T<7;T++){if(b&1){var k=(1<<T)-1;k<32?V^=1<<k:w^=1<<k-32}b&128?b=b<<1^113:b<<=1}m[A]=i.create(w,V)}})();var x=[];(function(){for(var v=0;v<25;v++)x[v]=i.create()})();var C=c.SHA3=l.extend({cfg:l.cfg.extend({outputLength:512}),_doReset:function(){for(var v=this._state=[],E=0;E<25;E++)v[E]=new i.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(v,E){for(var p=this._state,h=this.blockSize/2,_=0;_<h;_++){var b=v[E+2*_],A=v[E+2*_+1];b=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360,A=(A<<8|A>>>24)&16711935|(A<<24|A>>>8)&4278255360;var w=p[_];w.high^=A,w.low^=b}for(var V=0;V<24;V++){for(var T=0;T<5;T++){for(var k=0,S=0,F=0;F<5;F++){var w=p[T+5*F];k^=w.high,S^=w.low}var B=x[T];B.high=k,B.low=S}for(var T=0;T<5;T++)for(var y=x[(T+4)%5],M=x[(T+1)%5],$=M.high,L=M.low,k=y.high^($<<1|L>>>31),S=y.low^(L<<1|$>>>31),F=0;F<5;F++){var w=p[T+5*F];w.high^=k,w.low^=S}for(var H=1;H<25;H++){var k,S,w=p[H],P=w.high,O=w.low,D=g[H];D<32?(k=P<<D|O>>>32-D,S=O<<D|P>>>32-D):(k=O<<D-32|P>>>64-D,S=P<<D-32|O>>>64-D);var R=x[d[H]];R.high=k,R.low=S}var I=x[0],N=p[0];I.high=N.high,I.low=N.low;for(var T=0;T<5;T++)for(var F=0;F<5;F++){var H=T+5*F,w=p[H],X=x[H],Z=x[(T+1)%5+5*F],Q=x[(T+2)%5+5*F];w.high=X.high^~Z.high&Q.high,w.low=X.low^~Z.low&Q.low}var w=p[0],j=m[V];w.high^=j.high,w.low^=j.low}},_doFinalize:function(){var v=this._data,E=v.words;this._nDataBytes*8;var p=v.sigBytes*8,h=this.blockSize*32;E[p>>>5]|=1<<24-p%32,E[(r.ceil((p+1)/h)*h>>>5)-1]|=128,v.sigBytes=E.length*4,this._process();for(var _=this._state,b=this.cfg.outputLength/8,A=b/8,w=[],V=0;V<A;V++){var T=_[V],k=T.high,S=T.low;k=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360,S=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360,w.push(S),w.push(k)}return new u.init(w,b)},clone:function(){for(var v=l.clone.call(this),E=v._state=this._state.slice(0),p=0;p<25;p++)E[p]=E[p].clone();return v}});n.SHA3=l._createHelper(C),n.HmacSHA3=l._createHmacHelper(C)}(Math),t.SHA3})}(ht)),ht.exports}var ft={exports:{}},p0;function wa(){return p0||(p0=1,function(o,e){(function(t,r){o.exports=r(G())})(W,function(t){/** @preserve
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),$0=Symbol("MidenPGConfig");function fr(o){if(!(o!=null&&o.publishableKey))throw new Error("[@miden-npm/vue] publishableKey is required");return{install(e){e.provide($0,o)}}}function pr(){const o=a.inject($0);if(!o)throw new Error("[@miden-npm/vue] Missing provider. Did you forget to app.use(createMidenPG(...))?");return o}const ze=o=>o==null||typeof o!="object"?!1:Object.values(o).every(Boolean),Ht=o=>{const e={};return new URL(o).searchParams.forEach((r,n)=>{e[n]=r}),e},ge=o=>o==="sandbox"?"https://sandbox-api.buzapay.com/payment-gateway-api":"",vr=o=>o==="USD"?"$":o==="NGN"?"₦":o==="EUR"?"€":o==="GBP"?"£":o==="JPY"||o==="CNY"?"¥":o==="USDC"||o==="usdc"?"$⧫":o==="USDT"||o==="usdt"?"₮":"$",Se=(o,e)=>{const t=typeof o=="string"?parseFloat(o):o;return isNaN(t)?"0":`${e?vr(e):""} ${t==null?void 0:t.toLocaleString("en-US")}`},mr=(o,e)=>o.length<=e?o:o.slice(0,e)+"...",Cr=o=>{const e=["Backspace","Tab","ArrowLeft","ArrowRight","Delete","Home","End","."];(o.ctrlKey||o.metaKey)&&["a","c","v","x"].includes(o.key.toLowerCase())||(!e.includes(o.key)&&!/^\d$/.test(o.key)&&o.preventDefault(),o.key==="."&&o.target.value.includes(".")&&o.preventDefault())},xe=(o,e)=>e.test(o);function gr(o){return o?o.split("|").map(e=>{const[t,r]=e.split(":");return{rule:t,value:r}}):[]}function Br(o,e,t){const r=[],n=gr(o),s=(t||"This field").toLowerCase(),u=e??"",l=Number(u),f=!Number.isNaN(l);for(const i of n)switch(i.rule){case"required":u||r.push(`The ${s} field is required`);break;case"alpha":xe(u,/^[a-zA-Z]+$/)||r.push(`The ${s} field must only contain alphabetic characters`);break;case"at_least_one_uppercase":xe(u,/.*[A-Z].*/)||r.push(`The ${s} field must contain at least one uppercase character`);break;case"at_least_one_lowercase":xe(u,/.*[a-z].*/)||r.push(`The ${s} field must contain at least one lowercase character`);break;case"at_least_one_number":xe(u,/.*\d.*/)||r.push(`The ${s} field must contain at least one number`);break;case"alpha_num":xe(u,/^[a-z0-9]+$/i)||r.push(`The ${s} field must only contain alphabetic characters and numbers`);break;case"num_spaces":xe(u,/^[0-9\s]+$/i)||r.push(`The ${s} field must only contain space and numbers`);break;case"alpha_spaces":xe(u,/^[A-Za-z\s]*$/)||r.push(`The ${s} field must only contain alphabetic characters and spaces`);break;case"numeric":xe(u,/^\d+$/)||r.push(`The ${s} field must only contain numbers`);break;case"no_special":xe(u,/[^a-zA-Z0-9\s]/)&&r.push(`The ${s} field must not contain special characters`);break;case"at_least_one_special":xe(u,/[^a-zA-Z0-9\s]/)||r.push(`The ${s} field must contain at least one special character`);break;case"email":xe(u,/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,})+$/)||r.push("Please enter a valid email address");break;case"is":i.value!==u&&r.push(`Value entered must be ${i.value}`);break;case"is_not":i.value===u&&r.push(`Value entered must not be ${i.value}`);break;case"char_length":u.length!==Number(i.value)&&r.push(`The ${s} field must be ${i.value} characters long`);break;case"min_char_length":u.length<Number(i.value)&&r.push(`The ${s} field must not be less than ${i.value} characters long`);break;case"max_char_length":u.length>Number(i.value)&&r.push(`The ${s} field must not be greater than ${i.value} characters long`);break;case"age":(!f||l!==Number(i.value))&&r.push(`Age entered must be ${i.value}`);break;case"min_age":(!f||l<Number(i.value))&&r.push(`Age entered must not be less than ${i.value}`);break;case"max_age":(!f||l>Number(i.value))&&r.push(`Age entered must not be greater than ${i.value}`);break;case"num_is":(!f||l!==Number(i.value))&&r.push(`Number entered must be ${i.value}`);break;case"num_is_not":f&&l===Number(i.value)&&r.push(`Number entered must not be ${i.value}`);break;case"min_number":(!f||l<Number(i.value))&&r.push(`Number entered must not be less than ${i.value}`);break;case"max_number":(!f||l>Number(i.value))&&r.push(`Number entered must not be greater than ${i.value}`);break}return r.length>0?r[0]:null}const je=(o,e,t)=>{const r={};for(const[n,s]of Object.entries(e)){if(!s)continue;const u=(t==null?void 0:t[n])??n,l=Br(s,o[n]??"",u);l&&(r[n]=l)}return r};var L0=(o=>(o[o.Visa=1]="Visa",o[o.MasterCard=2]="MasterCard",o[o.Verve=3]="Verve",o[o.MastercardAndVisa=4]="MastercardAndVisa",o[o.AmericanExpress=5]="AmericanExpress",o[o.Discover=6]="Discover",o[o.JCB=7]="JCB",o[o.DinersClub=8]="DinersClub",o[o.Maestro=9]="Maestro",o[o.UnionPay=10]="UnionPay",o[o.UnionPay3DS=11]="UnionPay3DS",o[o.UnionPayNon3DS=12]="UnionPayNon3DS",o[o.UATP=13]="UATP",o[o.PayPak=14]="PayPak",o[o.Jaywan=15]="Jaywan",o[o.Mada=16]="Mada",o[o.MadaVisa=17]="MadaVisa",o[o.MadaMastercard=18]="MadaMastercard",o[o.Unknown=19]="Unknown",o))(L0||{});const e0=/^4\d{12}(\d{3}){0,2}$/,t0=/^(?:5[1-5]\d{14}|2(?:2(?:2[1-9]|[3-9]\d)|[3-6]\d{2}|7(?:[01]\d|20))\d{12})(?:\d{0,3})?$/,_r=/^(34|37)\d{13}$/,Er=/^(?:6011|65|64[4-9]|622(?:12[6-9]|1[3-9]\d|[2-8]\d{2}|9(?:0\d|1\d|2[0-5])))\d{12,15}$/,yr=/^(?:35(?:2[8-9]|[3-8]\d))\d{12,15}$/,kr=/^(?:3(?:0[0-5]\d|095|6\d|[89]\d))\d{11,13}$/,Ar=/^(?:50|5[6-9]|6[0-9])\d{10,17}$/,et=/^62\d{14,17}$/,br=/^1\d{14}$/,Fr=[[506099,506198],[650002,650027]],Dr=new Set([507865,507866]),wr=new Set([220545,220543]),Sr=new Set([6690109]),Vr=new Set([968209,873646]),Nr=new Set([422818,486094]),Rr=new Set([529741,543357]),Ir=new Set([620108]),Tr=new Set([621423]);function Mr(o){const e=Pr(o);return L0[e]}function Pr(o){if(!o||!o.trim())return 19;const e=o.replace(/\D/g,"");if(e.length<12||e.length>19)return 19;if(e.length>=6){const t=parseInt(e.slice(0,6),10);if(Vr.has(t)&&e.length>=16&&e.length<=19)return 16;if(Nr.has(t)&&e0.test(e))return 17;if(Rr.has(t)&&t0.test(e))return 18;if(wr.has(t)&&e.length===16)return 14;if(Ir.has(t)&&et.test(e))return 11;if(Tr.has(t)&&et.test(e))return 12;if(Or(t,e.length))return 3}if(e.length>=7){const t=parseInt(e.slice(0,7),10);if(Sr.has(t)&&e.length===16)return 15}return br.test(e)?13:_r.test(e)?5:Er.test(e)?6:yr.test(e)?7:kr.test(e)?8:t0.test(e)?2:e0.test(e)?1:et.test(e)?10:Ar.test(e)?9:19}function Or(o,e){return e<16||e>19?!1:Fr.some(([r,n])=>o>=r&&o<=n)||Dr.has(o)}const Hr=["width","height"],$r=["stroke"],Lr=["fill"],z0=a.defineComponent({__name:"icon-loader",props:{size:{default:24},color:{default:"currentColor"},className:{default:""}},setup(o){const e=o,t=a.useAttrs(),{size:r,color:n,className:s}=e;return(u,l)=>(a.openBlock(),a.createElementBlock("svg",a.mergeProps({class:["animate-spin",a.unref(s)],xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",width:a.unref(r),height:a.unref(r),role:"img","aria-label":"loading"},a.unref(t)),[a.createElementVNode("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:a.unref(n),"stroke-width":"4"},null,8,$r),a.createElementVNode("path",{class:"opacity-75",fill:a.unref(n),d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"},null,8,Lr)],16,Hr))}}),zr=["disabled"],Ur={key:1},Ve=a.defineComponent({__name:"button",props:{label:{default:""},type:{default:"neutral"},size:{default:"de"},paddingClassX:{default:"px-8"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},customClass:{default:""}},emits:["click"],setup(o,{emit:e}){const t=o,r=e,n=a.computed(()=>t.disabled||t.loading);function s(){n.value||r("click")}function u(i,c){if(c)return"bg-gray-200 text-gray-400 cursor-not-allowed border-gray-200";switch(i){case"primary":return"bg-primary text-white hover:bg-primary-black hover:border-primary-black border-primary";case"secondary":return"bg-gray-200 border-gray-200 hover:bg-gray-300 text-heading-text";case"danger":return"bg-red-500 border-red-500 text-white hover:bg-red-600";case"neutral":default:return"bg-off-white border-grey-border hover:bg-gray-100"}}function l(i){switch(i){case"de":return"h-68px rounded-xl";case"md":return"h-42px rounded-lg";case"sm":return"h-32px rounded-md";default:return"h-68px rounded-xl"}}function f(i){switch(i){case"de":case"md":case"sm":return"text-body-2xs font-normal";default:return"text-body-xs font-normal"}}return(i,c)=>(a.openBlock(),a.createElementBlock("button",{class:a.normalizeClass(["flex items-center justify-center gap-2 py-3 border font-normal text-input-grey transition-colors duration-300 ease-in-out",u(i.type,n.value),l(i.size),i.paddingClassX,i.customClass]),type:"button",disabled:n.value,onClick:s},[a.renderSlot(i.$slots,"prefix"),i.loading?(a.openBlock(),a.createBlock(z0,{key:0})):(a.openBlock(),a.createElementBlock("div",Ur,[i.label?(a.openBlock(),a.createElementBlock("p",{key:0,class:a.normalizeClass(["mb-0",f(i.size)])},a.toDisplayString(i.label),3)):a.renderSlot(i.$slots,"default",{key:1})])),a.renderSlot(i.$slots,"suffix")],10,zr))}}),qr={class:"mb-0 text-body-3xs font-normal text-red-500"},U0=a.defineComponent({__name:"input-error",props:{errorMessage:{}},setup(o){return(e,t)=>(a.openBlock(),a.createElementBlock("p",qr,a.toDisplayString(e.errorMessage),1))}});async function Ue(o,e,t){try{const r=ge(e);return await(await fetch(`${r}/api/v1/checkout/generate-payment-link2`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",merchantId:t},body:JSON.stringify({...o,LinkName:`${Date.now()}-Link`})})).json()}catch{}}async function jr(o,{merchantId:e,...t}){try{const r=ge(o);return await(await fetch(`${r}/api/v1/checkout/authorize-card-3ds-payment-sdk`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",merchantId:e},body:JSON.stringify(t)})).json()}catch{}}async function Kr(o,{merchantId:e,...t}){try{const r=ge(o);return await(await fetch(`${r}/api/v1/checkout/generate-payment-account`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",merchantId:e},body:JSON.stringify(t)})).json()}catch{}}async function q0(o,e){try{const t=ge(o);return await(await fetch(`${t}/api/v1/checkout/details/${e}`,{method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json"}})).json()}catch{}}async function Wr(o,{merchantId:e,...t}){try{const r=ge(o);return await(await fetch(`${r}/api/v1/checkout/generate-payment-walletaddress`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",merchantId:e},body:JSON.stringify(t)})).json()}catch{}}const Gr={key:0,class:"absolute inset-0 grid place-items-center bg-white/60"},j0=a.defineComponent({__name:"checkout-iframe",props:{style:{default:()=>({width:"100%",height:"100vh",border:"0",borderRadius:"6px",overflow:"hidden"})},url:{default:void 0},secretKey:{},environment:{default:"sandbox"},paymentObject:{default:()=>({amount:0,currency:"",email:"",phoneNumber:"",narration:"",redirectUrl:"https://sandbox-merchant.buzapay.com/account/three-ds-status"})}},setup(o){const e=o,t=a.computed(()=>({...e.style})),r=a.ref(null),n=a.ref(null),s=a.ref(""),u=a.ref(!1);function l(){n.value&&n.value.parentNode&&n.value.parentNode.removeChild(n.value),n.value=null}function f(c){var m;l();const g=document.createElement("iframe");g.src=c;const d=e.style;d.width&&(g.style.width=d.width),d.height&&(g.style.height=d.height),d.border&&(g.style.border=d.border),d.borderRadius&&(g.style.borderRadius=d.borderRadius),d.overflow&&(g.style.overflow=d.overflow),(m=r.value)==null||m.appendChild(g),n.value=g}async function i(){if(e.url){f(e.url);return}if(!e.secretKey){s.value="Secret key is required.";return}if(!ze(e.paymentObject)){s.value="Kindly ensure you are passing all the required data.";return}u.value=!0,s.value="";try{const c=await Ue(e.paymentObject,e.environment,e.secretKey);c!=null&&c.isSuccessful&&c.launchUrl?(s.value="Payment link created successfully",f(`${c.launchUrl}&merchantId=${btoa(e.secretKey)}`)):s.value="Failed to create payment link"}catch(c){s.value=(c==null?void 0:c.message)||"Failed to create payment link"}finally{u.value=!1}}return a.onMounted(()=>{r.value&&i()}),a.watch(()=>e.url,c=>{c&&f(c)}),a.onBeforeUnmount(()=>{l()}),(c,g)=>(a.openBlock(),a.createElementBlock("div",{class:"relative",style:a.normalizeStyle(t.value)},[a.createElementVNode("div",{ref_key:"containerRef",ref:r,class:"w-full h-full"},null,512),u.value?(a.openBlock(),a.createElementBlock("div",Gr,[a.createVNode(z0)])):a.createCommentVNode("",!0)],4))}}),Zr={key:1},Xr=a.defineComponent({__name:"checkout-button",props:{secretKey:{},environment:{default:"sandbox"},paymentObject:{default:()=>({amount:0,currency:"",email:"",phoneNumber:"",narration:"",redirectUrl:"https://sandbox-merchant.buzapay.com/account/three-ds-status"})},mode:{default:"redirect"}},setup(o){const e=o,t=a.ref(""),r=a.ref(""),n=a.ref(""),s=a.ref(!1);async function u(){if(!e.secretKey){t.value="Secret key is required.";return}if(!ze(e.paymentObject)){t.value="Kindly ensure you are passing all the required data.";return}s.value=!0,t.value="";try{const c=await Ue(e.paymentObject,e.environment,e.secretKey);c!=null&&c.isSuccessful&&c.launchUrl?(r.value=c.launchUrl,n.value=`${c.launchUrl}&merchantId=${btoa(e.secretKey)}`,t.value="Payment link created successfully",e.mode==="redirect"&&window.open(c.launchUrl,"_blank","noopener,noreferrer")):t.value="Failed to create payment link"}catch(c){t.value=(c==null?void 0:c.message)||"Failed to create payment link"}finally{s.value=!1}}const{secretKey:l,environment:f,mode:i}=e;return(c,g)=>n.value&&a.unref(i)==="iframe"?(a.openBlock(),a.createBlock(j0,{key:0,url:n.value,secretKey:a.unref(l),environment:a.unref(f)},null,8,["url","secretKey","environment"])):(a.openBlock(),a.createElementBlock("div",Zr,[a.createVNode(Ve,{label:"Pay",type:"primary",customClass:"w-full",loading:s.value,onClick:u},null,8,["loading"]),a.createVNode(U0,{errorMessage:t.value},null,8,["errorMessage"])]))}}),Yr=["width","height"],Qr=["fill"],Jr=a.defineComponent({__name:"icon-chevron-left",props:{width:{default:17},height:{default:17},color:{default:"currentColor"}},setup(o){const e=o,t=a.useAttrs(),{width:r,height:n,color:s}=e;return(u,l)=>(a.openBlock(),a.createElementBlock("svg",a.mergeProps({width:a.unref(r),height:a.unref(n),viewBox:"0 0 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.unref(t)),[a.createElementVNode("path",{d:"M10.5 14.28C10.3734 14.28 10.2467 14.2333 10.1467 14.1333L5.80002 9.78668C5.09335 9.08001 5.09335 7.92001 5.80002 7.21335L10.1467 2.86668C10.34 2.67335 10.66 2.67335 10.8534 2.86668C11.0467 3.06001 11.0467 3.38001 10.8534 3.57335L6.50669 7.92001C6.18669 8.24001 6.18669 8.76001 6.50669 9.08001L10.8534 13.4267C11.0467 13.62 11.0467 13.94 10.8534 14.1333C10.7534 14.2267 10.6267 14.28 10.5 14.28Z",fill:a.unref(s)},null,8,Qr)],16,Yr))}}),ea=a.defineComponent({__name:"back",emits:["back"],setup(o,{emit:e}){return(t,r)=>(a.openBlock(),a.createElementBlock("div",{class:"flex items-center gap-2 cursor-pointer",onClick:r[0]||(r[0]=n=>t.$emit("back"))},[a.createVNode(Jr),r[1]||(r[1]=a.createElementVNode("p",{class:"mb-0 text-body-xs font-normal"},"Back",-1))]))}}),ta=["width","height"],ra=["fill"],aa=a.defineComponent({__name:"icon-buzapay-icon",props:{width:{default:15},height:{default:13},color:{default:"currentColor"}},setup(o){const e=o,t=a.useAttrs(),{width:r,height:n,color:s}=e;return(u,l)=>(a.openBlock(),a.createElementBlock("svg",a.mergeProps({width:a.unref(r),height:a.unref(n),viewBox:"0 0 15 13",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.unref(t)),[a.createElementVNode("path",{d:"M9.97919 0.5C10.8854 0.5 11.6276 0.585938 12.2057 0.757812C12.7891 0.924479 13.2188 1.22396 13.4948 1.65625C13.7761 2.08333 13.9167 2.6901 13.9167 3.47656C13.9167 4.1849 13.7526 4.77083 13.4245 5.23438C13.0964 5.69792 12.5938 5.95312 11.9167 6C12.8021 6.08854 13.4401 6.40625 13.8307 6.95312C14.2214 7.49479 14.4167 8.17708 14.4167 9C14.4167 9.71354 14.3334 10.2995 14.1667 10.7578C14.0052 11.2161 13.7318 11.5729 13.3464 11.8281C12.961 12.0781 12.4375 12.2526 11.7761 12.3516C11.1198 12.4505 10.2995 12.5 9.31512 12.5H0.416687V0.5H9.97919ZM2.91669 7.77344H5.97235V11.167L10.2497 5.22754H7.19501V1.83398L2.91669 7.77344ZM5.97235 6.07617H8.2702L7.19501 7.57324V6.9248H4.89716L5.97235 5.42676V6.07617Z",fill:a.unref(s)},null,8,ra)],16,ta))}}),na={class:"checkout-card w-full h-screen flex flex-col items-center justify-center text-white"},sa={class:"flex w-1/2"},ia={class:"flex gap-2 w-full"},oa={class:"flex flex-col gap-8 w-full"},la={class:"bg-off-white rounded-xl"},ua={class:"flex items-center gap-2 justify-center"},ca=a.defineComponent({__name:"card",props:{showBackButton:{type:Boolean,default:!1}},emits:["back","close"],setup(o,{emit:e}){const t=e;return(r,n)=>(a.openBlock(),a.createElementBlock("div",na,[a.createElementVNode("div",sa,[r.showBackButton?(a.openBlock(),a.createBlock(ea,{key:0,onBack:n[0]||(n[0]=s=>t("back"))})):a.createCommentVNode("",!0),a.createElementVNode("div",ia,[a.createElementVNode("div",oa,[a.createElementVNode("div",la,[a.renderSlot(r.$slots,"default")]),a.createElementVNode("div",ua,[n[2]||(n[2]=a.createElementVNode("p",{class:"text-light-white-100 text-body-2xs font-regular"}," Powered by Buzapay ",-1)),a.createVNode(aa,{color:"#E8F4FF"})])]),a.createElementVNode("div",{class:"close-icon flex flex-col items-center justify-center self-start cursor-pointer hover:bg-gray-500",onClick:n[1]||(n[1]=s=>t("close")),role:"button","aria-label":"Close"},[...n[3]||(n[3]=[a.createElementVNode("p",{class:"text-white"},"x",-1)])])])])]))}}),da=["aria-orientation"],xa=["aria-checked","onClick"],ha={key:0,class:"bg-white w-2 h-2 rounded-full"},fa={class:"mb-0 text-body-2xs font-medium text-heading-text"},pa=a.defineComponent({__name:"radio-group",props:{options:{default:()=>[]},type:{default:"vertical"},modelValue:{default:void 0},defaultValue:{default:void 0},className:{default:""}},emits:["update:modelValue","selectedChange"],setup(o,{emit:e}){const t=o,r=e,n=a.computed(()=>t.modelValue!==void 0),s=a.ref("");a.onMounted(()=>{if(n.value)return;const d=t.defaultValue??(t.options.length?t.options[0].value:"");s.value=d,d&&(r("update:modelValue",d),r("selectedChange",d))}),a.watch(()=>t.modelValue,d=>{n.value&&(s.value=d??"")},{immediate:!0});const u=a.computed(()=>n.value?t.modelValue??"":s.value);function l(d){n.value||(s.value=d),r("update:modelValue",d),r("selectedChange",d)}const f=a.computed(()=>t.type==="horizontal"?"flex-row gap-5":"flex-col gap-6"),{options:i,type:c,className:g}=t;return(d,m)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["flex",f.value,a.unref(g)]),role:"radiogroup","aria-orientation":a.unref(c)==="horizontal"?"horizontal":"vertical",tabindex:"0"},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(i),x=>(a.openBlock(),a.createElementBlock("div",{key:x.value,role:"radio","aria-checked":u.value===x.value,tabindex:"-1",onClick:C=>l(x.value),class:"flex items-center gap-2 cursor-pointer transition-colors duration-200"},[a.createElementVNode("div",{class:a.normalizeClass(["w-4 h-4 rounded-full border flex items-center justify-center",u.value===x.value?"bg-orange-500 border-orange-500":"bg-white border-grey-200"])},[u.value===x.value?(a.openBlock(),a.createElementBlock("div",ha)):a.createCommentVNode("",!0)],2),a.createElementVNode("p",fa,a.toDisplayString(x.label),1)],8,xa))),128))],10,da))}}),va=["src","height","alt"],Ae=a.defineComponent({__name:"image",props:{src:{},height:{default:50},width:{default:50},alt:{default:"Image"},customClass:{default:""},isFullWidth:{type:Boolean,default:!1}},emits:["click"],setup(o,{emit:e}){const t=o,r=e,{src:n,height:s,width:u,alt:l,customClass:f,isFullWidth:i}=t;return(c,g)=>(a.openBlock(),a.createElementBlock("img",{src:a.unref(n),height:a.unref(s),alt:a.unref(l),class:a.normalizeClass([a.unref(f),a.unref(i)?"w-full":""]),style:a.normalizeStyle({width:a.unref(i)?"100%":a.unref(u)+"px"}),onClick:g[0]||(g[0]=d=>r("click"))},null,14,va))}});var W=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ma(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}function Ca(o){if(o.__esModule)return o;var e=o.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(o).forEach(function(r){var n=Object.getOwnPropertyDescriptor(o,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return o[r]}})}),t}var K0={exports:{}};function ga(o){throw new Error('Could not dynamically require "'+o+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var tt={exports:{}};const Ba={},_a=Object.freeze(Object.defineProperty({__proto__:null,default:Ba},Symbol.toStringTag,{value:"Module"})),Ea=Ca(_a);var r0;function G(){return r0||(r0=1,function(o,e){(function(t,r){o.exports=r()})(W,function(){var t=t||function(r,n){var s;if(typeof window<"u"&&window.crypto&&(s=window.crypto),typeof self<"u"&&self.crypto&&(s=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(s=globalThis.crypto),!s&&typeof window<"u"&&window.msCrypto&&(s=window.msCrypto),!s&&typeof W<"u"&&W.crypto&&(s=W.crypto),!s&&typeof ga=="function")try{s=Ea}catch{}var u=function(){if(s){if(typeof s.getRandomValues=="function")try{return s.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof s.randomBytes=="function")try{return s.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},l=Object.create||function(){function v(){}return function(h){var _;return v.prototype=h,_=new v,v.prototype=null,_}}(),f={},i=f.lib={},c=i.Base=function(){return{extend:function(v){var h=l(this);return v&&h.mixIn(v),(!h.hasOwnProperty("init")||this.init===h.init)&&(h.init=function(){h.$super.init.apply(this,arguments)}),h.init.prototype=h,h.$super=this,h},create:function(){var v=this.extend();return v.init.apply(v,arguments),v},init:function(){},mixIn:function(v){for(var h in v)v.hasOwnProperty(h)&&(this[h]=v[h]);v.hasOwnProperty("toString")&&(this.toString=v.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),g=i.WordArray=c.extend({init:function(v,h){v=this.words=v||[],h!=n?this.sigBytes=h:this.sigBytes=v.length*4},toString:function(v){return(v||m).stringify(this)},concat:function(v){var h=this.words,_=v.words,b=this.sigBytes,A=v.sigBytes;if(this.clamp(),b%4)for(var w=0;w<A;w++){var V=_[w>>>2]>>>24-w%4*8&255;h[b+w>>>2]|=V<<24-(b+w)%4*8}else for(var T=0;T<A;T+=4)h[b+T>>>2]=_[T>>>2];return this.sigBytes+=A,this},clamp:function(){var v=this.words,h=this.sigBytes;v[h>>>2]&=4294967295<<32-h%4*8,v.length=r.ceil(h/4)},clone:function(){var v=c.clone.call(this);return v.words=this.words.slice(0),v},random:function(v){for(var h=[],_=0;_<v;_+=4)h.push(u());return new g.init(h,v)}}),d=f.enc={},m=d.Hex={stringify:function(v){for(var h=v.words,_=v.sigBytes,b=[],A=0;A<_;A++){var w=h[A>>>2]>>>24-A%4*8&255;b.push((w>>>4).toString(16)),b.push((w&15).toString(16))}return b.join("")},parse:function(v){for(var h=v.length,_=[],b=0;b<h;b+=2)_[b>>>3]|=parseInt(v.substr(b,2),16)<<24-b%8*4;return new g.init(_,h/2)}},x=d.Latin1={stringify:function(v){for(var h=v.words,_=v.sigBytes,b=[],A=0;A<_;A++){var w=h[A>>>2]>>>24-A%4*8&255;b.push(String.fromCharCode(w))}return b.join("")},parse:function(v){for(var h=v.length,_=[],b=0;b<h;b++)_[b>>>2]|=(v.charCodeAt(b)&255)<<24-b%4*8;return new g.init(_,h)}},C=d.Utf8={stringify:function(v){try{return decodeURIComponent(escape(x.stringify(v)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(v){return x.parse(unescape(encodeURIComponent(v)))}},p=i.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new g.init,this._nDataBytes=0},_append:function(v){typeof v=="string"&&(v=C.parse(v)),this._data.concat(v),this._nDataBytes+=v.sigBytes},_process:function(v){var h,_=this._data,b=_.words,A=_.sigBytes,w=this.blockSize,V=w*4,T=A/V;v?T=r.ceil(T):T=r.max((T|0)-this._minBufferSize,0);var k=T*w,S=r.min(k*4,A);if(k){for(var F=0;F<k;F+=w)this._doProcessBlock(b,F);h=b.splice(0,k),_.sigBytes-=S}return new g.init(h,S)},clone:function(){var v=c.clone.call(this);return v._data=this._data.clone(),v},_minBufferSize:0});i.Hasher=p.extend({cfg:c.extend(),init:function(v){this.cfg=this.cfg.extend(v),this.reset()},reset:function(){p.reset.call(this),this._doReset()},update:function(v){return this._append(v),this._process(),this},finalize:function(v){v&&this._append(v);var h=this._doFinalize();return h},blockSize:16,_createHelper:function(v){return function(h,_){return new v.init(_).finalize(h)}},_createHmacHelper:function(v){return function(h,_){return new E.HMAC.init(v,_).finalize(h)}}});var E=f.algo={};return f}(Math);return t})}(tt)),tt.exports}var rt={exports:{}},a0;function Ze(){return a0||(a0=1,function(o,e){(function(t,r){o.exports=r(G())})(W,function(t){return function(r){var n=t,s=n.lib,u=s.Base,l=s.WordArray,f=n.x64={};f.Word=u.extend({init:function(i,c){this.high=i,this.low=c}}),f.WordArray=u.extend({init:function(i,c){i=this.words=i||[],c!=r?this.sigBytes=c:this.sigBytes=i.length*8},toX32:function(){for(var i=this.words,c=i.length,g=[],d=0;d<c;d++){var m=i[d];g.push(m.high),g.push(m.low)}return l.create(g,this.sigBytes)},clone:function(){for(var i=u.clone.call(this),c=i.words=this.words.slice(0),g=c.length,d=0;d<g;d++)c[d]=c[d].clone();return i}})}(),t})}(rt)),rt.exports}var at={exports:{}},n0;function ya(){return n0||(n0=1,function(o,e){(function(t,r){o.exports=r(G())})(W,function(t){return function(){if(typeof ArrayBuffer=="function"){var r=t,n=r.lib,s=n.WordArray,u=s.init,l=s.init=function(f){if(f instanceof ArrayBuffer&&(f=new Uint8Array(f)),(f instanceof Int8Array||typeof Uint8ClampedArray<"u"&&f instanceof Uint8ClampedArray||f instanceof Int16Array||f instanceof Uint16Array||f instanceof Int32Array||f instanceof Uint32Array||f instanceof Float32Array||f instanceof Float64Array)&&(f=new Uint8Array(f.buffer,f.byteOffset,f.byteLength)),f instanceof Uint8Array){for(var i=f.byteLength,c=[],g=0;g<i;g++)c[g>>>2]|=f[g]<<24-g%4*8;u.call(this,c,i)}else u.apply(this,arguments)};l.prototype=s}}(),t.lib.WordArray})}(at)),at.exports}var nt={exports:{}},s0;function ka(){return s0||(s0=1,function(o,e){(function(t,r){o.exports=r(G())})(W,function(t){return function(){var r=t,n=r.lib,s=n.WordArray,u=r.enc;u.Utf16=u.Utf16BE={stringify:function(f){for(var i=f.words,c=f.sigBytes,g=[],d=0;d<c;d+=2){var m=i[d>>>2]>>>16-d%4*8&65535;g.push(String.fromCharCode(m))}return g.join("")},parse:function(f){for(var i=f.length,c=[],g=0;g<i;g++)c[g>>>1]|=f.charCodeAt(g)<<16-g%2*16;return s.create(c,i*2)}},u.Utf16LE={stringify:function(f){for(var i=f.words,c=f.sigBytes,g=[],d=0;d<c;d+=2){var m=l(i[d>>>2]>>>16-d%4*8&65535);g.push(String.fromCharCode(m))}return g.join("")},parse:function(f){for(var i=f.length,c=[],g=0;g<i;g++)c[g>>>1]|=l(f.charCodeAt(g)<<16-g%2*16);return s.create(c,i*2)}};function l(f){return f<<8&4278255360|f>>>8&16711935}}(),t.enc.Utf16})}(nt)),nt.exports}var st={exports:{}},i0;function Ne(){return i0||(i0=1,function(o,e){(function(t,r){o.exports=r(G())})(W,function(t){return function(){var r=t,n=r.lib,s=n.WordArray,u=r.enc;u.Base64={stringify:function(f){var i=f.words,c=f.sigBytes,g=this._map;f.clamp();for(var d=[],m=0;m<c;m+=3)for(var x=i[m>>>2]>>>24-m%4*8&255,C=i[m+1>>>2]>>>24-(m+1)%4*8&255,p=i[m+2>>>2]>>>24-(m+2)%4*8&255,E=x<<16|C<<8|p,v=0;v<4&&m+v*.75<c;v++)d.push(g.charAt(E>>>6*(3-v)&63));var h=g.charAt(64);if(h)for(;d.length%4;)d.push(h);return d.join("")},parse:function(f){var i=f.length,c=this._map,g=this._reverseMap;if(!g){g=this._reverseMap=[];for(var d=0;d<c.length;d++)g[c.charCodeAt(d)]=d}var m=c.charAt(64);if(m){var x=f.indexOf(m);x!==-1&&(i=x)}return l(f,i,g)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function l(f,i,c){for(var g=[],d=0,m=0;m<i;m++)if(m%4){var x=c[f.charCodeAt(m-1)]<<m%4*2,C=c[f.charCodeAt(m)]>>>6-m%4*2,p=x|C;g[d>>>2]|=p<<24-d%4*8,d++}return s.create(g,d)}}(),t.enc.Base64})}(st)),st.exports}var it={exports:{}},o0;function Aa(){return o0||(o0=1,function(o,e){(function(t,r){o.exports=r(G())})(W,function(t){return function(){var r=t,n=r.lib,s=n.WordArray,u=r.enc;u.Base64url={stringify:function(f,i){i===void 0&&(i=!0);var c=f.words,g=f.sigBytes,d=i?this._safe_map:this._map;f.clamp();for(var m=[],x=0;x<g;x+=3)for(var C=c[x>>>2]>>>24-x%4*8&255,p=c[x+1>>>2]>>>24-(x+1)%4*8&255,E=c[x+2>>>2]>>>24-(x+2)%4*8&255,v=C<<16|p<<8|E,h=0;h<4&&x+h*.75<g;h++)m.push(d.charAt(v>>>6*(3-h)&63));var _=d.charAt(64);if(_)for(;m.length%4;)m.push(_);return m.join("")},parse:function(f,i){i===void 0&&(i=!0);var c=f.length,g=i?this._safe_map:this._map,d=this._reverseMap;if(!d){d=this._reverseMap=[];for(var m=0;m<g.length;m++)d[g.charCodeAt(m)]=m}var x=g.charAt(64);if(x){var C=f.indexOf(x);C!==-1&&(c=C)}return l(f,c,d)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function l(f,i,c){for(var g=[],d=0,m=0;m<i;m++)if(m%4){var x=c[f.charCodeAt(m-1)]<<m%4*2,C=c[f.charCodeAt(m)]>>>6-m%4*2,p=x|C;g[d>>>2]|=p<<24-d%4*8,d++}return s.create(g,d)}}(),t.enc.Base64url})}(it)),it.exports}var ot={exports:{}},l0;function Re(){return l0||(l0=1,function(o,e){(function(t,r){o.exports=r(G())})(W,function(t){return function(r){var n=t,s=n.lib,u=s.WordArray,l=s.Hasher,f=n.algo,i=[];(function(){for(var C=0;C<64;C++)i[C]=r.abs(r.sin(C+1))*4294967296|0})();var c=f.MD5=l.extend({_doReset:function(){this._hash=new u.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(C,p){for(var E=0;E<16;E++){var v=p+E,h=C[v];C[v]=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360}var _=this._hash.words,b=C[p+0],A=C[p+1],w=C[p+2],V=C[p+3],T=C[p+4],k=C[p+5],S=C[p+6],F=C[p+7],B=C[p+8],y=C[p+9],M=C[p+10],$=C[p+11],L=C[p+12],H=C[p+13],P=C[p+14],O=C[p+15],D=_[0],R=_[1],I=_[2],N=_[3];D=g(D,R,I,N,b,7,i[0]),N=g(N,D,R,I,A,12,i[1]),I=g(I,N,D,R,w,17,i[2]),R=g(R,I,N,D,V,22,i[3]),D=g(D,R,I,N,T,7,i[4]),N=g(N,D,R,I,k,12,i[5]),I=g(I,N,D,R,S,17,i[6]),R=g(R,I,N,D,F,22,i[7]),D=g(D,R,I,N,B,7,i[8]),N=g(N,D,R,I,y,12,i[9]),I=g(I,N,D,R,M,17,i[10]),R=g(R,I,N,D,$,22,i[11]),D=g(D,R,I,N,L,7,i[12]),N=g(N,D,R,I,H,12,i[13]),I=g(I,N,D,R,P,17,i[14]),R=g(R,I,N,D,O,22,i[15]),D=d(D,R,I,N,A,5,i[16]),N=d(N,D,R,I,S,9,i[17]),I=d(I,N,D,R,$,14,i[18]),R=d(R,I,N,D,b,20,i[19]),D=d(D,R,I,N,k,5,i[20]),N=d(N,D,R,I,M,9,i[21]),I=d(I,N,D,R,O,14,i[22]),R=d(R,I,N,D,T,20,i[23]),D=d(D,R,I,N,y,5,i[24]),N=d(N,D,R,I,P,9,i[25]),I=d(I,N,D,R,V,14,i[26]),R=d(R,I,N,D,B,20,i[27]),D=d(D,R,I,N,H,5,i[28]),N=d(N,D,R,I,w,9,i[29]),I=d(I,N,D,R,F,14,i[30]),R=d(R,I,N,D,L,20,i[31]),D=m(D,R,I,N,k,4,i[32]),N=m(N,D,R,I,B,11,i[33]),I=m(I,N,D,R,$,16,i[34]),R=m(R,I,N,D,P,23,i[35]),D=m(D,R,I,N,A,4,i[36]),N=m(N,D,R,I,T,11,i[37]),I=m(I,N,D,R,F,16,i[38]),R=m(R,I,N,D,M,23,i[39]),D=m(D,R,I,N,H,4,i[40]),N=m(N,D,R,I,b,11,i[41]),I=m(I,N,D,R,V,16,i[42]),R=m(R,I,N,D,S,23,i[43]),D=m(D,R,I,N,y,4,i[44]),N=m(N,D,R,I,L,11,i[45]),I=m(I,N,D,R,O,16,i[46]),R=m(R,I,N,D,w,23,i[47]),D=x(D,R,I,N,b,6,i[48]),N=x(N,D,R,I,F,10,i[49]),I=x(I,N,D,R,P,15,i[50]),R=x(R,I,N,D,k,21,i[51]),D=x(D,R,I,N,L,6,i[52]),N=x(N,D,R,I,V,10,i[53]),I=x(I,N,D,R,M,15,i[54]),R=x(R,I,N,D,A,21,i[55]),D=x(D,R,I,N,B,6,i[56]),N=x(N,D,R,I,O,10,i[57]),I=x(I,N,D,R,S,15,i[58]),R=x(R,I,N,D,H,21,i[59]),D=x(D,R,I,N,T,6,i[60]),N=x(N,D,R,I,$,10,i[61]),I=x(I,N,D,R,w,15,i[62]),R=x(R,I,N,D,y,21,i[63]),_[0]=_[0]+D|0,_[1]=_[1]+R|0,_[2]=_[2]+I|0,_[3]=_[3]+N|0},_doFinalize:function(){var C=this._data,p=C.words,E=this._nDataBytes*8,v=C.sigBytes*8;p[v>>>5]|=128<<24-v%32;var h=r.floor(E/4294967296),_=E;p[(v+64>>>9<<4)+15]=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360,p[(v+64>>>9<<4)+14]=(_<<8|_>>>24)&16711935|(_<<24|_>>>8)&4278255360,C.sigBytes=(p.length+1)*4,this._process();for(var b=this._hash,A=b.words,w=0;w<4;w++){var V=A[w];A[w]=(V<<8|V>>>24)&16711935|(V<<24|V>>>8)&4278255360}return b},clone:function(){var C=l.clone.call(this);return C._hash=this._hash.clone(),C}});function g(C,p,E,v,h,_,b){var A=C+(p&E|~p&v)+h+b;return(A<<_|A>>>32-_)+p}function d(C,p,E,v,h,_,b){var A=C+(p&v|E&~v)+h+b;return(A<<_|A>>>32-_)+p}function m(C,p,E,v,h,_,b){var A=C+(p^E^v)+h+b;return(A<<_|A>>>32-_)+p}function x(C,p,E,v,h,_,b){var A=C+(E^(p|~v))+h+b;return(A<<_|A>>>32-_)+p}n.MD5=l._createHelper(c),n.HmacMD5=l._createHmacHelper(c)}(Math),t.MD5})}(ot)),ot.exports}var lt={exports:{}},u0;function W0(){return u0||(u0=1,function(o,e){(function(t,r){o.exports=r(G())})(W,function(t){return function(){var r=t,n=r.lib,s=n.WordArray,u=n.Hasher,l=r.algo,f=[],i=l.SHA1=u.extend({_doReset:function(){this._hash=new s.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(c,g){for(var d=this._hash.words,m=d[0],x=d[1],C=d[2],p=d[3],E=d[4],v=0;v<80;v++){if(v<16)f[v]=c[g+v]|0;else{var h=f[v-3]^f[v-8]^f[v-14]^f[v-16];f[v]=h<<1|h>>>31}var _=(m<<5|m>>>27)+E+f[v];v<20?_+=(x&C|~x&p)+1518500249:v<40?_+=(x^C^p)+1859775393:v<60?_+=(x&C|x&p|C&p)-1894007588:_+=(x^C^p)-899497514,E=p,p=C,C=x<<30|x>>>2,x=m,m=_}d[0]=d[0]+m|0,d[1]=d[1]+x|0,d[2]=d[2]+C|0,d[3]=d[3]+p|0,d[4]=d[4]+E|0},_doFinalize:function(){var c=this._data,g=c.words,d=this._nDataBytes*8,m=c.sigBytes*8;return g[m>>>5]|=128<<24-m%32,g[(m+64>>>9<<4)+14]=Math.floor(d/4294967296),g[(m+64>>>9<<4)+15]=d,c.sigBytes=g.length*4,this._process(),this._hash},clone:function(){var c=u.clone.call(this);return c._hash=this._hash.clone(),c}});r.SHA1=u._createHelper(i),r.HmacSHA1=u._createHmacHelper(i)}(),t.SHA1})}(lt)),lt.exports}var ut={exports:{}},c0;function $t(){return c0||(c0=1,function(o,e){(function(t,r){o.exports=r(G())})(W,function(t){return function(r){var n=t,s=n.lib,u=s.WordArray,l=s.Hasher,f=n.algo,i=[],c=[];(function(){function m(E){for(var v=r.sqrt(E),h=2;h<=v;h++)if(!(E%h))return!1;return!0}function x(E){return(E-(E|0))*4294967296|0}for(var C=2,p=0;p<64;)m(C)&&(p<8&&(i[p]=x(r.pow(C,1/2))),c[p]=x(r.pow(C,1/3)),p++),C++})();var g=[],d=f.SHA256=l.extend({_doReset:function(){this._hash=new u.init(i.slice(0))},_doProcessBlock:function(m,x){for(var C=this._hash.words,p=C[0],E=C[1],v=C[2],h=C[3],_=C[4],b=C[5],A=C[6],w=C[7],V=0;V<64;V++){if(V<16)g[V]=m[x+V]|0;else{var T=g[V-15],k=(T<<25|T>>>7)^(T<<14|T>>>18)^T>>>3,S=g[V-2],F=(S<<15|S>>>17)^(S<<13|S>>>19)^S>>>10;g[V]=k+g[V-7]+F+g[V-16]}var B=_&b^~_&A,y=p&E^p&v^E&v,M=(p<<30|p>>>2)^(p<<19|p>>>13)^(p<<10|p>>>22),$=(_<<26|_>>>6)^(_<<21|_>>>11)^(_<<7|_>>>25),L=w+$+B+c[V]+g[V],H=M+y;w=A,A=b,b=_,_=h+L|0,h=v,v=E,E=p,p=L+H|0}C[0]=C[0]+p|0,C[1]=C[1]+E|0,C[2]=C[2]+v|0,C[3]=C[3]+h|0,C[4]=C[4]+_|0,C[5]=C[5]+b|0,C[6]=C[6]+A|0,C[7]=C[7]+w|0},_doFinalize:function(){var m=this._data,x=m.words,C=this._nDataBytes*8,p=m.sigBytes*8;return x[p>>>5]|=128<<24-p%32,x[(p+64>>>9<<4)+14]=r.floor(C/4294967296),x[(p+64>>>9<<4)+15]=C,m.sigBytes=x.length*4,this._process(),this._hash},clone:function(){var m=l.clone.call(this);return m._hash=this._hash.clone(),m}});n.SHA256=l._createHelper(d),n.HmacSHA256=l._createHmacHelper(d)}(Math),t.SHA256})}(ut)),ut.exports}var ct={exports:{}},d0;function ba(){return d0||(d0=1,function(o,e){(function(t,r,n){o.exports=r(G(),$t())})(W,function(t){return function(){var r=t,n=r.lib,s=n.WordArray,u=r.algo,l=u.SHA256,f=u.SHA224=l.extend({_doReset:function(){this._hash=new s.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var i=l._doFinalize.call(this);return i.sigBytes-=4,i}});r.SHA224=l._createHelper(f),r.HmacSHA224=l._createHmacHelper(f)}(),t.SHA224})}(ct)),ct.exports}var dt={exports:{}},x0;function G0(){return x0||(x0=1,function(o,e){(function(t,r,n){o.exports=r(G(),Ze())})(W,function(t){return function(){var r=t,n=r.lib,s=n.Hasher,u=r.x64,l=u.Word,f=u.WordArray,i=r.algo;function c(){return l.create.apply(l,arguments)}var g=[c(1116352408,3609767458),c(1899447441,602891725),c(3049323471,3964484399),c(3921009573,2173295548),c(961987163,4081628472),c(1508970993,3053834265),c(2453635748,2937671579),c(2870763221,3664609560),c(3624381080,2734883394),c(310598401,1164996542),c(607225278,1323610764),c(1426881987,3590304994),c(1925078388,4068182383),c(2162078206,991336113),c(2614888103,633803317),c(3248222580,3479774868),c(3835390401,2666613458),c(4022224774,944711139),c(264347078,2341262773),c(604807628,2007800933),c(770255983,1495990901),c(1249150122,1856431235),c(1555081692,3175218132),c(1996064986,2198950837),c(2554220882,3999719339),c(2821834349,766784016),c(2952996808,2566594879),c(3210313671,3203337956),c(3336571891,1034457026),c(3584528711,2466948901),c(113926993,3758326383),c(338241895,168717936),c(666307205,1188179964),c(773529912,1546045734),c(1294757372,1522805485),c(1396182291,2643833823),c(1695183700,2343527390),c(1986661051,1014477480),c(2177026350,1206759142),c(2456956037,344077627),c(2730485921,1290863460),c(2820302411,3158454273),c(3259730800,3505952657),c(3345764771,106217008),c(3516065817,3606008344),c(3600352804,1432725776),c(4094571909,1467031594),c(275423344,851169720),c(430227734,3100823752),c(506948616,1363258195),c(659060556,3750685593),c(883997877,3785050280),c(958139571,3318307427),c(1322822218,3812723403),c(1537002063,2003034995),c(1747873779,3602036899),c(1955562222,1575990012),c(2024104815,1125592928),c(2227730452,2716904306),c(2361852424,442776044),c(2428436474,593698344),c(2756734187,3733110249),c(3204031479,2999351573),c(3329325298,3815920427),c(3391569614,3928383900),c(3515267271,566280711),c(3940187606,3454069534),c(4118630271,4000239992),c(116418474,1914138554),c(174292421,2731055270),c(289380356,3203993006),c(460393269,320620315),c(685471733,587496836),c(852142971,1086792851),c(1017036298,365543100),c(1126000580,2618297676),c(1288033470,3409855158),c(1501505948,4234509866),c(1607167915,987167468),c(1816402316,1246189591)],d=[];(function(){for(var x=0;x<80;x++)d[x]=c()})();var m=i.SHA512=s.extend({_doReset:function(){this._hash=new f.init([new l.init(1779033703,4089235720),new l.init(3144134277,2227873595),new l.init(1013904242,4271175723),new l.init(2773480762,1595750129),new l.init(1359893119,2917565137),new l.init(2600822924,725511199),new l.init(528734635,4215389547),new l.init(1541459225,327033209)])},_doProcessBlock:function(x,C){for(var p=this._hash.words,E=p[0],v=p[1],h=p[2],_=p[3],b=p[4],A=p[5],w=p[6],V=p[7],T=E.high,k=E.low,S=v.high,F=v.low,B=h.high,y=h.low,M=_.high,$=_.low,L=b.high,H=b.low,P=A.high,O=A.low,D=w.high,R=w.low,I=V.high,N=V.low,X=T,Z=k,Q=S,j=F,Be=B,ve=y,Ie=M,_e=$,ae=L,ee=H,De=P,Ee=O,he=D,Y=R,oe=I,de=N,le=0;le<80;le++){var ne,U,ye=d[le];if(le<16)U=ye.high=x[C+le*2]|0,ne=ye.low=x[C+le*2+1]|0;else{var Te=d[le-15],fe=Te.high,Pe=Te.low,tr=(fe>>>1|Pe<<31)^(fe>>>8|Pe<<24)^fe>>>7,Ut=(Pe>>>1|fe<<31)^(Pe>>>8|fe<<24)^(Pe>>>7|fe<<25),qt=d[le-2],Me=qt.high,Oe=qt.low,rr=(Me>>>19|Oe<<13)^(Me<<3|Oe>>>29)^Me>>>6,jt=(Oe>>>19|Me<<13)^(Oe<<3|Me>>>29)^(Oe>>>6|Me<<26),Kt=d[le-7],ar=Kt.high,nr=Kt.low,Wt=d[le-16],sr=Wt.high,Gt=Wt.low;ne=Ut+nr,U=tr+ar+(ne>>>0<Ut>>>0?1:0),ne=ne+jt,U=U+rr+(ne>>>0<jt>>>0?1:0),ne=ne+Gt,U=U+sr+(ne>>>0<Gt>>>0?1:0),ye.high=U,ye.low=ne}var ir=ae&De^~ae&he,Zt=ee&Ee^~ee&Y,or=X&Q^X&Be^Q&Be,lr=Z&j^Z&ve^j&ve,ur=(X>>>28|Z<<4)^(X<<30|Z>>>2)^(X<<25|Z>>>7),Xt=(Z>>>28|X<<4)^(Z<<30|X>>>2)^(Z<<25|X>>>7),cr=(ae>>>14|ee<<18)^(ae>>>18|ee<<14)^(ae<<23|ee>>>9),dr=(ee>>>14|ae<<18)^(ee>>>18|ae<<14)^(ee<<23|ae>>>9),Yt=g[le],xr=Yt.high,Qt=Yt.low,se=de+dr,ke=oe+cr+(se>>>0<de>>>0?1:0),se=se+Zt,ke=ke+ir+(se>>>0<Zt>>>0?1:0),se=se+Qt,ke=ke+xr+(se>>>0<Qt>>>0?1:0),se=se+ne,ke=ke+U+(se>>>0<ne>>>0?1:0),Jt=Xt+lr,hr=ur+or+(Jt>>>0<Xt>>>0?1:0);oe=he,de=Y,he=De,Y=Ee,De=ae,Ee=ee,ee=_e+se|0,ae=Ie+ke+(ee>>>0<_e>>>0?1:0)|0,Ie=Be,_e=ve,Be=Q,ve=j,Q=X,j=Z,Z=se+Jt|0,X=ke+hr+(Z>>>0<se>>>0?1:0)|0}k=E.low=k+Z,E.high=T+X+(k>>>0<Z>>>0?1:0),F=v.low=F+j,v.high=S+Q+(F>>>0<j>>>0?1:0),y=h.low=y+ve,h.high=B+Be+(y>>>0<ve>>>0?1:0),$=_.low=$+_e,_.high=M+Ie+($>>>0<_e>>>0?1:0),H=b.low=H+ee,b.high=L+ae+(H>>>0<ee>>>0?1:0),O=A.low=O+Ee,A.high=P+De+(O>>>0<Ee>>>0?1:0),R=w.low=R+Y,w.high=D+he+(R>>>0<Y>>>0?1:0),N=V.low=N+de,V.high=I+oe+(N>>>0<de>>>0?1:0)},_doFinalize:function(){var x=this._data,C=x.words,p=this._nDataBytes*8,E=x.sigBytes*8;C[E>>>5]|=128<<24-E%32,C[(E+128>>>10<<5)+30]=Math.floor(p/4294967296),C[(E+128>>>10<<5)+31]=p,x.sigBytes=C.length*4,this._process();var v=this._hash.toX32();return v},clone:function(){var x=s.clone.call(this);return x._hash=this._hash.clone(),x},blockSize:1024/32});r.SHA512=s._createHelper(m),r.HmacSHA512=s._createHmacHelper(m)}(),t.SHA512})}(dt)),dt.exports}var xt={exports:{}},h0;function Fa(){return h0||(h0=1,function(o,e){(function(t,r,n){o.exports=r(G(),Ze(),G0())})(W,function(t){return function(){var r=t,n=r.x64,s=n.Word,u=n.WordArray,l=r.algo,f=l.SHA512,i=l.SHA384=f.extend({_doReset:function(){this._hash=new u.init([new s.init(3418070365,3238371032),new s.init(1654270250,914150663),new s.init(2438529370,812702999),new s.init(355462360,4144912697),new s.init(1731405415,4290775857),new s.init(2394180231,1750603025),new s.init(3675008525,1694076839),new s.init(1203062813,3204075428)])},_doFinalize:function(){var c=f._doFinalize.call(this);return c.sigBytes-=16,c}});r.SHA384=f._createHelper(i),r.HmacSHA384=f._createHmacHelper(i)}(),t.SHA384})}(xt)),xt.exports}var ht={exports:{}},f0;function Da(){return f0||(f0=1,function(o,e){(function(t,r,n){o.exports=r(G(),Ze())})(W,function(t){return function(r){var n=t,s=n.lib,u=s.WordArray,l=s.Hasher,f=n.x64,i=f.Word,c=n.algo,g=[],d=[],m=[];(function(){for(var p=1,E=0,v=0;v<24;v++){g[p+5*E]=(v+1)*(v+2)/2%64;var h=E%5,_=(2*p+3*E)%5;p=h,E=_}for(var p=0;p<5;p++)for(var E=0;E<5;E++)d[p+5*E]=E+(2*p+3*E)%5*5;for(var b=1,A=0;A<24;A++){for(var w=0,V=0,T=0;T<7;T++){if(b&1){var k=(1<<T)-1;k<32?V^=1<<k:w^=1<<k-32}b&128?b=b<<1^113:b<<=1}m[A]=i.create(w,V)}})();var x=[];(function(){for(var p=0;p<25;p++)x[p]=i.create()})();var C=c.SHA3=l.extend({cfg:l.cfg.extend({outputLength:512}),_doReset:function(){for(var p=this._state=[],E=0;E<25;E++)p[E]=new i.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(p,E){for(var v=this._state,h=this.blockSize/2,_=0;_<h;_++){var b=p[E+2*_],A=p[E+2*_+1];b=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360,A=(A<<8|A>>>24)&16711935|(A<<24|A>>>8)&4278255360;var w=v[_];w.high^=A,w.low^=b}for(var V=0;V<24;V++){for(var T=0;T<5;T++){for(var k=0,S=0,F=0;F<5;F++){var w=v[T+5*F];k^=w.high,S^=w.low}var B=x[T];B.high=k,B.low=S}for(var T=0;T<5;T++)for(var y=x[(T+4)%5],M=x[(T+1)%5],$=M.high,L=M.low,k=y.high^($<<1|L>>>31),S=y.low^(L<<1|$>>>31),F=0;F<5;F++){var w=v[T+5*F];w.high^=k,w.low^=S}for(var H=1;H<25;H++){var k,S,w=v[H],P=w.high,O=w.low,D=g[H];D<32?(k=P<<D|O>>>32-D,S=O<<D|P>>>32-D):(k=O<<D-32|P>>>64-D,S=P<<D-32|O>>>64-D);var R=x[d[H]];R.high=k,R.low=S}var I=x[0],N=v[0];I.high=N.high,I.low=N.low;for(var T=0;T<5;T++)for(var F=0;F<5;F++){var H=T+5*F,w=v[H],X=x[H],Z=x[(T+1)%5+5*F],Q=x[(T+2)%5+5*F];w.high=X.high^~Z.high&Q.high,w.low=X.low^~Z.low&Q.low}var w=v[0],j=m[V];w.high^=j.high,w.low^=j.low}},_doFinalize:function(){var p=this._data,E=p.words;this._nDataBytes*8;var v=p.sigBytes*8,h=this.blockSize*32;E[v>>>5]|=1<<24-v%32,E[(r.ceil((v+1)/h)*h>>>5)-1]|=128,p.sigBytes=E.length*4,this._process();for(var _=this._state,b=this.cfg.outputLength/8,A=b/8,w=[],V=0;V<A;V++){var T=_[V],k=T.high,S=T.low;k=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360,S=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360,w.push(S),w.push(k)}return new u.init(w,b)},clone:function(){for(var p=l.clone.call(this),E=p._state=this._state.slice(0),v=0;v<25;v++)E[v]=E[v].clone();return p}});n.SHA3=l._createHelper(C),n.HmacSHA3=l._createHmacHelper(C)}(Math),t.SHA3})}(ht)),ht.exports}var ft={exports:{}},p0;function wa(){return p0||(p0=1,function(o,e){(function(t,r){o.exports=r(G())})(W,function(t){/** @preserve
2
2
  (c) 2012 by Cédric Mesnil. All rights reserved.
3
3
 
4
4
  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
@@ -7,9 +7,9 @@
7
7
  - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
8
8
 
9
9
  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
10
- */return function(r){var n=t,s=n.lib,u=s.WordArray,l=s.Hasher,f=n.algo,i=u.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),c=u.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),g=u.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),d=u.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),m=u.create([0,1518500249,1859775393,2400959708,2840853838]),x=u.create([1352829926,1548603684,1836072691,2053994217,0]),C=f.RIPEMD160=l.extend({_doReset:function(){this._hash=u.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(A,w){for(var V=0;V<16;V++){var T=w+V,k=A[T];A[T]=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360}var S=this._hash.words,F=m.words,B=x.words,y=i.words,M=c.words,$=g.words,L=d.words,H,P,O,D,R,I,N,X,Z,Q;I=H=S[0],N=P=S[1],X=O=S[2],Z=D=S[3],Q=R=S[4];for(var j,V=0;V<80;V+=1)j=H+A[w+y[V]]|0,V<16?j+=v(P,O,D)+F[0]:V<32?j+=E(P,O,D)+F[1]:V<48?j+=p(P,O,D)+F[2]:V<64?j+=h(P,O,D)+F[3]:j+=_(P,O,D)+F[4],j=j|0,j=b(j,$[V]),j=j+R|0,H=R,R=D,D=b(O,10),O=P,P=j,j=I+A[w+M[V]]|0,V<16?j+=_(N,X,Z)+B[0]:V<32?j+=h(N,X,Z)+B[1]:V<48?j+=p(N,X,Z)+B[2]:V<64?j+=E(N,X,Z)+B[3]:j+=v(N,X,Z)+B[4],j=j|0,j=b(j,L[V]),j=j+Q|0,I=Q,Q=Z,Z=b(X,10),X=N,N=j;j=S[1]+O+Z|0,S[1]=S[2]+D+Q|0,S[2]=S[3]+R+I|0,S[3]=S[4]+H+N|0,S[4]=S[0]+P+X|0,S[0]=j},_doFinalize:function(){var A=this._data,w=A.words,V=this._nDataBytes*8,T=A.sigBytes*8;w[T>>>5]|=128<<24-T%32,w[(T+64>>>9<<4)+14]=(V<<8|V>>>24)&16711935|(V<<24|V>>>8)&4278255360,A.sigBytes=(w.length+1)*4,this._process();for(var k=this._hash,S=k.words,F=0;F<5;F++){var B=S[F];S[F]=(B<<8|B>>>24)&16711935|(B<<24|B>>>8)&4278255360}return k},clone:function(){var A=l.clone.call(this);return A._hash=this._hash.clone(),A}});function v(A,w,V){return A^w^V}function E(A,w,V){return A&w|~A&V}function p(A,w,V){return(A|~w)^V}function h(A,w,V){return A&V|w&~V}function _(A,w,V){return A^(w|~V)}function b(A,w){return A<<w|A>>>32-w}n.RIPEMD160=l._createHelper(C),n.HmacRIPEMD160=l._createHmacHelper(C)}(),t.RIPEMD160})}(ft)),ft.exports}var pt={exports:{}},v0;function Lt(){return v0||(v0=1,function(o,e){(function(t,r){o.exports=r(G())})(W,function(t){(function(){var r=t,n=r.lib,s=n.Base,u=r.enc,l=u.Utf8,f=r.algo;f.HMAC=s.extend({init:function(i,c){i=this._hasher=new i.init,typeof c=="string"&&(c=l.parse(c));var g=i.blockSize,d=g*4;c.sigBytes>d&&(c=i.finalize(c)),c.clamp();for(var m=this._oKey=c.clone(),x=this._iKey=c.clone(),C=m.words,v=x.words,E=0;E<g;E++)C[E]^=1549556828,v[E]^=909522486;m.sigBytes=x.sigBytes=d,this.reset()},reset:function(){var i=this._hasher;i.reset(),i.update(this._iKey)},update:function(i){return this._hasher.update(i),this},finalize:function(i){var c=this._hasher,g=c.finalize(i);c.reset();var d=c.finalize(this._oKey.clone().concat(g));return d}})})()})}(pt)),pt.exports}var vt={exports:{}},m0;function Sa(){return m0||(m0=1,function(o,e){(function(t,r,n){o.exports=r(G(),$t(),Lt())})(W,function(t){return function(){var r=t,n=r.lib,s=n.Base,u=n.WordArray,l=r.algo,f=l.SHA256,i=l.HMAC,c=l.PBKDF2=s.extend({cfg:s.extend({keySize:128/32,hasher:f,iterations:25e4}),init:function(g){this.cfg=this.cfg.extend(g)},compute:function(g,d){for(var m=this.cfg,x=i.create(m.hasher,g),C=u.create(),v=u.create([1]),E=C.words,p=v.words,h=m.keySize,_=m.iterations;E.length<h;){var b=x.update(d).finalize(v);x.reset();for(var A=b.words,w=A.length,V=b,T=1;T<_;T++){V=x.finalize(V),x.reset();for(var k=V.words,S=0;S<w;S++)A[S]^=k[S]}C.concat(b),p[0]++}return C.sigBytes=h*4,C}});r.PBKDF2=function(g,d,m){return c.create(m).compute(g,d)}}(),t.PBKDF2})}(vt)),vt.exports}var mt={exports:{}},C0;function Fe(){return C0||(C0=1,function(o,e){(function(t,r,n){o.exports=r(G(),W0(),Lt())})(W,function(t){return function(){var r=t,n=r.lib,s=n.Base,u=n.WordArray,l=r.algo,f=l.MD5,i=l.EvpKDF=s.extend({cfg:s.extend({keySize:128/32,hasher:f,iterations:1}),init:function(c){this.cfg=this.cfg.extend(c)},compute:function(c,g){for(var d,m=this.cfg,x=m.hasher.create(),C=u.create(),v=C.words,E=m.keySize,p=m.iterations;v.length<E;){d&&x.update(d),d=x.update(c).finalize(g),x.reset();for(var h=1;h<p;h++)d=x.finalize(d),x.reset();C.concat(d)}return C.sigBytes=E*4,C}});r.EvpKDF=function(c,g,d){return i.create(d).compute(c,g)}}(),t.EvpKDF})}(mt)),mt.exports}var Ct={exports:{}},g0;function J(){return g0||(g0=1,function(o,e){(function(t,r,n){o.exports=r(G(),Fe())})(W,function(t){t.lib.Cipher||function(r){var n=t,s=n.lib,u=s.Base,l=s.WordArray,f=s.BufferedBlockAlgorithm,i=n.enc;i.Utf8;var c=i.Base64,g=n.algo,d=g.EvpKDF,m=s.Cipher=f.extend({cfg:u.extend(),createEncryptor:function(k,S){return this.create(this._ENC_XFORM_MODE,k,S)},createDecryptor:function(k,S){return this.create(this._DEC_XFORM_MODE,k,S)},init:function(k,S,F){this.cfg=this.cfg.extend(F),this._xformMode=k,this._key=S,this.reset()},reset:function(){f.reset.call(this),this._doReset()},process:function(k){return this._append(k),this._process()},finalize:function(k){k&&this._append(k);var S=this._doFinalize();return S},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function k(S){return typeof S=="string"?T:A}return function(S){return{encrypt:function(F,B,y){return k(B).encrypt(S,F,B,y)},decrypt:function(F,B,y){return k(B).decrypt(S,F,B,y)}}}}()});s.StreamCipher=m.extend({_doFinalize:function(){var k=this._process(!0);return k},blockSize:1});var x=n.mode={},C=s.BlockCipherMode=u.extend({createEncryptor:function(k,S){return this.Encryptor.create(k,S)},createDecryptor:function(k,S){return this.Decryptor.create(k,S)},init:function(k,S){this._cipher=k,this._iv=S}}),v=x.CBC=function(){var k=C.extend();k.Encryptor=k.extend({processBlock:function(F,B){var y=this._cipher,M=y.blockSize;S.call(this,F,B,M),y.encryptBlock(F,B),this._prevBlock=F.slice(B,B+M)}}),k.Decryptor=k.extend({processBlock:function(F,B){var y=this._cipher,M=y.blockSize,$=F.slice(B,B+M);y.decryptBlock(F,B),S.call(this,F,B,M),this._prevBlock=$}});function S(F,B,y){var M,$=this._iv;$?(M=$,this._iv=r):M=this._prevBlock;for(var L=0;L<y;L++)F[B+L]^=M[L]}return k}(),E=n.pad={},p=E.Pkcs7={pad:function(k,S){for(var F=S*4,B=F-k.sigBytes%F,y=B<<24|B<<16|B<<8|B,M=[],$=0;$<B;$+=4)M.push(y);var L=l.create(M,B);k.concat(L)},unpad:function(k){var S=k.words[k.sigBytes-1>>>2]&255;k.sigBytes-=S}};s.BlockCipher=m.extend({cfg:m.cfg.extend({mode:v,padding:p}),reset:function(){var k;m.reset.call(this);var S=this.cfg,F=S.iv,B=S.mode;this._xformMode==this._ENC_XFORM_MODE?k=B.createEncryptor:(k=B.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==k?this._mode.init(this,F&&F.words):(this._mode=k.call(B,this,F&&F.words),this._mode.__creator=k)},_doProcessBlock:function(k,S){this._mode.processBlock(k,S)},_doFinalize:function(){var k,S=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(S.pad(this._data,this.blockSize),k=this._process(!0)):(k=this._process(!0),S.unpad(k)),k},blockSize:128/32});var h=s.CipherParams=u.extend({init:function(k){this.mixIn(k)},toString:function(k){return(k||this.formatter).stringify(this)}}),_=n.format={},b=_.OpenSSL={stringify:function(k){var S,F=k.ciphertext,B=k.salt;return B?S=l.create([1398893684,1701076831]).concat(B).concat(F):S=F,S.toString(c)},parse:function(k){var S,F=c.parse(k),B=F.words;return B[0]==1398893684&&B[1]==1701076831&&(S=l.create(B.slice(2,4)),B.splice(0,4),F.sigBytes-=16),h.create({ciphertext:F,salt:S})}},A=s.SerializableCipher=u.extend({cfg:u.extend({format:b}),encrypt:function(k,S,F,B){B=this.cfg.extend(B);var y=k.createEncryptor(F,B),M=y.finalize(S),$=y.cfg;return h.create({ciphertext:M,key:F,iv:$.iv,algorithm:k,mode:$.mode,padding:$.padding,blockSize:k.blockSize,formatter:B.format})},decrypt:function(k,S,F,B){B=this.cfg.extend(B),S=this._parse(S,B.format);var y=k.createDecryptor(F,B).finalize(S.ciphertext);return y},_parse:function(k,S){return typeof k=="string"?S.parse(k,this):k}}),w=n.kdf={},V=w.OpenSSL={execute:function(k,S,F,B,y){if(B||(B=l.random(64/8)),y)var M=d.create({keySize:S+F,hasher:y}).compute(k,B);else var M=d.create({keySize:S+F}).compute(k,B);var $=l.create(M.words.slice(S),F*4);return M.sigBytes=S*4,h.create({key:M,iv:$,salt:B})}},T=s.PasswordBasedCipher=A.extend({cfg:A.cfg.extend({kdf:V}),encrypt:function(k,S,F,B){B=this.cfg.extend(B);var y=B.kdf.execute(F,k.keySize,k.ivSize,B.salt,B.hasher);B.iv=y.iv;var M=A.encrypt.call(this,k,S,y.key,B);return M.mixIn(y),M},decrypt:function(k,S,F,B){B=this.cfg.extend(B),S=this._parse(S,B.format);var y=B.kdf.execute(F,k.keySize,k.ivSize,S.salt,B.hasher);B.iv=y.iv;var M=A.decrypt.call(this,k,S,y.key,B);return M}})}()})}(Ct)),Ct.exports}var gt={exports:{}},B0;function Va(){return B0||(B0=1,function(o,e){(function(t,r,n){o.exports=r(G(),J())})(W,function(t){return t.mode.CFB=function(){var r=t.lib.BlockCipherMode.extend();r.Encryptor=r.extend({processBlock:function(s,u){var l=this._cipher,f=l.blockSize;n.call(this,s,u,f,l),this._prevBlock=s.slice(u,u+f)}}),r.Decryptor=r.extend({processBlock:function(s,u){var l=this._cipher,f=l.blockSize,i=s.slice(u,u+f);n.call(this,s,u,f,l),this._prevBlock=i}});function n(s,u,l,f){var i,c=this._iv;c?(i=c.slice(0),this._iv=void 0):i=this._prevBlock,f.encryptBlock(i,0);for(var g=0;g<l;g++)s[u+g]^=i[g]}return r}(),t.mode.CFB})}(gt)),gt.exports}var Bt={exports:{}},_0;function Na(){return _0||(_0=1,function(o,e){(function(t,r,n){o.exports=r(G(),J())})(W,function(t){return t.mode.CTR=function(){var r=t.lib.BlockCipherMode.extend(),n=r.Encryptor=r.extend({processBlock:function(s,u){var l=this._cipher,f=l.blockSize,i=this._iv,c=this._counter;i&&(c=this._counter=i.slice(0),this._iv=void 0);var g=c.slice(0);l.encryptBlock(g,0),c[f-1]=c[f-1]+1|0;for(var d=0;d<f;d++)s[u+d]^=g[d]}});return r.Decryptor=n,r}(),t.mode.CTR})}(Bt)),Bt.exports}var _t={exports:{}},E0;function Ra(){return E0||(E0=1,function(o,e){(function(t,r,n){o.exports=r(G(),J())})(W,function(t){/** @preserve
10
+ */return function(r){var n=t,s=n.lib,u=s.WordArray,l=s.Hasher,f=n.algo,i=u.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),c=u.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),g=u.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),d=u.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),m=u.create([0,1518500249,1859775393,2400959708,2840853838]),x=u.create([1352829926,1548603684,1836072691,2053994217,0]),C=f.RIPEMD160=l.extend({_doReset:function(){this._hash=u.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(A,w){for(var V=0;V<16;V++){var T=w+V,k=A[T];A[T]=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360}var S=this._hash.words,F=m.words,B=x.words,y=i.words,M=c.words,$=g.words,L=d.words,H,P,O,D,R,I,N,X,Z,Q;I=H=S[0],N=P=S[1],X=O=S[2],Z=D=S[3],Q=R=S[4];for(var j,V=0;V<80;V+=1)j=H+A[w+y[V]]|0,V<16?j+=p(P,O,D)+F[0]:V<32?j+=E(P,O,D)+F[1]:V<48?j+=v(P,O,D)+F[2]:V<64?j+=h(P,O,D)+F[3]:j+=_(P,O,D)+F[4],j=j|0,j=b(j,$[V]),j=j+R|0,H=R,R=D,D=b(O,10),O=P,P=j,j=I+A[w+M[V]]|0,V<16?j+=_(N,X,Z)+B[0]:V<32?j+=h(N,X,Z)+B[1]:V<48?j+=v(N,X,Z)+B[2]:V<64?j+=E(N,X,Z)+B[3]:j+=p(N,X,Z)+B[4],j=j|0,j=b(j,L[V]),j=j+Q|0,I=Q,Q=Z,Z=b(X,10),X=N,N=j;j=S[1]+O+Z|0,S[1]=S[2]+D+Q|0,S[2]=S[3]+R+I|0,S[3]=S[4]+H+N|0,S[4]=S[0]+P+X|0,S[0]=j},_doFinalize:function(){var A=this._data,w=A.words,V=this._nDataBytes*8,T=A.sigBytes*8;w[T>>>5]|=128<<24-T%32,w[(T+64>>>9<<4)+14]=(V<<8|V>>>24)&16711935|(V<<24|V>>>8)&4278255360,A.sigBytes=(w.length+1)*4,this._process();for(var k=this._hash,S=k.words,F=0;F<5;F++){var B=S[F];S[F]=(B<<8|B>>>24)&16711935|(B<<24|B>>>8)&4278255360}return k},clone:function(){var A=l.clone.call(this);return A._hash=this._hash.clone(),A}});function p(A,w,V){return A^w^V}function E(A,w,V){return A&w|~A&V}function v(A,w,V){return(A|~w)^V}function h(A,w,V){return A&V|w&~V}function _(A,w,V){return A^(w|~V)}function b(A,w){return A<<w|A>>>32-w}n.RIPEMD160=l._createHelper(C),n.HmacRIPEMD160=l._createHmacHelper(C)}(),t.RIPEMD160})}(ft)),ft.exports}var pt={exports:{}},v0;function Lt(){return v0||(v0=1,function(o,e){(function(t,r){o.exports=r(G())})(W,function(t){(function(){var r=t,n=r.lib,s=n.Base,u=r.enc,l=u.Utf8,f=r.algo;f.HMAC=s.extend({init:function(i,c){i=this._hasher=new i.init,typeof c=="string"&&(c=l.parse(c));var g=i.blockSize,d=g*4;c.sigBytes>d&&(c=i.finalize(c)),c.clamp();for(var m=this._oKey=c.clone(),x=this._iKey=c.clone(),C=m.words,p=x.words,E=0;E<g;E++)C[E]^=1549556828,p[E]^=909522486;m.sigBytes=x.sigBytes=d,this.reset()},reset:function(){var i=this._hasher;i.reset(),i.update(this._iKey)},update:function(i){return this._hasher.update(i),this},finalize:function(i){var c=this._hasher,g=c.finalize(i);c.reset();var d=c.finalize(this._oKey.clone().concat(g));return d}})})()})}(pt)),pt.exports}var vt={exports:{}},m0;function Sa(){return m0||(m0=1,function(o,e){(function(t,r,n){o.exports=r(G(),$t(),Lt())})(W,function(t){return function(){var r=t,n=r.lib,s=n.Base,u=n.WordArray,l=r.algo,f=l.SHA256,i=l.HMAC,c=l.PBKDF2=s.extend({cfg:s.extend({keySize:128/32,hasher:f,iterations:25e4}),init:function(g){this.cfg=this.cfg.extend(g)},compute:function(g,d){for(var m=this.cfg,x=i.create(m.hasher,g),C=u.create(),p=u.create([1]),E=C.words,v=p.words,h=m.keySize,_=m.iterations;E.length<h;){var b=x.update(d).finalize(p);x.reset();for(var A=b.words,w=A.length,V=b,T=1;T<_;T++){V=x.finalize(V),x.reset();for(var k=V.words,S=0;S<w;S++)A[S]^=k[S]}C.concat(b),v[0]++}return C.sigBytes=h*4,C}});r.PBKDF2=function(g,d,m){return c.create(m).compute(g,d)}}(),t.PBKDF2})}(vt)),vt.exports}var mt={exports:{}},C0;function Fe(){return C0||(C0=1,function(o,e){(function(t,r,n){o.exports=r(G(),W0(),Lt())})(W,function(t){return function(){var r=t,n=r.lib,s=n.Base,u=n.WordArray,l=r.algo,f=l.MD5,i=l.EvpKDF=s.extend({cfg:s.extend({keySize:128/32,hasher:f,iterations:1}),init:function(c){this.cfg=this.cfg.extend(c)},compute:function(c,g){for(var d,m=this.cfg,x=m.hasher.create(),C=u.create(),p=C.words,E=m.keySize,v=m.iterations;p.length<E;){d&&x.update(d),d=x.update(c).finalize(g),x.reset();for(var h=1;h<v;h++)d=x.finalize(d),x.reset();C.concat(d)}return C.sigBytes=E*4,C}});r.EvpKDF=function(c,g,d){return i.create(d).compute(c,g)}}(),t.EvpKDF})}(mt)),mt.exports}var Ct={exports:{}},g0;function J(){return g0||(g0=1,function(o,e){(function(t,r,n){o.exports=r(G(),Fe())})(W,function(t){t.lib.Cipher||function(r){var n=t,s=n.lib,u=s.Base,l=s.WordArray,f=s.BufferedBlockAlgorithm,i=n.enc;i.Utf8;var c=i.Base64,g=n.algo,d=g.EvpKDF,m=s.Cipher=f.extend({cfg:u.extend(),createEncryptor:function(k,S){return this.create(this._ENC_XFORM_MODE,k,S)},createDecryptor:function(k,S){return this.create(this._DEC_XFORM_MODE,k,S)},init:function(k,S,F){this.cfg=this.cfg.extend(F),this._xformMode=k,this._key=S,this.reset()},reset:function(){f.reset.call(this),this._doReset()},process:function(k){return this._append(k),this._process()},finalize:function(k){k&&this._append(k);var S=this._doFinalize();return S},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function k(S){return typeof S=="string"?T:A}return function(S){return{encrypt:function(F,B,y){return k(B).encrypt(S,F,B,y)},decrypt:function(F,B,y){return k(B).decrypt(S,F,B,y)}}}}()});s.StreamCipher=m.extend({_doFinalize:function(){var k=this._process(!0);return k},blockSize:1});var x=n.mode={},C=s.BlockCipherMode=u.extend({createEncryptor:function(k,S){return this.Encryptor.create(k,S)},createDecryptor:function(k,S){return this.Decryptor.create(k,S)},init:function(k,S){this._cipher=k,this._iv=S}}),p=x.CBC=function(){var k=C.extend();k.Encryptor=k.extend({processBlock:function(F,B){var y=this._cipher,M=y.blockSize;S.call(this,F,B,M),y.encryptBlock(F,B),this._prevBlock=F.slice(B,B+M)}}),k.Decryptor=k.extend({processBlock:function(F,B){var y=this._cipher,M=y.blockSize,$=F.slice(B,B+M);y.decryptBlock(F,B),S.call(this,F,B,M),this._prevBlock=$}});function S(F,B,y){var M,$=this._iv;$?(M=$,this._iv=r):M=this._prevBlock;for(var L=0;L<y;L++)F[B+L]^=M[L]}return k}(),E=n.pad={},v=E.Pkcs7={pad:function(k,S){for(var F=S*4,B=F-k.sigBytes%F,y=B<<24|B<<16|B<<8|B,M=[],$=0;$<B;$+=4)M.push(y);var L=l.create(M,B);k.concat(L)},unpad:function(k){var S=k.words[k.sigBytes-1>>>2]&255;k.sigBytes-=S}};s.BlockCipher=m.extend({cfg:m.cfg.extend({mode:p,padding:v}),reset:function(){var k;m.reset.call(this);var S=this.cfg,F=S.iv,B=S.mode;this._xformMode==this._ENC_XFORM_MODE?k=B.createEncryptor:(k=B.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==k?this._mode.init(this,F&&F.words):(this._mode=k.call(B,this,F&&F.words),this._mode.__creator=k)},_doProcessBlock:function(k,S){this._mode.processBlock(k,S)},_doFinalize:function(){var k,S=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(S.pad(this._data,this.blockSize),k=this._process(!0)):(k=this._process(!0),S.unpad(k)),k},blockSize:128/32});var h=s.CipherParams=u.extend({init:function(k){this.mixIn(k)},toString:function(k){return(k||this.formatter).stringify(this)}}),_=n.format={},b=_.OpenSSL={stringify:function(k){var S,F=k.ciphertext,B=k.salt;return B?S=l.create([1398893684,1701076831]).concat(B).concat(F):S=F,S.toString(c)},parse:function(k){var S,F=c.parse(k),B=F.words;return B[0]==1398893684&&B[1]==1701076831&&(S=l.create(B.slice(2,4)),B.splice(0,4),F.sigBytes-=16),h.create({ciphertext:F,salt:S})}},A=s.SerializableCipher=u.extend({cfg:u.extend({format:b}),encrypt:function(k,S,F,B){B=this.cfg.extend(B);var y=k.createEncryptor(F,B),M=y.finalize(S),$=y.cfg;return h.create({ciphertext:M,key:F,iv:$.iv,algorithm:k,mode:$.mode,padding:$.padding,blockSize:k.blockSize,formatter:B.format})},decrypt:function(k,S,F,B){B=this.cfg.extend(B),S=this._parse(S,B.format);var y=k.createDecryptor(F,B).finalize(S.ciphertext);return y},_parse:function(k,S){return typeof k=="string"?S.parse(k,this):k}}),w=n.kdf={},V=w.OpenSSL={execute:function(k,S,F,B,y){if(B||(B=l.random(64/8)),y)var M=d.create({keySize:S+F,hasher:y}).compute(k,B);else var M=d.create({keySize:S+F}).compute(k,B);var $=l.create(M.words.slice(S),F*4);return M.sigBytes=S*4,h.create({key:M,iv:$,salt:B})}},T=s.PasswordBasedCipher=A.extend({cfg:A.cfg.extend({kdf:V}),encrypt:function(k,S,F,B){B=this.cfg.extend(B);var y=B.kdf.execute(F,k.keySize,k.ivSize,B.salt,B.hasher);B.iv=y.iv;var M=A.encrypt.call(this,k,S,y.key,B);return M.mixIn(y),M},decrypt:function(k,S,F,B){B=this.cfg.extend(B),S=this._parse(S,B.format);var y=B.kdf.execute(F,k.keySize,k.ivSize,S.salt,B.hasher);B.iv=y.iv;var M=A.decrypt.call(this,k,S,y.key,B);return M}})}()})}(Ct)),Ct.exports}var gt={exports:{}},B0;function Va(){return B0||(B0=1,function(o,e){(function(t,r,n){o.exports=r(G(),J())})(W,function(t){return t.mode.CFB=function(){var r=t.lib.BlockCipherMode.extend();r.Encryptor=r.extend({processBlock:function(s,u){var l=this._cipher,f=l.blockSize;n.call(this,s,u,f,l),this._prevBlock=s.slice(u,u+f)}}),r.Decryptor=r.extend({processBlock:function(s,u){var l=this._cipher,f=l.blockSize,i=s.slice(u,u+f);n.call(this,s,u,f,l),this._prevBlock=i}});function n(s,u,l,f){var i,c=this._iv;c?(i=c.slice(0),this._iv=void 0):i=this._prevBlock,f.encryptBlock(i,0);for(var g=0;g<l;g++)s[u+g]^=i[g]}return r}(),t.mode.CFB})}(gt)),gt.exports}var Bt={exports:{}},_0;function Na(){return _0||(_0=1,function(o,e){(function(t,r,n){o.exports=r(G(),J())})(W,function(t){return t.mode.CTR=function(){var r=t.lib.BlockCipherMode.extend(),n=r.Encryptor=r.extend({processBlock:function(s,u){var l=this._cipher,f=l.blockSize,i=this._iv,c=this._counter;i&&(c=this._counter=i.slice(0),this._iv=void 0);var g=c.slice(0);l.encryptBlock(g,0),c[f-1]=c[f-1]+1|0;for(var d=0;d<f;d++)s[u+d]^=g[d]}});return r.Decryptor=n,r}(),t.mode.CTR})}(Bt)),Bt.exports}var _t={exports:{}},E0;function Ra(){return E0||(E0=1,function(o,e){(function(t,r,n){o.exports=r(G(),J())})(W,function(t){/** @preserve
11
11
  * Counter block mode compatible with Dr Brian Gladman fileenc.c
12
12
  * derived from CryptoJS.mode.CTR
13
13
  * Jan Hruby jhruby.web@gmail.com
14
- */return t.mode.CTRGladman=function(){var r=t.lib.BlockCipherMode.extend();function n(l){if((l>>24&255)===255){var f=l>>16&255,i=l>>8&255,c=l&255;f===255?(f=0,i===255?(i=0,c===255?c=0:++c):++i):++f,l=0,l+=f<<16,l+=i<<8,l+=c}else l+=1<<24;return l}function s(l){return(l[0]=n(l[0]))===0&&(l[1]=n(l[1])),l}var u=r.Encryptor=r.extend({processBlock:function(l,f){var i=this._cipher,c=i.blockSize,g=this._iv,d=this._counter;g&&(d=this._counter=g.slice(0),this._iv=void 0),s(d);var m=d.slice(0);i.encryptBlock(m,0);for(var x=0;x<c;x++)l[f+x]^=m[x]}});return r.Decryptor=u,r}(),t.mode.CTRGladman})}(_t)),_t.exports}var Et={exports:{}},y0;function Ia(){return y0||(y0=1,function(o,e){(function(t,r,n){o.exports=r(G(),J())})(W,function(t){return t.mode.OFB=function(){var r=t.lib.BlockCipherMode.extend(),n=r.Encryptor=r.extend({processBlock:function(s,u){var l=this._cipher,f=l.blockSize,i=this._iv,c=this._keystream;i&&(c=this._keystream=i.slice(0),this._iv=void 0),l.encryptBlock(c,0);for(var g=0;g<f;g++)s[u+g]^=c[g]}});return r.Decryptor=n,r}(),t.mode.OFB})}(Et)),Et.exports}var yt={exports:{}},k0;function Ta(){return k0||(k0=1,function(o,e){(function(t,r,n){o.exports=r(G(),J())})(W,function(t){return t.mode.ECB=function(){var r=t.lib.BlockCipherMode.extend();return r.Encryptor=r.extend({processBlock:function(n,s){this._cipher.encryptBlock(n,s)}}),r.Decryptor=r.extend({processBlock:function(n,s){this._cipher.decryptBlock(n,s)}}),r}(),t.mode.ECB})}(yt)),yt.exports}var kt={exports:{}},A0;function Ma(){return A0||(A0=1,function(o,e){(function(t,r,n){o.exports=r(G(),J())})(W,function(t){return t.pad.AnsiX923={pad:function(r,n){var s=r.sigBytes,u=n*4,l=u-s%u,f=s+l-1;r.clamp(),r.words[f>>>2]|=l<<24-f%4*8,r.sigBytes+=l},unpad:function(r){var n=r.words[r.sigBytes-1>>>2]&255;r.sigBytes-=n}},t.pad.Ansix923})}(kt)),kt.exports}var At={exports:{}},b0;function Pa(){return b0||(b0=1,function(o,e){(function(t,r,n){o.exports=r(G(),J())})(W,function(t){return t.pad.Iso10126={pad:function(r,n){var s=n*4,u=s-r.sigBytes%s;r.concat(t.lib.WordArray.random(u-1)).concat(t.lib.WordArray.create([u<<24],1))},unpad:function(r){var n=r.words[r.sigBytes-1>>>2]&255;r.sigBytes-=n}},t.pad.Iso10126})}(At)),At.exports}var bt={exports:{}},F0;function Oa(){return F0||(F0=1,function(o,e){(function(t,r,n){o.exports=r(G(),J())})(W,function(t){return t.pad.Iso97971={pad:function(r,n){r.concat(t.lib.WordArray.create([2147483648],1)),t.pad.ZeroPadding.pad(r,n)},unpad:function(r){t.pad.ZeroPadding.unpad(r),r.sigBytes--}},t.pad.Iso97971})}(bt)),bt.exports}var Ft={exports:{}},D0;function Ha(){return D0||(D0=1,function(o,e){(function(t,r,n){o.exports=r(G(),J())})(W,function(t){return t.pad.ZeroPadding={pad:function(r,n){var s=n*4;r.clamp(),r.sigBytes+=s-(r.sigBytes%s||s)},unpad:function(r){for(var n=r.words,s=r.sigBytes-1,s=r.sigBytes-1;s>=0;s--)if(n[s>>>2]>>>24-s%4*8&255){r.sigBytes=s+1;break}}},t.pad.ZeroPadding})}(Ft)),Ft.exports}var Dt={exports:{}},w0;function $a(){return w0||(w0=1,function(o,e){(function(t,r,n){o.exports=r(G(),J())})(W,function(t){return t.pad.NoPadding={pad:function(){},unpad:function(){}},t.pad.NoPadding})}(Dt)),Dt.exports}var wt={exports:{}},S0;function La(){return S0||(S0=1,function(o,e){(function(t,r,n){o.exports=r(G(),J())})(W,function(t){return function(r){var n=t,s=n.lib,u=s.CipherParams,l=n.enc,f=l.Hex,i=n.format;i.Hex={stringify:function(c){return c.ciphertext.toString(f)},parse:function(c){var g=f.parse(c);return u.create({ciphertext:g})}}}(),t.format.Hex})}(wt)),wt.exports}var St={exports:{}},V0;function za(){return V0||(V0=1,function(o,e){(function(t,r,n){o.exports=r(G(),Ne(),Re(),Fe(),J())})(W,function(t){return function(){var r=t,n=r.lib,s=n.BlockCipher,u=r.algo,l=[],f=[],i=[],c=[],g=[],d=[],m=[],x=[],C=[],v=[];(function(){for(var h=[],_=0;_<256;_++)_<128?h[_]=_<<1:h[_]=_<<1^283;for(var b=0,A=0,_=0;_<256;_++){var w=A^A<<1^A<<2^A<<3^A<<4;w=w>>>8^w&255^99,l[b]=w,f[w]=b;var V=h[b],T=h[V],k=h[T],S=h[w]*257^w*16843008;i[b]=S<<24|S>>>8,c[b]=S<<16|S>>>16,g[b]=S<<8|S>>>24,d[b]=S;var S=k*16843009^T*65537^V*257^b*16843008;m[w]=S<<24|S>>>8,x[w]=S<<16|S>>>16,C[w]=S<<8|S>>>24,v[w]=S,b?(b=V^h[h[h[k^V]]],A^=h[h[A]]):b=A=1}})();var E=[0,1,2,4,8,16,32,64,128,27,54],p=u.AES=s.extend({_doReset:function(){var h;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var _=this._keyPriorReset=this._key,b=_.words,A=_.sigBytes/4,w=this._nRounds=A+6,V=(w+1)*4,T=this._keySchedule=[],k=0;k<V;k++)k<A?T[k]=b[k]:(h=T[k-1],k%A?A>6&&k%A==4&&(h=l[h>>>24]<<24|l[h>>>16&255]<<16|l[h>>>8&255]<<8|l[h&255]):(h=h<<8|h>>>24,h=l[h>>>24]<<24|l[h>>>16&255]<<16|l[h>>>8&255]<<8|l[h&255],h^=E[k/A|0]<<24),T[k]=T[k-A]^h);for(var S=this._invKeySchedule=[],F=0;F<V;F++){var k=V-F;if(F%4)var h=T[k];else var h=T[k-4];F<4||k<=4?S[F]=h:S[F]=m[l[h>>>24]]^x[l[h>>>16&255]]^C[l[h>>>8&255]]^v[l[h&255]]}}},encryptBlock:function(h,_){this._doCryptBlock(h,_,this._keySchedule,i,c,g,d,l)},decryptBlock:function(h,_){var b=h[_+1];h[_+1]=h[_+3],h[_+3]=b,this._doCryptBlock(h,_,this._invKeySchedule,m,x,C,v,f);var b=h[_+1];h[_+1]=h[_+3],h[_+3]=b},_doCryptBlock:function(h,_,b,A,w,V,T,k){for(var S=this._nRounds,F=h[_]^b[0],B=h[_+1]^b[1],y=h[_+2]^b[2],M=h[_+3]^b[3],$=4,L=1;L<S;L++){var H=A[F>>>24]^w[B>>>16&255]^V[y>>>8&255]^T[M&255]^b[$++],P=A[B>>>24]^w[y>>>16&255]^V[M>>>8&255]^T[F&255]^b[$++],O=A[y>>>24]^w[M>>>16&255]^V[F>>>8&255]^T[B&255]^b[$++],D=A[M>>>24]^w[F>>>16&255]^V[B>>>8&255]^T[y&255]^b[$++];F=H,B=P,y=O,M=D}var H=(k[F>>>24]<<24|k[B>>>16&255]<<16|k[y>>>8&255]<<8|k[M&255])^b[$++],P=(k[B>>>24]<<24|k[y>>>16&255]<<16|k[M>>>8&255]<<8|k[F&255])^b[$++],O=(k[y>>>24]<<24|k[M>>>16&255]<<16|k[F>>>8&255]<<8|k[B&255])^b[$++],D=(k[M>>>24]<<24|k[F>>>16&255]<<16|k[B>>>8&255]<<8|k[y&255])^b[$++];h[_]=H,h[_+1]=P,h[_+2]=O,h[_+3]=D},keySize:256/32});r.AES=s._createHelper(p)}(),t.AES})}(St)),St.exports}var Vt={exports:{}},N0;function Ua(){return N0||(N0=1,function(o,e){(function(t,r,n){o.exports=r(G(),Ne(),Re(),Fe(),J())})(W,function(t){return function(){var r=t,n=r.lib,s=n.WordArray,u=n.BlockCipher,l=r.algo,f=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],i=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],c=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],g=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],d=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],m=l.DES=u.extend({_doReset:function(){for(var E=this._key,p=E.words,h=[],_=0;_<56;_++){var b=f[_]-1;h[_]=p[b>>>5]>>>31-b%32&1}for(var A=this._subKeys=[],w=0;w<16;w++){for(var V=A[w]=[],T=c[w],_=0;_<24;_++)V[_/6|0]|=h[(i[_]-1+T)%28]<<31-_%6,V[4+(_/6|0)]|=h[28+(i[_+24]-1+T)%28]<<31-_%6;V[0]=V[0]<<1|V[0]>>>31;for(var _=1;_<7;_++)V[_]=V[_]>>>(_-1)*4+3;V[7]=V[7]<<5|V[7]>>>27}for(var k=this._invSubKeys=[],_=0;_<16;_++)k[_]=A[15-_]},encryptBlock:function(E,p){this._doCryptBlock(E,p,this._subKeys)},decryptBlock:function(E,p){this._doCryptBlock(E,p,this._invSubKeys)},_doCryptBlock:function(E,p,h){this._lBlock=E[p],this._rBlock=E[p+1],x.call(this,4,252645135),x.call(this,16,65535),C.call(this,2,858993459),C.call(this,8,16711935),x.call(this,1,1431655765);for(var _=0;_<16;_++){for(var b=h[_],A=this._lBlock,w=this._rBlock,V=0,T=0;T<8;T++)V|=g[T][((w^b[T])&d[T])>>>0];this._lBlock=w,this._rBlock=A^V}var k=this._lBlock;this._lBlock=this._rBlock,this._rBlock=k,x.call(this,1,1431655765),C.call(this,8,16711935),C.call(this,2,858993459),x.call(this,16,65535),x.call(this,4,252645135),E[p]=this._lBlock,E[p+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function x(E,p){var h=(this._lBlock>>>E^this._rBlock)&p;this._rBlock^=h,this._lBlock^=h<<E}function C(E,p){var h=(this._rBlock>>>E^this._lBlock)&p;this._lBlock^=h,this._rBlock^=h<<E}r.DES=u._createHelper(m);var v=l.TripleDES=u.extend({_doReset:function(){var E=this._key,p=E.words;if(p.length!==2&&p.length!==4&&p.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var h=p.slice(0,2),_=p.length<4?p.slice(0,2):p.slice(2,4),b=p.length<6?p.slice(0,2):p.slice(4,6);this._des1=m.createEncryptor(s.create(h)),this._des2=m.createEncryptor(s.create(_)),this._des3=m.createEncryptor(s.create(b))},encryptBlock:function(E,p){this._des1.encryptBlock(E,p),this._des2.decryptBlock(E,p),this._des3.encryptBlock(E,p)},decryptBlock:function(E,p){this._des3.decryptBlock(E,p),this._des2.encryptBlock(E,p),this._des1.decryptBlock(E,p)},keySize:192/32,ivSize:64/32,blockSize:64/32});r.TripleDES=u._createHelper(v)}(),t.TripleDES})}(Vt)),Vt.exports}var Nt={exports:{}},R0;function qa(){return R0||(R0=1,function(o,e){(function(t,r,n){o.exports=r(G(),Ne(),Re(),Fe(),J())})(W,function(t){return function(){var r=t,n=r.lib,s=n.StreamCipher,u=r.algo,l=u.RC4=s.extend({_doReset:function(){for(var c=this._key,g=c.words,d=c.sigBytes,m=this._S=[],x=0;x<256;x++)m[x]=x;for(var x=0,C=0;x<256;x++){var v=x%d,E=g[v>>>2]>>>24-v%4*8&255;C=(C+m[x]+E)%256;var p=m[x];m[x]=m[C],m[C]=p}this._i=this._j=0},_doProcessBlock:function(c,g){c[g]^=f.call(this)},keySize:256/32,ivSize:0});function f(){for(var c=this._S,g=this._i,d=this._j,m=0,x=0;x<4;x++){g=(g+1)%256,d=(d+c[g])%256;var C=c[g];c[g]=c[d],c[d]=C,m|=c[(c[g]+c[d])%256]<<24-x*8}return this._i=g,this._j=d,m}r.RC4=s._createHelper(l);var i=u.RC4Drop=l.extend({cfg:l.cfg.extend({drop:192}),_doReset:function(){l._doReset.call(this);for(var c=this.cfg.drop;c>0;c--)f.call(this)}});r.RC4Drop=s._createHelper(i)}(),t.RC4})}(Nt)),Nt.exports}var Rt={exports:{}},I0;function ja(){return I0||(I0=1,function(o,e){(function(t,r,n){o.exports=r(G(),Ne(),Re(),Fe(),J())})(W,function(t){return function(){var r=t,n=r.lib,s=n.StreamCipher,u=r.algo,l=[],f=[],i=[],c=u.Rabbit=s.extend({_doReset:function(){for(var d=this._key.words,m=this.cfg.iv,x=0;x<4;x++)d[x]=(d[x]<<8|d[x]>>>24)&16711935|(d[x]<<24|d[x]>>>8)&4278255360;var C=this._X=[d[0],d[3]<<16|d[2]>>>16,d[1],d[0]<<16|d[3]>>>16,d[2],d[1]<<16|d[0]>>>16,d[3],d[2]<<16|d[1]>>>16],v=this._C=[d[2]<<16|d[2]>>>16,d[0]&4294901760|d[1]&65535,d[3]<<16|d[3]>>>16,d[1]&4294901760|d[2]&65535,d[0]<<16|d[0]>>>16,d[2]&4294901760|d[3]&65535,d[1]<<16|d[1]>>>16,d[3]&4294901760|d[0]&65535];this._b=0;for(var x=0;x<4;x++)g.call(this);for(var x=0;x<8;x++)v[x]^=C[x+4&7];if(m){var E=m.words,p=E[0],h=E[1],_=(p<<8|p>>>24)&16711935|(p<<24|p>>>8)&4278255360,b=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360,A=_>>>16|b&4294901760,w=b<<16|_&65535;v[0]^=_,v[1]^=A,v[2]^=b,v[3]^=w,v[4]^=_,v[5]^=A,v[6]^=b,v[7]^=w;for(var x=0;x<4;x++)g.call(this)}},_doProcessBlock:function(d,m){var x=this._X;g.call(this),l[0]=x[0]^x[5]>>>16^x[3]<<16,l[1]=x[2]^x[7]>>>16^x[5]<<16,l[2]=x[4]^x[1]>>>16^x[7]<<16,l[3]=x[6]^x[3]>>>16^x[1]<<16;for(var C=0;C<4;C++)l[C]=(l[C]<<8|l[C]>>>24)&16711935|(l[C]<<24|l[C]>>>8)&4278255360,d[m+C]^=l[C]},blockSize:128/32,ivSize:64/32});function g(){for(var d=this._X,m=this._C,x=0;x<8;x++)f[x]=m[x];m[0]=m[0]+1295307597+this._b|0,m[1]=m[1]+3545052371+(m[0]>>>0<f[0]>>>0?1:0)|0,m[2]=m[2]+886263092+(m[1]>>>0<f[1]>>>0?1:0)|0,m[3]=m[3]+1295307597+(m[2]>>>0<f[2]>>>0?1:0)|0,m[4]=m[4]+3545052371+(m[3]>>>0<f[3]>>>0?1:0)|0,m[5]=m[5]+886263092+(m[4]>>>0<f[4]>>>0?1:0)|0,m[6]=m[6]+1295307597+(m[5]>>>0<f[5]>>>0?1:0)|0,m[7]=m[7]+3545052371+(m[6]>>>0<f[6]>>>0?1:0)|0,this._b=m[7]>>>0<f[7]>>>0?1:0;for(var x=0;x<8;x++){var C=d[x]+m[x],v=C&65535,E=C>>>16,p=((v*v>>>17)+v*E>>>15)+E*E,h=((C&4294901760)*C|0)+((C&65535)*C|0);i[x]=p^h}d[0]=i[0]+(i[7]<<16|i[7]>>>16)+(i[6]<<16|i[6]>>>16)|0,d[1]=i[1]+(i[0]<<8|i[0]>>>24)+i[7]|0,d[2]=i[2]+(i[1]<<16|i[1]>>>16)+(i[0]<<16|i[0]>>>16)|0,d[3]=i[3]+(i[2]<<8|i[2]>>>24)+i[1]|0,d[4]=i[4]+(i[3]<<16|i[3]>>>16)+(i[2]<<16|i[2]>>>16)|0,d[5]=i[5]+(i[4]<<8|i[4]>>>24)+i[3]|0,d[6]=i[6]+(i[5]<<16|i[5]>>>16)+(i[4]<<16|i[4]>>>16)|0,d[7]=i[7]+(i[6]<<8|i[6]>>>24)+i[5]|0}r.Rabbit=s._createHelper(c)}(),t.Rabbit})}(Rt)),Rt.exports}var It={exports:{}},T0;function Ka(){return T0||(T0=1,function(o,e){(function(t,r,n){o.exports=r(G(),Ne(),Re(),Fe(),J())})(W,function(t){return function(){var r=t,n=r.lib,s=n.StreamCipher,u=r.algo,l=[],f=[],i=[],c=u.RabbitLegacy=s.extend({_doReset:function(){var d=this._key.words,m=this.cfg.iv,x=this._X=[d[0],d[3]<<16|d[2]>>>16,d[1],d[0]<<16|d[3]>>>16,d[2],d[1]<<16|d[0]>>>16,d[3],d[2]<<16|d[1]>>>16],C=this._C=[d[2]<<16|d[2]>>>16,d[0]&4294901760|d[1]&65535,d[3]<<16|d[3]>>>16,d[1]&4294901760|d[2]&65535,d[0]<<16|d[0]>>>16,d[2]&4294901760|d[3]&65535,d[1]<<16|d[1]>>>16,d[3]&4294901760|d[0]&65535];this._b=0;for(var v=0;v<4;v++)g.call(this);for(var v=0;v<8;v++)C[v]^=x[v+4&7];if(m){var E=m.words,p=E[0],h=E[1],_=(p<<8|p>>>24)&16711935|(p<<24|p>>>8)&4278255360,b=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360,A=_>>>16|b&4294901760,w=b<<16|_&65535;C[0]^=_,C[1]^=A,C[2]^=b,C[3]^=w,C[4]^=_,C[5]^=A,C[6]^=b,C[7]^=w;for(var v=0;v<4;v++)g.call(this)}},_doProcessBlock:function(d,m){var x=this._X;g.call(this),l[0]=x[0]^x[5]>>>16^x[3]<<16,l[1]=x[2]^x[7]>>>16^x[5]<<16,l[2]=x[4]^x[1]>>>16^x[7]<<16,l[3]=x[6]^x[3]>>>16^x[1]<<16;for(var C=0;C<4;C++)l[C]=(l[C]<<8|l[C]>>>24)&16711935|(l[C]<<24|l[C]>>>8)&4278255360,d[m+C]^=l[C]},blockSize:128/32,ivSize:64/32});function g(){for(var d=this._X,m=this._C,x=0;x<8;x++)f[x]=m[x];m[0]=m[0]+1295307597+this._b|0,m[1]=m[1]+3545052371+(m[0]>>>0<f[0]>>>0?1:0)|0,m[2]=m[2]+886263092+(m[1]>>>0<f[1]>>>0?1:0)|0,m[3]=m[3]+1295307597+(m[2]>>>0<f[2]>>>0?1:0)|0,m[4]=m[4]+3545052371+(m[3]>>>0<f[3]>>>0?1:0)|0,m[5]=m[5]+886263092+(m[4]>>>0<f[4]>>>0?1:0)|0,m[6]=m[6]+1295307597+(m[5]>>>0<f[5]>>>0?1:0)|0,m[7]=m[7]+3545052371+(m[6]>>>0<f[6]>>>0?1:0)|0,this._b=m[7]>>>0<f[7]>>>0?1:0;for(var x=0;x<8;x++){var C=d[x]+m[x],v=C&65535,E=C>>>16,p=((v*v>>>17)+v*E>>>15)+E*E,h=((C&4294901760)*C|0)+((C&65535)*C|0);i[x]=p^h}d[0]=i[0]+(i[7]<<16|i[7]>>>16)+(i[6]<<16|i[6]>>>16)|0,d[1]=i[1]+(i[0]<<8|i[0]>>>24)+i[7]|0,d[2]=i[2]+(i[1]<<16|i[1]>>>16)+(i[0]<<16|i[0]>>>16)|0,d[3]=i[3]+(i[2]<<8|i[2]>>>24)+i[1]|0,d[4]=i[4]+(i[3]<<16|i[3]>>>16)+(i[2]<<16|i[2]>>>16)|0,d[5]=i[5]+(i[4]<<8|i[4]>>>24)+i[3]|0,d[6]=i[6]+(i[5]<<16|i[5]>>>16)+(i[4]<<16|i[4]>>>16)|0,d[7]=i[7]+(i[6]<<8|i[6]>>>24)+i[5]|0}r.RabbitLegacy=s._createHelper(c)}(),t.RabbitLegacy})}(It)),It.exports}var Tt={exports:{}},M0;function Wa(){return M0||(M0=1,function(o,e){(function(t,r,n){o.exports=r(G(),Ne(),Re(),Fe(),J())})(W,function(t){return function(){var r=t,n=r.lib,s=n.BlockCipher,u=r.algo;const l=16,f=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],i=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var c={pbox:[],sbox:[]};function g(v,E){let p=E>>24&255,h=E>>16&255,_=E>>8&255,b=E&255,A=v.sbox[0][p]+v.sbox[1][h];return A=A^v.sbox[2][_],A=A+v.sbox[3][b],A}function d(v,E,p){let h=E,_=p,b;for(let A=0;A<l;++A)h=h^v.pbox[A],_=g(v,h)^_,b=h,h=_,_=b;return b=h,h=_,_=b,_=_^v.pbox[l],h=h^v.pbox[l+1],{left:h,right:_}}function m(v,E,p){let h=E,_=p,b;for(let A=l+1;A>1;--A)h=h^v.pbox[A],_=g(v,h)^_,b=h,h=_,_=b;return b=h,h=_,_=b,_=_^v.pbox[1],h=h^v.pbox[0],{left:h,right:_}}function x(v,E,p){for(let w=0;w<4;w++){v.sbox[w]=[];for(let V=0;V<256;V++)v.sbox[w][V]=i[w][V]}let h=0;for(let w=0;w<l+2;w++)v.pbox[w]=f[w]^E[h],h++,h>=p&&(h=0);let _=0,b=0,A=0;for(let w=0;w<l+2;w+=2)A=d(v,_,b),_=A.left,b=A.right,v.pbox[w]=_,v.pbox[w+1]=b;for(let w=0;w<4;w++)for(let V=0;V<256;V+=2)A=d(v,_,b),_=A.left,b=A.right,v.sbox[w][V]=_,v.sbox[w][V+1]=b;return!0}var C=u.Blowfish=s.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var v=this._keyPriorReset=this._key,E=v.words,p=v.sigBytes/4;x(c,E,p)}},encryptBlock:function(v,E){var p=d(c,v[E],v[E+1]);v[E]=p.left,v[E+1]=p.right},decryptBlock:function(v,E){var p=m(c,v[E],v[E+1]);v[E]=p.left,v[E+1]=p.right},blockSize:64/32,keySize:128/32,ivSize:64/32});r.Blowfish=s._createHelper(C)}(),t.Blowfish})}(Tt)),Tt.exports}(function(o,e){(function(t,r,n){o.exports=r(G(),Ze(),ya(),ka(),Ne(),Aa(),Re(),W0(),$t(),ba(),G0(),Fa(),Da(),wa(),Lt(),Sa(),Fe(),J(),Va(),Na(),Ra(),Ia(),Ta(),Ma(),Pa(),Oa(),Ha(),$a(),La(),za(),Ua(),qa(),ja(),Ka(),Wa())})(W,function(t){return t})})(K0);var Ga=K0.exports;const ce=ma(Ga);function Za(o,e={}){const t=o.replace(/-/g,""),r=t.slice(0,16),n=t.slice(-16),s=ce.enc.Utf8.parse(r),u=ce.enc.Utf8.parse(n),l=JSON.stringify(e);return{requestParam:ce.AES.encrypt(ce.enc.Utf8.parse(l),s,{keySize:128/8,iv:u,mode:ce.mode.CBC,padding:ce.pad.Pkcs7}).toString()}}function P0(o,e){const t=o.replace(/-/g,""),r=t.slice(0,16),n=t.slice(-16),s=ce.enc.Utf8.parse(r),u=ce.enc.Utf8.parse(n),f=ce.AES.decrypt(e,s,{keySize:128/8,iv:u,mode:ce.mode.CBC,padding:ce.pad.Pkcs7}).toString(ce.enc.Utf8);return JSON.parse(f)}async function Xa(o,e){try{const t=ge(o);return await(await fetch(`${t}/api/v1/countries-iso`,{method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json",merchantId:e}})).json()}catch{}}async function Ya(o,e,t){try{const r=ge(e);return await(await fetch(`${r}/api/v1/state-by-country/${o}`,{method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json",merchantId:t}})).json()}catch{}}async function Qa(o){try{const e=ge(o);return await(await fetch(`${e}/api/v1/checkout/stable-coin`,{method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json"}})).json()}catch{}}async function Ja(o,e){try{const t=ge(o);return await(await fetch(`${t}/api/v1/checkout/networks/${e}`,{method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json"}})).json()}catch{}}function be(o){return typeof o=="string"||o instanceof String}function O0(o){var e;return typeof o=="object"&&o!=null&&(o==null||(e=o.constructor)==null?void 0:e.name)==="Object"}function Z0(o,e){return Array.isArray(e)?Z0(o,(t,r)=>e.includes(r)):Object.entries(o).reduce((t,r)=>{let[n,s]=r;return e(s,n)&&(t[n]=s),t},{})}const z={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function en(o){switch(o){case z.LEFT:return z.FORCE_LEFT;case z.RIGHT:return z.FORCE_RIGHT;default:return o}}function Mt(o){return o.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function Ke(o,e){if(e===o)return!0;const t=Array.isArray(e),r=Array.isArray(o);let n;if(t&&r){if(e.length!=o.length)return!1;for(n=0;n<e.length;n++)if(!Ke(e[n],o[n]))return!1;return!0}if(t!=r)return!1;if(e&&o&&typeof e=="object"&&typeof o=="object"){const s=e instanceof Date,u=o instanceof Date;if(s&&u)return e.getTime()==o.getTime();if(s!=u)return!1;const l=e instanceof RegExp,f=o instanceof RegExp;if(l&&f)return e.toString()==o.toString();if(l!=f)return!1;const i=Object.keys(e);for(n=0;n<i.length;n++)if(!Object.prototype.hasOwnProperty.call(o,i[n]))return!1;for(n=0;n<i.length;n++)if(!Ke(o[i[n]],e[i[n]]))return!1;return!0}else if(e&&o&&typeof e=="function"&&typeof o=="function")return e.toString()===o.toString();return!1}class tn{constructor(e){for(Object.assign(this,e);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start;if(this.insertedCount)for(;this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end);)this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end?++this.oldSelection.end:++this.cursorPos}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?z.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?z.RIGHT:z.LEFT}}function q(o,e){return new q.InputMask(o,e)}function X0(o){if(o==null)throw new Error("mask property should be defined");return o instanceof RegExp?q.MaskedRegExp:be(o)?q.MaskedPattern:o===Date?q.MaskedDate:o===Number?q.MaskedNumber:Array.isArray(o)||o===Array?q.MaskedDynamic:q.Masked&&o.prototype instanceof q.Masked?o:q.Masked&&o instanceof q.Masked?o.constructor:o instanceof Function?q.MaskedFunction:(console.warn("Mask not found for mask",o),q.Masked)}function $e(o){if(!o)throw new Error("Options in not defined");if(q.Masked){if(o.prototype instanceof q.Masked)return{mask:o};const{mask:e=void 0,...t}=o instanceof q.Masked?{mask:o}:O0(o)&&o.mask instanceof q.Masked?o:{};if(e){const r=e.mask;return{...Z0(e,(n,s)=>!s.startsWith("_")),mask:e.constructor,_mask:r,...t}}}return O0(o)?{...o}:{mask:o}}function Ce(o){if(q.Masked&&o instanceof q.Masked)return o;const e=$e(o),t=X0(e.mask);if(!t)throw new Error("Masked class is not found for provided mask "+e.mask+", appropriate module needs to be imported manually before creating mask.");return e.mask===t&&delete e.mask,e._mask&&(e.mask=e._mask,delete e._mask),new t(e)}q.createMask=Ce;class zt{get selectionStart(){let e;try{e=this._unsafeSelectionStart}catch{}return e??this.value.length}get selectionEnd(){let e;try{e=this._unsafeSelectionEnd}catch{}return e??this.value.length}select(e,t){if(!(e==null||t==null||e===this.selectionStart&&t===this.selectionEnd))try{this._unsafeSelect(e,t)}catch{}}get isActive(){return!1}}q.MaskElement=zt;const H0=90,rn=89;class Xe extends zt{constructor(e){super(),this.input=e,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var e,t,r;return(e=(t=(r=this.input).getRootNode)==null?void 0:t.call(r))!=null?e:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(e){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",e.drop),this.input.addEventListener("click",e.click),this.input.addEventListener("focus",e.focus),this.input.addEventListener("blur",e.commit),this._handlers=e}_onKeydown(e){if(this._handlers.redo&&(e.keyCode===H0&&e.shiftKey&&(e.metaKey||e.ctrlKey)||e.keyCode===rn&&e.ctrlKey))return e.preventDefault(),this._handlers.redo(e);if(this._handlers.undo&&e.keyCode===H0&&(e.metaKey||e.ctrlKey))return e.preventDefault(),this._handlers.undo(e);e.isComposing||this._handlers.selectionChange(e)}_onBeforeinput(e){if(e.inputType==="historyUndo"&&this._handlers.undo)return e.preventDefault(),this._handlers.undo(e);if(e.inputType==="historyRedo"&&this._handlers.redo)return e.preventDefault(),this._handlers.redo(e)}_onCompositionEnd(e){this._handlers.input(e)}_onInput(e){e.isComposing||this._handlers.input(e)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown),this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("beforeinput",this._onBeforeinput),this.input.removeEventListener("compositionend",this._onCompositionEnd),this.input.removeEventListener("drop",this._handlers.drop),this.input.removeEventListener("click",this._handlers.click),this.input.removeEventListener("focus",this._handlers.focus),this.input.removeEventListener("blur",this._handlers.commit),this._handlers={}}}q.HTMLMaskElement=Xe;class an extends Xe{constructor(e){super(e),this.input=e}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(e,t){this.input.setSelectionRange(e,t)}get value(){return this.input.value}set value(e){this.input.value=e}}q.HTMLMaskElement=Xe;class Y0 extends Xe{get _unsafeSelectionStart(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),r=t&&t.anchorOffset,n=t&&t.focusOffset;return n==null||r==null||r<n?r:n}get _unsafeSelectionEnd(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),r=t&&t.anchorOffset,n=t&&t.focusOffset;return n==null||r==null||r>n?r:n}_unsafeSelect(e,t){if(!this.rootElement.createRange)return;const r=this.rootElement.createRange();r.setStart(this.input.firstChild||this.input,e),r.setEnd(this.input.lastChild||this.input,t);const n=this.rootElement,s=n.getSelection&&n.getSelection();s&&(s.removeAllRanges(),s.addRange(r))}get value(){return this.input.textContent||""}set value(e){this.input.textContent=e}}q.HTMLContenteditableMaskElement=Y0;class Ye{constructor(){this.states=[],this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return this.states.length===0}push(e){this.currentIndex<this.states.length-1&&(this.states.length=this.currentIndex+1),this.states.push(e),this.states.length>Ye.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(e){return this.currentIndex=Math.min(Math.max(this.currentIndex+e,0),this.states.length-1),this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0,this.currentIndex=0}}Ye.MAX_LENGTH=100;class nn{constructor(e,t){this.el=e instanceof zt?e:e.isContentEditable&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"?new Y0(e):new an(e),this.masked=Ce(t),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new Ye,this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this._onUndo=this._onUndo.bind(this),this._onRedo=this._onRedo.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(e){var t;return e==null||((t=this.masked)==null?void 0:t.maskEquals(e))}get mask(){return this.masked.mask}set mask(e){if(this.maskEquals(e))return;if(!(e instanceof q.Masked)&&this.masked.constructor===X0(e)){this.masked.updateOptions({mask:e});return}const t=e instanceof q.Masked?e:Ce({mask:e});t.unmaskedValue=this.masked.unmaskedValue,this.masked=t}get value(){return this._value}set value(e){this.value!==e&&(this.masked.value=e,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(e){this.unmaskedValue!==e&&(this.masked.unmaskedValue=e,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(e){this.rawInputValue!==e&&(this.masked.rawInputValue=e,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(e){this.masked.typedValueEquals(e)||(this.masked.typedValue=e,this.updateControl("auto"))}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(e,t){const r=this._listeners[e];r&&r.forEach(n=>n(t))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(e){!this.el||!this.el.isActive||(this.el.select(e,e),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value,this._unmaskedValue=this.masked.unmaskedValue,this._rawInputValue=this.masked.rawInputValue}updateControl(e){const t=this.masked.unmaskedValue,r=this.masked.value,n=this.masked.rawInputValue,s=this.displayValue,u=this.unmaskedValue!==t||this.value!==r||this._rawInputValue!==n;this._unmaskedValue=t,this._value=r,this._rawInputValue=n,this.el.value!==s&&(this.el.value=s),e==="auto"?this.alignCursor():e!=null&&(this.cursorPos=e),u&&this._fireChangeEvents(),!this._historyChanging&&(u||this.history.isEmpty)&&this.history.push({unmaskedValue:t,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(e){const{mask:t,...r}=e,n=!this.maskEquals(t),s=this.masked.optionsIsChanged(r);n&&(this.mask=t),s&&this.masked.updateOptions(r),(n||s)&&this.updateControl()}updateCursor(e){e!=null&&(this.cursorPos=e,this._delayUpdateCursor(e))}_delayUpdateCursor(e){this._abortUpdateCursor(),this._changingCursorPos=e,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,z.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(e,t){return this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t),this}off(e,t){if(!this._listeners[e])return this;if(!t)return delete this._listeners[e],this;const r=this._listeners[e].indexOf(t);return r>=0&&this._listeners[e].splice(r,1),this}_onInput(e){this._inputEvent=e,this._abortUpdateCursor();const t=new tn({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),r=this.masked.rawInputValue,n=this.masked.splice(t.startChangePos,t.removed.length,t.inserted,t.removeDirection,{input:!0,raw:!0}).offset,s=r===this.masked.rawInputValue?t.removeDirection:z.NONE;let u=this.masked.nearestInputPos(t.startChangePos+n,s);s!==z.NONE&&(u=this.masked.nearestInputPos(u,z.NONE)),this.updateControl(u),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(e){e.preventDefault(),e.stopPropagation()}_onFocus(e){this.alignCursorFriendly()}_onClick(e){this.alignCursorFriendly()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(e){e&&(this._historyChanging=!0,this.unmaskedValue=e.unmaskedValue,this.el.select(e.selection.start,e.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}q.InputMask=nn;class K{static normalize(e){return Array.isArray(e)?e:[e,new K]}constructor(e){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},e)}aggregate(e){return this.inserted+=e.inserted,this.rawInserted+=e.rawInserted,this.tailShift+=e.tailShift,this.skip=this.skip||e.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return!!this.rawInserted||this.skip}equals(e){return this.inserted===e.inserted&&this.tailShift===e.tailShift&&this.rawInserted===e.rawInserted&&this.skip===e.skip}}q.ChangeDetails=K;class pe{constructor(e,t,r){e===void 0&&(e=""),t===void 0&&(t=0),this.value=e,this.from=t,this.stop=r}toString(){return this.value}extend(e){this.value+=String(e)}appendTo(e){return e.append(this.toString(),{tail:!0}).aggregate(e._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(e){Object.assign(this,e)}unshift(e){if(!this.value.length||e!=null&&this.from>=e)return"";const t=this.value[0];return this.value=this.value.slice(1),t}shift(){if(!this.value.length)return"";const e=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),e}}class te{constructor(e){this._value="",this._update({...te.DEFAULTS,...e}),this._initialized=!0}updateOptions(e){this.optionsIsChanged(e)&&this.withValueRefresh(this._update.bind(this,e))}_update(e){Object.assign(this,e)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value}reset(){this._value=""}get value(){return this._value}set value(e){this.resolve(e,{input:!0})}resolve(e,t){t===void 0&&(t={input:!0}),this.reset(),this.append(e,t,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(e){this.resolve(e,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(e){this.format?this.value=this.format(e,this):this.unmaskedValue=String(e)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(e){this.resolve(e,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(e,t){return e}totalInputPositions(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),Math.min(this.displayValue.length,t-e)}extractInput(e,t,r){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),this.displayValue.slice(e,t)}extractTail(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),new pe(this.extractInput(e,t),e)}appendTail(e){return be(e)&&(e=new pe(String(e))),e.appendTo(this)}_appendCharRaw(e,t){return e?(this._value+=e,new K({inserted:e,rawInserted:e})):new K}_appendChar(e,t,r){t===void 0&&(t={});const n=this.state;let s;if([e,s]=this.doPrepareChar(e,t),e&&(s=s.aggregate(this._appendCharRaw(e,t)),!s.rawInserted&&this.autofix==="pad")){const u=this.state;this.state=n;let l=this.pad(t);const f=this._appendCharRaw(e,t);l=l.aggregate(f),f.rawInserted||l.equals(s)?s=l:this.state=u}if(s.inserted){let u,l=this.doValidate(t)!==!1;if(l&&r!=null){const f=this.state;if(this.overwrite===!0){u=r.state;for(let c=0;c<s.rawInserted.length;++c)r.unshift(this.displayValue.length-s.tailShift)}let i=this.appendTail(r);if(l=i.rawInserted.length===r.toString().length,!(l&&i.inserted)&&this.overwrite==="shift"){this.state=f,u=r.state;for(let c=0;c<s.rawInserted.length;++c)r.shift();i=this.appendTail(r),l=i.rawInserted.length===r.toString().length}l&&i.inserted&&(this.state=f)}l||(s=new K,this.state=n,r&&u&&(r.state=u))}return s}_appendPlaceholder(){return new K}_appendEager(){return new K}append(e,t,r){if(!be(e))throw new Error("value should be string");const n=be(r)?new pe(String(r)):r;t!=null&&t.tail&&(t._beforeTailState=this.state);let s;[e,s]=this.doPrepare(e,t);for(let u=0;u<e.length;++u){const l=this._appendChar(e[u],t,n);if(!l.rawInserted&&!this.doSkipInvalid(e[u],t,n))break;s.aggregate(l)}return(this.eager===!0||this.eager==="append")&&t!=null&&t.input&&e&&s.aggregate(this._appendEager()),n!=null&&(s.tailShift+=this.appendTail(n).tailShift),s}remove(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),this._value=this.displayValue.slice(0,e)+this.displayValue.slice(t),new K}withValueRefresh(e){if(this._refreshing||!this._initialized)return e();this._refreshing=!0;const t=this.rawInputValue,r=this.value,n=e();return this.rawInputValue=t,this.value&&this.value!==r&&r.indexOf(this.value)===0&&(this.append(r.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,n}runIsolated(e){if(this._isolated||!this._initialized)return e(this);this._isolated=!0;const t=this.state,r=e(this);return this.state=t,delete this._isolated,r}doSkipInvalid(e,t,r){return!!this.skipInvalid}doPrepare(e,t){return t===void 0&&(t={}),K.normalize(this.prepare?this.prepare(e,this,t):e)}doPrepareChar(e,t){return t===void 0&&(t={}),K.normalize(this.prepareChar?this.prepareChar(e,this,t):e)}doValidate(e){return(!this.validate||this.validate(this.value,this,e))&&(!this.parent||this.parent.doValidate(e))}doCommit(){this.commit&&this.commit(this.value,this)}splice(e,t,r,n,s){r===void 0&&(r=""),n===void 0&&(n=z.NONE),s===void 0&&(s={input:!0});const u=e+t,l=this.extractTail(u),f=this.eager===!0||this.eager==="remove";let i;f&&(n=en(n),i=this.extractInput(0,u,{raw:!0}));let c=e;const g=new K;if(n!==z.NONE&&(c=this.nearestInputPos(e,t>1&&e!==0&&!f?z.NONE:n),g.tailShift=c-e),g.aggregate(this.remove(c)),f&&n!==z.NONE&&i===this.rawInputValue)if(n===z.FORCE_LEFT){let d;for(;i===this.rawInputValue&&(d=this.displayValue.length);)g.aggregate(new K({tailShift:-1})).aggregate(this.remove(d-1))}else n===z.FORCE_RIGHT&&l.unshift();return g.aggregate(this.append(r,s,l))}maskEquals(e){return this.mask===e}optionsIsChanged(e){return!Ke(this,e)}typedValueEquals(e){const t=this.typedValue;return e===t||te.EMPTY_VALUES.includes(e)&&te.EMPTY_VALUES.includes(t)||(this.format?this.format(e,this)===this.format(this.typedValue,this):!1)}pad(e){return new K}}te.DEFAULTS={skipInvalid:!0};te.EMPTY_VALUES=[void 0,null,""];q.Masked=te;class we{constructor(e,t){e===void 0&&(e=[]),t===void 0&&(t=0),this.chunks=e,this.from=t}toString(){return this.chunks.map(String).join("")}extend(e){if(!String(e))return;e=be(e)?new pe(String(e)):e;const t=this.chunks[this.chunks.length-1],r=t&&(t.stop===e.stop||e.stop==null)&&e.from===t.from+t.toString().length;if(e instanceof pe)r?t.extend(e.toString()):this.chunks.push(e);else if(e instanceof we){if(e.stop==null){let n;for(;e.chunks.length&&e.chunks[0].stop==null;)n=e.chunks.shift(),n.from+=e.from,this.extend(n)}e.toString()&&(e.stop=e.blockIndex,this.chunks.push(e))}}appendTo(e){if(!(e instanceof q.MaskedPattern))return new pe(this.toString()).appendTo(e);const t=new K;for(let r=0;r<this.chunks.length;++r){const n=this.chunks[r],s=e._mapPosToBlock(e.displayValue.length),u=n.stop;let l;if(u!=null&&(!s||s.index<=u)&&((n instanceof we||e._stops.indexOf(u)>=0)&&t.aggregate(e._appendPlaceholder(u)),l=n instanceof we&&e._blocks[u]),l){const f=l.appendTail(n);t.aggregate(f);const i=n.toString().slice(f.rawInserted.length);i&&t.aggregate(e.append(i,{tail:!0}))}else t.aggregate(e.append(n.toString(),{tail:!0}))}return t}get state(){return{chunks:this.chunks.map(e=>e.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(e){const{chunks:t,...r}=e;Object.assign(this,r),this.chunks=t.map(n=>{const s="chunks"in n?new we:new pe;return s.state=n,s})}unshift(e){if(!this.chunks.length||e!=null&&this.from>=e)return"";const t=e!=null?e-this.from:e;let r=0;for(;r<this.chunks.length;){const n=this.chunks[r],s=n.unshift(t);if(n.toString()){if(!s)break;++r}else this.chunks.splice(r,1);if(s)return s}return""}shift(){if(!this.chunks.length)return"";let e=this.chunks.length-1;for(;0<=e;){const t=this.chunks[e],r=t.shift();if(t.toString()){if(!r)break;--e}else this.chunks.splice(e,1);if(r)return r}return""}}class sn{constructor(e,t){this.masked=e,this._log=[];const{offset:r,index:n}=e._mapPosToBlock(t)||(t<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=r,this.index=n,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(e){Object.assign(this,e)}pushState(){this._log.push(this.state)}popState(){const e=this._log.pop();return e&&(this.state=e),e}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(e){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((t=this.block)==null?void 0:t.displayValue.length)||0){var t;if(e())return this.ok=!0}return this.ok=!1}_pushRight(e){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(e())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,z.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,z.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,z.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,z.FORCE_RIGHT),this.offset!==this.block.value.length))return!0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,z.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,z.NONE),!0})}}class Q0{constructor(e){Object.assign(this,e),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(e,t){return e===void 0&&(e=0),t===void 0&&(t=this._value.length),this._value=this._value.slice(0,e)+this._value.slice(t),this._value||(this._isRawInput=!1),new K}nearestInputPos(e,t){t===void 0&&(t=z.NONE);const r=0,n=this._value.length;switch(t){case z.LEFT:case z.FORCE_LEFT:return r;case z.NONE:case z.RIGHT:case z.FORCE_RIGHT:default:return n}}totalInputPositions(e,t){return e===void 0&&(e=0),t===void 0&&(t=this._value.length),this._isRawInput?t-e:0}extractInput(e,t,r){return e===void 0&&(e=0),t===void 0&&(t=this._value.length),r===void 0&&(r={}),r.raw&&this._isRawInput&&this._value.slice(e,t)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(e,t){if(t===void 0&&(t={}),this.isFilled)return new K;const r=this.eager===!0||this.eager==="append",s=this.char===e&&(this.isUnmasking||t.input||t.raw)&&(!t.raw||!r)&&!t.tail,u=new K({inserted:this.char,rawInserted:s?this.char:""});return this._value=this.char,this._isRawInput=s&&(t.raw||t.input),u}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const e=new K;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return new pe("")}appendTail(e){return be(e)&&(e=new pe(String(e))),e.appendTo(this)}append(e,t,r){const n=this._appendChar(e[0],t);return r!=null&&(n.tailShift+=this.appendTail(r).tailShift),n}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value,this._isRawInput=!!e._rawInputValue}pad(e){return this._appendPlaceholder()}}class We{constructor(e){const{parent:t,isOptional:r,placeholderChar:n,displayChar:s,lazy:u,eager:l,...f}=e;this.masked=Ce(f),Object.assign(this,{parent:t,isOptional:r,placeholderChar:n,displayChar:s,lazy:u,eager:l})}reset(){this.isFilled=!1,this.masked.reset()}remove(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.value.length),e===0&&t>=1?(this.isFilled=!1,this.masked.remove(e,t)):new K}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return!!this.masked.value||this.isOptional}_appendChar(e,t){if(t===void 0&&(t={}),this.isFilled)return new K;const r=this.masked.state;let n=this.masked._appendChar(e,this.currentMaskFlags(t));return n.inserted&&this.doValidate(t)===!1&&(n=new K,this.masked.state=r),!n.inserted&&!this.isOptional&&!this.lazy&&!t.input&&(n.inserted=this.placeholderChar),n.skip=!n.inserted&&!this.isOptional,this.isFilled=!!n.inserted,n}append(e,t,r){return this.masked.append(e,this.currentMaskFlags(t),r)}_appendPlaceholder(){return this.isFilled||this.isOptional?new K:(this.isFilled=!0,new K({inserted:this.placeholderChar}))}_appendEager(){return new K}extractTail(e,t){return this.masked.extractTail(e,t)}appendTail(e){return this.masked.appendTail(e)}extractInput(e,t,r){return e===void 0&&(e=0),t===void 0&&(t=this.value.length),this.masked.extractInput(e,t,r)}nearestInputPos(e,t){t===void 0&&(t=z.NONE);const r=0,n=this.value.length,s=Math.min(Math.max(e,r),n);switch(t){case z.LEFT:case z.FORCE_LEFT:return this.isComplete?s:r;case z.RIGHT:case z.FORCE_RIGHT:return this.isComplete?s:n;case z.NONE:default:return s}}totalInputPositions(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.value.length),this.value.slice(e,t).length}doValidate(e){return this.masked.doValidate(this.currentMaskFlags(e))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(e)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(e){this.masked.state=e.masked,this.isFilled=e.isFilled}currentMaskFlags(e){var t;return{...e,_beforeTailState:(e==null||(t=e._beforeTailState)==null?void 0:t.masked)||(e==null?void 0:e._beforeTailState)}}pad(e){return new K}}We.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class on extends te{updateOptions(e){super.updateOptions(e)}_update(e){const t=e.mask;t&&(e.validate=r=>r.search(t)>=0),super._update(e)}}q.MaskedRegExp=on;class re extends te{constructor(e){super({...re.DEFAULTS,...e,definitions:Object.assign({},We.DEFAULT_DEFINITIONS,e==null?void 0:e.definitions)})}updateOptions(e){super.updateOptions(e)}_update(e){e.definitions=Object.assign({},this.definitions,e.definitions),super._update(e),this._rebuildMask()}_rebuildMask(){const e=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const t=this.mask;if(!t||!e)return;let r=!1,n=!1;for(let s=0;s<t.length;++s){if(this.blocks){const i=t.slice(s),c=Object.keys(this.blocks).filter(d=>i.indexOf(d)===0);c.sort((d,m)=>m.length-d.length);const g=c[0];if(g){const{expose:d,repeat:m,...x}=$e(this.blocks[g]),C={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...x,repeat:m,parent:this},v=m!=null?new q.RepeatBlock(C):Ce(C);v&&(this._blocks.push(v),d&&(this.exposeBlock=v),this._maskedBlocks[g]||(this._maskedBlocks[g]=[]),this._maskedBlocks[g].push(this._blocks.length-1)),s+=g.length-1;continue}}let u=t[s],l=u in e;if(u===re.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(u==="{"||u==="}"){r=!r;continue}if(u==="["||u==="]"){n=!n;continue}if(u===re.ESCAPE_CHAR){if(++s,u=t[s],!u)break;l=!1}const f=l?new We({isOptional:n,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...$e(e[u]),parent:this}):new Q0({char:u,eager:this.eager,isUnmasking:r});this._blocks.push(f)}}get state(){return{...super.state,_blocks:this._blocks.map(e=>e.state)}}set state(e){if(!e){this.reset();return}const{_blocks:t,...r}=e;this._blocks.forEach((n,s)=>n.state=t[s]),super.state=r}reset(){super.reset(),this._blocks.forEach(e=>e.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(e=>e.isComplete)}get isFilled(){return this._blocks.every(e=>e.isFilled)}get isFixed(){return this._blocks.every(e=>e.isFixed)}get isOptional(){return this._blocks.every(e=>e.isOptional)}doCommit(){this._blocks.forEach(e=>e.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((e,t)=>e+=t.unmaskedValue,"")}set unmaskedValue(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=e,this.appendTail(t),this.doCommit()}else super.unmaskedValue=e}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((e,t)=>e+=t.value,"")}set value(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=e,this.appendTail(t),this.doCommit()}else super.value=e}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=e,this.appendTail(t),this.doCommit()}else super.typedValue=e}get displayValue(){return this._blocks.reduce((e,t)=>e+=t.displayValue,"")}appendTail(e){return super.appendTail(e).aggregate(this._appendPlaceholder())}_appendEager(){var e;const t=new K;let r=(e=this._mapPosToBlock(this.displayValue.length))==null?void 0:e.index;if(r==null)return t;this._blocks[r].isFilled&&++r;for(let n=r;n<this._blocks.length;++n){const s=this._blocks[n]._appendEager();if(!s.inserted)break;t.aggregate(s)}return t}_appendCharRaw(e,t){t===void 0&&(t={});const r=this._mapPosToBlock(this.displayValue.length),n=new K;if(!r)return n;for(let u=r.index,l;l=this._blocks[u];++u){var s;const f=l._appendChar(e,{...t,_beforeTailState:(s=t._beforeTailState)==null||(s=s._blocks)==null?void 0:s[u]});if(n.aggregate(f),f.consumed)break}return n}extractTail(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);const r=new we;return e===t||this._forEachBlocksInRange(e,t,(n,s,u,l)=>{const f=n.extractTail(u,l);f.stop=this._findStopBefore(s),f.from=this._blockStartPos(s),f instanceof we&&(f.blockIndex=s),r.extend(f)}),r}extractInput(e,t,r){if(e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),r===void 0&&(r={}),e===t)return"";let n="";return this._forEachBlocksInRange(e,t,(s,u,l,f)=>{n+=s.extractInput(l,f,r)}),n}_findStopBefore(e){let t;for(let r=0;r<this._stops.length;++r){const n=this._stops[r];if(n<=e)t=n;else break}return t}_appendPlaceholder(e){const t=new K;if(this.lazy&&e==null)return t;const r=this._mapPosToBlock(this.displayValue.length);if(!r)return t;const n=r.index,s=e??this._blocks.length;return this._blocks.slice(n,s).forEach(u=>{if(!u.lazy||e!=null){var l;t.aggregate(u._appendPlaceholder((l=u._blocks)==null?void 0:l.length))}}),t}_mapPosToBlock(e){let t="";for(let r=0;r<this._blocks.length;++r){const n=this._blocks[r],s=t.length;if(t+=n.displayValue,e<=t.length)return{index:r,offset:e-s}}}_blockStartPos(e){return this._blocks.slice(0,e).reduce((t,r)=>t+=r.displayValue.length,0)}_forEachBlocksInRange(e,t,r){t===void 0&&(t=this.displayValue.length);const n=this._mapPosToBlock(e);if(n){const s=this._mapPosToBlock(t),u=s&&n.index===s.index,l=n.offset,f=s&&u?s.offset:this._blocks[n.index].displayValue.length;if(r(this._blocks[n.index],n.index,l,f),s&&!u){for(let i=n.index+1;i<s.index;++i)r(this._blocks[i],i,0,this._blocks[i].displayValue.length);r(this._blocks[s.index],s.index,0,s.offset)}}}remove(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);const r=super.remove(e,t);return this._forEachBlocksInRange(e,t,(n,s,u,l)=>{r.aggregate(n.remove(u,l))}),r}nearestInputPos(e,t){if(t===void 0&&(t=z.NONE),!this._blocks.length)return 0;const r=new sn(this,e);if(t===z.NONE)return r.pushRightBeforeInput()||(r.popState(),r.pushLeftBeforeInput())?r.pos:this.displayValue.length;if(t===z.LEFT||t===z.FORCE_LEFT){if(t===z.LEFT){if(r.pushRightBeforeFilled(),r.ok&&r.pos===e)return e;r.popState()}if(r.pushLeftBeforeInput(),r.pushLeftBeforeRequired(),r.pushLeftBeforeFilled(),t===z.LEFT){if(r.pushRightBeforeInput(),r.pushRightBeforeRequired(),r.ok&&r.pos<=e||(r.popState(),r.ok&&r.pos<=e))return r.pos;r.popState()}return r.ok?r.pos:t===z.FORCE_LEFT?0:(r.popState(),r.ok||(r.popState(),r.ok)?r.pos:0)}return t===z.RIGHT||t===z.FORCE_RIGHT?(r.pushRightBeforeInput(),r.pushRightBeforeRequired(),r.pushRightBeforeFilled()?r.pos:t===z.FORCE_RIGHT?this.displayValue.length:(r.popState(),r.ok||(r.popState(),r.ok)?r.pos:this.nearestInputPos(e,z.LEFT))):e}totalInputPositions(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);let r=0;return this._forEachBlocksInRange(e,t,(n,s,u,l)=>{r+=n.totalInputPositions(u,l)}),r}maskedBlock(e){return this.maskedBlocks(e)[0]}maskedBlocks(e){const t=this._maskedBlocks[e];return t?t.map(r=>this._blocks[r]):[]}pad(e){const t=new K;return this._forEachBlocksInRange(0,this.displayValue.length,r=>t.aggregate(r.pad(e))),t}}re.DEFAULTS={...te.DEFAULTS,lazy:!0,placeholderChar:"_"};re.STOP_CHAR="`";re.ESCAPE_CHAR="\\";re.InputDefinition=We;re.FixedDefinition=Q0;q.MaskedPattern=re;class qe extends re{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{to:t=this.to||0,from:r=this.from||0,maxLength:n=this.maxLength||0,autofix:s=this.autofix,...u}=e;this.to=t,this.from=r,this.maxLength=Math.max(String(t).length,n),this.autofix=s;const l=String(this.from).padStart(this.maxLength,"0"),f=String(this.to).padStart(this.maxLength,"0");let i=0;for(;i<f.length&&f[i]===l[i];)++i;u.mask=f.slice(0,i).replace(/0/g,"\\0")+"0".repeat(this.maxLength-i),super._update(u)}get isComplete(){return super.isComplete&&!!this.value}boundaries(e){let t="",r="";const[,n,s]=e.match(/^(\D*)(\d*)(\D*)/)||[];return s&&(t="0".repeat(n.length)+s,r="9".repeat(n.length)+s),t=t.padEnd(this.maxLength,"0"),r=r.padEnd(this.maxLength,"9"),[t,r]}doPrepareChar(e,t){t===void 0&&(t={});let r;return[e,r]=super.doPrepareChar(e.replace(/\D/g,""),t),e||(r.skip=!this.isComplete),[e,r]}_appendCharRaw(e,t){if(t===void 0&&(t={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(e,t);const r=String(this.from).padStart(this.maxLength,"0"),n=String(this.to).padStart(this.maxLength,"0"),[s,u]=this.boundaries(this.value+e);return Number(u)<this.from?super._appendCharRaw(r[this.value.length],t):Number(s)>this.to?!t.tail&&this.autofix==="pad"&&this.value.length+1<this.maxLength?super._appendCharRaw(r[this.value.length],t).aggregate(this._appendCharRaw(e,t)):super._appendCharRaw(n[this.value.length],t):super._appendCharRaw(e,t)}doValidate(e){const t=this.value;if(t.search(/[^0]/)===-1&&t.length<=this._matchFrom)return!0;const[n,s]=this.boundaries(t);return this.from<=Number(s)&&Number(n)<=this.to&&super.doValidate(e)}pad(e){const t=new K;if(this.value.length===this.maxLength)return t;const r=this.value,n=this.maxLength-this.value.length;if(n){this.reset();for(let s=0;s<n;++s)t.aggregate(super._appendCharRaw("0",e));r.split("").forEach(s=>this._appendCharRaw(s))}return t}}q.MaskedRange=qe;const ln="d{.}`m{.}`Y";class me extends re{static extractPatternOptions(e){const{mask:t,pattern:r,...n}=e;return{...n,mask:be(t)?t:r}}constructor(e){super(me.extractPatternOptions({...me.DEFAULTS,...e}))}updateOptions(e){super.updateOptions(e)}_update(e){const{mask:t,pattern:r,blocks:n,...s}={...me.DEFAULTS,...e},u=Object.assign({},me.GET_DEFAULT_BLOCKS());e.min&&(u.Y.from=e.min.getFullYear()),e.max&&(u.Y.to=e.max.getFullYear()),e.min&&e.max&&u.Y.from===u.Y.to&&(u.m.from=e.min.getMonth()+1,u.m.to=e.max.getMonth()+1,u.m.from===u.m.to&&(u.d.from=e.min.getDate(),u.d.to=e.max.getDate())),Object.assign(u,this.blocks,n),super._update({...s,mask:be(t)?t:r,blocks:u})}doValidate(e){const t=this.date;return super.doValidate(e)&&(!this.isComplete||this.isDateExist(this.value)&&t!=null&&(this.min==null||this.min<=t)&&(this.max==null||t<=this.max))}isDateExist(e){return this.format(this.parse(e,this),this).indexOf(e)>=0}get date(){return this.typedValue}set date(e){this.typedValue=e}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(e){super.typedValue=e}maskEquals(e){return e===Date||super.maskEquals(e)}optionsIsChanged(e){return super.optionsIsChanged(me.extractPatternOptions(e))}}me.GET_DEFAULT_BLOCKS=()=>({d:{mask:qe,from:1,to:31,maxLength:2},m:{mask:qe,from:1,to:12,maxLength:2},Y:{mask:qe,from:1900,to:9999}});me.DEFAULTS={...re.DEFAULTS,mask:Date,pattern:ln,format:(o,e)=>{if(!o)return"";const t=String(o.getDate()).padStart(2,"0"),r=String(o.getMonth()+1).padStart(2,"0"),n=o.getFullYear();return[t,r,n].join(".")},parse:(o,e)=>{const[t,r,n]=o.split(".").map(Number);return new Date(n,r-1,t)}};q.MaskedDate=me;class Qe extends te{constructor(e){super({...Qe.DEFAULTS,...e}),this.currentMask=void 0}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),"mask"in e&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(e.mask)?e.mask.map(t=>{const{expose:r,...n}=$e(t),s=Ce({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...n});return r&&(this.exposeMask=s),s}):[])}_appendCharRaw(e,t){t===void 0&&(t={});const r=this._applyDispatch(e,t);return this.currentMask&&r.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(t))),r}_applyDispatch(e,t,r){e===void 0&&(e=""),t===void 0&&(t={}),r===void 0&&(r="");const n=t.tail&&t._beforeTailState!=null?t._beforeTailState._value:this.value,s=this.rawInputValue,u=t.tail&&t._beforeTailState!=null?t._beforeTailState._rawInputValue:s,l=s.slice(u.length),f=this.currentMask,i=new K,c=f==null?void 0:f.state;return this.currentMask=this.doDispatch(e,{...t},r),this.currentMask&&(this.currentMask!==f?(this.currentMask.reset(),u&&(this.currentMask.append(u,{raw:!0}),i.tailShift=this.currentMask.value.length-n.length),l&&(i.tailShift+=this.currentMask.append(l,{raw:!0,tail:!0}).tailShift)):c&&(this.currentMask.state=c)),i}_appendPlaceholder(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendPlaceholder()),e}_appendEager(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendEager()),e}appendTail(e){const t=new K;return e&&t.aggregate(this._applyDispatch("",{},e)),t.aggregate(this.currentMask?this.currentMask.appendTail(e):super.appendTail(e))}currentMaskFlags(e){var t,r;return{...e,_beforeTailState:((t=e._beforeTailState)==null?void 0:t.currentMaskRef)===this.currentMask&&((r=e._beforeTailState)==null?void 0:r.currentMask)||e._beforeTailState}}doDispatch(e,t,r){return t===void 0&&(t={}),r===void 0&&(r=""),this.dispatch(e,this,t,r)}doValidate(e){return super.doValidate(e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))}doPrepare(e,t){t===void 0&&(t={});let[r,n]=super.doPrepare(e,t);if(this.currentMask){let s;[r,s]=super.doPrepare(r,this.currentMaskFlags(t)),n=n.aggregate(s)}return[r,n]}doPrepareChar(e,t){t===void 0&&(t={});let[r,n]=super.doPrepareChar(e,t);if(this.currentMask){let s;[r,s]=super.doPrepareChar(r,this.currentMaskFlags(t)),n=n.aggregate(s)}return[r,n]}reset(){var e;(e=this.currentMask)==null||e.reset(),this.compiledMasks.forEach(t=>t.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(e){this.exposeMask?(this.exposeMask.value=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=e}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(e){this.exposeMask?(this.exposeMask.unmaskedValue=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=e}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(e){if(this.exposeMask){this.exposeMask.typedValue=e,this.currentMask=this.exposeMask,this._applyDispatch();return}let t=String(e);this.currentMask&&(this.currentMask.typedValue=e,t=this.currentMask.unmaskedValue),this.unmaskedValue=t}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var e;return!!((e=this.currentMask)!=null&&e.isComplete)}get isFilled(){var e;return!!((e=this.currentMask)!=null&&e.isFilled)}remove(e,t){const r=new K;return this.currentMask&&r.aggregate(this.currentMask.remove(e,t)).aggregate(this._applyDispatch()),r}get state(){var e;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(t=>t.state),currentMaskRef:this.currentMask,currentMask:(e=this.currentMask)==null?void 0:e.state}}set state(e){const{compiledMasks:t,currentMaskRef:r,currentMask:n,...s}=e;t&&this.compiledMasks.forEach((u,l)=>u.state=t[l]),r!=null&&(this.currentMask=r,this.currentMask.state=n),super.state=s}extractInput(e,t,r){return this.currentMask?this.currentMask.extractInput(e,t,r):""}extractTail(e,t){return this.currentMask?this.currentMask.extractTail(e,t):super.extractTail(e,t)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(e,t){return this.currentMask?this.currentMask.nearestInputPos(e,t):super.nearestInputPos(e,t)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(e){this._overwrite=e}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(e){this._eager=e}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(e){this._skipInvalid=e}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(e){this._autofix=e}maskEquals(e){return Array.isArray(e)?this.compiledMasks.every((t,r)=>{if(!e[r])return;const{mask:n,...s}=e[r];return Ke(t,s)&&t.maskEquals(n)}):super.maskEquals(e)}typedValueEquals(e){var t;return!!((t=this.currentMask)!=null&&t.typedValueEquals(e))}}Qe.DEFAULTS={...te.DEFAULTS,dispatch:(o,e,t,r)=>{if(!e.compiledMasks.length)return;const n=e.rawInputValue,s=e.compiledMasks.map((u,l)=>{const f=e.currentMask===u,i=f?u.displayValue.length:u.nearestInputPos(u.displayValue.length,z.FORCE_LEFT);return u.rawInputValue!==n?(u.reset(),u.append(n,{raw:!0})):f||u.remove(i),u.append(o,e.currentMaskFlags(t)),u.appendTail(r),{index:l,weight:u.rawInputValue.length,totalInputPositions:u.totalInputPositions(0,Math.max(i,u.nearestInputPos(u.displayValue.length,z.FORCE_LEFT)))}});return s.sort((u,l)=>l.weight-u.weight||l.totalInputPositions-u.totalInputPositions),e.compiledMasks[s[0].index]}};q.MaskedDynamic=Qe;class Je extends re{constructor(e){super({...Je.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){const{enum:t,...r}=e;if(t){const n=t.map(l=>l.length),s=Math.min(...n),u=Math.max(...n)-s;r.mask="*".repeat(s),u&&(r.mask+="["+"*".repeat(u)+"]"),this.enum=t}super._update(r)}_appendCharRaw(e,t){t===void 0&&(t={});const r=Math.min(this.nearestInputPos(0,z.FORCE_RIGHT),this.value.length),n=this.enum.filter(s=>this.matchValue(s,this.unmaskedValue+e,r));if(n.length){n.length===1&&this._forEachBlocksInRange(0,this.value.length,(u,l)=>{const f=n[0][l];l>=this.value.length||f===u.value||(u.reset(),u._appendChar(f,t))});const s=super._appendCharRaw(n[0][this.value.length],t);return n.length===1&&n[0].slice(this.unmaskedValue.length).split("").forEach(u=>s.aggregate(super._appendCharRaw(u))),s}return new K({skip:!this.isComplete})}extractTail(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),new pe("",e)}remove(e,t){if(e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),e===t)return new K;const r=Math.min(super.nearestInputPos(0,z.FORCE_RIGHT),this.value.length);let n;for(n=e;n>=0&&!(this.enum.filter(l=>this.matchValue(l,this.value.slice(r,n),r)).length>1);--n);const s=super.remove(n,t);return s.tailShift+=n-e,s}get isComplete(){return this.enum.indexOf(this.value)>=0}}Je.DEFAULTS={...re.DEFAULTS,matchValue:(o,e,t)=>o.indexOf(e,t)===t};q.MaskedEnum=Je;class un extends te{updateOptions(e){super.updateOptions(e)}_update(e){super._update({...e,validate:e.mask})}}q.MaskedFunction=un;var J0;class ie extends te{constructor(e){super({...ie.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){const e="^"+(this.allowNegative?"[+|\\-]?":""),t="\\d*",r=(this.scale?"("+Mt(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(e+t+r),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(Mt).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(Mt(this.thousandsSeparator),"g")}_removeThousandsSeparators(e){return e.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(e){const t=e.split(this.radix);return t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),t.join(this.radix)}doPrepareChar(e,t){t===void 0&&(t={});const[r,n]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(t.input&&t.raw||!t.input&&!t.raw)?e.replace(this._mapToRadixRegExp,this.radix):e),t);return e&&!r&&(n.skip=!0),r&&!this.allowPositive&&!this.value&&r!=="-"&&n.aggregate(this._appendChar("-")),[r,n]}_separatorsCount(e,t){t===void 0&&(t=!1);let r=0;for(let n=0;n<e;++n)this._value.indexOf(this.thousandsSeparator,n)===n&&(++r,t&&(e+=this.thousandsSeparator.length));return r}_separatorsCountFromSlice(e){return e===void 0&&(e=this._value),this._separatorsCount(this._removeThousandsSeparators(e).length,!0)}extractInput(e,t,r){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t),this._removeThousandsSeparators(super.extractInput(e,t,r))}_appendCharRaw(e,t){t===void 0&&(t={});const r=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,n=this._separatorsCountFromSlice(r);this._value=this._removeThousandsSeparators(this.value);const s=this._value;this._value+=e;const u=this.number;let l=!isNaN(u),f=!1;if(l){let d;this.min!=null&&this.min<0&&this.number<this.min&&(d=this.min),this.max!=null&&this.max>0&&this.number>this.max&&(d=this.max),d!=null&&(this.autofix?(this._value=this.format(d,this).replace(ie.UNMASKED_RADIX,this.radix),f||(f=s===this._value&&!t.tail)):l=!1),l&&(l=!!this._value.match(this._numberRegExp))}let i;l?i=new K({inserted:this._value.slice(s.length),rawInserted:f?"":e,skip:f}):(this._value=s,i=new K),this._value=this._insertThousandsSeparators(this._value);const c=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,g=this._separatorsCountFromSlice(c);return i.tailShift+=(g-n)*this.thousandsSeparator.length,i}_findSeparatorAround(e){if(this.thousandsSeparator){const t=e-this.thousandsSeparator.length+1,r=this.value.indexOf(this.thousandsSeparator,t);if(r<=e)return r}return-1}_adjustRangeWithSeparators(e,t){const r=this._findSeparatorAround(e);r>=0&&(e=r);const n=this._findSeparatorAround(t);return n>=0&&(t=n+this.thousandsSeparator.length),[e,t]}remove(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t);const r=this.value.slice(0,e),n=this.value.slice(t),s=this._separatorsCount(r.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(r+n));const u=this._separatorsCountFromSlice(r);return new K({tailShift:(u-s)*this.thousandsSeparator.length})}nearestInputPos(e,t){if(!this.thousandsSeparator)return e;switch(t){case z.NONE:case z.LEFT:case z.FORCE_LEFT:{const r=this._findSeparatorAround(e-1);if(r>=0){const n=r+this.thousandsSeparator.length;if(e<n||this.value.length<=n||t===z.FORCE_LEFT)return r}break}case z.RIGHT:case z.FORCE_RIGHT:{const r=this._findSeparatorAround(e);if(r>=0)return r+this.thousandsSeparator.length}}return e}doCommit(){if(this.value){const e=this.number;let t=e;this.min!=null&&(t=Math.max(t,this.min)),this.max!=null&&(t=Math.min(t,this.max)),t!==e&&(this.unmaskedValue=this.format(t,this));let r=this.value;this.normalizeZeros&&(r=this._normalizeZeros(r)),this.padFractionalZeros&&this.scale>0&&(r=this._padFractionalZeros(r)),this._value=r}super.doCommit()}_normalizeZeros(e){const t=this._removeThousandsSeparators(e).split(this.radix);return t[0]=t[0].replace(/^(\D*)(0*)(\d*)/,(r,n,s,u)=>n+u),e.length&&!/\d$/.test(t[0])&&(t[0]=t[0]+"0"),t.length>1&&(t[1]=t[1].replace(/0*$/,""),t[1].length||(t.length=1)),this._insertThousandsSeparators(t.join(this.radix))}_padFractionalZeros(e){if(!e)return e;const t=e.split(this.radix);return t.length<2&&t.push(""),t[1]=t[1].padEnd(this.scale,"0"),t.join(this.radix)}doSkipInvalid(e,t,r){t===void 0&&(t={});const n=this.scale===0&&e!==this.thousandsSeparator&&(e===this.radix||e===ie.UNMASKED_RADIX||this.mapToRadix.includes(e));return super.doSkipInvalid(e,t,r)&&!n}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,ie.UNMASKED_RADIX)}set unmaskedValue(e){super.unmaskedValue=e}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(e){this.rawInputValue=this.format(e,this).replace(ie.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(e){this.typedValue=e}get allowNegative(){return this.min!=null&&this.min<0||this.max!=null&&this.max<0}get allowPositive(){return this.min!=null&&this.min>0||this.max!=null&&this.max>0}typedValueEquals(e){return(super.typedValueEquals(e)||ie.EMPTY_VALUES.includes(e)&&ie.EMPTY_VALUES.includes(this.typedValue))&&!(e===0&&this.value==="")}}J0=ie;ie.UNMASKED_RADIX=".";ie.EMPTY_VALUES=[...te.EMPTY_VALUES,0];ie.DEFAULTS={...te.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[J0.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:o=>o.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})};q.MaskedNumber=ie;const Ot={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function er(o,e,t){e===void 0&&(e=Ot.MASKED),t===void 0&&(t=Ot.MASKED);const r=Ce(o);return n=>r.runIsolated(s=>(s[e]=n,s[t]))}function cn(o,e,t,r){return er(e,t,r)(o)}q.PIPE_TYPE=Ot;q.createPipe=er;q.pipe=cn;class dn extends re{get repeatFrom(){var e;return(e=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)!=null?e:0}get repeatTo(){var e;return(e=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)!=null?e:1/0}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){var t,r,n;const{repeat:s,...u}=$e(e);this._blockOpts=Object.assign({},this._blockOpts,u);const l=Ce(this._blockOpts);this.repeat=(t=(r=s??l.repeat)!=null?r:this.repeat)!=null?t:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&((n=this._blocks)==null?void 0:n.length)||0,this.repeatFrom)),blocks:{m:l},eager:l.eager,overwrite:l.overwrite,skipInvalid:l.skipInvalid,lazy:l.lazy,placeholderChar:l.placeholderChar,displayChar:l.displayChar})}_allocateBlock(e){if(e<this._blocks.length)return this._blocks[e];if(this.repeatTo===1/0||this._blocks.length<this.repeatTo)return this._blocks.push(Ce(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]}_appendCharRaw(e,t){t===void 0&&(t={});const r=new K;for(let f=(n=(s=this._mapPosToBlock(this.displayValue.length))==null?void 0:s.index)!=null?n:Math.max(this._blocks.length-1,0),i,c;i=(u=this._blocks[f])!=null?u:c=!c&&this._allocateBlock(f);++f){var n,s,u,l;const g=i._appendChar(e,{...t,_beforeTailState:(l=t._beforeTailState)==null||(l=l._blocks)==null?void 0:l[f]});if(g.skip&&c){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(r.aggregate(g),g.consumed)break}return r}_trimEmptyTail(e,t){var r,n;e===void 0&&(e=0);const s=Math.max(((r=this._mapPosToBlock(e))==null?void 0:r.index)||0,this.repeatFrom,0);let u;t!=null&&(u=(n=this._mapPosToBlock(t))==null?void 0:n.index),u==null&&(u=this._blocks.length-1);let l=0;for(let f=u;s<=f&&!this._blocks[f].unmaskedValue;--f,++l);l&&(this._blocks.splice(u-l+1,l),this.mask=this.mask.slice(l))}reset(){super.reset(),this._trimEmptyTail()}remove(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);const r=super.remove(e,t);return this._trimEmptyTail(e,t),r}totalInputPositions(e,t){return e===void 0&&(e=0),t==null&&this.repeatTo===1/0?1/0:super.totalInputPositions(e,t)}get state(){return super.state}set state(e){this._blocks.length=e._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=e}}q.RepeatBlock=dn;try{globalThis.IMask=q}catch{}const xn={key:0,class:"mb-0 text-body-2xs font-normal text-heading-text"},hn={key:0,class:"text-orange-required"},fn=["type","value","disabled","mask","placeholder","inputmode"],pn={key:1,class:"animate-spin h-4 w-4 border-2 border-current border-t-transparent rounded-full"},vn={key:1,class:"text-body-3xs text-light-copy"},mn={key:2,class:"text-body-3xs text-red-500"},ue=a.defineComponent({__name:"input",props:{label:{default:""},type:{default:"text"},placeholder:{default:void 0},validationError:{default:""},hint:{default:""},mask:{default:""},rules:{default:()=>[]},isAmountInput:{type:Boolean,default:!1},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},showCopyIcon:{type:Boolean,default:!1},preventPaste:{type:Boolean,default:!1},modelValue:{default:void 0},defaultValue:{default:""},className:{default:""}},emits:["update:modelValue","blur","copied"],setup(o,{emit:e}){const t=o,r=e,n=a.computed(()=>t.modelValue!==void 0),s=a.ref(t.modelValue??t.defaultValue??""),u=a.ref(""),l=a.ref(""),f=a.ref(null);let i=null;a.watch(()=>t.modelValue,h=>{n.value&&(s.value=h??"",i&&i.value!==(h??"")&&(i.value=h??""))});const c=a.computed(()=>t.isAmountInput?Se(s.value.replace(/,/g,"")):s.value);function g(h){const b=h.target.value.replace(/,/g,"");n.value||(s.value=b),r("update:modelValue",b),a.nextTick(()=>{const A=f.value;if(A){const w=A.value.length;A.setSelectionRange(w,w)}})}function d(){r("blur",s.value)}function m(h){t.rules.includes("numeric")&&Cr(h)}function x(h){t.preventPaste&&(h.preventDefault(),u.value="",l.value="Pasting is disabled for this input")}const C=a.computed(()=>t.disabled?"bg-grey-50 cursor-not-allowed":"bg-white"),v=a.computed(()=>t.validationError||l.value?"border-red-300 bg-red-50":"border-grey-100");function E(h){return navigator.clipboard.writeText(h)}function p(){E(s.value).then(()=>{l.value="",u.value="Text copied to clipboard",r("copied")}).catch(()=>{u.value="",l.value="Failed to copy text to clipboard"})}return a.onMounted(()=>{if(!f.value)return;const h=t.mask?{mask:t.mask}:void 0;h&&(i=q(f.value,h),s.value&&(i.value=s.value),i.on("accept",()=>{const _=(i==null?void 0:i.value)??"";n.value||(s.value=_),r("update:modelValue",_),a.nextTick(()=>{const b=f.value;if(b){const A=b.value.length;b.setSelectionRange(A,A)}})}))}),a.onBeforeUnmount(()=>{i==null||i.destroy(),i=null}),(h,_)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["flex flex-col gap-2",h.className])},[h.label?(a.openBlock(),a.createElementBlock("p",xn,[a.createTextVNode(a.toDisplayString(h.label)+" ",1),h.required?(a.openBlock(),a.createElementBlock("span",hn," *")):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0),a.createElementVNode("div",{class:a.normalizeClass(["border-c px-3 py-2 flex items-center justify-between rounded-md h-12",C.value,v.value])},[a.renderSlot(h.$slots,"prefix"),a.createElementVNode("input",{ref_key:"inputEl",ref:f,type:h.type,value:c.value,disabled:h.disabled,mask:h.mask,placeholder:h.placeholder??(h.label?`Enter ${h.label.toLowerCase()}`:void 0),inputmode:h.isAmountInput?"decimal":void 0,class:"search-input bg-transparent outline-none border-none focus:outline-none focus:ring-0 text-body-2xs text-light-copy font-normal w-full",onInput:g,onBlur:d,onKeydown:m,onPaste:x},null,40,fn),h.loading?(a.openBlock(),a.createElementBlock("div",pn)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.renderSlot(h.$slots,"suffix"),h.showCopyIcon&&s.value.trim()!==""?(a.openBlock(),a.createBlock(Ae,{key:0,src:"assets/images/copyIcon.svg",alt:"copy",width:16,height:16,customClass:"cursor-pointer hover:opacity-70 transition-opacity",onClick:p})):a.createCommentVNode("",!0)],64))],2),h.hint||u.value?(a.openBlock(),a.createElementBlock("p",vn,a.toDisplayString(u.value||h.hint),1)):a.createCommentVNode("",!0),h.validationError||l.value?(a.openBlock(),a.createElementBlock("p",mn,a.toDisplayString(l.value||h.validationError),1)):a.createCommentVNode("",!0)],2))}}),Cn=["width","height"],gn={opacity:"0.6"},Bn=["fill"],_n=a.defineComponent({__name:"icon-chevron-down",props:{width:{default:24},height:{default:24},color:{default:"currentColor"}},setup(o){const e=o,t=a.useAttrs(),{width:r,height:n,color:s}=e;return(u,l)=>(a.openBlock(),a.createElementBlock("svg",a.mergeProps({width:a.unref(r),height:a.unref(n),viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.unref(t)),[a.createElementVNode("g",gn,[a.createElementVNode("path",{d:"M16.5813 7.83128L10.3313 14.0813C10.2434 14.1691 10.1242 14.2184 10 14.2184C9.87581 14.2184 9.75667 14.1691 9.66878 14.0813L3.41878 7.83128C3.33598 7.74242 3.2909 7.62489 3.29304 7.50345C3.29518 7.38201 3.34438 7.26615 3.43026 7.18026C3.51615 7.09438 3.63201 7.04518 3.75345 7.04304C3.87489 7.0409 3.99242 7.08598 4.08128 7.16878L10 13.0867L15.9188 7.16878C16.0076 7.08598 16.1252 7.0409 16.2466 7.04304C16.368 7.04518 16.4839 7.09438 16.5698 7.18026C16.6557 7.26615 16.7049 7.38201 16.707 7.50345C16.7092 7.62489 16.6641 7.74242 16.5813 7.83128Z",fill:a.unref(s)},null,8,Bn)])],16,Cn))}}),En=["width","height"],yn={opacity:"0.7"},kn=["fill"],An=a.defineComponent({__name:"icon-chevron-up",props:{width:{default:24},height:{default:24},color:{default:"currentColor"}},setup(o){const e=o,t=a.useAttrs(),{width:r,height:n,color:s}=e;return(u,l)=>(a.openBlock(),a.createElementBlock("svg",a.mergeProps({width:a.unref(r),height:a.unref(n),viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.unref(t)),[a.createElementVNode("g",yn,[a.createElementVNode("path",{d:"M2.73508 9.73495L7.73508 4.73495C7.80539 4.66473 7.9007 4.62528 8.00008 4.62528C8.09945 4.62528 8.19476 4.66473 8.26508 4.73495L13.2651 9.73495C13.3313 9.80604 13.3674 9.90006 13.3657 9.99722C13.364 10.0944 13.3246 10.1871 13.2559 10.2558C13.1872 10.3245 13.0945 10.3638 12.9973 10.3655C12.9002 10.3673 12.8062 10.3312 12.7351 10.265L8.00008 5.53058L3.26508 10.265C3.19399 10.3312 3.09997 10.3673 3.00282 10.3655C2.90566 10.3638 2.81297 10.3245 2.74427 10.2558C2.67556 10.1871 2.6362 10.0944 2.63449 9.99722C2.63277 9.90006 2.66884 9.80604 2.73508 9.73495Z",fill:a.unref(s)},null,8,kn)])],16,En))}}),bn={class:"mb-0 text-body-3xs font-medium text-orange-500"},Fn=a.defineComponent({__name:"hint",props:{hint:{}},setup(o){return(e,t)=>(a.openBlock(),a.createElementBlock("p",bn,a.toDisplayString(e.hint),1))}}),Dn={key:0,class:"mb-0 text-body-2xs font-normal text-heading-text"},wn={key:0,class:"text-orange-required"},Sn=["aria-expanded","aria-controls","aria-disabled","aria-activedescendant"],Vn={class:"flex items-center gap-2"},Nn={class:"flex items-center gap-2"},Rn={key:0,class:"inline-block h-4 w-4 border-2 border-current border-t-transparent rounded-full animate-spin"},In=["aria-label"],Tn={key:0,class:"px-4 pt-2 pb-1"},Mn=["placeholder"],Pn=["onClick","id","aria-selected"],On={class:"mb-0 text-body-2xs font-medium"},Ge=a.defineComponent({__name:"select",props:{options:{default:()=>[]},modelValue:{default:void 0},defaultValue:{default:void 0},className:{default:""},placeholder:{default:"Select an option"},hasSearch:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},validationError:{default:""},label:{default:""},hint:{default:""},required:{type:Boolean,default:!1},itemImageType:{default:null}},emits:["update:modelValue","change"],setup(o,{emit:e}){const t=o,r=e,n=a.ref(!1),s=a.ref(t.defaultValue??t.modelValue??""),u=a.ref([...t.options]),l=a.ref(-1),f=a.ref(null),i=a.ref(null),c=a.ref(null),g=a.computed(()=>t.modelValue!==void 0);a.watch(()=>t.modelValue,D=>{g.value&&(s.value=D??"")}),a.watch(()=>t.options,D=>{u.value=[...D]},{immediate:!0});const d=a.computed(()=>{const D=g.value?t.modelValue:s.value;return t.options.find(R=>R.value===D)??null}),m=a.computed(()=>{var D;return((D=d.value)==null?void 0:D.label)||t.placeholder||(t.label?`Select ${t.label}`:"Select an option")});function x(){if(t.disabled||n.value)return;u.value=[...t.options];const D=d.value?Math.max(0,t.options.findIndex(R=>R.value===d.value.value)):0;l.value=D,n.value=!0,a.nextTick(()=>{t.hasSearch&&c.value&&(c.value.focus(),c.value.select())})}function C(){n.value&&(n.value=!1,l.value=-1)}function v(){t.disabled||(n.value?C():x())}function E(D){if(!n.value)return;const R=D.target,I=f.value,N=i.value;I&&!I.contains(R)&&N&&!N.contains(R)&&C()}a.watch(n,D=>{D?document.addEventListener("mousedown",E):document.removeEventListener("mousedown",E)}),a.onBeforeUnmount(()=>document.removeEventListener("mousedown",E));function p(D){g.value||(s.value=D),r("update:modelValue",D),r("change",D),C()}function h(D){const R=D.target.value.toLowerCase(),I=t.options.filter(N=>N.label.toLowerCase().includes(R));u.value=I,l.value=I.length?0:-1}function _(D){if(!t.disabled)switch(D.key){case"Enter":case" ":case"Spacebar":case"ArrowDown":D.preventDefault(),n.value?A(1):x();break;case"ArrowUp":D.preventDefault(),n.value?A(-1):x();break;case"Escape":n.value&&(D.preventDefault(),C());break}}function b(D){switch(D.key){case"ArrowDown":D.preventDefault(),A(1);break;case"ArrowUp":D.preventDefault(),A(-1);break;case"Home":D.preventDefault(),l.value=u.value.length?0:-1,w(0);break;case"End":D.preventDefault(),l.value=u.value.length-1,w(u.value.length-1);break;case"Enter":if(D.preventDefault(),l.value>=0){const R=u.value[l.value];R&&p(R.value)}break;case"Escape":D.preventDefault(),C();break;case"Tab":C();break}}function A(D){if(!u.value.length)return;const R=u.value.length-1,I=l.value<0?0:Math.min(R,Math.max(0,l.value+D));l.value=I,w(I)}function w(D){var N;const R=i.value;if(!R)return;const I=R.querySelectorAll("[data-option]");D>=0&&D<I.length&&((N=I[D])==null||N.scrollIntoView({block:"nearest"}))}const V=a.computed(()=>t.disabled?"bg-grey-100 cursor-not-allowed":"bg-white"),T=a.computed(()=>t.validationError?"border-red-300":"border-grey-100 bg-white"),{options:k,placeholder:S,hasSearch:F,disabled:B,loading:y,validationError:M,label:$,hint:L,required:H,itemImageType:P,className:O}=a.toRefs(t);return(D,R)=>{var I;return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["flex flex-col gap-2 relative",a.unref(O)])},[a.unref($)?(a.openBlock(),a.createElementBlock("p",Dn,[a.createTextVNode(a.toDisplayString(a.unref($))+" ",1),a.unref(H)?(a.openBlock(),a.createElementBlock("span",wn," *")):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0),a.createElementVNode("div",{ref_key:"triggerRef",ref:f,class:a.normalizeClass(["border-c rounded-md flex items-center justify-between h-12 cursor-pointer px-3 py-2",V.value,T.value]),role:"combobox","aria-haspopup":"listbox","aria-expanded":n.value,"aria-controls":n.value?"select-menu":void 0,"aria-disabled":a.unref(B)||void 0,"aria-activedescendant":n.value&&l.value>=0?`option-${l.value}`:void 0,tabindex:"0",onClick:v,onKeydown:_},[a.createElementVNode("div",Vn,[a.renderSlot(D.$slots,"prefix"),a.createElementVNode("div",Nn,[d.value&&a.unref(P)==="country"&&d.value.countryCode?(a.openBlock(),a.createBlock(Ae,{key:0,src:`https://flagcdn.com/w40/${d.value.countryCode.toLowerCase()}.png`,alt:d.value.countryCode,width:28,customClass:"rounded-lg"},null,8,["src","alt"])):a.createCommentVNode("",!0),a.createElementVNode("p",{class:a.normalizeClass(["text-body-2xs font-normal mb-0",(I=d.value)!=null&&I.label?"text-sub-copy":"text-grey-500"])},a.toDisplayString(m.value),3)])]),a.unref(y)?(a.openBlock(),a.createElementBlock("span",Rn)):n.value?(a.openBlock(),a.createBlock(An,{key:1,color:"#8FAECA"})):(a.openBlock(),a.createBlock(_n,{key:2,color:"#8FAECA"}))],42,Sn),n.value?(a.openBlock(),a.createElementBlock("div",{key:1,ref_key:"menuRef",ref:i,id:"select-menu",class:"border-c bg-white rounded-md border-grey-border text-body-xs font-normal text-input-grey w-full mt-2 max-h-22rem overflow-y-auto",role:"listbox","aria-label":a.unref($)||"Options",style:{position:"absolute",top:"100%",zIndex:10},onKeydown:b},[a.unref(F)?(a.openBlock(),a.createElementBlock("div",Tn,[a.createElementVNode("input",{ref_key:"searchRef",ref:c,type:"text",placeholder:`Search ${a.unref($)||"options"}`,class:"bg-transparent outline-none border-b pb-2 w-full focus:outline-none focus:ring-0 text-body-2xs text-light-copy font-normal",onInput:h},null,40,Mn)])):a.createCommentVNode("",!0),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(u.value,(N,X)=>{var Z;return a.openBlock(),a.createElementBlock("div",{key:N.value,onClick:Q=>p(N.value),id:`option-${X}`,"data-option":"",role:"option","aria-selected":((Z=d.value)==null?void 0:Z.value)===N.value,class:a.normalizeClass(["px-4 py-3 first:pt-0 hover:bg-gray-100 flex items-center gap-2 cursor-pointer",X===l.value?"bg-gray-100":""])},[a.unref(P)==="country"&&N.countryCode?(a.openBlock(),a.createBlock(Ae,{key:0,src:`https://flagcdn.com/w40/${N.countryCode.toLowerCase()}.png`,alt:N.countryCode,width:28,customClass:"rounded-lg"},null,8,["src","alt"])):a.createCommentVNode("",!0),a.createElementVNode("p",On,a.toDisplayString(N.label),1)],10,Pn)}),128))],40,In)):a.createCommentVNode("",!0),a.unref(L)?(a.openBlock(),a.createBlock(Fn,{key:2,hint:a.unref(L)},null,8,["hint"])):a.createCommentVNode("",!0),a.unref(M)?(a.openBlock(),a.createBlock(U0,{key:3,errorMessage:a.unref(M)},null,8,["errorMessage"])):a.createCommentVNode("",!0)],2)}}}),Hn={class:"flex flex-col gap-6"},$n={key:0,class:"grid grid-cols-2 gap-6 overflow-y-auto"},Ln={class:"col-span-2"},zn={class:"col-span-2"},Un={key:1,class:"grid grid-cols-2 gap-6 overflow-y-auto",style:{maxHeight:"320px"}},qn={class:"col-span-2"},jn={class:"col-span-2"},Kn=a.defineComponent({__name:"pay-by-card",props:{secretKey:{},paymentObject:{},environment:{},onPaymentAuthorized:{type:Function}},setup(o){const e=o,t=e.environment??"sandbox",r=a.ref(0),n=a.ref(""),s=a.ref(!1),u=a.ref(!1),l=a.ref(""),f=a.ref(""),i=a.ref(!1),c=a.ref(!1),g=a.ref([]),d=a.ref([]),m=a.ref([]),x=a.reactive({address1:"",address2:"",postalCode:"",state:"",city:"",country:"",emailAddress:"",phoneNumber:""}),C=a.reactive({customerName:"",cardNo:"",expireDate:"",cvv:"",cardPin:""}),v=a.reactive({}),E=a.reactive({}),p=a.reactive({address1:"required",address2:"",country:"required",state:"required",city:"required",postalCode:"required|no_special|char_length:6",emailAddress:"required|email",phoneNumber:"required"}),h=a.reactive({customerName:"required",cardNo:"required|num_spaces",expireDate:"required",cvv:"required|numeric",cardPin:""}),_={address1:"Address Line 1",address2:"Address Line 2",postalCode:"Postal Code",state:"State",city:"City",country:"Country",emailAddress:"Email",phoneNumber:"Phone Number"},b={customerName:"Card Name",cardNo:"Card Number",expireDate:"Expiry Date",cvv:"CVV",cardPin:"Card PIN"},A=a.computed(()=>Se(e.paymentObject.amount,e.paymentObject.currency));async function w(){var F,B,y,M,$,L,H,P,O,D,R,I,N,X,Z,Q,j,Be,ve,Ie,_e,ae,ee,De,Ee;if(r.value===0){const he=je(x,p,_);Object.assign(v,he),Object.keys(he).length===0&&(r.value=1);return}if(r.value===1){const he=je(C,h,b);if(Object.assign(E,he),Object.keys(he).length>0)return;try{s.value=!0,n.value="";const Y={pan:C.cardNo??"",expiryDate:C.expireDate??"",cvv:C.cvv??"",cardScheme:l.value,nameOnCard:C.customerName??"",...l.value==="Verve"?{pin:C.cardPin??""}:{}},oe={address1:x.address1??"",address2:x.address2??"",postalCode:x.postalCode??"",state:x.state??"",city:x.city??"",country:x.country??"",emailAddress:x.emailAddress??"",phoneNumber:x.phoneNumber??""},de=Za(e.secretKey,Y),ne={...{customerId:((F=e.paymentObject)==null?void 0:F.email)||C.customerName||"",amount:String(((B=e.paymentObject)==null?void 0:B.amount)??""),currency:((y=e.paymentObject)==null?void 0:y.currency)||"USD",narration:((M=e.paymentObject)==null?void 0:M.narration)||"Test transaction",encryptedCardDetails:de.requestParam,billingDetails:oe,redirectUrl:(($=e.paymentObject)==null?void 0:$.redirectUrl)||"",paymentReference:f.value,isCheckout:!0},merchantId:e.secretKey};let U=await jr(t,ne);if(U!=null&&U.responseParam&&(U=P0(t,U.responseParam)),U!=null&&U.isSuccessful){if(U.threeDsInteractionRequired===!0){const ye={transactionReference:U.transactionReference,threeDsHtml:U.threeDsHtml,amount:U.amount,responseMessage:U.responseMessage,paReq:(L=U.threeDsHtml)==null?void 0:L.paReq,termUrl:(H=U.threeDsHtml)==null?void 0:H.termUrl,action:(P=U.threeDsHtml)==null?void 0:P.action,acsUrl:(O=U.threeDsHtml)==null?void 0:O.acsUrl,md:(D=U.threeDsHtml)==null?void 0:D.md},Te=btoa(JSON.stringify(ye)),fe=`https://sandbox-merchant.buzapay.com/account/three-ds-confirm?threeDsData=${encodeURIComponent(Te)}&paymentReference=${U.transactionReference}`;window.open(fe,"_self","noopener,noreferrer"),n.value="3D Secure authentication opened in new tab. Please complete the verification",s.value=!1;return}if(U.responseMessage==="Payer Interaction Required"&&U.threeDsHtml){const ye={transactionReference:U.transactionReference,threeDsHtml:U.threeDsHtml,amount:U.amount,responseMessage:U.responseMessage,paReq:(R=U.threeDsHtml)==null?void 0:R.paReq,termUrl:(I=U.threeDsHtml)==null?void 0:I.termUrl,action:(N=U.threeDsHtml)==null?void 0:N.action,acsUrl:(X=U.threeDsHtml)==null?void 0:X.acsUrl,md:(Z=U.threeDsHtml)==null?void 0:Z.md},Te=btoa(JSON.stringify(ye)),fe=`https://sandbox-merchant.buzapay.com/account/three-ds-confirm?threeDsData=${encodeURIComponent(Te)}&paymentReference=${U.transactionReference}`;window.open(fe,"_self","noopener,noreferrer"),n.value="3D Secure authentication opened in new tab. Please complete the verification",s.value=!1;return}(Q=U.transactionReference)!=null&&Q.trim()&&((Be=e.onPaymentAuthorized)==null||Be.call(e,{paymentId:U.transactionReference,paymentDate:(j=U==null?void 0:U.data)==null?void 0:j.updatedAt,paymentStatus:"Authorized"})),n.value="Card payment authorized successfully",s.value=!1;return}n.value=(U==null?void 0:U.responseMessage)||"Payment failed",(Ie=e.onPaymentAuthorized)==null||Ie.call(e,{paymentId:U==null?void 0:U.transactionReference,paymentDate:(ve=U==null?void 0:U.data)==null?void 0:ve.updatedAt,paymentStatus:"Payment failed"}),s.value=!1}catch(Y){let oe="Payment failed";if((_e=Y==null?void 0:Y.error)!=null&&_e.responseParam)try{const de=P0(t,Y.error.responseParam);oe=(de==null?void 0:de.responseMessage)||oe}catch{oe=((ae=Y==null?void 0:Y.error)==null?void 0:ae.responseMessage)||((ee=Y==null?void 0:Y.error)==null?void 0:ee.message)||oe}else oe=((De=Y==null?void 0:Y.error)==null?void 0:De.responseMessage)||((Ee=Y==null?void 0:Y.error)==null?void 0:Ee.message)||"Payment failed";n.value=oe,s.value=!1}}}async function V(){if(!e.secretKey){n.value="Secret key is required.";return}if(!ze(e.paymentObject)){n.value="Kindly ensure you are passing all the required data.";return}u.value=!0,n.value="";try{const F=await Ue(e.paymentObject,t,e.secretKey);if(F!=null&&F.isSuccessful&&F.launchUrl){const B=Ht(F.launchUrl);f.value=B.paymentReference,n.value="Payment link created successfully"}else n.value="Failed to create payment link"}catch(F){n.value=(F==null?void 0:F.message)||"Failed to create payment link"}finally{u.value=!1}}async function T(){i.value=!0;try{const F=await Xa(t,e.secretKey);F!=null&&F.isSuccessful&&(g.value=F.data,d.value=(F.data??[]).map(B=>({label:B.countryName,value:B.iso2})))}catch(F){n.value=(F==null?void 0:F.message)||"Failed to get countries"}finally{i.value=!1}}async function k(F){const B=g.value.find(y=>y.iso2===F);if(B){c.value=!0;try{const y=await Ya(B.iso3,t,e.secretKey);y!=null&&y.isSuccessful&&(m.value=(y.data??[]).map(M=>({label:M.name,value:M.name})))}catch(y){n.value=(y==null?void 0:y.message)||"Failed to get country states"}finally{c.value=!1}}}function S(F){l.value=Mr(F),h.cardPin=l.value==="Verve"?"required|numeric":""}return a.onMounted(async()=>{await V(),await T()}),(F,B)=>(a.openBlock(),a.createElementBlock("div",Hn,[r.value===0?(a.openBlock(),a.createElementBlock("div",$n,[a.createElementVNode("div",Ln,[a.createVNode(ue,{label:"Address Line 1",required:"",modelValue:x.address1,"onUpdate:modelValue":[B[0]||(B[0]=y=>x.address1=y),B[1]||(B[1]=y=>{x.address1=y,v.address1&&(v.address1="")})],"validation-error":v.address1??""},null,8,["modelValue","validation-error"])]),a.createElementVNode("div",zn,[a.createVNode(ue,{label:"Address Line 2",modelValue:x.address2,"onUpdate:modelValue":[B[2]||(B[2]=y=>x.address2=y),B[3]||(B[3]=y=>x.address2=y)],"validation-error":v.address2??""},null,8,["modelValue","validation-error"])]),a.createVNode(Ge,{label:"Select Country",required:"",options:d.value,loading:i.value,modelValue:x.country,"onUpdate:modelValue":[B[4]||(B[4]=y=>x.country=y),B[5]||(B[5]=async y=>{x.country=y,x.state="",await k(y),v.country&&(v.country="")})],"validation-error":v.country??""},null,8,["options","loading","modelValue","validation-error"]),a.createVNode(Ge,{label:"Select State",required:"",options:m.value,loading:c.value,modelValue:x.state,"onUpdate:modelValue":[B[6]||(B[6]=y=>x.state=y),B[7]||(B[7]=y=>{x.state=y,v.state&&(v.state="")})],"validation-error":v.state??""},null,8,["options","loading","modelValue","validation-error"]),a.createVNode(ue,{label:"City",required:"",modelValue:x.city,"onUpdate:modelValue":[B[8]||(B[8]=y=>x.city=y),B[9]||(B[9]=y=>{x.city=y,v.city&&(v.city="")})],"validation-error":v.city??""},null,8,["modelValue","validation-error"]),a.createVNode(ue,{label:"Postal Code",required:"",modelValue:x.postalCode,"onUpdate:modelValue":[B[10]||(B[10]=y=>x.postalCode=y),B[11]||(B[11]=y=>{x.postalCode=y,v.postalCode&&(v.postalCode="")})],"validation-error":v.postalCode??""},null,8,["modelValue","validation-error"]),a.createVNode(ue,{label:"Email",required:"",modelValue:x.emailAddress,"onUpdate:modelValue":[B[12]||(B[12]=y=>x.emailAddress=y),B[13]||(B[13]=y=>{x.emailAddress=y,v.emailAddress&&(v.emailAddress="")})],"validation-error":v.emailAddress??""},null,8,["modelValue","validation-error"]),a.createVNode(ue,{label:"Phone Number",required:"",modelValue:x.phoneNumber,"onUpdate:modelValue":[B[14]||(B[14]=y=>x.phoneNumber=y),B[15]||(B[15]=y=>{x.phoneNumber=y,v.phoneNumber&&(v.phoneNumber="")})],"validation-error":v.phoneNumber??""},null,8,["modelValue","validation-error"])])):a.createCommentVNode("",!0),r.value===1?(a.openBlock(),a.createElementBlock("div",Un,[a.createElementVNode("div",qn,[a.createVNode(ue,{label:"Card Name",required:"",modelValue:C.customerName,"onUpdate:modelValue":[B[16]||(B[16]=y=>C.customerName=y),B[17]||(B[17]=y=>{C.customerName=y,E.customerName&&(E.customerName="")})],"validation-error":E.customerName??""},null,8,["modelValue","validation-error"])]),a.createElementVNode("div",jn,[a.createVNode(ue,{label:"Card Number",required:"",rules:["numeric"],mask:"0000 0000 0000 0000",placeholder:"0000 0000 0000 0000","prevent-paste":!0,modelValue:C.cardNo,"onUpdate:modelValue":[B[18]||(B[18]=y=>C.cardNo=y),B[19]||(B[19]=y=>{C.cardNo=y,E.cardNo&&(E.cardNo=""),S(y)})],"validation-error":E.cardNo??""},null,8,["modelValue","validation-error"])]),a.createVNode(ue,{label:"Expiry Date",required:"",modelValue:C.expireDate,"onUpdate:modelValue":[B[20]||(B[20]=y=>C.expireDate=y),B[21]||(B[21]=y=>{C.expireDate=y,E.expireDate&&(E.expireDate="")})],mask:"00/00",placeholder:"00/00","validation-error":E.expireDate??""},null,8,["modelValue","validation-error"]),a.createVNode(ue,{label:"CVV",required:"",rules:["numeric"],modelValue:C.cvv,"onUpdate:modelValue":[B[22]||(B[22]=y=>C.cvv=y),B[23]||(B[23]=y=>{C.cvv=y,E.cvv&&(E.cvv="")})],mask:"000",placeholder:"000","validation-error":E.cvv??""},null,8,["modelValue","validation-error"]),l.value==="Verve"?(a.openBlock(),a.createBlock(ue,{key:0,label:"Card Pin",required:"",rules:["numeric"],modelValue:C.cardPin,"onUpdate:modelValue":[B[24]||(B[24]=y=>C.cardPin=y),B[25]||(B[25]=y=>{C.cardPin=y,E.cardPin&&(E.cardPin="")})],mask:"0000",placeholder:"0000","validation-error":E.cardPin??""},null,8,["modelValue","validation-error"])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0),a.createVNode(Ve,{label:r.value===0?"Proceed":`Pay ${A.value}`,type:"primary",customClass:"w-full",loading:s.value,onClick:w,disabled:s.value},null,8,["label","loading","disabled"])]))}}),Wn=["width","height"],Gn=["fill"],Zn=["fill"],Xn=["fill"],Yn=a.defineComponent({__name:"icon-copy-success",props:{width:{default:16},height:{default:17},color:{default:"currentColor"}},setup(o){const e=o,t=a.useAttrs(),{width:r,height:n,color:s}=e;return(u,l)=>(a.openBlock(),a.createElementBlock("svg",a.mergeProps({width:a.unref(r),height:a.unref(n),viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.unref(t)),[a.createElementVNode("path",{d:"M11.4002 1.6875H8.60016C5.9935 1.6875 4.8335 2.8475 4.8335 5.45417V6.1875C4.8335 6.46083 5.06016 6.6875 5.3335 6.6875H7.40016C9.46683 6.6875 10.1668 7.3875 10.1668 9.45417V11.5208C10.1668 11.7942 10.3935 12.0208 10.6668 12.0208H11.4002C14.0068 12.0208 15.1668 10.8608 15.1668 8.25417V5.45417C15.1668 2.8475 14.0068 1.6875 11.4002 1.6875ZM5.8335 5.6875V5.45417C5.8335 3.3875 6.5335 2.6875 8.60016 2.6875H11.4002C13.4668 2.6875 14.1668 3.3875 14.1668 5.45417V8.25417C14.1668 10.3208 13.4668 11.0208 11.4002 11.0208H11.1668V9.45417C11.1668 6.8475 10.0068 5.6875 7.40016 5.6875H5.8335Z",fill:a.unref(s)},null,8,Gn),a.createElementVNode("path",{d:"M7.40016 5.6875H4.60016C1.9935 5.6875 0.833496 6.8475 0.833496 9.45417V12.2542C0.833496 14.8608 1.9935 16.0208 4.60016 16.0208H7.40016C10.0068 16.0208 11.1668 14.8608 11.1668 12.2542V9.45417C11.1668 6.8475 10.0068 5.6875 7.40016 5.6875ZM4.60016 15.0208C2.5335 15.0208 1.8335 14.3208 1.8335 12.2542V9.45417C1.8335 7.3875 2.5335 6.6875 4.60016 6.6875H7.40016C9.46683 6.6875 10.1668 7.3875 10.1668 9.45417V12.2542C10.1668 14.3208 9.46683 15.0208 7.40016 15.0208H4.60016Z",fill:a.unref(s)},null,8,Zn),a.createElementVNode("path",{d:"M5.35302 12.6542C5.22635 12.6542 5.09969 12.6075 4.99969 12.5075L3.69969 11.2075C3.50635 11.0142 3.50635 10.6942 3.69969 10.5008C3.89302 10.3075 4.21302 10.3075 4.40635 10.5008L5.35302 11.4475L7.59302 9.2075C7.78635 9.01417 8.10635 9.01417 8.29969 9.2075C8.49302 9.40083 8.49302 9.72083 8.29969 9.91417L5.69969 12.5075C5.60635 12.6008 5.47969 12.6542 5.35302 12.6542Z",fill:a.unref(s)},null,8,Xn)],16,Wn))}}),Le=a.defineComponent({__name:"copy",props:{copyText:{},color:{}},setup(o){const e=o;function t(n){return navigator.clipboard.writeText(n)}function r(){t(e.copyText).then(()=>{}).catch(n=>{console.error("Copy failed:",n)})}return(n,s)=>(a.openBlock(),a.createBlock(Yn,{class:"cursor-pointer",color:n.color,onClick:r},null,8,["color"]))}}),Qn={class:"flex items-center gap-1"},Jn={key:1,class:"flex items-center justify-between"},es={class:"flex items-center gap-1"},He=a.defineComponent({__name:"label-info",props:{type:{default:"vertical"},label:{default:""},labelCustomClass:{default:"text-body-4xs font-medium text-light-copy"},valueImageSrc:{default:""},valueImageCustomClass:{default:""},valueImagePosition:{default:"prefix"},hasValueCopy:{type:Boolean,default:!1},value:{default:""},valueCustomClass:{default:"text-body-2xs font-medium text-sub-copy"},alignRight:{type:Boolean,default:!1}},setup(o){const e=o,t=a.computed(()=>(e.label??"").toUpperCase()),r=a.computed(()=>!!e.valueImageSrc&&e.valueImagePosition==="prefix"),n=a.computed(()=>!!e.valueImageSrc&&e.valueImagePosition==="suffix"),s=a.computed(()=>mr(e.value,40)),{type:u,labelCustomClass:l,valueImageSrc:f,valueImageCustomClass:i,hasValueCopy:c,value:g,valueCustomClass:d,alignRight:m}=e;return(x,C)=>a.unref(u)==="vertical"?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["flex flex-col gap-1",a.unref(m)?"text-right items-end":""])},[a.createElementVNode("p",{class:a.normalizeClass(a.unref(l))},a.toDisplayString(t.value),3),a.createElementVNode("div",Qn,[r.value?(a.openBlock(),a.createBlock(Ae,{key:0,src:a.unref(f),alt:a.unref(g),width:22,customClass:a.unref(i)},null,8,["src","alt","customClass"])):a.createCommentVNode("",!0),a.unref(c)?(a.openBlock(),a.createElementBlock("p",{key:2,class:a.normalizeClass([a.unref(d),"truncate"])},a.toDisplayString(s.value),3)):(a.openBlock(),a.createElementBlock("p",{key:1,class:a.normalizeClass(a.unref(d))},a.toDisplayString(a.unref(g)),3)),a.unref(c)?(a.openBlock(),a.createBlock(Le,{key:3,copyText:a.unref(g),color:"#9DBFDE"},null,8,["copyText"])):a.createCommentVNode("",!0),n.value?(a.openBlock(),a.createBlock(Ae,{key:4,src:a.unref(f),alt:a.unref(g),width:22,customClass:a.unref(i)},null,8,["src","alt","customClass"])):a.createCommentVNode("",!0)])],2)):(a.openBlock(),a.createElementBlock("div",Jn,[a.createElementVNode("p",{class:a.normalizeClass(a.unref(l))},a.toDisplayString(t.value),3),a.createElementVNode("div",es,[r.value?(a.openBlock(),a.createBlock(Ae,{key:0,src:a.unref(f),alt:a.unref(g),width:22,customClass:a.unref(i)},null,8,["src","alt","customClass"])):a.createCommentVNode("",!0),a.createElementVNode("p",{class:a.normalizeClass(a.unref(d))},a.toDisplayString(a.unref(g)),3),a.unref(c)?(a.openBlock(),a.createBlock(Le,{key:1,copyText:a.unref(g),color:"#9DBFDE"},null,8,["copyText"])):a.createCommentVNode("",!0),n.value?(a.openBlock(),a.createBlock(Ae,{key:2,src:a.unref(f),alt:a.unref(g),width:22,customClass:a.unref(i)},null,8,["src","alt","customClass"])):a.createCommentVNode("",!0)])]))}}),ts={class:"flex flex-col gap-10"},rs={key:0,class:"flex flex-col gap-10"},as={key:1,class:"flex flex-col gap-10"},ns={class:"bg-[#EFF7FF] p-4 rounded-lg flex flex-col gap-6"},ss={class:"flex items-center justify-between"},is={class:"flex items-center justify-between"},os={class:"w-2/3 mx-auto text-center text-body-2xs font-medium text-sub-copy"},ls={class:"text-orange-500"},us={class:"flex flex-col gap-4"},cs=a.defineComponent({__name:"pay-by-transfer",props:{secretKey:{},paymentObject:{},environment:{},onPaymentAuthorized:{type:Function},onCancel:{type:Function}},setup(o){const e=o,t=e.environment??"sandbox",r=a.ref(0),n=a.ref(!1),s=a.ref(!1),u=a.ref(!1),l=a.ref(""),f=a.ref(""),i=a.ref(!1),c=a.ref(null),g=a.ref(null),d=a.ref(!1),m=a.ref(!1),x=a.ref(""),C=a.ref(60),v=a.ref("00:00"),E=a.ref(null),p=a.reactive({customerName:""}),h=a.reactive({}),_={customerName:"required"},b={customerName:"Customer Name"},A=a.computed(()=>Se(e.paymentObject.amount,e.paymentObject.currency));async function w(){var F,B,y;if(r.value===0){const M=je(p,_,b);if(Object.assign(h,M),Object.keys(M).length===0){const $={paymentReference:l.value,channel:"virtual_account",customerName:p.customerName??"",merchantId:e.secretKey};n.value=!0;try{const L=await Kr(t,$);if(L!=null&&L.isSuccessful){const H=((F=L.data)==null?void 0:F.data)??L.data??null;g.value=H,S(),x.value="Virtual account generated successfully for payment.",n.value=!0,r.value=1}else n.value=!1,x.value=(L==null?void 0:L.responseMessage)||"Failed to generate account"}catch(L){n.value=!1,x.value=((B=L==null?void 0:L.error)==null?void 0:B.responseMessage)||((y=L==null?void 0:L.error)==null?void 0:y.message)||"Error"}}return}}async function V(){var F,B,y,M,$,L,H;i.value=!0;try{const P=await q0(t,l.value);if(P!=null&&P.isSuccessful){const O=((F=P.data)==null?void 0:F.data)??P.data??null;c.value=O;const D=(O==null?void 0:O.paymentStatus)==="Payment Received"||(O==null?void 0:O.paymentStatus)==="Received";d.value=D,(O==null?void 0:O.finalTransactionStatus)==null||(O==null?void 0:O.paymentStatus)==null?(s.value&&(x.value="Transaction not confirmed !!"),!u.value&&!D?(f.value="pending",(B=e.onPaymentAuthorized)==null||B.call(e,{paymentId:l.value,paymentDate:O==null?void 0:O.updatedAt,paymentStatus:"pending"})):(f.value="confirmed",(y=e.onPaymentAuthorized)==null||y.call(e,{paymentId:l.value,paymentDate:O==null?void 0:O.updatedAt,paymentStatus:"confirmed"}))):((O==null?void 0:O.finalTransactionStatus)==="Success"||(O==null?void 0:O.paymentStatus)==="Received"||(O==null?void 0:O.paymentStatus)==="Payment Received")&&(f.value="confirmed",u.value=!0,x.value="Transaction confirmed !!",(M=e.onPaymentAuthorized)==null||M.call(e,{paymentId:l.value,paymentDate:O==null?void 0:O.updatedAt,paymentStatus:"confirmed"}))}else!(P!=null&&P.isSuccessful)&&(P==null?void 0:P.responseCode)==="119"&&(f.value="used",x.value=(P==null?void 0:P.responseMessage)||"",($=e.onPaymentAuthorized)==null||$.call(e,{paymentId:l.value,paymentDate:null,paymentStatus:"used"}))}catch(P){f.value="",x.value=((L=P==null?void 0:P.error)==null?void 0:L.responseMessage)||((H=P==null?void 0:P.error)==null?void 0:H.message)||"Something went wrong"}finally{i.value=!1}}async function T(){if(!e.secretKey){x.value="Secret key is required.";return}if(!ze(e.paymentObject)){x.value="Kindly ensure you are passing all the required data.";return}m.value=!0,x.value="";try{const F=await Ue(e.paymentObject,t,e.secretKey);if(F!=null&&F.isSuccessful&&F.launchUrl){const B=Ht(F.launchUrl);l.value=B.paymentReference,x.value="Payment link created successfully"}else x.value="Failed to create payment link"}catch(F){x.value=(F==null?void 0:F.message)||"Failed to create payment link"}finally{m.value=!1}}function k(F){const B=String(Math.floor(F/60)).padStart(2,"0"),y=String(F%60).padStart(2,"0");v.value=`${B}:${y}`}function S(){E.value&&(clearInterval(E.value),E.value=null),k(C.value),E.value=window.setInterval(()=>{const F=C.value-1;if(F<0){E.value&&(clearInterval(E.value),E.value=null),v.value="00:00",C.value=0;return}C.value=F,k(F)},1e3)}return a.onMounted(async()=>{await T()}),(F,B)=>{var y,M,$,L;return a.openBlock(),a.createElementBlock("div",ts,[r.value===0?(a.openBlock(),a.createElementBlock("div",rs,[a.createVNode(ue,{label:"Customer Name",required:"",modelValue:p.customerName,"onUpdate:modelValue":[B[0]||(B[0]=H=>p.customerName=H),B[1]||(B[1]=H=>{p.customerName=H,p.customerName&&(h.customerName="")})],validationError:h.customerName??""},null,8,["modelValue","validationError"]),a.createVNode(Ve,{label:`Pay ${A.value}`,type:"primary",customClass:"w-full",loading:n.value,onClick:w},null,8,["label","loading"])])):r.value===1?(a.openBlock(),a.createElementBlock("div",as,[a.createElementVNode("div",ns,[a.createVNode(He,{label:"Bank Name",value:`${((y=g.value)==null?void 0:y.bank)??""} ${((M=g.value)==null?void 0:M.accountName)??""}`},null,8,["value"]),a.createElementVNode("div",ss,[a.createVNode(He,{label:"Account Number",value:($=g.value)==null?void 0:$.accountNumber},null,8,["value"]),a.createVNode(Le,{color:"#9DBFDE",copyText:((L=g.value)==null?void 0:L.accountNumber)??""},null,8,["copyText"])]),a.createElementVNode("div",is,[a.createVNode(He,{label:"Amount",value:A.value},null,8,["value"]),a.createVNode(Le,{color:"#9DBFDE",copyText:A.value},null,8,["copyText"])])]),a.createElementVNode("p",os,[B[3]||(B[3]=a.createTextVNode(" This account is for this transaction only and expires in ",-1)),a.createElementVNode("span",ls,a.toDisplayString(C.value>=0?v.value:"00:00"),1)]),a.createElementVNode("div",us,[a.createVNode(Ve,{label:"I have paid the money",type:"primary",customClass:"w-full",loading:i.value,onClick:V},null,8,["loading"]),a.createElementVNode("button",{type:"button",onClick:B[2]||(B[2]=H=>{var P;return(P=F.onCancel)==null?void 0:P.call(F)}),class:"text-heading-text text-body-2xs font-medium text-center py-2 cursor-pointer"}," Cancel Payment ")])])):a.createCommentVNode("",!0)])}}}),ds=["width","height"],xs={"clip-path":"url(#clip0_10908_387048)"},hs=["fill"],fs={id:"clip0_10908_387048"},ps=["fill"],vs=a.defineComponent({__name:"icon-usdc",props:{width:{default:28},height:{default:28},color:{default:"currentColor"}},setup(o){const e=o,t=a.useAttrs(),{width:r,height:n,color:s}=e;return(u,l)=>(a.openBlock(),a.createElementBlock("svg",a.mergeProps({width:a.unref(r),height:a.unref(n),viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.unref(t)),[a.createElementVNode("g",xs,[a.createElementVNode("path",{d:"M14 0C21.7324 0 28 6.26763 28 14C28 21.7324 21.7324 28 14 28C6.26763 28 0 21.7324 0 14C0 6.26763 6.26763 0 14 0ZM16.933 4.865C16.7195 4.76 16.506 4.865 16.4535 5.07762C16.4001 5.131 16.4001 5.18438 16.4001 5.29025V6.034L16.4089 6.125C16.4546 6.30501 16.5652 6.46177 16.7195 6.56512C20.8792 8.05262 23.0125 12.6726 21.4655 16.7615C20.6657 18.9928 18.9061 20.6911 16.7195 21.4883C16.506 21.5941 16.4001 21.7534 16.4001 22.0194V22.7631L16.4045 22.8401C16.4128 22.9241 16.4479 23.0033 16.5047 23.0658C16.5614 23.1284 16.6367 23.171 16.7195 23.1875C16.7729 23.1875 16.8796 23.1875 16.933 23.135C18.1331 22.7602 19.2473 22.1517 20.2113 21.3446C21.1753 20.5375 21.9701 19.5476 22.5499 18.432C23.1298 17.3164 23.4833 16.0972 23.59 14.8444C23.6967 13.5917 23.5546 12.3302 23.1718 11.1326C22.2128 8.10512 19.866 5.8205 16.933 4.865ZM11.2805 4.8125C11.2271 4.8125 11.1204 4.8125 11.067 4.865C9.86688 5.23978 8.75274 5.84826 7.78874 6.6554C6.82475 7.46254 6.02993 8.4524 5.45006 9.56797C4.87019 10.6836 4.51673 11.9028 4.41001 13.1556C4.30329 14.4083 4.44543 15.6698 4.82825 16.8674C5.78725 19.8424 8.08062 22.1261 11.067 23.0816C11.2805 23.1875 11.494 23.0816 11.5465 22.869C11.5999 22.8165 11.5999 22.7622 11.5999 22.6564V21.9126L11.5911 21.8426C11.5544 21.6947 11.417 21.5259 11.2805 21.4349C7.12075 19.9474 4.9875 15.3274 6.5345 11.2385C7.33425 9.00725 9.09388 7.30887 11.2805 6.51175C11.494 6.40587 11.5999 6.24663 11.5999 5.98063V5.23688L11.5955 5.15987C11.5872 5.07585 11.5521 4.99673 11.4954 4.93418C11.4386 4.87163 11.3633 4.82898 11.2805 4.8125ZM14.3736 7.574H13.573L13.496 7.581C13.321 7.616 13.1933 7.7665 13.146 7.99925V9.22075L12.9649 9.24875C11.4704 9.51475 10.5341 10.5464 10.5341 11.823C10.5341 13.5748 11.5999 14.2651 13.8399 14.5311C15.3335 14.7963 15.813 15.1156 15.813 15.9653C15.813 16.814 15.0666 17.3985 14.0534 17.3985C12.6665 17.3985 12.187 16.8149 12.0269 16.0177C11.9744 15.806 11.8134 15.6992 11.6532 15.6992H10.7467L10.6776 15.7054C10.5913 15.7193 10.513 15.7641 10.4572 15.8313C10.4014 15.8985 10.3718 15.9838 10.374 16.0711V16.1236L10.4029 16.2811C10.6566 17.5271 11.5106 18.4187 13.2003 18.6734V19.9483L13.2072 20.0252C13.2422 20.1985 13.3936 20.3263 13.6273 20.3726H14.427L14.504 20.3656C14.679 20.3306 14.8067 20.1801 14.854 19.9483V18.6725L15.0351 18.6375C16.534 18.3207 17.5201 17.2366 17.5201 15.8576C17.5201 13.9991 16.4001 13.3621 14.1601 13.0961C12.5598 12.8835 12.2404 12.4591 12.2404 11.7154C12.2404 10.9716 12.7741 10.4939 13.8399 10.4939C14.7998 10.4939 15.3335 10.8124 15.5995 11.6095C15.6272 11.6866 15.6779 11.7533 15.7447 11.8007C15.8115 11.8481 15.8912 11.8739 15.9731 11.8746H16.8262L16.8954 11.8694C16.982 11.8556 17.0606 11.8108 17.1166 11.7434C17.1726 11.6759 17.2022 11.5904 17.1999 11.5027V11.4503L17.1675 11.2989C17.0361 10.755 16.7366 10.2664 16.3115 9.90255C15.8864 9.53872 15.3574 9.31821 14.7997 9.27238V7.99925L14.7928 7.92225C14.7578 7.74812 14.6073 7.62038 14.3736 7.574Z",fill:a.unref(s)},null,8,hs)]),a.createElementVNode("defs",null,[a.createElementVNode("clipPath",fs,[a.createElementVNode("rect",{width:"28",height:"28",fill:a.unref(s)},null,8,ps)])])],16,ds))}}),ms=["width","height"],Cs={"clip-path":"url(#clip0_10908_387045)"},gs=["fill"],Bs={id:"clip0_10908_387045"},_s=["fill"],Es=a.defineComponent({__name:"icon-usdt",props:{width:{default:28},height:{default:28},color:{default:"currentColor"}},setup(o){const e=o,t=a.useAttrs(),{width:r,height:n,color:s}=e;return(u,l)=>(a.openBlock(),a.createElementBlock("svg",a.mergeProps({width:a.unref(r),height:a.unref(n),viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.unref(t)),[a.createElementVNode("g",Cs,[a.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14 28C6.26763 28 0 21.7324 0 14C0 6.26763 6.26763 0 14 0C21.7324 0 28 6.26763 28 14C28 21.7324 21.7324 28 14 28ZM15.6818 12.0689V9.99863H20.419V6.84162H7.52063V9.99863H12.2579V12.068C8.40787 12.2447 5.5125 13.0077 5.5125 13.9212C5.5125 14.8347 8.40787 15.5969 12.2579 15.7745V22.4088H15.6818V15.7727C19.5256 15.596 22.414 14.8339 22.414 13.9212C22.414 13.0086 19.5256 12.2465 15.6818 12.0689ZM15.6818 15.2101V15.2084C15.5855 15.2154 15.0894 15.2451 13.9825 15.2451C13.0987 15.2451 12.4766 15.2189 12.2579 15.2084V15.211C8.85587 15.0614 6.31662 14.469 6.31662 13.7602C6.31662 13.0524 8.85587 12.46 12.2579 12.3077V14.6212C12.4801 14.637 13.1171 14.6746 13.9974 14.6746C15.0535 14.6746 15.5829 14.6309 15.6818 14.6221V12.3095C19.0768 12.4609 21.6099 13.0532 21.6099 13.7602C21.6099 14.469 19.0768 15.0596 15.6818 15.2101Z",fill:a.unref(s)},null,8,gs)]),a.createElementVNode("defs",null,[a.createElementVNode("clipPath",Bs,[a.createElementVNode("rect",{width:"28",height:"28",fill:a.unref(s)},null,8,_s)])])],16,ms))}}),ys={key:1,class:"flex items-center gap-1"},Pt=a.defineComponent({__name:"currency-amount",props:{currency:{},amount:{},textClass:{default:""},iconColorClass:{default:""},iconWidth:{default:16},iconHeight:{default:16}},setup(o){const e=o,t=a.computed(()=>{var r;return(r=e.currency)==null?void 0:r.toUpperCase()});return(r,n)=>t.value!=="USDT"&&t.value!=="USDC"?(a.openBlock(),a.createElementBlock("p",{key:0,class:a.normalizeClass(r.textClass)},a.toDisplayString(a.unref(Se)(r.amount,t.value)),3)):(a.openBlock(),a.createElementBlock("div",ys,[t.value==="USDT"?(a.openBlock(),a.createBlock(Es,{key:0,width:r.iconWidth,height:r.iconHeight,color:r.iconColorClass},null,8,["width","height","color"])):a.createCommentVNode("",!0),t.value==="USDC"?(a.openBlock(),a.createBlock(vs,{key:1,width:r.iconWidth,height:r.iconHeight,color:r.iconColorClass},null,8,["width","height","color"])):a.createCommentVNode("",!0),a.createElementVNode("p",{class:a.normalizeClass(r.textClass)},a.toDisplayString(a.unref(Se)(r.amount)),3)]))}}),ks=["width","height"],As=["fill"],bs=["fill"],Fs=["fill"],Ds=["fill"],ws=a.defineComponent({__name:"icon-arrow-swap",props:{width:{default:16},height:{default:17},color:{default:"currentColor"}},setup(o){const e=o,t=a.useAttrs(),{width:r,height:n,color:s}=e;return(u,l)=>(a.openBlock(),a.createElementBlock("svg",a.mergeProps({width:a.unref(r),height:a.unref(n),viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.unref(t)),[a.createElementVNode("path",{d:"M10.3265 14.1948C10.1998 14.1948 10.0731 14.1481 9.97313 14.0481C9.77979 13.8548 9.77979 13.5348 9.97313 13.3414L13.3131 10.0014C13.5065 9.80811 13.8265 9.80811 14.0198 10.0014C14.2131 10.1948 14.2131 10.5148 14.0198 10.7081L10.6798 14.0481C10.5798 14.1414 10.4531 14.1948 10.3265 14.1948Z",fill:a.unref(s)},null,8,As),a.createElementVNode("path",{d:"M13.6668 10.8477H2.3335C2.06016 10.8477 1.8335 10.621 1.8335 10.3477C1.8335 10.0743 2.06016 9.84766 2.3335 9.84766H13.6668C13.9402 9.84766 14.1668 10.0743 14.1668 10.3477C14.1668 10.621 13.9402 10.8477 13.6668 10.8477Z",fill:a.unref(s)},null,8,bs),a.createElementVNode("path",{d:"M2.33329 6.86079C2.20663 6.86079 2.07996 6.81413 1.97996 6.71413C1.78663 6.52079 1.78663 6.20079 1.97996 6.00746L5.31996 2.66746C5.51329 2.47413 5.83329 2.47413 6.02663 2.66746C6.21996 2.86079 6.21996 3.18079 6.02663 3.37413L2.68663 6.71413C2.59329 6.80746 2.45996 6.86079 2.33329 6.86079Z",fill:a.unref(s)},null,8,Fs),a.createElementVNode("path",{d:"M13.6668 6.86133H2.3335C2.06016 6.86133 1.8335 6.63466 1.8335 6.36133C1.8335 6.08799 2.06016 5.86133 2.3335 5.86133H13.6668C13.9402 5.86133 14.1668 6.08799 14.1668 6.36133C14.1668 6.63466 13.9402 6.86133 13.6668 6.86133Z",fill:a.unref(s)},null,8,Ds)],16,ks))}}),Ss={class:"flex flex-col gap-6"},Vs={class:"grid grid-cols-1 gap-6"},Ns={key:1,class:"flex flex-col gap-6"},Rs={class:"mx-auto"},Is={class:"mb-0 text-body-4xs text-light-copy font-normal text-center"},Ts={class:"flex flex-col gap-6 border-c border-grey-100 p-4 rounded-2xl bg-light-white-50"},Ms={class:"border-b border-grey-border pb-4 flex flex-col gap-2"},Ps={class:"flex justify-between"},Os={class:"flex flex-col gap-1"},Hs={class:"mb-0 text-body-2xs font-medium text-sub-copy"},$s={class:"flex items-center gap-2"},Ls={class:"pb-4 flex flex-col gap-2"},zs={class:"flex justify-between"},Us={class:"mb-0 text-body-2xs font-medium text-sub-copy w-2/3 break-words"},qs={class:"flex flex-col gap-2"},js={class:"flex items-center justify-between border-b border-grey-border py-3"},Ks={class:"flex items-center justify-between py-4"},Ws={class:"flex flex-col gap-6"},Gs=a.defineComponent({__name:"pay-by-stable-coin",props:{secretKey:{},paymentObject:{},environment:{},onPaymentAuthorized:{type:Function}},setup(o){const e=o,t=e.environment??"sandbox",r=a.ref(0),n=a.ref(""),s=a.ref(!1),u=a.ref(!1),l=a.ref(!1),f=a.ref(!1),i=a.ref(""),c=a.ref([]),g=a.ref([]),d=a.ref(null),m=a.ref(null),x=a.ref(!1),C=a.ref(null),v=a.ref(""),E=a.reactive({stableCoin:"",network:""}),p=a.reactive({}),h={stableCoin:"required",network:"required"},_={stableCoin:"Stable Coin",network:"Network"},b=a.computed(()=>Se(e.paymentObject.amount,e.paymentObject.currency)),A=a.computed(()=>d.value?(Number(d.value.transactionAmount)||0)+(d.value.networkFee||0):0);async function w(){if(!e.secretKey){n.value="Secret key is required.";return}if(!ze(e.paymentObject)){n.value="Kindly ensure you are passing all the required data.";return}s.value=!0,n.value="";try{const B=await Ue(e.paymentObject,t,e.secretKey);if(B!=null&&B.isSuccessful&&B.launchUrl){const y=Ht(B.launchUrl);i.value=y.paymentReference,n.value="Payment link created successfully"}else n.value="Failed to create payment link"}catch(B){n.value=(B==null?void 0:B.message)||"Failed to create payment link"}finally{s.value=!1}}async function V(B){if(B){u.value=!0;try{const y=await Wr(t,B);y!=null&&y.isSuccessful?(d.value=y.data,r.value=1):n.value=(y==null?void 0:y.responseMessage)||"Failed to generate address"}catch(y){n.value=(y==null?void 0:y.message)||"Failed to generate address"}finally{u.value=!1}}}async function T(){l.value=!0;try{const B=await Qa(t);B!=null&&B.isSuccessful&&(c.value=(B.data??[]).map(y=>({label:y.name,value:y.name}))??[])}catch(B){n.value=(B==null?void 0:B.message)||"Failed to get stable coins"}finally{l.value=!1}}async function k(B){var y;f.value=!0;try{const M=await Ja(t,B);if(M!=null&&M.isSuccessful){const $=M.networks??((y=M.data)==null?void 0:y.networks)??[];g.value=($??[]).map(L=>({label:L,value:L}))}}catch(M){n.value=(M==null?void 0:M.message)||"Failed to get stable coin networks"}finally{f.value=!1}}async function S(){var B,y,M,$,L;x.value=!0;try{const H=await q0(t,i.value);if(H!=null&&H.isSuccessful){const P=H.data;C.value=P,(P==null?void 0:P.finalTransactionStatus)==null||(P==null?void 0:P.paymentStatus)==null?(n.value="Transaction not confirmed !!",v.value="pending",(B=e.onPaymentAuthorized)==null||B.call(e,{paymentId:i.value,paymentDate:(P==null?void 0:P.updatedAt)??"",paymentStatus:"pending"})):((P==null?void 0:P.finalTransactionStatus)==="Success"||(P==null?void 0:P.paymentStatus)==="Payment Received")&&(n.value="Transaction confirmed !!",v.value="confirmed",(y=e.onPaymentAuthorized)==null||y.call(e,{paymentId:i.value,paymentDate:P==null?void 0:P.updatedAt,paymentStatus:"confirmed"}))}else!(H!=null&&H.isSuccessful)&&(H==null?void 0:H.responseCode)==="119"&&(v.value="used",n.value=(H==null?void 0:H.responseMessage)||"",(M=e.onPaymentAuthorized)==null||M.call(e,{paymentId:i.value,paymentDate:null,paymentStatus:"used"}))}catch(H){v.value="",n.value=(($=H==null?void 0:H.error)==null?void 0:$.responseMessage)||((L=H==null?void 0:H.error)==null?void 0:L.message)||"Something went wrong"}finally{x.value=!1}}async function F(){const B=je(E,h,_);if(Object.assign(p,B),Object.keys(B).length===0){const y={paymentReference:i.value,currency:E.stableCoin,chain:E.network,transactionAmount:e.paymentObject.amount,merchantId:e.secretKey};m.value=y,await V(y)}}return a.onMounted(async()=>{await w(),await T()}),(B,y)=>{var M,$,L,H,P,O,D,R,I;return a.openBlock(),a.createElementBlock("div",Ss,[r.value===0?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createElementVNode("div",Vs,[a.createVNode(Ge,{label:"Select Crypto",required:"",options:c.value,loading:l.value,value:E.stableCoin,onChange:N=>{E.stableCoin=N,k(N),p.stableCoin&&(p.stableCoin="")},validationError:p.stableCoin??""},null,8,["options","loading","value","onChange","validationError"]),a.createVNode(Ge,{label:"Select Network",required:"",options:g.value,loading:f.value,value:E.network,onChange:N=>{E.network=N,p.network&&(p.network="")},validationError:p.network??""},null,8,["options","loading","value","onChange","validationError"])]),a.createVNode(Ve,{label:`Pay ${b.value}`,type:"primary",customClass:"w-full",loading:u.value,onClick:F},null,8,["label","loading"])],64)):(a.openBlock(),a.createElementBlock("div",Ns,[a.createElementVNode("div",Rs,[a.createElementVNode("p",Is,a.toDisplayString((M=m.value)==null?void 0:M.currency),1)]),a.createElementVNode("div",Ts,[a.createElementVNode("div",Ms,[y[2]||(y[2]=a.createElementVNode("p",{class:"mb-0 text-body-3xs text-light-copy font-normal"},"Network",-1)),a.createElementVNode("div",Ps,[a.createElementVNode("div",Os,[a.createElementVNode("p",Hs,a.toDisplayString(($=d.value)==null?void 0:$.chain),1),a.createElementVNode("div",$s,[y[0]||(y[0]=a.createElementVNode("p",{class:"mb-0 text-body-3xs text-light-copy font-normal"}," *Est. arrival = 3 mins ",-1)),y[1]||(y[1]=a.createElementVNode("p",{class:"mb-0 text-body-3xs text-light-copy font-normal"},"|",-1)),a.createVNode(Pt,{currency:((L=m.value)==null?void 0:L.currency)??"",amount:((H=d.value)==null?void 0:H.networkFee)??0,textClass:"mb-0 text-body-3xs text-light-copy font-normal",iconColorClass:"#557591",iconWidth:12,iconHeight:12},null,8,["currency","amount"])])]),a.createVNode(ws)])]),a.createElementVNode("div",Ls,[y[3]||(y[3]=a.createElementVNode("p",{class:"mb-0 text-body-3xs text-light-copy font-normal"}," Deposit Address > ",-1)),a.createElementVNode("div",zs,[a.createElementVNode("p",Us,a.toDisplayString((P=d.value)==null?void 0:P.walletAddress),1),a.createVNode(Le,{copyText:((O=d.value)==null?void 0:O.walletAddress)??""},null,8,["copyText"])])])]),a.createElementVNode("div",qs,[a.createElementVNode("div",js,[y[4]||(y[4]=a.createElementVNode("p",{class:"mb-0 text-body-2xs font-medium text-primary-black"}," Network fee ",-1)),a.createVNode(Pt,{currency:((D=m.value)==null?void 0:D.currency)??"",amount:((R=d.value)==null?void 0:R.networkFee)??0,textClass:"mb-0 text-body-2xs font-extrabold text-primary-black",iconColorClass:"#231F20"},null,8,["currency","amount"])]),a.createElementVNode("div",Ks,[y[5]||(y[5]=a.createElementVNode("p",{class:"mb-0 text-body-lg font-semibold text-primary-black"},"Pay",-1)),a.createVNode(Pt,{currency:((I=m.value)==null?void 0:I.currency)??"",amount:A.value,textClass:"mb-0 text-body-lg font-extrabold text-primary-black",iconColorClass:"#231F20",iconWidth:20,iconHeight:20},null,8,["currency","amount"])])]),a.createElementVNode("div",Ws,[a.createVNode(Ve,{label:"Confirm Payment",type:"primary",customClass:"w-full",loading:x.value,onClick:S},null,8,["loading"])])]))])}}}),Zs=["width","height"],Xs=["fill"],Ys=a.defineComponent({__name:"icon-check-circle",props:{width:{default:67},height:{default:67},color:{default:"currentColor"}},setup(o){const e=o,t=a.useAttrs(),{width:r,height:n,color:s}=e;return(u,l)=>(a.openBlock(),a.createElementBlock("svg",a.mergeProps({width:a.unref(r),height:a.unref(n),viewBox:"0 0 67 67",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.unref(t)),[a.createElementVNode("path",{d:"M33.6705 0.0820312C15.2758 0.0820312 0.36377 14.9941 0.36377 33.3888C0.36377 51.7846 15.2758 66.6956 33.6705 66.6956C52.0663 66.6956 66.9773 51.7846 66.9773 33.3888C66.9773 14.9941 52.0663 0.0820312 33.6705 0.0820312ZM33.6705 62.5978C17.6011 62.5978 4.52712 49.4583 4.52712 33.3887C4.52712 17.3192 17.6011 4.24525 33.6705 4.24525C49.74 4.24525 62.814 17.3193 62.814 33.3887C62.814 49.4581 49.74 62.5978 33.6705 62.5978ZM46.9631 21.2016L27.4213 40.8662L18.621 32.0659C17.8081 31.253 16.4904 31.253 15.6765 32.0659C14.8636 32.8788 14.8636 34.1965 15.6765 35.0094L25.9797 45.3137C26.7926 46.1255 28.1103 46.1255 28.9243 45.3137C29.0179 45.22 29.0981 45.1179 29.171 45.0118L49.9086 24.1461C50.7205 23.3332 50.7205 22.0155 49.9086 21.2016C49.0947 20.3888 47.777 20.3888 46.9631 21.2016Z",fill:a.unref(s)},null,8,Xs)],16,Zs))}}),Qs={class:"flex flex-col gap-8 p-16"},Js={class:"flex flex-col gap-8"},ei={class:"flex flex-col gap-8"},ti={class:"flex flex-col"},ri={class:"py-4 border-b border-grey-100"},ai={class:"py-4"},ni={class:"mx-auto",style:{width:"80%"}},si=a.defineComponent({__name:"success",setup(o){return(e,t)=>(a.openBlock(),a.createElementBlock("div",Qs,[a.createElementVNode("div",Js,[a.createElementVNode("div",ei,[a.createVNode(Ys,{color:"#F47A1F",class:"mx-auto"}),t[0]||(t[0]=a.createElementVNode("div",{class:"flex flex-col text-center",style:{gap:"2px"}},[a.createElementVNode("p",{class:"text-heading-text font-medium text-header-2xl"},"₦2,500.00"),a.createElementVNode("p",{class:"text-sub-copy font-regular text-body-3xs"}," Has been paid successfully ")],-1))]),a.createElementVNode("div",ti,[a.createElementVNode("div",ri,[a.createVNode(He,{type:"horizontal",label:"Order ID",value:"9900009000-8890-8829hd7"})]),a.createElementVNode("div",ai,[a.createVNode(He,{type:"horizontal",label:"Payment date",value:"July 24, 2025"})])])]),a.createElementVNode("div",ni,[a.createVNode(Ve,{label:"Return to Merchant Website",type:"secondary",customClass:"w-full"})])]))}}),ii={class:"grid grid-cols-3"},oi={key:0,class:"bg-[#EFF7FF] px-6 py-8 flex flex-col gap-5 col-span-1 rounded-l-xl"},li={key:0,class:"flex items-center justify-between px-12 py-8"},ui={key:1,class:"bg-heading-text rounded flex flex-col justify-center",style:{width:"52px",height:"52px"}},ci={class:"flex flex-col gap-1"},di={class:"text-body-2xs font-regular text-sub-copy text-right"},xi={class:"text-body-2xs font-regular text-sub-copy text-right"},hi={class:"text-orange-500 font-extrabold"},fi={key:1,class:"overflow-y-scroll px-10 pb-10 pt-2"},pi=a.defineComponent({__name:"checkout-card",props:{secretKey:{},environment:{},paymentObject:{},options:{}},setup(o){const e=o,t=e.environment??"sandbox",r=e.paymentObject??{merchantName:"",amount:0,currency:"",email:"",phoneNumber:"",narration:"",redirectUrl:"https://sandbox-merchant.buzapay.com/account/three-ds-status"},n=a.ref("PENDING"),s=a.ref([{label:"Card",value:"CARD"},{label:"Bank Transfer",value:"BANK_TRANSFER"},{label:"Stable Coin",value:"STABLE_COIN"}]),u=a.ref([]),l=a.ref(""),f=a.ref({paymentDate:"",paymentId:"",paymentStatus:""});function i(m){l.value=m}function c(m){f.value={...m},m.paymentStatus==="Authorized"?n.value="SUCCESS":m.paymentStatus==="Payment failed"?n.value="PENDING":m.paymentStatus==="used"?n.value="USED":n.value="PENDING"}a.watch(()=>r.currency,m=>{let x=[];m==="USD"?x=s.value.filter(C=>C.value!=="BANK_TRANSFER"):x=s.value.filter(C=>C.value!=="STABLE_COIN"),u.value=x},{immediate:!0}),a.watch(()=>u.value,m=>{m.length&&(l.value=m[0].value)},{immediate:!0});const g=e.secretKey,d=e.options;return(m,x)=>(a.openBlock(),a.createBlock(ca,null,{default:a.withCtx(()=>{var C,v;return[a.createElementVNode("div",ii,[n.value==="PENDING"?(a.openBlock(),a.createElementBlock("div",oi,[x[1]||(x[1]=a.createElementVNode("p",{class:"text-heading-text text-body-xs font-semibold"},"Pay with",-1)),a.createVNode(pa,{options:u.value,onSelectedChange:x[0]||(x[0]=E=>i(E))},null,8,["options"])])):a.createCommentVNode("",!0),a.createElementVNode("div",{class:a.normalizeClass(n.value==="SUCCESS"?"col-span-3":"col-span-2")},[n.value==="PENDING"?(a.openBlock(),a.createElementBlock("div",li,[(C=a.unref(d))!=null&&C.imageUrl?(a.openBlock(),a.createBlock(Ae,{key:0,src:((v=a.unref(d))==null?void 0:v.imageUrl)??"",alt:"Merchant Logo",width:52,height:52,customClass:"rounded-lg"},null,8,["src"])):(a.openBlock(),a.createElementBlock("div",ui,[...x[2]||(x[2]=[a.createElementVNode("p",{class:"text-white text-center text-body-2xs font-medium"},"Logo",-1)])])),a.createElementVNode("div",ci,[a.createElementVNode("p",di,a.toDisplayString(a.unref(r).merchantName),1),a.createElementVNode("p",xi,[x[3]||(x[3]=a.createTextVNode(" Pay: ",-1)),a.createElementVNode("span",hi,a.toDisplayString(a.unref(Se)(a.unref(r).amount,a.unref(r).currency)),1)])])])):a.createCommentVNode("",!0),n.value==="PENDING"?(a.openBlock(),a.createElementBlock("div",fi,[l.value==="CARD"?(a.openBlock(),a.createBlock(Kn,{key:0,secretKey:a.unref(g),environment:a.unref(t),paymentObject:a.unref(r),onPaymentAuthorized:c},null,8,["secretKey","environment","paymentObject"])):l.value==="BANK_TRANSFER"?(a.openBlock(),a.createBlock(cs,{key:1,secretKey:a.unref(g),environment:a.unref(t),paymentObject:a.unref(r),onPaymentAuthorized:c},null,8,["secretKey","environment","paymentObject"])):(a.openBlock(),a.createBlock(Gs,{key:2,secretKey:a.unref(g),environment:a.unref(t),paymentObject:a.unref(r),onPaymentAuthorized:c},null,8,["secretKey","environment","paymentObject"]))])):a.createCommentVNode("",!0),n.value==="SUCCESS"?(a.openBlock(),a.createBlock(si,{key:2,amount:a.unref(r).amount,currency:a.unref(r).currency,redirectUrl:a.unref(r).redirectUrl??"",successObject:f.value},null,8,["amount","currency","redirectUrl","successObject"])):a.createCommentVNode("",!0)],2)])]}),_:1}))}});exports.BzpCheckoutButton=Xr;exports.BzpCheckoutCard=pi;exports.BzpCheckoutIframe=j0;exports.createMidenPG=fr;exports.useMidenPG=pr;
14
+ */return t.mode.CTRGladman=function(){var r=t.lib.BlockCipherMode.extend();function n(l){if((l>>24&255)===255){var f=l>>16&255,i=l>>8&255,c=l&255;f===255?(f=0,i===255?(i=0,c===255?c=0:++c):++i):++f,l=0,l+=f<<16,l+=i<<8,l+=c}else l+=1<<24;return l}function s(l){return(l[0]=n(l[0]))===0&&(l[1]=n(l[1])),l}var u=r.Encryptor=r.extend({processBlock:function(l,f){var i=this._cipher,c=i.blockSize,g=this._iv,d=this._counter;g&&(d=this._counter=g.slice(0),this._iv=void 0),s(d);var m=d.slice(0);i.encryptBlock(m,0);for(var x=0;x<c;x++)l[f+x]^=m[x]}});return r.Decryptor=u,r}(),t.mode.CTRGladman})}(_t)),_t.exports}var Et={exports:{}},y0;function Ia(){return y0||(y0=1,function(o,e){(function(t,r,n){o.exports=r(G(),J())})(W,function(t){return t.mode.OFB=function(){var r=t.lib.BlockCipherMode.extend(),n=r.Encryptor=r.extend({processBlock:function(s,u){var l=this._cipher,f=l.blockSize,i=this._iv,c=this._keystream;i&&(c=this._keystream=i.slice(0),this._iv=void 0),l.encryptBlock(c,0);for(var g=0;g<f;g++)s[u+g]^=c[g]}});return r.Decryptor=n,r}(),t.mode.OFB})}(Et)),Et.exports}var yt={exports:{}},k0;function Ta(){return k0||(k0=1,function(o,e){(function(t,r,n){o.exports=r(G(),J())})(W,function(t){return t.mode.ECB=function(){var r=t.lib.BlockCipherMode.extend();return r.Encryptor=r.extend({processBlock:function(n,s){this._cipher.encryptBlock(n,s)}}),r.Decryptor=r.extend({processBlock:function(n,s){this._cipher.decryptBlock(n,s)}}),r}(),t.mode.ECB})}(yt)),yt.exports}var kt={exports:{}},A0;function Ma(){return A0||(A0=1,function(o,e){(function(t,r,n){o.exports=r(G(),J())})(W,function(t){return t.pad.AnsiX923={pad:function(r,n){var s=r.sigBytes,u=n*4,l=u-s%u,f=s+l-1;r.clamp(),r.words[f>>>2]|=l<<24-f%4*8,r.sigBytes+=l},unpad:function(r){var n=r.words[r.sigBytes-1>>>2]&255;r.sigBytes-=n}},t.pad.Ansix923})}(kt)),kt.exports}var At={exports:{}},b0;function Pa(){return b0||(b0=1,function(o,e){(function(t,r,n){o.exports=r(G(),J())})(W,function(t){return t.pad.Iso10126={pad:function(r,n){var s=n*4,u=s-r.sigBytes%s;r.concat(t.lib.WordArray.random(u-1)).concat(t.lib.WordArray.create([u<<24],1))},unpad:function(r){var n=r.words[r.sigBytes-1>>>2]&255;r.sigBytes-=n}},t.pad.Iso10126})}(At)),At.exports}var bt={exports:{}},F0;function Oa(){return F0||(F0=1,function(o,e){(function(t,r,n){o.exports=r(G(),J())})(W,function(t){return t.pad.Iso97971={pad:function(r,n){r.concat(t.lib.WordArray.create([2147483648],1)),t.pad.ZeroPadding.pad(r,n)},unpad:function(r){t.pad.ZeroPadding.unpad(r),r.sigBytes--}},t.pad.Iso97971})}(bt)),bt.exports}var Ft={exports:{}},D0;function Ha(){return D0||(D0=1,function(o,e){(function(t,r,n){o.exports=r(G(),J())})(W,function(t){return t.pad.ZeroPadding={pad:function(r,n){var s=n*4;r.clamp(),r.sigBytes+=s-(r.sigBytes%s||s)},unpad:function(r){for(var n=r.words,s=r.sigBytes-1,s=r.sigBytes-1;s>=0;s--)if(n[s>>>2]>>>24-s%4*8&255){r.sigBytes=s+1;break}}},t.pad.ZeroPadding})}(Ft)),Ft.exports}var Dt={exports:{}},w0;function $a(){return w0||(w0=1,function(o,e){(function(t,r,n){o.exports=r(G(),J())})(W,function(t){return t.pad.NoPadding={pad:function(){},unpad:function(){}},t.pad.NoPadding})}(Dt)),Dt.exports}var wt={exports:{}},S0;function La(){return S0||(S0=1,function(o,e){(function(t,r,n){o.exports=r(G(),J())})(W,function(t){return function(r){var n=t,s=n.lib,u=s.CipherParams,l=n.enc,f=l.Hex,i=n.format;i.Hex={stringify:function(c){return c.ciphertext.toString(f)},parse:function(c){var g=f.parse(c);return u.create({ciphertext:g})}}}(),t.format.Hex})}(wt)),wt.exports}var St={exports:{}},V0;function za(){return V0||(V0=1,function(o,e){(function(t,r,n){o.exports=r(G(),Ne(),Re(),Fe(),J())})(W,function(t){return function(){var r=t,n=r.lib,s=n.BlockCipher,u=r.algo,l=[],f=[],i=[],c=[],g=[],d=[],m=[],x=[],C=[],p=[];(function(){for(var h=[],_=0;_<256;_++)_<128?h[_]=_<<1:h[_]=_<<1^283;for(var b=0,A=0,_=0;_<256;_++){var w=A^A<<1^A<<2^A<<3^A<<4;w=w>>>8^w&255^99,l[b]=w,f[w]=b;var V=h[b],T=h[V],k=h[T],S=h[w]*257^w*16843008;i[b]=S<<24|S>>>8,c[b]=S<<16|S>>>16,g[b]=S<<8|S>>>24,d[b]=S;var S=k*16843009^T*65537^V*257^b*16843008;m[w]=S<<24|S>>>8,x[w]=S<<16|S>>>16,C[w]=S<<8|S>>>24,p[w]=S,b?(b=V^h[h[h[k^V]]],A^=h[h[A]]):b=A=1}})();var E=[0,1,2,4,8,16,32,64,128,27,54],v=u.AES=s.extend({_doReset:function(){var h;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var _=this._keyPriorReset=this._key,b=_.words,A=_.sigBytes/4,w=this._nRounds=A+6,V=(w+1)*4,T=this._keySchedule=[],k=0;k<V;k++)k<A?T[k]=b[k]:(h=T[k-1],k%A?A>6&&k%A==4&&(h=l[h>>>24]<<24|l[h>>>16&255]<<16|l[h>>>8&255]<<8|l[h&255]):(h=h<<8|h>>>24,h=l[h>>>24]<<24|l[h>>>16&255]<<16|l[h>>>8&255]<<8|l[h&255],h^=E[k/A|0]<<24),T[k]=T[k-A]^h);for(var S=this._invKeySchedule=[],F=0;F<V;F++){var k=V-F;if(F%4)var h=T[k];else var h=T[k-4];F<4||k<=4?S[F]=h:S[F]=m[l[h>>>24]]^x[l[h>>>16&255]]^C[l[h>>>8&255]]^p[l[h&255]]}}},encryptBlock:function(h,_){this._doCryptBlock(h,_,this._keySchedule,i,c,g,d,l)},decryptBlock:function(h,_){var b=h[_+1];h[_+1]=h[_+3],h[_+3]=b,this._doCryptBlock(h,_,this._invKeySchedule,m,x,C,p,f);var b=h[_+1];h[_+1]=h[_+3],h[_+3]=b},_doCryptBlock:function(h,_,b,A,w,V,T,k){for(var S=this._nRounds,F=h[_]^b[0],B=h[_+1]^b[1],y=h[_+2]^b[2],M=h[_+3]^b[3],$=4,L=1;L<S;L++){var H=A[F>>>24]^w[B>>>16&255]^V[y>>>8&255]^T[M&255]^b[$++],P=A[B>>>24]^w[y>>>16&255]^V[M>>>8&255]^T[F&255]^b[$++],O=A[y>>>24]^w[M>>>16&255]^V[F>>>8&255]^T[B&255]^b[$++],D=A[M>>>24]^w[F>>>16&255]^V[B>>>8&255]^T[y&255]^b[$++];F=H,B=P,y=O,M=D}var H=(k[F>>>24]<<24|k[B>>>16&255]<<16|k[y>>>8&255]<<8|k[M&255])^b[$++],P=(k[B>>>24]<<24|k[y>>>16&255]<<16|k[M>>>8&255]<<8|k[F&255])^b[$++],O=(k[y>>>24]<<24|k[M>>>16&255]<<16|k[F>>>8&255]<<8|k[B&255])^b[$++],D=(k[M>>>24]<<24|k[F>>>16&255]<<16|k[B>>>8&255]<<8|k[y&255])^b[$++];h[_]=H,h[_+1]=P,h[_+2]=O,h[_+3]=D},keySize:256/32});r.AES=s._createHelper(v)}(),t.AES})}(St)),St.exports}var Vt={exports:{}},N0;function Ua(){return N0||(N0=1,function(o,e){(function(t,r,n){o.exports=r(G(),Ne(),Re(),Fe(),J())})(W,function(t){return function(){var r=t,n=r.lib,s=n.WordArray,u=n.BlockCipher,l=r.algo,f=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],i=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],c=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],g=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],d=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],m=l.DES=u.extend({_doReset:function(){for(var E=this._key,v=E.words,h=[],_=0;_<56;_++){var b=f[_]-1;h[_]=v[b>>>5]>>>31-b%32&1}for(var A=this._subKeys=[],w=0;w<16;w++){for(var V=A[w]=[],T=c[w],_=0;_<24;_++)V[_/6|0]|=h[(i[_]-1+T)%28]<<31-_%6,V[4+(_/6|0)]|=h[28+(i[_+24]-1+T)%28]<<31-_%6;V[0]=V[0]<<1|V[0]>>>31;for(var _=1;_<7;_++)V[_]=V[_]>>>(_-1)*4+3;V[7]=V[7]<<5|V[7]>>>27}for(var k=this._invSubKeys=[],_=0;_<16;_++)k[_]=A[15-_]},encryptBlock:function(E,v){this._doCryptBlock(E,v,this._subKeys)},decryptBlock:function(E,v){this._doCryptBlock(E,v,this._invSubKeys)},_doCryptBlock:function(E,v,h){this._lBlock=E[v],this._rBlock=E[v+1],x.call(this,4,252645135),x.call(this,16,65535),C.call(this,2,858993459),C.call(this,8,16711935),x.call(this,1,1431655765);for(var _=0;_<16;_++){for(var b=h[_],A=this._lBlock,w=this._rBlock,V=0,T=0;T<8;T++)V|=g[T][((w^b[T])&d[T])>>>0];this._lBlock=w,this._rBlock=A^V}var k=this._lBlock;this._lBlock=this._rBlock,this._rBlock=k,x.call(this,1,1431655765),C.call(this,8,16711935),C.call(this,2,858993459),x.call(this,16,65535),x.call(this,4,252645135),E[v]=this._lBlock,E[v+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function x(E,v){var h=(this._lBlock>>>E^this._rBlock)&v;this._rBlock^=h,this._lBlock^=h<<E}function C(E,v){var h=(this._rBlock>>>E^this._lBlock)&v;this._lBlock^=h,this._rBlock^=h<<E}r.DES=u._createHelper(m);var p=l.TripleDES=u.extend({_doReset:function(){var E=this._key,v=E.words;if(v.length!==2&&v.length!==4&&v.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var h=v.slice(0,2),_=v.length<4?v.slice(0,2):v.slice(2,4),b=v.length<6?v.slice(0,2):v.slice(4,6);this._des1=m.createEncryptor(s.create(h)),this._des2=m.createEncryptor(s.create(_)),this._des3=m.createEncryptor(s.create(b))},encryptBlock:function(E,v){this._des1.encryptBlock(E,v),this._des2.decryptBlock(E,v),this._des3.encryptBlock(E,v)},decryptBlock:function(E,v){this._des3.decryptBlock(E,v),this._des2.encryptBlock(E,v),this._des1.decryptBlock(E,v)},keySize:192/32,ivSize:64/32,blockSize:64/32});r.TripleDES=u._createHelper(p)}(),t.TripleDES})}(Vt)),Vt.exports}var Nt={exports:{}},R0;function qa(){return R0||(R0=1,function(o,e){(function(t,r,n){o.exports=r(G(),Ne(),Re(),Fe(),J())})(W,function(t){return function(){var r=t,n=r.lib,s=n.StreamCipher,u=r.algo,l=u.RC4=s.extend({_doReset:function(){for(var c=this._key,g=c.words,d=c.sigBytes,m=this._S=[],x=0;x<256;x++)m[x]=x;for(var x=0,C=0;x<256;x++){var p=x%d,E=g[p>>>2]>>>24-p%4*8&255;C=(C+m[x]+E)%256;var v=m[x];m[x]=m[C],m[C]=v}this._i=this._j=0},_doProcessBlock:function(c,g){c[g]^=f.call(this)},keySize:256/32,ivSize:0});function f(){for(var c=this._S,g=this._i,d=this._j,m=0,x=0;x<4;x++){g=(g+1)%256,d=(d+c[g])%256;var C=c[g];c[g]=c[d],c[d]=C,m|=c[(c[g]+c[d])%256]<<24-x*8}return this._i=g,this._j=d,m}r.RC4=s._createHelper(l);var i=u.RC4Drop=l.extend({cfg:l.cfg.extend({drop:192}),_doReset:function(){l._doReset.call(this);for(var c=this.cfg.drop;c>0;c--)f.call(this)}});r.RC4Drop=s._createHelper(i)}(),t.RC4})}(Nt)),Nt.exports}var Rt={exports:{}},I0;function ja(){return I0||(I0=1,function(o,e){(function(t,r,n){o.exports=r(G(),Ne(),Re(),Fe(),J())})(W,function(t){return function(){var r=t,n=r.lib,s=n.StreamCipher,u=r.algo,l=[],f=[],i=[],c=u.Rabbit=s.extend({_doReset:function(){for(var d=this._key.words,m=this.cfg.iv,x=0;x<4;x++)d[x]=(d[x]<<8|d[x]>>>24)&16711935|(d[x]<<24|d[x]>>>8)&4278255360;var C=this._X=[d[0],d[3]<<16|d[2]>>>16,d[1],d[0]<<16|d[3]>>>16,d[2],d[1]<<16|d[0]>>>16,d[3],d[2]<<16|d[1]>>>16],p=this._C=[d[2]<<16|d[2]>>>16,d[0]&4294901760|d[1]&65535,d[3]<<16|d[3]>>>16,d[1]&4294901760|d[2]&65535,d[0]<<16|d[0]>>>16,d[2]&4294901760|d[3]&65535,d[1]<<16|d[1]>>>16,d[3]&4294901760|d[0]&65535];this._b=0;for(var x=0;x<4;x++)g.call(this);for(var x=0;x<8;x++)p[x]^=C[x+4&7];if(m){var E=m.words,v=E[0],h=E[1],_=(v<<8|v>>>24)&16711935|(v<<24|v>>>8)&4278255360,b=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360,A=_>>>16|b&4294901760,w=b<<16|_&65535;p[0]^=_,p[1]^=A,p[2]^=b,p[3]^=w,p[4]^=_,p[5]^=A,p[6]^=b,p[7]^=w;for(var x=0;x<4;x++)g.call(this)}},_doProcessBlock:function(d,m){var x=this._X;g.call(this),l[0]=x[0]^x[5]>>>16^x[3]<<16,l[1]=x[2]^x[7]>>>16^x[5]<<16,l[2]=x[4]^x[1]>>>16^x[7]<<16,l[3]=x[6]^x[3]>>>16^x[1]<<16;for(var C=0;C<4;C++)l[C]=(l[C]<<8|l[C]>>>24)&16711935|(l[C]<<24|l[C]>>>8)&4278255360,d[m+C]^=l[C]},blockSize:128/32,ivSize:64/32});function g(){for(var d=this._X,m=this._C,x=0;x<8;x++)f[x]=m[x];m[0]=m[0]+1295307597+this._b|0,m[1]=m[1]+3545052371+(m[0]>>>0<f[0]>>>0?1:0)|0,m[2]=m[2]+886263092+(m[1]>>>0<f[1]>>>0?1:0)|0,m[3]=m[3]+1295307597+(m[2]>>>0<f[2]>>>0?1:0)|0,m[4]=m[4]+3545052371+(m[3]>>>0<f[3]>>>0?1:0)|0,m[5]=m[5]+886263092+(m[4]>>>0<f[4]>>>0?1:0)|0,m[6]=m[6]+1295307597+(m[5]>>>0<f[5]>>>0?1:0)|0,m[7]=m[7]+3545052371+(m[6]>>>0<f[6]>>>0?1:0)|0,this._b=m[7]>>>0<f[7]>>>0?1:0;for(var x=0;x<8;x++){var C=d[x]+m[x],p=C&65535,E=C>>>16,v=((p*p>>>17)+p*E>>>15)+E*E,h=((C&4294901760)*C|0)+((C&65535)*C|0);i[x]=v^h}d[0]=i[0]+(i[7]<<16|i[7]>>>16)+(i[6]<<16|i[6]>>>16)|0,d[1]=i[1]+(i[0]<<8|i[0]>>>24)+i[7]|0,d[2]=i[2]+(i[1]<<16|i[1]>>>16)+(i[0]<<16|i[0]>>>16)|0,d[3]=i[3]+(i[2]<<8|i[2]>>>24)+i[1]|0,d[4]=i[4]+(i[3]<<16|i[3]>>>16)+(i[2]<<16|i[2]>>>16)|0,d[5]=i[5]+(i[4]<<8|i[4]>>>24)+i[3]|0,d[6]=i[6]+(i[5]<<16|i[5]>>>16)+(i[4]<<16|i[4]>>>16)|0,d[7]=i[7]+(i[6]<<8|i[6]>>>24)+i[5]|0}r.Rabbit=s._createHelper(c)}(),t.Rabbit})}(Rt)),Rt.exports}var It={exports:{}},T0;function Ka(){return T0||(T0=1,function(o,e){(function(t,r,n){o.exports=r(G(),Ne(),Re(),Fe(),J())})(W,function(t){return function(){var r=t,n=r.lib,s=n.StreamCipher,u=r.algo,l=[],f=[],i=[],c=u.RabbitLegacy=s.extend({_doReset:function(){var d=this._key.words,m=this.cfg.iv,x=this._X=[d[0],d[3]<<16|d[2]>>>16,d[1],d[0]<<16|d[3]>>>16,d[2],d[1]<<16|d[0]>>>16,d[3],d[2]<<16|d[1]>>>16],C=this._C=[d[2]<<16|d[2]>>>16,d[0]&4294901760|d[1]&65535,d[3]<<16|d[3]>>>16,d[1]&4294901760|d[2]&65535,d[0]<<16|d[0]>>>16,d[2]&4294901760|d[3]&65535,d[1]<<16|d[1]>>>16,d[3]&4294901760|d[0]&65535];this._b=0;for(var p=0;p<4;p++)g.call(this);for(var p=0;p<8;p++)C[p]^=x[p+4&7];if(m){var E=m.words,v=E[0],h=E[1],_=(v<<8|v>>>24)&16711935|(v<<24|v>>>8)&4278255360,b=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360,A=_>>>16|b&4294901760,w=b<<16|_&65535;C[0]^=_,C[1]^=A,C[2]^=b,C[3]^=w,C[4]^=_,C[5]^=A,C[6]^=b,C[7]^=w;for(var p=0;p<4;p++)g.call(this)}},_doProcessBlock:function(d,m){var x=this._X;g.call(this),l[0]=x[0]^x[5]>>>16^x[3]<<16,l[1]=x[2]^x[7]>>>16^x[5]<<16,l[2]=x[4]^x[1]>>>16^x[7]<<16,l[3]=x[6]^x[3]>>>16^x[1]<<16;for(var C=0;C<4;C++)l[C]=(l[C]<<8|l[C]>>>24)&16711935|(l[C]<<24|l[C]>>>8)&4278255360,d[m+C]^=l[C]},blockSize:128/32,ivSize:64/32});function g(){for(var d=this._X,m=this._C,x=0;x<8;x++)f[x]=m[x];m[0]=m[0]+1295307597+this._b|0,m[1]=m[1]+3545052371+(m[0]>>>0<f[0]>>>0?1:0)|0,m[2]=m[2]+886263092+(m[1]>>>0<f[1]>>>0?1:0)|0,m[3]=m[3]+1295307597+(m[2]>>>0<f[2]>>>0?1:0)|0,m[4]=m[4]+3545052371+(m[3]>>>0<f[3]>>>0?1:0)|0,m[5]=m[5]+886263092+(m[4]>>>0<f[4]>>>0?1:0)|0,m[6]=m[6]+1295307597+(m[5]>>>0<f[5]>>>0?1:0)|0,m[7]=m[7]+3545052371+(m[6]>>>0<f[6]>>>0?1:0)|0,this._b=m[7]>>>0<f[7]>>>0?1:0;for(var x=0;x<8;x++){var C=d[x]+m[x],p=C&65535,E=C>>>16,v=((p*p>>>17)+p*E>>>15)+E*E,h=((C&4294901760)*C|0)+((C&65535)*C|0);i[x]=v^h}d[0]=i[0]+(i[7]<<16|i[7]>>>16)+(i[6]<<16|i[6]>>>16)|0,d[1]=i[1]+(i[0]<<8|i[0]>>>24)+i[7]|0,d[2]=i[2]+(i[1]<<16|i[1]>>>16)+(i[0]<<16|i[0]>>>16)|0,d[3]=i[3]+(i[2]<<8|i[2]>>>24)+i[1]|0,d[4]=i[4]+(i[3]<<16|i[3]>>>16)+(i[2]<<16|i[2]>>>16)|0,d[5]=i[5]+(i[4]<<8|i[4]>>>24)+i[3]|0,d[6]=i[6]+(i[5]<<16|i[5]>>>16)+(i[4]<<16|i[4]>>>16)|0,d[7]=i[7]+(i[6]<<8|i[6]>>>24)+i[5]|0}r.RabbitLegacy=s._createHelper(c)}(),t.RabbitLegacy})}(It)),It.exports}var Tt={exports:{}},M0;function Wa(){return M0||(M0=1,function(o,e){(function(t,r,n){o.exports=r(G(),Ne(),Re(),Fe(),J())})(W,function(t){return function(){var r=t,n=r.lib,s=n.BlockCipher,u=r.algo;const l=16,f=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],i=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var c={pbox:[],sbox:[]};function g(p,E){let v=E>>24&255,h=E>>16&255,_=E>>8&255,b=E&255,A=p.sbox[0][v]+p.sbox[1][h];return A=A^p.sbox[2][_],A=A+p.sbox[3][b],A}function d(p,E,v){let h=E,_=v,b;for(let A=0;A<l;++A)h=h^p.pbox[A],_=g(p,h)^_,b=h,h=_,_=b;return b=h,h=_,_=b,_=_^p.pbox[l],h=h^p.pbox[l+1],{left:h,right:_}}function m(p,E,v){let h=E,_=v,b;for(let A=l+1;A>1;--A)h=h^p.pbox[A],_=g(p,h)^_,b=h,h=_,_=b;return b=h,h=_,_=b,_=_^p.pbox[1],h=h^p.pbox[0],{left:h,right:_}}function x(p,E,v){for(let w=0;w<4;w++){p.sbox[w]=[];for(let V=0;V<256;V++)p.sbox[w][V]=i[w][V]}let h=0;for(let w=0;w<l+2;w++)p.pbox[w]=f[w]^E[h],h++,h>=v&&(h=0);let _=0,b=0,A=0;for(let w=0;w<l+2;w+=2)A=d(p,_,b),_=A.left,b=A.right,p.pbox[w]=_,p.pbox[w+1]=b;for(let w=0;w<4;w++)for(let V=0;V<256;V+=2)A=d(p,_,b),_=A.left,b=A.right,p.sbox[w][V]=_,p.sbox[w][V+1]=b;return!0}var C=u.Blowfish=s.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var p=this._keyPriorReset=this._key,E=p.words,v=p.sigBytes/4;x(c,E,v)}},encryptBlock:function(p,E){var v=d(c,p[E],p[E+1]);p[E]=v.left,p[E+1]=v.right},decryptBlock:function(p,E){var v=m(c,p[E],p[E+1]);p[E]=v.left,p[E+1]=v.right},blockSize:64/32,keySize:128/32,ivSize:64/32});r.Blowfish=s._createHelper(C)}(),t.Blowfish})}(Tt)),Tt.exports}(function(o,e){(function(t,r,n){o.exports=r(G(),Ze(),ya(),ka(),Ne(),Aa(),Re(),W0(),$t(),ba(),G0(),Fa(),Da(),wa(),Lt(),Sa(),Fe(),J(),Va(),Na(),Ra(),Ia(),Ta(),Ma(),Pa(),Oa(),Ha(),$a(),La(),za(),Ua(),qa(),ja(),Ka(),Wa())})(W,function(t){return t})})(K0);var Ga=K0.exports;const ce=ma(Ga);function Za(o,e={}){const t=o.replace(/-/g,""),r=t.slice(0,16),n=t.slice(-16),s=ce.enc.Utf8.parse(r),u=ce.enc.Utf8.parse(n),l=JSON.stringify(e);return{requestParam:ce.AES.encrypt(ce.enc.Utf8.parse(l),s,{keySize:128/8,iv:u,mode:ce.mode.CBC,padding:ce.pad.Pkcs7}).toString()}}function P0(o,e){const t=o.replace(/-/g,""),r=t.slice(0,16),n=t.slice(-16),s=ce.enc.Utf8.parse(r),u=ce.enc.Utf8.parse(n),f=ce.AES.decrypt(e,s,{keySize:128/8,iv:u,mode:ce.mode.CBC,padding:ce.pad.Pkcs7}).toString(ce.enc.Utf8);return JSON.parse(f)}async function Xa(o,e){try{const t=ge(o);return await(await fetch(`${t}/api/v1/countries-iso`,{method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json",merchantId:e}})).json()}catch{}}async function Ya(o,e,t){try{const r=ge(e);return await(await fetch(`${r}/api/v1/state-by-country/${o}`,{method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json",merchantId:t}})).json()}catch{}}async function Qa(o){try{const e=ge(o);return await(await fetch(`${e}/api/v1/checkout/stable-coin`,{method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json"}})).json()}catch{}}async function Ja(o,e){try{const t=ge(o);return await(await fetch(`${t}/api/v1/checkout/networks/${e}`,{method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json"}})).json()}catch{}}function be(o){return typeof o=="string"||o instanceof String}function O0(o){var e;return typeof o=="object"&&o!=null&&(o==null||(e=o.constructor)==null?void 0:e.name)==="Object"}function Z0(o,e){return Array.isArray(e)?Z0(o,(t,r)=>e.includes(r)):Object.entries(o).reduce((t,r)=>{let[n,s]=r;return e(s,n)&&(t[n]=s),t},{})}const z={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function en(o){switch(o){case z.LEFT:return z.FORCE_LEFT;case z.RIGHT:return z.FORCE_RIGHT;default:return o}}function Mt(o){return o.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function Ke(o,e){if(e===o)return!0;const t=Array.isArray(e),r=Array.isArray(o);let n;if(t&&r){if(e.length!=o.length)return!1;for(n=0;n<e.length;n++)if(!Ke(e[n],o[n]))return!1;return!0}if(t!=r)return!1;if(e&&o&&typeof e=="object"&&typeof o=="object"){const s=e instanceof Date,u=o instanceof Date;if(s&&u)return e.getTime()==o.getTime();if(s!=u)return!1;const l=e instanceof RegExp,f=o instanceof RegExp;if(l&&f)return e.toString()==o.toString();if(l!=f)return!1;const i=Object.keys(e);for(n=0;n<i.length;n++)if(!Object.prototype.hasOwnProperty.call(o,i[n]))return!1;for(n=0;n<i.length;n++)if(!Ke(o[i[n]],e[i[n]]))return!1;return!0}else if(e&&o&&typeof e=="function"&&typeof o=="function")return e.toString()===o.toString();return!1}class tn{constructor(e){for(Object.assign(this,e);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start;if(this.insertedCount)for(;this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end);)this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end?++this.oldSelection.end:++this.cursorPos}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?z.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?z.RIGHT:z.LEFT}}function q(o,e){return new q.InputMask(o,e)}function X0(o){if(o==null)throw new Error("mask property should be defined");return o instanceof RegExp?q.MaskedRegExp:be(o)?q.MaskedPattern:o===Date?q.MaskedDate:o===Number?q.MaskedNumber:Array.isArray(o)||o===Array?q.MaskedDynamic:q.Masked&&o.prototype instanceof q.Masked?o:q.Masked&&o instanceof q.Masked?o.constructor:o instanceof Function?q.MaskedFunction:(console.warn("Mask not found for mask",o),q.Masked)}function $e(o){if(!o)throw new Error("Options in not defined");if(q.Masked){if(o.prototype instanceof q.Masked)return{mask:o};const{mask:e=void 0,...t}=o instanceof q.Masked?{mask:o}:O0(o)&&o.mask instanceof q.Masked?o:{};if(e){const r=e.mask;return{...Z0(e,(n,s)=>!s.startsWith("_")),mask:e.constructor,_mask:r,...t}}}return O0(o)?{...o}:{mask:o}}function Ce(o){if(q.Masked&&o instanceof q.Masked)return o;const e=$e(o),t=X0(e.mask);if(!t)throw new Error("Masked class is not found for provided mask "+e.mask+", appropriate module needs to be imported manually before creating mask.");return e.mask===t&&delete e.mask,e._mask&&(e.mask=e._mask,delete e._mask),new t(e)}q.createMask=Ce;class zt{get selectionStart(){let e;try{e=this._unsafeSelectionStart}catch{}return e??this.value.length}get selectionEnd(){let e;try{e=this._unsafeSelectionEnd}catch{}return e??this.value.length}select(e,t){if(!(e==null||t==null||e===this.selectionStart&&t===this.selectionEnd))try{this._unsafeSelect(e,t)}catch{}}get isActive(){return!1}}q.MaskElement=zt;const H0=90,rn=89;class Xe extends zt{constructor(e){super(),this.input=e,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var e,t,r;return(e=(t=(r=this.input).getRootNode)==null?void 0:t.call(r))!=null?e:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(e){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",e.drop),this.input.addEventListener("click",e.click),this.input.addEventListener("focus",e.focus),this.input.addEventListener("blur",e.commit),this._handlers=e}_onKeydown(e){if(this._handlers.redo&&(e.keyCode===H0&&e.shiftKey&&(e.metaKey||e.ctrlKey)||e.keyCode===rn&&e.ctrlKey))return e.preventDefault(),this._handlers.redo(e);if(this._handlers.undo&&e.keyCode===H0&&(e.metaKey||e.ctrlKey))return e.preventDefault(),this._handlers.undo(e);e.isComposing||this._handlers.selectionChange(e)}_onBeforeinput(e){if(e.inputType==="historyUndo"&&this._handlers.undo)return e.preventDefault(),this._handlers.undo(e);if(e.inputType==="historyRedo"&&this._handlers.redo)return e.preventDefault(),this._handlers.redo(e)}_onCompositionEnd(e){this._handlers.input(e)}_onInput(e){e.isComposing||this._handlers.input(e)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown),this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("beforeinput",this._onBeforeinput),this.input.removeEventListener("compositionend",this._onCompositionEnd),this.input.removeEventListener("drop",this._handlers.drop),this.input.removeEventListener("click",this._handlers.click),this.input.removeEventListener("focus",this._handlers.focus),this.input.removeEventListener("blur",this._handlers.commit),this._handlers={}}}q.HTMLMaskElement=Xe;class an extends Xe{constructor(e){super(e),this.input=e}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(e,t){this.input.setSelectionRange(e,t)}get value(){return this.input.value}set value(e){this.input.value=e}}q.HTMLMaskElement=Xe;class Y0 extends Xe{get _unsafeSelectionStart(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),r=t&&t.anchorOffset,n=t&&t.focusOffset;return n==null||r==null||r<n?r:n}get _unsafeSelectionEnd(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),r=t&&t.anchorOffset,n=t&&t.focusOffset;return n==null||r==null||r>n?r:n}_unsafeSelect(e,t){if(!this.rootElement.createRange)return;const r=this.rootElement.createRange();r.setStart(this.input.firstChild||this.input,e),r.setEnd(this.input.lastChild||this.input,t);const n=this.rootElement,s=n.getSelection&&n.getSelection();s&&(s.removeAllRanges(),s.addRange(r))}get value(){return this.input.textContent||""}set value(e){this.input.textContent=e}}q.HTMLContenteditableMaskElement=Y0;class Ye{constructor(){this.states=[],this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return this.states.length===0}push(e){this.currentIndex<this.states.length-1&&(this.states.length=this.currentIndex+1),this.states.push(e),this.states.length>Ye.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(e){return this.currentIndex=Math.min(Math.max(this.currentIndex+e,0),this.states.length-1),this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0,this.currentIndex=0}}Ye.MAX_LENGTH=100;class nn{constructor(e,t){this.el=e instanceof zt?e:e.isContentEditable&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"?new Y0(e):new an(e),this.masked=Ce(t),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new Ye,this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this._onUndo=this._onUndo.bind(this),this._onRedo=this._onRedo.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(e){var t;return e==null||((t=this.masked)==null?void 0:t.maskEquals(e))}get mask(){return this.masked.mask}set mask(e){if(this.maskEquals(e))return;if(!(e instanceof q.Masked)&&this.masked.constructor===X0(e)){this.masked.updateOptions({mask:e});return}const t=e instanceof q.Masked?e:Ce({mask:e});t.unmaskedValue=this.masked.unmaskedValue,this.masked=t}get value(){return this._value}set value(e){this.value!==e&&(this.masked.value=e,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(e){this.unmaskedValue!==e&&(this.masked.unmaskedValue=e,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(e){this.rawInputValue!==e&&(this.masked.rawInputValue=e,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(e){this.masked.typedValueEquals(e)||(this.masked.typedValue=e,this.updateControl("auto"))}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(e,t){const r=this._listeners[e];r&&r.forEach(n=>n(t))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(e){!this.el||!this.el.isActive||(this.el.select(e,e),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value,this._unmaskedValue=this.masked.unmaskedValue,this._rawInputValue=this.masked.rawInputValue}updateControl(e){const t=this.masked.unmaskedValue,r=this.masked.value,n=this.masked.rawInputValue,s=this.displayValue,u=this.unmaskedValue!==t||this.value!==r||this._rawInputValue!==n;this._unmaskedValue=t,this._value=r,this._rawInputValue=n,this.el.value!==s&&(this.el.value=s),e==="auto"?this.alignCursor():e!=null&&(this.cursorPos=e),u&&this._fireChangeEvents(),!this._historyChanging&&(u||this.history.isEmpty)&&this.history.push({unmaskedValue:t,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(e){const{mask:t,...r}=e,n=!this.maskEquals(t),s=this.masked.optionsIsChanged(r);n&&(this.mask=t),s&&this.masked.updateOptions(r),(n||s)&&this.updateControl()}updateCursor(e){e!=null&&(this.cursorPos=e,this._delayUpdateCursor(e))}_delayUpdateCursor(e){this._abortUpdateCursor(),this._changingCursorPos=e,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,z.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(e,t){return this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t),this}off(e,t){if(!this._listeners[e])return this;if(!t)return delete this._listeners[e],this;const r=this._listeners[e].indexOf(t);return r>=0&&this._listeners[e].splice(r,1),this}_onInput(e){this._inputEvent=e,this._abortUpdateCursor();const t=new tn({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),r=this.masked.rawInputValue,n=this.masked.splice(t.startChangePos,t.removed.length,t.inserted,t.removeDirection,{input:!0,raw:!0}).offset,s=r===this.masked.rawInputValue?t.removeDirection:z.NONE;let u=this.masked.nearestInputPos(t.startChangePos+n,s);s!==z.NONE&&(u=this.masked.nearestInputPos(u,z.NONE)),this.updateControl(u),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(e){e.preventDefault(),e.stopPropagation()}_onFocus(e){this.alignCursorFriendly()}_onClick(e){this.alignCursorFriendly()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(e){e&&(this._historyChanging=!0,this.unmaskedValue=e.unmaskedValue,this.el.select(e.selection.start,e.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}q.InputMask=nn;class K{static normalize(e){return Array.isArray(e)?e:[e,new K]}constructor(e){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},e)}aggregate(e){return this.inserted+=e.inserted,this.rawInserted+=e.rawInserted,this.tailShift+=e.tailShift,this.skip=this.skip||e.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return!!this.rawInserted||this.skip}equals(e){return this.inserted===e.inserted&&this.tailShift===e.tailShift&&this.rawInserted===e.rawInserted&&this.skip===e.skip}}q.ChangeDetails=K;class pe{constructor(e,t,r){e===void 0&&(e=""),t===void 0&&(t=0),this.value=e,this.from=t,this.stop=r}toString(){return this.value}extend(e){this.value+=String(e)}appendTo(e){return e.append(this.toString(),{tail:!0}).aggregate(e._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(e){Object.assign(this,e)}unshift(e){if(!this.value.length||e!=null&&this.from>=e)return"";const t=this.value[0];return this.value=this.value.slice(1),t}shift(){if(!this.value.length)return"";const e=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),e}}class te{constructor(e){this._value="",this._update({...te.DEFAULTS,...e}),this._initialized=!0}updateOptions(e){this.optionsIsChanged(e)&&this.withValueRefresh(this._update.bind(this,e))}_update(e){Object.assign(this,e)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value}reset(){this._value=""}get value(){return this._value}set value(e){this.resolve(e,{input:!0})}resolve(e,t){t===void 0&&(t={input:!0}),this.reset(),this.append(e,t,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(e){this.resolve(e,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(e){this.format?this.value=this.format(e,this):this.unmaskedValue=String(e)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(e){this.resolve(e,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(e,t){return e}totalInputPositions(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),Math.min(this.displayValue.length,t-e)}extractInput(e,t,r){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),this.displayValue.slice(e,t)}extractTail(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),new pe(this.extractInput(e,t),e)}appendTail(e){return be(e)&&(e=new pe(String(e))),e.appendTo(this)}_appendCharRaw(e,t){return e?(this._value+=e,new K({inserted:e,rawInserted:e})):new K}_appendChar(e,t,r){t===void 0&&(t={});const n=this.state;let s;if([e,s]=this.doPrepareChar(e,t),e&&(s=s.aggregate(this._appendCharRaw(e,t)),!s.rawInserted&&this.autofix==="pad")){const u=this.state;this.state=n;let l=this.pad(t);const f=this._appendCharRaw(e,t);l=l.aggregate(f),f.rawInserted||l.equals(s)?s=l:this.state=u}if(s.inserted){let u,l=this.doValidate(t)!==!1;if(l&&r!=null){const f=this.state;if(this.overwrite===!0){u=r.state;for(let c=0;c<s.rawInserted.length;++c)r.unshift(this.displayValue.length-s.tailShift)}let i=this.appendTail(r);if(l=i.rawInserted.length===r.toString().length,!(l&&i.inserted)&&this.overwrite==="shift"){this.state=f,u=r.state;for(let c=0;c<s.rawInserted.length;++c)r.shift();i=this.appendTail(r),l=i.rawInserted.length===r.toString().length}l&&i.inserted&&(this.state=f)}l||(s=new K,this.state=n,r&&u&&(r.state=u))}return s}_appendPlaceholder(){return new K}_appendEager(){return new K}append(e,t,r){if(!be(e))throw new Error("value should be string");const n=be(r)?new pe(String(r)):r;t!=null&&t.tail&&(t._beforeTailState=this.state);let s;[e,s]=this.doPrepare(e,t);for(let u=0;u<e.length;++u){const l=this._appendChar(e[u],t,n);if(!l.rawInserted&&!this.doSkipInvalid(e[u],t,n))break;s.aggregate(l)}return(this.eager===!0||this.eager==="append")&&t!=null&&t.input&&e&&s.aggregate(this._appendEager()),n!=null&&(s.tailShift+=this.appendTail(n).tailShift),s}remove(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),this._value=this.displayValue.slice(0,e)+this.displayValue.slice(t),new K}withValueRefresh(e){if(this._refreshing||!this._initialized)return e();this._refreshing=!0;const t=this.rawInputValue,r=this.value,n=e();return this.rawInputValue=t,this.value&&this.value!==r&&r.indexOf(this.value)===0&&(this.append(r.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,n}runIsolated(e){if(this._isolated||!this._initialized)return e(this);this._isolated=!0;const t=this.state,r=e(this);return this.state=t,delete this._isolated,r}doSkipInvalid(e,t,r){return!!this.skipInvalid}doPrepare(e,t){return t===void 0&&(t={}),K.normalize(this.prepare?this.prepare(e,this,t):e)}doPrepareChar(e,t){return t===void 0&&(t={}),K.normalize(this.prepareChar?this.prepareChar(e,this,t):e)}doValidate(e){return(!this.validate||this.validate(this.value,this,e))&&(!this.parent||this.parent.doValidate(e))}doCommit(){this.commit&&this.commit(this.value,this)}splice(e,t,r,n,s){r===void 0&&(r=""),n===void 0&&(n=z.NONE),s===void 0&&(s={input:!0});const u=e+t,l=this.extractTail(u),f=this.eager===!0||this.eager==="remove";let i;f&&(n=en(n),i=this.extractInput(0,u,{raw:!0}));let c=e;const g=new K;if(n!==z.NONE&&(c=this.nearestInputPos(e,t>1&&e!==0&&!f?z.NONE:n),g.tailShift=c-e),g.aggregate(this.remove(c)),f&&n!==z.NONE&&i===this.rawInputValue)if(n===z.FORCE_LEFT){let d;for(;i===this.rawInputValue&&(d=this.displayValue.length);)g.aggregate(new K({tailShift:-1})).aggregate(this.remove(d-1))}else n===z.FORCE_RIGHT&&l.unshift();return g.aggregate(this.append(r,s,l))}maskEquals(e){return this.mask===e}optionsIsChanged(e){return!Ke(this,e)}typedValueEquals(e){const t=this.typedValue;return e===t||te.EMPTY_VALUES.includes(e)&&te.EMPTY_VALUES.includes(t)||(this.format?this.format(e,this)===this.format(this.typedValue,this):!1)}pad(e){return new K}}te.DEFAULTS={skipInvalid:!0};te.EMPTY_VALUES=[void 0,null,""];q.Masked=te;class we{constructor(e,t){e===void 0&&(e=[]),t===void 0&&(t=0),this.chunks=e,this.from=t}toString(){return this.chunks.map(String).join("")}extend(e){if(!String(e))return;e=be(e)?new pe(String(e)):e;const t=this.chunks[this.chunks.length-1],r=t&&(t.stop===e.stop||e.stop==null)&&e.from===t.from+t.toString().length;if(e instanceof pe)r?t.extend(e.toString()):this.chunks.push(e);else if(e instanceof we){if(e.stop==null){let n;for(;e.chunks.length&&e.chunks[0].stop==null;)n=e.chunks.shift(),n.from+=e.from,this.extend(n)}e.toString()&&(e.stop=e.blockIndex,this.chunks.push(e))}}appendTo(e){if(!(e instanceof q.MaskedPattern))return new pe(this.toString()).appendTo(e);const t=new K;for(let r=0;r<this.chunks.length;++r){const n=this.chunks[r],s=e._mapPosToBlock(e.displayValue.length),u=n.stop;let l;if(u!=null&&(!s||s.index<=u)&&((n instanceof we||e._stops.indexOf(u)>=0)&&t.aggregate(e._appendPlaceholder(u)),l=n instanceof we&&e._blocks[u]),l){const f=l.appendTail(n);t.aggregate(f);const i=n.toString().slice(f.rawInserted.length);i&&t.aggregate(e.append(i,{tail:!0}))}else t.aggregate(e.append(n.toString(),{tail:!0}))}return t}get state(){return{chunks:this.chunks.map(e=>e.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(e){const{chunks:t,...r}=e;Object.assign(this,r),this.chunks=t.map(n=>{const s="chunks"in n?new we:new pe;return s.state=n,s})}unshift(e){if(!this.chunks.length||e!=null&&this.from>=e)return"";const t=e!=null?e-this.from:e;let r=0;for(;r<this.chunks.length;){const n=this.chunks[r],s=n.unshift(t);if(n.toString()){if(!s)break;++r}else this.chunks.splice(r,1);if(s)return s}return""}shift(){if(!this.chunks.length)return"";let e=this.chunks.length-1;for(;0<=e;){const t=this.chunks[e],r=t.shift();if(t.toString()){if(!r)break;--e}else this.chunks.splice(e,1);if(r)return r}return""}}class sn{constructor(e,t){this.masked=e,this._log=[];const{offset:r,index:n}=e._mapPosToBlock(t)||(t<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=r,this.index=n,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(e){Object.assign(this,e)}pushState(){this._log.push(this.state)}popState(){const e=this._log.pop();return e&&(this.state=e),e}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(e){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((t=this.block)==null?void 0:t.displayValue.length)||0){var t;if(e())return this.ok=!0}return this.ok=!1}_pushRight(e){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(e())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,z.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,z.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,z.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,z.FORCE_RIGHT),this.offset!==this.block.value.length))return!0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,z.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,z.NONE),!0})}}class Q0{constructor(e){Object.assign(this,e),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(e,t){return e===void 0&&(e=0),t===void 0&&(t=this._value.length),this._value=this._value.slice(0,e)+this._value.slice(t),this._value||(this._isRawInput=!1),new K}nearestInputPos(e,t){t===void 0&&(t=z.NONE);const r=0,n=this._value.length;switch(t){case z.LEFT:case z.FORCE_LEFT:return r;case z.NONE:case z.RIGHT:case z.FORCE_RIGHT:default:return n}}totalInputPositions(e,t){return e===void 0&&(e=0),t===void 0&&(t=this._value.length),this._isRawInput?t-e:0}extractInput(e,t,r){return e===void 0&&(e=0),t===void 0&&(t=this._value.length),r===void 0&&(r={}),r.raw&&this._isRawInput&&this._value.slice(e,t)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(e,t){if(t===void 0&&(t={}),this.isFilled)return new K;const r=this.eager===!0||this.eager==="append",s=this.char===e&&(this.isUnmasking||t.input||t.raw)&&(!t.raw||!r)&&!t.tail,u=new K({inserted:this.char,rawInserted:s?this.char:""});return this._value=this.char,this._isRawInput=s&&(t.raw||t.input),u}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const e=new K;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return new pe("")}appendTail(e){return be(e)&&(e=new pe(String(e))),e.appendTo(this)}append(e,t,r){const n=this._appendChar(e[0],t);return r!=null&&(n.tailShift+=this.appendTail(r).tailShift),n}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value,this._isRawInput=!!e._rawInputValue}pad(e){return this._appendPlaceholder()}}class We{constructor(e){const{parent:t,isOptional:r,placeholderChar:n,displayChar:s,lazy:u,eager:l,...f}=e;this.masked=Ce(f),Object.assign(this,{parent:t,isOptional:r,placeholderChar:n,displayChar:s,lazy:u,eager:l})}reset(){this.isFilled=!1,this.masked.reset()}remove(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.value.length),e===0&&t>=1?(this.isFilled=!1,this.masked.remove(e,t)):new K}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return!!this.masked.value||this.isOptional}_appendChar(e,t){if(t===void 0&&(t={}),this.isFilled)return new K;const r=this.masked.state;let n=this.masked._appendChar(e,this.currentMaskFlags(t));return n.inserted&&this.doValidate(t)===!1&&(n=new K,this.masked.state=r),!n.inserted&&!this.isOptional&&!this.lazy&&!t.input&&(n.inserted=this.placeholderChar),n.skip=!n.inserted&&!this.isOptional,this.isFilled=!!n.inserted,n}append(e,t,r){return this.masked.append(e,this.currentMaskFlags(t),r)}_appendPlaceholder(){return this.isFilled||this.isOptional?new K:(this.isFilled=!0,new K({inserted:this.placeholderChar}))}_appendEager(){return new K}extractTail(e,t){return this.masked.extractTail(e,t)}appendTail(e){return this.masked.appendTail(e)}extractInput(e,t,r){return e===void 0&&(e=0),t===void 0&&(t=this.value.length),this.masked.extractInput(e,t,r)}nearestInputPos(e,t){t===void 0&&(t=z.NONE);const r=0,n=this.value.length,s=Math.min(Math.max(e,r),n);switch(t){case z.LEFT:case z.FORCE_LEFT:return this.isComplete?s:r;case z.RIGHT:case z.FORCE_RIGHT:return this.isComplete?s:n;case z.NONE:default:return s}}totalInputPositions(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.value.length),this.value.slice(e,t).length}doValidate(e){return this.masked.doValidate(this.currentMaskFlags(e))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(e)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(e){this.masked.state=e.masked,this.isFilled=e.isFilled}currentMaskFlags(e){var t;return{...e,_beforeTailState:(e==null||(t=e._beforeTailState)==null?void 0:t.masked)||(e==null?void 0:e._beforeTailState)}}pad(e){return new K}}We.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class on extends te{updateOptions(e){super.updateOptions(e)}_update(e){const t=e.mask;t&&(e.validate=r=>r.search(t)>=0),super._update(e)}}q.MaskedRegExp=on;class re extends te{constructor(e){super({...re.DEFAULTS,...e,definitions:Object.assign({},We.DEFAULT_DEFINITIONS,e==null?void 0:e.definitions)})}updateOptions(e){super.updateOptions(e)}_update(e){e.definitions=Object.assign({},this.definitions,e.definitions),super._update(e),this._rebuildMask()}_rebuildMask(){const e=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const t=this.mask;if(!t||!e)return;let r=!1,n=!1;for(let s=0;s<t.length;++s){if(this.blocks){const i=t.slice(s),c=Object.keys(this.blocks).filter(d=>i.indexOf(d)===0);c.sort((d,m)=>m.length-d.length);const g=c[0];if(g){const{expose:d,repeat:m,...x}=$e(this.blocks[g]),C={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...x,repeat:m,parent:this},p=m!=null?new q.RepeatBlock(C):Ce(C);p&&(this._blocks.push(p),d&&(this.exposeBlock=p),this._maskedBlocks[g]||(this._maskedBlocks[g]=[]),this._maskedBlocks[g].push(this._blocks.length-1)),s+=g.length-1;continue}}let u=t[s],l=u in e;if(u===re.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(u==="{"||u==="}"){r=!r;continue}if(u==="["||u==="]"){n=!n;continue}if(u===re.ESCAPE_CHAR){if(++s,u=t[s],!u)break;l=!1}const f=l?new We({isOptional:n,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...$e(e[u]),parent:this}):new Q0({char:u,eager:this.eager,isUnmasking:r});this._blocks.push(f)}}get state(){return{...super.state,_blocks:this._blocks.map(e=>e.state)}}set state(e){if(!e){this.reset();return}const{_blocks:t,...r}=e;this._blocks.forEach((n,s)=>n.state=t[s]),super.state=r}reset(){super.reset(),this._blocks.forEach(e=>e.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(e=>e.isComplete)}get isFilled(){return this._blocks.every(e=>e.isFilled)}get isFixed(){return this._blocks.every(e=>e.isFixed)}get isOptional(){return this._blocks.every(e=>e.isOptional)}doCommit(){this._blocks.forEach(e=>e.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((e,t)=>e+=t.unmaskedValue,"")}set unmaskedValue(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=e,this.appendTail(t),this.doCommit()}else super.unmaskedValue=e}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((e,t)=>e+=t.value,"")}set value(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=e,this.appendTail(t),this.doCommit()}else super.value=e}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=e,this.appendTail(t),this.doCommit()}else super.typedValue=e}get displayValue(){return this._blocks.reduce((e,t)=>e+=t.displayValue,"")}appendTail(e){return super.appendTail(e).aggregate(this._appendPlaceholder())}_appendEager(){var e;const t=new K;let r=(e=this._mapPosToBlock(this.displayValue.length))==null?void 0:e.index;if(r==null)return t;this._blocks[r].isFilled&&++r;for(let n=r;n<this._blocks.length;++n){const s=this._blocks[n]._appendEager();if(!s.inserted)break;t.aggregate(s)}return t}_appendCharRaw(e,t){t===void 0&&(t={});const r=this._mapPosToBlock(this.displayValue.length),n=new K;if(!r)return n;for(let u=r.index,l;l=this._blocks[u];++u){var s;const f=l._appendChar(e,{...t,_beforeTailState:(s=t._beforeTailState)==null||(s=s._blocks)==null?void 0:s[u]});if(n.aggregate(f),f.consumed)break}return n}extractTail(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);const r=new we;return e===t||this._forEachBlocksInRange(e,t,(n,s,u,l)=>{const f=n.extractTail(u,l);f.stop=this._findStopBefore(s),f.from=this._blockStartPos(s),f instanceof we&&(f.blockIndex=s),r.extend(f)}),r}extractInput(e,t,r){if(e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),r===void 0&&(r={}),e===t)return"";let n="";return this._forEachBlocksInRange(e,t,(s,u,l,f)=>{n+=s.extractInput(l,f,r)}),n}_findStopBefore(e){let t;for(let r=0;r<this._stops.length;++r){const n=this._stops[r];if(n<=e)t=n;else break}return t}_appendPlaceholder(e){const t=new K;if(this.lazy&&e==null)return t;const r=this._mapPosToBlock(this.displayValue.length);if(!r)return t;const n=r.index,s=e??this._blocks.length;return this._blocks.slice(n,s).forEach(u=>{if(!u.lazy||e!=null){var l;t.aggregate(u._appendPlaceholder((l=u._blocks)==null?void 0:l.length))}}),t}_mapPosToBlock(e){let t="";for(let r=0;r<this._blocks.length;++r){const n=this._blocks[r],s=t.length;if(t+=n.displayValue,e<=t.length)return{index:r,offset:e-s}}}_blockStartPos(e){return this._blocks.slice(0,e).reduce((t,r)=>t+=r.displayValue.length,0)}_forEachBlocksInRange(e,t,r){t===void 0&&(t=this.displayValue.length);const n=this._mapPosToBlock(e);if(n){const s=this._mapPosToBlock(t),u=s&&n.index===s.index,l=n.offset,f=s&&u?s.offset:this._blocks[n.index].displayValue.length;if(r(this._blocks[n.index],n.index,l,f),s&&!u){for(let i=n.index+1;i<s.index;++i)r(this._blocks[i],i,0,this._blocks[i].displayValue.length);r(this._blocks[s.index],s.index,0,s.offset)}}}remove(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);const r=super.remove(e,t);return this._forEachBlocksInRange(e,t,(n,s,u,l)=>{r.aggregate(n.remove(u,l))}),r}nearestInputPos(e,t){if(t===void 0&&(t=z.NONE),!this._blocks.length)return 0;const r=new sn(this,e);if(t===z.NONE)return r.pushRightBeforeInput()||(r.popState(),r.pushLeftBeforeInput())?r.pos:this.displayValue.length;if(t===z.LEFT||t===z.FORCE_LEFT){if(t===z.LEFT){if(r.pushRightBeforeFilled(),r.ok&&r.pos===e)return e;r.popState()}if(r.pushLeftBeforeInput(),r.pushLeftBeforeRequired(),r.pushLeftBeforeFilled(),t===z.LEFT){if(r.pushRightBeforeInput(),r.pushRightBeforeRequired(),r.ok&&r.pos<=e||(r.popState(),r.ok&&r.pos<=e))return r.pos;r.popState()}return r.ok?r.pos:t===z.FORCE_LEFT?0:(r.popState(),r.ok||(r.popState(),r.ok)?r.pos:0)}return t===z.RIGHT||t===z.FORCE_RIGHT?(r.pushRightBeforeInput(),r.pushRightBeforeRequired(),r.pushRightBeforeFilled()?r.pos:t===z.FORCE_RIGHT?this.displayValue.length:(r.popState(),r.ok||(r.popState(),r.ok)?r.pos:this.nearestInputPos(e,z.LEFT))):e}totalInputPositions(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);let r=0;return this._forEachBlocksInRange(e,t,(n,s,u,l)=>{r+=n.totalInputPositions(u,l)}),r}maskedBlock(e){return this.maskedBlocks(e)[0]}maskedBlocks(e){const t=this._maskedBlocks[e];return t?t.map(r=>this._blocks[r]):[]}pad(e){const t=new K;return this._forEachBlocksInRange(0,this.displayValue.length,r=>t.aggregate(r.pad(e))),t}}re.DEFAULTS={...te.DEFAULTS,lazy:!0,placeholderChar:"_"};re.STOP_CHAR="`";re.ESCAPE_CHAR="\\";re.InputDefinition=We;re.FixedDefinition=Q0;q.MaskedPattern=re;class qe extends re{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{to:t=this.to||0,from:r=this.from||0,maxLength:n=this.maxLength||0,autofix:s=this.autofix,...u}=e;this.to=t,this.from=r,this.maxLength=Math.max(String(t).length,n),this.autofix=s;const l=String(this.from).padStart(this.maxLength,"0"),f=String(this.to).padStart(this.maxLength,"0");let i=0;for(;i<f.length&&f[i]===l[i];)++i;u.mask=f.slice(0,i).replace(/0/g,"\\0")+"0".repeat(this.maxLength-i),super._update(u)}get isComplete(){return super.isComplete&&!!this.value}boundaries(e){let t="",r="";const[,n,s]=e.match(/^(\D*)(\d*)(\D*)/)||[];return s&&(t="0".repeat(n.length)+s,r="9".repeat(n.length)+s),t=t.padEnd(this.maxLength,"0"),r=r.padEnd(this.maxLength,"9"),[t,r]}doPrepareChar(e,t){t===void 0&&(t={});let r;return[e,r]=super.doPrepareChar(e.replace(/\D/g,""),t),e||(r.skip=!this.isComplete),[e,r]}_appendCharRaw(e,t){if(t===void 0&&(t={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(e,t);const r=String(this.from).padStart(this.maxLength,"0"),n=String(this.to).padStart(this.maxLength,"0"),[s,u]=this.boundaries(this.value+e);return Number(u)<this.from?super._appendCharRaw(r[this.value.length],t):Number(s)>this.to?!t.tail&&this.autofix==="pad"&&this.value.length+1<this.maxLength?super._appendCharRaw(r[this.value.length],t).aggregate(this._appendCharRaw(e,t)):super._appendCharRaw(n[this.value.length],t):super._appendCharRaw(e,t)}doValidate(e){const t=this.value;if(t.search(/[^0]/)===-1&&t.length<=this._matchFrom)return!0;const[n,s]=this.boundaries(t);return this.from<=Number(s)&&Number(n)<=this.to&&super.doValidate(e)}pad(e){const t=new K;if(this.value.length===this.maxLength)return t;const r=this.value,n=this.maxLength-this.value.length;if(n){this.reset();for(let s=0;s<n;++s)t.aggregate(super._appendCharRaw("0",e));r.split("").forEach(s=>this._appendCharRaw(s))}return t}}q.MaskedRange=qe;const ln="d{.}`m{.}`Y";class me extends re{static extractPatternOptions(e){const{mask:t,pattern:r,...n}=e;return{...n,mask:be(t)?t:r}}constructor(e){super(me.extractPatternOptions({...me.DEFAULTS,...e}))}updateOptions(e){super.updateOptions(e)}_update(e){const{mask:t,pattern:r,blocks:n,...s}={...me.DEFAULTS,...e},u=Object.assign({},me.GET_DEFAULT_BLOCKS());e.min&&(u.Y.from=e.min.getFullYear()),e.max&&(u.Y.to=e.max.getFullYear()),e.min&&e.max&&u.Y.from===u.Y.to&&(u.m.from=e.min.getMonth()+1,u.m.to=e.max.getMonth()+1,u.m.from===u.m.to&&(u.d.from=e.min.getDate(),u.d.to=e.max.getDate())),Object.assign(u,this.blocks,n),super._update({...s,mask:be(t)?t:r,blocks:u})}doValidate(e){const t=this.date;return super.doValidate(e)&&(!this.isComplete||this.isDateExist(this.value)&&t!=null&&(this.min==null||this.min<=t)&&(this.max==null||t<=this.max))}isDateExist(e){return this.format(this.parse(e,this),this).indexOf(e)>=0}get date(){return this.typedValue}set date(e){this.typedValue=e}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(e){super.typedValue=e}maskEquals(e){return e===Date||super.maskEquals(e)}optionsIsChanged(e){return super.optionsIsChanged(me.extractPatternOptions(e))}}me.GET_DEFAULT_BLOCKS=()=>({d:{mask:qe,from:1,to:31,maxLength:2},m:{mask:qe,from:1,to:12,maxLength:2},Y:{mask:qe,from:1900,to:9999}});me.DEFAULTS={...re.DEFAULTS,mask:Date,pattern:ln,format:(o,e)=>{if(!o)return"";const t=String(o.getDate()).padStart(2,"0"),r=String(o.getMonth()+1).padStart(2,"0"),n=o.getFullYear();return[t,r,n].join(".")},parse:(o,e)=>{const[t,r,n]=o.split(".").map(Number);return new Date(n,r-1,t)}};q.MaskedDate=me;class Qe extends te{constructor(e){super({...Qe.DEFAULTS,...e}),this.currentMask=void 0}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),"mask"in e&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(e.mask)?e.mask.map(t=>{const{expose:r,...n}=$e(t),s=Ce({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...n});return r&&(this.exposeMask=s),s}):[])}_appendCharRaw(e,t){t===void 0&&(t={});const r=this._applyDispatch(e,t);return this.currentMask&&r.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(t))),r}_applyDispatch(e,t,r){e===void 0&&(e=""),t===void 0&&(t={}),r===void 0&&(r="");const n=t.tail&&t._beforeTailState!=null?t._beforeTailState._value:this.value,s=this.rawInputValue,u=t.tail&&t._beforeTailState!=null?t._beforeTailState._rawInputValue:s,l=s.slice(u.length),f=this.currentMask,i=new K,c=f==null?void 0:f.state;return this.currentMask=this.doDispatch(e,{...t},r),this.currentMask&&(this.currentMask!==f?(this.currentMask.reset(),u&&(this.currentMask.append(u,{raw:!0}),i.tailShift=this.currentMask.value.length-n.length),l&&(i.tailShift+=this.currentMask.append(l,{raw:!0,tail:!0}).tailShift)):c&&(this.currentMask.state=c)),i}_appendPlaceholder(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendPlaceholder()),e}_appendEager(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendEager()),e}appendTail(e){const t=new K;return e&&t.aggregate(this._applyDispatch("",{},e)),t.aggregate(this.currentMask?this.currentMask.appendTail(e):super.appendTail(e))}currentMaskFlags(e){var t,r;return{...e,_beforeTailState:((t=e._beforeTailState)==null?void 0:t.currentMaskRef)===this.currentMask&&((r=e._beforeTailState)==null?void 0:r.currentMask)||e._beforeTailState}}doDispatch(e,t,r){return t===void 0&&(t={}),r===void 0&&(r=""),this.dispatch(e,this,t,r)}doValidate(e){return super.doValidate(e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))}doPrepare(e,t){t===void 0&&(t={});let[r,n]=super.doPrepare(e,t);if(this.currentMask){let s;[r,s]=super.doPrepare(r,this.currentMaskFlags(t)),n=n.aggregate(s)}return[r,n]}doPrepareChar(e,t){t===void 0&&(t={});let[r,n]=super.doPrepareChar(e,t);if(this.currentMask){let s;[r,s]=super.doPrepareChar(r,this.currentMaskFlags(t)),n=n.aggregate(s)}return[r,n]}reset(){var e;(e=this.currentMask)==null||e.reset(),this.compiledMasks.forEach(t=>t.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(e){this.exposeMask?(this.exposeMask.value=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=e}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(e){this.exposeMask?(this.exposeMask.unmaskedValue=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=e}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(e){if(this.exposeMask){this.exposeMask.typedValue=e,this.currentMask=this.exposeMask,this._applyDispatch();return}let t=String(e);this.currentMask&&(this.currentMask.typedValue=e,t=this.currentMask.unmaskedValue),this.unmaskedValue=t}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var e;return!!((e=this.currentMask)!=null&&e.isComplete)}get isFilled(){var e;return!!((e=this.currentMask)!=null&&e.isFilled)}remove(e,t){const r=new K;return this.currentMask&&r.aggregate(this.currentMask.remove(e,t)).aggregate(this._applyDispatch()),r}get state(){var e;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(t=>t.state),currentMaskRef:this.currentMask,currentMask:(e=this.currentMask)==null?void 0:e.state}}set state(e){const{compiledMasks:t,currentMaskRef:r,currentMask:n,...s}=e;t&&this.compiledMasks.forEach((u,l)=>u.state=t[l]),r!=null&&(this.currentMask=r,this.currentMask.state=n),super.state=s}extractInput(e,t,r){return this.currentMask?this.currentMask.extractInput(e,t,r):""}extractTail(e,t){return this.currentMask?this.currentMask.extractTail(e,t):super.extractTail(e,t)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(e,t){return this.currentMask?this.currentMask.nearestInputPos(e,t):super.nearestInputPos(e,t)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(e){this._overwrite=e}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(e){this._eager=e}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(e){this._skipInvalid=e}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(e){this._autofix=e}maskEquals(e){return Array.isArray(e)?this.compiledMasks.every((t,r)=>{if(!e[r])return;const{mask:n,...s}=e[r];return Ke(t,s)&&t.maskEquals(n)}):super.maskEquals(e)}typedValueEquals(e){var t;return!!((t=this.currentMask)!=null&&t.typedValueEquals(e))}}Qe.DEFAULTS={...te.DEFAULTS,dispatch:(o,e,t,r)=>{if(!e.compiledMasks.length)return;const n=e.rawInputValue,s=e.compiledMasks.map((u,l)=>{const f=e.currentMask===u,i=f?u.displayValue.length:u.nearestInputPos(u.displayValue.length,z.FORCE_LEFT);return u.rawInputValue!==n?(u.reset(),u.append(n,{raw:!0})):f||u.remove(i),u.append(o,e.currentMaskFlags(t)),u.appendTail(r),{index:l,weight:u.rawInputValue.length,totalInputPositions:u.totalInputPositions(0,Math.max(i,u.nearestInputPos(u.displayValue.length,z.FORCE_LEFT)))}});return s.sort((u,l)=>l.weight-u.weight||l.totalInputPositions-u.totalInputPositions),e.compiledMasks[s[0].index]}};q.MaskedDynamic=Qe;class Je extends re{constructor(e){super({...Je.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){const{enum:t,...r}=e;if(t){const n=t.map(l=>l.length),s=Math.min(...n),u=Math.max(...n)-s;r.mask="*".repeat(s),u&&(r.mask+="["+"*".repeat(u)+"]"),this.enum=t}super._update(r)}_appendCharRaw(e,t){t===void 0&&(t={});const r=Math.min(this.nearestInputPos(0,z.FORCE_RIGHT),this.value.length),n=this.enum.filter(s=>this.matchValue(s,this.unmaskedValue+e,r));if(n.length){n.length===1&&this._forEachBlocksInRange(0,this.value.length,(u,l)=>{const f=n[0][l];l>=this.value.length||f===u.value||(u.reset(),u._appendChar(f,t))});const s=super._appendCharRaw(n[0][this.value.length],t);return n.length===1&&n[0].slice(this.unmaskedValue.length).split("").forEach(u=>s.aggregate(super._appendCharRaw(u))),s}return new K({skip:!this.isComplete})}extractTail(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),new pe("",e)}remove(e,t){if(e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),e===t)return new K;const r=Math.min(super.nearestInputPos(0,z.FORCE_RIGHT),this.value.length);let n;for(n=e;n>=0&&!(this.enum.filter(l=>this.matchValue(l,this.value.slice(r,n),r)).length>1);--n);const s=super.remove(n,t);return s.tailShift+=n-e,s}get isComplete(){return this.enum.indexOf(this.value)>=0}}Je.DEFAULTS={...re.DEFAULTS,matchValue:(o,e,t)=>o.indexOf(e,t)===t};q.MaskedEnum=Je;class un extends te{updateOptions(e){super.updateOptions(e)}_update(e){super._update({...e,validate:e.mask})}}q.MaskedFunction=un;var J0;class ie extends te{constructor(e){super({...ie.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){const e="^"+(this.allowNegative?"[+|\\-]?":""),t="\\d*",r=(this.scale?"("+Mt(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(e+t+r),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(Mt).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(Mt(this.thousandsSeparator),"g")}_removeThousandsSeparators(e){return e.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(e){const t=e.split(this.radix);return t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),t.join(this.radix)}doPrepareChar(e,t){t===void 0&&(t={});const[r,n]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(t.input&&t.raw||!t.input&&!t.raw)?e.replace(this._mapToRadixRegExp,this.radix):e),t);return e&&!r&&(n.skip=!0),r&&!this.allowPositive&&!this.value&&r!=="-"&&n.aggregate(this._appendChar("-")),[r,n]}_separatorsCount(e,t){t===void 0&&(t=!1);let r=0;for(let n=0;n<e;++n)this._value.indexOf(this.thousandsSeparator,n)===n&&(++r,t&&(e+=this.thousandsSeparator.length));return r}_separatorsCountFromSlice(e){return e===void 0&&(e=this._value),this._separatorsCount(this._removeThousandsSeparators(e).length,!0)}extractInput(e,t,r){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t),this._removeThousandsSeparators(super.extractInput(e,t,r))}_appendCharRaw(e,t){t===void 0&&(t={});const r=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,n=this._separatorsCountFromSlice(r);this._value=this._removeThousandsSeparators(this.value);const s=this._value;this._value+=e;const u=this.number;let l=!isNaN(u),f=!1;if(l){let d;this.min!=null&&this.min<0&&this.number<this.min&&(d=this.min),this.max!=null&&this.max>0&&this.number>this.max&&(d=this.max),d!=null&&(this.autofix?(this._value=this.format(d,this).replace(ie.UNMASKED_RADIX,this.radix),f||(f=s===this._value&&!t.tail)):l=!1),l&&(l=!!this._value.match(this._numberRegExp))}let i;l?i=new K({inserted:this._value.slice(s.length),rawInserted:f?"":e,skip:f}):(this._value=s,i=new K),this._value=this._insertThousandsSeparators(this._value);const c=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,g=this._separatorsCountFromSlice(c);return i.tailShift+=(g-n)*this.thousandsSeparator.length,i}_findSeparatorAround(e){if(this.thousandsSeparator){const t=e-this.thousandsSeparator.length+1,r=this.value.indexOf(this.thousandsSeparator,t);if(r<=e)return r}return-1}_adjustRangeWithSeparators(e,t){const r=this._findSeparatorAround(e);r>=0&&(e=r);const n=this._findSeparatorAround(t);return n>=0&&(t=n+this.thousandsSeparator.length),[e,t]}remove(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t);const r=this.value.slice(0,e),n=this.value.slice(t),s=this._separatorsCount(r.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(r+n));const u=this._separatorsCountFromSlice(r);return new K({tailShift:(u-s)*this.thousandsSeparator.length})}nearestInputPos(e,t){if(!this.thousandsSeparator)return e;switch(t){case z.NONE:case z.LEFT:case z.FORCE_LEFT:{const r=this._findSeparatorAround(e-1);if(r>=0){const n=r+this.thousandsSeparator.length;if(e<n||this.value.length<=n||t===z.FORCE_LEFT)return r}break}case z.RIGHT:case z.FORCE_RIGHT:{const r=this._findSeparatorAround(e);if(r>=0)return r+this.thousandsSeparator.length}}return e}doCommit(){if(this.value){const e=this.number;let t=e;this.min!=null&&(t=Math.max(t,this.min)),this.max!=null&&(t=Math.min(t,this.max)),t!==e&&(this.unmaskedValue=this.format(t,this));let r=this.value;this.normalizeZeros&&(r=this._normalizeZeros(r)),this.padFractionalZeros&&this.scale>0&&(r=this._padFractionalZeros(r)),this._value=r}super.doCommit()}_normalizeZeros(e){const t=this._removeThousandsSeparators(e).split(this.radix);return t[0]=t[0].replace(/^(\D*)(0*)(\d*)/,(r,n,s,u)=>n+u),e.length&&!/\d$/.test(t[0])&&(t[0]=t[0]+"0"),t.length>1&&(t[1]=t[1].replace(/0*$/,""),t[1].length||(t.length=1)),this._insertThousandsSeparators(t.join(this.radix))}_padFractionalZeros(e){if(!e)return e;const t=e.split(this.radix);return t.length<2&&t.push(""),t[1]=t[1].padEnd(this.scale,"0"),t.join(this.radix)}doSkipInvalid(e,t,r){t===void 0&&(t={});const n=this.scale===0&&e!==this.thousandsSeparator&&(e===this.radix||e===ie.UNMASKED_RADIX||this.mapToRadix.includes(e));return super.doSkipInvalid(e,t,r)&&!n}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,ie.UNMASKED_RADIX)}set unmaskedValue(e){super.unmaskedValue=e}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(e){this.rawInputValue=this.format(e,this).replace(ie.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(e){this.typedValue=e}get allowNegative(){return this.min!=null&&this.min<0||this.max!=null&&this.max<0}get allowPositive(){return this.min!=null&&this.min>0||this.max!=null&&this.max>0}typedValueEquals(e){return(super.typedValueEquals(e)||ie.EMPTY_VALUES.includes(e)&&ie.EMPTY_VALUES.includes(this.typedValue))&&!(e===0&&this.value==="")}}J0=ie;ie.UNMASKED_RADIX=".";ie.EMPTY_VALUES=[...te.EMPTY_VALUES,0];ie.DEFAULTS={...te.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[J0.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:o=>o.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})};q.MaskedNumber=ie;const Ot={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function er(o,e,t){e===void 0&&(e=Ot.MASKED),t===void 0&&(t=Ot.MASKED);const r=Ce(o);return n=>r.runIsolated(s=>(s[e]=n,s[t]))}function cn(o,e,t,r){return er(e,t,r)(o)}q.PIPE_TYPE=Ot;q.createPipe=er;q.pipe=cn;class dn extends re{get repeatFrom(){var e;return(e=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)!=null?e:0}get repeatTo(){var e;return(e=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)!=null?e:1/0}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){var t,r,n;const{repeat:s,...u}=$e(e);this._blockOpts=Object.assign({},this._blockOpts,u);const l=Ce(this._blockOpts);this.repeat=(t=(r=s??l.repeat)!=null?r:this.repeat)!=null?t:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&((n=this._blocks)==null?void 0:n.length)||0,this.repeatFrom)),blocks:{m:l},eager:l.eager,overwrite:l.overwrite,skipInvalid:l.skipInvalid,lazy:l.lazy,placeholderChar:l.placeholderChar,displayChar:l.displayChar})}_allocateBlock(e){if(e<this._blocks.length)return this._blocks[e];if(this.repeatTo===1/0||this._blocks.length<this.repeatTo)return this._blocks.push(Ce(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]}_appendCharRaw(e,t){t===void 0&&(t={});const r=new K;for(let f=(n=(s=this._mapPosToBlock(this.displayValue.length))==null?void 0:s.index)!=null?n:Math.max(this._blocks.length-1,0),i,c;i=(u=this._blocks[f])!=null?u:c=!c&&this._allocateBlock(f);++f){var n,s,u,l;const g=i._appendChar(e,{...t,_beforeTailState:(l=t._beforeTailState)==null||(l=l._blocks)==null?void 0:l[f]});if(g.skip&&c){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(r.aggregate(g),g.consumed)break}return r}_trimEmptyTail(e,t){var r,n;e===void 0&&(e=0);const s=Math.max(((r=this._mapPosToBlock(e))==null?void 0:r.index)||0,this.repeatFrom,0);let u;t!=null&&(u=(n=this._mapPosToBlock(t))==null?void 0:n.index),u==null&&(u=this._blocks.length-1);let l=0;for(let f=u;s<=f&&!this._blocks[f].unmaskedValue;--f,++l);l&&(this._blocks.splice(u-l+1,l),this.mask=this.mask.slice(l))}reset(){super.reset(),this._trimEmptyTail()}remove(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);const r=super.remove(e,t);return this._trimEmptyTail(e,t),r}totalInputPositions(e,t){return e===void 0&&(e=0),t==null&&this.repeatTo===1/0?1/0:super.totalInputPositions(e,t)}get state(){return super.state}set state(e){this._blocks.length=e._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=e}}q.RepeatBlock=dn;try{globalThis.IMask=q}catch{}const xn={key:0,class:"mb-0 text-body-2xs font-normal text-heading-text"},hn={key:0,class:"text-orange-required"},fn=["type","value","disabled","mask","placeholder","inputmode"],pn={key:1,class:"animate-spin h-4 w-4 border-2 border-current border-t-transparent rounded-full"},vn={key:1,class:"text-body-3xs text-light-copy"},mn={key:2,class:"text-body-3xs text-red-500"},ue=a.defineComponent({__name:"input",props:{label:{default:""},type:{default:"text"},placeholder:{default:void 0},validationError:{default:""},hint:{default:""},mask:{default:""},rules:{default:()=>[]},isAmountInput:{type:Boolean,default:!1},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},showCopyIcon:{type:Boolean,default:!1},preventPaste:{type:Boolean,default:!1},modelValue:{default:void 0},defaultValue:{default:""},className:{default:""}},emits:["update:modelValue","blur","copied"],setup(o,{emit:e}){const t=o,r=e,n=a.computed(()=>t.modelValue!==void 0),s=a.ref(t.modelValue??t.defaultValue??""),u=a.ref(""),l=a.ref(""),f=a.ref(null);let i=null;a.watch(()=>t.modelValue,h=>{n.value&&(s.value=h??"",i&&i.value!==(h??"")&&(i.value=h??""))});const c=a.computed(()=>t.isAmountInput?Se(s.value.replace(/,/g,"")):s.value);function g(h){const b=h.target.value.replace(/,/g,"");n.value||(s.value=b),r("update:modelValue",b),a.nextTick(()=>{const A=f.value;if(A){const w=A.value.length;A.setSelectionRange(w,w)}})}function d(){r("blur",s.value)}function m(h){t.rules.includes("numeric")&&Cr(h)}function x(h){t.preventPaste&&(h.preventDefault(),u.value="",l.value="Pasting is disabled for this input")}const C=a.computed(()=>t.disabled?"bg-grey-50 cursor-not-allowed":"bg-white"),p=a.computed(()=>t.validationError||l.value?"border-red-300 bg-red-50":"border-grey-100");function E(h){return navigator.clipboard.writeText(h)}function v(){E(s.value).then(()=>{l.value="",u.value="Text copied to clipboard",r("copied")}).catch(()=>{u.value="",l.value="Failed to copy text to clipboard"})}return a.onMounted(()=>{if(!f.value)return;const h=t.mask?{mask:t.mask}:void 0;h&&(i=q(f.value,h),s.value&&(i.value=s.value),i.on("accept",()=>{const _=(i==null?void 0:i.value)??"";n.value||(s.value=_),r("update:modelValue",_),a.nextTick(()=>{const b=f.value;if(b){const A=b.value.length;b.setSelectionRange(A,A)}})}))}),a.onBeforeUnmount(()=>{i==null||i.destroy(),i=null}),(h,_)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["flex flex-col gap-2",h.className])},[h.label?(a.openBlock(),a.createElementBlock("p",xn,[a.createTextVNode(a.toDisplayString(h.label)+" ",1),h.required?(a.openBlock(),a.createElementBlock("span",hn," *")):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0),a.createElementVNode("div",{class:a.normalizeClass(["border-c px-3 py-2 flex items-center justify-between rounded-md h-12",C.value,p.value])},[a.renderSlot(h.$slots,"prefix"),a.createElementVNode("input",{ref_key:"inputEl",ref:f,type:h.type,value:c.value,disabled:h.disabled,mask:h.mask,placeholder:h.placeholder??(h.label?`Enter ${h.label.toLowerCase()}`:void 0),inputmode:h.isAmountInput?"decimal":void 0,class:"search-input bg-transparent outline-none border-none focus:outline-none focus:ring-0 text-body-2xs text-light-copy font-normal w-full",onInput:g,onBlur:d,onKeydown:m,onPaste:x},null,40,fn),h.loading?(a.openBlock(),a.createElementBlock("div",pn)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.renderSlot(h.$slots,"suffix"),h.showCopyIcon&&s.value.trim()!==""?(a.openBlock(),a.createBlock(Ae,{key:0,src:"assets/images/copyIcon.svg",alt:"copy",width:16,height:16,customClass:"cursor-pointer hover:opacity-70 transition-opacity",onClick:v})):a.createCommentVNode("",!0)],64))],2),h.hint||u.value?(a.openBlock(),a.createElementBlock("p",vn,a.toDisplayString(u.value||h.hint),1)):a.createCommentVNode("",!0),h.validationError||l.value?(a.openBlock(),a.createElementBlock("p",mn,a.toDisplayString(l.value||h.validationError),1)):a.createCommentVNode("",!0)],2))}}),Cn=["width","height"],gn={opacity:"0.6"},Bn=["fill"],_n=a.defineComponent({__name:"icon-chevron-down",props:{width:{default:24},height:{default:24},color:{default:"currentColor"}},setup(o){const e=o,t=a.useAttrs(),{width:r,height:n,color:s}=e;return(u,l)=>(a.openBlock(),a.createElementBlock("svg",a.mergeProps({width:a.unref(r),height:a.unref(n),viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.unref(t)),[a.createElementVNode("g",gn,[a.createElementVNode("path",{d:"M16.5813 7.83128L10.3313 14.0813C10.2434 14.1691 10.1242 14.2184 10 14.2184C9.87581 14.2184 9.75667 14.1691 9.66878 14.0813L3.41878 7.83128C3.33598 7.74242 3.2909 7.62489 3.29304 7.50345C3.29518 7.38201 3.34438 7.26615 3.43026 7.18026C3.51615 7.09438 3.63201 7.04518 3.75345 7.04304C3.87489 7.0409 3.99242 7.08598 4.08128 7.16878L10 13.0867L15.9188 7.16878C16.0076 7.08598 16.1252 7.0409 16.2466 7.04304C16.368 7.04518 16.4839 7.09438 16.5698 7.18026C16.6557 7.26615 16.7049 7.38201 16.707 7.50345C16.7092 7.62489 16.6641 7.74242 16.5813 7.83128Z",fill:a.unref(s)},null,8,Bn)])],16,Cn))}}),En=["width","height"],yn={opacity:"0.7"},kn=["fill"],An=a.defineComponent({__name:"icon-chevron-up",props:{width:{default:24},height:{default:24},color:{default:"currentColor"}},setup(o){const e=o,t=a.useAttrs(),{width:r,height:n,color:s}=e;return(u,l)=>(a.openBlock(),a.createElementBlock("svg",a.mergeProps({width:a.unref(r),height:a.unref(n),viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.unref(t)),[a.createElementVNode("g",yn,[a.createElementVNode("path",{d:"M2.73508 9.73495L7.73508 4.73495C7.80539 4.66473 7.9007 4.62528 8.00008 4.62528C8.09945 4.62528 8.19476 4.66473 8.26508 4.73495L13.2651 9.73495C13.3313 9.80604 13.3674 9.90006 13.3657 9.99722C13.364 10.0944 13.3246 10.1871 13.2559 10.2558C13.1872 10.3245 13.0945 10.3638 12.9973 10.3655C12.9002 10.3673 12.8062 10.3312 12.7351 10.265L8.00008 5.53058L3.26508 10.265C3.19399 10.3312 3.09997 10.3673 3.00282 10.3655C2.90566 10.3638 2.81297 10.3245 2.74427 10.2558C2.67556 10.1871 2.6362 10.0944 2.63449 9.99722C2.63277 9.90006 2.66884 9.80604 2.73508 9.73495Z",fill:a.unref(s)},null,8,kn)])],16,En))}}),bn={class:"mb-0 text-body-3xs font-medium text-orange-500"},Fn=a.defineComponent({__name:"hint",props:{hint:{}},setup(o){return(e,t)=>(a.openBlock(),a.createElementBlock("p",bn,a.toDisplayString(e.hint),1))}}),Dn={key:0,class:"mb-0 text-body-2xs font-normal text-heading-text"},wn={key:0,class:"text-orange-required"},Sn=["aria-expanded","aria-controls","aria-disabled","aria-activedescendant"],Vn={class:"flex items-center gap-2"},Nn={class:"flex items-center gap-2"},Rn={key:0,class:"inline-block h-4 w-4 border-2 border-current border-t-transparent rounded-full animate-spin"},In=["aria-label"],Tn={key:0,class:"px-4 pt-2 pb-1"},Mn=["placeholder"],Pn=["onClick","id","aria-selected"],On={class:"mb-0 text-body-2xs font-medium"},Ge=a.defineComponent({__name:"select",props:{options:{default:()=>[]},modelValue:{default:void 0},defaultValue:{default:void 0},className:{default:""},placeholder:{default:"Select an option"},hasSearch:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},validationError:{default:""},label:{default:""},hint:{default:""},required:{type:Boolean,default:!1},itemImageType:{default:null}},emits:["update:modelValue","change"],setup(o,{emit:e}){const t=o,r=e,n=a.ref(!1),s=a.ref(t.defaultValue??t.modelValue??""),u=a.ref([...t.options]),l=a.ref(-1),f=a.ref(null),i=a.ref(null),c=a.ref(null),g=a.computed(()=>t.modelValue!==void 0);a.watch(()=>t.modelValue,D=>{g.value&&(s.value=D??"")}),a.watch(()=>t.options,D=>{u.value=[...D]},{immediate:!0});const d=a.computed(()=>{const D=g.value?t.modelValue:s.value;return t.options.find(R=>R.value===D)??null}),m=a.computed(()=>{var D;return((D=d.value)==null?void 0:D.label)||t.placeholder||(t.label?`Select ${t.label}`:"Select an option")});function x(){if(t.disabled||n.value)return;u.value=[...t.options];const D=d.value?Math.max(0,t.options.findIndex(R=>R.value===d.value.value)):0;l.value=D,n.value=!0,a.nextTick(()=>{t.hasSearch&&c.value&&(c.value.focus(),c.value.select())})}function C(){n.value&&(n.value=!1,l.value=-1)}function p(){t.disabled||(n.value?C():x())}function E(D){if(!n.value)return;const R=D.target,I=f.value,N=i.value;I&&!I.contains(R)&&N&&!N.contains(R)&&C()}a.watch(n,D=>{D?document.addEventListener("mousedown",E):document.removeEventListener("mousedown",E)}),a.onBeforeUnmount(()=>document.removeEventListener("mousedown",E));function v(D){g.value||(s.value=D),r("update:modelValue",D),r("change",D),C()}function h(D){const R=D.target.value.toLowerCase(),I=t.options.filter(N=>N.label.toLowerCase().includes(R));u.value=I,l.value=I.length?0:-1}function _(D){if(!t.disabled)switch(D.key){case"Enter":case" ":case"Spacebar":case"ArrowDown":D.preventDefault(),n.value?A(1):x();break;case"ArrowUp":D.preventDefault(),n.value?A(-1):x();break;case"Escape":n.value&&(D.preventDefault(),C());break}}function b(D){switch(D.key){case"ArrowDown":D.preventDefault(),A(1);break;case"ArrowUp":D.preventDefault(),A(-1);break;case"Home":D.preventDefault(),l.value=u.value.length?0:-1,w(0);break;case"End":D.preventDefault(),l.value=u.value.length-1,w(u.value.length-1);break;case"Enter":if(D.preventDefault(),l.value>=0){const R=u.value[l.value];R&&v(R.value)}break;case"Escape":D.preventDefault(),C();break;case"Tab":C();break}}function A(D){if(!u.value.length)return;const R=u.value.length-1,I=l.value<0?0:Math.min(R,Math.max(0,l.value+D));l.value=I,w(I)}function w(D){var N;const R=i.value;if(!R)return;const I=R.querySelectorAll("[data-option]");D>=0&&D<I.length&&((N=I[D])==null||N.scrollIntoView({block:"nearest"}))}const V=a.computed(()=>t.disabled?"bg-grey-100 cursor-not-allowed":"bg-white"),T=a.computed(()=>t.validationError?"border-red-300":"border-grey-100 bg-white"),{options:k,placeholder:S,hasSearch:F,disabled:B,loading:y,validationError:M,label:$,hint:L,required:H,itemImageType:P,className:O}=a.toRefs(t);return(D,R)=>{var I;return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["flex flex-col gap-2 relative",a.unref(O)])},[a.unref($)?(a.openBlock(),a.createElementBlock("p",Dn,[a.createTextVNode(a.toDisplayString(a.unref($))+" ",1),a.unref(H)?(a.openBlock(),a.createElementBlock("span",wn," *")):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0),a.createElementVNode("div",{ref_key:"triggerRef",ref:f,class:a.normalizeClass(["border-c rounded-md flex items-center justify-between h-12 cursor-pointer px-3 py-2",V.value,T.value]),role:"combobox","aria-haspopup":"listbox","aria-expanded":n.value,"aria-controls":n.value?"select-menu":void 0,"aria-disabled":a.unref(B)||void 0,"aria-activedescendant":n.value&&l.value>=0?`option-${l.value}`:void 0,tabindex:"0",onClick:p,onKeydown:_},[a.createElementVNode("div",Vn,[a.renderSlot(D.$slots,"prefix"),a.createElementVNode("div",Nn,[d.value&&a.unref(P)==="country"&&d.value.countryCode?(a.openBlock(),a.createBlock(Ae,{key:0,src:`https://flagcdn.com/w40/${d.value.countryCode.toLowerCase()}.png`,alt:d.value.countryCode,width:28,customClass:"rounded-lg"},null,8,["src","alt"])):a.createCommentVNode("",!0),a.createElementVNode("p",{class:a.normalizeClass(["text-body-2xs font-normal mb-0",(I=d.value)!=null&&I.label?"text-sub-copy":"text-grey-500"])},a.toDisplayString(m.value),3)])]),a.unref(y)?(a.openBlock(),a.createElementBlock("span",Rn)):n.value?(a.openBlock(),a.createBlock(An,{key:1,color:"#8FAECA"})):(a.openBlock(),a.createBlock(_n,{key:2,color:"#8FAECA"}))],42,Sn),n.value?(a.openBlock(),a.createElementBlock("div",{key:1,ref_key:"menuRef",ref:i,id:"select-menu",class:"border-c bg-white rounded-md border-grey-border text-body-xs font-normal text-input-grey w-full mt-2 max-h-22rem overflow-y-auto",role:"listbox","aria-label":a.unref($)||"Options",style:{position:"absolute",top:"100%",zIndex:10},onKeydown:b},[a.unref(F)?(a.openBlock(),a.createElementBlock("div",Tn,[a.createElementVNode("input",{ref_key:"searchRef",ref:c,type:"text",placeholder:`Search ${a.unref($)||"options"}`,class:"bg-transparent outline-none border-b pb-2 w-full focus:outline-none focus:ring-0 text-body-2xs text-light-copy font-normal",onInput:h},null,40,Mn)])):a.createCommentVNode("",!0),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(u.value,(N,X)=>{var Z;return a.openBlock(),a.createElementBlock("div",{key:N.value,onClick:Q=>v(N.value),id:`option-${X}`,"data-option":"",role:"option","aria-selected":((Z=d.value)==null?void 0:Z.value)===N.value,class:a.normalizeClass(["px-4 py-3 first:pt-0 hover:bg-gray-100 flex items-center gap-2 cursor-pointer",X===l.value?"bg-gray-100":""])},[a.unref(P)==="country"&&N.countryCode?(a.openBlock(),a.createBlock(Ae,{key:0,src:`https://flagcdn.com/w40/${N.countryCode.toLowerCase()}.png`,alt:N.countryCode,width:28,customClass:"rounded-lg"},null,8,["src","alt"])):a.createCommentVNode("",!0),a.createElementVNode("p",On,a.toDisplayString(N.label),1)],10,Pn)}),128))],40,In)):a.createCommentVNode("",!0),a.unref(L)?(a.openBlock(),a.createBlock(Fn,{key:2,hint:a.unref(L)},null,8,["hint"])):a.createCommentVNode("",!0),a.unref(M)?(a.openBlock(),a.createBlock(U0,{key:3,errorMessage:a.unref(M)},null,8,["errorMessage"])):a.createCommentVNode("",!0)],2)}}}),Hn={class:"flex flex-col gap-6"},$n={key:0,class:"grid grid-cols-2 gap-6 overflow-y-auto"},Ln={class:"col-span-2"},zn={class:"col-span-2"},Un={key:1,class:"grid grid-cols-2 gap-6 overflow-y-auto",style:{maxHeight:"320px"}},qn={class:"col-span-2"},jn={class:"col-span-2"},Kn=a.defineComponent({__name:"pay-by-card",props:{secretKey:{},paymentObject:{},environment:{},onPaymentAuthorized:{type:Function}},setup(o){const e=o,t=e.environment??"sandbox",r=a.ref(0),n=a.ref(""),s=a.ref(!1),u=a.ref(!1),l=a.ref(""),f=a.ref(""),i=a.ref(!1),c=a.ref(!1),g=a.ref([]),d=a.ref([]),m=a.ref([]),x=a.reactive({address1:"",address2:"",postalCode:"",state:"",city:"",country:"",emailAddress:"",phoneNumber:""}),C=a.reactive({customerName:"",cardNo:"",expireDate:"",cvv:"",cardPin:""}),p=a.reactive({}),E=a.reactive({}),v=a.reactive({address1:"required",address2:"",country:"required",state:"required",city:"required",postalCode:"required|no_special|char_length:6",emailAddress:"required|email",phoneNumber:"required"}),h=a.reactive({customerName:"required",cardNo:"required|num_spaces",expireDate:"required",cvv:"required|numeric",cardPin:""}),_={address1:"Address Line 1",address2:"Address Line 2",postalCode:"Postal Code",state:"State",city:"City",country:"Country",emailAddress:"Email",phoneNumber:"Phone Number"},b={customerName:"Card Name",cardNo:"Card Number",expireDate:"Expiry Date",cvv:"CVV",cardPin:"Card PIN"},A=a.computed(()=>Se(e.paymentObject.amount,e.paymentObject.currency));async function w(){var F,B,y,M,$,L,H,P,O,D,R,I,N,X,Z,Q,j,Be,ve,Ie,_e,ae,ee,De,Ee;if(r.value===0){const he=je(x,v,_);Object.assign(p,he),Object.keys(he).length===0&&(r.value=1);return}if(r.value===1){const he=je(C,h,b);if(Object.assign(E,he),Object.keys(he).length>0)return;try{s.value=!0,n.value="";const Y={pan:C.cardNo??"",expiryDate:C.expireDate??"",cvv:C.cvv??"",cardScheme:l.value,nameOnCard:C.customerName??"",...l.value==="Verve"?{pin:C.cardPin??""}:{}},oe={address1:x.address1??"",address2:x.address2??"",postalCode:x.postalCode??"",state:x.state??"",city:x.city??"",country:x.country??"",emailAddress:x.emailAddress??"",phoneNumber:x.phoneNumber??""},de=Za(e.secretKey,Y),ne={...{customerId:((F=e.paymentObject)==null?void 0:F.email)||C.customerName||"",amount:String(((B=e.paymentObject)==null?void 0:B.amount)??""),currency:((y=e.paymentObject)==null?void 0:y.currency)||"USD",narration:((M=e.paymentObject)==null?void 0:M.narration)||"Test transaction",encryptedCardDetails:de.requestParam,billingDetails:oe,redirectUrl:(($=e.paymentObject)==null?void 0:$.redirectUrl)||"",paymentReference:f.value,isCheckout:!0},merchantId:e.secretKey};let U=await jr(t,ne);if(U!=null&&U.responseParam&&(U=P0(t,U.responseParam)),U!=null&&U.isSuccessful){if(U.threeDsInteractionRequired===!0){const ye={transactionReference:U.transactionReference,threeDsHtml:U.threeDsHtml,amount:U.amount,responseMessage:U.responseMessage,paReq:(L=U.threeDsHtml)==null?void 0:L.paReq,termUrl:(H=U.threeDsHtml)==null?void 0:H.termUrl,action:(P=U.threeDsHtml)==null?void 0:P.action,acsUrl:(O=U.threeDsHtml)==null?void 0:O.acsUrl,md:(D=U.threeDsHtml)==null?void 0:D.md},Te=btoa(JSON.stringify(ye)),fe=`https://sandbox-merchant.buzapay.com/account/three-ds-confirm?threeDsData=${encodeURIComponent(Te)}&paymentReference=${U.transactionReference}`;window.open(fe,"_self","noopener,noreferrer"),n.value="3D Secure authentication opened in new tab. Please complete the verification",s.value=!1;return}if(U.responseMessage==="Payer Interaction Required"&&U.threeDsHtml){const ye={transactionReference:U.transactionReference,threeDsHtml:U.threeDsHtml,amount:U.amount,responseMessage:U.responseMessage,paReq:(R=U.threeDsHtml)==null?void 0:R.paReq,termUrl:(I=U.threeDsHtml)==null?void 0:I.termUrl,action:(N=U.threeDsHtml)==null?void 0:N.action,acsUrl:(X=U.threeDsHtml)==null?void 0:X.acsUrl,md:(Z=U.threeDsHtml)==null?void 0:Z.md},Te=btoa(JSON.stringify(ye)),fe=`https://sandbox-merchant.buzapay.com/account/three-ds-confirm?threeDsData=${encodeURIComponent(Te)}&paymentReference=${U.transactionReference}`;window.open(fe,"_self","noopener,noreferrer"),n.value="3D Secure authentication opened in new tab. Please complete the verification",s.value=!1;return}(Q=U.transactionReference)!=null&&Q.trim()&&((Be=e.onPaymentAuthorized)==null||Be.call(e,{paymentId:U.transactionReference,paymentDate:(j=U==null?void 0:U.data)==null?void 0:j.updatedAt,paymentStatus:"Authorized"})),n.value="Card payment authorized successfully",s.value=!1;return}n.value=(U==null?void 0:U.responseMessage)||"Payment failed",(Ie=e.onPaymentAuthorized)==null||Ie.call(e,{paymentId:U==null?void 0:U.transactionReference,paymentDate:(ve=U==null?void 0:U.data)==null?void 0:ve.updatedAt,paymentStatus:"Payment failed"}),s.value=!1}catch(Y){let oe="Payment failed";if((_e=Y==null?void 0:Y.error)!=null&&_e.responseParam)try{const de=P0(t,Y.error.responseParam);oe=(de==null?void 0:de.responseMessage)||oe}catch{oe=((ae=Y==null?void 0:Y.error)==null?void 0:ae.responseMessage)||((ee=Y==null?void 0:Y.error)==null?void 0:ee.message)||oe}else oe=((De=Y==null?void 0:Y.error)==null?void 0:De.responseMessage)||((Ee=Y==null?void 0:Y.error)==null?void 0:Ee.message)||"Payment failed";n.value=oe,s.value=!1}}}async function V(){if(!e.secretKey){n.value="Secret key is required.";return}if(!ze(e.paymentObject)){n.value="Kindly ensure you are passing all the required data.";return}u.value=!0,n.value="";try{const F=await Ue(e.paymentObject,t,e.secretKey);if(F!=null&&F.isSuccessful&&F.launchUrl){const B=Ht(F.launchUrl);f.value=B.paymentReference,n.value="Payment link created successfully"}else n.value="Failed to create payment link"}catch(F){n.value=(F==null?void 0:F.message)||"Failed to create payment link"}finally{u.value=!1}}async function T(){i.value=!0;try{const F=await Xa(t,e.secretKey);F!=null&&F.isSuccessful&&(g.value=F.data,d.value=(F.data??[]).map(B=>({label:B.countryName,value:B.iso2})))}catch(F){n.value=(F==null?void 0:F.message)||"Failed to get countries"}finally{i.value=!1}}async function k(F){const B=g.value.find(y=>y.iso2===F);if(B){c.value=!0;try{const y=await Ya(B.iso3,t,e.secretKey);y!=null&&y.isSuccessful&&(m.value=(y.data??[]).map(M=>({label:M.name,value:M.name})))}catch(y){n.value=(y==null?void 0:y.message)||"Failed to get country states"}finally{c.value=!1}}}function S(F){l.value=Mr(F),h.cardPin=l.value==="Verve"?"required|numeric":""}return a.onMounted(async()=>{await V(),await T()}),(F,B)=>(a.openBlock(),a.createElementBlock("div",Hn,[r.value===0?(a.openBlock(),a.createElementBlock("div",$n,[a.createElementVNode("div",Ln,[a.createVNode(ue,{label:"Address Line 1",required:"",modelValue:x.address1,"onUpdate:modelValue":[B[0]||(B[0]=y=>x.address1=y),B[1]||(B[1]=y=>{x.address1=y,p.address1&&(p.address1="")})],"validation-error":p.address1??""},null,8,["modelValue","validation-error"])]),a.createElementVNode("div",zn,[a.createVNode(ue,{label:"Address Line 2",modelValue:x.address2,"onUpdate:modelValue":[B[2]||(B[2]=y=>x.address2=y),B[3]||(B[3]=y=>x.address2=y)],"validation-error":p.address2??""},null,8,["modelValue","validation-error"])]),a.createVNode(Ge,{label:"Select Country",required:"",options:d.value,loading:i.value,modelValue:x.country,"onUpdate:modelValue":[B[4]||(B[4]=y=>x.country=y),B[5]||(B[5]=async y=>{x.country=y,x.state="",await k(y),p.country&&(p.country="")})],"validation-error":p.country??""},null,8,["options","loading","modelValue","validation-error"]),a.createVNode(Ge,{label:"Select State",required:"",options:m.value,loading:c.value,modelValue:x.state,"onUpdate:modelValue":[B[6]||(B[6]=y=>x.state=y),B[7]||(B[7]=y=>{x.state=y,p.state&&(p.state="")})],"validation-error":p.state??""},null,8,["options","loading","modelValue","validation-error"]),a.createVNode(ue,{label:"City",required:"",modelValue:x.city,"onUpdate:modelValue":[B[8]||(B[8]=y=>x.city=y),B[9]||(B[9]=y=>{x.city=y,p.city&&(p.city="")})],"validation-error":p.city??""},null,8,["modelValue","validation-error"]),a.createVNode(ue,{label:"Postal Code",required:"",modelValue:x.postalCode,"onUpdate:modelValue":[B[10]||(B[10]=y=>x.postalCode=y),B[11]||(B[11]=y=>{x.postalCode=y,p.postalCode&&(p.postalCode="")})],"validation-error":p.postalCode??""},null,8,["modelValue","validation-error"]),a.createVNode(ue,{label:"Email",required:"",modelValue:x.emailAddress,"onUpdate:modelValue":[B[12]||(B[12]=y=>x.emailAddress=y),B[13]||(B[13]=y=>{x.emailAddress=y,p.emailAddress&&(p.emailAddress="")})],"validation-error":p.emailAddress??""},null,8,["modelValue","validation-error"]),a.createVNode(ue,{label:"Phone Number",required:"",modelValue:x.phoneNumber,"onUpdate:modelValue":[B[14]||(B[14]=y=>x.phoneNumber=y),B[15]||(B[15]=y=>{x.phoneNumber=y,p.phoneNumber&&(p.phoneNumber="")})],"validation-error":p.phoneNumber??""},null,8,["modelValue","validation-error"])])):a.createCommentVNode("",!0),r.value===1?(a.openBlock(),a.createElementBlock("div",Un,[a.createElementVNode("div",qn,[a.createVNode(ue,{label:"Card Name",required:"",modelValue:C.customerName,"onUpdate:modelValue":[B[16]||(B[16]=y=>C.customerName=y),B[17]||(B[17]=y=>{C.customerName=y,E.customerName&&(E.customerName="")})],"validation-error":E.customerName??""},null,8,["modelValue","validation-error"])]),a.createElementVNode("div",jn,[a.createVNode(ue,{label:"Card Number",required:"",rules:["numeric"],mask:"0000 0000 0000 0000",placeholder:"0000 0000 0000 0000","prevent-paste":!0,modelValue:C.cardNo,"onUpdate:modelValue":[B[18]||(B[18]=y=>C.cardNo=y),B[19]||(B[19]=y=>{C.cardNo=y,E.cardNo&&(E.cardNo=""),S(y)})],"validation-error":E.cardNo??""},null,8,["modelValue","validation-error"])]),a.createVNode(ue,{label:"Expiry Date",required:"",modelValue:C.expireDate,"onUpdate:modelValue":[B[20]||(B[20]=y=>C.expireDate=y),B[21]||(B[21]=y=>{C.expireDate=y,E.expireDate&&(E.expireDate="")})],mask:"00/00",placeholder:"00/00","validation-error":E.expireDate??""},null,8,["modelValue","validation-error"]),a.createVNode(ue,{label:"CVV",required:"",rules:["numeric"],modelValue:C.cvv,"onUpdate:modelValue":[B[22]||(B[22]=y=>C.cvv=y),B[23]||(B[23]=y=>{C.cvv=y,E.cvv&&(E.cvv="")})],mask:"000",placeholder:"000","validation-error":E.cvv??""},null,8,["modelValue","validation-error"]),l.value==="Verve"?(a.openBlock(),a.createBlock(ue,{key:0,label:"Card Pin",required:"",rules:["numeric"],modelValue:C.cardPin,"onUpdate:modelValue":[B[24]||(B[24]=y=>C.cardPin=y),B[25]||(B[25]=y=>{C.cardPin=y,E.cardPin&&(E.cardPin="")})],mask:"0000",placeholder:"0000","validation-error":E.cardPin??""},null,8,["modelValue","validation-error"])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0),a.createVNode(Ve,{label:r.value===0?"Proceed":`Pay ${A.value}`,type:"primary",customClass:"w-full",loading:s.value,onClick:w,disabled:s.value},null,8,["label","loading","disabled"])]))}}),Wn=["width","height"],Gn=["fill"],Zn=["fill"],Xn=["fill"],Yn=a.defineComponent({__name:"icon-copy-success",props:{width:{default:16},height:{default:17},color:{default:"currentColor"}},setup(o){const e=o,t=a.useAttrs(),{width:r,height:n,color:s}=e;return(u,l)=>(a.openBlock(),a.createElementBlock("svg",a.mergeProps({width:a.unref(r),height:a.unref(n),viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.unref(t)),[a.createElementVNode("path",{d:"M11.4002 1.6875H8.60016C5.9935 1.6875 4.8335 2.8475 4.8335 5.45417V6.1875C4.8335 6.46083 5.06016 6.6875 5.3335 6.6875H7.40016C9.46683 6.6875 10.1668 7.3875 10.1668 9.45417V11.5208C10.1668 11.7942 10.3935 12.0208 10.6668 12.0208H11.4002C14.0068 12.0208 15.1668 10.8608 15.1668 8.25417V5.45417C15.1668 2.8475 14.0068 1.6875 11.4002 1.6875ZM5.8335 5.6875V5.45417C5.8335 3.3875 6.5335 2.6875 8.60016 2.6875H11.4002C13.4668 2.6875 14.1668 3.3875 14.1668 5.45417V8.25417C14.1668 10.3208 13.4668 11.0208 11.4002 11.0208H11.1668V9.45417C11.1668 6.8475 10.0068 5.6875 7.40016 5.6875H5.8335Z",fill:a.unref(s)},null,8,Gn),a.createElementVNode("path",{d:"M7.40016 5.6875H4.60016C1.9935 5.6875 0.833496 6.8475 0.833496 9.45417V12.2542C0.833496 14.8608 1.9935 16.0208 4.60016 16.0208H7.40016C10.0068 16.0208 11.1668 14.8608 11.1668 12.2542V9.45417C11.1668 6.8475 10.0068 5.6875 7.40016 5.6875ZM4.60016 15.0208C2.5335 15.0208 1.8335 14.3208 1.8335 12.2542V9.45417C1.8335 7.3875 2.5335 6.6875 4.60016 6.6875H7.40016C9.46683 6.6875 10.1668 7.3875 10.1668 9.45417V12.2542C10.1668 14.3208 9.46683 15.0208 7.40016 15.0208H4.60016Z",fill:a.unref(s)},null,8,Zn),a.createElementVNode("path",{d:"M5.35302 12.6542C5.22635 12.6542 5.09969 12.6075 4.99969 12.5075L3.69969 11.2075C3.50635 11.0142 3.50635 10.6942 3.69969 10.5008C3.89302 10.3075 4.21302 10.3075 4.40635 10.5008L5.35302 11.4475L7.59302 9.2075C7.78635 9.01417 8.10635 9.01417 8.29969 9.2075C8.49302 9.40083 8.49302 9.72083 8.29969 9.91417L5.69969 12.5075C5.60635 12.6008 5.47969 12.6542 5.35302 12.6542Z",fill:a.unref(s)},null,8,Xn)],16,Wn))}}),Le=a.defineComponent({__name:"copy",props:{copyText:{},color:{}},setup(o){const e=o;function t(n){return navigator.clipboard.writeText(n)}function r(){t(e.copyText).then(()=>{}).catch(n=>{console.error("Copy failed:",n)})}return(n,s)=>(a.openBlock(),a.createBlock(Yn,{class:"cursor-pointer",color:n.color,onClick:r},null,8,["color"]))}}),Qn={class:"flex items-center gap-1"},Jn={key:1,class:"flex items-center justify-between"},es={class:"flex items-center gap-1"},He=a.defineComponent({__name:"label-info",props:{type:{default:"vertical"},label:{default:""},labelCustomClass:{default:"text-body-4xs font-medium text-light-copy"},valueImageSrc:{default:""},valueImageCustomClass:{default:""},valueImagePosition:{default:"prefix"},hasValueCopy:{type:Boolean,default:!1},value:{default:""},valueCustomClass:{default:"text-body-2xs font-medium text-sub-copy"},alignRight:{type:Boolean,default:!1}},setup(o){const e=o,t=a.computed(()=>(e.label??"").toUpperCase()),r=a.computed(()=>!!e.valueImageSrc&&e.valueImagePosition==="prefix"),n=a.computed(()=>!!e.valueImageSrc&&e.valueImagePosition==="suffix"),s=a.computed(()=>mr(e.value,40)),{type:u,labelCustomClass:l,valueImageSrc:f,valueImageCustomClass:i,hasValueCopy:c,value:g,valueCustomClass:d,alignRight:m}=e;return(x,C)=>a.unref(u)==="vertical"?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["flex flex-col gap-1",a.unref(m)?"text-right items-end":""])},[a.createElementVNode("p",{class:a.normalizeClass(a.unref(l))},a.toDisplayString(t.value),3),a.createElementVNode("div",Qn,[r.value?(a.openBlock(),a.createBlock(Ae,{key:0,src:a.unref(f),alt:a.unref(g),width:22,customClass:a.unref(i)},null,8,["src","alt","customClass"])):a.createCommentVNode("",!0),a.unref(c)?(a.openBlock(),a.createElementBlock("p",{key:2,class:a.normalizeClass([a.unref(d),"truncate"])},a.toDisplayString(s.value),3)):(a.openBlock(),a.createElementBlock("p",{key:1,class:a.normalizeClass(a.unref(d))},a.toDisplayString(a.unref(g)),3)),a.unref(c)?(a.openBlock(),a.createBlock(Le,{key:3,copyText:a.unref(g),color:"#9DBFDE"},null,8,["copyText"])):a.createCommentVNode("",!0),n.value?(a.openBlock(),a.createBlock(Ae,{key:4,src:a.unref(f),alt:a.unref(g),width:22,customClass:a.unref(i)},null,8,["src","alt","customClass"])):a.createCommentVNode("",!0)])],2)):(a.openBlock(),a.createElementBlock("div",Jn,[a.createElementVNode("p",{class:a.normalizeClass(a.unref(l))},a.toDisplayString(t.value),3),a.createElementVNode("div",es,[r.value?(a.openBlock(),a.createBlock(Ae,{key:0,src:a.unref(f),alt:a.unref(g),width:22,customClass:a.unref(i)},null,8,["src","alt","customClass"])):a.createCommentVNode("",!0),a.createElementVNode("p",{class:a.normalizeClass(a.unref(d))},a.toDisplayString(a.unref(g)),3),a.unref(c)?(a.openBlock(),a.createBlock(Le,{key:1,copyText:a.unref(g),color:"#9DBFDE"},null,8,["copyText"])):a.createCommentVNode("",!0),n.value?(a.openBlock(),a.createBlock(Ae,{key:2,src:a.unref(f),alt:a.unref(g),width:22,customClass:a.unref(i)},null,8,["src","alt","customClass"])):a.createCommentVNode("",!0)])]))}}),ts={class:"flex flex-col gap-10"},rs={key:0,class:"flex flex-col gap-10"},as={key:1,class:"flex flex-col gap-10"},ns={class:"bg-[#EFF7FF] p-4 rounded-lg flex flex-col gap-6"},ss={class:"flex items-center justify-between"},is={class:"flex items-center justify-between"},os={class:"w-2/3 mx-auto text-center text-body-2xs font-medium text-sub-copy"},ls={class:"text-orange-500"},us={class:"flex flex-col gap-4"},cs=a.defineComponent({__name:"pay-by-transfer",props:{secretKey:{},paymentObject:{},environment:{},onPaymentAuthorized:{type:Function},onCancel:{type:Function}},setup(o){const e=o,t=e.environment??"sandbox",r=a.ref(0),n=a.ref(!1),s=a.ref(!1),u=a.ref(!1),l=a.ref(""),f=a.ref(""),i=a.ref(!1),c=a.ref(null),g=a.ref(null),d=a.ref(!1),m=a.ref(!1),x=a.ref(""),C=a.ref(60),p=a.ref("00:00"),E=a.ref(null),v=a.reactive({customerName:""}),h=a.reactive({}),_={customerName:"required"},b={customerName:"Customer Name"},A=a.computed(()=>Se(e.paymentObject.amount,e.paymentObject.currency));async function w(){var F,B,y;if(r.value===0){const M=je(v,_,b);if(Object.assign(h,M),Object.keys(M).length===0){const $={paymentReference:l.value,channel:"virtual_account",customerName:v.customerName??"",merchantId:e.secretKey};n.value=!0;try{const L=await Kr(t,$);if(L!=null&&L.isSuccessful){const H=((F=L.data)==null?void 0:F.data)??L.data??null;g.value=H,S(),x.value="Virtual account generated successfully for payment.",n.value=!0,r.value=1}else n.value=!1,x.value=(L==null?void 0:L.responseMessage)||"Failed to generate account"}catch(L){n.value=!1,x.value=((B=L==null?void 0:L.error)==null?void 0:B.responseMessage)||((y=L==null?void 0:L.error)==null?void 0:y.message)||"Error"}}return}}async function V(){var F,B,y,M,$,L,H;i.value=!0;try{const P=await q0(t,l.value);if(P!=null&&P.isSuccessful){const O=((F=P.data)==null?void 0:F.data)??P.data??null;c.value=O;const D=(O==null?void 0:O.paymentStatus)==="Payment Received"||(O==null?void 0:O.paymentStatus)==="Received";d.value=D,(O==null?void 0:O.finalTransactionStatus)==null||(O==null?void 0:O.paymentStatus)==null?(s.value&&(x.value="Transaction not confirmed !!"),!u.value&&!D?(f.value="pending",(B=e.onPaymentAuthorized)==null||B.call(e,{paymentId:l.value,paymentDate:O==null?void 0:O.updatedAt,paymentStatus:"pending"})):(f.value="confirmed",(y=e.onPaymentAuthorized)==null||y.call(e,{paymentId:l.value,paymentDate:O==null?void 0:O.updatedAt,paymentStatus:"confirmed"}))):((O==null?void 0:O.finalTransactionStatus)==="Success"||(O==null?void 0:O.paymentStatus)==="Received"||(O==null?void 0:O.paymentStatus)==="Payment Received")&&(f.value="confirmed",u.value=!0,x.value="Transaction confirmed !!",(M=e.onPaymentAuthorized)==null||M.call(e,{paymentId:l.value,paymentDate:O==null?void 0:O.updatedAt,paymentStatus:"confirmed"}))}else!(P!=null&&P.isSuccessful)&&(P==null?void 0:P.responseCode)==="119"&&(f.value="used",x.value=(P==null?void 0:P.responseMessage)||"",($=e.onPaymentAuthorized)==null||$.call(e,{paymentId:l.value,paymentDate:null,paymentStatus:"used"}))}catch(P){f.value="",x.value=((L=P==null?void 0:P.error)==null?void 0:L.responseMessage)||((H=P==null?void 0:P.error)==null?void 0:H.message)||"Something went wrong"}finally{i.value=!1}}async function T(){if(!e.secretKey){x.value="Secret key is required.";return}if(!ze(e.paymentObject)){x.value="Kindly ensure you are passing all the required data.";return}m.value=!0,x.value="";try{const F=await Ue(e.paymentObject,t,e.secretKey);if(F!=null&&F.isSuccessful&&F.launchUrl){const B=Ht(F.launchUrl);l.value=B.paymentReference,x.value="Payment link created successfully"}else x.value="Failed to create payment link"}catch(F){x.value=(F==null?void 0:F.message)||"Failed to create payment link"}finally{m.value=!1}}function k(F){const B=String(Math.floor(F/60)).padStart(2,"0"),y=String(F%60).padStart(2,"0");p.value=`${B}:${y}`}function S(){E.value&&(clearInterval(E.value),E.value=null),k(C.value),E.value=window.setInterval(()=>{const F=C.value-1;if(F<0){E.value&&(clearInterval(E.value),E.value=null),p.value="00:00",C.value=0;return}C.value=F,k(F)},1e3)}return a.onMounted(async()=>{await T()}),(F,B)=>{var y,M,$,L;return a.openBlock(),a.createElementBlock("div",ts,[r.value===0?(a.openBlock(),a.createElementBlock("div",rs,[a.createVNode(ue,{label:"Customer Name",required:"",modelValue:v.customerName,"onUpdate:modelValue":[B[0]||(B[0]=H=>v.customerName=H),B[1]||(B[1]=H=>{v.customerName=H,v.customerName&&(h.customerName="")})],validationError:h.customerName??""},null,8,["modelValue","validationError"]),a.createVNode(Ve,{label:`Pay ${A.value}`,type:"primary",customClass:"w-full",loading:n.value,onClick:w},null,8,["label","loading"])])):r.value===1?(a.openBlock(),a.createElementBlock("div",as,[a.createElementVNode("div",ns,[a.createVNode(He,{label:"Bank Name",value:`${((y=g.value)==null?void 0:y.bank)??""} ${((M=g.value)==null?void 0:M.accountName)??""}`},null,8,["value"]),a.createElementVNode("div",ss,[a.createVNode(He,{label:"Account Number",value:($=g.value)==null?void 0:$.accountNumber},null,8,["value"]),a.createVNode(Le,{color:"#9DBFDE",copyText:((L=g.value)==null?void 0:L.accountNumber)??""},null,8,["copyText"])]),a.createElementVNode("div",is,[a.createVNode(He,{label:"Amount",value:A.value},null,8,["value"]),a.createVNode(Le,{color:"#9DBFDE",copyText:A.value},null,8,["copyText"])])]),a.createElementVNode("p",os,[B[3]||(B[3]=a.createTextVNode(" This account is for this transaction only and expires in ",-1)),a.createElementVNode("span",ls,a.toDisplayString(C.value>=0?p.value:"00:00"),1)]),a.createElementVNode("div",us,[a.createVNode(Ve,{label:"I have paid the money",type:"primary",customClass:"w-full",loading:i.value,onClick:V},null,8,["loading"]),a.createElementVNode("button",{type:"button",onClick:B[2]||(B[2]=H=>{var P;return(P=F.onCancel)==null?void 0:P.call(F)}),class:"text-heading-text text-body-2xs font-medium text-center py-2 cursor-pointer"}," Cancel Payment ")])])):a.createCommentVNode("",!0)])}}}),ds=["width","height"],xs={"clip-path":"url(#clip0_10908_387048)"},hs=["fill"],fs={id:"clip0_10908_387048"},ps=["fill"],vs=a.defineComponent({__name:"icon-usdc",props:{width:{default:28},height:{default:28},color:{default:"currentColor"}},setup(o){const e=o,t=a.useAttrs(),{width:r,height:n,color:s}=e;return(u,l)=>(a.openBlock(),a.createElementBlock("svg",a.mergeProps({width:a.unref(r),height:a.unref(n),viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.unref(t)),[a.createElementVNode("g",xs,[a.createElementVNode("path",{d:"M14 0C21.7324 0 28 6.26763 28 14C28 21.7324 21.7324 28 14 28C6.26763 28 0 21.7324 0 14C0 6.26763 6.26763 0 14 0ZM16.933 4.865C16.7195 4.76 16.506 4.865 16.4535 5.07762C16.4001 5.131 16.4001 5.18438 16.4001 5.29025V6.034L16.4089 6.125C16.4546 6.30501 16.5652 6.46177 16.7195 6.56512C20.8792 8.05262 23.0125 12.6726 21.4655 16.7615C20.6657 18.9928 18.9061 20.6911 16.7195 21.4883C16.506 21.5941 16.4001 21.7534 16.4001 22.0194V22.7631L16.4045 22.8401C16.4128 22.9241 16.4479 23.0033 16.5047 23.0658C16.5614 23.1284 16.6367 23.171 16.7195 23.1875C16.7729 23.1875 16.8796 23.1875 16.933 23.135C18.1331 22.7602 19.2473 22.1517 20.2113 21.3446C21.1753 20.5375 21.9701 19.5476 22.5499 18.432C23.1298 17.3164 23.4833 16.0972 23.59 14.8444C23.6967 13.5917 23.5546 12.3302 23.1718 11.1326C22.2128 8.10512 19.866 5.8205 16.933 4.865ZM11.2805 4.8125C11.2271 4.8125 11.1204 4.8125 11.067 4.865C9.86688 5.23978 8.75274 5.84826 7.78874 6.6554C6.82475 7.46254 6.02993 8.4524 5.45006 9.56797C4.87019 10.6836 4.51673 11.9028 4.41001 13.1556C4.30329 14.4083 4.44543 15.6698 4.82825 16.8674C5.78725 19.8424 8.08062 22.1261 11.067 23.0816C11.2805 23.1875 11.494 23.0816 11.5465 22.869C11.5999 22.8165 11.5999 22.7622 11.5999 22.6564V21.9126L11.5911 21.8426C11.5544 21.6947 11.417 21.5259 11.2805 21.4349C7.12075 19.9474 4.9875 15.3274 6.5345 11.2385C7.33425 9.00725 9.09388 7.30887 11.2805 6.51175C11.494 6.40587 11.5999 6.24663 11.5999 5.98063V5.23688L11.5955 5.15987C11.5872 5.07585 11.5521 4.99673 11.4954 4.93418C11.4386 4.87163 11.3633 4.82898 11.2805 4.8125ZM14.3736 7.574H13.573L13.496 7.581C13.321 7.616 13.1933 7.7665 13.146 7.99925V9.22075L12.9649 9.24875C11.4704 9.51475 10.5341 10.5464 10.5341 11.823C10.5341 13.5748 11.5999 14.2651 13.8399 14.5311C15.3335 14.7963 15.813 15.1156 15.813 15.9653C15.813 16.814 15.0666 17.3985 14.0534 17.3985C12.6665 17.3985 12.187 16.8149 12.0269 16.0177C11.9744 15.806 11.8134 15.6992 11.6532 15.6992H10.7467L10.6776 15.7054C10.5913 15.7193 10.513 15.7641 10.4572 15.8313C10.4014 15.8985 10.3718 15.9838 10.374 16.0711V16.1236L10.4029 16.2811C10.6566 17.5271 11.5106 18.4187 13.2003 18.6734V19.9483L13.2072 20.0252C13.2422 20.1985 13.3936 20.3263 13.6273 20.3726H14.427L14.504 20.3656C14.679 20.3306 14.8067 20.1801 14.854 19.9483V18.6725L15.0351 18.6375C16.534 18.3207 17.5201 17.2366 17.5201 15.8576C17.5201 13.9991 16.4001 13.3621 14.1601 13.0961C12.5598 12.8835 12.2404 12.4591 12.2404 11.7154C12.2404 10.9716 12.7741 10.4939 13.8399 10.4939C14.7998 10.4939 15.3335 10.8124 15.5995 11.6095C15.6272 11.6866 15.6779 11.7533 15.7447 11.8007C15.8115 11.8481 15.8912 11.8739 15.9731 11.8746H16.8262L16.8954 11.8694C16.982 11.8556 17.0606 11.8108 17.1166 11.7434C17.1726 11.6759 17.2022 11.5904 17.1999 11.5027V11.4503L17.1675 11.2989C17.0361 10.755 16.7366 10.2664 16.3115 9.90255C15.8864 9.53872 15.3574 9.31821 14.7997 9.27238V7.99925L14.7928 7.92225C14.7578 7.74812 14.6073 7.62038 14.3736 7.574Z",fill:a.unref(s)},null,8,hs)]),a.createElementVNode("defs",null,[a.createElementVNode("clipPath",fs,[a.createElementVNode("rect",{width:"28",height:"28",fill:a.unref(s)},null,8,ps)])])],16,ds))}}),ms=["width","height"],Cs={"clip-path":"url(#clip0_10908_387045)"},gs=["fill"],Bs={id:"clip0_10908_387045"},_s=["fill"],Es=a.defineComponent({__name:"icon-usdt",props:{width:{default:28},height:{default:28},color:{default:"currentColor"}},setup(o){const e=o,t=a.useAttrs(),{width:r,height:n,color:s}=e;return(u,l)=>(a.openBlock(),a.createElementBlock("svg",a.mergeProps({width:a.unref(r),height:a.unref(n),viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.unref(t)),[a.createElementVNode("g",Cs,[a.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14 28C6.26763 28 0 21.7324 0 14C0 6.26763 6.26763 0 14 0C21.7324 0 28 6.26763 28 14C28 21.7324 21.7324 28 14 28ZM15.6818 12.0689V9.99863H20.419V6.84162H7.52063V9.99863H12.2579V12.068C8.40787 12.2447 5.5125 13.0077 5.5125 13.9212C5.5125 14.8347 8.40787 15.5969 12.2579 15.7745V22.4088H15.6818V15.7727C19.5256 15.596 22.414 14.8339 22.414 13.9212C22.414 13.0086 19.5256 12.2465 15.6818 12.0689ZM15.6818 15.2101V15.2084C15.5855 15.2154 15.0894 15.2451 13.9825 15.2451C13.0987 15.2451 12.4766 15.2189 12.2579 15.2084V15.211C8.85587 15.0614 6.31662 14.469 6.31662 13.7602C6.31662 13.0524 8.85587 12.46 12.2579 12.3077V14.6212C12.4801 14.637 13.1171 14.6746 13.9974 14.6746C15.0535 14.6746 15.5829 14.6309 15.6818 14.6221V12.3095C19.0768 12.4609 21.6099 13.0532 21.6099 13.7602C21.6099 14.469 19.0768 15.0596 15.6818 15.2101Z",fill:a.unref(s)},null,8,gs)]),a.createElementVNode("defs",null,[a.createElementVNode("clipPath",Bs,[a.createElementVNode("rect",{width:"28",height:"28",fill:a.unref(s)},null,8,_s)])])],16,ms))}}),ys={key:1,class:"flex items-center gap-1"},Pt=a.defineComponent({__name:"currency-amount",props:{currency:{},amount:{},textClass:{default:""},iconColorClass:{default:""},iconWidth:{default:16},iconHeight:{default:16}},setup(o){const e=o,t=a.computed(()=>{var r;return(r=e.currency)==null?void 0:r.toUpperCase()});return(r,n)=>t.value!=="USDT"&&t.value!=="USDC"?(a.openBlock(),a.createElementBlock("p",{key:0,class:a.normalizeClass(r.textClass)},a.toDisplayString(a.unref(Se)(r.amount,t.value)),3)):(a.openBlock(),a.createElementBlock("div",ys,[t.value==="USDT"?(a.openBlock(),a.createBlock(Es,{key:0,width:r.iconWidth,height:r.iconHeight,color:r.iconColorClass},null,8,["width","height","color"])):a.createCommentVNode("",!0),t.value==="USDC"?(a.openBlock(),a.createBlock(vs,{key:1,width:r.iconWidth,height:r.iconHeight,color:r.iconColorClass},null,8,["width","height","color"])):a.createCommentVNode("",!0),a.createElementVNode("p",{class:a.normalizeClass(r.textClass)},a.toDisplayString(a.unref(Se)(r.amount)),3)]))}}),ks=["width","height"],As=["fill"],bs=["fill"],Fs=["fill"],Ds=["fill"],ws=a.defineComponent({__name:"icon-arrow-swap",props:{width:{default:16},height:{default:17},color:{default:"currentColor"}},setup(o){const e=o,t=a.useAttrs(),{width:r,height:n,color:s}=e;return(u,l)=>(a.openBlock(),a.createElementBlock("svg",a.mergeProps({width:a.unref(r),height:a.unref(n),viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.unref(t)),[a.createElementVNode("path",{d:"M10.3265 14.1948C10.1998 14.1948 10.0731 14.1481 9.97313 14.0481C9.77979 13.8548 9.77979 13.5348 9.97313 13.3414L13.3131 10.0014C13.5065 9.80811 13.8265 9.80811 14.0198 10.0014C14.2131 10.1948 14.2131 10.5148 14.0198 10.7081L10.6798 14.0481C10.5798 14.1414 10.4531 14.1948 10.3265 14.1948Z",fill:a.unref(s)},null,8,As),a.createElementVNode("path",{d:"M13.6668 10.8477H2.3335C2.06016 10.8477 1.8335 10.621 1.8335 10.3477C1.8335 10.0743 2.06016 9.84766 2.3335 9.84766H13.6668C13.9402 9.84766 14.1668 10.0743 14.1668 10.3477C14.1668 10.621 13.9402 10.8477 13.6668 10.8477Z",fill:a.unref(s)},null,8,bs),a.createElementVNode("path",{d:"M2.33329 6.86079C2.20663 6.86079 2.07996 6.81413 1.97996 6.71413C1.78663 6.52079 1.78663 6.20079 1.97996 6.00746L5.31996 2.66746C5.51329 2.47413 5.83329 2.47413 6.02663 2.66746C6.21996 2.86079 6.21996 3.18079 6.02663 3.37413L2.68663 6.71413C2.59329 6.80746 2.45996 6.86079 2.33329 6.86079Z",fill:a.unref(s)},null,8,Fs),a.createElementVNode("path",{d:"M13.6668 6.86133H2.3335C2.06016 6.86133 1.8335 6.63466 1.8335 6.36133C1.8335 6.08799 2.06016 5.86133 2.3335 5.86133H13.6668C13.9402 5.86133 14.1668 6.08799 14.1668 6.36133C14.1668 6.63466 13.9402 6.86133 13.6668 6.86133Z",fill:a.unref(s)},null,8,Ds)],16,ks))}}),Ss={class:"flex flex-col gap-6"},Vs={class:"grid grid-cols-1 gap-6"},Ns={key:1,class:"flex flex-col gap-6"},Rs={class:"mx-auto"},Is={class:"mb-0 text-body-4xs text-light-copy font-normal text-center"},Ts={class:"flex flex-col gap-6 border-c border-grey-100 p-4 rounded-2xl bg-light-white-50"},Ms={class:"border-b border-grey-border pb-4 flex flex-col gap-2"},Ps={class:"flex justify-between"},Os={class:"flex flex-col gap-1"},Hs={class:"mb-0 text-body-2xs font-medium text-sub-copy"},$s={class:"flex items-center gap-2"},Ls={class:"pb-4 flex flex-col gap-2"},zs={class:"flex justify-between"},Us={class:"mb-0 text-body-2xs font-medium text-sub-copy w-2/3 break-words"},qs={class:"flex flex-col gap-2"},js={class:"flex items-center justify-between border-b border-grey-border py-3"},Ks={class:"flex items-center justify-between py-4"},Ws={class:"flex flex-col gap-6"},Gs=a.defineComponent({__name:"pay-by-stable-coin",props:{secretKey:{},paymentObject:{},environment:{},onPaymentAuthorized:{type:Function}},setup(o){const e=o,t=e.environment??"sandbox",r=a.ref(0),n=a.ref(""),s=a.ref(!1),u=a.ref(!1),l=a.ref(!1),f=a.ref(!1),i=a.ref(""),c=a.ref([]),g=a.ref([]),d=a.ref(null),m=a.ref(null),x=a.ref(!1),C=a.ref(null),p=a.ref(""),E=a.reactive({stableCoin:"",network:""}),v=a.reactive({}),h={stableCoin:"required",network:"required"},_={stableCoin:"Stable Coin",network:"Network"},b=a.computed(()=>Se(e.paymentObject.amount,e.paymentObject.currency)),A=a.computed(()=>d.value?(Number(d.value.transactionAmount)||0)+(d.value.networkFee||0):0);async function w(){if(!e.secretKey){n.value="Secret key is required.";return}if(!ze(e.paymentObject)){n.value="Kindly ensure you are passing all the required data.";return}s.value=!0,n.value="";try{const B=await Ue(e.paymentObject,t,e.secretKey);if(B!=null&&B.isSuccessful&&B.launchUrl){const y=Ht(B.launchUrl);i.value=y.paymentReference,n.value="Payment link created successfully"}else n.value="Failed to create payment link"}catch(B){n.value=(B==null?void 0:B.message)||"Failed to create payment link"}finally{s.value=!1}}async function V(B){if(B){u.value=!0;try{const y=await Wr(t,B);y!=null&&y.isSuccessful?(d.value=y.data,r.value=1):n.value=(y==null?void 0:y.responseMessage)||"Failed to generate address"}catch(y){n.value=(y==null?void 0:y.message)||"Failed to generate address"}finally{u.value=!1}}}async function T(){l.value=!0;try{const B=await Qa(t);B!=null&&B.isSuccessful&&(c.value=(B.data??[]).map(y=>({label:y.name,value:y.name}))??[])}catch(B){n.value=(B==null?void 0:B.message)||"Failed to get stable coins"}finally{l.value=!1}}async function k(B){var y;f.value=!0;try{const M=await Ja(t,B);if(M!=null&&M.isSuccessful){const $=M.networks??((y=M.data)==null?void 0:y.networks)??[];g.value=($??[]).map(L=>({label:L,value:L}))}}catch(M){n.value=(M==null?void 0:M.message)||"Failed to get stable coin networks"}finally{f.value=!1}}async function S(){var B,y,M,$,L;x.value=!0;try{const H=await q0(t,i.value);if(H!=null&&H.isSuccessful){const P=H.data;C.value=P,(P==null?void 0:P.finalTransactionStatus)==null||(P==null?void 0:P.paymentStatus)==null?(n.value="Transaction not confirmed !!",p.value="pending",(B=e.onPaymentAuthorized)==null||B.call(e,{paymentId:i.value,paymentDate:(P==null?void 0:P.updatedAt)??"",paymentStatus:"pending"})):((P==null?void 0:P.finalTransactionStatus)==="Success"||(P==null?void 0:P.paymentStatus)==="Payment Received")&&(n.value="Transaction confirmed !!",p.value="confirmed",(y=e.onPaymentAuthorized)==null||y.call(e,{paymentId:i.value,paymentDate:P==null?void 0:P.updatedAt,paymentStatus:"confirmed"}))}else!(H!=null&&H.isSuccessful)&&(H==null?void 0:H.responseCode)==="119"&&(p.value="used",n.value=(H==null?void 0:H.responseMessage)||"",(M=e.onPaymentAuthorized)==null||M.call(e,{paymentId:i.value,paymentDate:null,paymentStatus:"used"}))}catch(H){p.value="",n.value=(($=H==null?void 0:H.error)==null?void 0:$.responseMessage)||((L=H==null?void 0:H.error)==null?void 0:L.message)||"Something went wrong"}finally{x.value=!1}}async function F(){const B=je(E,h,_);if(Object.assign(v,B),Object.keys(B).length===0){const y={paymentReference:i.value,currency:E.stableCoin,chain:E.network,transactionAmount:e.paymentObject.amount,merchantId:e.secretKey};m.value=y,await V(y)}}return a.onMounted(async()=>{await w(),await T()}),(B,y)=>{var M,$,L,H,P,O,D,R,I;return a.openBlock(),a.createElementBlock("div",Ss,[r.value===0?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createElementVNode("div",Vs,[a.createVNode(Ge,{label:"Select Crypto",required:"",options:c.value,loading:l.value,value:E.stableCoin,onChange:N=>{E.stableCoin=N,k(N),v.stableCoin&&(v.stableCoin="")},validationError:v.stableCoin??""},null,8,["options","loading","value","onChange","validationError"]),a.createVNode(Ge,{label:"Select Network",required:"",options:g.value,loading:f.value,value:E.network,onChange:N=>{E.network=N,v.network&&(v.network="")},validationError:v.network??""},null,8,["options","loading","value","onChange","validationError"])]),a.createVNode(Ve,{label:`Pay ${b.value}`,type:"primary",customClass:"w-full",loading:u.value,onClick:F},null,8,["label","loading"])],64)):(a.openBlock(),a.createElementBlock("div",Ns,[a.createElementVNode("div",Rs,[a.createElementVNode("p",Is,a.toDisplayString((M=m.value)==null?void 0:M.currency),1)]),a.createElementVNode("div",Ts,[a.createElementVNode("div",Ms,[y[2]||(y[2]=a.createElementVNode("p",{class:"mb-0 text-body-3xs text-light-copy font-normal"},"Network",-1)),a.createElementVNode("div",Ps,[a.createElementVNode("div",Os,[a.createElementVNode("p",Hs,a.toDisplayString(($=d.value)==null?void 0:$.chain),1),a.createElementVNode("div",$s,[y[0]||(y[0]=a.createElementVNode("p",{class:"mb-0 text-body-3xs text-light-copy font-normal"}," *Est. arrival = 3 mins ",-1)),y[1]||(y[1]=a.createElementVNode("p",{class:"mb-0 text-body-3xs text-light-copy font-normal"},"|",-1)),a.createVNode(Pt,{currency:((L=m.value)==null?void 0:L.currency)??"",amount:((H=d.value)==null?void 0:H.networkFee)??0,textClass:"mb-0 text-body-3xs text-light-copy font-normal",iconColorClass:"#557591",iconWidth:12,iconHeight:12},null,8,["currency","amount"])])]),a.createVNode(ws)])]),a.createElementVNode("div",Ls,[y[3]||(y[3]=a.createElementVNode("p",{class:"mb-0 text-body-3xs text-light-copy font-normal"}," Deposit Address > ",-1)),a.createElementVNode("div",zs,[a.createElementVNode("p",Us,a.toDisplayString((P=d.value)==null?void 0:P.walletAddress),1),a.createVNode(Le,{copyText:((O=d.value)==null?void 0:O.walletAddress)??""},null,8,["copyText"])])])]),a.createElementVNode("div",qs,[a.createElementVNode("div",js,[y[4]||(y[4]=a.createElementVNode("p",{class:"mb-0 text-body-2xs font-medium text-primary-black"}," Network fee ",-1)),a.createVNode(Pt,{currency:((D=m.value)==null?void 0:D.currency)??"",amount:((R=d.value)==null?void 0:R.networkFee)??0,textClass:"mb-0 text-body-2xs font-extrabold text-primary-black",iconColorClass:"#231F20"},null,8,["currency","amount"])]),a.createElementVNode("div",Ks,[y[5]||(y[5]=a.createElementVNode("p",{class:"mb-0 text-body-lg font-semibold text-primary-black"},"Pay",-1)),a.createVNode(Pt,{currency:((I=m.value)==null?void 0:I.currency)??"",amount:A.value,textClass:"mb-0 text-body-lg font-extrabold text-primary-black",iconColorClass:"#231F20",iconWidth:20,iconHeight:20},null,8,["currency","amount"])])]),a.createElementVNode("div",Ws,[a.createVNode(Ve,{label:"Confirm Payment",type:"primary",customClass:"w-full",loading:x.value,onClick:S},null,8,["loading"])])]))])}}}),Zs=["width","height"],Xs=["fill"],Ys=a.defineComponent({__name:"icon-check-circle",props:{width:{default:67},height:{default:67},color:{default:"currentColor"}},setup(o){const e=o,t=a.useAttrs(),{width:r,height:n,color:s}=e;return(u,l)=>(a.openBlock(),a.createElementBlock("svg",a.mergeProps({width:a.unref(r),height:a.unref(n),viewBox:"0 0 67 67",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.unref(t)),[a.createElementVNode("path",{d:"M33.6705 0.0820312C15.2758 0.0820312 0.36377 14.9941 0.36377 33.3888C0.36377 51.7846 15.2758 66.6956 33.6705 66.6956C52.0663 66.6956 66.9773 51.7846 66.9773 33.3888C66.9773 14.9941 52.0663 0.0820312 33.6705 0.0820312ZM33.6705 62.5978C17.6011 62.5978 4.52712 49.4583 4.52712 33.3887C4.52712 17.3192 17.6011 4.24525 33.6705 4.24525C49.74 4.24525 62.814 17.3193 62.814 33.3887C62.814 49.4581 49.74 62.5978 33.6705 62.5978ZM46.9631 21.2016L27.4213 40.8662L18.621 32.0659C17.8081 31.253 16.4904 31.253 15.6765 32.0659C14.8636 32.8788 14.8636 34.1965 15.6765 35.0094L25.9797 45.3137C26.7926 46.1255 28.1103 46.1255 28.9243 45.3137C29.0179 45.22 29.0981 45.1179 29.171 45.0118L49.9086 24.1461C50.7205 23.3332 50.7205 22.0155 49.9086 21.2016C49.0947 20.3888 47.777 20.3888 46.9631 21.2016Z",fill:a.unref(s)},null,8,Xs)],16,Zs))}}),Qs={class:"flex flex-col gap-8 p-16"},Js={class:"flex flex-col gap-8"},ei={class:"flex flex-col gap-8"},ti={class:"flex flex-col"},ri={class:"py-4 border-b border-grey-100"},ai={class:"py-4"},ni={class:"mx-auto",style:{width:"80%"}},si=a.defineComponent({__name:"success",setup(o){return(e,t)=>(a.openBlock(),a.createElementBlock("div",Qs,[a.createElementVNode("div",Js,[a.createElementVNode("div",ei,[a.createVNode(Ys,{color:"#F47A1F",class:"mx-auto"}),t[0]||(t[0]=a.createElementVNode("div",{class:"flex flex-col text-center",style:{gap:"2px"}},[a.createElementVNode("p",{class:"text-heading-text font-medium text-header-2xl"},"₦2,500.00"),a.createElementVNode("p",{class:"text-sub-copy font-regular text-body-3xs"}," Has been paid successfully ")],-1))]),a.createElementVNode("div",ti,[a.createElementVNode("div",ri,[a.createVNode(He,{type:"horizontal",label:"Order ID",value:"9900009000-8890-8829hd7"})]),a.createElementVNode("div",ai,[a.createVNode(He,{type:"horizontal",label:"Payment date",value:"July 24, 2025"})])])]),a.createElementVNode("div",ni,[a.createVNode(Ve,{label:"Return to Merchant Website",type:"secondary",customClass:"w-full"})])]))}}),ii={class:"grid grid-cols-3"},oi={key:0,class:"bg-[#EFF7FF] px-6 py-8 flex flex-col gap-5 col-span-1 rounded-l-xl"},li={key:0,class:"flex items-center justify-between px-12 py-8"},ui={key:1,class:"bg-heading-text rounded flex flex-col justify-center",style:{width:"52px",height:"52px"}},ci={class:"flex flex-col gap-1"},di={class:"text-body-2xs font-regular text-sub-copy text-right"},xi={class:"text-body-2xs font-regular text-sub-copy text-right"},hi={class:"text-orange-500 font-extrabold"},fi={key:1,class:"overflow-y-scroll px-10 pb-10 pt-2"},pi=a.defineComponent({__name:"checkout-card",props:{secretKey:{},environment:{},paymentObject:{},options:{}},setup(o){const e=o,t=e.environment??"sandbox",r=e.paymentObject??{merchantName:"",amount:0,currency:"",email:"",phoneNumber:"",narration:"",redirectUrl:"https://sandbox-merchant.buzapay.com/account/three-ds-status"},n=a.ref("PENDING"),s=a.ref([{label:"Card",value:"CARD"},{label:"Bank Transfer",value:"BANK_TRANSFER"},{label:"Stable Coin",value:"STABLE_COIN"}]),u=a.ref([]),l=a.ref(""),f=a.ref({paymentDate:"",paymentId:"",paymentStatus:""});function i(m){l.value=m}function c(m){f.value={...m},m.paymentStatus==="Authorized"?n.value="SUCCESS":m.paymentStatus==="Payment failed"?n.value="PENDING":m.paymentStatus==="used"?n.value="USED":n.value="PENDING"}a.watch(()=>[r.currency,r.amount],([m,x])=>{let C=[];m==="USD"?typeof x=="number"&&x<50?C=s.value.filter(p=>p.value!=="BANK_TRANSFER"&&p.value!=="STABLE_COIN"):C=s.value.filter(p=>p.value!=="BANK_TRANSFER"):C=s.value.filter(p=>p.value!=="STABLE_COIN"),u.value=C},{immediate:!0}),a.watch(()=>u.value,m=>{m.length&&(l.value=m[0].value)},{immediate:!0});const g=e.secretKey,d=e.options;return(m,x)=>(a.openBlock(),a.createBlock(ca,null,{default:a.withCtx(()=>{var C,p;return[a.createElementVNode("div",ii,[n.value==="PENDING"?(a.openBlock(),a.createElementBlock("div",oi,[x[1]||(x[1]=a.createElementVNode("p",{class:"text-heading-text text-body-xs font-semibold"},"Pay with",-1)),a.createVNode(pa,{options:u.value,onSelectedChange:x[0]||(x[0]=E=>i(E))},null,8,["options"])])):a.createCommentVNode("",!0),a.createElementVNode("div",{class:a.normalizeClass(n.value==="SUCCESS"?"col-span-3":"col-span-2")},[n.value==="PENDING"?(a.openBlock(),a.createElementBlock("div",li,[(C=a.unref(d))!=null&&C.imageUrl?(a.openBlock(),a.createBlock(Ae,{key:0,src:((p=a.unref(d))==null?void 0:p.imageUrl)??"",alt:"Merchant Logo",width:52,height:52,customClass:"rounded-lg"},null,8,["src"])):(a.openBlock(),a.createElementBlock("div",ui,[...x[2]||(x[2]=[a.createElementVNode("p",{class:"text-white text-center text-body-2xs font-medium"},"Logo",-1)])])),a.createElementVNode("div",ci,[a.createElementVNode("p",di,a.toDisplayString(a.unref(r).merchantName),1),a.createElementVNode("p",xi,[x[3]||(x[3]=a.createTextVNode(" Pay: ",-1)),a.createElementVNode("span",hi,a.toDisplayString(a.unref(Se)(a.unref(r).amount,a.unref(r).currency)),1)])])])):a.createCommentVNode("",!0),n.value==="PENDING"?(a.openBlock(),a.createElementBlock("div",fi,[l.value==="CARD"?(a.openBlock(),a.createBlock(Kn,{key:0,secretKey:a.unref(g),environment:a.unref(t),paymentObject:a.unref(r),onPaymentAuthorized:c},null,8,["secretKey","environment","paymentObject"])):l.value==="BANK_TRANSFER"?(a.openBlock(),a.createBlock(cs,{key:1,secretKey:a.unref(g),environment:a.unref(t),paymentObject:a.unref(r),onPaymentAuthorized:c},null,8,["secretKey","environment","paymentObject"])):(a.openBlock(),a.createBlock(Gs,{key:2,secretKey:a.unref(g),environment:a.unref(t),paymentObject:a.unref(r),onPaymentAuthorized:c},null,8,["secretKey","environment","paymentObject"]))])):a.createCommentVNode("",!0),n.value==="SUCCESS"?(a.openBlock(),a.createBlock(si,{key:2,amount:a.unref(r).amount,currency:a.unref(r).currency,redirectUrl:a.unref(r).redirectUrl??"",successObject:f.value},null,8,["amount","currency","redirectUrl","successObject"])):a.createCommentVNode("",!0)],2)])]}),_:1}))}});exports.BzpCheckoutButton=Xr;exports.BzpCheckoutCard=pi;exports.BzpCheckoutIframe=j0;exports.createMidenPG=fr;exports.useMidenPG=pr;
15
15
  //# sourceMappingURL=index.cjs.js.map