"remove"in Element.prototype||(Element.prototype.remove=function(){this.parentNode&&this.parentNode.removeChild(this)}),mapboxgl.accessToken="pk.eyJ1IjoicmljaHRvbmFsIiwiYSI6ImNrb2xvN2R5azA2YWkycW5yc2o4ZDBlejEifQ.I2ebtMKBHEzbzukcHpsCLw";const mapContainer=document.getElementById("hotelMap"),map=new mapboxgl.Map({container:"hotelMap",style:"mapbox://styles/mapbox/light-v10",center:[-98.138577,38.339018],zoom:2,scrollZoom:!1});var hotel_states={},clickedLocation=null;function getBbox(e){var t=e.length-1,o=new mapboxgl.LngLat(e[0].geometry.coordinates[0],e[0].geometry.coordinates[1]),a=new mapboxgl.LngLat(e[t].geometry.coordinates[0],e[t].geometry.coordinates[1]),n=new mapboxgl.LngLatBounds(o,a);for(let t of e)n.extend([t.geometry.coordinates[0],t.geometry.coordinates[1]]);return n}function buildLocationList(e){var t=document.getElementById("hotelListings");t.innerHTML="";var o=document.querySelector(".no-locations"),a=document.getElementById("numLocations"),n=a.querySelector(".locTotal");if(e){e.forEach((function(e,o){var a=e.properties,n=t.appendChild(document.createElement("li"));n.className="item";var r=n.appendChild(document.createElement("h3"));r.className="title-location",r.innerHTML=a.title;var s=n.appendChild(document.createElement("div"));s.className="location-deets";var i=a.numFC,l=a.numPS,c=a.numGR,d=i>0?"

"+i+" "+(i>1?"Tonals":"Tonal")+"
in fitness center

":"",p=l>0?"

"+l+" "+(l>1?"Tonals":"Tonal")+"
in private studio

":"",u=c>0?"

"+c+" "+(c>1?"Tonals":"Tonal")+"
in guestrooms

":"";s.innerHTML='
'+d+p+u+'

'+a.address+"
"+a.city+"
"+a.state+" "+a.postalCode+'
'+a.phoneFormatted+'

Hotel Website'})),o.classList.add("d-none");var r=1===e.length?" Result":" Results";n.textContent=e.length+r,a.classList.remove("invisible")}else o.classList.remove("d-none"),n.textContent="0 Results",a.classList.remove("invisible");var s=jQuery("#hotelListings").find(".btn");s.map((function(e){s[e].addEventListener("click",(function(){const t=bsGetContainer("#hotelListings");rudderanalytics.track("Clicked Marketing CTA",{type:"button",text:"Hotel Website","page url":jQuery(location).attr("href"),destination:jQuery(s[e]).attr("href"),device:device,"site section":t.section})}))}))}function flyToHotel(e){map.flyTo({center:e.geometry.coordinates,zoom:13}),map.once("moveend","places",(function(e){map.flyTo({center:e.features[0].geometry.coordinates,zoom:15})}))}function createPopUp(e){var t=document.getElementsByClassName("mapboxgl-popup");t[0]&&t[0].remove();var o=e.properties.numFC,a=e.properties.numPS,n=e.properties.numGR,r=o>0?"
"+o+" "+(o>1?"Tonals":"Tonal")+"
in fitness center
":"",s=a>0?"
"+a+" "+(a>1?"Tonals":"Tonal")+"
in private studio
":"",i=n>0?"
"+n+" "+(n>1?"Tonals":"Tonal")+"
in guestrooms
":"";new mapboxgl.Popup({anchor:"right",closeOnClick:!1,className:"text-dark with-results",maxWidth:"313px"}).setLngLat(e.geometry.coordinates).setHTML('

'+e.properties.title+'

'+r+s+i+'

'+e.properties.address+"
"+e.properties.city+"
"+e.properties.state+" "+e.properties.postalCode+'
'+e.properties.phoneFormatted+'

Hotel Website
').addTo(map).on("close",(function(t){clickedHotelId=e.id,map.setFeatureState({source:"places",id:clickedHotelId},{clicked:!1})}));var l=jQuery("#hotelMap").find(".btn");l.map((function(e){l[e].addEventListener("click",(function(){const t=bsGetContainer("#hotelMap");rudderanalytics.track("Clicked Marketing CTA",{type:"button",text:"Hotel Website","page url":jQuery(location).attr("href"),destination:jQuery(l[e]).attr("href"),device:device,"site section":t.section})}))}))}function getUniqueFeatures(e,t){var o={};return e.filter((function(e){return!o[e.properties[t]]&&(o[e.properties[t]]=!0,!0)}))}hotels.features.forEach((function(e,t){e.properties.id=t,hotel_states[e.properties.state]=e.properties.state_full})),map.on("load",(function(e){const t=window.device;map.addSource("places",{type:"geojson",data:hotels}),map.addLayer({id:"hotel-point",type:"circle",source:"places",paint:{"circle-color":["case",["boolean",["feature-state","clicked"],!1],"#413939","#11DDC4"],"circle-radius":["interpolate",["linear"],["zoom"],5,5,11,10],"circle-stroke-width":1,"circle-stroke-color":"#fff"}});var o=null;function a(){var e=getUniqueFeatures(map.queryRenderedFeatures({layers:["hotel-point"]}),"loc_id");e.length?buildLocationList(e):buildLocationList()}map.on("click","hotel-point",(function(e){flyToHotel(e.features[0]),createPopUp(e.features[0]),e.features.length>0&&(null!==o&&map.setFeatureState({source:"places",id:o},{clicked:!1}),o=e.features[0].id,map.setFeatureState({source:"places",id:o},{clicked:!0}),rudderanalytics.track("Clicked Hotel Point On Map",{type:"button",text:e.features[0].properties.title,"page url":jQuery(location).attr("href"),device:t}))})),map.on("mouseenter","hotel-point",(function(){map.getCanvas().style.cursor="pointer"})),map.on("mouseleave","hotel-point",(function(){map.getCanvas().style.cursor=""})),map.on("dragend",(function(){a()})).on("zoomend",(function(e){null!==clickedLocation&&(createPopUp(clickedLocation),clickedLocation=null),a()})),window.addEventListener("touchstart",(function(){map.dragPan.disable(),map.touchPitch.disable()})),map.on("touchstart",(function(e){var t=e.originalEvent;t&&"touches"in t&&(t.touches.length>1?(t.stopImmediatePropagation(),map.dragPan.enable()):map.dragPan.disable())}));var n=new mapboxgl.NavigationControl;map.addControl(n,"top-right"),map.addControl(new mapboxgl.GeolocateControl({positionOptions:{enableHighAccuracy:!0},trackUserLocation:!0}),"bottom-right");var r=null;geocoder.on("result",(function(e){null!==r&&r.remove(),mapContainer.classList.contains("no-results")&&mapContainer.classList.remove("no-results");var o=e.result.geometry;rudderanalytics.track("Hotel Search",{location:e.result.place_name,"page url":jQuery(location).attr("href"),device:t});var a,n={units:"miles"};if(hotels.features.forEach((function(e){Object.defineProperty(e.properties,"distance",{value:turf.distance(o,e.geometry,n),writable:!0,enumerable:!0,configurable:!0})})),hotels.features.sort((function(e,t){return e.properties.distance>t.properties.distance?1:e.properties.distanceNo results found for '"+i+"'").addTo(map),mapContainer.classList.add("no-results"),r.on("close",(function(e){mapContainer.classList.remove("no-results")})),l.classList.remove("d-none");else{l.classList.add("d-none"),buildLocationList(a);var c=getBbox(a);map.fitBounds(c,{maxZoom:14,padding:100})}ww0?o(e(t),9007199254740991):0}},function(t,n){var r=Math.ceil,e=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?e:r)(t)}},function(t,n){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(t,n,r){var e=r(25);t.exports=Array.isArray||function(t){return"Array"==e(t)}},function(t,n,r){var e=r(4);t.exports=!!Object.getOwnPropertySymbols&&!e((function(){return!String(Symbol())}))},function(t,n,r){var e={};e[r(3)("toStringTag")]="z",t.exports="[object z]"===String(e)},function(t,n,r){var e,o=r(11),i=r(82),u=r(34),c=r(20),f=r(83),a=r(46),s=r(18),l=s("IE_PROTO"),p=function(){},v=function(t){return"