(()=>{functione(e,n){for(vart=0;t<n.length;t++){varr=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"inr&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}functionn(n,t,r){returnt&&e(n.prototype,t),r&&e(n,r),Object.defineProperty(n,"prototype",{writable:!1}),n}functiont(e,n,t){returnnine?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}varr=n((functione(n){varr=this;!function(e,n){if(!(einstanceofn))thrownewTypeError("Cannot call a class as a function")}(this,e),t(this,"handleAuthorization",(function(){vare=$("#my-card"),n={api_login_id:r.apiLoginId,card_number:e.CardJs("cardNumber").replace(/[^\d]/g,""),expire_year:e.CardJs("expiryYear").replace(/[^\d]/g,""),expire_month:e.CardJs("expiryMonth").replace(/[^\d]/g,""),cvv:document.getElementById("cvv").value.replace(/[^\d]/g,"")};returndocument.getElementById("pay-now")&&(document.getElementById("pay-now").disabled=!0,document.querySelector("#pay-now > svg").classList.remove("hidden"),document.querySelector("#pay-now > span").classList.add("hidden")),forte.createToken(n).success(r.successResponseHandler).error(r.failedResponseHandler),!1})),t(this,"successResponseHandler",(function(e){returndocument.getElementById("payment_token").value=e.onetime_token,document.getElementById("card_brand").value=e.card_type,document.getElementById("server_response").submit(),!1})),t(this,"failedResponseHandler",(function(e){varn='<div class="alert alert-failure mb-4"><ul><li>'+e.response_description+"</li></ul></div>";returndocument.getElementById("forte_errors").innerHTML=n,document.getElementById("pay-now").disabled=!1,document.querySelector("#pay-now > svg").classList.add("hidden"),document.querySelector("#pay-now > span").classList.remove("hidden"),!1})),t(this,"handle",(function(){vare=document.getElementById("pay-now");returne&&e.addEventListener("click",(function(e){r.handleAuthorization()})),r})),this.apiLoginId=n,this.cardHolderName=document.getElementById("cardholder_name")}));newr(document.querySelector('meta[name="forte-api-login-id"]').content).handle()})();