PageSourceSearch

https://www.raptortravel.it/wp-content/cache/min/1/raptor/Assets/Plugin/js/linkHelper.js?ver=1784160218

js raptortravel.it collected 2026-10-04 16:48:55 UTC 11,550 bytes, 24 lines download raw bytes

1var lang="";var langSuffix="";var siteUrl="";$j(document).on("_page_ready _page_update",function(){initLinkHelper();welfareManagement.init()});function initLinkHelper(){var locale="it";if(typeof site_base_locale!=="undefined"){locale=site_base_locale.substring(0,2)}
2if(locale=="it"){lang="";langSuffix="";siteUrl=site_base_url}else{lang=locale;langSuffix="-"+locale;siteUrl=site_base_url+"/"+lang}
3$j(".webSalesPlugin form[name='login_form']").not(".WSLinkSync").each(function(){url=site_rest_url+"login";$j(this).attr("action",url);$j(this).attr("novalidate","novalidate");$j(this).addClass("WSLinkSync")});$j(".webSalesPlugin .forgottenLink a").not(".WSLinkSync").each(function(){url=siteUrl+"/forgot"+langSuffix;$j(this).attr("href",url);$j(this).addClass("WSLinkSync")});$j(".webSalesPlugin form[name='forgotten_password_form']").not(".WSLinkSync").submit(function(e){e.preventDefault();e.stopPropagation();var form=$j(this);var url=site_base_url+"/wp-login.php?action=lostpassword";var dataArray=form.serializeArray();var dataSend="user_login="+dataArray[0].value;console.log("lost password data send ",dataSend);$j.ajax({type:"POST",url:url,data:dataSend,success:function(response,status,xhr){console.log(response);if(response.charAt(0)=="{"){response=JSON.parse(response)}else{html=$j.parseHTML(response);response={success:!1,errors:[],overrideErros:!0};result=$j(html).find(".message p");if(result.length==0){message='<div class="alert alert-danger" role="alert">'+$j(html).find("#login_error").html()+"</div>"}else{message='<div class="alert alert-success"  role="alert">'+result.html()+"</div>"}
4$j("#alerts-box").html(message)}
5if(!response.result){if(!response.overrideErros){outputErrorMessages(response.errors)}}else{var userForgot=data.forgotten_password_form.email;var urlForgot=site_base_url+"/wp-login.php?action=lostpassword";$('<form method="POST" action="'+urlForgot+'"><input type="text" name="user_login" value="'+userForgot+'" /></form>').appendTo("body").submit()}},error:function(xhr,status,error){error="Qualcosa è andato storto durante il salvataggio, riprova più tardi!";message='<div class="alert alert-danger" role="alert">'+error+"</div>";$j("#alerts-box").html(message)},});return!1});$j(".webSalesPlugin form[name='forgotten_password_form']").addClass("WSLinkSync");$j(".webSalesPlugin form[name='reset_password_form']").not(".WSLinkSync").submit(function(e){e.preventDefault();e.stopPropagation();var form=$j(this);var data=form.serializeArray();var psw1=data[0].value;var psw2=data[1].value;var key=data[2].value;var user=data[3].value;var url=site_base_url+"/wp-login.php?action=resetpass";if(psw1==psw2){var dataSend="pass1="+psw1+"&pw_weak=on&pass2="+psw2+"&rp_key="+key+"&wp-submit=Reimposta+password";$j.ajax({type:"POST",url:url,data:dataSend,success:function(response,status,xhr){console.log(response);if(response.charAt(0)=="{"){}else{html=$j.parseHTML(response);result=$j(html).find(".message p");if(result.length==0){message='<div class="alert alert-danger"  role="alert">'+$j(html).find("#login_error").html()+"</div>"}else{message='<div class="alert alert-success"  role="alert">'+result.html()+"</div>"}
6$j("#alerts-box").html(message)}},error:function(xhr,status,error){error="Qualcosa è andato storto durante il reset, riprova più tardi!";message='<div class="alert alert-danger" role="alert">'+error+"</div>";$j("#alerts-box").html(message)},})}else{outputErrorMessages(errorCodesList.PASSWORD_DONT_MATCH)}});$j(".webSalesPlugin form[name='reset_password_form']").addClass("WSLinkSync");$j(".webSalesPlugin .extraMessage a, a.registrationButton").not(".WSLinkSync").each(function(){if($j(this).attr("href").includes("registration")){url=siteUrl+"/registrazione"+langSuffix;$j(this).attr("href",url)}
7if($j(this).attr("href").includes("login")){url=siteUrl+"/login"+langSuffix;$j(this).attr("href",url)}
8$j(this).addClass("WSLinkSync")});$j(".webSalesPlugin form[name='hotel_form']").not(".WSLinkSync").each(function(){var url=siteUrl+"/ricerca"+langSuffix;$j(this).attr("action",url);$j(this).addClass("WSLinkSync")});$j(".webSalesPlugin .showQuotationForm").not(".WSLinkSync").each(function(){var url=site_base_url+"/"+$j(this).attr("action");$j(this).attr("action",url);$j(this).addClass("WSLinkSync")});$j("#frmNotesReferrer").attr("action",siteUrl+"/booking"+langSuffix+"?proceed=1");var reserved=$j("#reserved_status").attr("data-value");if(reserved=="true"||reserved=="1"){$j(".reserved_title.clickable").removeClass("reserved_disabled")}else{$j(".reserved_title.clickable").addClass("reserved_disabled")}
9$j(".reserved_title.clickable").not(".WSLinkSync").click(function(){var reserved=$j(this).hasClass("reserved_disabled");
9$form=$j("form[name='hotel_form']");$form.append('<input type="hidden" name="reserved" value="'+reserved+'"> ');$j("#hotel_form_submit").click()});$j(".reserved_title.clickable").addClass("WSLinkSync");$j(".webSalesPlugin .dossierDownloadBtn").each(function(){var $form=$j(this).closest("form");$form.attr("action",site_rest_url+"monitorDocumentDownload")});$j(".webSalesPlugin .quotationControl").not(".WSLinkSync").each(function(){var params=$j(this).attr("href").split("?");var url=site_rest_url+"getQuotation";if(params[1]){url=url+"?"+params[1]}
10$j(this).attr("href",url);$j(this).addClass("WSLinkSync")});const phoneVisibility=$j("#registration_form_phone").attr("data-visibility");const mobileVisibility=$j("#registration_form_mobilePhone").attr("data-visibility");let phoneVisibilityData=phoneVisibility?`&phone_visibility=${phoneVisibility}`:``;let mobileVisibilityData=mobileVisibility?`&mobile_visibility=${mobileVisibility}`:``;$j(".webSalesPlugin:not(.profile) form[name='registration_form'],.webSalesPlugin:not(.profile) form[name='simple_registration_form']").not(".WSLinkSync").each(function(){const type=$j(this).attr("name");url=site_rest_url+(type=="registration_form"?"registration":"simpleRegistration");$j(this).attr("action",url);$j(this).attr("novalidate","novalidate");$j(this).submit(function(e){e.preventDefault();e.stopPropagation();var form=$j(this);var url=form.attr("action");let registrationData=form.serialize()+phoneVisibilityData+mobileVisibilityData;websalesLoader.show();$j.ajax({type:"POST",url:url,data:registrationData,success:function(response,status,xhr){console.log(response);$j("#alerts-box").html("");$j("#alerts-box-register").html("");if(!response.result){outputErrorMessages(response.errors,!0)}else{if(window.location.pathname.includes("registrazione")){window.location.href=siteUrl+"/login"+langSuffix}
11message='<div class="alert alert-success" role="alert">'+errorCodesList.SUCCESS+"</div>";$j("#alerts-box").html(message);$j("#alerts-box-register").html(message);if(response.returnTo){console.log(response.returnTo);if(response.booking_post){console.log(response.booking_post);var inputs="";var data=JSON.parse(decodeURI(response.booking_post));for(var propertyName in data){inputs+='<input type="text" name="'+propertyName+'" value="'+data[propertyName]+'"/>'}
12var form=$j('<form action="'+response.returnTo+'" method="post">'+inputs+"</form>");$j("body").append(form);console.log(form);form.submit()}else{window.location.href=response.returnTo}}}},error:function(xhr,status,error){message='<div class="alert alert-danger" role="alert">'+errorCodesList.FAIL+"</div>";$j("#alerts-box").html(message);$j("#alerts-box-register").html(message)},complete:function(){websalesLoader.hide();grecaptcha.reset()},});return!1});$j(this).addClass("WSLinkSync")})}
13var errorCodesList={USERNAME_ALREADY_EXIST:"Username già presente, riprova con uno differente",TAX_CODE_MAX_LENGTH:"Il codice fiscale deve essere esattamente 16 caratteri",VAT_CODE_MIN_LENGTH:"la partita iva deve essere esattamente 11 caratteri",TAX_CODE_MAX_LENGTH_BUSINESS:"Il codice fiscale deve essere compreso tra 11 e 16 caratteri",BUSINESS_NAME_MAX_LENGTH:"La ragione sociale con la denominazione non può superare i 70 cartteri",TAX_CODE_NOT_VALID:"Il codice fiscale non è valido.",TAX_CODE_PATTERN_NOT_VALID:"Il codice fiscale non è valido. Il formato corretto è XXXXXX00X00X000X",USER_SUSPENDED:"Sei già stato registrato presso uno dei nostri uffici, contatta l’assistenza per risalire ai tuoi dati",EMAIL_ADDRESS_ALREADY_EXIST:"La mail è già stata utilizzata",CLIENT_CODE_LENGTH:"La lunghezza del Codice Conto deve essere di 12",NOT_A_VALID_EMAIL_ADDRESS:"La mail inserita non è valida",EMAIL_NOT_UTF8_ENCODED:"La mail inserita, contiene caratteri non validi, evitare copia e incolla e riscrivere la mail",NOT_A_VALID_PHONE:"Il numero di telefono non è valido",PASSWORD_LENGTH_IS_TOO_LONG:"La password del booking può essere lunga fino a 10 caratteri",VAT_CODE_EXIST:"La partita iva esiste già",PASSWORD_DONT_MATCH:"Le password non coincidono",CAPTCHA_NOT_VALID:"Captcha non valido, riprova",PROVINCE_NOT_VALID:"Provincia non valida, selezionare una provincia dalla lista",NATION_NOT_VALID:"Nazione non valida, selezionare una nazione dalla lista",NOUNCE_NOT_VALID:"Operazione non riuscita, riprova",BOOKING_PASSWORD_DONT_MATCH:"Le password del booking non coincidono",BOOKING_CREATION_ERROR:"Creazione/modifica utente Booking non riuscita, riprova",SDI_MANDATORY:"Codice univico o PEC sono obbligatori",SDI_NOT_VALID:"Codice univoco non valido",FORBIDDEN:"Operazione non consentita",EMPTY_DATA:"Compilare tutti i campi obbligatori",SUCCESS:"Operazione completata con successo",FAIL:"Qualcosa è andato storto durante il salvataggio, riprova più tardi!",MANDATORY_FLAG_NOT_CHECKED:"Mancano delle condizioni da accettare.",};function setErrorMessagesList(errorList){if(errorList!=null){errorCodesList=JSON.parse(errorList);console.log(errorCodesList)}}
14function outputErrorMessages(errorCodes,register=!1){let message="";console.log(errorCodes);if(errorCodes){if(typeof errorCodes==="object"){errorCodes=Object.values(errorCodes)}
15errorCodes.forEach(function(element,index,array){let error="";if(element.startsWith("MANDATORY_FLAG_NOT_CHECKED")){const splitElement=element.split("-");if(splitElement.length>1){element=splitElement[0];const atlId=splitElement[1];const registrationFormPrivacyFlags=document.getElementById("registration_form_privacyFlags");const privacyIds=registrationFormPrivacyFlags.getElementsByClassName("atlPrivacyId");for(let privacyId of privacyIds){if(privacyId.value==atlId){let splitId=privacyId.id.split("_");if(splitId.length>4){let checkBox=document.getElementById("registration_form_privacyFlags_"+splitId[3]+"_checked");checkBox.parentElement.getElementsByTagName("label")[0].style.color="red"}}}}}
16error=errorCodesList[element];if(!error){error=element}
17message+='<div class="alert alert-danger" role="alert">'+error+"</div>"})}else{message+='<div class="alert alert-danger" role="alert">'+errorCodesList.FAIL+"</div>"}
18if(register){$j("#alerts-box-register").html(message)}
19jQuery("#alerts-box").html(message)}
20var welfareManagement={init:function(){if(document.cookie==="undefined"){return}
21const splitCookies=document.cookie.split(";");let welfareCookie="";for(let thisCookie of splitCookies){if(thisCookie.trim().startsWith("websales_welfare")){let splitThisCookie=thisCookie.split("=");if(splitThisCookie.length>1){welfareCookie=splitThisCookie[1]}}}
22if(!welfareCookie.length){return}
23let getParam="welfare="+welfareCookie;$j(".siap-dynamic a").each(function(){let href=$j(this).attr("href");if(href.includes(getParam)){return!0}
24href=href+(href.includes("?")?"&":"?")+getParam;$j(this).attr("href",href)})},};$ajaxOverlay=$j(".opacity-ajax-overlay");if($ajaxOverlay.length)$ajaxOverlay.remove()

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.