1"use strict";(self.tcthemejsonpFunction=self.tcthemejsonpFunction||[]).push([[4281,8572],{795(t,e,i){var n=i(9650),s=i(520),o=i(5589),r=i(8972),a=i(4692);const{fireEvent:l}=r.Wp,c=window.googleMapStyle;function h(t,e){this.el=t,this._gMap=e,this.$container=a(this.el),this.init()}function d(t){return!(!t||!a(t).length)&&a(t).find(".js-map-infowindow")}h.prototype={init:function(){this.pois=d(this.$container.data("poi")),this.markers=[],this.options={},this.selectedInfoWindow,this.$container.data("lat")&&this.$container.data("lng")&&(this.options.center={lat:this.$container.data("lat"),lng:this.$container.data("lng")}),this.options.defaultZoom=this.$container.data("zoom")||16,this.options.hasCustomZoom=!!this.$container.data("zoom"),this.create(),this.infoWindow=new this._gMap.InfoWindow,this.bounds=new this._gMap.LatLngBounds,this._gMap.event.addListenerOnce(this.map,"bounds_changed",()=>{(this.options.hasCustomZoom||this.map.getZoom()>20)&&this.map.setZoom(this.options.defaultZoom)}),this.addMarkers(),this.options.center||this.map.fitBounds(this.bounds);let t=this.map.getZoom(),e=this.map.getCenter(),i=this.$container.is(":visible");this.$container.on("refreshMap",()=>{!function(t=[],e){let i=t.length;for(var n=0;n<i;n++)t[n].setMap(null);e&&e.setVisible(!1)}(this.markers,this.selectedInfoWindow),this.bounds=new this._gMap.LatLngBounds,this.markers=[],this.openedInfowindow&&this.openedInfowindow.close(),this.addMarkers()}),this.$container.on("resizeMap",()=>{i?(this.map.setZoom(t),this.map.setCenter(e)):(i=!0,this.map.fitBounds(this.bounds),t=this.map.getZoom(),e=this.map.getCenter())}),this.filter()},create(){var t={zoom:this.options.defaultZoom,styles:c,fullscreenControl:!1,mapTypeControl:!1};this.options.center&&(t.center=this.options.center),this.map=new this._gMap.Map(this.el,t)},addMarkers:function(){const t=this.$container.data("hotels");t&&a(t).length&&a(t).find(".js-map-infowindow").each((t,e)=>{const i={lat:e.getAttribute("data-lat"),lng:e.getAttribute("data-lng"),title:e.getAttribute("data-name"),category_id:e.getAttribute("data-category")||0,icon:{url:"/integration/tc-theme/public/img/marker_full.svg",size:new this._gMap.Size(30,40),origin:new this._gMap.Point(0,0),anchor:new this._gMap.Point(15,40),scaledSize:new this._gMap.Size(30,40)},infoWindowContent:e};e.getAttribute("data-external-selector")&&(i.externalSelector=e.getAttribute("data-external-selector")),e.getAttribute("data-map-direction-logo-url")&&(i.icon.url=e.getAttribute("data-map-direction-logo-url")),this.addMarker(i)}),this.pois=d(this.$container.data("poi")),this.pois.length&&this.pois.each((t,e)=>{let i=e.getAttribute("data-marker"),n=i.split(/[#?]/)[0].split(".").pop().trim(),s="/integration/tc-theme/public/img/poi-default.svg";/(jpg|jpeg|gif|png|svg)$/i.test(n)||(e.setAttribute("data-marker",s),i=s),this.addMarker({lat:e.getAttribute("data-lat"),lng:e.getAttribute("data-lng"),title:e.getAttribute("data-name"),label:e.getAttribute("data-name"),category_id:e.getAttribute("data-category")||0,icon:{url:i,size:new this._gMap.Size(24,32),origin:new this._gMap.Point(0,0),anchor:new this._gMap.Point(12,32),scaledSize:new this._gMap.Size(24,32)},infoWindowContent:e,externalSelector:e.getAttribute("data-external-selector")})}),this.options.center||this.map.fitBounds(this.bounds)},addMarker:function({title:t="",lat:e=0,lng:i=0,infoWindow:s=!0,infoWindowContent:c="",externalSelector:h=null,category_id:d=0,icon:f={url:"/integration/tc-theme/public/img/marker.svg",size:new this._gMap.Size(30,40),origin:new this._gMap.Point(0,0),anchor:new this._gMap.Point(15,40),scaledSize:new this._gMap.Size(30,40)}}={}){if(!e||!i)return void console.warn("No lat or long",t);let g=this,u=new this._gMap.Marker({position:new this._gMap.LatLng(e,i),map:this.map,title:t,icon:f,category_id:parseInt(d)});this.bounds.extend(new this._gMap.LatLng(e,i)),h&&a(document).on("click",h,function(){new g._gMap.event.trigger(u,"click")});for(var p=document.getElementsByClassName("btn-point-on-map"),m=0;m<p.length;m++)p[m].onclick=function(t){t.preventDefault();let e=a(".js-map").offset().top-a("[class*='fake-size']").innerHeight()-95;a([document.documentElement,document.body]).animate({scrollTop:e},200)};if(document.addEventListener("keydown",function(t){("Enter"===t.key||" "===t.key)&&t.target.closest(".open-on-map-container")&&t.target.matches('a[role="button"]')&&(t.preventDefault(),t.target.click())}),s){let e;e=c||t;var b=450,C=new this._gMap.Size(-b/2,-50);a(window).width()<1200&&(b=350,C=new this._gMap.Size(-b/2,-50));let i=new o.A({content:e,alignBottom:!0,pixelOffset:C,closeBoxURL:"/integration/tc-theme/public/img/close.svg",gMap:this._gMap});this._gMap.event.addListener(u,"click",function(){g.selectedInfoWindow&&g.selectedInfoWindow.close(),i.open(g.map,this),g.map.setCenter(u.getPosition()),g.selectedInfoWindow=i,"category_id"in u&&0!=u.category_id&&l("event.userBehavior.checkLocalAttractions",a(this))}),this._gMap.event.addListener(i,"domready",function(){let t=i.content_;a(document).trigger("openMapInfowindow",i.content_),(0,n.A)(t),a(t).on("click","a",function(){this.href=(0,r.D8)(this.href),l("event.clickToBE.bookOnMaps",a(this))})})}return this.markers.push(u),u}
1,setMarkersVisible:function(){this.markers.forEach(function(t){t.setVisible(!0)})},filter:function(){if(s.default.initialized||s.default.init(),s.default.hasFilters())s.default.$filters.on("click",".js-filters-trigger",function(){this.selectedInfoWindow&&this.selectedInfoWindow.setVisible(!1),this.setMarkersVisible();let t=s.default.getCheckedCategoryFiltersValues();t.length&&this.markers.forEach(function(e){null===e.category_id||0===e.category_id||t.includes(e.category_id)||e.setVisible(!1)})}.bind(this));else if(s.default.tabInitialized&&this.$container.parents(".tab-filter-with-map")){const t=this.$container.parents(".tab-filter-with-map");t.find(".tab-filters").on("click",".js-filters-trigger",function(t){let e=t.target.dataset.id;e=e.trim(),f(this,e)}.bind(this)),t.find(".tab-filters-mobile").on("change",function(t){let e=t.target.options[t.target.selectedIndex].dataset.id;f(this,e)}.bind(this))}}};const f=(t,e)=>{t.selectedInfoWindow&&t.selectedInfoWindow.setVisible(!1),t.setMarkersVisible(),0!==(e=parseInt(e))&&t.markers.forEach(function(t){null!==t.category_id&&0!==t.category_id&&e!==t.category_id&&t.setVisible(!1)})},g=h;i.d(e,["default",0,g])},520(t,e,i){i.d(e,{default:()=>h});var n=i(8972),s=i(4692);const{isNullOrUndefined:o}=n._0;class r{constructor({filterContainer:t,gridContainer:e}){this.filterContainer=this.getElementSelector(t),this.gridContainer=this.getElementSelector(e),this.filterTabList=this.getFilterTabsList(),this.categories=[],this.initialize()}initialize(){if(o(this.filterContainer))return!1;this.bindEvents()}resetFilters(){for(let t of this.getGirdItemsList())t.classList.remove("hidden")}setFilter({id:t,name:e}){for(let i of this.getGirdItemsList()){if("all"===e)return;i.dataset.category.replace(/,\s*$/,"").split(",").includes(t)||i.classList.add("hidden")}}setActive(t){for(let t of this.filterTabList)t.classList.remove("active");t.classList.add("active")}getElementSelector(t){if(n._0.validStr(t))return document.querySelector(t)}getGirdItemsList(){const t=this.gridContainer.querySelectorAll(".col-filters");return n._0.isValidNodeList(t)?t:[]}getFilterTabsList(){const t=this.filterContainer.querySelectorAll(".js-filters-trigger");return n._0.isValidNodeList(t)?t:[]}onFilterTabClick(t){this.resetFilters(),this.setActive(t),this.setFilter(t.dataset)}onMobileFilterChange(t){this.resetFilters(),this.setFilter(t.options[t.selectedIndex].dataset)}setMobileFilterDisplay(){s(".tab-filters-mobile").customSelect({minimumResultsForSearch:-1}).removeClass("hidden").on("change",(t=>{this.onMobileFilterChange(t.target)}).bind(this))}removeFilterDisplayWhenEmpty(){s(".tab-filters").remove(),s(".tab-filters-mobile").remove()}bindEvents(){for(let t of this.filterTabList)t.addEventListener("click",t=>this.onFilterTabClick(t.target));this.filterTabList.length>1?this.setMobileFilterDisplay():this.removeFilterDisplayWhenEmpty()}}var a=i(4692);const{isNullOrUndefined:l,isNum:c}=n._0,h={init:function(){if(this.$filters=a(".js-filter-container"),this.$filters.hasClass("tab-filters"))return this.tabInitialized=!0,void new r({filterContainer:".js-filter-container",gridContainer:".js-filtered-grid"});this.$grid=a(".js-filtered-grid"),this.clearContainerClone=a(".btn-clear-filters-clone"),this.checkedValuesCount=0,this.filter(),this.fixChevronRTL(),this.initialized=!0},fixChevronRTL:function(){"rtl"==a("html").attr("dir")&&this.$filters.find(".accordion__panel__heading .btn-link").css("display","inline")},showAllBlocksInGrid:function(){this.$grid.find(".col-filters").show()},hasFilters:function(){return this.$filters.find(".js-filter-field").length||this.$filters.find("#hotel-filter").length},getCheckedCategoryFilters:function(){return this.$filters.find(".js-filter-field").filter(function(){return a(this).is(":checked")})},getCheckedCategoryFiltersValues:function(){let t=[],e=this.getCheckedCategoryFilters();return e.length&&a.each(e,function(){t.push(parseInt(a(this).val()))}),t}
1,getSelectedHotelFiltersValues:function(){const t=this.$filters.find("#hotel-filter");return 0===t.length?[]:t.select2("val").map(t=>parseInt(t))},filterGridBlocks:function(){let t=this;this.$grid.find(".col-filters").each(function(){const e=t.getElementCategories(a(this).data("category")),i=t.getElementCategories(a(this).data("hotel")),n=!!t.checkedCategoryValues.length&&!t.checkedCategoryValues.some(t=>e.includes(t)),s=!!t.selectedHotelValues.length&&!t.selectedHotelValues.some(t=>i.includes(t));(n||s)&&a(this).hide()})},getElementCategories:function(t){let e=[];return l(t)||(c(t)?e.push(parseInt(t)):e=t.split(",").slice(0,-1).map(t=>parseInt(t))),e},updateCounterValue:function(){this.$filters.find(".filters-counter").text("("+this.checkedValuesCount+")"),this.clearContainerClone.html(a(".btn-clear-filters-container").html())},showClearAndCounterButton:function(){a(".btn-clear-filters").css("display","inline"),this.updateCounterValue()},hideClearAndCounterButton:function(){a(".btn-clear-filters").css("display","none")},uncheckFilters:function(){this.$filters.find("#hotel-filter").val([]).trigger("change"),this.$filters.find(".js-filter-field").each(function(){a(this).prop("checked",!1)}),a(".js-filters-trigger").trigger("click"),this.updateCounterValue()},filter:function(){if(this.hasFilters()){let t=this;this.$filters.on("click",".js-filters-trigger",function(){t.showAllBlocksInGrid(),t.checkedCategoryValues=t.getCheckedCategoryFiltersValues(),t.selectedHotelValues=t.getSelectedHotelFiltersValues(),t.checkedValuesCount=t.checkedCategoryValues.length+t.selectedHotelValues.length,t.checkedValuesCount>0?(t.filterGridBlocks(),t.showClearAndCounterButton()):t.hideClearAndCounterButton()}).on("click",".btn-clear-filters, .btn-clear-filters-clone",function(){t.clearContainerClone.hide(),t.uncheckFilters(),t.hideClearAndCounterButton()}).on("click",".btn-link",function(){a(".accordion__panel.active").length?t.clearContainerClone.hide():t.checkedValuesCount&&t.clearContainerClone.show()})}}}}}]);
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.