(()=>{functione(t){returne="function"==typeofSymbol&&"symbol"==typeofSymbol.iterator?function(e){returntypeofe}:function(e){returne&&"function"==typeofSymbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeofe},e(t)}functiont(t,n){for(varo=0;o<n.length;o++){varr=n[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"inr&&(r.writable=!0),Object.defineProperty(t,(i=r.key,a=void0,a=function(t,n){if("object"!==e(t)||null===t)returnt;varo=t[Symbol.toPrimitive];if(void0!==o){varr=o.call(t,n||"default");if("object"!==e(r))returnr;thrownewTypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(i,"string"),"symbol"===e(a)?a:String(a)),r)}vari,a}varn=function(){functione(){!function(e,t){if(!(einstanceoft))thrownewTypeError("Cannot call a class as a function")}(this,e)}varn,o,r;returnn=e,(o=[{key:"initializeWePay",value:function(){vare,t=null===(e=document.querySelector('meta[name="wepay-environment"]'))||void0===e?void0:e.content;returnWePay.set_endpoint("staging"===t?"stage":"production"),this}},{key:"showBankPopup",value:function(){vare,t;WePay.bank_account.create({client_id:null===(e=document.querySelector("meta[name=wepay-client-id]"))||void0===e?void0:e.content,email:null===(t=document.querySelector("meta[name=contact-email]"))||void0===t?void0:t.content,options:{avoidMicrodeposits:!0}},(function(e){e.error?(errors.textContent="",errors.textContent=e.error_description,errors.hidden=!1):(document.querySelector('input[name="bank_account_id"]').value=e.bank_account_id,document.getElementById("server_response").submit())}),(function(e){e.error&&(errors.textContent="",errors.textContent=e.error_description,errors.hidden=!1)}))}},{key:"handle",value:function(){this.initializeWePay().showBankPopup()}}])&&t(n.prototype,o),r&&t(n,r),Object.defineProperty(n,"prototype",{writable:!1}),e}();document.addEventListener("DOMContentLoaded",(function(){(newn).handle()}))})();