"use strict";(self.webpackChunkgulp_template=self.webpackChunkgulp_template||[]).push([[581,2820],{3218:function(e,t,n){function o(){const e=document.body,t=window.innerWidth-e.clientWidth;if(e.style.transition="margin-right 0.3s easy-in-out",e.style.marginRight=`${t}px`,e.style.overflow="hidden",!window.matchMedia("(min-width: 996px)").matches){const t=window.pageYOffset;e.style.top=-t+"px",e.style.position="fixed",e.style.width="100%"}}function i(){const e=document.body;if(e.style.transition="margin-right 0s easy-in-out",e.style.marginRight="0",e.style.overflow="unset",!window.matchMedia("(min-width: 996px)").matches){const t=Math.abs(parseInt(e.style.top||0,10));e.style.position="static",e.style.width="auto",e.style.removeProperty("top"),window.scrollTo(0,t||0)}}n.d(t,{$:function(){return o},W:function(){return i}})},2585:function(e,t,n){n.r(t),n.d(t,{default:function(){return i}});var o=n(3218);function i(e,t=null,n=[]){const i=document.querySelector(".js-navigation");e&&(i.classList.contains("navigation__fixed--white")||i.classList.add("navigation__fixed--white"),e.on("show",(()=>{(0,o.$)(),t&&t(...n)})),e.on("hide",(()=>{(0,o.W)(),e.destroy()})),e.show())}},2820:function(e,t,n){n.r(t),n.d(t,{default:function(){return r}});var o=n(8514);function i(e,t){t&&(0===String(e.value).length||t.classList.contains("show")||t.classList.add("show"),0===String(e.value).length&&t.classList.contains("show")&&t.classList.remove("show"))}function s(e,t){const n=t.querySelectorAll(".input-base__show-icon");n.length&&n.forEach((e=>{e.classList.toggle("input-base__show-icon--hidden")})),e.type="password"===e.type?"text":"password"}function r(e){e.length&&e.forEach((e=>{const t=e.closest(".input-base"),n=t.querySelector(".js-clear-button"),r=t.querySelector(".js-show-button");"tel"===e.type&&function(){const e=document.querySelectorAll('input[type="tel"]');e.length&&e.forEach((e=>{new o.default(e,{mask:"+7(000)000-00-00",prepare:function(e,{value:t}){return"8"===e&&""===t?"":e}})}))}(),t&&(0!==String(e.value).length&&n&&!n.classList.contains("show")?n.classList.add("show"):n&&n.classList.remove("show"),e.addEventListener("focus",(function(){[n,r].forEach((e=>{i(this,e)}))})),e.addEventListener("input",(function(){"number"===e.type&&(this.value=this.value.replace(/\D/g,"")),t&&t.classList.contains("error")&&t.classList.remove("error"),t&&t.classList.contains("success")&&t.classList.remove("success"),[n,r].forEach((e=>{i(this,e)})),r&&0===String(this.value).length&&"text"===this.type&&s(this,r)})),e.addEventListener("input",(function(){t&&t.classList.contains("error")&&t.classList.remove("error"),t&&t.classList.contains("success")&&t.classList.remove("success")})),n&&n.addEventListener("click",(function(t){t.stopPropagation(),0!==String(e.value).length&&(e.value="",e.dispatchEvent(new Event("input")),this.classList.remove("show"))})),r&&r.addEventListener("click",(function(t){t.stopPropagation(),s(e,this)})))}))}},2936:function(e,t,n){n.d(t,{A:function(){return r}});var o=n(7371);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e){for(var t=1;t{var i;const r=t.hasAttribute("data-select-with-search"),a=null===(i=t.closest(".js-select-wrapper"))||void 0===i?void 0:i.querySelector(".js-select-name"),l=new o(t,s({sortField:function(e,t){var n=this.items[e.id],o=this.items[t.id];return n.text.localeCompare(o.text)},maxOptions:500,render:{no_results:()=>'
Ничего не найдено
'},plugins:r?["dropdown_input"]:[],onInitialize:function(){r&&function(e,t){const n=t.querySelector(".dropdown-input-wrap");if(!n)return;const o=e.control_input;o.classList.add("input-base__input","js-input-base"),n.innerHTML='\n
\n \n \n
\n ',n.querySelector(".input-base__label").append(o),n.querySelector(".js-clear-button").addEventListener("click",(()=>{e.setTextboxValue(""),e.refreshOptions(!1),o.focus()}))}(this,this.dropdown)}},e));a&&a.addEventListener("click",(function(){l.focus()})),t.addEventListener("change",(function(){const e=t.closest(".select-wrapper");e&&e.classList.contains("error")&&e.classList.remove("error"),e&&e.classList.contains("success")&&e.classList.remove("success")})),n.push(l)})),n}},2785:function(e,t,n){function o(e,t){const n=Math.abs(e)%100,o=e%10;return n>10&&n<20?t[2]:o>1&&o<5?t[1]:1==o?t[0]:t[2]}n.d(t,{t:function(){return c},k:function(){return u}});var i=n(3016);let s=[];function r(e){const t=new DataTransfer;for(const n of e)t.items.add(n);return t.files}function a(e,t,n){const o=function(e){const t=document.createElement("template"),n=`\n
\n \n \n \n \n
\n \n \n
\n
\n `;for(let o=0;o{const s=o.querySelector(".js-file-name"),r=o.querySelector(".js-delete-file");s.innerText=function(e){return e.length>13?`${e.substring(0,6)}...${e.substring(e.length-6)}`:e}(t.files[i].name),r.addEventListener("click",(function(){l.call(this,e,t,n)}))})),e.append(...o))}function l(e,t,n){const i=e.closest(".js-file-input-container"),a=e.querySelectorAll(".js-file"),l=this.closest(".js-file");if(a.length&&l){const c=Array.from(a).findIndex((e=>l===e));-1!==c&&(s.splice(c,1),t.files=r(s),e.removeChild(l),i.classList.contains("error")&&i.classList.remove("error"),s.length?n.innerText=`${s.length} ${o(s.length,["файл","файла","файлов"])} ${o(s.length,["выбран","выбраны","выбраны"])}`:n.innerText=n.dataset.placeholder)}}function c(){const e=document.querySelectorAll(".js-file-input-container");s=[],e.length&&e.forEach((e=>{const t=e.querySelector(".js-file-input-info"),n=e.querySelector(".js-files-container");t.innerText=t.dataset.placeholder,n.innerHTML=""}))}function u(){const e=document.querySelectorAll(".js-file-input-container"),t=document.querySelector(".js-language-radio:checked")?document.querySelector(".js-language-radio:checked").value:"RU";e.length&&e.forEach((e=>{const n=e.querySelector(".js-files-container"),l=e.querySelector(".js-file-input"),c=e.querySelector(".js-file-input-info");l&&c&&l.addEventListener("change",(u=>{const d=s.length;u.target.files.length&&(u.target.hasAttribute("multiple")||(s=[],n.firstChild&&n.removeChild(n.firstChild)),s.push(...u.target.files));const m=function(e,t){const n={files:t||[],maxWeight:10},o={maxWeight:(0,i.tJ)(n),maxCount:(0,i.X5)(n)},s=document.querySelector(".js-language-radio:checked")?document.querySelector(".js-language-radio:checked").value:"RU";return o.maxWeight?!!o.maxCount||((0,i.Nh)(e,"filesMaxCount",".input-file-base",s),o.maxCount):((0,i.Nh)(e,"fileMaxWeight",".input-file-base",s),o.maxWeight)}(u.target,s);if(m?e.classList.contains("error")&&e.classList.remove("error"):(s=s.slice(0,d),u.target.value=""),s.length){const e="RU"===t?["файл","файла","файлов"]:["file","files","files"],n="RU"===t?["выбран","выбраны","выбраны"]:["selected","selected","selected"];c.innerText=`${s.length} ${o(s.length,e)} ${o(s.length,n)}`}else c.innerText=c.dataset.placeholder;a(n,l,c),u.target.files=r(s)}))}))}},2048:function(e,t,n){n.d(t,{A:function(){return i}});var o=n(3218);function i(e,t=!0){const n=document.querySelector(".js-loader");n&&(t?n.classList.add("loader-fixed"):n.classList.remove("loader-fixed"),n.classList.toggle(e),n.classList.contains("loader-fixed")&&(n.classList.contains("show-global")?(0,o.$)():(0,o.W)()))}},6708:function(e,t,n){n.d(t,{A:function(){return i}});var o=n(2048);function i(e){const t=document.querySelector("#map .js-loader");t&&(0,o.A)("show",!1);let n=window.dataMap;function i(){let i=11;n.zoom>0&&(i=n.zoom);const s=new ymaps.Map("map",{center:[59.935315,30.268019],zoom:i,behaviors:["default","scrollZoom"],controls:["geolocationControl","fullscreenControl","zoomControl"]});if("detail"===e){ymaps.templateLayoutFactory.createClass('\n
\n \n
$[properties.iconContent]
\n
\n ');const e=e=>{let t=ymaps.templateLayoutFactory.createClass(`\n ${e.name?'
'+e.name+"
":""}\n ${e.address?'
'+e.address+"
":""}\n ${e.workingHours?'
'+e.workingHours+"
":""}\n ${e.phone?'
'+e.phone+"
":""}\n ${e.email?'
'+e.email+"
":""}\n `);return new ymaps.Placemark([e.coords[0],e.coords[1]],{hintContent:""},{iconLayout:"default#image",iconImageHref:"/local/templates/stenova/img/map-mark.png",iconImageSize:[44,44],iconImageOffset:[-22,-22],openEmptyBalloon:!0,hideIconOnBalloonOpen:!1,balloonContentLayout:t,balloonOffset:[0,-25]})};s.geoObjects.add(e(n)),setTimeout((()=>{s.container.fitToViewport(),s.setCenter(n.coords),window.innerWidth<996&&s.setZoom(12)}),300)}else{const e=e=>{let t=e.coords.split([","]),n=ymaps.templateLayoutFactory.createClass(`\n ${e.name?'
'+e.name+"
":""}\n ${e.address?'
'+e.address+"
":""}\n ${e.workingHours?'
'+e.workingHours+"
":""}\n ${e.phone?'
'+e.phone+"
":""}\n ${e.email?'
'+e.email+"
":""}\n `);return new ymaps.Placemark([t[0],t[1]],{hintContent:""},{iconLayout:"default#image",iconImageHref:"/local/templates/stenova/img/map-mark.png",iconImageSize:[44,44],iconImageOffset:[-22,-22],openEmptyBalloon:!0,hideIconOnBalloonOpen:!1,balloonContentLayout:n,balloonOffset:[0,-25]})};n.map((t=>{s.geoObjects.add(e(t));let n=t.coords.split([","]);s.setCenter(n)})),setTimeout((()=>{n.length>5&&(s.setBounds(s.geoObjects.getBounds()),s.setZoom(4))}),300)}t&&(0,o.A)("show",!1)}n&&("undefined"!=typeof ymaps?ymaps.ready(i):document.addEventListener("YandexMapReady",(()=>{ymaps.ready(i)})))}},6883:function(e,t,n){function o(){const e=document.querySelectorAll(".js-toggle-wrap:not(.init)");e.length&&e.forEach((e=>{const t=e.querySelector(".js-toggle-content"),n=e.querySelector(".js-toggle");n&&t&&(e.classList.add("init"),n.addEventListener("click",(function(){e.classList.toggle("active"),e.classList.contains("active")?t.style.maxHeight=`${t.scrollHeight}px`:t.style.maxHeight=0})))}))}n.d(t,{O:function(){return o}})},3016:function(e,t,n){n.d(t,{LF:function(){return s},M2:function(){return c},MG:function(){return g},Nh:function(){return m},X5:function(){return d},bB:function(){return r},lZ:function(){return i},tJ:function(){return u}});const o=e=>!isNaN(Number(e.trim())),i=e=>11===String(e).replace(/[^\d]/g,"").substring(0,11).length,s=e=>new RegExp(/^(\+?\d)\(?(\d{3})\)?[- ]?(\d{3})[- ]?(\d{2})[- ]?(\d{2})$/).test(e),r=e=>o(e)&&12===String(e.trim()).length,a=e=>new RegExp(/^[^@]+@[\w\-]+(\.\w+)+\w$/).test(e)||0===e.trim().length,l=e=>new RegExp(/^[^@]+@[\w\-]+(\.\w+)*\.ru$/).test(e)||0===e.trim().length,c=e=>o(e)&&6===String(e).length,u=e=>{let t=!0;for(let n=0;n10){t=!1;break}return t},d=e=>e.files.length<=10,m=(e,t,n=".input-base",o="RU")=>{const i=e.closest(n);if(i){const e=i.querySelector(`${n}__error`);i.classList.add(h),e&&(e.innerText=p[t].text[o])}},f=e=>{const t=e.closest(".input-base-captcha")||e.closest(".input-base")||e.closest(".input-file-base")||e.closest(".js-select-wrapper"),n=document.querySelector(".js-navigation");if(t&&n){const e=t.getBoundingClientRect();document.querySelector('.dialog:not([aria-hidden="true"])')?document.querySelector('.dialog:not([aria-hidden="true"]) .dialog-wrapper').scrollTo({top:t.offsetTop-30,behavior:"smooth"}):window.scrollTo({top:e.top+window.pageYOffset-n.clientHeight-60,behavior:"smooth"})}},p={required:{text:{RU:"Поле должно быть заполнено",EN:"Field must be filled"},action:e=>0!==String(e).length},requiredFiles:{text:{RU:"Поле должно быть заполнено",EN:"Field must be filled"},action:e=>e.files&&e.files.length},phone:{text:{RU:"Номер телефона должен состоять из 11 цифр",EN:"Phone number must be 11 digits"},action:i},inn:{text:{RU:"ИНН должен состоять из 10 или 12 цифр",EN:"TIN must be 10 or 12 digits"},action:e=>o(e)&&(10===String(e.trim()).length||12===String(e.trim()).length)},innIP:{text:{RU:"ИНН должен состоять из 12 цифр",EN:"TIN must be 12 digits"},action:r},kpp:{text:{RU:"КПП должен состоять из 9 цифр",EN:"PPC must consist of 9 digits"},action:e=>o(e)&&9===String(e.trim()).length||0===String(e.trim()).length},email:{text:{RU:"Формат почты: name@domain.ru",EN:"Mail format: name@domain.ru"},action:a},emailWithRuDomain:{text:{RU:"Допустимы только адреса в домене .ru",EN:"Only addresses in domain . ru"},action:l},onlyNumbers:{text:{RU:"Поле должно содержать только цифры",EN:"The field must contain only numbers"},action:o},cardNumber:{text:{RU:"Номер карты должен состоять из 15 цифр",EN:"Card number must be 15 digits"},action:e=>{const t=e.replace(/\s/g,"");return 15===t.length&&o(t)||0===t.length}},cost:{text:{RU:"Поле должно состоять только из цифр",EN:"The field must contain only numbers"},action:e=>{const t=e.replace(/\s/g,"");return o(t)||0===t.length}},password:{text:{RU:"Пароль должен содержать не менее 8 символов",EN:"Password must contain at least 8 characters"},action:e=>e.length>7||0===e.length},confirmPassword:{text:{RU:"Пароли должны совпадать",EN:"Passwords must match"},action:({oldPassword:e,newPassword:t})=>e===t},korCheck:{text:{RU:"Корреспондентский счет должен состоять из 11 цифр",EN:"Correspondent account must be 11 digits"},action:e=>o(e)&&11===String(e.trim()).length||0===String(e.trim()).length},payCheck:{text:{RU:"Расчетный счет должен состоять из 14 цифр",EN:"Account must be 14 digits long"},action:e=>o(e)&&14===String(e.trim()).length||0===String(e.trim()).length},bik:{text:{RU:"БИК должен состоять из 12 цифр",EN:"BIC must be 12 digits"},action:e=>o(e)&&12===String(e.trim()).length||0===String(e.trim()).length},phoneOrEmail:{text:{RU:"Не корректно заполнен email или телефон",EN:"Incorrectly filled email or phone"},action:e=>s(e)||a(e)||0===String(e.trim()).length},phoneOrEmailWithRuDomain:{text:{RU:"Не корректно заполнен email (допустимы адреса в домене .ru) или телефон",EN:"Incorrectly filled email (only addresses in domain . ru) or phone"},action:e=>s(e)||a(e)&&l(e)||0===String(e.trim()).length},confirmCode:{text:{RU:"Код должен состоять из 6 цифр",EN:"Code must be 6 digits"},action:c},fileMaxWeight:{text:{RU:"Вес одного файла должен быть не более 10 Мбайт",EN:"The weight of one file should be no more than 10 MB"},action:u},filesMaxCount:{text:{RU:"Можно загрузить не более 10 файлов",EN:"You can upload a maximum of 10 files"},action:d},doNotConfirmPhone:{text:{RU:"Номер должен быть подтвержден",EN:"Number must be confirmed"},action:e=>!1},nominalMin1000:{text:{RU:"Номинал карты не может быть менее 1000",EN:"The denomination of the card cannot be less than 1000"},action:e=>e>=1e3}},h="error";function g(e){let t=!0,n=null;if(e.length){const o=document.querySelectorAll(".js-language-radio");let i="RU";if(0!==o.length){const e=Array.from(o).find((e=>e.checked));i=e.value}e.forEach((e=>{const o=e.dataset.validations.split(",");for(let n of o){let o=".input-base",r=e.classList.contains("js-file-input")?{files:e.files,maxWeight:10}:e.value;if(e.classList.contains("js-file-input")&&(o=".input-file-base"),e.classList.contains(".js-select-option")&&(o=".select-wrapper"),"confirmPassword"===n){const t=e.closest(".js-form-container");if(t){var s;const n=(null===(s=t.querySelector(".js-input-password"))||void 0===s?void 0:s.value)||null;n&&(r={oldPassword:n,newPassword:e.value})}}if(!p[n].action(r)){t&&(t=!1),m(e,n,o,i);break}}t||n||(n=e)}))}return n&&f(n),t}},3531:function(e,t,n){var o=n(2936),i=n(6883),s=n(6708),r=n(7083),a=n(2585),l=n(3016),c=n(2785),u=n(2820),d=n(9743);function m(e,t,n,o,i,s,r){try{var a=e[s](r),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(o,i)}function f(e){return function(){var t=this,n=arguments;return new Promise((function(o,i){var s=e.apply(t,n);function r(e){m(s,o,i,r,a,"next",e)}function a(e){m(s,o,i,r,a,"throw",e)}r(void 0)}))}}window.addEventListener("DOMContentLoaded",f((function*(){const e=document.querySelectorAll(".js-clear-filters"),t=(0,o.A)(),m=document.querySelector(".js-simplebar-container");if(m&&new d.A(m,{autoHide:!1}),e.length&&t.length&&e.forEach((e=>{e.addEventListener("click",(function(){t.forEach((e=>{e.clear()}))}))})),function(){const e=document.querySelector(".js-form-become-member"),t=document.querySelectorAll(".js-btn-become-member");let n=null;t.forEach((t=>{t.addEventListener("click",(function(t){t.stopPropagation(),console.log("buttons",e),n=new r.default(e),(0,a.default)(n)}))}))}(),function(e){if(e){if(!window.smartCaptchaKey)return;let t=e.querySelector(".become-member__button"),n=window.smartCaptcha.render("captcha-container",{sitekey:window.smartCaptchaKey,hideShield:!0,callback:o});function o(e){"string"==typeof e&&e.length>0&&t.removeAttribute("disabled")}function i(){const t=new FormData(e),o=new BX.ajax.FormData;for(let[e,n]of t)o.append(e,n);o.send("/bitrix/services/main/ajax.php?mode=ajax&c=citfact%3Awebform&action=sendForm",(function(t){let o=(t=JSON.parse(t)).data;const i=document.querySelector(".js-error-form"),s=document.querySelector(".js-success-form");if(o.hasOwnProperty("ERROR_CAPTCHA"))i&&(i.classList.remove("hidden"),i.querySelector(".error-text").innerText=o.ERROR_CAPTCHA,i.scrollIntoView({behavior:"smooth",block:"center"})),s&&s.classList.add("hidden");else{e.reset();let t=e.querySelectorAll(".js-input-base:not(.js-file-input)");(0,u.default)(t),t.forEach((e=>{e.value="",e.dispatchEvent(new Event("change"))})),(0,c.t)(),i&&(i.classList.add("hidden"),i.scrollIntoView({behavior:"smooth",block:"center"})),s&&(s.classList.remove("hidden"),s.scrollIntoView({behavior:"smooth",block:"center"}))}window.smartCaptcha.reset(n)}),null,(function(e){console.log(`error: ${e}`)}))}e.addEventListener("submit",(function(e){e.preventDefault();const t=this.querySelectorAll(".js-input-base[data-validations]:not(.novalidate)");(0,l.MG)(t)&&i()}))}}(document.querySelector(".js-form-become-member form")),!window.matchMedia("(min-width: 996px)").matches){const h=document.querySelector(".js-dialog-filters"),g=document.querySelector(".js-dialog-filters-button");g&&g.addEventListener("click",f((function*(){if(h){const{default:e}=yield Promise.resolve().then(n.bind(n,7083)),t=new e(h),{default:o}=yield Promise.resolve().then(n.bind(n,2585));o(t)}})))}(0,i.O)();const p=document.querySelector(".js-where-to-buy-show-more");if(p){function y(){const e=document.querySelector(".js-content-list"),t=document.querySelector(".js-where-to-buy-show-more"),n=t.dataset.url;if(t.parentNode.remove(),n){const t=new XMLHttpRequest;t.open("POST",n),t.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),t.onload=function(){if(200===t.status){const o=t.responseText,r=(new DOMParser).parseFromString(o,"text/html"),a=r.querySelectorAll(".js-content-list .js-pagination-item");document.querySelector(".js-content-map").innerHTML="",document.querySelector(".js-map-data").setAttribute("data-map",r.querySelector(".js-map-data").getAttribute("data-map")),window.dataMap=[...window.dataMap,...JSON.parse(r.querySelector(".js-map-data").getAttribute("data-map"))],(0,s.A)();const l=r.querySelector(".js-pagination");if(document.querySelectorAll(".js-content-list .js-pagination-item")!==a){if(e.append(...a),l){const t=l.querySelector(".js-where-to-buy-show-more");t&&(t.onclick=y),m?document.querySelector(".js-content-pagination").append(l):e.append(l)}m&&new d.A(m,{autoHide:!1}),(0,i.O)()}history.pushState("","",n)}},t.send("ajax_get_page=Y")}return!1}p.onclick=y}(0,s.A)()})))}},function(e){e.O(0,[8096],(function(){return e(e.s=3531)})),e.O()}]);