1 2; /* Start:"a:4:{s:4:"full";s:65:"/local/templates/template1/public/js/common/map.js?17254312424960";s:6:"source";s:50:"/local/templates/template1/public/js/common/map.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 3!function(e){"function"==typeof define&&define.amd?define("map",e):e()}(function(){function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i={Android:function(){return navigator.userAgent.match(/Android/i)},BlackBerry:function(){return navigator.userAgent.match(/BlackBerry/i)},Opera:function(){return navigator.userAgent.match(/Opera Mini/i)},Windows:function(){return navigator.userAgent.match(/IEMobile/i)},iOS:function(){return(navigator.userAgent.match(/iPhone|iPad|iPod/i)||"MacIntel"===navigator.platform&&1<navigator.maxTouchPoints)&&!window.MSStream},any:function(){return i.Android()||i.BlackBerry()||i.iOS()||i.Opera()||i.Windows()}};document.addEventListener("DOMContentLoaded",function(){var e,o;(o=navigator.userAgent).match(/chrome|chromium|crios/i)?e="chrome":o.match(/firefox|fxios/i)?e="firefox":o.match(/safari/i)?e="safari":o.match(/opr\//i)?e="opera":o.match(/edg/i)&&(e="edge"),document.documentElement.classList.add(e)});document.addEventListener("DOMContentLoaded",function(){var r,n,e=document.querySelector("#map");e&&(r=function(e,o,n){var t=[];n.forEach(function(e){var o=window.navigator.language.slice(0,2),o=e.price?'<span class="balloon__cost">'.concat(e.from,'Â <span class="currency-price ').concat(e.currency," ").concat(o,'"><b class="price-num">').concat(e.price.toLocaleString(),'</b>Â <span class="currency">').concat(e.currency,"</span></span>").concat(e.cost,"</span>"):"",n=e.urlHotelBooking?'<a href="'.concat(e.urlHotelBooking,'" target="_blank" rel="noopener" class="balloon__button button button--default">').concat(e.bookingBtn,"</a> "):"",e=new ymaps.Placemark(e.geometry.coordinates,{balloonContentBody:'<div class="balloon">'+'<a class="balloon__header" target="_blank" rel="noopener" href="'.concat(e.url,'">').concat(e.name,"</a>")+'<p class="balloon__address icon icon-marker">'.concat(e.address,"</p>")+'<div class="balloon__price">'+o+n+"</div></div>"},{iconLayout:ymaps.templateLayoutFactory.createClass('<div class="map__marker icon icon-marker"></div>'),iconShape:{type:"Rectangle",coordinates:[[-25,-25],[50,50]]},iconOffset:[-25,-40]});t.push(e)}),o.add(t),e.geoObjects.add(o),e.setBounds(o.getBounds(),{checkZoomRange:!0,zoomMargin:10}).then(function(){20<e.getZoom()&&e.setZoom(15)},function(e){})},n=function(){var e,t;"object"==("undefined"==typeof hotelMarker?"undefined":c(hotelMarker))&&(e=!hotelMarker.yaMapApiKey||/^\s*$/.test(hotelMarker.yaMapApiKey)?"lang="+hotelMarker.locale:"apikey="+hotelMarker.yaMapApiKey+"&lang="+hotelMarker.locale,t="//api-maps.yandex.ru/2.1/?"+e,new Promise(function(o,e){var n=document.createElement("script");n.src=t,n.async=!0,n.onerror=e,n.onload=n.onreadystatechange=function(){var e=this.readyState;e&&"loaded"!==e&&"complete"!==e||(n.onload=n.onreadystatechange=null,o())},document.head.appendChild(n)}).then(function(){ymaps.ready(function(){var e,o,n,t,a;"object"==("undefined"==typeof hotelMarker?"undefined":c(hotelMarker))&&(e=hotelMarker.location,t=hotelMarker.zoomDefault,(o=new ymaps.Map("map",{behaviors:["drag","dblClickZoom","multiTouch","zoom"],center:e||[55.76,37.64],controls:[],zoom:t||15})).container.fitToViewport(),o.controls.add("zoomControl",{size:"small",position:{top:45,right:15}}),i.any()&&o.behaviors.disable("drag"),hotelMarker.mapGeoObjectsSource?(t=ymaps.templateLayoutFactory.createClass('<div class="balloon_body">{{ properties.balloonContentBody|raw }}</div>'),n=new ymaps.Clusterer({clusterDisableClickZoom:!0,clusterOpenBalloonOnClick:!0,clusterBalloonContentLayout:"cluster#balloonCarousel",clusterBalloonItemContentLayout:t,clusterBalloonContentLayoutWidth:300,clusterBalloonContentLayoutHeight:180,clusterBalloonPagerSize:5,clusterIconLayout:ymaps.templateLayoutFactory.createClass('<div class="map__marker map__marker--cluster icon icon-marker2"><span class="map__marker-count">{{ properties.geoObjects.length }}</span></div>'),clusterIconShape:{type:"Rectangle",coordinates:[[-25,-25],[50,50]]}}),fetch(hotelMarker.mapGeoObjectsSource,{method:"POST"}).then(function(e){return e.json()}).then(function(e){console.log(e),r(o,n,e)})):(t=window.innerWidth<360?[26,30]:window.innerWidth<1326?[34,40]:[42,50],a=window.innerWidth<360?[-13,-30]:window.innerWidth<1326?[-17,-40]:[-21,-50],a={iconLayout:ymaps.templateLayoutFactory.createClass('<div class="map__marker icon icon-marker"></div>'),iconSize:t,iconOffset:a,iconShape:{type:"Rectangle",coordinates:[[0,0],t]}},o.geoObjects.add(new ymaps.Placemark(e,{hintContent:hotelMarker.title},a))))})}).catch(function(){console.error("Could not load script")}))},"IntersectionObserver"in window?new IntersectionObserver(function(e,o){e.forEach(function(e){0<e.intersectionRatio&&(o.unobserve(e.target),n())})},{rootMargin:"500px 0px",threshold:0}).observe(e):n())})}); 4//# sourceMappingURL=map.js.map 5 6/* End */ 7;; /* /local/templates/template1/public/js/common/map.js?17254312424960*/
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.