1function validatenip(t){var e=t.replace(/-/g,"");if(0==/^[0-9]{10}$/.test(e))return!1;var a=(""+e).split(""),o=(6*parseInt(a[0])+5*parseInt(a[1])+7*parseInt(a[2])+2*parseInt(a[3])+3*parseInt(a[4])+4*parseInt(a[5])+5*parseInt(a[6])+6*parseInt(a[7])+7*parseInt(a[8]))%11;return parseInt(a[9])==o}const validateEmail=t=>String(t).toLowerCase().match(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/);function validate_yith_gift_card_fields(){let t=!0,e=jQuery(".yith-ywgc-gift-this-product-form-container input[type=email]");var a;a=e.val(),String(a).toLowerCase().match(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/)?(t=!0,e.removeClass("nonvalid")):(t=!1,e.addClass("nonvalid")),jQuery(".yith-ywgc-gift-this-product-form-container input[type=text], .yith-ywgc-gift-this-product-form-container input[type=email], .yith-ywgc-gift-this-product-form-container textarea").each((function(){""==jQuery(this).val()&&(t=!1)})),t?jQuery(".yith-ywgc-gift-this-product-form-container .single_add_to_cart_button").prop("disabled",!1):jQuery(".yith-ywgc-gift-this-product-form-container .single_add_to_cart_button").prop("disabled",!0)}jQuery(document).ready((function(){jQuery("[data-source]").Lazy(),validate_yith_gift_card_fields(),jQuery(document).on("click",".yith-ywgc-gift-this-product-form-container .single_add_to_cart_button",(function(t){t.stopPropagation(),t.preventDefault(),jQuery(this).is(":disabled")||(jQuery(this).addClass("loading"),jQuery(this).prop("disabled",!0),jQuery("form.cart").submit())})),jQuery(document).on("keydown keypress input change",".yith-ywgc-gift-this-product-form-container input[type=text], .yith-ywgc-gift-this-product-form-container input[type=email], .yith-ywgc-gift-this-product-form-container textarea",(function(){validate_yith_gift_card_fields()})),jQuery(".button.prepare_invoice").click((function(t){t.preventDefault();const e=jQuery(this).attr("href").replace(/[^0-9]/g,"");Swal.fire({title:"Dane do faktury",width:"40em",html:'\n\t\t <div id="sn_invoice_form">\n\t\t \t<div class="form-group">\n\t\t \t\t<label for="country">Kraj:</label>\n\t\t\t\t<select id="country"></select>\n\t\t\t</div>\n\t\t\t<div class="form-group">\n\t\t \t\t<label for="type">Forma prawna:</label>\n\t\t\t\t<select id="type">\n\t\t\t\t\t<option value="company">Firma/organizacja</option>\n\t\t\t\t\t<option value="individual">Osoba prywatna</option>\n\t\t\t\t</select>\n\t\t\t</div>\n\t\t\t<div class="form-group">\n\t\t \t\t<label for="company_name">PeÅna nazwa firmy:</label>\n\t\t\t \t<input type="text" id="company_name">\n\t\t\t</div>\n\t\t\t<div class="form-group">\n\t\t \t\t<label for="nip">NIP:</label>\n\t\t\t \t<input type="text" id="nip">\n\t\t\t</div>\n\t\t\t<div class="form-group">\n\t\t \t\t<label for="street">Ulica i numer:</label>\n\t\t\t \t<input type="text" id="street">\n\t\t\t</div>\n\t\t\t<div class="form-group">\n\t\t \t\t<label for="postcode">Kod pocztowy:</label>\n\t\t\t \t<input type="text" id="postcode">\n\t\t\t</div>\n\t\t\t<div class="form-group">\n\t\t \t\t<label for="city">MiejscowoÅÄ:</label>\n\t\t\t \t<input type="text" id="city">\n\t\t\t</div>\n\t\t\t<div class="form-group">\n\t\t \t\t<label for="city">Uwagi:</label>\n\t\t\t \t<textarea id="comments" rows="5"></textarea>\n\t\t\t</div>\n\t\t </div>\n\t\t ',confirmButtonText:"Zapisz",showLoaderOnConfirm:!0,focusConfirm:!1,confirmButtonColor:"#f3b434",cancelButtonColor:"#ebe9eb",didOpen:()=>{var t=document.getElementById("country");let e=sn_main.woocommerce_allowed_countries;Object.keys(e).forEach((function(a){"PL"==a?t.add(new Option(e[a],a,!1,!0)):t.add(new Option(e[a],a))}))},preConfirm:()=>{const t=Swal.getPopup().querySelector("#country").value,a=Swal.getPopup().querySelector("#type").value,o=Swal.getPopup().querySelector("#company_name").value,n=Swal.getPopup().querySelector("#nip").value,i=Swal.getPopup().querySelector("#street").value,r=Swal.getPopup().querySelector("#postcode").value,s=Swal.getPopup().querySelector("#city").value,l=Swal.getPopup().querySelector("#comments").value;
1let c=!0;s||(Swal.showValidationMessage("Wpisz MiejscowoÅÄ!"),c=!1);const p=r.match(/^([0-9]{2})(-[0-9]{3})?$/i);(!p||p&&null==p[2])&&(Swal.showValidationMessage("Wpisz poprawny kod pocztowy!"),c=!1),r||(Swal.showValidationMessage("Wpisz kod pocztowy!"),c=!1);const u=i.match(/^(\b\D+\b)?\s*(\b.*?\d.*?\b)\s*(\b\D+\b)?$/);if((!u||u&&null==u[1])&&(Swal.showValidationMessage("Wpisz poprawnie nazwÄ ulicy wraz z numerem!"),c=!1),i||(Swal.showValidationMessage("Wpisz nazwÄ ulicy wraz z numerem!"),c=!1),validatenip(n)||"company"!=a||(Swal.showValidationMessage("Wpisz poprawny NIP!"),c=!1),n||"company"!=a||(Swal.showValidationMessage("Wpisz NIP!"),c=!1),o||(Swal.showValidationMessage("Wpisz nazwÄ firmy!"),c=!1),a||(Swal.showValidationMessage("Wybierz formÄ prawnÄ
!"),c=!1),t||(Swal.showValidationMessage("Wybierz kraj!"),c=!1),c)return fetch(wp.ajax.settings.url,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"},body:new URLSearchParams({action:"sn_user_create_order_invoice_manually",country:t,type:a,company_name:o,nip:n,street:i,postcode:r,city:s,order_id:e,comments:l})}).then((t=>t.json())).then((t=>(t.success||Swal.showValidationMessage(t.data),Swal.fire({icon:"success",title:"Zapisano!",text:"PomyÅlnie zapisano dane i wystawiono fakturÄ.",showCloseButton:!0,showCancelButton:!0,focusConfirm:!0,confirmButtonText:"Pobierz fakturÄ",cancelButtonText:"Zamknij",confirmButtonColor:"#f3b434",cancelButtonColor:"#ebe9eb"}).then((e=>{if(e.isConfirmed){let e=t.data;e=e.replaceAll("&","&"),window.location.href=e}e.isDismissed&&window.location.reload()})),t)))}})}))}));
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.