1/** 2 * @desc send Formix forms via XHR 3 * @author Dominik Kressler 4 * @version 1.1.0 5 */ 6var Formix=function(e){var r={selector:'form[action*="formixapp.com"]',msg:{de:{success:"<p><strong>Vielen Dank!</strong></p><p>Ihre Nachricht wurde erfolgreich an uns übermittelt. Wir werden Ihr Anliegen schnellstmöglich bearbeiten und uns dann mit Ihnen in Verbindung setzen.</p><p>In dringenden Fällen kontaktieren Sie uns bitte telefonisch.</p>",error:"<p><strong>Fehler!</strong></p><p>Leider gab es bei der Verarbeitung Ihrer Anfrage einen Fehler. Bitte überprüfen Sie die folgenden Felder:</p>",requestError:"Das Formular konnte auf Grund eines technischen Fehlers nicht versendet werden. Bitte versuche Sie es später erneut oder kontaktieren Sie uns telefonisch."},en:{success:"<p><strong>Your message has been sent!</strong></p><p>Thank you for your message. We will contact you as soon as possible.</p>",error:"<p>The form could not be sent, <br>the following fields are not correct:</p>",requestError:"The form could not be sent due to technical issues. Please try again later."}}},n=this;n.params=r=J.merge(r,e),n.lang=document.documentElement.lang.split("_")[0].toLowerCase(),"de"!=n.lang&&(n.lang="en");for(var s=document.querySelectorAll(r.selector),t=0,a=s.length;t<a;t++)s[t].addEventListener("submit",o),s[t].dataset.uniqid=Math.floor(Math.random()*(new Date).getTime());function o(e){e.preventDefault();var r=this,s=r.action,t=new XMLHttpRequest,a=new FormData(document.querySelector('[data-uniqid="'+this.dataset.uniqid+'"]'));document.documentElement.classList.add("inProgress"),r.classList.add("disabled"),t.open("POST",s,!0),t.addEventListener("load",function(e){var s=document.createElement("a");if(s.href=e.target.responseURL,s.search.indexOf("error")>-1){document.documentElement.classList.remove("inProgress"),r.classList.remove("disabled");for(var t=s.search.split("=")[1].split("%60"),a="<ul>",o=0,i=t.length;o<i;o++)error=decodeURIComponent(t[o]).replaceAll("\\+"," ").replace("Data does not contains","").replace("Reply to can't be blank","").replace("Reply to is invalid.","Invalid Mail").replace("' field","").replace(".",""),""!=error&&(a+="<li>"+error+"</li>");a+="<ul>",notification.add({id:"formixSuccess",classNames:"error",message:n.params.msg[n.lang].error+a,saveState:!1})}else document.documentElement.classList.remove("inProgress"),notification.add({id:"formixError",classNames:"success",message:n.params.msg[n.lang].success,saveState:!1})}),t.addEventListener("error",function(e){console.log(e),document.documentElement.classList.remove("inProgress"),r.classList.remove("disabled"),notification.add({id:"formixRequestError",classNames:"error",message:n.params.msg[n.lang].requestError,saveState:!1})}),t.send(a)}};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.