PageSourceSearch

https://www.hotelalambique.com/modulos/myTrackings_V2/templates/public/js/myTrackings_V2.min.js?_=202607070800

js hotelalambique.com collected 2026-10-04 14:03:36 UTC 52,797 bytes, 2 lines download raw bytes

1function CustomMethods(){}function GenericTracker(){CustomMethods.call(this)}function TrivagoTracker(){GenericTracker.call(this)}function DataLayerTracker(){GenericTracker.call(this)}function TrackerManager(trackers){CustomMethods.call(this),this.trackers=trackers}function TrackingsMain(){CustomMethods.call(this);var trackers={splio:"undefined"!=typeof SplioTracker&&new SplioTracker,trivago:void 0!==TrivagoTracker&&new TrivagoTracker,datalayer:void 0!==DataLayerTracker&&new DataLayerTracker};this.trackerManager=new TrackerManager(trackers)}"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(target,varArgs){if(null==target)throw new TypeError("Cannot convert undefined or null to object");for(var to=Object(target),index=1;index<arguments.length;index++){var nextSource=arguments[index];if(null!=nextSource)for(var nextKey in nextSource)Object.prototype.hasOwnProperty.call(nextSource,nextKey)&&(to[nextKey]=nextSource[nextKey])}return to},writable:!0,configurable:!0}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(predicate){if(null==this)throw new TypeError('"this" is null or not defined');var o=Object(this),len=o.length>>>0;if("function"!=typeof predicate)throw new TypeError("predicate must be a function");for(var thisArg=arguments[1],k=0;k<len;){var kValue=o[k];if(predicate.call(thisArg,kValue,k,o))return kValue;k++}},configurable:!0,writable:!0}),Array.prototype.forEach||(Array.prototype.forEach=function(callback,thisArg){var T,k;if(null==this)throw new TypeError("this is null or not defined");var kValue,O=Object(this),len=O.length>>>0;if("[object Function]"!=={}.toString.call(callback))throw new TypeError(callback+" is not a function");for(2<=arguments.length&&(T=thisArg),k=0;k<len;)k in O&&(kValue=O[k],callback.call(T,kValue,k,O)),k++}),CustomMethods.prototype={_isFunction:function(value){return"function"==typeof value},_isArray:function(value){return"[object Array]"===Object.prototype.toString.apply(value)},_isObject:function(value){return"[object Object]"===Object.prototype.toString.apply(value)},_isFinite:function(value){return"number"==typeof value&&isFinite(value)},_isString:function(value){return null!=value&&"string"==typeof value.valueOf()},_has:function(obj,path){var keyParts=String(path).split(".");return!!obj&&(1<keyParts.length?this._has(obj[path.split(".")[0]],keyParts.slice(1).join(".")):Object.hasOwnProperty.call(obj,path))},_get:function(obj,path,defaultValue){if(path)return void 0===(path=(Array.isArray(path)?path:String(path).match(/([^[.\]])+/g)).reduce(function(prevObj,key){return prevObj&&prevObj[key]},obj))?defaultValue:path},_sortBy:function(arr,key){return arr.concat().sort((key=>function(a,b){return a[key]>b[key]?1:b[key]>a[key]?-1:0})(key))},_pick:function(obj,keys){return this._basePick(obj,keys)},_omit:function(obj,keys){return this._basePick(obj,keys,!0)},_basePick:function(obj,keys,isOmit){return keys?(this._isArray(keys)||(keys=[keys]),Object.keys(obj).filter(function(key){return isOmit?keys.indexOf(key)<0:0<=keys.indexOf(key)}).reduce(function(newObj,key){var newValue={};return newValue[key]=obj[key],Object.assign(newObj,newValue)},{})):{}},_first:function(arr){if(this._isArray(arr)){arr=arr.slice(0,1);if(arr.length)return arr[0]}},_last:function(arr){if(this._isArray(arr)){arr=arr.slice(-1);if(arr.length)return arr[0]}},_round:function(value,decimals){(!decimals||decimals<0)&&(decimals=0);decimals=Math.pow(10,decimals);return(Math.round((value+Number.EPSILON)*decimals)/decimals).toFixed(2)}},GenericTracker.prototype=Object.create(CustomMethods.prototype),(GenericTracker.prototype.constructor=GenericTracker).prototype.name="Tracker",Object.assign(GenericTracker.prototype,{search:{},hotel:{},reservation:{},room:{},service:{},count:{},engine:{},avail:{},availServices:{},hotels:[],filters:[],filteredHotels:[],availType:"",availQueryType:"",currentCurrency:"",error:"",hotelConfig:"",langInfo:"",availTime:"",availTimeloyalty:"",log:function(){var args;this._get(window,"availabilityReactTestingMode")&&console&&console.log&&((args=this.argumentsToArray(arguments)).unshift("["+this.name+"]"),console.log.apply(this,args))},fireImageTracker:function(params,config){var _img;this.imagePixelId&&(params=this.mountUrl(params,config),this.log("URL",params),_img=document.getElementById(this.imagePixelId))&&((config=new Image).onload=function(){_img.src=this.src},config.src=params)},mountUrl:function(params,config){var segment;return this.url?(segment=this._get(config,"segment",""),this._get(config,"prefix","")+this.url+segment+"?"+this.mountUrlParams(params)):""}
1,mountUrlParams:function(params,separator){var urlParams=[];return Object.keys(params).forEach(function(key){var value=params[key];urlParams.push(key+"="+value)}),urlParams.join(separator||"&")},fired:function(){this.log(this.action+"Fired")},notFired:function(){this.log("No se cumplen los requisitos para disparar el pixel.")},set:function(){var args=this.argumentsToArray(arguments);this.action=this._first(args),Object.assign(this,this._last(args)),this.log.apply(this,args)},requestAsync:function(method,data,headers,cb){var xhr=new XMLHttpRequest,method=(xhr.onreadystatechange=function(){4===xhr.readyState&&cb&&cb(xhr)},xhr.open(method,this.url,!0),Object.keys(headers));method.length&&method.forEach(function(name){var value=headers[name];xhr.setRequestHeader(name,value)}),xhr.send(this._isObject(data)?JSON.stringify(data):null)},argumentsToArray:function(args){return Array.prototype.slice.call(args)},getCookie:function(name){var cookie=document.cookie.split(";").find(function(cookie){return 0===cookie.indexOf(name+"=")});if(!cookie)return"";cookie=cookie.trim().substring(name.length+1);try{return decodeURIComponent(cookie)}catch(e){return cookie}},setCookie:function(name,value,daysToExpire){var expiration=new Date;expiration.setTime(expiration.getTime()+24*daysToExpire*60*60*1e3),document.cookie=name+"="+value+"; path=/; expires="+expiration.toUTCString()},getCookiesKeysByPattern:function(pattern){for(var keys=[],regex=new RegExp("^"+pattern),allCookieArray=document.cookie.split("; "),i=0;i<allCookieArray.length;i++){var key=allCookieArray[i].split("=")[0];regex.test(key)&&keys.push(key)}return keys},getConfigUrl:function(){return this._get(window,"config.url","")},setLocalStorage:function(key,data){try{localStorage.setItem(key,data||"1")}catch(e){}},getLocalStorage:function(key){try{return localStorage.getItem(key)}catch(e){return""}},getSessionStorage:function(key){try{var item=sessionStorage.getItem(key);try{return JSON.parse(item)}catch(e){return item}}catch(e){return""}},getSearchHotelCode:function(){return this._get(this.search,"hotelCode","")},getSearchRefererCode:function(){return this._get(this.search,"referer_code","")},dateToUTC:function(date){return Date.UTC(date.getFullYear(),date.getMonth(),date.getDate())},getDaysDiff:function(start,end){return Math.floor((this.dateToUTC(end)-this.dateToUTC(start))/864e5)},calcAnticipation:function(checkin){return this.getDaysDiff(new Date,checkin)},getHotelCode:function(){return this._get(this.hotel,"code","")},getHotelName:function(){return this._get(this.hotel,"name","")},getCurrency:function(){return this._get(this.hotel,"currency.code","")},getCity:function(){return this._get(this.hotel,"city","")},getCountry:function(){return this._get(this.hotel,"country","")},showTaxes:function(){return!!this._get(this.hotel,"show_taxes")},getPriceField:function(){return this.showTaxes()?"price_tax":"price"},getTotalPriceField:function(){return this.showTaxes()?"total_price_tax":"total_price"},getRoomData:function(roomId){return this._get(this.hotel,"rooms",[]).find(function(room){return room.id===roomId})},getAvailService:function(serviceId){var path=[this._get(this.hotel,"id"),this._get(this.hotel,"params.service_query_params"),"response","services"].join("."),service={};return this.availServices&&0<Object.keys(this.availServices).length?service=this._get(this.availServices,path,{}).find(function(service){return service.id===serviceId}):this.reservation&&this.reservation.services&&(service=this.reservation.services.find(function(service){return service.id===serviceId})),service||{}},getHotelBrand:function(){return this._get(this.hotel,"brand","")},getTrackingId:function(){return this._get(this.reservation,"tracking_id","")},getLocale:function(){return this._get(this.reservation,"customer.lang","").toLowerCase()},getChosenCurrency:function(){return this._get(this.reservation,"customer.chosen_currency","")},getTotalPriceTax:function(){return this._get(this.reservation,"total_price_tax",0)},getTotalPrice:function(){return this._get(this.reservation,"total_price",0)},getReservationDate:function(field){return this._has(this.reservation,field)?new Date(this.reservation[field]):new Date("")},getBookingDate:function(){return this.getReservationDate("booking_date")},getCheckin:function(){return this.getReservationDate("checkin")},getCheckout:function(){return this.getReservationDate("checkout")},getCancelDate:function(){return this.getReservationDate("update_time")}
1,getUpdateDate:function(){return"undefined"!==this.getReservationDate("update_time")&&this.getReservationDate("update_time")},getUpdateOrigin:function(){var history=this.getReservationDate("history");return this._get(history[history.length-1],"origin")?"user":"advertiser"},getStayLength:function(){var checkin=this.getCheckin(),checkout=this.getCheckout();return Math.ceil(Math.abs(checkout.getTime()-checkin.getTime())/864e5)},getRefererCode:function(){return this._get(this.reservation,"referer.code","")||this._get(this.reservation,"avail_code","")||""},getPaymentCode:function(){return this._get(this.reservation,"payment.payform_code")},getPaymentName:function(payformCode){switch(payformCode??this.getPaymentCode()){case"htl":return"hotel";case"htlng":return"hotel_without_guarantee";case"op":return"online";case"ccg":return"credit_with_guarantee";case"ccng":return"credit_without_guarantee";case"bnpl":return"nemuru";default:return"unknown"}},getPaidPoints:function(){var redeemPoints=this._get(this.reservation,"loyalty.redeem_points");return!(null==redeemPoints||!this._isFinite(redeemPoints))&&redeemPoints},getBlocks:function(){return this._get(this.reservation,"blocks",[])},getBlock:function(idx){return this.getBlocks().find(function(block){return block&&block.idx===idx})},getBlockServices:function(idx){return this._get(this.getBlock(idx),"services",[])},getRoomsCount:function(){return this._has(this.reservation,"blocks")?this.getBlocks().length:0},getServices:function(){return this._get(this.reservation,"services",[])},getOccupGroups:function(){return this._get(this.reservation,"occup_groups",[])},getGuestsCount:function(){var self=this,guestsCount=0;return this._has(this.reservation,"occup_groups")&&this.getOccupGroups().forEach(function(detailOccupGroups){self._has(detailOccupGroups,"occupancies")&&self._get(detailOccupGroups,"occupancies",[]).forEach(function(detailOccupancies){self._has(detailOccupancies,"count")&&self._isFinite(detailOccupancies.count)&&(guestsCount+=detailOccupancies.count)})}),guestsCount},getNumOfRooms:function(){var self=this,totalRooms=0;return this._has(this.reservation,"blocks")&&this._has(this.reservation,"rooms")&&this.getBlocks().forEach(function(block){self._get(block,"room_id")&&totalRooms++}),totalRooms},getRefundableText:function(policies,discountPercent,flexibleRate){var penalties=this._get(policies,"penalties"),penalties=this._get(penalties[0],"release")/24,releaseDay=new Date(this.search.start),penalties=(releaseDay.setDate(releaseDay.getDate()-penalties),new Date),releaseDay=releaseDay.getTime()-penalties.getTime(),penalties=Math.round(releaseDay/864e5)<=0,releaseDay=this._get(policies,"nr");return releaseDay||penalties||flexibleRate?releaseDay&&discountPercent<=-5&&!flexibleRate?"tarifa de oferta":"condiciones especiales":"cancelación gratuita"}
1,getLoginUser:function(){var loginUser=this._get(window,"LoginUser");return loginUser&&this._isObject(loginUser)?loginUser:{}},getLoginEmail:function(){return this._get(this.getLoginUser(),"email","")},getLoginProfileType:function(){return this._get(this.getLoginUser(),"tipo_perfil","")},getLoginProfileTypeName:function(){switch(this.getLoginProfileType()){case"1":return"corporate";case"2":return"startraveller";default:return""}},isProfileLogged:function(){return!!this.getLoginEmail()},getLoginUserId:function(){return btoa(this.getLoginEmail()+"-"+this.getLoginProfileType())},getCurrencies:function(){return this._get(window,"currencies",[])},getCurrencyData:function(code){return this.getCurrencies().find(function(currency){return currency.code===code})},getCurrencyRatio:function(code){return this._get(this.getCurrencyData(code),"ratio",1)},getCustomerRatio:function(){return this.getCurrencyRatio(this.currentCurrency)},convertPrice:function(price,fromCode,toCode){var fromCode=this.getCurrencyRatio(fromCode),toCode=this.getCurrencyData(toCode),toRatio=this._get(toCode,"ratio",1),toCode=this._get(toCode,"decimals",0);return this._round(price/fromCode*toRatio,toCode)},concatCode:function(price,toCode){var toData=this.getCurrencyData(toCode),toData=this._get(toData,"decimals",0);return this._round(price,toData)+" "+toCode},getUrlParam:function(name){var value="",name=new RegExp("[?&]"+name+"=([^&#]*)").exec(window.location.href);return value=name&&name.length?this._get(name,"[1]"):value},getHref:function(){return window.location.href},getHostName:function(){return window.location.hostname},getProtocol:function(){return window.location.protocol},getHtmlLang:function(){var htmlTag=this._first(Array.prototype.slice.call(document.getElementsByTagName("html")));if(htmlTag&&this._isFunction(htmlTag.getAttribute)){htmlTag=htmlTag.getAttribute("lang");if(this._isString(htmlTag))return htmlTag.toUpperCase()}return""},checkAdblocker:function(){return!document.getElementById("ioKcaqvOSHGE")},getBrowserLang:function(){return navigator.language||"Unknown"},getBrowserName:function(){var userAgent=navigator.userAgent;switch(!0){case-1!==userAgent.indexOf("Opera"):return"Opera";case-1!==userAgent.indexOf("MSIE"):return"Microsoft Internet Explorer";case-1!==userAgent.indexOf("Chrome"):return"Google Chrome";case-1!==userAgent.indexOf("Safari"):return"Safari";case-1!==userAgent.indexOf("Firefox"):return"Mozilla Firefox";case userAgent.lastIndexOf(" ")+1<userAgent.lastIndexOf("/"):var nameOffset=userAgent.lastIndexOf(" ")+1,versionOffset=userAgent.lastIndexOf("/");return userAgent.substring(nameOffset,versionOffset);default:return"Unknown"}},getBrowserFullVersion:function(){var browser,versionOffset,offsetInc,userAgent=navigator.userAgent,fullVersion=""+parseFloat(navigator.appVersion);switch(!0){case-1!==userAgent.indexOf("Opera"):browser="Opera",offsetInc=-1!==userAgent.indexOf("Version")?8:6;break;case-1!==userAgent.indexOf("MSIE"):browser="MSIE",offsetInc=5;break;case-1!==userAgent.indexOf("Chrome"):browser="Chrome",offsetInc=7;break;case-1!==userAgent.indexOf("Safari"):browser="Safari",offsetInc=-1!==userAgent.indexOf("Version")?8:7;break;case-1!==userAgent.indexOf("Firefox"):browser="Firefox",offsetInc=8;break;case userAgent.lastIndexOf(" ")+1<userAgent.lastIndexOf("/"):offsetInc=1;break;default:return offsetInc=!1,"Unknown"}return!1!==offsetInc&&(versionOffset=browser?userAgent.indexOf(browser):userAgent.lastIndexOf("/"),fullVersion=userAgent.substring(versionOffset+offsetInc)),fullVersion=-1!==(fullVersion=-1!==fullVersion.indexOf(";")?fullVersion.substring(0,fullVersion.indexOf(";")):fullVersion).indexOf(" ")?fullVersion.substring(0,fullVersion.indexOf(" ")):fullVersion},getViewPortValues:function(){return{width:Math.max(document.documentElement.clientWidth,window.innerWidth||0),height:Math.max(document.documentElement.clientHeight,window.innerHeight||0)}},getOSName:function(){var appVersion=navigator.appVersion;switch(!0){case-1!==appVersion.indexOf("Win"):return"Windows";case-1!==appVersion.indexOf("Mac"):return"MacOS";case-1!==appVersion.indexOf("Linux"):return"Linux";case-1!==appVersion.indexOf("X11"):return"Unix";default:return"Unknown"}},getDevice:function(){return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series([46])0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br([ev])w|bumb|bw-([nu])|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do([cp])o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly([-_])|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-([mpt])|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c([- _agpst])|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac([ \-\/])|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja([tv])a|jbro|jemu|jigs|kddi|keji|kgt([ \/])|klon|kpt |kwc-|kyo([ck])|le(no|xi)|lg( g|\/([klu])|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t([- ov])|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30([02])|n50([025])|n7(0([01])|10)|ne(([cm])-|on|tf|wf|wg|wt)|nok([6i])|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan([adt])|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c([-01])|47|mc|nd|ri)|sgh-|shar|sie([-m])|sk-0|
1sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel([im])|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c([- ])|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(navigator.userAgent.substr(0,4))?600<window.innerWidth?"tablet":"mobile":"desktop"},padLeftDate:function(value){return String("00"+value).slice(-2)}}),TrivagoTracker.prototype=Object.create(GenericTracker.prototype),(TrivagoTracker.prototype.constructor=TrivagoTracker).prototype.name="Trivago",Object.assign(TrivagoTracker.prototype,CustomMethods.prototype),Object.assign(TrivagoTracker.prototype,{url:"https://secde.trivago.com/tracking/booking",anaKey:{418:"6f56bc5e-7eb1-4dbc-a10b-6add09c57023",516:"6abb4af2-2b85-44c4-898f-5dabb792bfdb",1808:"2ff827d7-6769-4594-b45d-0633ea40780a",2626:"8ad44cdb-d54a-47da-8aa4-c9e5a9020a73",3104:"db179610-d822-4f0c-a6b7-ad0690ec1581",3702:"e730503f-babd-4b6b-80f8-85185cc55eb5"},hasReferer:function(){var referer=this.getRefererCode();return/TRIVAGO/.test(referer)},getRef:function(){this.getConfigUrl();var ref,brand=this.getHotelBrand();return"eurostarshotels"===brand&&(ref=418),"exehotels"===brand&&(ref=2626),"eurostarshotelcompany"===brand&&(ref=516),"crisol"===brand&&(ref=516),"ikonikhotels"===brand&&(ref=516),"tandemapartments"===brand&&(ref=516),ref=void 0===(ref="aurea"===brand?3702:ref)?1808:ref},getAnaKey:function(){return this._get(this.anaKey,this.getRef(),"")},toSeconds:function(date){return Math.round(date.getTime()/1e3)},getTrvReference:function(){return this._get(this.reservation,"customer.trv_reference")},getProto:function(){return Object.getPrototypeOf(Object.getPrototypeOf(this))},getCheckin:function(){return this.toSeconds(this.getProto().getCheckin.call(this))},getCheckout:function(){return this.toSeconds(this.getProto().getCheckout.call(this))},getBookingDate:function(){return this.toSeconds(this.getProto().getBookingDate.call(this))},getCancelDate:function(){return this.toSeconds(this.getProto().getCancelDate.call(this))},getUpdateDate:function(){return this.toSeconds(this.getProto().getUpdateDate.call(this))},getHeaders:function(){return{"X-Trv-Ana-Key":this.getAnaKey(),"Content-Type":"application/json"}},getCommonData:function(isCancel,isModify){var hotelCode=this.getHotelCode(),hotelCode={trv_reference:this.getTrvReference(),advertiser_id:this.getRef(),hotel:hotelCode,arrival:this.getCheckin(),departure:this.getCheckout(),booking_date:this.getBookingDate(),volume:this.convertPriceToCustomer(this.getTotalPriceTax()),currency:this.getChosenCurrency(),locale:this.getLocale(),number_of_rooms:this.getNumOfRooms(),channel:"lpadv",booking_id:hotelCode+"-"+this.getTrackingId()};return isCancel&&(hotelCode.cancellation_date=this.getCancelDate(),hotelCode.refund_amount=this.getTotalPriceTax()),isModify&&(hotelCode.update_date=this.getUpdateDate(),hotelCode.update_origin=this.getUpdateOrigin()),hotelCode},getRequestMethod:function(isCancel,isModified){return isCancel?"DELET
1E":isModified?"PUT":"POST"},getErrorMsg:function(xhr){return"Request error: "+this._get(xhr,"status",0)+" - "+this._get(xhr,"responseText","Undefined")},parseReponseText:function(xhr){var response;try{response=JSON.parse(xhr.responseText)}catch(e){response={state:"FAILED",errorMessage:"Invalid response: "+xhr.responseText}}return response},parseResponse:function(isCancel){var me=this;return function(xhr){var response;xhr.status===(isCancel?200:201)?"OK"===(response=me.parseReponseText(xhr)).state?me.fired():me.log("Request error: ",xhr.status," - ",me._get(response,"errorMessage","Undefined")):me.log(me.getErrorMsg(xhr))}},send:function(isCancel,isModified){this.requestAsync(this.getRequestMethod(isCancel,isModified),this.getCommonData(isCancel,isModified),this.getHeaders(),this.parseResponse(isCancel))},getLocale:function(){return this._get(this.reservation,"customer.POS","")},confirmedBookingAction:function(){this._get(this.reservation,"tracking_id",!1)&&(this.getTrvReference()&&this.getRef()?this.getUpdateDate()?this.send(!1,!0):this.send():this.notFired())},confirmedBookingCancellation:function(){this._get(this.reservation,"tracking_id",!1)&&(this.getTrvReference()?this.send(!0,!1):this.notFired())},convertPriceToCustomer:function(price){var hotelCurrencyCode=this.getCurrency(),currentCurrencyCode=this.getChosenCurrency();return this.convertPrice(price,hotelCurrencyCode,currentCurrencyCode)}}),DataLayerTracker.prototype=Object.create(GenericTracker.prototype),(DataLayerTracker.prototype.constructor=DataLayerTracker).prototype.name="DataLayer",Object.assign(DataLayerTracker.prototype,{events:{search:"search",multihotel:"multihotel",filter:"filter",selectHotel:"select_hotel",monohotel:"monohotel",cartAdd:"card_add",cartDel:"cart_del",form:"form",confirm:"confirm",confirmError:"confirm_error",purchase:"purchase",tdd:"tdd",payment:"payment",login:"login",logout:"logout",loginError:"login_error"},actions:{filters:{set:"set",unset:"unset"}},cartEventType:"",availRaw:{},availFlexibleRaw:{},availServicesRaw:{},euroCode:"EUR",getDataLayer:function(){return this._get(window,"dataLayer")},isInitialized:function(){var initialized=this._isArray(this.getDataLayer());return initialized||this.notFired(),initialized},addLayerData:function(cb,avoidFired){var dataLayer;this.isInitialized()&&(cb=this._isFunction(cb)?cb():cb,dataLayer=this.getDataLayer(),this._isArray(dataLayer)?dataLayer.push(cb):this.log("[Error]","Invalid dataLayer / Not initialized",dataLayer),avoidFired||this.fired())},splitDate:function(date){return{day:this.padLeftDate(date.getDate()),month:this.padLeftDate(date.getMonth()+1),year:date.getFullYear().toString()}},getCommonData:function(event){var now=new Date,now=this.toSeconds?this.toSeconds(now):Math.floor(now.getTime()/1e3);return{event:event,date:this.getDateTime(),timestamp:now,adblocker:this.checkAdblocker(),ga_idclient:this.getCookie("_ga"),site:this.getSiteData(event),user:this.getUserData(),login:this.getLoginData(),customer:this.getCustomerData(),browser:this.getBrowserData(),search:Object.assign(this.getSearchData(),this.getOccupSelection()),referer_code:this.getUrlParam("referer_code"),promo_code:this.getUrlParam("promotion_code"),td:this.getUrlParam("referer_code"),tds:this.getCookiesKeysByPattern("tds_"),tdd:this.getCookiesKeysByPattern("tdd_"),clickId:this.getClickId(),brand:this.getHotelBrand(),avail_time:this.availTime,avail_time_loyalty:this.availTimeloyalty}},getClickId:function(){for(var params=["msclkid","trv_reference","clickID","refid","gclid","yclid"],param="",i=0;i<params.length&&!(param=this.getUrlParam(params[i]));i++);return param},getUserData:function(){var userId=this.isProfileLogged()?this.getLoginUserId():"",existsUserId=userId&&this.getLocalStorage(userId);return userId&&!existsUserId&&this.setLocalStorage(userId),{id:userId,new:!!userId&&!existsUserId,return:!!userId&&existsUserId}},toSeconds:function(date){return Math.round(date.getTime()/1e3)},getLoginData:function(){return{logged:this.isProfileLogged(),type:this.getLoginProfileTypeName(),email:this.getLoginEmail()}},getSiteData:function(event){var event=this.getCurrentStep(event),siteData={page:this.getHref(),lang:this.getHtmlLang()};return this._isFinite(event)&&Object.assign(siteData,{step:event}),siteData},getDateTime:function(){var now=new Date;return[this.padLeftDate(now.getHours()),this.padLeftDate(now.getMinutes()),this.padLeftDate(now.getSeconds())].join(":")+" "+[this.padLeftDate(now.getDate()),this.padLeftDate(now.getMonth()+1),now.getFullYear()].join("/")},getBrowserData:function(){return{name:this.getBrowserName(),version:this.getBrowserFullVersion(),os:this.getOSName(),lang:this.getBrowserLang(),device:this.getDevice(),viewport:this.getViewPortValues()}},getHotelsInfoName:function(type,fromEngine){var entityKey,valueKey;switch(type){case"city":entityKey="cities",valueKey="city_id";break;case"country":entityKey="countries",valueKey="country_id";break;default:entityKey="hotels",valueKey="hotel_id"}var type=fromEngine?this.engine:this.search,fromEngine=this._get(window,"hotels_info."+entityKey),value=this._get(type,valueKey);if(value&&fromEngine){type=fromEngine.find(function(elem){return elem.id===+value});
1if(type&&type.name)return type.name}return""},getSearchData:function(){var self=this,checkin=new Date(this._get(this.search,"start")),checkout=new Date(this._get(this.search,"end")),hotelCodes=this._get(this.search,"hotelCodes",[]),hotelsInfo=this._get(window,"hotels_info.hotels",[]);return{nights:this.getDaysDiff(checkin,checkout),country:this.getHotelsInfoName("country"),city:this.getHotelsInfoName("city"),anticipation:this.calcAnticipation(checkin),checkin:this.splitDate(checkin),checkout:this.splitDate(checkout),hotels:hotelCodes?hotelCodes.reduce(function(hotels,hotelCode){var hotelData=hotelsInfo.find(function(hotel){return hotel.code===hotelCode});return hotelData&&hotels.push(self._pick(hotelData,["name","code"])),hotels},[]):[]}},getOccupSelection:function(){var self=this,segments=this._get(this.search,"occups",{});return Object.keys(segments).reduce(function(occupancies,key){key=segments[key];return occupancies.adults+=self._get(key,"adults",0),occupancies.children+=self._get(key,"childs",0),occupancies},{adults:0,children:0,rooms:Object.keys(segments).length})},getCurrentStep:function(event){switch(event){case this.events.multihotel:case this.events.filter:case this.events.selectHotel:return 0;case this.events.monohotel:case this.events.cartAdd:case this.events.cartDel:return"service"===this.type?2:1;case this.events.form:case this.events.confirm:case this.events.confirmError:return 3;case this.events.purchase:return 4;default:return null}},parseCustomerData:function(data){try{var parsed=JSON.parse(data);if(this._has(parsed,"ClientIP")&&this._has(parsed,"CountryCode"))return parsed}catch(e){}return null},getCustomerData:function(){var request,storageData=this.getLocalStorage("currency_country"),storageData=(storageData||this.getLocalStorage("currency_country_v2"),this.parseCustomerData(storageData));return storageData||((request=new XMLHttpRequest).open("GET","https://synergy.booking-channel.com/api/cms/check_ip_user",!1),request.setRequestHeader("Accept","application/json"),request.send(null),200===request.status&&(storageData=this.parseCustomerData(request.responseText))&&this.setLocalStorage("currency_country",JSON.stringify(storageData))),storageData||{ip:"",country:""}},convertEngineData:function(){var self=this,occupRegEx=new RegExp("^guests\\[(\\d+)]\\[(\\w+)]$");this.search=Object.assign({hotelCodes:this._has(this.engine,"hotels")?this._get(this.engine,"hotels"):[this._get(this.engine,"id_hotel")],occups:Object.keys(this.engine).reduce(function(occups,key){var value=self.engine[key],key=key.match(occupRegEx);return key&&(occups[key[1]]||(occups[key[1]]={}),occups[key[2]]||(occups[key[2]]={}),occups[key[1]][key[2]]=value),occups},{})},this._pick(this.engine,["start","end","city_id","country_id"]))},getHotelQueryString:function(hotelId,query){return this._get(this.hotels,hotelId+".params."+(query||"query_params"))},getHotelServicesQueryString:function(hotelId){return this._get(this.hotels,hotelId+".params.service_query_params")},setAvailRawResponses:function(hotelId,avail){var queryString=this.getHotelQueryString(hotelId,this.availQueryType);this.availRaw[hotelId]=this._get(avail,queryString+".raw_response")},setAvailFlexibleRawResponses:function(hotelId,avail){var queryString=this.getHotelQueryString(hotelId);this.availFlexibleRaw[hotelId]=this._get(avail,queryString+".flexible_raw_response")},setAvailRoomsData:function(avail,hotelRooms,availRoomsData,flexibleRate){var self=this,showAvailPriceAs=this.hotelConfig.getIn(["show_avail_price_as",this.langInfo,"translatable_value"],"total");function calculateDailyPrices(roomDays,field){roomDays=roomDays.map(function(day){day=self._first(self._sortBy(day.boards,"price_tax"));return self._get(day,field)});return{pricePerNight:Math.min.apply(null,roomDays),averagePrice:roomDays.reduce(function(sum,price){return sum+price},0)/roomDays.length}}avail.rooms.forEach(function(room){var priceShown,roomDays=self._get(room,"days",[]),numberOfNights=self.getDaysDiff(new Date(self.search.start),new Date(self.search.end)),pricesWithTax=calculateDailyPrices(roomDays,"price_tax"),pricesWithoutTax=calculateDailyPrices(roomDays,"price");
1switch(showAvailPriceAs=numberOfNights<=1?"total":showAvailPriceAs){case"noche":priceShown="Night_price";break;case"media":priceShown="Medium_price";break;default:priceShown="Price"}var roomBoards=self._get(room,"boards",[]),roomBoards=self._get(room,"free_breakfast")?roomBoards.filter(function(room){return"14"!==room.board_code}):roomBoards,roomBoards=self._first(self._sortBy(roomBoards,"price_tax")),policies=self._get(roomBoards,"policies"),discountPercent=self._get(roomBoards,"discount_percent"),roomId=self._get(room,"room_id"),occupGroupId=self._get(avail,"occup_group_id"),room=hotelRooms.find(function(room){return room.id===roomId}),room=self._get(room,"code"),price=self._get(roomBoards,self.getPriceField()),discountAmount=self._get(roomBoards,"discount_amount",0),taxAmount=self._get(roomBoards,"tax_amount"),roomDays=(roomDays=>self._get(roomDays,"[0].boards[0].taxes_included",null))(roomDays),hotelRoomOccup=hotelRooms.find(function(room){return room.id===roomId&&room.occup_group_id===occupGroupId&&null===room.service_id}),hotelRoomOccup=self._get(hotelRoomOccup,"name");availRoomsData.push({id:roomId,code:room,name:hotelRoomOccup,description:self._get(roomBoards,"board_name"),refundable_text:self.getRefundableText(policies,discountPercent,flexibleRate,roomId),discount:self.convertPriceToEuro(discountAmount),taxes:self.convertPriceToEuro(taxAmount),currency:self.currentCurrency,ratio:self.getCustomerRatio(),price_eur:self.convertPriceToEuro(price),price:self.convertPriceToCustomer(price),Night_price:self.convertPriceToCustomer(pricesWithoutTax.pricePerNight),Night_price_tax:self.convertPriceToCustomer(pricesWithTax.pricePerNight),Medium_price:self.convertPriceToCustomer(pricesWithoutTax.averagePrice),Medium_price_tax:self.convertPriceToCustomer(pricesWithTax.averagePrice),Price_Shown:priceShown,taxes_included:roomDays,nights:numberOfNights,occup_group_id:occupGroupId,service_id:null,originalPrice:price,originalDiscount:discountAmount,originalTaxAmount:taxAmount})})},setAvailServicesRawResponses:function(hotelId,avail){var queryString=this.getHotelServicesQueryString(hotelId);this.availServicesRaw[hotelId]=this._get(avail,queryString+".response")},splitHotelsByAvail:function(){var self=this;return Object.keys(this.avail).reduce(function(hotels,hotelId){var avail=self.avail[hotelId];return self.setAvailRawResponses(hotelId,avail),hotels[!!Object.keys(self.availRaw[hotelId]).find(function(pos){return self.availRaw[hotelId][pos].success})?"withAvail":"withoutAvail"].push(hotelId),hotels},{withAvail:[],withoutAvail:[]})},getCurrentHotelId:function(){var self=this,hotelCode=this._get(this.search,"hotelCode",""),hotelKey=Object.keys(this.hotels).find(function(hotelId){return self.hotels[hotelId].code===hotelCode});return this._get(this.hotels,hotelKey+".id")},getAvailRoomsData:function(){var self=this,hotelId=this.getCurrentHotelId(),hotelRooms=this._get(this.hotel,"rooms"),occupancies=this.getOccupSelection(),totalOccups=occupancies.adults+occupancies.children,availRoomsData=(this.setAvailRawResponses(hotelId,this.avail[hotelId]),this.setAvailFlexibleRawResponses(hotelId,this.avail[hotelId]),this.setAvailServicesRawResponses(hotelId,this.availServices[hotelId]),[]),availRoomServicesData=(this.availRaw[hotelId].forEac
1h(function(avail){avail.success&&self._has(avail,"rooms")&&self.setAvailRoomsData(avail,hotelRooms,availRoomsData,0)}),this.availFlexibleRaw[hotelId]&&this.availFlexibleRaw[hotelId].forEach(function(avail){avail.success&&self._has(avail,"rooms")&&self.setAvailRoomsData(avail,hotelRooms,availRoomsData,1)}),[]);return this.availServicesRaw[hotelId]&&this.availServicesRaw[hotelId].success&&this._get(this.availServicesRaw[hotelId],"services",[]).forEach(function(service){self._get(service,"restrict_by_room_occup",!1)&&self._get(service,"restrictions_room_occup",[]).forEach(function(roomOccupRestriction){var roomData,serviceId,price,discountAmount,taxAmount,serviceType;self._get(roomOccupRestriction,"show_as_room")&&(roomData=availRoomsData.find(function(roomData){return roomData.id===self._get(roomOccupRestriction,"room_occup_room_id")&&roomData.occup_group_id===self._get(roomOccupRestriction,"room_occup_occup_group_id")}))&&(serviceId=self._get(service,"id"),serviceType=self._get(service,"type"),price=self._get(service,self.getPriceField()),discountAmount=self._get(service,"discount",0),taxAmount=self._get(service,"tax_amount"),"Per person night"!==serviceType&&"Per person per night"!=serviceType||(price*=totalOccups,discountAmount*=totalOccups,taxAmount*=totalOccups),price+=roomData.originalPrice,discountAmount+=roomData.originalDiscount,taxAmount+=roomData.originalTaxAmount,serviceType=hotelRooms.find(function(room){return room.id===roomData.id&&room.occup_group_id===roomData.occup_group_id&&room.service_id===serviceId}),serviceType=self._get(serviceType,"name"),availRoomServicesData.push(Object.assign({},roomData,{name:serviceType,discount:self.convertPriceToEuro(discountAmount),taxes:self.convertPriceToEuro(taxAmount),price_eur:self.convertPriceToEuro(price),price:self.convertPriceToCustomer(price),service_id:serviceId})))})}),availRoomsData.concat(availRoomServicesData)},sortByPrice:function(entities){var self=this;return entities.concat().sort(function(a,b){return self.removePriceCurrency(a.price)-self.removePriceCurrency(b.price)}).reduce(function(entities,entity,idx){return entities[idx+1]=entity,entities},{})},getHotelSelected:function(){var price=this._get(this.reservation,this.getPriceField(),0);return{hotel_selected:{code:this.getHotelCode(),name:this.getHotelName(),price_eur:this.convertPriceToEuro(price),price:this.convertPriceToCustomer(price)}}},convertPriceToCustomer:function(price){var hotelCurrencyCode=this.getCurrency(),currentCurrencyCode=this.currentCurrency,price=this.convertPrice(price,hotelCurrencyCode,currentCurrencyCode);return this.formatPriceCustomer(price)},formatPriceCustomer:function(price){return price+" "+this.currentCurrency},convertPriceToEuro:function(price){var hotelCurrencyCode=this.getCurrency(),toCurrency=this.euroCode;return this.convertPrice(price,hotelCurrencyCode,toCurrency)},getHotelsInfo:function(hotelIds,config){var self=this,sort=this._get(config,"sort",!1),extended=this._get(config,"extended",!1),config=hotelIds.reduce(function(hotelsData,hotelId){var hotelData,minPrice;return self.hotel=self._get(self.hotels,hotelId),self.hotel&&(hotelData={code:self.getHotelCode(),name:self.getHotelName()},extended&&(minPrice=Object.keys(self.availRaw[hotelId]).filter(function(pos){return self.availRaw[hotelId][pos].success}).reduce(function(minPrice,pos){pos=self.availRaw[hotelId][pos],pos=self._get(pos,"rooms.0.boards.0."+self.getPriceField());return minPrice=pos&&pos<minPrice?pos:minPrice},Number.MAX_VALUE),Object.assign(hotelData,{price:self.convertPriceToCustomer(minPrice),price_eur:self.convertPriceToEuro(minPrice)})),hotelsData.find(function(data){return data===hotelData})||hotelsData.push(hotelData)),hotelsData},[]);return config=sort?this.sortByPrice(config):config},getHotelRooms:function(occupGroupIds){var self=this,hotelId=this.getCurrentHotelId();return this.hotels[hotelId].rooms.reduce(function(rooms,room){return-1<occupGroupIds.indexOf(room.occup_group_id)&&-1===rooms.findIndex(item=>item.id===room.id&&item.name===room.name&&item.service_id===room.service_id)&&rooms.push({id:self._get(room,"id",0),name:self._get(room,"name",""),code:self._get(room,"code",""),service_id:self._get(room,"service_id",null)}),rooms},[])},getFiltersData:function(action){var self=this,allHotelCodes=[],label=[],notFiltered=(Object.keys(this.filters).forEac
1h(function(type){var filter=self.filters[type],typeLabel=[];Object.keys(filter.options).forEach(function(optionKey){var optionKey=filter.options[optionKey];optionKey.hotels.forEach(function(hotel){-1===allHotelCodes.indexOf(hotel)&&allHotelCodes.push(hotel)}),optionKey.checked&&(optionKey=optionKey.name,"stars"===type&&(optionKey=optionKey.replace(/\D/g,"")),typeLabel.push(optionKey))}),typeLabel.length&&label.push(typeLabel.join(","))}),allHotelCodes.filter(function(hotelCode){return-1===self.filteredHotels.indexOf(String(hotelCode))}));return Object.assign(this.getCommonData(this.events.filter),{label:label.join(";"),action:action,hotels_filtered:this.getHotelsInfo(this.filteredHotels,{sort:!0,extended:!0}),hotels_not_filtered:this.getHotelsInfo(notFiltered,{extended:!0})})},removePriceCurrency:function(price){return+price.replace(/[^\d.]/g,"")},getPriceData:function(block){var discountField="room"===this.type?"discount_amount":"discount",price=this._get(block,this.getPriceField(),0),discountField=this._get(block,discountField,0),block=this._get(block,"price_tax",0)-this._get(block,"price",0);return{discount:this.convertPriceToEuro(discountField),taxes:this.convertPriceToEuro(block),currency:this.currentCurrency,price_eur:this.convertPriceToEuro(price),price:this.convertPriceToCustomer(price)}},getProductData:function(block){var roomId=this._get(block,"room_id"),roomId=this.getRoomData(roomId),priceData=this.getPriceData(block);return Object.assign({position:null,code:this._get(roomId,"code",""),name:this._get(roomId,"name",""),description:this._get(roomId,"description",""),refundable:this._get(block,"refundable",!1),originalPrice:priceData.originalPrice},priceData)},getExtraData:function(blockService){var serviceId=(serviceId=this._get(blockService,"service_id"))||this._get(blockService,"id"),blockService=this.getAvailService(serviceId),serviceId=!!this._get(blockService,"is_package",!1);return Object.assign({position:null,id:this._get(blockService,"id",0),name:this._get(blockService,"name",""),type:this._get(blockService,"type",""),category:serviceId?"package":"supplement",sub_category:this._get(blockService,"category_name",""),quantity:this.count||0},this.getPriceData(blockService))},getCartKey:function(idx){return"room"===this.type?this.getProductKey(idx):this.getExtraKey(idx)},getProductKey:function(idx){return"product_"+idx},getExtraKey:function(idx){return"extra_"+idx},getCartElementData:function(data){return"room"===this.type?this.getProductData(data):this.getExtraData(data)},sortCart:function(cart){var entities=Object.keys(cart).reduce(function(result,key){var value=cart[key];return/^product_\d+$/.test(key)?result.products.push(value):result.extras.push(value.id),result},{products:[],extras:[]}),sortedProducts=this._sortBy(entities.products,"originalPrice"),entities=entities.extras.slice().sort();return sortedProducts.forEach(function(product,idx){var key=Object.keys(cart).find(function(key){return cart[key]===product});key&&(cart[key].position=idx+1)}),entities.forEach(function(extraId,idx){var key=Object.keys(cart).find(function(key){return cart[key].hasOwnProperty("id")&&cart[key].id===extraId});key&&(cart[key].position=idx+1)}),cart},getCurrentCart:function(config){var self=this,remove=this._get(config,"remove",!1),tracking=this._get(config,"tracking",!1),payment=this._get(config,"payment",!1),error=this._get(config,"error",!1),parse=this._get(config,"parse",!0),config=this._get(config,"pay_points",!1),roomIdx=1,serviceIdx=1,totalPrice=0,totalPriceEur=0,cartProductCurrency="",cart=this.getBlocks().reduce(function(cart,block){var totalOccups,blockIdx=self._get(block,"idx"),addedRoomIdx=self._get(self.room,"idx");return!self._has(block,"room_id")||remove&&blockIdx===addedRoomIdx||(addedRoomIdx=self.getProductKey(roomIdx),cart[addedRoomIdx]=self.getProductData(block),cartProductCurrency=cart[addedRoomIdx].currency,totalPrice+=self.removePriceCurrency(cart[addedRoomIdx].price),totalPriceEur+=+cart[addedRoomIdx].price_eur,roomIdx++,block=self.getOccupSelection(),totalOccups=block.adults+block.children,self.getBlockServices(blockIdx).forEac
1h(function(service){var serviceId=self._get(service,"service_id"),addedServiceId=self._get(self.service,"service_id"),quantity=self._get(service,"quantity"),availService=(self._get(service,"type")||(availService=self.getAvailService(self._get(service,"service_id")),0!==Object.keys(availService).length&&(service=availService)),self._get(service,"type")),addedServiceId=addedServiceId||self._get(self.service,"id");remove&&serviceId===addedServiceId||(serviceId=self.getExtraKey(serviceIdx),cart[serviceId]=self.getExtraData(service),addedServiceId=self.removePriceCurrency(cart[serviceId].price),service=cart[serviceId].price_eur,addedServiceId*=quantity,service*=quantity,"person"!=availService&&"person_night"!=availService&&"Per person"!=availService&&"Per person night"!=availService&&"Per person per night"!=availService||(addedServiceId*=totalOccups=0==totalOccups?self.reservation.occup_groups.reduce((acc,group)=>acc+group.occupancies.reduce((acc,occupancy)=>acc+occupancy.count,0),0):totalOccups,service*=totalOccups),totalPrice+=addedServiceId,totalPriceEur+=+service,serviceIdx++)})),cart},{}),tracking=tracking?{tracking_id:this._get(this.reservation,"tracking_id")}:{},payment=payment?{payment:this.getPaymentName()}:{},error=error?{error:this.error}:{};return Object.assign(tracking,payment,error,{price:parse?this.concatCode(totalPrice,cartProductCurrency):totalPrice,price_eur:parse?this._round(totalPriceEur,2).toString():totalPriceEur,pay_points:!!config&&this.getPaidPoints(),cart:parse?this.sortCart(cart):cart})},getCartNextIndex:function(cartData){var filteredKeys=[],filter="room"===this.type?/^product_\d+$/:/^extra_\d+$/,maxIdx=0;return(filteredKeys=cartData.cart?Object.keys(cartData.cart).filter(function(key){return filter.test(key)}):filteredKeys).length&&(cartData=filteredKeys.map(function(key){return+key.replace(/\D+/,"")}),maxIdx=Math.max.apply(this,cartData)),maxIdx+1},getAddRemoveCartData:function(cartData,remove){var idx=remove?1:this.getCartNextIndex(cartData),idx=this.getCartKey(idx),entity="room"===this.type?this.room:this.service,entity=this.getCartElementData(entity),prefixKey=remove?"removed":"cart",prefixKey=(cartData[prefixKey]||(cartData[prefixKey]={}),cartData[prefixKey][idx]=entity,cartData.price),idx=cartData.price_eur,occupancies=this.getOccupSelection(),occupancies=occupancies.adults+occupancies.children;return remove||(!entity.type||"Per person"!=entity.type&&"Per person night"!=entity.type&&"Per person per night"!=entity.type?(prefixKey+=this.removePriceCurrency(entity.price),idx+=+entity.price_eur):(remove=this.removePriceCurrency(entity.price),entity=entity.price_eur,prefixKey+=remove*=occupancies,idx+=entity*=occupancies)),cartData.price=parseFloat(prefixKey.toFixed(2)),cartData.price_eur=parseFloat(idx.toFixed(2)),cartData.cart=this.sortCart(cartData.cart),this._has(cartData,"removed")&&(cartData.removed=this.sortCart(cartData.removed)),cartData},getCartCommonData:function(remove){var event=remove?this.events.cartDel:this.events.cartAdd,cartData=this.getCurrentCart({remove:remove,parse:!1});return Object.assign(this.getCommonData(event),this.getAddRemoveCartData(cartData,remove))},getCartRoomCommonData:function(remove){return this.type="room",this.service={},this.getCartCommonData(remove)},getCartServiceCommonData:function(remove){return this.type="service",this.room={},this.getCartCommonData(remove)},fixEarlierVersion:function(value){switch(!0){case"update"===value:return 2;case"create"===value:return 1;case!("number"==typeof+value&&isFinite(+value)):return 0;default:return+value}},checkTDD:function(key){var cookieName=(key=key||"tdd")+"_"+(this.getUrlParam("referer_code")||"d00di00"),cookieValue=this.fixEarlierVersion(this.getCookie(cookieName));this.setCookie(cookieName,cookieValue+=1,30),this.addLayerData({event:this.events[key]},!0)},engineSearch:function(){this.convertEngineData(),this.addLayerData(this.getCommonData(this.events.search))},showAvail:function(){var roomsWithAvail,roomDataWithAvail,roomDataWithoutAvail,omitFields,hotelId,occupGroupIds,self=this;this.checkTDD(),occupGroupIds="mono"===this.availType?(hotelId=this.getCurrentHotelId(),this.hotel=this._get(this.hotels,hotelId),hotelId=this.events.monohotel,occupGroupIds=(roomsWithAvail=this.getAvailRoomsData()).reduce(function(occupGroupIds,room){return-1===occupGroupIds.indexOf(room.occup_group_id)&&occupGroupIds.push(room.occup_group_id),occupGroupIds},[]),occupGroupIds=this.getHotelRooms(occupGroupIds),roomDataWithAvail=[],roomDataWithoutAvail=[],omitFields=["id","occup_group_id","service_id","originalPrice","originalTaxAmount","originalDiscount"],occupGroupIds.forEach(function(room){var data,roomDataExtended=roomsWithAvail.filter(function(roomWithAvail){return roomWithAvail.id===room.id&&roomWithAvail.name===room.name&&roomWithAvail.service_id===room.service_id}).reduce(function(prev,current){return parseFloat(prev.price_eur)<parseFloat(current.price_eur)?prev:current},{});roomDataExtended&&0!==Object.keys(roomDataExtended).length?(data=self._omit(roomDataExtended,omitFields),roomDataWithAvail.find(function(roomData){return roomData===data})||roomDataWithAvail.push(data)):(data=self._omit(room,omitFields),roomDataWithoutAvail.find(function(roomData){return roomData===data})||roomDataWithoutAvail.push(data))}),{search_availability:!!roomsWithAvail.length,avail_type:"standard",rooms_with_avail:this.sortByPrice(roomDataWithAvail),rooms_without_avail
1:roomDataWithoutAvail}):(hotelId=this.events.multihotel,{search_availability:!!(occupGroupIds=this.splitHotelsByAvail()).withAvail.length,hotels_with_avail:this.getHotelsInfo(occupGroupIds.withAvail,{sort:!0,extended:!0}),hotels_without_avail:this.getHotelsInfo(occupGroupIds.withoutAvail)}),this.addLayerData(Object.assign(this.getCommonData(hotelId),occupGroupIds))},loginAction:function(){var data=Object.assign(this.getAuthBasePayload(this.events.login),this.getLoginUserData());try{sessionStorage.setItem("st_login_event",JSON.stringify(data))}catch(e){}this.setLocalStorage("st_login_event",JSON.stringify(data)),this.addLayerData(data)},logoutAction:function(){var data=Object.assign(this.getAuthBasePayload(this.events.logout),this.getLoginUserData());try{sessionStorage.setItem("st_logout_event",JSON.stringify(data))}catch(e){}this.setLocalStorage("st_logout_event",JSON.stringify(data)),this.addLayerData(data)},loginErrorAction:function(){var data=Object.assign(this.getAuthBasePayload(this.events.loginError),{language:this.language||this.getHtmlLang()||"ES",user_id:this.user_id||this.id||""});try{sessionStorage.setItem("st_login_error_event",JSON.stringify(data))}catch(e){}this.setLocalStorage("st_login_error_event",JSON.stringify(data)),this.addLayerData(data)},addFilterAction:function(){this.addLayerData(this.getFiltersData(this.actions.filters.set))},delFilterAction:function(){this.addLayerData(this.getFiltersData(this.actions.filters.unset))},addRoomAction:function(){this.addLayerData(this.getCartRoomCommonData())},delRoomAction:function(){this.addLayerData(this.getCartRoomCommonData(!0))},addServiceAction:function(){this.addLayerData(this.getCartServiceCommonData())},delServiceAction:function(){this.addLayerData(this.getCartServiceCommonData(!0))},customerDataCommonAction:function(event,config){this.addLayerData(Object.assign(this.getCommonData(event),this.getCurrentCart(config)))},customerDataAction:function(){this.checkTDD("tdf"),this.customerDataCommonAction(this.events.form,{parse:!0})},confirmCustomerDataAction:function(){this.customerDataCommonAction(this.events.confirm,{tracking:!0,pay_points:!0})},confirmErrorAction:function(){this.customerDataCommonAction(this.events.confirmError,{tracking:!0,error:!0,pay_points:!0})},confirmedBookingAction:function(){this.customerDataCommonAction(this.events.purchase,{tracking:!0,payment:!0,pay_points:!0})},paymentAction:function(){var paymentName=this.getPaymentName(this.newSelectedPayform),now=new Date,now=this.toSeconds?this.toSeconds(now):Math.round(now.getTime()/1e3);this.addLayerData(Object.assign({event:this.events.payment,payment_type:paymentName&&"unknown"===paymentName?this.newSelectedPayform:paymentName,timestamp:now,payment_status:this.pciFrameLoaded,payment_save:!!this.hasStoredCards}))},getAuthBasePayload:function(eventName){var now=new Date;return{event:eventName,timestamp:String(this.toSeconds(now)),date:this.getDateTime(),adblocker:this.checkAdblocker(),ga_idclient:this.getCookie("_ga"),site:this.getLoginSiteData(),customer:this.getCustomerData(),browser:this.getBrowserData()}},getLoginUserData:function(){return{email:this.email||this.getLoginEmail()||"",language:this.language||this.getHtmlLang()||"ES",name:this.name||"",surname:this.surname||"",tier:this.tier||{},user_id:this.user_id||this.id||""}},getLoginSiteData:function(){var datalayerStep=this._get(window,"datalayerStep",{}),datalayerStep=this._get(datalayerStep,"step")||"e0";return{page:this.getHref(),lang:this.language||this.getHtmlLang()||"ES",step:datalayerStep,prestep:this.getSessionStorage("datalayer_OldPrestep")||"e0"}}}),TrackerManager.prototype=Object.create(CustomMethods.prototype),TrackerManager.prototype.constructor=TrackerManager,Object.assign(TrackerManager.prototype,{execute:function(method){var self=this;return function(e){var detail=self._get(e,"detail");Object.keys(self.trackers).forEach(function(name){name=self.trackers[name];name instanceof GenericTracker&&self._isFunction(name[method])&&(name.set.apply(name,[method].concat(detail)),name[method].apply(name,detail))})}}}),TrackingsMain.prototype=Object.create(CustomMethods.prototype),TrackingsMain.prototype.constructor=TrackingsMain,Object.assign(TrackingsMain.prototype,{bindEvents:function(){var self=this,bindings={engine_search:"engineSearch",add_filter_stars:"addStarFilterAction",del_filter_stars:"delStarFilterAction",add_filter_prices:"addPriceFilterAction",del_filter_prices:"delPriceFilterAction",add_filter:"addFilterAction",del_filter:"delFilterAction",show_avail:"showAvail",multiavail_book:"multiAvailBookAction",add_room:"addRoomAction",del_room:"delRoomAction",add_service:"addServiceAction",del_service:"delServiceAction",next_step_1:"nextStep1Action",next_step_2:"nextStep2Action",customer_data:"customerDataAction",try_confirm_customer_data:"tryConfirmCustomerDataAction",confirm_customer_data:"confirmCustomerDataAction",confirmed_booking:"confirmedBookingAction",confirm_error:"confirmErrorAction",cancelled_booking:"confirmedBookingCancellation",payment:"paymentAction",user_login:"loginAction",user_logout:"logoutAction",user_login_error:"loginErrorAction"};
1Object.keys(bindings).forEach(function(action){document.addEventListener(action,self.trackerManager.execute(bindings[action]))})}}),(new TrackingsMain).bindEvents();
2//# sourceMappingURL=myTrackings_V2.min.js.map

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.