import{S as s}from"./vendor-3-7-97.js";const e=window.jQuery,t=window.gpos.elementor_settings,i=e("#_gpos_elementor_form_wpnonce").val();e("#gpos-elementor-form").submit(function(r){r.preventDefault();const n=JSON.stringify({form_data:a(this),elementor_settings:t});e.ajax({type:"POST",url:`${window.gpos.ajaxurl}?action=gpos_elementor_process_form&_wpnonce=${i}`,dataType:"json",contentType:"application/json",accept:"application/json",data:n,beforeSend:function(){e("#gpos-elementor-form").block({message:window.gpos.alert_texts.please_wait})},success:function(o){o.status==="success"?(e("#gpos-elementor-form").block({message:o.message}),window.location.href=o.redirect):s.fire({html:o.message,icon:"error",confirmButtonText:window.gpos.alert_texts.ok,confirmButtonColor:"#C81E1E"})},complete:function(){e("#gpos-elementor-form").unblock()}})});e(document).ready(()=>{window.gposDispatchAmount({amount:t.price,currency:t.currency}),e("#gpos-elementor-form #price").on("keyup",function(){e("#gpos-elementor-form #button-price").html(`${this.value} ${t.currency}`),window.gposDispatchAmount({amount:this.value,currency:t.currency})})});function a(r){return window.jQuery(r).serializeArray().reduce(function(n,{name:o,value:c}){return n[o]=c,n},{})}
