1 |
- (()=>{var e={896:()=>{!function(){const e={formSelector:"#bsb-contact-5",responseSelector:"#bsb-contact-5-response",async postData(t="",r={}){const o=document.querySelector(e.formSelector),n=document.querySelector(e.responseSelector),a=n.querySelector(".alert"),s=o.dataset.bsbFormLoading,c=o.dataset.bsbFormError;n.classList.contains("d-none")&&n.classList.remove("d-none"),a.classList.remove("alert-danger","alert-success"),a.classList.add("alert-primary"),a.innerHTML=s;const i=await fetch(t,{method:"POST",mode:"cors",cache:"no-cache",credentials:"same-origin",headers:{"Content-Type":"application/json"},redirect:"follow",referrerPolicy:"no-referrer",body:JSON.stringify(r)});if(i.ok){const e=await i.json();a.classList.remove("alert-danger","alert-primary"),a.classList.add("alert-success"),a.innerHTML=e.mailer_response}else a.classList.remove("alert-success","alert-primary"),a.classList.add("alert-danger"),a.innerHTML=c;return o.reset(),i},init(){const t=document.querySelector(e.formSelector),r=t.action;null!=t&&(t.addEventListener("submit",(function(e){e.preventDefault(),new FormData(t)})),t.addEventListener("formdata",(t=>{const o=t.formData,n={};o.forEach(((e,t)=>{n[t]=e})),e.postData(r,n)})))}};function t(){e.init()}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",t):t(),window.addEventListener("load",(function(){}),!1)}()}},t={};function r(o){var n=t[o];if(void 0!==n)return n.exports;var a=t[o]={exports:{}};return e[o](a,a.exports,r),a.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";r(896)})()})();
|