(()=>{var e,t={884:e=>{var t={elementGetData:function(e,t,n){var r=void 0!==e.getAttribute?e.getAttribute("data-"+t):null;if(null===r||""===r)return n;try{return JSON.parse(r)}catch(e){return r}},elementHasData:function(e,t){var n=void 0!==e.getAttribute?e.getAttribute("data-"+t):null;return null!==n&&""!==n},elementParentByData:function(e,n){for(var r=e.parentNode;r;){if(t.elementHasData(r,n))return r;r=void 0!==r.parentNode&&r.parentNode}return null}};e.exports=t},363:(e,t,n)=>{var r={};window.ThePayApi=r,r.init=function(){r.initHandlers()};var a=r.helpers=n(884);r.initHandlers=function(){document.addEventListener("click",(function(e){var t=e.target;if(t&&a.elementHasData(t,"thepay"))return r.handleEvent.call(t,e,a.elementGetData(t,"thepay"));var n=a.elementParentByData(t,"thepay");return n?r.handleEvent.call(n,e,a.elementGetData(n,"thepay")):void 0}))},r.handlers={},r.handleEvent=function(e,t){var n=e.type;if(void 0!==r.handlers[t]&&void 0!==r.handlers[t][n])return r.handlers[t][n].call(this,e)},r.registerActionEvent=function(e,t,n){void 0===r.handlers[e]&&(r.handlers[e]={}),r.handlers[e][t]=n},r.unregisterActionEvent=function(e,t){delete r.handlers[e][t]},n(784),r.init()},784:()=>{ThePayApi.registerActionEvent("payment-button","click",(function(e){if(ThePayApi.helpers.elementHasData(this,"form-id")){var t=document.getElementById(ThePayApi.helpers.elementGetData(this,"form-id"));if(t){e.preventDefault();var n=ThePayApi.helpers.elementGetData(this,"payment-method");return ThePayApi.sendPaymentRequestForm(t,n),!1}}return!0})),ThePayApi.sendPaymentRequestForm=function(e,t){if(t){var n=e.getAttribute("id")+"-method",r=document.getElementById(n);r||((r=document.createElement("input")).setAttribute("type","hidden"),r.setAttribute("id",n),r.setAttribute("name","payment_method_code"),e.appendChild(r)),r.setAttribute("value",t)}e.submit()}},381:(e,t,n)=>{void 0===window.ThePayApi&&n(363)},691:()=>{}},n={};function r(e){var a=n[e];if(void 0!==a)return a.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.m=t,e=[],r.O=(t,n,a,i)=>{if(!n){var l=1/0;for(s=0;s<e.length;s++){for(var[n,a,i]=e[s],o=!0,u=0;u<n.length;u++)(!1&i||l>=i)&&Object.keys(r.O).every((e=>r.O[e](n[u])))?n.splice(u--,1):(o=!1,i<l&&(l=i));if(o){e.splice(s--,1);var d=a();void 0!==d&&(t=d)}}return t}i=i||0;for(var s=e.length;s>0&&e[s-1][2]>i;s--)e[s]=e[s-1];e[s]=[n,a,i]},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={538:0,716:0};r.O.j=t=>0===e[t];var t=(t,n)=>{var a,i,[l,o,u]=n,d=0;if(l.some((t=>0!==e[t]))){for(a in o)r.o(o,a)&&(r.m[a]=o[a]);if(u)var s=u(r)}for(t&&t(n);d<l.length;d++)i=l[d],r.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return r.O(s)},n=self.webpackChunk=self.webpackChunk||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),r.O(void 0,[716],(()=>r(381)));var a=r.O(void 0,[716],(()=>r(691)));a=r.O(a)})();