"use strict";(self.webpackChunkgulp_template=self.webpackChunkgulp_template||[]).push([[6459],{2936:function(e,t,n){n.d(t,{A:function(){return s}});var i=n(7371);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e){for(var t=1;t{var o;const s=t.hasAttribute("data-select-with-search"),l=null===(o=t.closest(".js-select-wrapper"))||void 0===o?void 0:o.querySelector(".js-select-name"),a=new i(t,r({sortField:function(e,t){var n=this.items[e.id],i=this.items[t.id];return n.text.localeCompare(i.text)},maxOptions:500,render:{no_results:()=>'
Ничего не найдено
'},plugins:s?["dropdown_input"]:[],onInitialize:function(){s&&function(e,t){const n=t.querySelector(".dropdown-input-wrap");if(!n)return;const i=e.control_input;i.classList.add("input-base__input","js-input-base"),n.innerHTML='\n
\n \n \n
\n ',n.querySelector(".input-base__label").append(i),n.querySelector(".js-clear-button").addEventListener("click",(()=>{e.setTextboxValue(""),e.refreshOptions(!1),i.focus()}))}(this,this.dropdown)}},e));l&&l.addEventListener("click",(function(){a.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(a)})),n}},2785:function(e,t,n){function i(e,t){const n=Math.abs(e)%100,i=e%10;return n>10&&n<20?t[2]:i>1&&i<5?t[1]:1==i?t[0]:t[2]}n.d(t,{t:function(){return c},k:function(){return u}});var o=n(3016);let r=[];function s(e){const t=new DataTransfer;for(const n of e)t.items.add(n);return t.files}function l(e,t,n){const i=function(e){const t=document.createElement("template"),n=`\n
\n \n \n \n \n
\n \n \n
\n
\n `;for(let i=0;i{const r=i.querySelector(".js-file-name"),s=i.querySelector(".js-delete-file");r.innerText=function(e){return e.length>13?`${e.substring(0,6)}...${e.substring(e.length-6)}`:e}(t.files[o].name),s.addEventListener("click",(function(){a.call(this,e,t,n)}))})),e.append(...i))}function a(e,t,n){const o=e.closest(".js-file-input-container"),l=e.querySelectorAll(".js-file"),a=this.closest(".js-file");if(l.length&&a){const c=Array.from(l).findIndex((e=>a===e));-1!==c&&(r.splice(c,1),t.files=s(r),e.removeChild(a),o.classList.contains("error")&&o.classList.remove("error"),r.length?n.innerText=`${r.length} ${i(r.length,["файл","файла","файлов"])} ${i(r.length,["выбран","выбраны","выбраны"])}`:n.innerText=n.dataset.placeholder)}}function c(){const e=document.querySelectorAll(".js-file-input-container");r=[],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"),a=e.querySelector(".js-file-input"),c=e.querySelector(".js-file-input-info");a&&c&&a.addEventListener("change",(u=>{const d=r.length;u.target.files.length&&(u.target.hasAttribute("multiple")||(r=[],n.firstChild&&n.removeChild(n.firstChild)),r.push(...u.target.files));const f=function(e,t){const n={files:t||[],maxWeight:10},i={maxWeight:(0,o.tJ)(n),maxCount:(0,o.X5)(n)},r=document.querySelector(".js-language-radio:checked")?document.querySelector(".js-language-radio:checked").value:"RU";return i.maxWeight?!!i.maxCount||((0,o.Nh)(e,"filesMaxCount",".input-file-base",r),i.maxCount):((0,o.Nh)(e,"fileMaxWeight",".input-file-base",r),i.maxWeight)}(u.target,r);if(f?e.classList.contains("error")&&e.classList.remove("error"):(r=r.slice(0,d),u.target.value=""),r.length){const e="RU"===t?["файл","файла","файлов"]:["file","files","files"],n="RU"===t?["выбран","выбраны","выбраны"]:["selected","selected","selected"];c.innerText=`${r.length} ${i(r.length,e)} ${i(r.length,n)}`}else c.innerText=c.dataset.placeholder;l(n,a,c),u.target.files=s(r)}))}))}},3016:function(e,t,n){n.d(t,{LF:function(){return r},M2:function(){return c},MG:function(){return p},Nh:function(){return f},X5:function(){return d},bB:function(){return s},lZ:function(){return o},tJ:function(){return u}});const i=e=>!isNaN(Number(e.trim())),o=e=>11===String(e).replace(/[^\d]/g,"").substring(0,11).length,r=e=>new RegExp(/^(\+?\d)\(?(\d{3})\)?[- ]?(\d{3})[- ]?(\d{2})[- ]?(\d{2})$/).test(e),s=e=>i(e)&&12===String(e.trim()).length,l=e=>new RegExp(/^[^@]+@[\w\-]+(\.\w+)+\w$/).test(e)||0===e.trim().length,a=e=>new RegExp(/^[^@]+@[\w\-]+(\.\w+)*\.ru$/).test(e)||0===e.trim().length,c=e=>i(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,f=(e,t,n=".input-base",i="RU")=>{const o=e.closest(n);if(o){const e=o.querySelector(`${n}__error`);o.classList.add(m),e&&(e.innerText=g[t].text[i])}},h=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"})}},g={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:o},inn:{text:{RU:"ИНН должен состоять из 10 или 12 цифр",EN:"TIN must be 10 or 12 digits"},action:e=>i(e)&&(10===String(e.trim()).length||12===String(e.trim()).length)},innIP:{text:{RU:"ИНН должен состоять из 12 цифр",EN:"TIN must be 12 digits"},action:s},kpp:{text:{RU:"КПП должен состоять из 9 цифр",EN:"PPC must consist of 9 digits"},action:e=>i(e)&&9===String(e.trim()).length||0===String(e.trim()).length},email:{text:{RU:"Формат почты: name@domain.ru",EN:"Mail format: name@domain.ru"},action:l},emailWithRuDomain:{text:{RU:"Допустимы только адреса в домене .ru",EN:"Only addresses in domain . ru"},action:a},onlyNumbers:{text:{RU:"Поле должно содержать только цифры",EN:"The field must contain only numbers"},action:i},cardNumber:{text:{RU:"Номер карты должен состоять из 15 цифр",EN:"Card number must be 15 digits"},action:e=>{const t=e.replace(/\s/g,"");return 15===t.length&&i(t)||0===t.length}},cost:{text:{RU:"Поле должно состоять только из цифр",EN:"The field must contain only numbers"},action:e=>{const t=e.replace(/\s/g,"");return i(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=>i(e)&&11===String(e.trim()).length||0===String(e.trim()).length},payCheck:{text:{RU:"Расчетный счет должен состоять из 14 цифр",EN:"Account must be 14 digits long"},action:e=>i(e)&&14===String(e.trim()).length||0===String(e.trim()).length},bik:{text:{RU:"БИК должен состоять из 12 цифр",EN:"BIC must be 12 digits"},action:e=>i(e)&&12===String(e.trim()).length||0===String(e.trim()).length},phoneOrEmail:{text:{RU:"Не корректно заполнен email или телефон",EN:"Incorrectly filled email or phone"},action:e=>r(e)||l(e)||0===String(e.trim()).length},phoneOrEmailWithRuDomain:{text:{RU:"Не корректно заполнен email (допустимы адреса в домене .ru) или телефон",EN:"Incorrectly filled email (only addresses in domain . ru) or phone"},action:e=>r(e)||l(e)&&a(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}},m="error";function p(e){let t=!0,n=null;if(e.length){const i=document.querySelectorAll(".js-language-radio");let o="RU";if(0!==i.length){const e=Array.from(i).find((e=>e.checked));o=e.value}e.forEach((e=>{const i=e.dataset.validations.split(",");for(let n of i){let i=".input-base",s=e.classList.contains("js-file-input")?{files:e.files,maxWeight:10}:e.value;if(e.classList.contains("js-file-input")&&(i=".input-file-base"),e.classList.contains(".js-select-option")&&(i=".select-wrapper"),"confirmPassword"===n){const t=e.closest(".js-form-container");if(t){var r;const n=(null===(r=t.querySelector(".js-input-password"))||void 0===r?void 0:r.value)||null;n&&(s={oldPassword:n,newPassword:e.value})}}if(!g[n].action(s)){t&&(t=!1),f(e,n,i,o);break}}t||n||(n=e)}))}return n&&h(n),t}},8756:function(e,t,n){var i,o=n(2785),r=n(2936);function s(e,t,n,i,o,r,s){try{var l=e[r](s),a=l.value}catch(e){return void n(e)}l.done?t(a):Promise.resolve(a).then(i,o)}window.addEventListener("DOMContentLoaded",(i=function*(){const e=document.querySelector(".js-contact-form"),t=window.location.search;if(-1==t.indexOf("set_filter=Y")&&-1==t.indexOf("del_filter=Y")||document.getElementById("authPartners").scrollIntoView(),(0,o.k)(),(0,r.A)(),e){const{default:t}=yield Promise.all([n.e(8096),n.e(8611)]).then(n.bind(n,8611));t(e)}},function(){var e=this,t=arguments;return new Promise((function(n,o){var r=i.apply(e,t);function l(e){s(r,n,o,l,a,"next",e)}function a(e){s(r,n,o,l,a,"throw",e)}l(void 0)}))}))}},function(e){e.O(0,[8096],(function(){return e(e.s=8756)})),e.O()}]);