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EAASoD,kBAAoBkC,EAAI,CACbtF,EAAShD,cAAcyH,QAAQ+B,QAAQxG,EAASoD,iBACxDqD,WAAWC,UAAW,EAClC1G,EAAShD,cAAcyH,QAAQkC,iBAAiB3G,EAASoD,gBAAiB,CACtE,OAAU,oBAEjB,CAELmD,EAAIE,WAAWC,UAAW,EAC1B1G,EAAShD,cAAcyH,QAAQkC,iBAAiBrB,EAAI,CAChD,OAAU,oBAEdtF,EAAS+C,SAAS6D,QAAQ/D,KAAK0D,EAAIjC,SAASuC,YAA5C,+CAC6BN,EAAIhB,KADjC,+BAEMgB,EAAIO,KAAJ,oBAAwBP,EAAIO,KAA5B,+BAAgE,GAFtE,8BAGWP,EAAIf,eAHf,oBAIG,CACC,SAAW,EACX,SAAY,MAEhBxF,EAAS+C,SAASoC,UAAUoB,EAAIjC,SAASuC,YAAarJ,EAAM,CACxDkF,SAAU,MAEd1C,EAASoD,gBAAkBkC,EAC3BtF,EAAS+F,cAAcT,EAC1B,E,sDChNL,MAAMyB,EACO,aAGAhH,EAAe,CACxBM,KAAM,SAAS2G,GACX,MAAM7H,EAAU7C,SAASC,cAAcyK,GACvC,GAAgB,OAAZ7H,EAAkB,CACHA,EAAQH,iBAAiB,SACjCE,SAASC,IACZ,GAAsC,OAAlCA,EAAQ6C,QAAQ+E,GAAwB,OAE5C,MAAME,EAAe,eAAH,OAAkBF,EAAlB,aAAmC5H,EAAQ+H,UAA3C,UAClB/H,EAAQgI,mBAAmB,WAAYF,GACvC9H,EAAQ6E,QAAR,GAEP,CACJ,E","sources":["webpack://4tochki/./webpack/src/modules/countDown/countdown.js","webpack://4tochki/./webpack/src/modules/countDown/index.js","webpack://4tochki/./webpack/src/modules/shinomontShortcoder/index.js","webpack://4tochki/./webpack/bundles/actions/index.js","webpack://4tochki/./webpack/src/modules/flipbox/index.js","webpack://4tochki/./webpack/src/modules/fotoramaGallery/index.js","webpack://4tochki/./webpack/src/modules/imagePopup/index.js","webpack://4tochki/./webpack/src/modules/mapAbout/index.js","webpack://4tochki/./webpack/src/modules/tableWrapper/index.js"],"sourcesContent":["class CountDown {\n constructor(expiredDate, onRender, onComplete) {\n this.setExpiredDate(expiredDate);\n\n this.onRender = onRender;\n this.onComplete = onComplete;\n }\n\n setExpiredDate(expiredDate) {\n const currentTime = new Date().getTime();\n this.timeRemaining = expiredDate.getTime() - currentTime;\n this.timeRemaining > 0 ?\n this.start() :\n this.complete();\n }\n\n complete() {\n if (typeof this.onComplete === 'function') {\n this.onComplete();\n }\n }\n\n getTime() {\n return {\n days: Math.floor(this.timeRemaining / 1000 / 60 / 60 / 24),\n hours: Math.floor(this.timeRemaining / 1000 / 60 / 60) % 24,\n minutes: Math.floor(this.timeRemaining / 1000 / 60) % 60,\n seconds: Math.floor(this.timeRemaining / 1000) % 60,\n };\n }\n\n update() {\n if (typeof this.onRender === 'function') {\n this.onRender(this.getTime());\n }\n }\n\n start() {\n this.update();\n\n const intervalId = setInterval(() => {\n this.timeRemaining -= 1000;\n\n if (this.timeRemaining < 0) {\n this.complete();\n clearInterval(intervalId);\n } else {\n this.update();\n }\n }, 1000);\n }\n}\n\nexport {CountDown};\n","import './index.scss';\nimport {CountDown} from './countdown';\n\nexport const countDown = {\n init: function() {\n const app = document.querySelector('.countdown-timer');\n if (app === null) return;\n\n const format = (t) => {\n return t < 10 ? '0' + t : t;\n };\n\n const render = (time) => {\n app.innerHTML = `\n
До окончания акции осталось
\n
\n
\n

${format(time.days)}

\n Дни\n
\n
\n

${format(time.hours)}

\n Часы\n
\n
\n

${format(time.minutes)}

\n Минуты\n
\n
\n

${format(time.seconds)}

\n Секунды\n
\n
\n `;\n };\n\n const complete = () => {\n app.innerHTML = `
Акция завершилась!
`;\n };\n\n const countdownTimer = new CountDown(\n new Date(app.dataset.timeout),\n render,\n complete\n );\n },\n};\n","import './index.scss';\n\nexport const shinomontShortcoder = {\n init: function() {\n let yaMap;\n let objectManager = '';\n if (typeof ymaps !== 'undefined') {\n ymaps.ready(function() {\n yaMap = new ymaps.Map('map', {\n center: [def_map_lat, def_map_lon],\n controls: [],\n zoom: 9,\n });\n const zoomControl = new ymaps.control.ZoomControl({\n options: {\n position: {\n top: 10,\n left: 10,\n },\n },\n });\n yaMap.controls.add(zoomControl);\n const fullscreenControl = new ymaps.control.Button({\n data: {\n image: 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNiIgaGVpZ2h0PSIyNiI+PGcgZmlsbD0iIzZCNkI2QiI+PHBhdGggZD0iTTE2LjE0IDcuODZMMTQuMjcgNkgyMHY1LjdsLTEuODMtMS44MkwxNS4wNCAxMyAxMyAxMC45OGwzLjEzLTMuMTN6bTAgME05Ljg2IDE4LjE0TDExLjczIDIwSDZ2LTUuN2wxLjgzIDEuODJMMTAuOTYgMTMgMTMgMTUuMDJsLTMuMTMgMy4xM3ptMCAwIi8+PC9nPjwvc3ZnPg==',\n title: 'Развернуть карту',\n },\n options: {\n selectOnClick: false,\n },\n });\n yaMap.controls.add(fullscreenControl, {float: 'right'});\n fullscreenControl.events.add('click', function(event) {\n toggleMap();\n });\n objectManager = new ymaps.ObjectManager({\n clusterize: false,\n });\n objectManager.add(data_for_map);\n yaMap.geoObjects.add(objectManager);\n });\n }\n const $$inputs = document.querySelectorAll('.toggleMap input');\n if ($$inputs.length > 0) {\n $$inputs.forEach((element) => {\n element.addEventListener('click', () => {\n if (element.checked) {\n document.querySelector('.shinomontazhTable').style.display = 'none';\n document.querySelector('.shinomontazhSCMap').style.display = 'block';\n } else {\n document.querySelector('.shinomontazhTable').style.display = 'block';\n document.querySelector('.shinomontazhSCMap').style.display = 'none';\n }\n });\n });\n }\n },\n};\n","import './index.scss';\nimport * as jQuery from 'jquery';\nwindow.$ = jQuery;\nimport {flipbox} from 'modules/flipbox'; // done\nimport {imagePopup} from 'modules/imagePopup';\nimport {fotoramaGallery} from 'modules/fotoramaGallery';\nimport {countDown} from 'modules/countDown'; // done\nimport {shinomontShortcoder} from 'modules/shinomontShortcoder'; // done\nimport {tableWrapper} from 'modules/tableWrapper'; // done\nimport {mapAbout} from 'modules/mapAbout';\n\nwindow.$ = window.jQuery = require('jquery'); // костыль для работы inline jquery в контенте акций\nflipbox.bindEvents();\nimagePopup.init();\nfotoramaGallery.init();\ncountDown.init();\nshinomontShortcoder.init();\ntableWrapper.init('.article-content');\n\nif (document.querySelector('#mapSTO')) {\n mapAbout.init();\n}\n","import './index.scss';\n\nexport const flipbox = {\n bindEvents: function() {\n document.querySelectorAll('.js-flipbox-control').forEach((element) => {\n element.addEventListener('click', () => {\n document.querySelector('.flipbox').classList.toggle('flipbox--flipped');\n });\n });\n },\n};\n","import * as jQuery from 'jquery';\nwindow.$ = jQuery;\n\nexport const fotoramaGallery = {\n config: {\n 'fotoramaNavWrap': '.fotorama__nav-wrap',\n },\n init: function() {\n const $fotorama = $('.fotorama');\n\n if ($fotorama.length > 0) {\n require(['fotorama/fotorama.js', './index.scss'], function() {\n const $fotoramaDiv = $fotorama.fotorama({\n arrows: 'always',\n loop: true,\n width: '100%',\n maxwidth: '100%',\n });\n const fotorama = $fotoramaDiv.data('fotorama');\n fotorama.setOptions({\n nav: false,\n arrows: 'always',\n loop: true,\n captions: false,\n });\n $fotorama.on('fotorama:ready', function(e, fotorama) {\n fotoramaGallery.showCaptions(fotorama.activeFrame.caption, fotorama.index);\n });\n $fotorama.on('fotorama:show', function(e, fotorama) {\n fotoramaGallery.showCaptions(fotorama.activeFrame.caption, fotorama.index);\n });\n });\n } else {\n console.log('fotoramaGallery not detected');\n }\n },\n showCaptions: function(caption, index) {\n if (caption) {\n $(this.config.fotoramaNavWrap).eq(index).html('' + caption + '');\n } else {\n $(this.config.fotoramaNavWrap).eq(index).html('');\n }\n },\n};\n","import './index.scss';\nimport * as jQuery from 'jquery';\nwindow.$ = jQuery;\nimport {config} from 'core/config';\n\nexport const imagePopup = {\n config: {\n 'imagesGallery': '.js-images-gallery',\n 'imagesGalleryImg': '.js-images-gallery img',\n },\n init: function() {\n const $imageGallery = $(imagePopup.config.imagesGallery);\n const $imagePopup = $(imagePopup.config.imagesGalleryImg);\n const $imagePopupLength = $imagePopup.length;\n\n if ($imageGallery.length > 0) {\n require(['magnific-popup', 'magnific-popup/dist/magnific-popup.css'], function() {\n $imagePopup.each(function(index) {\n index += 1;\n if (!$(this).closest('.js-images-gallery--false').length) {\n const $imagePopupSrc = $(this).attr('src');\n $(this).wrap('');\n }\n if (index == $imagePopupLength) {\n const $header = $(config.select.header);\n $('.js-image-popup').magnificPopup({\n type: 'image',\n mainClass: 'image-popup mfp-with-zoom',\n verticalFit: true,\n zoom: {\n enabled: true,\n duration: 300, // don't foget to change the duration also in CSS\n easing: 'ease-in-out',\n },\n callbacks: {\n open: function() {\n $header.css('padding-right', $.magnificPopup.instance.scrollbarSize);\n },\n close: function() {\n $header.css('padding-right', '');\n },\n },\n });\n }\n });\n });\n } else {\n console.log('imagePopup not detected');\n }\n },\n};\n","import './index.scss';\nimport { config } from 'core/config';\nimport { spinner } from 'modules/spinner';\n\nexport const mapAbout = {\n dataUrl: '/Orders/deliveryPoints/list.php?force=1',\n dataUrlRP: '/regionpoints/list',\n instance: null,\n geoObjects: null,\n objectManager: null,\n selectedPointId: null,\n zoom: 11,\n center: window.delivery_map_position, // from page\n init: () => {\n if (typeof ymaps == 'undefined') {\n config.getScript('https://api-maps.yandex.ru/2.1/?apikey=607007ed-0904-4368-8445-809187c8313d&lang=ru_RU', () => {\n ymaps.ready(init);\n });\n } else {\n ymaps.ready(init);\n }\n\n function init() {\n const map = new ymaps.Map('mapSTO', {\n center: mapAbout.center,\n zoom: mapAbout.zoom,\n controls: ['default'],\n // maxAnimationZoomDifference: Infinity,\n });\n mapAbout.instance = map;\n const objectManager = new ymaps.ObjectManager({\n clusterize: true,\n gridSize: 128,\n });\n mapAbout.geoObjects = map.geoObjects;\n map.geoObjects.add(objectManager);\n mapAbout.objectManager = objectManager;\n\n mapAbout.bindEventsMap();\n if (typeof data_for_map !== 'undefined') {\n mapAbout.setMapMarkers(data_for_map);\n } else {\n mapAbout.loadMapMarkers();\n }\n }\n\n const $mapToggle = document.querySelector('.mapToggle');\n const $stoMap = document.querySelector('.stoMapWrp__map');\n const $stoList = document.querySelector('.stoMapWrp__list');\n $mapToggle.addEventListener('click', function () {\n if (this.dataset.view === 'list') {\n this.dataset.view = 'map';\n this.textContent = 'Картой';\n $stoMap.classList.add('d-none');\n $stoList.classList.remove('d-none');\n } else {\n $stoMap.classList.remove('d-none');\n $stoList.classList.add('d-none');\n this.dataset.view = 'list';\n this.textContent = 'Списком';\n }\n });\n },\n loadMapMarkers: () => {\n spinner.show(document.querySelector('.stoMapWrp'), 45);\n let url = '';\n let params = {};\n if (document.querySelector('#RPList')) {\n url = mapAbout.dataUrlRP;\n if (document.querySelector('.pvz')) {\n params['pvz'] = '1';\n }\n } else {\n url = mapAbout.dataUrl;\n }\n config.get(url, params).then((data) => {\n mapAbout.setMapMarkers(data);\n });\n },\n setMapMarkers: (data) => {\n data.forEach((el) => {\n el.geometry = {\n 'type': 'Point',\n 'coordinates': [el.lat, el.lon],\n };\n });\n mapAbout.objectManager.add(data);\n mapAbout.objectManager.objects.options.set({\n 'iconLayout': 'default#image',\n 'iconImageHref': '/static/public/svg/pvz.svg',\n 'iconImageSize': [60, 60],\n 'iconImageOffset': [-60, -30]\n });\n var size = mapAbout.instance.container.getSize();\n console.log(size);\n if (size[0] === 0) {\n size = [500, 400];\n }\n const centerAndZoom = ymaps.util.bounds.getCenterAndZoom(\n mapAbout.geoObjects.getBounds(),\n size,\n mapAbout.instance.options.get('projection')\n );\n var zoom = centerAndZoom.zoom;\n if (zoom > 15 || zoom < 0) {\n zoom = 15;\n }\n console.log(zoom);\n mapAbout.instance.setCenter(mapAbout.center, mapAbout.zoom);\n\n const $deliveryList = document.querySelector('.delivery-list');\n $deliveryList.innerHTML = data.map((sto) => {\n return `\n
\n
\n ${sto.name}\n \n \n \n \n ${sto.actual_address}\n \n ${sto.workgrafic ?\n `\n
\n \n
${sto.workgrafic}
\n
\n `\n : ''\n }\n
\n ${sto.id ?\n `
\n
\n
\n \n \n \n
\n 5\n
\n
`\n : ``\n }\n
\n `;\n }).join('');\n $deliveryList.hidden = false;\n spinner.hide(document.querySelector('.stoMapWrp'));\n mapAbout.bindEventsList();\n },\n bindEventsMap: () => {\n mapAbout.objectManager.objects.events.add('click', function (e) {\n mapAbout.setMarkerActive(e.get('objectId'));\n });\n },\n bindEventsList: () => {\n if (window.innerWidth >= config.breakpoints.md) {\n const $$deliveryItems = document.querySelectorAll('.delivery-list__item');\n $$deliveryItems.forEach((el) => {\n el.addEventListener('click', () => mapAbout.setMarkerActive(el.dataset.id, 13));\n });\n }\n },\n setListActive: (id) => {\n mapAbout.selectedPointId = id;\n const $$deliveryItems = document.querySelectorAll('.delivery-list__item');\n const $deliveryListWrp = document.querySelector('.delivery-list-wrp');\n $$deliveryItems.forEach((el) => {\n el.classList.remove('active');\n if (el.dataset.id == id) {\n el.classList.add('active');\n $deliveryListWrp.scrollTo({\n top: el.offsetTop - ($deliveryListWrp.clientHeight / 2) + (el.clientHeight / 2),\n behavior: 'smooth',\n });\n }\n });\n },\n setMarkerActive: (id, zoom = mapAbout.instance.getZoom()) => {\n const obj = mapAbout.objectManager.objects.getById(id);\n if (mapAbout.selectedPointId !== null) {\n if (mapAbout.selectedPointId !== id) {\n const selectedObj = mapAbout.objectManager.objects.getById(mapAbout.selectedPointId);\n selectedObj.properties.selected = false;\n mapAbout.objectManager.objects.setObjectOptions(mapAbout.selectedPointId, {\n 'preset': 'islands#blueIcon',\n });\n }\n }\n obj.properties.selected = true;\n mapAbout.objectManager.objects.setObjectOptions(id, {\n 'preset': 'islands#redIcon',\n });\n mapAbout.instance.balloon.open(obj.geometry.coordinates, `\n
${obj.name}
\n ${obj.icon ? `` : ''}\n
${obj.actual_address}
\n `, {\n 'autoPan': false,\n 'maxWidth': 200,\n });\n mapAbout.instance.setCenter(obj.geometry.coordinates, zoom, {\n duration: 250,\n });\n mapAbout.selectedPointId = id;\n mapAbout.setListActive(id);\n },\n};\n","const SELECT = {\n 'class': 'table-wrap',\n};\n\nexport const tableWrapper = {\n init: function(selector) {\n const element = document.querySelector(selector);\n if (element !== null) {\n const tables = element.querySelectorAll('table');\n tables.forEach((element) => {\n if (element.closest(SELECT.class) !== null) return;\n\n const newTableHtml = `
${element.outerHTML}
`;\n element.insertAdjacentHTML('afterend', newTableHtml);\n element.remove();\n });\n }\n },\n};\n"],"names":["CountDown","constructor","expiredDate","onRender","onComplete","this","setExpiredDate","currentTime","Date","getTime","timeRemaining","start","complete","days","Math","floor","hours","minutes","seconds","update","intervalId","setInterval","clearInterval","countDown","app","document","querySelector","format","t","dataset","timeout","time","innerHTML","shinomontShortcoder","yaMap","objectManager","ymaps","ready","Map","center","def_map_lat","def_map_lon","controls","zoom","zoomControl","control","ZoomControl","options","position","top","left","add","fullscreenControl","Button","data","image","title","selectOnClick","float","events","event","toggleMap","ObjectManager","clusterize","data_for_map","geoObjects","$$inputs","querySelectorAll","length","forEach","element","addEventListener","checked","style","display","window","$","jQuery","require","flipbox","imagePopup","fotoramaGallery","tableWrapper","mapAbout","bindEvents","classList","toggle","config","init","$fotorama","fotorama","arrows","loop","width","maxwidth","setOptions","nav","captions","on","e","showCaptions","activeFrame","caption","index","console","log","fotoramaNavWrap","eq","html","$imageGallery","imagesGallery","$imagePopup","imagesGalleryImg","$imagePopupLength","each","closest","$imagePopupSrc","attr","wrap","$header","magnificPopup","type","mainClass","verticalFit","enabled","duration","easing","callbacks","open","css","instance","scrollbarSize","close","dataUrl","dataUrlRP","selectedPointId","delivery_map_position","map","gridSize","bindEventsMap","setMapMarkers","loadMapMarkers","$mapToggle","$stoMap","$stoList","view","textContent","remove","spinner","url","params","then","el","geometry","lat","lon","objects","set","size","container","getSize","util","bounds","getCenterAndZoom","getBounds","get","setCenter","$deliveryList","sto","id","name","actual_address","workgrafic","join","hidden","bindEventsList","setMarkerActive","innerWidth","setListActive","$$deliveryItems","$deliveryListWrp","scrollTo","offsetTop","clientHeight","behavior","getZoom","obj","getById","properties","selected","setObjectOptions","balloon","coordinates","icon","SELECT","selector","newTableHtml","outerHTML","insertAdjacentHTML"],"sourceRoot":""}