1 2; /* Start:"a:4:{s:4:"full";s:92:"/local/templates/html/assets/components-template/catalog-targets/script.min.js?1709798643706";s:6:"source";s:78:"/local/templates/html/assets/components-template/catalog-targets/script.min.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 3(function(){'use strict';window.addEventListener("load",function(){window.reinit||(window.reinit={}),window.reinit.catalogTargets=()=>{const a=[...document.querySelectorAll(".catalog-targets__link")],b=a[a.length-1];if(b){const a=b.closest(".catalog-targets"),c=a.querySelector(".catalog-targets__list"),d=a.querySelector(".catalog-targets__helper"),e=b.getBoundingClientRect(),f=a.getBoundingClientRect();e.left+e.width>f.left+f.width&&(a.querySelector(".catalog-targets__toggle")?.classList.add("visible"),d.classList.remove("invisible"),c.addEventListener("scroll",a=>{50<a.currentTarget.scrollLeft?d.classList.add("invisible"):d.classList.remove("invisible")}))}},window.reinit.catalogTargets()})})(); 4 5/* End */ 6; 7; /* Start:"a:4:{s:4:"full";s:95:"/local/templates/.default/components/slam/catalog.smart.filter/alpine/script.js?170979864314364";s:6:"source";s:79:"/local/templates/.default/components/slam/catalog.smart.filter/alpine/script.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 8document.addEventListener('alpine:init', () => { 9 10 /** 11 * Ñ ÑанилиÑе ÑилÑÑÑа 12 */ 13 Alpine.store('filter', { 14 items: {}, 15 count: 0, 16 show: false, 17 activeItems: 0, 18 19 }); 20 21 /** 22 * ÐºÐ¾Ð¼Ð¿Ð¾Ð½ÐµÐ½Ñ ÑилÑÑÑа 23 */ 24 Alpine.data('filterApp', () => ({ 25 productsListSelector: '.ajax_container', 26 checkedItemsSelector: '.catalog-filters-nonreactive', 27 seoFilterLinksSelector: '.catalog-targets', 28 h1Selector: '.page-header-section', 29 breadcrumbSelector: '.breadcrumb__list', 30 seoTextSelector: '.seo-text', 31 checkedItemClass: 'filter-item', 32 checkedItemsClearAllClass: 'filter-item--delete', 33 totalItemsSelector: '.js-catalog-total', 34 preloaderClass: 'preloader', 35 openFilter: false, 36 initFilter: false, 37 arResult: {}, 38 form: null, 39 values: {}, 40 preloaderContainer: null, 41 checkedItemsContainer: null, 42 clearItems: [], 43 activeItems: [], 44 oneQueryMode: true, 45 init() { 46 this.start(); 47 }, 48 start() { 49 this.form = this.$refs['filterForm']; 50 this.preloaderContainer = document.querySelector(this.productsListSelector); 51 this.checkedItemsContainer = document.querySelector(this.checkedItemsSelector); 52 const params = JSON.parse(this.$refs.filterJson.textContent); 53 this.deferInit(params); 54 }, 55 deferInit(params) { 56 this.oneQueryMode = params['ONE_QUERY_MODE']; 57 this.prepareResult(params); 58 this.addListeners(); 59 }, 60 addListeners() { 61 const _this = this; 62 // оÑпÑавка ÑоÑÐ¼Ñ 63 this.form.addEventListener('submit', (e) => { 64 e.preventDefault(); 65 this.reloadPage() 66 }) 67 68 // ÑобÑÑие ÑÐ´Ð°Ð»ÐµÐ½Ð¸Ñ Ð²ÑÐµÑ Ð·Ð½Ð°Ñений ÑвойÑÑва 69 window.addEventListener('filter-disable-item', function ($event) { 70 const data = $event.detail; 71 // оÑиÑÑим activeItems Ð¾Ñ ÑвойÑÑв коÑоÑÑе нÑжно ÑдалиÑÑ 72 _this.activeItems = _this.activeItems.filter((e) => !data.items.includes(e)); 73 _this.clearProp(data.items) 74 }); 75 76 // ÑобÑÑие ÑÑÑановки нового знаÑÐµÐ½Ð¸Ñ 77 window.addEventListener('filter-change-range', function ($event) { 78 if ($event.detail.names) { 79 $event.detail.names.forEach(e => { 80 _this.addToActiveItems(e) 81 }) 82 } else { 83 _this.addToActiveItems($event.detail.name) 84 } 85 86 _this.executeFilter() 87 }); 88 89 // ÑобÑÑÐ¸Ñ Ð¿Ñи клике на checkedItemsContainer 90 this.checkedItemsContainer.addEventListener('click', ($event) => { 91 if ($event.target.classList.contains(this.checkedItemsClearAllClass) || $event.target.closest('.' + this.checkedItemsClearAllClass)) { 92 this.reset(); 93 } 94 95 if ($event.target.classList.contains(this.checkedItemClass) || $event.target.closest('.' + this.checkedItemClass)) { 96 const controlName = $event.target.dataset.paramId ? 97 $event.target.dataset.paramId : 98 $event.target.closest('.filter-item').dataset.paramId; 99 100 if (controlName) { 101 this.clearItems.push(controlName); 102 _this.executeFilter() 103 } 104 } 105 }); 106 }, 107 prepareResult(rawData) { 108 this.arResult = rawData; 109 const _noActiveItems = []; 110 111 // иÑем вÑе акÑивнÑе CONTROL_NAME 112 for (let key in this.arResult['ITEMS']) { 113 const _item = this.arResult['ITEMS'][key]; 114 _item['VALUES'].forEach(e => { 115 if (e['CHECKED']) { 116 this.addToActiveItems(e['CONTROL_NAME']); 117 } 118 else { 119 _noActiveItems.push(e['CONTROL_NAME']) 120 } 121 }) 122 } 123
124 this.activeItems.forEach(e => { 125 // еÑли Ñже не акÑивнÑе еÑе оÑÑалиÑÑ Ð² акÑивнÑÑ - ÑиÑÑим 126 if (_noActiveItems.includes(e)) { 127 this.deleteFromActiveItems(e); 128 } 129 }) 130 131 Alpine.store('filter').items = this.arResult['ITEMS']; 132 //видимоÑÑÑ ÐºÐ½Ð¾Ð¿ÐºÐ¸ оÑиÑÑиÑÑ ÑилÑÑÑ 133 Alpine.store('filter').activeItems = this.activeItems.length; 134 this.setActiveItemsCount(); 135 }, 136 /** 137 * кол-во акÑивнÑÑ ÑлеменÑов 138 */ 139 setActiveItemsCount() { 140 if (this.arResult['ELEMENT_COUNT']) { 141 Alpine.store('filter').count = +this.arResult['ELEMENT_COUNT']; 142 } 143 else { 144 // пÑи пеÑвой загÑÑзке ÑÑÑаниÑÑ ÑилÑÑÑ Ð½Ðµ оÑÐ´Ð°ÐµÑ ÐºÐ¾Ð»-во, поÑÑÐ¾Ð¼Ñ Ð´Ð¾ÑÑаем из .js-catalog-total 145 const catalogTotal = document.querySelector(this.totalItemsSelector); 146 if (catalogTotal) { 147 Alpine.store('filter').count = +catalogTotal.dataset.count; 148 } 149 } 150 }, 151 executeFilter() { 152 const _this = this; 153 const url = this.arResult['SEF_MODE'] ? 154 this.arResult['JS_FILTER_PARAMS']['SEF_SET_FILTER_URL'] : 155 this.arResult['JS_FILTER_PARAMS']['SEF_DEL_FILTER_URL']; 156 157 if (_this.oneQueryMode) { 158 _this.preloaderContainer.classList.add(this.preloaderClass); 159 fetch(url, { 160 method: 'POST', 161 body: this.getFilterFormData() 162 }) 163 .then(response => response.text()) 164 .then(text => { 165 let template = document.createElement('div'); 166 template.innerHTML = text; 167 168 try { 169 const jsonNode = template.querySelector('#filterJsonAjax'); 170 const json = JSON.parse(jsonNode.textContent); 171 _this.prepareResult(json); 172 } catch (e) { 173 console.error(e) 174 } 175 176 _this.setPageHtml(template); 177 }) 178 .catch(error => console.error('error:', error)) 179 .finally(() => { 180 _this.preloaderContainer.classList.remove(this.preloaderClass); 181 window.dispatchEvent(new CustomEvent("ajax-finished", { 182 detail: {} 183 })); 184 window.reinit?.catalogTargets && window.reinit.catalogTargets(); 185 history.pushState(null, null, this.arResult['JS_FILTER_PARAMS']['SEF_SET_FILTER_URL']); 186 }); 187 } 188 else { 189 fetch(url, { 190 method: 'POST', 191 body: this.getFilterFormData() 192 }) 193 .then(response => response.json()) 194 .then(json => { 195 _this.prepareResult(json); 196 _this.reloadPage(); 197 /* 198 if (!isMobile()){ 199 _this.reloadPage() 200 }*/ 201 }) 202 .catch(error => console.error('error:', error)) 203 .finally(() => { }); 204 } 205 }, 206 reloadPage() { 207 const _this = this; 208 this.preloaderContainer.classList.add(this.preloaderClass); 209 fetch(this.arResult['JS_FILTER_PARAMS']['SEF_SET_FILTER_URL'], { 210 method: 'POST', 211 cache: 'no-cache', 212 headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, 213 body: new URLSearchParams({ reload_ajax: 'y' }) 214 }) 215 .then(response => response.text()) 216 .then(text => { 217 let template = document.createElement('div'); 218 template.innerHTML = text; 219 220 _this.setPageHtml(template); 221 }).finally(() => { 222 /* if (isMobile()){ _this.openFilter = false }*/ 223 this.preloaderContainer.classList.remove(this.preloaderClass); 224 window.dispatchEvent(new CustomEvent("ajax-finished", { 225 detail: {} 226 })); 227 history.pushState(null, null, this.arResult['JS_FILTER_PARAMS']['SEF_SET_FILTER_URL']); 228 }) 229 }, 230 setPageHtml(template) { 231 this.changeExternalNodes(template); 232 if (template.querySelector(this.productsListSelector)) { 233 this.preloaderContainer.innerHTML = template.querySelector(this.productsListSelector).innerHTML; 234 } 235 else { 236 console.log('product container list not found') 237 } 238 }, 239 getFilterFormData() { 240 const raw = new FormData(this.form); 241 const formData = new FormData(); 242 for (let pair of raw.entries()) { 243 if ((pair[0].includes('MIN') || pair[0].includes('MAX')) && !this.activeItems.includes(pair[0])) continue; 244 if (this.clearItems.includes(pair[0])) continue; 245 formData.append(pair[0], pair[1]); 246 } 247 248 this.clearItems = []; 249 return formData; 250 }, 251 changeExternalNodes(template) { 252 253 const externalItems = [ 254 this.totalItemsSelector, 255 this.seoFilterLinksSelector, 256 this.checkedItemsSelector, 257 this.h1Selector, 258 this.breadcrumbSelector, 259 this.seoTextSelector 260 ]; 261
262 externalItems.forEach(selector => { 263 const node = document.querySelector(selector); 264 const nodeAjax = template.querySelector(selector); 265 266 if (node && nodeAjax) { 267 node.innerHTML = nodeAjax.innerHTML; 268 } 269 }) 270 271 //catalog-filters-nonreactive 272 const node = document.querySelector(this.checkedItemsSelector); 273 const nodeAjax = template.querySelector(this.checkedItemsSelector); 274 if (node && nodeAjax.querySelector('.filter-item')) { 275 node.classList.remove('no--margin') 276 } else { 277 node.classList.add('no--margin') 278 } 279 }, 280 clearProp(disableItems) { 281 this.clearItems = disableItems; 282 this.executeFilter(); 283 }, 284 checkActiveItem(controlName) { 285 return this.activeItems.includes(controlName); 286 }, 287 addToActiveItems(controlName) { 288 if (!this.checkActiveItem(controlName)) { 289 this.activeItems.push(controlName); 290 } 291 }, 292 deleteFromActiveItems(controlName) { 293 if (this.checkActiveItem(controlName)) { 294 this.activeItems.splice(this.activeItems.indexOf(controlName), 1); 295 } 296 }, 297 reset() { 298 //window.location.href = this.arResult['JS_FILTER_PARAMS']['SEF_DEL_FILTER_URL']; 299 this.clearItems = this.activeItems; 300 this.activeItems = []; 301 this.executeFilter() 302 }, 303 animate(el) { 304 if (el.closest('.side-filter__overflow').childElementCount - 1 <= 5) return; 305 const target = el.closest('.side-filter__item') 306 if (target.classList.contains('focus-in')) { 307 target.classList.add('deactivated'); 308 } else { 309 target.classList.add('activated'); 310 } 311 setTimeout(() => { 312 target.classList.remove('activated'); 313 target.classList.remove('deactivated'); 314 }, 300) 315 }, 316 trigger: { 317 ['@change']($event) { 318 this.animate($event.target) 319 this.addToActiveItems($event.target.name) 320 this.executeFilter(); 321 } 322 }, 323 clearButton: { 324 ['@click']($event) { 325 $event.preventDefault(); 326 this.reset(); 327 } 328 } 329 })); 330 331 /** 332 * ÐºÐ¾Ð¼Ð¿Ð¾Ð½ÐµÐ½Ñ Ð¾Ð´Ð½Ð¾Ð³Ð¾ ÑлеменÑа в ÑилÑÑÑе 333 */ 334 Alpine.data('dropdownItem', ({ el, key, isRadio = false, range = false, isOpened = false, visibleCount = 0 }) => ({ 335 ready: false, 336 open: false, 337 folded: false, 338 el: '', 339 key: '', 340 data: {}, 341 visibleCount: 0, 342 visibleItems: [], 343 hiddenItems: {}, 344 isRadio: false, 345 isRange: false, 346 isOpened: false, 347 stepsSlider: null, 348 initStepsSlider: false, 349 isPristine: true, 350 isChanged: false, // акÑивиÑÑеÑÑÑ ÐµÑли бÑло взаимодейÑÑвие 351 init() { 352 const _this = this; 353 this.visibleCount = visibleCount; 354 this.el = el; 355 this.key = key; 356 this.isRadio = isRadio; 357 this.isRange = range; 358 this.isOpened = !!isOpened; 359 360 this.$watch('open', (v) => { 361 if (v) { 362 _this.$refs['itemBody'].classList.remove('hidden'); 363 _this.$refs['arrow']?.classList.add('active'); 364 } else { 365 _this.$refs['itemBody'].classList.add('hidden'); 366 _this.$refs['arrow']?.classList.remove('active'); 367 } 368 }); 369 370 _this.$refs['nonreactive']?.remove(); 371 // оÑмеÑим ÑÑо ÐºÐ¾Ð¼Ð¿Ð¾Ð½ÐµÐ½Ñ Ð¿Ð¾Ð»Ð½Ð¾ÑÑÑÑ Ð³Ð¾Ñов к ÑабоÑе 372 _this.ready = true; 373 374 // Ñледим за изменением даннÑÑ Ð² Ñ ÑанилиÑе ÑилÑÑÑа 375 Alpine.effect(() => { 376 this.preparedData(Alpine.store('filter').items[this.key]) 377 }); 378 379 if (_this.isRange) { 380 // иниÑиализаÑÐ¸Ñ Ð¿Ð¾Ð»Ð·Ñнков 381 _this.stepsSlider = rangeSlider(_this.$refs['rangeSlider']); 382 _this.stepsSlider.noUiSlider.on('change.one', function (values, index) { 383 384 window.dispatchEvent(new CustomEvent("filter-change-range", { 385 detail: { 386 names: _this.data['VALUES'].map(e => e['CONTROL_NAME']), 387 } 388 })); 389 }); 390 // оÑмеÑим ÑÑо ползÑнок гоÑов к ÑабоÑе 391 _this.initStepsSlider = true; 392 } 393 }, 394 preparedData(rawData) { 395 this.rawData = rawData; 396 if (!rawData || (this.visibleCount === 0 && !this.isRange) || !this.isOpened) return; 397 398 const deepCopy = JSON.parse(JSON.stringify(rawData)); 399 if (!deepCopy) return; 400 this.data = deepCopy; 401 402 if (!this.isChanged) { 403 // ÑвеÑнÑÑ/ÑазвеÑнÑÑ 404 this.open = deepCopy['EXPANDED']; 405 } 406 407 if (!this.isRange) { 408 // Ñазбиваем VALUES на подгÑÑÐ¿Ð¿Ñ 409 const groups = deepCopy['VALUES']; 410 this.visibleItems = groups.filter((_, index) => index < this.visibleCount) 411 } 412 else { 413 if (this.initStepsSlider) { 414 // обновление ползÑнков 415 this.range() 416 } 417 } 418 419 // акÑивноÑÑÑ ÑлеменÑа 420 rawData['IS_CHECKED'] 421 ? this.el.classList.add('active') 422 : this.el.classList.remove('active'); 423 }, 424 /** 425 * иниÑиализаÑÐ¸Ñ Ð¸ ÑабоÑа noUiSlider 426 */ 427 range() { 428 const _values = this.data['VALUES']; 429 // ÑÑÑановим новÑе знаÑÐµÐ½Ð¸Ñ 430 let from = Math.round(_values[0]['VALUE']); 431 let to = Math.round(_values[1]['VALUE']); 432 433 if (_values[0]['FILTERED_VALUE']) { 434 from = Math.round(_values[0]['FILTERED_VALUE']); 435 } 436 437 if (_values[1]['FILTERED_VALUE']) { 438 to = Math.round(_values[1]['FILTERED_VALUE']); 439 } 440 441 if (_values[0]['HTML_VALUE']) { 442 from = Math.round(_values[0]['HTML_VALUE']); 443 } 444 445 if (_values[1]['HTML_VALUE']) { 446 to = Math.round(_values[1]['HTML_VALUE']); 447 } 448 449 this.stepsSlider.noUiSlider.updateOptions({ 450 start: [from, to], 451 /*padding: [40, 40], 452 range: { 453 'min': [Number(from)], 454 'max': [Number(to)] 455 },*/ 456 }, true); 457 }, 458 reset() { 459 if (this.isRadio) { 460 this.el.querySelector('.emptyValue').click(); 461 return; 462 } 463 464 const find = Alpine.store('filter').items[this.key]; 465 if (find) { 466 const disableItems = []; 467 find['VALUES'].forEach(e => { 468 disableItems.push(e.CONTROL_NAME); 469 }); 470 471 if (disableItems.length) { 472 window.dispatchEvent(new CustomEvent("filter-disable-item", { 473 detail: { 474 items: disableItems, 475 range: this.isRange 476 } 477 })); 478 } 479 } 480 }, 481 expand() { 482 this.visibleCount = Infinity; 483 this.preparedData(Alpine.store('filter').items[this.key]) 484 this.isPristine = false;
485 }, 486 filterItem: { 487 ['@click']($event) { 488 if (this.isPristine) { 489 this.visibleCount = 5 490 } 491 this.isPristine = false; 492 this.isChanged = true; 493 this.isOpened = true; 494 if ($event.target.classList.contains('filter-item__remove') || $event.target.closest('.filter-item__remove')) { 495 this.open = false; 496 this.reset(); 497 return; 498 } 499 if ($event.target.classList.contains('more-arrow')) { 500 this.open = !this.open; 501 } 502 } 503 } 504 })) 505}) 506 507/* End */ 508; 509; /* Start:"a:4:{s:4:"full";s:72:"/local/templates/html/assets/js/vendor/nouislider.min.js?170979864327097";s:6:"source";s:56:"/local/templates/html/assets/js/vendor/nouislider.min.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 510!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).noUiSlider={})}(this,(function(t){"use strict";function e(t){return"object"==typeof t&&"function"==typeof t.to}function r(t){t.parentElement.removeChild(t)}function n(t){return null!=t}function i(t){t.preventDefault()}function o(t){return"number"==typeof t&&!isNaN(t)&&isFinite(t)}function s(t,e,r){0<r&&(c(t,e),setTimeout((function(){p(t,e)}),r))}function a(t){return Math.max(Math.min(t,100),0)}function l(t){return Array.isArray(t)?t:[t]}function u(t){return 1<(t=(t=String(t)).split(".")).length?t[1].length:0}function c(t,e){t.classList&&!/\s/.test(e)?t.classList.add(e):t.className+=" "+e}function p(t,e){t.classList&&!/\s/.test(e)?t.classList.remove(e):t.className=t.className.replace(new RegExp("(^|\\b)"+e.split(" ").join("|")+"(\\b|$)","gi")," ")}function f(t){var e=void 0!==window.pageXOffset,r="CSS1Compat"===(t.compatMode||"");return{x:e?window.pageXOffset:(r?t.documentElement:t.body).scrollLeft,y:e?window.pageYOffset:(r?t.documentElement:t.body).scrollTop}}function d(t,e){return 100/(e-t)}function h(t,e,r){return 100*e/(t[r+1]-t[r])}function m(t,e){for(var r=1;t>=e[r];)r+=1;return r}t.PipsMode=void 0,($=t.PipsMode||(t.PipsMode={})).Range="range",$.Steps="steps",$.Positions="positions",$.Count="count",$.Values="values",t.PipsType=void 0,($=t.PipsType||(t.PipsType={}))[$.None=-1]="None",$[$.NoValue=0]="NoValue",$[$.LargeValue=1]="LargeValue",$[$.SmallValue=2]="SmallValue";var g=(v.prototype.getDistance=function(t){for(var e=[],r=0;r<this.xNumSteps.length-1;r++)e[r]=h(this.xVal,t,r);return e},v.prototype.getAbsoluteDistance=function(t,e,r){var n=0;if(t<this.xPct[this.xPct.length-1])for(;t>this.xPct[n+1];)n++;else t===this.xPct[this.xPct.length-1]&&(n=this.xPct.length-2);r||t!==this.xPct[n+1]||n++;for(var i,o=1,s=(e=null===e?[]:e)[n],a=0,l=0,u=0,c=r?(t-this.xPct[n])/(this.xPct[n+1]-this.xPct[n]):(this.xPct[n+1]-t)/(this.xPct[n+1]-this.xPct[n]);0<s;)i=this.xPct[n+1+u]-this.xPct[n+u],100<e[n+u]*o+100-100*c?(a=i*c,o=(s-100*c)/e[n+u],c=1):(a=e[n+u]*i/100*o,o=0),r?(l-=a,1<=this.xPct.length+u&&u--):(l+=a,1<=this.xPct.length-u&&u++),s=e[n+u]*o;return t+l},v.prototype.toStepping=function(t){return function(t,e,r){if(r>=t.slice(-1)[0])return 100;var n=t[(o=m(r,t))-1],i=t[o],o=(t=e[o-1],e[o]);return t+(r=r,h(i=[n,i],i[0]<0?r+Math.abs(i[0]):r-i[0],0)/d(t,o))}(this.xVal,this.xPct,t)},v.prototype.fromStepping=function(t){return function(t,e,r){if(100<=r)return t.slice(-1)[0];var n,i=t[(n=m(r,e))-1],o=t[n];return(r-(t=e[n-1]))*d(t,n=e[n])*((o=[i,o])[1]-o[0])/100+o[0]}(this.xVal,this.xPct,t)},v.prototype.getStep=function(t){return function(t,e,r,n){if(100===n)return n;var i=m(n,t),o=t[i-1],s=t[i];return r?(s-o)/2<n-o?s:o:e[i-1]?t[i-1]+(t=n-t[i-1],i=e[i-1],Math.round(t/i)*i):n}(this.xPct,this.xSteps,this.snap,t)},v.prototype.getDefaultStep=function(t,e,r){var n=m(t,this.xPct);return(100===t||e&&t===this.xPct[n-1])&&(n=Math.max(n-1,1)),(this.xVal[n]-this.xVal[n-1])/r},v.prototype.getNearbySteps=function(t){return t=m(t,this.xPct),{stepBefore:{startValue:this.xVal[t-2],step:this.xNumSteps[t-2],highestStep:this.xHighestCompleteStep[t-2]},thisStep:{startValue:this.xVal[t-1],step:this.xNumSteps[t-1],highestStep:this.xHighestCompleteStep[t-1]},stepAfter:{startValue:this.xVal[t],step:this.xNumSteps[t],highestStep:this.xHighestCompleteStep[t]}}},v.prototype.countStepDecimals=function(){var t=this.xNumSteps.map(u);return Math.max.apply(null,t)},v.prototype.hasNoSize=function(){return this.xVal[0]===this.xVal[this.xVal.length-1]}
vendor: 6,862 bytes, line 510
510,v.prototype.convert=function(t){return this.getStep(this.toStepping(t))},v.prototype.handleEntryPoint=function(t,e){if(!o(t="min"===t?0:"max"===t?100:parseFloat(t))||!o(e[0]))throw new Error("noUiSlider: 'range' value isn't numeric.");this.xPct.push(t),this.xVal.push(e[0]),e=Number(e[1]),t?this.xSteps.push(!isNaN(e)&&e):isNaN(e)||(this.xSteps[0]=e),this.xHighestCompleteStep.push(0)},v.prototype.handleStepPoint=function(t,e){e&&(this.xVal[t]!==this.xVal[t+1]?(this.xSteps[t]=h([this.xVal[t],this.xVal[t+1]],e,0)/d(this.xPct[t],this.xPct[t+1]),e=(this.xVal[t+1]-this.xVal[t])/this.xNumSteps[t],e=Math.ceil(Number(e.toFixed(3))-1),e=this.xVal[t]+this.xNumSteps[t]*e,this.xHighestCompleteStep[t]=e):this.xSteps[t]=this.xHighestCompleteStep[t]=this.xVal[t])},v);function v(t,e,r){var n;this.xPct=[],this.xVal=[],this.xSteps=[],this.xNumSteps=[],this.xHighestCompleteStep=[],this.xSteps=[r||!1],this.xNumSteps=[!1],this.snap=e;var i=[];for(Object.keys(t).forEach((function(e){i.push([l(t[e]),e])})),i.sort((function(t,e){return t[0][0]-e[0][0]})),n=0;n<i.length;n++)this.handleEntryPoint(i[n][1],i[n][0]);for(this.xNumSteps=this.xSteps.slice(0),n=0;n<this.xNumSteps.length;n++)this.handleStepPoint(n,this.xNumSteps[n])}var b={to:function(t){return void 0===t?"":t.toFixed(2)},from:Number},S={target:"target",base:"base",origin:"origin",handle:"handle",handleLower:"handle-lower",handleUpper:"handle-upper",touchArea:"touch-area",horizontal:"horizontal",vertical:"vertical",background:"background",connect:"connect",connects:"connects",ltr:"ltr",rtl:"rtl",textDirectionLtr:"txt-dir-ltr",textDirectionRtl:"txt-dir-rtl",draggable:"draggable",drag:"state-drag",tap:"state-tap",active:"active",tooltip:"tooltip",pips:"pips",pipsHorizontal:"pips-horizontal",pipsVertical:"pips-vertical",marker:"marker",markerHorizontal:"marker-horizontal",markerVertical:"marker-vertical",markerNormal:"marker-normal",markerLarge:"marker-large",markerSub:"marker-sub",value:"value",valueHorizontal:"value-horizontal",valueVertical:"value-vertical",valueNormal:"value-normal",valueLarge:"value-large",valueSub:"value-sub"},x=".__tooltips",y=".__aria";function w(t,e){if(!o(e))throw new Error("noUiSlider: 'step' is not numeric.");t.singleStep=e}function E(t,e){if(!o(e))throw new Error("noUiSlider: 'keyboardPageMultiplier' is not numeric.");t.keyboardPageMultiplier=e}function P(t,e){if(!o(e))throw new Error("noUiSlider: 'keyboardMultiplier' is not numeric.");t.keyboardMultiplier=e}function C(t,e){if(!o(e))throw new Error("noUiSlider: 'keyboardDefaultStep' is not numeric.");t.keyboardDefaultStep=e}function N(t,e){if("object"!=typeof e||Array.isArray(e))throw new Error("noUiSlider: 'range' is not an object.");if(void 0===e.min||void 0===e.max)throw new Error("noUiSlider: Missing 'min' or 'max' in 'range'.");t.spectrum=new g(e,t.snap||!1,t.singleStep)}function V(t,e){if(e=l(e),!Array.isArray(e)||!e.length)throw new Error("noUiSlider: 'start' option is incorrect.");t.handles=e.length,t.start=e}function A(t,e){if("boolean"!=typeof e)throw new Error("noUiSlider: 'snap' option must be a boolean.");t.snap=e}function k(t,e){if("boolean"!=typeof e)throw new Error("noUiSlider: 'animate' option must be a boolean.");t.animate=e}function M(t,e){if("number"!=typeof e)throw new Error("noUiSlider: 'animationDuration' option must be a number.");t.animationDuration=e}function U(t,e){var r,n=[!1];if("lower"===e?e=[!0,!1]:"upper"===e&&(e=[!1,!0]),!0===e||!1===e){for(r=1;r<t.handles;r++)n.push(e);n.push(!1)}else{if(!Array.isArray(e)||!e.length||e.length!==t.handles+1)throw new Error("noUiSlider: 'connect' option doesn't match handle count.");n=e}t.connect=n}function D(t,e){switch(e){case"horizontal":t.ort=0;break;case"vertical":t.ort=1;break;default:throw new Error("noUiSlider: 'orientation' option is invalid.")}}function O(t,e){if(!o(e))throw new Error("noUiSlider: 'margin' option must be numeric.");0!==e&&(t.margin=t.spectrum.getDistance(e))}function L(t,e){if(!o(e))throw new Error("noUiSlider: 'limit' option must be numeric.");if(t.limit=t.spectrum.getDistance(e),!t.limit||t.handles<2)throw new Error("noUiSlider: 'limit' option is only supported on linear sliders with 2 or more handles.")}function T(t,e){var r;if(!o(e)&&!Array.isArray(e))throw new Error("noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.");if(Array.isArray(e)&&2!==e.length&&!o(e[0])&&!o(e[1]))throw new Error("noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.");if(0!==e){for(Array.isArray(e)||(e=[e,e]),t.padding=[t.spectrum.getDistance(e[0]),t.spectrum.getDistance(e[1])],r=0;r<t.spectrum.xNumSteps.length-1;r++)if(t.padding[0][r]<0||t.padding[1][r]<0)throw new Error("noUiSlider: 'padding' option must be a positive number(s).");var n=e[0]+e[1];if(e=t.spectrum.xVal[0],1<n/(t.spectrum.xVal[t.spectrum.xVal.length-1]-e))throw new Error("noUiSlider: 'padding' option must not exceed 100% of the range.")}}function j(t,e){switch(e){case"ltr":t.dir=0;break;case"rtl":t.dir=1;break;default:throw new Error("noUiSlider: 'direction' option was not recognized.")}}function z(t,e){if("string"!=typeof e)throw new Error("noUiSlider: 'behaviour' must be a string containing options.");var r=0<=e.indexOf("tap"),n=0<=e.indexOf("drag"),i=0<=e.indexOf("fixed"),o=0<=e.indexOf("snap"),s=0<=e.indexOf("hover"),a=0<=e.indexOf("unconstrained"),l=0<=e.indexOf("drag-all");if(e=0<=e.indexOf("smooth-steps"),i){if(2!==t.handles)throw new Error("noUiSlider: 'fixed' behaviour must be used with 2 handles");O(t,t.start[1]-t.start[0])}if(a&&(t.margin||t.limit))throw new Error("noUiSlider: 'unconstrained' behaviour cannot be used with margin or limit");t.events={tap:r||o,drag:n,dragAll:l,smoothSteps:e,fixed:i,snap:o,hover:s,unconstrained:a}}function H(t,r){if(!1!==r)if(!0===r||e(r)){t.tooltips=[];for(var n=0;n<t.handles;n++)t.tooltips.push(r)}else{if((r=l(r)).length!==t.handles)throw new Error("noUiSlider: must pass a formatter for all handles.");r.forEach((function(t){if("boolean"!=typeof t&&!e(t))throw new Error("noUiSlider: 'tooltips' must be passed a formatter or 'false'.")})),t.tooltips=r}}function F(t,e){if(e.length!==t.handles)throw new Error("noUiSlider: must pass a attributes for all handles.");t.handleAttributes=e}function _(t,r){if(!e(r))throw new Error("noUiSlider: 'ariaFormat' requires 'to' method.");t.ariaFormat=r}function R(t,r){if(!e(n=r)||"function"!=typeof n.from)throw new Error("noUiSlider: 'format' requires 'to' and 'from' methods.");var n;t.format=r}function B(t,e){if("boolean"!=typeof e)throw new Error("noUiSlider: 'keyboardSupport' option must be a boolean.");t.keyboardSupport=e}function q(t,e){t.documentElement=e}function X(t,e){if("string"!=typeof e&&!1!==e)throw new Error("noUiSlider: 'cssPrefix' must be a string or `false`.");t.cssPrefix=e}function Y(t,e){if("object"!=typeof e)throw new Error("noUiSlider: 'cssClasse
510s' must be an object.");"string"==typeof t.cssPrefix?(t.cssClasses={},Object.keys(e).forEach((function(r){t.cssClasses[r]=t.cssPrefix+e[r]}))):t.cssClasses=e}function I(t){var e={margin:null,limit:null,padding:null,animate:!0,animationDuration:300,ariaFormat:b,format:b},r={step:{r:!1,t:w},keyboardPageMultiplier:{r:!1,t:E},keyboardMultiplier:{r:!1,t:P},keyboardDefaultStep:{r:!1,t:C},start:{r:!0,t:V},connect:{r:!0,t:U},direction:{r:!0,t:j},snap:{r:!1,t:A},animate:{r:!1,t:k},animationDuration:{r:!1,t:M},range:{r:!0,t:N},orientation:{r:!1,t:D},margin:{r:!1,t:O},limit:{r:!1,t:L},padding:{r:!1,t:T},behaviour:{r:!0,t:z},ariaFormat:{r:!1,t:_},format:{r:!1,t:R},tooltips:{r:!1,t:H},keyboardSupport:{r:!0,t:B},documentElement:{r:!1,t:q},cssPrefix:{r:!0,t:X},cssClasses:{r:!0,t:Y},handleAttributes:{r:!1,t:F}},i={connect:!1,direction:"ltr",behaviour:"tap",orientation:"horizontal",keyboardSupport:!0,cssPrefix:"noUi-",cssClasses:S,keyboardPageMultiplier:5,keyboardMultiplier:1,keyboardDefaultStep:10};t.format&&!t.ariaFormat&&(t.ariaFormat=t.format),Object.keys(r).forEach((function(o){if(n(t[o])||void 0!==i[o])r[o].t(e,(n(t[o])?t:i)[o]);else if(r[o].r)throw new Error("noUiSlider: '"+o+"' is required.")})),e.pips=t.pips;var o=void 0!==(s=document.createElement("div")).style.msTransform,s=void 0!==s.style.transform;return e.transformRule=s?"transform":o?"msTransform":"webkitTransform",e.style=[["left","top"],["right","bottom"]][e.dir][e.ort],e}function W(e,o){if(!e||!e.nodeName)throw new Error("noUiSlider: create requires a single element, got: "+e);if(e.noUiSlider)throw new Error("noUiSlider: Slider was already initialized.");return o=function(e,o,u){var d,h,m,g,v,b,S=window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"},w=window.CSS&&CSS.supports&&CSS.supports("touch-action","none")&&function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("test",null,e)}catch(t){}return t}(),E=e,P=o.spectrum,C=[],N=[],V=[],A=0,k={},M=e.ownerDocument,U=o.documentElement||M.documentElement,D=M.body,O="rtl"===M.dir||1===o.ort?0:100;function L(t,e){var r=M.createElement("div");return e&&c(r,e),t.appendChild(r),r}function T(t,e){t=L(t,o.cssClasses.origin);var r,n=L(t,o.cssClasses.handle);return L(n,o.cssClasses.touchArea),n.setAttribute("data-handle",String(e)),o.keyboardSupport&&(n.setAttribute("tabindex","0"),n.addEventListener("keydown",(function(t){return function(t,e){if(H()||F(e))return!1;var r=["Left","Right"],n=["Down","Up"],i=["PageDown","PageUp"],s=["Home","End"];o.dir&&!o.ort?r.reverse():o.ort&&!o.dir&&(n.reverse(),i.reverse());var a=t.key.replace("Arrow",""),l=a===i[0],u=a===i[1];if(i=a===n[0]||a===r[0]||l,n=a===n[1]||a===r[1]||u,r=a===s[0],s=a===s[1],!(i||n||r||s))return!0;if(t.preventDefault(),n||i){var c=i?0:1;if(null===(c=ft(e)[c]))return!1;!1===c&&(c=P.getDefaultStep(N[e],i,o.keyboardDefaultStep)),c*=u||l?o.keyboardPageMultiplier:o.keyboardMultiplier,c=Math.max(c,1e-7),c*=i?-1:1,c=C[e]+c}else c=s?o.spectrum.xVal[o.spectrum.xVal.length-1]:o.spectrum.xVal[0];return at(e,P.toStepping(c),!0,!0),et("slide",e),et("update",e),et("change",e),et("set",e),!1}(t,e)}))),void 0!==o.handleAttributes&&(r=o.handleAttributes[e],Object.keys(r).forEach((function(t){n.setAttribute(t,r[t])}))),n.setAttribute("role","slider"),n.setAttribute("aria-orientation",o.ort?"vertical":"horizontal"),0===e?c(n,o.cssClasses.handleLower):e===o.handles-1&&c(n,o.cssClasses.handleUpper),t.handle=n,t}function j(t,e){return!!e&&L(t,o.cssClasses.connect)}function z(t,e){return!(!o.tooltips||!o.tooltips[e])&&L(t.firstChild,o.cssClasses.tooltip)}function H(){return E.hasAttribute("disabled")}function F(t){return h[t].hasAttribute("disabled")}function _(){v&&(tt("update.__tooltips"),v.forEach((function(t){t&&r(t)})),v=null)}function R(){_(),v=h.map(z),Z("update.__tooltips",(function(t,e,r){v&&o.tooltips&&!1!==v[e]&&(t=t[e],!0!==o.tooltips[e]&&(t=o.tooltips[e].to(r[e])),v[e].innerHTML=t)}))}function B(t,e){return t.map((function(t){return P.fromStepping(e?P.getStep(t):t)}))}function q(){g&&(r(g),g=null)}function X(e){q();var r=function(e){var r=function(e){if(e.mode===t.PipsMode.Range||e.mode===t.PipsMode.Steps)return P.xVal;if(e.mode!==t.PipsMode.Count)return e.mode===t.PipsMode.Positions?B(e.values,e.stepped):e.mode===t.PipsMode.Values?e.stepped?e.values.map((function(t){return P.fromStepping(P.getStep(P.toStepping(t)))})):e.values:[];if(e.values<2)throw new Error("noUiSlider: 'values' (>= 2) required for mode 'count'.");for(var r=e.values-1,n=100/r,i=[];r--;)i[r]=r*n;return i.push(100),B(i,e.stepped)}(e),n={},i=P.xVal[0],o=P.xVal[P.xVal.length-1],s=!1,a=!1,l=0;return(r=r.slice().sort((function(t,e){return t-e})).filter((function(t){return!this[t]&&(this[t]=!0)}),{}))[0]!==i&&(r.unshift(i),s=!0),r[r.length-1]!==o&&(r.push(o),a=!0),r.forEach((function(i,o){i=i;var u,c,p,f,d,h,m,g,v=r[o+1],b=e.mode===t.PipsMode.Steps,S=(S=b?P.xNumSteps[o]:S)||v-i;for(void 0===v&&(v=i),S=Math.max(S,1e-7),u=i;u<=v;u=Number((u+S).toFixed(7))){for(h=(f=(p=P.toStepping(u))-l)/(e.density||1),g=f/(m=Math.round(h)),c=1;c<=m;c+=1)n[(d=l+c*g).toFixed(5)]=[P.fromStepping(d),0];h=-1<r.indexOf(u)?t.PipsType.LargeValue:b?t.PipsType.SmallValue:t.PipsType.NoValue,!o&&s&&u!==v&&(h=0),u===v&&a||(n[p.toFixed(5)]=[u,h]),l=p}})),n}(e),n=e.filter;return e=e.format||{to:function(t){return String(Math.round(t))}},g=E.appendChild(function(e,r,n){var i,s=M.createElement("div"),a=((i={}
510)[t.PipsType.None]="",i[t.PipsType.NoValue]=o.cssClasses.valueNormal,i[t.PipsType.LargeValue]=o.cssClasses.valueLarge,i[t.PipsType.SmallValue]=o.cssClasses.valueSub,i),l=((i={})[t.PipsType.None]="",i[t.PipsType.NoValue]=o.cssClasses.markerNormal,i[t.PipsType.LargeValue]=o.cssClasses.markerLarge,i[t.PipsType.SmallValue]=o.cssClasses.markerSub,i),u=[o.cssClasses.valueHorizontal,o.cssClasses.valueVertical],p=[o.cssClasses.markerHorizontal,o.cssClasses.markerVertical];function f(t,e){var r=e===o.cssClasses.value;return e+" "+(r?u:p)[o.ort]+" "+(r?a:l)[t]}return c(s,o.cssClasses.pips),c(s,0===o.ort?o.cssClasses.pipsHorizontal:o.cssClasses.pipsVertical),Object.keys(e).forEach((function(i){var a,l,u;l=e[a=i][0],u=e[i][1],(u=r?r(l,u):u)!==t.PipsType.None&&((i=L(s,!1)).className=f(u,o.cssClasses.marker),i.style[o.style]=a+"%",u>t.PipsType.NoValue&&((i=L(s,!1)).className=f(u,o.cssClasses.value),i.setAttribute("data-value",String(l)),i.style[o.style]=a+"%",i.innerHTML=String(n.to(l))))})),s}(r,n,e))}function Y(){var t=d.getBoundingClientRect(),e="offset"+["Width","Height"][o.ort];return 0===o.ort?t.width||d[e]:t.height||d[e]}function W(t,e,r,n){function i(i){var s,a=function(t,e,r){var n=0===t.type.indexOf("touch"),i=0===t.type.indexOf("mouse"),o=0===t.type.indexOf("pointer"),s=0,a=0;if(0===t.type.indexOf("MSPointer")&&(o=!0),"mousedown"===t.type&&!t.buttons&&!t.touches)return!1;if(n){var l=function(e){return(e=e.target)===r||r.contains(e)||t.composed&&t.composedPath().shift()===r};if("touchstart"===t.type){if(1<(n=Array.prototype.filter.call(t.touches,l)).length)return!1;s=n[0].pageX,a=n[0].pageY}else{if(!(l=Array.prototype.find.call(t.changedTouches,l)))return!1;s=l.pageX,a=l.pageY}}return e=e||f(M),(i||o)&&(s=t.clientX+e.x,a=t.clientY+e.y),t.pageOffset=e,t.points=[s,a],t.cursor=i||o,t}(i,n.pageOffset,n.target||e);
510return!!a&&!(H()&&!n.doNotReject)&&(s=E,i=o.cssClasses.tap,!((s.classList?s.classList.contains(i):new RegExp("\\b"+i+"\\b").test(s.className))&&!n.doNotReject)&&!(t===S.start&&void 0!==a.buttons&&1<a.buttons)&&(!n.hover||!a.buttons)&&(w||a.preventDefault(),a.calcPoint=a.points[o.ort],void r(a,n)))}var s=[];return t.split(" ").forEach((function(t){e.addEventListener(t,i,!!w&&{passive:!0}),s.push([t,i])})),s}function $(t){var e,r,n=a(n=100*(t-(n=d,e=o.ort,r=n.getBoundingClientRect(),n=(t=n.ownerDocument).documentElement,t=f(t),/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(t.x=0),e?r.top+t.y-n.clientTop:r.left+t.x-n.clientLeft))/Y());return o.dir?100-n:n}function G(t,e){"mouseout"===t.type&&"HTML"===t.target.nodeName&&null===t.relatedTarget&&K(t,e)}function J(t,e){if(-1===navigator.appVersion.indexOf("MSIE 9")&&0===t.buttons&&0!==e.buttonsProperty)return K(t,e);it(0<(t=(o.dir?-1:1)*(t.calcPoint-e.startCalcPoint)),100*t/e.baseSize,e.locations,e.handleNumbers,e.connect)}function K(t,e){e.handle&&(p(e.handle,o.cssClasses.active),--A),e.listeners.forEach((function(t){U.removeEventListener(t[0],t[1])})),0===A&&(p(E,o.cssClasses.drag),st(),t.cursor&&(D.style.cursor="",D.removeEventListener("selectstart",i))),o.events.smoothSteps&&(e.handleNumbers.forEach((function(t){at(t,N[t],!0,!0,!1,!1)})),e.handleNumbers.forEach((function(t){et("update",t)}))),e.handleNumbers.forEach((function(t){et("change",t),et("set",t),et("end",t)}))}function Q(t,e){var r,n,s,a;e.handleNumbers.some(F)||(1===e.handleNumbers.length&&(a=h[e.handleNumbers[0]].children[0],A+=1,c(a,o.cssClasses.active)),t.stopPropagation(),n=W(S.move,U,J,{target:t.target,handle:a,connect:e.connect,listeners:r=[],startCalcPoint:t.calcPoint,baseSize:Y(),pageOffset:t.pageOffset,handleNumbers:e.handleNumbers,buttonsProperty:t.buttons,locations:N.slice()}),s=W(S.end,U,K,{target:t.target,handle:a,listeners:r,doNotReject:!0,handleNumbers:e.handleNumbers}),a=W("mouseout",U,G,{target:t.target,handle:a,listeners:r,doNotReject:!0,handleNumbers:e.handleNumbers}),r.push.apply(r,n.concat(s,a)),t.cursor&&(D.style.cursor=getComputedStyle(t.target).cursor,1<h.length&&c(E,o.cssClasses.drag),D.addEventListener("selectstart",i,!1)),e.handleNumbers.forEach((function(t){et("start",t)})))}function Z(t,e){k[t]=k[t]||[],k[t].push(e),"update"===t.split(".")[0]&&h.forEach((function(t,e){et("update",e)}))}function tt(t){var e=t&&t.split(".")[0],r=e?t.substring(e.length):t;Object.keys(k).forEach((function(t){var n=t.split(".")[0],i=t.substring(n.length);e&&e!==n||r&&r!==i||((n=i)!==y&&n!==x||r===i)&&delete k[t]}))}function et(t,e,r){Object.keys(k).forEach((function(n){var i=n.split(".")[0];t===i&&k[n].forEach((function(t){t.call(dt,C.map(o.format.to),e,C.slice(),r||!1,N.slice(),dt)}))}))}function rt(t,e,r,n,i,s,l){var u;return 1<h.length&&!o.events.unconstrained&&(n&&0<e&&(u=P.getAbsoluteDistance(t[e-1],o.margin,!1),r=Math.max(r,u)),i&&e<h.length-1&&(u=P.getAbsoluteDistance(t[e+1],o.margin,!0),r=Math.min(r,u))),1<h.length&&o.limit&&(n&&0<e&&(u=P.getAbsoluteDistance(t[e-1],o.limit,!1),r=Math.min(r,u)),i&&e<h.length-1&&(u=P.getAbsoluteDistance(t[e+1],o.limit,!0),r=Math.max(r,u))),o.padding&&(0===e&&(u=P.getAbsoluteDistance(0,o.padding[0],!1),r=Math.max(r,u)),e===h.length-1&&(u=P.getAbsoluteDistance(100,o.padding[1],!0),r=Math.min(r,u))),!((r=a(r=l?r:P.getStep(r)))===t[e]&&!s)&&r}function nt(t,e){var r=o.ort;return(r?e:t)+", "+(r?t:e)}function it(t,e,r,n,i){var s=r.slice(),a=n[0],l=o.events.smoothSteps,u=[!t,t],c=[t,!t];n=n.slice(),t&&n.reverse(),1<n.length?n.forEach((function(t,r){!1===(r=rt(s,t,s[t]+e,u[r],c[r],!1,l))?e=0:(e=r-s[t],s[t]=r)})):u=c=[!0];var p=!1;n.forEach((function(t,n){p=at(t,r[t]+e,u[n],c[n],!1,l)||p})),p&&(n.forEach((function(t){et("update",t),et("slide",t)})),null!=i&&et("drag",a))}function ot(t,e){return o.dir?100-t-e:t}function st(){V.forEach((function(t){var e=50<N[t]?-1:1;e=3+(h.length+e*t),h[t].style.zIndex=String(e)}))}function at(t,e,r,n,i,s){return!1!==(e=i?e:rt(N,t,e,r,n,!1,s))&&(e=e,N[t=t]=e,C[t]=P.fromStepping(e),e="translate("+nt(ot(e,0)-O+"%","0")+")",h[t].style[o.transformRule]=e,lt(t),lt(t+1),!0)}function lt(t){var e,r;
510m[t]&&(r=100,e="translate("+nt(ot(e=(e=0)!==t?N[t-1]:e,r=(r=t!==m.length-1?N[t]:r)-e)+"%","0")+")",r="scale("+nt(r/100,"1")+")",m[t].style[o.transformRule]=e+" "+r)}function ut(t,e){return null===t||!1===t||void 0===t?N[e]:("number"==typeof t&&(t=String(t)),!1===(t=!1!==(t=o.format.from(t))?P.toStepping(t):t)||isNaN(t)?N[e]:t)}function ct(t,e,r){var n=l(t);t=void 0===N[0],e=void 0===e||e,o.animate&&!t&&s(E,o.cssClasses.tap,o.animationDuration),V.forEach((function(t){at(t,ut(n[t],t),!0,!1,r)}));var i,a=1===V.length?0:1;for(t&&P.hasNoSize()&&(r=!0,N[0]=0,1<V.length&&(i=100/(V.length-1),V.forEach((function(t){N[t]=t*i}))));a<V.length;++a)V.forEach((function(t){at(t,N[t],!0,!0,r)}));st(),V.forEach((function(t){et("update",t),null!==n[t]&&e&&et("set",t)}))}function pt(t){return(t=void 0!==t&&t)?1===C.length?C[0]:C.slice(0):1===(t=C.map(o.format.to)).length?t[0]:t}function ft(t){var e=N[t],r=P.getNearbySteps(e),n=C[t],i=r.thisStep.step;return t=null,o.snap?[n-r.stepBefore.startValue||null,r.stepAfter.startValue-n||null]:(!1!==i&&n+i>r.stepAfter.startValue&&(i=r.stepAfter.startValue-n),t=n>r.thisStep.startValue?r.thisStep.step:!1!==r.stepBefore.step&&n-r.stepBefore.highestStep,100===e?i=null:0===e&&(t=null),e=P.countStepDecimals(),null!==i&&!1!==i&&(i=Number(i.toFixed(e))),[t=null!==t&&!1!==t?Number(t.toFixed(e)):t,i])}c(e=E,o.cssClasses.target),0===o.dir?c(e,o.cssClasses.ltr):c(e,o.cssClasses.rtl),0===o.ort?c(e,o.cssClasses.horizontal):c(e,o.cssClasses.vertical),c(e,"rtl"===getComputedStyle(e).direction?o.cssClasses.textDirectionRtl:o.cssClasses.textDirectionLtr),d=L(e,o.cssClasses.base),function(t,e){var r=L(e,o.cssClasses.connects);h=[],(m=[]).push(j(r,t[0]));for(var n=0;n<o.handles;n++)h.push(T(e,n)),V[n]=n,m.push(j(r,t[n+1]))}(o.connect,d),(b=o.events).fixed||h.forEach((function(t,e){W(S.start,t.children[0],Q,{handleNumbers:[e]})})),b.tap&&W(S.start,d,(function(t){t.stopPropagation();var e,r,n,i=$(t.calcPoint),a=(e=i,n=!(r=100),h.forEach((function(t,i){var o,s;F(i)||(o=N[i],((s=Math.abs(o-e))<r||s<=r&&o<e||100===s&&100===r)&&(n=i,r=s))})),n);!1!==a&&(o.events.snap||s(E,o.cssClasses.tap,o.animationDuration),at(a,i,!0,!0),st(),et("slide",a,!0),et("update",a,!0),o.events.snap?Q(t,{handleNumbers:[a]}):(et("change",a,!0),et("set",a,!0)))}),{}),b.hover&&W(S.move,d,(function(t){t=$(t.calcPoint),t=P.getStep(t);var e=P.fromStepping(t);Object.keys(k).forEach((function(t){"hover"===t.split(".")[0]&&k[t].forEach((function(t){t.call(dt,e)}))}))}),{hover:!0}),b.drag&&m.forEach((function(t,e){var r,n,i,s,a;!1!==t&&0!==e&&e!==m.length-1&&(r=h[e-1],n=h[e],i=[t],s=[r,n],a=[e-1,e],c(t,o.cssClasses.draggable),b.fixed&&(i.push(r.children[0]),i.push(n.children[0])),b.dragAll&&(s=h,a=V),i.forEach((function(e){W(S.start,e,Q,{handles:s,handleNumbers:a,connect:t})})))})),ct(o.start),o.pips&&X(o.pips),o.tooltips&&R(),tt("update.__aria"),Z("update.__aria",(function(t,e,r,n,i){V.forEac
510h((function(t){var e=h[t],n=rt(N,t,0,!0,!0,!0),s=rt(N,t,100,!0,!0,!0),a=i[t];t=String(o.ariaFormat.to(r[t])),n=P.fromStepping(n).toFixed(1),s=P.fromStepping(s).toFixed(1),a=P.fromStepping(a).toFixed(1),e.children[0].setAttribute("aria-valuemin",n),e.children[0].setAttribute("aria-valuemax",s),e.children[0].setAttribute("aria-valuenow",a),e.children[0].setAttribute("aria-valuetext",t)}))}));var dt={destroy:function(){for(tt(y),tt(x),Object.keys(o.cssClasses).forEach((function(t){p(E,o.cssClasses[t])}));E.firstChild;)E.removeChild(E.firstChild);delete E.noUiSlider},steps:function(){return V.map(ft)},on:Z,off:tt,get:pt,set:ct,setHandle:function(t,e,r,n){if(!(0<=(t=Number(t))&&t<V.length))throw new Error("noUiSlider: invalid handle number, got: "+t);at(t,ut(e,t),!0,!0,n),et("update",t),r&&et("set",t)},reset:function(t){ct(o.start,t)},disable:function(t){null!=t?(h[t].setAttribute("disabled",""),h[t].handle.removeAttribute("tabindex")):(E.setAttribute("disabled",""),h.forEach((function(t){t.handle.removeAttribute("tabindex")})))},enable:function(t){null!=t?(h[t].removeAttribute("disabled"),h[t].handle.setAttribute("tabindex","0")):(E.removeAttribute("disabled"),h.forEach((function(t){t.removeAttribute("disabled"),t.handle.setAttribute("tabindex","0")})))},__moveHandles:function(t,e,r){it(t,e,N,r)},options:u,updateOptions:function(t,e){var r=pt(),i=["margin","limit","padding","range","animate","snap","step","format","pips","tooltips"];i.forEach((function(e){void 0!==t[e]&&(u[e]=t[e])}));var s=I(u);i.forEach((function(e){void 0!==t[e]&&(o[e]=s[e])})),P=s.spectrum,o.margin=s.margin,o.limit=s.limit,o.padding=s.padding,o.pips?X(o.pips):q(),(o.tooltips?R:_)(),N=[],ct(n(t.start)?t.start:r,e)},target:E,removePips:q,removeTooltips:_,getPositions:function(){return N.slice()},getTooltips:function(){return v},getOrigins:function(){return h},pips:X};return dt}(e,I(o),o),e.noUiSlider=o}var $={__spectrum:g,cssClasses:S,create:W};t.create=W,t.cssClasses=S,t.default=$,Object.defineProperty(t,"__esModule",{value:!0})})); 511/* End */ 512; 513; /* Start:"a:4:{s:4:"full";s:100:"/local/templates/.default/components/slam/catalog.smart.filter/alpine/no-ui-slider.js?17097986433466";s:6:"source";s:85:"/local/templates/.default/components/slam/catalog.smart.filter/alpine/no-ui-slider.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 514function rangeSlider(wrapper) { 515 let stepsSlider = wrapper.querySelectorAll('.no-ui-slider__ranges')[0], 516 inputFrom = wrapper.querySelectorAll('.no-ui-slider__input-from')[0], 517 inputTo = wrapper.querySelectorAll('.no-ui-slider__input-to')[0], 518 inputs = [inputFrom, inputTo], 519 minValue = wrapper.getAttribute('data-min'), 520 maxValue = wrapper.getAttribute('data-max'), 521 startValue = [wrapper.getAttribute('data-from'),wrapper.getAttribute('data-to')]; 522 523 var formatForSlider = { 524 from: function (formattedValue) { 525 return Number(formattedValue); 526 }, 527 to: function(numericValue) { 528 return Math.round(numericValue); 529 } 530 }; 531 532 noUiSlider.create(stepsSlider, { 533 start: startValue, 534 connect: true, 535 range: { 536 'min': Number(minValue), 537 'max': Number(maxValue) 538 }, 539 format: formatForSlider, 540 }); 541 542 stepsSlider.noUiSlider.on('update', function (values, handle) { 543 inputs[handle].value = values[handle]; 544 }); 545 546 547 // Listen to keydown events on the input field. 548 inputs.forEach(function (input, handle) { 549 550 input.addEventListener('change', function () { 551 let val = this.value; 552 553 if (handle === 0) 554 { 555 if (Number(inputs[1].value) < val){ 556 val = Number(inputs[1].value) - 1 557 } 558 } 559 560 if (handle === 1) 561 { 562 if (Number(inputs[0].value) > val){ 563 val = Number(inputs[0].value) + 1 564 } 565 } 566 567 stepsSlider.noUiSlider.setHandle(handle, val); 568 569 window.dispatchEvent(new CustomEvent("filter-change-range", { 570 detail: { 571 name: input.name, 572 value: handle 573 } 574 })); 575 }); 576 577 578 input.addEventListener('keydown', function (e) { 579 580 var values = stepsSlider.noUiSlider.get(); 581 var value = Number(values[handle]); 582 583 // [[handle0_down, handle0_up], [handle1_down, handle1_up]] 584 var steps = stepsSlider.noUiSlider.steps(); 585 586 // [down, up] 587 var step = steps[handle]; 588 589 var position; 590 591 // 13 is enter, 592 // 38 is key up, 593 // 40 is key down. 594 switch (e.which) { 595 596 case 13: 597 stepsSlider.noUiSlider.setHandle(handle, this.value); 598 break; 599 600 case 38: 601 602 // Get step to go increase slider value (up) 603 position = step[1]; 604 605 // false = no step is set 606 if (position === false) { 607 position = 1; 608 } 609 610 // null = edge of slider 611 if (position !== null) { 612 stepsSlider.noUiSlider.setHandle(handle, value + position); 613 } 614 615 break; 616 617 case 40: 618 619 position = step[0]; 620 621 if (position === false) { 622 position = 1; 623 } 624 625 if (position !== null) { 626 stepsSlider.noUiSlider.setHandle(handle, value - position); 627 } 628 629 break; 630 } 631 632 }); 633 }); 634 635 return stepsSlider; 636} 637 638/* End */ 639; 640; /* Start:"a:4:{s:4:"full";s:91:"/local/templates/html/assets/components-template/mixin__tooltip/script.min.js?1709798643933";s:6:"source";s:77:"/local/templates/html/assets/components-template/mixin__tooltip/script.min.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 641(function(){'use strict';window.addEventListener("load",function(){window.reinit||(window.reinit={}),window.reinit.tooltip=()=>{document.querySelectorAll(".js-tt-trigger").forEach(a=>
641{function b(){e.setAttribute("data-show",""),f.update()}function c(){e.removeAttribute("data-show")}const d=a.getAttribute("data-original-title"),e=document.createElement("div");e.classList.add("tooltip"),e.setAttribute("role","tooltip"),e.innerHTML=`${d}<div id="arrow" data-popper-arrow></div>`,document.querySelector("body").appendChild(e);const f=Popper.createPopper(a,e,{placement:"top",modifiers:[{name:"offset",options:{offset:[0,8]}}]});["mouseenter","focus"].forEach(c=>{a.addEventListener(c,b)}),["mouseleave","blur"].forEach(b=>{a.addEventListener(b,c)})})},window.vendorLoader.add(["/local/templates/html/assets/js/vendor/popper.min.js"],{type:"module",click:!0,scroll:!0,mouseover:!0,target:"body"},()=>{window.reinit.tooltip()})})})(); 642 643/* End */ 644; 645; /* Start:"a:4:{s:4:"full";s:88:"/local/templates/html/assets/components-template/form-mixin/script.min.js?17307947691433";s:6:"source";s:73:"/local/templates/html/assets/components-template/form-mixin/script.min.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 646(function(){'use strict';window.addEventListener("load",function(){window.reinit.selectTrigger=function(){document.addEventListener("click",a=>{a.target.classList.contains(".js-select-trigger")||a.target.closest(".js-select-trigger")||$(".select").removeClass("active")}),document.querySelectorAll(".js-select-trigger").forEach(a=>{if(!a.classList.contains("init")){const b=a.closest(".select"),c=b.querySelector(".select-list");b.querySelector(".radio-option");const d=c.querySelectorAll(".js-radio-input"),e=b.querySelector(".select-head__title");a.addEventListener("click",()=>{b.classList.contains("active")?b.classList.remove("active"):b.classList.add("active")}),d.forEach(a=>{a.addEventListener("change",()=>{const c=a;if(!c.checked){c.closest(".select").querySelectorAll(".radio-option").forEach(a=>{a.classList.remove("selected")}),c.closest(".radio-option").classList.add("selected");let a=c.getAttribute("data-val");return e.innerTExt=a,b.classList.remove("active"),!1}c.closest(".radio-option").classList.remove("selected")})})}a.classList.add("init")})},window.reinit.selectTrigger()}),document.addEventListener("alpine:init",()=>{Alpine.data("customSelect",()=>({folded:!0,current:{text:null,value:null},choose(a){const b=a.getAttribute("data-value"),c=a.innerText;this.current.text=c,this.current.value=b,this.$nextTick(()=>{this.$refs.input.dispatchEvent(new Event("change",{bubbles:!0}))}),this.folded=!0}}))})})(); 647 648/* End */ 649; 650; /* Start:"a:4:{s:4:"full";s:63:"/local/templates/html/js/components/sortpanel.js?17097986441986";s:6:"source";s:48:"/local/templates/html/js/components/sortpanel.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 651document.addEventListener('alpine:init', () => { 652 Alpine.store('sort', { 653 items: {}, 654 title: '', 655 active: '', 656 init() { 657 const paramsStr = document.querySelector('.sort-js-data').dataset.sort; 658 if (paramsStr) { 659 const params = JSON.parse(paramsStr); 660 this.title = params?.active?.NAME || ''; 661 this.items = params?.params || []; 662 this.active = params?.active?.CODE || ''; 663 } 664 }, 665 changeSort(sort) { 666 if (this.active === sort) { 667 return; 668 } 669 670 this.active = sort; 671 const preloaderContainer = document.querySelector('.ajax_container'); 672 preloaderContainer.classList.add('preloader'); 673 674 fetch(window.location.href, { 675 method: 'POST', 676 cache: 'no-cache', 677 headers: {'Content-Type': 'application/x-www-form-urlencoded'}, 678 body: new URLSearchParams({reload_ajax: 'y', catalog_sort: sort}) 679 }) 680 .then(response => response.text()) 681 .then(text => { 682 const template = document.createElement('div'); 683 template.innerHTML = text; 684 const ajaxContainer = template.querySelector('.ajax_container'); 685 if (ajaxContainer) { 686 preloaderContainer.innerHTML = ajaxContainer.innerHTML; 687 } else { 688 console.log('product container list not found'); 689 } 690 }) 691 .finally(() => { 692 window.dispatchEvent(new CustomEvent("ajax-finished", { detail: {} })); 693 preloaderContainer.classList.remove('preloader'); 694 695 const find = this.items.find((e) => e.CODE === sort); 696 this.title = find?.NAME || ''; 697 }); 698 }, 699 }); 700}); 701 702/* End */ 703; 704; /* Start:"a:4:{s:4:"full";s:100:"/local/templates/.default/components/bitrix/system.pagenavigation/ajax_tabs/script.
704js?17097986436145";s:6:"source";s:85:"/local/templates/.default/components/bitrix/system.pagenavigation/ajax_tabs/script.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 705const PagerApp = function (settings) { 706 this._settings = { 707 preloaderContainer: '.ajax_container', 708 preloaderContainerAppend: '.ajax_container_append', 709 defaultOffsetSelector: '.breadcrumb', 710 paginationItemClass: '.paginations__link', 711 paginationItemAppendClass: '.paginations__append_end', 712 } 713 for (let propName in settings) { 714 if (settings.hasOwnProperty(propName)) { 715 this._settings[propName] = settings[propName]; 716 } 717 } 718 this._$preloaderContainer = document.querySelector(this._settings.preloaderContainer); 719 this._init(); 720} 721PagerApp.prototype._init = function () { 722 this._setupListener.call(this); 723 this._listenGoBack(); 724} 725PagerApp.prototype._setupListener = function () { 726 const _this = this, 727 paginationItemSelector = _this._settings.paginationItemClass, 728 paginationItemAppendSelector = _this._settings.paginationItemAppendClass, 729 paginationItemClass = paginationItemSelector.substring(paginationItemSelector.indexOf('.') + 1), 730 paginationItemAppendClass = paginationItemAppendSelector.substring(paginationItemAppendSelector.indexOf('.') + 1); 731 732 _this._$preloaderContainer?.addEventListener('click', (e) => { 733 if (e.target.classList.contains(paginationItemClass) || e.target.closest('.' + paginationItemClass) !== null) { 734 e.preventDefault(); 735 let link = e.target.getAttribute('href'); 736 if (!link) { 737 link = e.target.closest('.' + paginationItemClass).getAttribute('href') 738 } 739 _this._send({ reload_ajax: 'y' }, link, link); 740 } else { 741 if (e.target.classList.contains(paginationItemAppendClass) || e.target.closest('.' + paginationItemAppendClass) !== null) { 742 e.preventDefault(); 743 let link = e.target.getAttribute('href'); 744 if (!link) { 745 link = e.target.closest('.' + paginationItemAppendClass).getAttribute('href') 746 } 747 _this._sendAppend({reload_ajax: 'y'}, link, link); 748 } 749 } 750 }); 751} 752PagerApp.prototype._send = function (data = {}, link = window.location.href, changeLink = '', scroll = true) { 753 const _this = this; 754 if (data.length === 0 || link === '#' || !link) return; 755 756 _this._displayLoading(); 757 if (scroll) { 758 759 console.log(document.querySelector(this._settings.defaultOffsetSelector)); 760 761 let $topOffset = (document.querySelector(this._settings.defaultOffsetSelector) 762 .getBoundingClientRect().top - 300 + document.body.scrollTop); 763 764 window.scrollBy({ 765 top: $topOffset, 766 behavior: 'smooth' 767 }); 768 } 769 770 fetch(link, { 771 method: 'POST', 772 cache: 'no-cache', 773 headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, 774 body: new URLSearchParams(data) 775 }).then(function (response) { 776 return response.text() 777 }).then(function (text) { 778 let template = document.createElement('div'); 779 template.innerHTML = text; 780 781 setTimeout(() => { 782 if (template.querySelector(_this._settings.preloaderContainer)) 783 { 784 _this._$preloaderContainer.innerHTML = template.querySelector(_this._settings.preloaderContainer).innerHTML; 785 if (changeLink !== '') { 786 history.pushState(null, null, changeLink); 787 } 788 789 new ProductListApp({ 790 preloaderContainer: '.preloader_container', 791 defaultOffsetSelector: '.breadcrumb', 792 sortItemClass: '.js-radio-input__sort', 793 ajaxMenuClass: '.catalog-targets-js', 794 tabItemClass: '.js-type-tab' 795 }); 796 } 797 798 window.dispatchEvent(new CustomEvent("ajax-finished", { 799 detail: {} 800 })); 801 802 _this._hideLoading(); 803 804 }, 100); 805 }) 806 .catch(error => { 807 console.log(error); 808 }); 809} 810PagerApp.prototype._sendAppend = function (data = {}, link = window.location.href, changeLink = '', scroll = false) { 811 const _this = this; 812 if (data.length === 0 || link === '#' || !link) return; 813 814 _this._displayLoadingAppend(); 815 if (scroll) { 816 817 let $topOffset = (document.querySelector(this._settings.defaultOffsetSelector) 818 .getBoundingClientRect().top - 150); 819 820 window.scrollBy({ 821 top: $topOffset, 822 behavior: 'smooth' 823 }); 824 } 825 826 fetch(link, { 827 method: 'POST', 828 cache: 'no-cache', 829 headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, 830 body: new URLSearchParams(data) 831 }).then(function (response) { 832 return response.text() 833 }).then(function (text) { 834 let template = document.createElement('div'); 835 template.innerHTML = text; 836 837 setTimeout(() => { 838 if (template.querySelector(_this._settings.preloaderContainer)) 839 { 840 _this._$preloaderContainer.querySelector(_this._settings.preloaderContainerAppend).insertAdjacentHTML('beforeend', template.querySelector(_this._settings.preloaderContainer).querySelector(_this._settings.preloaderContainerAppend).innerHTML); 841 _this._$preloaderContainer.querySelector('.paginations').innerHTML = template.querySelector('.paginations').innerHTML; 842 843 844 if (changeLink !== '') { 845 history.pushState(null, null, changeLink); 846 } 847 } 848 849 window.dispatchEvent(new CustomEvent("ajax-finished", { 850 detail: {} 851 })); 852 853 _this._hideLoadingAppend(); 854 855 }, 100); 856 }) 857 .catch(error => { 858 console.log(error); 859 }); 860} 861 862PagerApp.prototype._displayLoading = function () { 863 this._$preloaderContainer.classList.add('preloader'); 864 setTimeout(() => { 865 this._hideLoading(); 866 }, 8000); 867} 868PagerApp.prototype._hideLoading = function () { 869 this._$preloaderContainer.classList.remove('preloader') 870} 871 872 873PagerApp.prototype._displayLoadingAppend = function () { 874 this._$preloaderContainer.querySelector('.paginations').classList.add('preloader'); 875 setTimeout(() => { 876 this._hideLoadingAppend(); 877 }, 8000); 878} 879PagerApp.prototype._hideLoadingAppend = function () { 880 this._$preloaderContainer.querySelector('.paginations').classList.remove('preloader') 881} 882 883PagerApp.prototype._listenGoBack = function () { 884 window.onpopstate = function() { 885 window.location.reload(); 886 } 887} 888 889window.addEventListener('DOMContentLoaded', () => { 890 new PagerApp({ 891 preloaderContainer: '.ajax_container', 892 preloaderContainerAppend: '.ajax_container_append', 893 defaultOffsetSelector: '.ajax_container', 894 paginationItemClass: '.paginations__link', 895 paginationItemAppendClass: '.paginations__append_end', 896 }); 897}) 898 899/* End */ 900; 901; /* Start:"a:4:{s:4:"full";s:89:"/local/templates/.default/components/bitrix/catalog.section/tile/script.js?17097986435052";s:6:"source";s:74:"/local/templates/.default/components/bitrix/catalog.section/tile/script.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 902const ProductListApp = function (settings) { 903 904 this._settings = { 905 preloaderContainer: '.catalog-product-list',
906 defaultOffsetSelector: '.breadcrumb', 907 paginationItemClass: '.paginations__link', 908 sortItemClass: '.js-radio-input__sort', 909 ajaxMenuClass: '.catalog-side-menu-js', 910 tabItemClass: '.js-type-tab' 911 }; 912 913 for (let propName in settings) { 914 if (settings.hasOwnProperty(propName)) { 915 this._settings[propName] = settings[propName]; 916 } 917 } 918 919 this._$preloaderContainer = document.querySelector(this._settings.preloaderContainer); 920 this._$ajaxMenuContainer = document.querySelector(this._settings.ajaxMenuClass); 921 this._$sortItems = document.querySelectorAll(this._settings.sortItemClass); 922 this._$tabItems = document.querySelectorAll(this._settings.tabItemClass); 923 924 this._init(); 925} 926 927ProductListApp.prototype._init = function () { 928 this._setupListener.call(this); 929}; 930 931ProductListApp.prototype._setupListener = function () { 932 const _this = this; 933 934 /* 935 if (_this._$sortItems.length > 0) 936 { 937 _this._$sortItems.forEach(sortItem => { 938 sortItem.addEventListener('change', (e) => { 939 _this._send({reload_ajax: 'y', catalog_sort: e.target.value}); 940 }) 941 }) 942 }*/ 943 944 if (_this._$ajaxMenuContainer) 945 { 946 const filterItemSelector = _this._settings.tabItemClass, 947 filterItemClass = filterItemSelector.substring(filterItemSelector.indexOf('.') + 1); 948 949 _this._$ajaxMenuContainer.addEventListener('click', (e) => 950 { 951 if (e.target.classList.contains(filterItemClass) || e.target.closest('.' + filterItemClass) !== null) 952 { 953 e.preventDefault(); 954 let link = e.target.getAttribute('href'); 955 if (!link) 956 { 957 link = e.target.closest('.' + paginationItemClass).getAttribute('href') 958 } 959 _this._send({reload_ajax: 'y'}, link, link, false); 960 } 961 }); 962 } 963 964 window.addEventListener('reload-section-list', function ($event) { 965 const data = $event.detail; 966 if (_this._$preloaderContainer.classList.contains(data.containerClass)){ 967 _this._send({reload_ajax: 'y'}, window.location.href, '', false); 968 } 969 }); 970} 971 972ProductListApp.prototype._send = function (data = {}, link = window.location.href, changeLink = '', scroll = true) { 973 const _this = this; 974 975 if (data.length === 0 || link === '#' || !link){ 976 return; 977 } 978 979 _this._displayLoading(); 980 981 if (scroll) 982 { 983 let $topOffset = (document.querySelector(this._settings.defaultOffsetSelector) 984 .getBoundingClientRect().bottom + document.body.scrollTop); 985 986 window.scrollBy({ 987 top: $topOffset, 988 behavior: 'smooth' 989 }); 990 } 991 992 fetch(link, { 993 method: 'POST', 994 cache: 'no-cache', 995 headers: {'Content-Type': 'application/x-www-form-urlencoded'}, 996 body: new URLSearchParams(data) 997 }).then(function(response) { 998 return response.text() 999 }).then(function(text) { 1000 let template = document.createElement('div'); 1001 template.innerHTML = text; 1002 1003 setTimeout(() => { 1004 1005 if (_this._$ajaxMenuContainer) { 1006 if (template.querySelector(_this._settings.ajaxMenuClass)) { 1007 _this._$ajaxMenuContainer.innerHTML = template.querySelector(_this._settings.ajaxMenuClass).innerHTML; 1008 } else { 1009 _this._$ajaxMenuContainer.remove(); 1010 } 1011 } 1012 1013 if (template.querySelector(_this._settings.preloaderContainer)) 1014 { 1015 _this._$preloaderContainer.innerHTML = template.querySelector(_this._settings.preloaderContainer).innerHTML; 1016 if (changeLink !== '') 1017 { 1018 history.pushState(null, null, changeLink); 1019 } 1020 } 1021 1022 window.dispatchEvent(new CustomEvent("ajax-finished", { 1023 detail: {} 1024 })); 1025 1026 _this._hideLoading(); 1027 1028 }, 100); 1029 }) 1030 .catch(error => { 1031 console.log(error); 1032 });
1033} 1034 1035ProductListApp.prototype._displayLoading = function() { 1036 this._$preloaderContainer.classList.add('preloader') 1037 setTimeout(() => { 1038 this._$preloaderContainer.classList.remove('preloader') 1039 }, 8000); 1040} 1041 1042ProductListApp.prototype._hideLoading = function() { 1043 this._$preloaderContainer.classList.remove('preloader') 1044} 1045 1046window.addEventListener('DOMContentLoaded', () => { 1047 new ProductListApp({ 1048 preloaderContainer: '.preloader_container', 1049 defaultOffsetSelector: '.breadcrumb', 1050 sortItemClass: '.js-radio-input__sort', 1051 ajaxMenuClass: '.catalog-targets-js', 1052 tabItemClass: '.js-type-tab' 1053 }); 1054}) 1055 1056/* End */ 1057; 1058; /* Start:"a:4:{s:4:"full";s:97:"/local/templates/html/assets/components-template/mixin__product-card/script.min.js?17097986431150";s:6:"source";s:82:"/local/templates/html/assets/components-template/mixin__product-card/script.min.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 1059(function(){'use strict';window.reinit||(window.reinit={}),window.reinit.productItemCarousel=function(){const a=document.querySelectorAll(".js-product-carousel");a.forEach(a=>{if(!a.classList.contains("carousel-inited")){a.classList.add("carousel-inited");const b=a.querySelectorAll(".product-card__carousel_control");b.forEach((a,b)=>{a.addEventListener("mouseenter",function(){const a=this.closest(".product-card__carousel-items");a.querySelectorAll(".product-card__img-carousel").forEach((a,c)=>{a.classList.remove("active"),c==b&&a.classList.add("active")})})})}}),document.querySelectorAll(".product-card").forEach(a=>{a.addEventListener("mouseleave",a=>{a.target.querySelectorAll(".product-card__img-carousel").forEach((a,b)=>{0===b?a.classList.add("active"):a.classList.remove("active")})})}),document.querySelectorAll(".product-card__carousel-items").forEach(a=>{const b=()=>{a.querySelectorAll("[data-src]").forEach(a=>{const b=a.getAttribute("data-src");a.setAttribute("src",b)}),a.removeEventListener("mouseover",b)};a.addEventListener("mouseover",b)})},window.addEventListener("load",function(){window.reinit.productItemCarousel()})})(); 1060 1061/* End */ 1062;; /* /local/templates/html/assets/components-template/catalog-targets/script.min.js?1709798643706*/ 1063; /* /local/templates/.default/components/slam/catalog.smart.filter/alpine/script.js?170979864314364*/ 1064; /* /local/templates/html/assets/js/vendor/nouislider.min.js?170979864327097*/ 1065; /* /local/templates/.default/components/slam/catalog.smart.filter/alpine/no-ui-slider.js?17097986433466*/ 1066; /* /local/templates/html/assets/components-template/mixin__tooltip/script.min.js?1709798643933*/ 1067; /* /local/templates/html/assets/components-template/form-mixin/script.min.js?17307947691433*/ 1068; /* /local/templates/html/js/components/sortpanel.js?17097986441986*/ 1069; /* /local/templates/.default/components/bitrix/system.pagenavigation/ajax_tabs/script.js?17097986436145*/ 1070; /* /local/templates/.default/components/bitrix/catalog.section/tile/script.js?17097986435052*/ 1071; /* /local/templates/html/assets/components-template/mixin__product-card/script.min.js?17097986431150*/
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.