PageSourceSearch

https://zatolux.kz/bitrix/cache/js/s1/eshop_bootstrap_v4/template_…f725be33cc5510ac8231d_v1.js?178334102221870

js zatolux.kz collected 2026-10-10 00:46:40 UTC 21,870 bytes, 878 lines download raw bytes

1
2; /* Start:"a:4:{s:4:"full";s:117:"/bitrix/templates/eshop_bootstrap_v4/components/bitrix/sale.basket.basket.line/.default_old1/script.js?17582083704656";s:6:"source";s:102:"/bitrix/templates/eshop_bootstrap_v4/components/bitrix/sale.basket.basket.line/.default_old1/script.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
3'use strict';
4
5function BitrixSmallCart(){}
6
7BitrixSmallCart.prototype = {
8
9	activate: function ()
10	{
11		this.cartElement = BX(this.cartId);
12		this.fixedPosition = this.arParams.POSITION_FIXED == 'Y';
13		if (this.fixedPosition)
14		{
15			this.cartClosed = true;
16			this.maxHeight = false;
17			this.itemRemoved = false;
18			this.verticalPosition = this.arParams.POSITION_VERTICAL;
19			this.horizontalPosition = this.arParams.POSITION_HORIZONTAL;
20			this.topPanelElement = BX("bx-panel");
21
22			this.fixAfterRender(); // TODO onready
23			this.fixAfterRenderClosure = this.closure('fixAfterRender');
24
25			var fixCartClosure = this.closure('fixCart');
26			this.fixCartClosure = fixCartClosure;
27
28			if (this.topPanelElement && this.verticalPosition == 'top')
29				BX.addCustomEvent(window, 'onTopPanelCollapse', fixCartClosure);
30
31			var resizeTimer = null;
32			BX.bind(window, 'resize', function() {
33				clearTimeout(resizeTimer);
34				resizeTimer = setTimeout(fixCartClosure, 200);
35			});
36		}
37		this.setCartBodyClosure = this.closure('setCartBody');
38		BX.addCustomEvent(window, 'OnBasketChange', this.closure('refreshCart', {}));
39	},
40
41	fixAfterRender: function ()
42	{
43		this.statusElement = BX(this.cartId + 'status');
44		if (this.statusElement)
45		{
46			if (this.cartClosed)
47				this.statusElement.innerHTML = this.openMessage;
48			else
49				this.statusElement.innerHTML = this.closeMessage;
50		}
51		this.productsElement = BX(this.cartId + 'products');
52		this.fixCart();
53	},
54
55	closure: function (fname, data)
56	{
57		var obj = this;
58		return data
59			? function(){obj[fname](data)}
60			: function(arg1){obj[fname](arg1)};
61	},
62
63	toggleOpenCloseCart: function ()
64	{
65		if (this.cartClosed)
66		{
67			BX.removeClass(this.cartElement, 'close');
68			this.statusElement.innerHTML = this.closeMessage;
69			this.cartClosed = false;
70		}
71		else // Opened
72		{
73			BX.addClass(this.cartElement, 'close');
74			this.statusElement.innerHTML = this.openMessage;
75			this.cartClosed = true;
76		}
77		setTimeout(this.fixCartClosure, 100);
78	},
79
80	setVerticalCenter: function(windowHeight)
81	{
82		var top = windowHeight/2 - (this.cartElement.offsetHeight/2);
83		if (top < 5)
84			top = 5;
85		this.cartElement.style.top = top + 'px';
86	},
87
88	fixCart: function()
89	{
90		// set horizontal center
91		if (this.horizontalPosition == 'hcenter')
92		{
93			var windowWidth = 'innerWidth' in window
94				? window.innerWidth
95				: document.documentElement.offsetWidth;
96			var left = windowWidth/2 - (this.cartElement.offsetWidth/2);
97			if (left < 5)
98				left = 5;
99			this.cartElement.style.left = left + 'px';
100		}
101
102		var windowHeight = 'innerHeight' in window
103			? window.innerHeight
104			: document.documentElement.offsetHeight;
105
106		// set vertical position
107		switch (this.verticalPosition) {
108			case 'top':
109				if (this.topPanelElement)
110					this.cartElement.style.top = this.topPanelElement.offsetHeight + 5 + 'px';
111				break;
112			case 'vcenter':
113				this.setVerticalCenter(windowHeight);
114				break;
115		}
116
117		// toggle max height
118		if (this.productsElement)
119		{
120			if (this.cartClosed)
121			{
122				if (this.maxHeight)
123				{
124					BX.removeClass(this.cartElement, 'max_height');
125					this.maxHeight = false;
126				}
127			}
128			else // Opened
129			{
130				if (this.maxHeight)
131				{
132					if (this.productsElement.scrollHeight == this.productsElement.clientHeight)
133					{
134						BX.removeClass(this.cartElement, 'max_height');
135						this.maxHeight = false;
136					}
137				}
138				else
139				{
140					if (this.verticalPosition == 'top' || this.verticalPosition == 'vcenter')
141					{
142						if (this.cartElement.offsetTop + this.cartElement.offsetHeight >= windowHeight)
143						{
144							BX.addClass(this.cartElement, 'max_height');
145							this.maxHeight = true;
146						}
147					}
148					else
149					{
150						if (this.cartElement.offsetHeight >= windowHeight)
151						{
152							BX.addClass(this.cartElement, 'max_height');
153							this.maxHeight = true;
154						}
155					}
156				}
157			}
158
159			if (this.verticalPosition == 'vcenter')
160				this.setVerticalCenter(windowHeight);
161		}
162	},
163
164	refreshCart: function (data)
165	{
166		if (this.itemRemoved)
167		{
168			this.itemRemoved = false;
169			return;
170		}
171		data.sessid = BX.bitrix_sessid();
172		data.siteId = this.siteId;
173		data.templateName = this.templateName;
174		data.arParams = this.arParams;
175		BX.ajax({
176			url: this.ajaxPath,
177			method: 'POST',
178			dataType: 'html',
179			data: data,
180			onsuccess: this.setCartBodyClosure
181		});
182	},
183
184	setCartBody: function (result)
185	{
186		if (this.cartElement)
187			this.cartElement.innerHTML = result;
188		if (this.fixedPosition)
189			setTimeout(this.fixAfterRenderClosure, 100);
190	},
191
192	removeItemFromCart: function (id)
193	{
194		this.refreshCart ({sbblRemoveItemFromCart: id});
195		this.itemRemoved = true;
196		BX.onCustomEvent('OnBasketChange');
197	}
198};
199
200/* End */
201;
202; /* Start:"a:4:{s:4:"full";s:63:"/bitrix/components/bitrix/search.title/script.js?17582082819847";s:6:"source";s:48:"/bitrix/components/bitrix/search.title/script.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
203function JCTitleSearch(arParams)
204{
205	var _this = this;
206
207	this.arParams = {
208		'AJAX_PAGE': arParams.AJAX_PAGE,
209		'CONTAINER_ID': arParams.CONTAINER_ID,
210		'INPUT_ID': arParams.INPUT_ID,
211		'MIN_QUERY_LEN': parseInt(arParams.MIN_QUERY_LEN)
212	};
213	if(arParams.WAIT_IMAGE)
214		this.arParams.WAIT_IMAGE = arParams.WAIT_IMAGE;
215	if(arParams.MIN_QUERY_LEN <= 0)
216		arParams.MIN_QUERY_LEN = 1;
217
218	this.cache = [];
219	this.cache_key = null;
220
221	this.startText = '';
222	this.running = false;
223	this.runningCall = false;
224	this.currentRow = -1;
225	this.RESULT = null;
226	this.CONTAINER = null;
227	this.INPUT = null;
228	this.WAIT = null;
229
230	this.ShowResult = function(result)
231	{
232		if(BX.type.isString(result))
233		{
234			_this.RESULT.innerHTML = result;
235		}
236
237		_this.RESULT.style.display = _this.RESULT.innerHTML !== '' ? 'block' : 'none';
238		var pos = _this.adjustResultNode();
239
240		//adjust left column to be an outline
241		var res_pos;
242		var th;
243		var tbl = BX.findChild(_this.RESULT, {'tag':'table','class':'title-search-result'}, true);
244		if(tbl)
245		{
246			th = BX.findChild(tbl, {'tag':'th'}, true);
247		}
248
249		if(th)
250		{
251			var tbl_pos = BX.pos(tbl);
252			tbl_pos.width = tbl_pos.right - tbl_pos.left;
253
254			var th_pos = BX.pos(th);
255			th_pos.width = th_pos.right - th_pos.left;
256			th.style.width = th_pos.width + 'px';
257
258			_this.RESULT.style.width = (pos.width + th_pos.width) + 'px';
259
260			//Move table to left by width of the first column
261			_this.RESULT.style.left = (pos.left - th_pos.width - 1)+ 'px';
262
263			//Shrink table when it's too wide
264			if((tbl_pos.width - th_pos.width) > pos.width)
265				_this.RESULT.style.width = (pos.width + th_pos.width -1) + 'px';
266
267			//Check if table is too wide and shrink result div to it's width
268			tbl_pos = BX.pos(tbl);
269			res_pos = BX.pos(_this.RESULT);
270			if(res_pos.right > tbl_pos.right)
271			{
272				_this.RESULT.style.width = (tbl_pos.right - tbl_pos.left) + 'px';
273			}
274		}
275
276		var fade;
277		if(tbl) fade = BX.findChild(_this.RESULT, {'class':'title-search-fader'}, true);
278		if(fade && th)
279		{
280			res_pos = BX.pos(_this.RESULT);
281			fade.style.left = (res_pos.right - res_pos.left - 18) + 'px';
282			fade.style.width = 18 + 'px';
283			fade.style.top = 0 + 'px';
284			fade.style.height = (res_pos.bottom - res_pos.top) + 'px';
285			fade.style.display = 'block';
286		}
287	};
288
289	this.onKeyPress = function(keyCode)
290	{
291		var tbl = BX.findChild(_this.RESULT, {'tag':'table','class':'title-search-result'}, true);
292		if(!tbl)
293			return false;
294
295		var i;
296		var cnt = tbl.rows.length;
297
298		switch (keyCode)
299		{
300		case 27: // escape key - close search div
301			_this.RESULT.style.display = 'none';
302			_this.currentRow = -1;
303			_this.UnSelectAll();
304		return true;
305
306		case 40: // down key - navigate down on search results
307			if(_this.RESULT.style.display == 'none')
308				_this.RESULT.style.display = 'block';
309
310			var first = -1;
311			for(i = 0; i < cnt; i++)
312			{
313				if(!BX.findChild(tbl.rows[i], {'class':'title-search-separator'}, true))
314				{
315					if(first == -1)
316						first = i;
317
318					if(_this.currentRow < i)
319					{
320						_this.currentRow = i;
321						break;
322					}
323					else if(tbl.rows[i].className == 'title-search-selected')
324					{
325						tbl.rows[i].className = '';
326					}
327				}
328			}
329
330			if(i == cnt && _this.currentRow != i)
331				_this.currentRow = first;
332
333			tbl.rows[_this.currentRow].className = 'title-search-selected';
334		return true;
335
336		case 38: // up key - navigate up on search results
337			if(_this.RESULT.style.display == 'none')
338				_this.RESULT.style.display = 'block';
339
340			var last = -1;
341			for(i = cnt-1; i >= 0; i--)
342			{
343				if(!BX.findChild(tbl.rows[i], {'class':'title-search-separator'}, true))
344				{
345					if(last == -1)
346						last = i;
347
348					if(_this.currentRow > i)
349					{
350						_this.currentRow = i;
351						break;
352					}
353					else if(tbl.rows[i].className == 'title-search-selected')
354					{
355						tbl.rows[i].className = '';
356					}
357				}
358			}
359
360			if(i < 0 && _this.currentRow != i)
361				_this.currentRow = last;
362
363			tbl.rows[_this.currentRow].className = 'title-search-selected';
364		return true;
365
366		case 13: // enter key - choose current search result
367			if(_this.RESULT.style.display == 'block')
368			{
369				for(i = 0; i < cnt; i++)
370				{
371					if(_this.currentRow == i)
372					{
373						if(!BX.findChild(tbl.rows[i], {'class':'title-search-separator'}, true))
374						{
375							var a = BX.findChild(tbl.rows[i], {'tag':'a'}, true);
376							if(a)
377							{
378								window.location = a.href;
379								return true;
380							}
381						}
382					}
383				}
384			}
385		return false;
386		}
387
388		return false;
389	};
390
391	this.onTimeout = function()
392	{
393		_this.onChange(function(){
394			setTimeout(_this.onTimeout, 500);
395		});
396	};
397
398	this.onChange = function(callback)
399	{
400		if (_this.running)
401		{
402			_this.runningCall = true;
403			return;
404		}
405		_this.running = true;
406
407		if(_this.INPUT.value != _this.oldValue && _this.INPUT.value != _this.startText)
408		{
409			_this.oldValue = _this.INPUT.value;
410			if(_this.INPUT.value.length >= _this.arParams.MIN_QUERY_LEN)
411			{
412				_this.cache_key = _this.arParams.INPUT_ID + '|' + _this.INPUT.value;
413				if(_this.cache[_this.cache_key] == null)
414				{
415					if(_this.WAIT)
416					{
417						var pos = BX.pos(_this.INPUT);
418						var height = (pos.bottom - pos.top)-2;
419						_this.WAIT.style.top = (pos.top+1) + 'px';
420						_this.WAIT.style.height = height + 'px';
421						_this.WAIT.style.width = height + 'px';
422						_this.WAIT.style.left = (pos.right - height + 2) + 'px';
423						_this.WAIT.style.display = 'block';
424					}
425
426					BX.ajax.post(
427						_this.arParams.AJAX_PAGE,
428						{
429							'ajax_call':'y',
430							'INPUT_ID':_this.arParams.INPUT_ID,
431							'q':_this.INPUT.value,
432							'l':_this.arParams.MIN_QUERY_LEN
433						},
434						function(result)
435						{
436							_this.cache[_this.cache_key] = result;
437							_this.ShowResult(result);
438							_this.currentRow = -1;
439							_this.EnableMouseEvents();
440							if(_this.WAIT)
441								_this.WAIT.style.display = 'none';
442							if (!!callback)
443								callback();
444							_this.running = false;
445							if (_this.runningCall)
446							{
447								_this.runningCall = false;
448								_this.onChange();
449							}
450						}
451					);
452					return;
453				}
454				else
455				{
456					_this.ShowResult(_this.cache[_this.cache_key]);
457					_this.currentRow = -1;
458					_this.EnableMouseEvents();
459				}
460			}
461			else
462			{
463				_this.RESULT.style.display = 'none';
464				_this.currentRow = -1;
465				_this.UnSelectAll();
466			}
467		}
468		if (!!callback)
469			callback();
470		_this.running = false;
471	};
472
473	this.onScroll = function ()
474	{
475		if(BX.type.isElementNode(_this.RESULT)
476			&& _this.RESULT.style.display !== "none"
477			&& _this.RESULT.innerHTML !== ''
478		)
479		{
480			_this.adjustResultNode();
481		}
482	};
483
484	this.UnSelectAll = function()
485	{
486		var tbl = BX.findChild(_this.RESULT, {'tag':'table','class':'title-search-result'}, true);
487		if(tbl)
488		{
489			var cnt = tbl.rows.length;
490			for(var i = 0; i < cnt; i++)
491				tbl.rows[i].className = '';
492		}
493	};
494
495	this.EnableMouseEvents = function()
496	{
497		var tbl = BX.findChild(_this.RESULT, {'tag':'table','class':'title-search-result'}, true);
498		if(tbl)
499		{
500			var cnt = tbl.rows.length;
501			for(var i = 0; i < cnt; i++)
502				if(!BX.findChild(tbl.rows[i], {'class':'title-search-separator'}, true))
503				{
504					tbl.rows[i].id = 'row_' + i;
505					tbl.rows[i].onmouseover = function (e) {
506						if(_this.currentRow != this.id.substr(4))
507						{
508							_this.UnSelectAll();
509							this.className = 'title-search-selected';
510							_this.currentRow = this.id.substr(4);
511						}
512					};
513					tbl.rows[i].onmouseout = function (e) {
514						this.className = '';
515						_this.currentRow = -1;
516					};
517				}
518		}
519	};
520
521	this.onFocusLost = function(hide)
522	{
523		setTimeout(function(){_this.RESULT.style.display = 'none';}, 250);
524	};
525
526	this.onFocusGain = function()
527	{
528		if(_this.RESULT.innerHTML.length)
529			_this.ShowResult();
530	};
531
532	this.onKeyDown = function(e)
533	{
534		if(!e)
535			e = window.event;
536
537		if (_this.RESULT.style.display == 'block')
538		{
539			if(_this.onKeyPress(e.keyCode))
540				return BX.PreventDefault(e);
541		}
542	};
543
544	this.adjustResultNode = function()
545	{
546		if(!(BX.type.isElementNode(_this.RESULT)
547			&& BX.type.isElementNode(_this.CONTAINER))
548		)
549		{
550			return { top: 0, right: 0, bottom: 0, left: 0, width: 0, height: 0 };
551		}
552
553		var pos = BX.pos(_this.CONTAINER);
554
555		_this.RESULT.style.position = 'absolute';
556		_this.RESULT.style.top = (pos.bottom + 2) + 'px';
557		_this.RESULT.style.left = pos.left + 'px';
558		_this.RESULT.style.width = pos.width + 'px';
559
560		return pos;
561	};
562
563	this._onContainerLayoutChange = function()
564	{
565		if(BX.type.isElementNode(_this.RESULT)
566			&& _this.RESULT.style.display !== "none"
567			&& _this.RESULT.innerHTML !== ''
568		)
569		{
570			_this.adjustResultNode();
571		}
572	};
573	this.Init = function()
574	{
575		this.CONTAINER = document.getElementById(this.arParams.CONTAINER_ID);
576		BX.addCustomEvent(this.CONTAINER, "OnNodeLayoutChange", this._onContainerLayoutChange);
577
578		this.RESULT = document.body.appendChild(document.createElement("DIV"));
579		this.RESULT.className = 'title-search-result';
580		this.INPUT = document.getElementById(this.arParams.INPUT_ID);
581		this.startText = this.oldValue = this.INPUT.value;
582		BX.bind(this.INPUT, 'focus', function() {_this.onFocusGain()});
583		BX.bind(this.INPUT, 'blur', function() {_this.onFocusLost()});
584		this.INPUT.onkeydown = this.onKeyDown;
585
586		if(this.arParams.WAIT_IMAGE)
587		{
588			this.WAIT = document.body.appendChild(document.createElement("DIV"));
589			this.WAIT.style.backgroundImage = "url('" + this.arParams.WAIT_IMAGE + "')";
590			if(!BX.browser.IsIE())
591				this.WAIT.style.backgroundRepeat = 'none';
592			this.WAIT.style.display = 'none';
593			this.WAIT.style.position = 'absolute';
594			this.WAIT.style.zIndex = '1100';
595		}
596
597		BX.bind(this.INPUT, 'bxchange', function() {_this.onChange()});
598
599		var fixedParent = BX.findParent(this.CONTAINER, BX.is_fixed);
600		if(BX.type.isElementNode(fixedParent))
601		{
602			BX.bind(window, 'scroll', BX.throttle(this.onScroll, 100, this));
603		}
604	};
605	BX.ready(function (){_this.Init(arParams)});
606}
607
608/* End */
609;
610; /* Start:"a:4:{s:4:"full";
610s:97:"/bitrix/templates/eshop_bootstrap_v4/components/bitrix/menu/bootstrap_v4/script.js?17582083706228";s:6:"source";s:82:"/bitrix/templates/eshop_bootstrap_v4/components/bitrix/menu/bootstrap_v4/script.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
611(function(window) {
612
613	if (!window.BX || BX.CatalogMenu)
614		return;
615
616	BX.CatalogMenu = {
617		items : {},
618		idCnt : 1,
619		currentItem : null,
620		overItem : null,
621		outItem : null,
622		timeoutOver : null,
623		timeoutOut : null,
624
625		getItem : function(item)
626		{
627			if (!BX.type.isDomNode(item))
628				return null;
629
630			var id = !item.id || !BX.type.isNotEmptyString(item.id) ? (item.id = "menu-item-" + this.idCnt++) : item.id;
631
632			if (!this.items[id])
633				this.items[id] = new CatalogMenuItem(item);
634
635			return this.items[id];
636		},
637
638		itemOver : function(item)
639		{
640			var menuItem = this.getItem(item);
641			if (!menuItem)
642				return;
643
644			if (this.outItem == menuItem)
645			{
646				clearTimeout(menuItem.timeoutOut);
647			}
648
649			this.overItem = menuItem;
650
651			if (menuItem.timeoutOver)
652			{
653				clearTimeout(menuItem.timeoutOver);
654			}
655
656			menuItem.timeoutOver = setTimeout(function() {
657				if (BX.CatalogMenu.overItem == menuItem)
658				{
659					menuItem.itemOver();
660				}
661
662			}, 100);
663		},
664
665		itemOut : function(item)
666		{
667			var menuItem = this.getItem(item);
668			if (!menuItem)
669				return;
670
671			this.outItem = menuItem;
672
673			if (menuItem.timeoutOut)
674			{
675				clearTimeout(menuItem.timeoutOut);
676			}
677
678			menuItem.timeoutOut = setTimeout(function() {
679
680				if (menuItem != BX.CatalogMenu.overItem)
681				{
682					menuItem.itemOut();
683				}
684				if (menuItem == BX.CatalogMenu.outItem)
685				{
686					menuItem.itemOut();
687				}
688
689			}, 100);
690		},
691
692		removeHover : function(curItem)
693		{
694			if (typeof curItem !== "object")
695				return false;
696
697			var items = curItem.parentNode.querySelectorAll('[data-role="bx-menu-item"]');
698			for (var i=0; i<items.length; i++)
699			{
700				if (curItem == items[i])
701					continue;
702
703				if (BX.hasClass(items[i], "bx-hover"))
704					BX.removeClass(items[i], "bx-hover")
705			}
706		}
707	};
708
709	var CatalogMenuItem = function(item)
710	{
711		this.element = item;
712		this.popup = BX.findChild(item, { className: "bx_children_container" }, false, false);
713		this.isLastItem = BX.lastChild(this.element.parentNode) == this.element;
714	};
715
716	CatalogMenuItem.prototype.itemOver = function()
717	{
718		if (!BX.hasClass(this.element, "bx-hover"))
719		{
720			BX.addClass(this.element, "bx-hover");
721
722			var popup = BX.findChild(this.element, {className:"bx-nav-2-lvl-container"}, true, false);
723			if (popup)
724			{
725				var popupRightEdge = popup.getBoundingClientRect().left + popup.offsetWidth;
726				if (popupRightEdge > document.body.clientWidth)
727					popup.style.right = 0;
728			}
729		}
730	};
731
732	CatalogMenuItem.prototype.itemOut = function()
733	{
734		BX.removeClass(this.element, "bx-hover");
735	};
736})(window);
737
738BX.namespace("BX.Main.MenuComponent");
739BX.Main.MenuComponent.CatalogHorizontal = (function()
740{
741	var CatalogHorizontal = function(menuBlockId, itemImgDesc)
742	{
743		this.menuBlockId = menuBlockId || "";
744		this.itemImgDesc = itemImgDesc || "";
745
746		this.resizeMenu();
747		BX.bind(window, "resize", BX.proxy(this.resizeMenu, this));
748	};
749
750	CatalogHorizontal.prototype.clickInMobile = function(element, event)
751	{
752		if (!BX.hasClass(element, "bx-hover"))
753		{
754			event.preventDefault();
755		}
756	};
757
758	CatalogHorizontal.prototype.toggleInMobile = function(element)
759	{
760		var parentObj = BX.findParent(element, {className: "bx-nav-parent"});
761		var arrow = element.firstChild;
762		if (BX.hasClass(parentObj, "bx-opened"))
763		{
764			BX.removeClass(parentObj, "bx-opened");
765			BX.removeClass(arrow, "bx-nav-angle-top");
766			BX.addClass(arrow, "bx-nav-angle-bottom");
767		}
768		else
769		{
770			BX.addClass(parentObj, "bx-opened");
771			BX.addClass(arrow, "bx-nav-angle-top");
772			BX.removeClass(arrow, "bx-nav-angle-bottom");
773		}
774	};
775
776	CatalogHorizontal.prototype.resizeMenu = function()
777	{
778		var templateWrap = this.templateWrap;
779		var menuMobile = document.body.querySelector("[data-role='bx-menu-mobile']");
780		var menuMobileButton = document.body.querySelector("[data-role='bx-menu-button-mobile']");
781		var menuMobilePosition = document.body.querySelector("[data-role='bx-menu-button-mobile-position']");
782
783		if (document.body.clientWidth <= 767) //mobile
784		{
785			if (!menuMobile)
786			{
787				menuMobile = BX.create("div", {
788					attrs: {
789						className: "bx-aside-nav",
790						"data-role" : "bx-menu-mobile"
791					},
792					children: [ BX.clone(BX("ul_" + this.menuBlockId)) ]
793				});
794				document.body.insertBefore(menuMobile, document.body.firstChild);
795			}
796
797			if (!menuMobileButton)
798			{
799				menuMobileButton = BX.create("div", {
800					attrs: {className: "bx-aside-nav-control bx-closed", "data-role" : "bx-menu-button-mobile"},
801					children: [
802						BX.create("i", {
803							attrs: {className: "bx-nav-bars"}
804						})
805					],
806					events: {
807						"click" : function() {
808							if (BX.hasClass(this, "bx-opened"))
809							{
810								BX.removeClass(this, 'bx-opened');
811								BX.removeClass(menuMobile, 'bx-opened');
812								BX.addClass(this, 'bx-closed');
813								document.body.style.overflow = "";
814								BX.removeClass(document.body, 'bx-opened');
815							}
816							else
817							{
818
819								BX.addClass(this, 'bx-opened');
820								BX.addClass(menuMobile, 'bx-opened');
821								BX.removeClass(this, 'bx-closed');
822								document.body.style.overflow = "hidden";
823								BX.addClass(document.body, 'bx-opened');
824							}
825						}
826					}
827				});
828
829				// document.body.insertBefore(menuMobileButton, document.body.firstChild);
830
831				menuMobilePosition.appendChild(menuMobileButton);
832			}
833		}
834		else
835		{
836			BX.removeClass(menuMobile, 'bx-opened');
837			BX.removeClass(document.body, 'bx-opened');
838			document.body.style.overflow = "";
839
840			if (menuMobileButton)
841				BX.removeClass(menuMobileButton, 'bx-opened');
842		}
843	};
844
845	CatalogHorizontal.prototype.changeSectionPicure = function(element, itemId)
846	{
847		var curLi = BX.findParent(element, {className: "bx-nav-1-lvl"});
848		if (!curLi)
849			return;
850
851		var imgDescObj = curLi.querySelector("[data-role='desc-img-block']");
852		if (!imgDescObj)
853			return;
854
855		var imgObj = BX.findChild(imgDescObj, {tagName: "img"}, true, false);
856		if (imgObj)
857			imgObj.src = this.itemImgDesc[itemId]["PICTURE"];
858
859		var linkObj = BX.findChild(imgDescObj, {tagName: "a"}, true, false);
860		if (linkObj)
861			linkObj.href = element.href;
862
863		var descObj = BX.findChild(imgDescObj, {tagName: "p"}, true, false);
864		if (descObj)
865			descObj.innerHTML = this.itemImgDesc[itemId]["DESC"];
866
867	};
868
869	return CatalogHorizontal;
870})();
871
872
873
874
875/* End */
876;; /* /bitrix/templates/eshop_bootstrap_v4/components/bitrix/sale.basket.basket.line/.default_old1/script.js?17582083704656*/
877; /* /bitrix/components/bitrix/search.title/script.js?17582082819847*/
878; /* /bitrix/templates/eshop_bootstrap_v4/components/bitrix/menu/bootstrap_v4/script.js?17582083706228*/

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.