PageSourceSearch

https://felicia.md/local/templates/aspro-lite/components/bitrix/sa…/main/script.min.js?174540903634479

js felicia.md collected 2026-10-04 02:55:55 UTC 34,479 bytes, 2 lines download raw bytes

1function bx_sale_gift_product_load(injectId,localAjaxData,additionalData){localAjaxData=localAjaxData||{},additionalData=additionalData||{},BX.ajax({url:"/bitrix/components/bitrix/sale.gift.product/ajax.php",method:"POST",data:BX.merge(localAjaxData,additionalData),dataType:"html",processData:!1,start:!0,onsuccess:function(html){var ob=BX.processHTML(html);BX(injectId).innerHTML=ob.HTML,BX.ajax.processScripts(ob.SCRIPT),initCountdown(),initSwiperSlider()}})}!function(window){if(window.JCCatalogSectionOnlyElement||(window.JCCatalogSectionOnlyElement=function(arParams){"object"==typeof arParams&&(this.params=arParams,this.obProduct=null,this.set_quantity=1,this.currentPriceMode="",this.currentPrices=[],this.currentPriceSelected=0,this.currentQuantityRanges=[],this.currentQuantityRangeSelected=0,this.params.MESS&&(this.mess=this.params.MESS),this.init())},window.JCCatalogSectionOnlyElement.prototype={init:function(){var i=0,j=0,treeItems=null;this.obProduct=BX(this.params.ID),this.obProduct&&($(this.obProduct).find(".counter_wrapp .counter_block input").data("product","ob"+this.obProduct.id+"el"),this.currentPriceMode=this.params.ITEM_PRICE_MODE,this.currentPrices=this.params.ITEM_PRICES,this.currentQuantityRanges=this.params.ITEM_QUANTITY_RANGES)},setPriceAction:function(){this.set_quantity=this.params.MIN_QUANTITY_BUY,$(this.obProduct).find("input[name=quantity]").length&&(this.set_quantity=$(this.obProduct).find("input[name=quantity]").val()),this.checkPriceRange(this.set_quantity),$(this.obProduct).find(".not_matrix").hide(),$(this.obProduct).find(".with_matrix .price_value_block").html(getCurrentPrice(this.currentPrices[this.currentPriceSelected].PRICE,this.currentPrices[this.currentPriceSelected].CURRENCY,this.currentPrices[this.currentPriceSelected].PRINT_PRICE)),$(this.obProduct).find(".with_matrix .discount")&&$(this.obProduct).find(".with_matrix .discount").html(getCurrentPrice(this.currentPrices[this.currentPriceSelected].BASE_PRICE,this.currentPrices[this.currentPriceSelected].CURRENCY,this.currentPrices[this.currentPriceSelected].PRINT_BASE_PRICE)),"Y"==this.params.SHOW_DISCOUNT_PERCENT_NUMBER&&(this.currentPrices[this.currentPriceSelected].PERCENT>0&&this.currentPrices[this.currentPriceSelected].PERCENT<100?($(this.obProduct).find(".with_matrix .sale_block .sale_wrapper .value").length||$('<div class="value"></div>').insertBefore($(this.obProduct).find(".with_matrix .sale_block .sale_wrapper .text")),$(this.obProduct).find(".with_matrix .sale_block .sale_wrapper .value").html("-<span>"+this.currentPrices[this.currentPriceSelected].PERCENT+"</span>%")):$(this.obProduct).find(".with_matrix .sale_block .sale_wrapper .value").length&&$(this.obProduct).find(".with_matrix .sale_block .sale_wrapper .value").remove()),$(this.obProduct).find(".with_matrix .sale_block .text .values_wrapper").html(getCurrentPrice(this.currentPrices[this.currentPriceSelected].DISCOUNT,this.currentPrices[this.currentPriceSelected].CURRENCY,this.currentPrices[this.currentPriceSelected].PRINT_DISCOUNT)),$(this.obProduct).find(".with_matrix").show(),"Y"==arMaxOptions.THEME.SHOW_TOTAL_SUMM&&setPriceItem($(this.obProduct),this.set_quantity,this.currentPrices[this.currentPriceSelected].PRICE)},checkPriceRange:function(quantity){if(void 0!==quantity&&"Q"==this.currentPriceMode){var range,found=!1;for(var i in this.currentQuantityRanges)if(this.currentQuantityRanges.hasOwnProperty(i)&&(range=this.currentQuantityRanges[i],parseInt(quantity)>=parseInt(range.SORT_FROM)&&("INF"==range.SORT_TO||parseInt(quantity)<=parseInt(range.SORT_TO)))){found=!0,this.currentQuantityRangeSelected=range.HASH;break}for(var k in!found&&(range=this.getMinPriceRange())&&(this.currentQuantityRangeSelected=range.HASH),this.currentPrices)if(this.currentPrices.hasOwnProperty(k)&&this.currentPrices[k].QUANTITY_HASH==this.currentQuantityRangeSelected){this.currentPriceSelected=k;break}}},getMinPriceRange:function(){var range;for(var i in this.currentQuantityRanges)this.currentQuantityRanges.hasOwnProperty(i)&&(!range||parseInt(this.currentQuantityRanges[i].SORT_FROM)<parseInt(range.SORT_FROM))&&(range=this.currentQuantityRanges[i]);return range}}),!window.JCSaleGiftProduct){var BasketButton=function(params){BasketButton.superclass.constructor.apply(this,arguments),this.nameNode=BX.create("span",{props:{className:"bx_medium bx_bt_button",id:this.id},text:params.text}),this.buttonNode=BX.create("span",{attrs:{className:params.ownerClass},style:{marginBottom:"0",borderBottom:"0 none transparent"},children:[this.nameNode],events:this.contextEvents}),BX.browser.IsIE()&&this.buttonNode.setAttribute("hideFocus","hidefocus")};BX.extend(BasketButton,BX.PopupWindowButton),window.JCSaleGiftProduct=function(arParams){if(this.skuVisualParams={SELECT:{TAG_BIND:"select",TAG:"option",ACTIVE_CLASS:"active",HIDE_CLASS:"hidden",EVENT:"change"},LI:{TAG_BIND:"li",TAG:"li",ACTIVE_CLASS:"active",HIDE_CLASS:"missing",EVENT:"click"}}
1,this.productType=0,this.showQuantity=!0,this.showAbsent=!0,this.secondPict=!1,this.showOldPrice=!1,this.showPercent=!1,this.showSkuProps=!1,this.showPercentNumber=!1,this.visual={ID:"",PICT_ID:"",SECOND_PICT_ID:"",QUANTITY_ID:"",QUANTITY_UP_ID:"",QUANTITY_DOWN_ID:"",PRICE_ID:"",DSC_PERC:"",SECOND_DSC_PERC:"",DISPLAY_PROP_DIV:"",BASKET_PROP_DIV:""},this.product={checkQuantity:!1,maxQuantity:0,stepQuantity:1,isDblQuantity:!1,canBuy:!0,canSubscription:!0,name:"",pict:{},id:0,addUrl:"",buyUrl:""},this.basketData={useProps:!1,emptyProps:!1,quantity:"quantity",props:"prop",basketUrl:""},this.defaultPict={pict:null,secondPict:null},this.checkQuantity=!1,this.maxQuantity=0,this.stepQuantity=1,this.isDblQuantity=!1,this.canBuy=!0,this.canSubscription=!0,this.precision=6,this.precisionFactor=Math.pow(10,this.precision),this.currentPriceMode="",this.currentPrices=[],this.currentPriceSelected=0,this.currentQuantityRanges=[],this.currentQuantityRangeSelected=0,this.offers=[],this.offerNum=0,this.treeProps=[],this.obTreeRows=[],this.showCount=[],this.showStart=[],this.selectedValues={},this.obProduct=null,this.obQuantity=null,this.obQuantityUp=null,this.obQuantityDown=null,this.obPict=null,this.obSecondPict=null,this.obPrice=null,this.obTree=null,this.obBuyBtn=null,this.obDscPerc=null,this.obSecondDscPerc=null,this.obSkuProps=null,this.obMeasure=null,this.obPopupWin=null,this.basketUrl="",this.basketParams={},this.treeRowShowSize=5,this.treeEnableArrow={display:"",cursor:"pointer",opacity:1},this.treeDisableArrow={display:"",cursor:"default",opacity:.2},this.lastElement=!1,this.containerHeight=0,this.errorCode=0,"object"==typeof arParams){switch(this.productType=parseInt(arParams.PRODUCT_TYPE,10),this.showQuantity=arParams.SHOW_QUANTITY,this.showAbsent=arParams.SHOW_ABSENT,this.secondPict=!!arParams.SECOND_PICT,this.showOldPrice=!!arParams.SHOW_OLD_PRICE,this.showPercent=!!arParams.SHOW_DISCOUNT_PERCENT,this.showSkuProps=!!arParams.SHOW_SKU_PROPS,this.showPercentNumber="Y"==arParams.SHOW_DISCOUNT_PERCENT_NUMBER,this.visual=arParams.VISUAL,this.productType){case 1:case 2:arParams.PRODUCT&&"object"==typeof arParams.PRODUCT?(this.showQuantity&&(this.product.checkQuantity=arParams.PRODUCT.CHECK_QUANTITY,this.product.isDblQuantity=arParams.PRODUCT.QUANTITY_FLOAT,this.product.checkQuantity&&(this.product.maxQuantity=this.product.isDblQuantity?parseFloat(arParams.PRODUCT.MAX_QUANTITY):parseInt(arParams.PRODUCT.MAX_QUANTITY,10)),this.product.stepQuantity=this.product.isDblQuantity?parseFloat(arParams.PRODUCT.STEP_QUANTITY):parseInt(arParams.PRODUCT.STEP_QUANTITY,10),this.checkQuantity=this.product.checkQuantity,this.isDblQuantity=this.product.isDblQuantity,this.maxQuantity=this.product.maxQuantity,this.stepQuantity=this.product.stepQuantity,this.isDblQuantity&&(this.stepQuantity=Math.round(this.stepQuantity*this.precisionFactor)/this.precisionFactor)),this.product.canBuy=arParams.PRODUCT.CAN_BUY,this.product.canSubscription=arParams.PRODUCT.SUBSCRIPTION,this.canBuy=this.product.canBuy,this.canSubscription=this.product.canSubscription,this.product.name=arParams.PRODUCT.NAME,this.product.pict=arParams.PRODUCT.PICT,this.product.id=arParams.PRODUCT.ID,arParams.PRODUCT.ADD_URL&&(this.product.addUrl=arParams.PRODUCT.ADD_URL),arParams.PRODUCT.BUY_URL&&(this.product.buyUrl=arParams.PRODUCT.BUY_URL),arParams.BASKET&&"object"==typeof arParams.BASKET&&(this.basketData.useProps=!!arParams.BASKET.ADD_PROPS,this.basketData.emptyProps=!!arParams.BASKET.EMPTY_PROPS)):this.errorCode=-1;break;case 3:arParams.OFFERS&&BX.type.isArray(arParams.OFFERS)?(arParams.PRODUCT&&"object"==typeof arParams.PRODUCT&&(this.product.name=arParams.PRODUCT.NAME,this.product.id=arParams.PRODUCT.ID),this.offers=arParams.OFFERS,this.offerNum=0,arParams.OFFER_SELECTED&&(this.offerNum=parseInt(arParams.OFFER_SELECTED,10)),isNaN(this.offerNum)&&(this.offerNum=0),arParams.TREE_PROPS&&(this.treeProps=arParams.TREE_PROPS),arParams.DEFAULT_PICTURE&&(this.defaultPict.pict=arParams.DEFAULT_PICTURE.PICTURE,this.defaultPict.secondPict=arParams.DEFAULT_PICTURE.PICTURE_SECOND)):this.errorCode=-1;break;default:this.errorCode=-1}arParams.BASKET&&"object"==typeof arParams.BASKET&&(arParams.BASKET.QUANTITY&&(this.basketData.quantity=arParams.BASKET.QUANTITY),arParams.BASKET.PROPS&&(this.basketData.props=arParams.BASKET.PROPS),arParams.BASKET.BASKET_URL&&(this.basketData.basketUrl=arParams.BASKET.BASKET_URL)),this.lastElement=!!arParams.LAST_ELEMENT&&"Y"===arParams.LAST_ELEMENT}0===this.errorCode&&BX.ready(BX.delegate(this.Init,this))},window.JCSaleGiftProduct.prototype.Init=function(){var i=0,strPrefix="",TreeItems=null;if(this.obProduct=BX(this.visual.ID),this.obProduct||(this.errorCode=-1),this.obPict=BX(this.visual.PICT_ID),this.obPict||(this.errorCode=-2),this.secondPict&&this.visual.SECOND_PICT_ID&&(this.obSecondPict=BX(this.visual.SECOND_PICT_ID)),this.storeQuanity=BX(this.visual.STORE_QUANTITY),this.obPrice=BX(this.visual.PRICE_ID),this.obPriceOld=BX(this.visual.PRICE_OLD_ID),this.obPrice||(this.errorCode=-16),this.showQuantity&&this.visual.QUANTITY_ID&&(this.obQuantity=BX(this.visual.QUANTITY_ID),this.visual.QUANTITY_UP_ID&&(this.obQuantityUp=BX(this.visual.QUANTITY_UP_ID)),this.visual.QUANTITY_DOWN_ID&&(this.obQuantityDown=BX(this.visual.QUANTITY_DOWN_ID))),3===this.productType){if(this.visual.TREE_ID)for(this.obTree=BX(this.visual.TREE_ID),this.obTree||(this.errorCode=-256),strPrefix=this.visual.TREE_ITEM_ID,i=0;i<this.treeProps.length;i++)if(this.obTreeRows[i]={LIST:BX(strPrefix+this.treeProps[i].ID+"_list"),CONT:BX(strPrefix+this.treeProps[i].ID+"_cont")},!this.obTreeRows[i].LIST||!this.obTreeRows[i].CONT){this.errorCode=-512;break}this.visual.QUANTITY_MEASURE&&(this.obMeasure=BX(this.visual.QUANTITY_MEASURE))}if(this.visual.BUY_ID&&(this.obBuyBtn=BX(this.visual.BUY_ID)),this.showPercent&&(this.visual.DSC_PERC&&(this.obDscPerc=BX(this.visual.DSC_PERC)),this.secondPict&&this.visual.SECOND_DSC_PERC&&(this.obSecondDscPerc=BX(this.visual.SECOND_DSC_PERC))),this.showSkuProps&&this.visual.DISPLAY_PROP_DIV&&(this.obSkuProps=BX(this.visual.DISPLAY_PROP_DIV)),0===this.errorCode){switch(this.showQuantity&&(this.obQuantityUp&&BX.bind(this.obQuantityUp,"click",BX.delegate(this.QuantityUp,this)),this.obQuantityDown&&BX.bind(this.obQuantityDown,"click",BX.delegate(this.QuantityDown,this)),this.obQuantity&&BX.bind(this.obQuantity,"change",BX.delegate(this.QuantityChange,this))),this.productType){case 1:break;case 3:for(var key in this.skuVisualParams){var TreeItems;if((TreeItems=BX.findChildren(this.obTree,{tagName:this.skuVisualParams[key].TAG_BIND},!0))&&0<TreeItems.length)for(i=0;i<TreeItems.length;i++)$(TreeItems[i]).on(this.skuVisualParams[key].EVENT,BX.delegate(this.SelectOfferProp,this))}this.SetCurrent()}this.obBuyBtn&&BX.bind(this.obBuyBtn,"click",BX.delegate(this.Basket,this))}},window.JCSaleGiftProduct.prototype.QuantityUp=function(){var curValue=0,boolSet=!0;0===this.errorCode&&this.showQuantity&&this.canBuy&&(curValue=this.isDblQuantity?parseFloat(this.obQuantity.value):parseInt(this.obQuantity.value,10),isNaN(curValue)||(curValue+=this.stepQuantity,this.checkQuantity&&curValue>this.maxQuantity&&(boolSet=!1),boolSet&&(this.isDblQuantity&&(curValue=
1Math.round(curValue*this.precisionFactor)/this.precisionFactor),this.obQuantity.value=curValue)))},window.JCSaleGiftProduct.prototype.QuantityDown=function(){var curValue=0,boolSet=!0;0===this.errorCode&&this.showQuantity&&this.canBuy&&(curValue=this.isDblQuantity?parseFloat(this.obQuantity.value):parseInt(this.obQuantity.value,10),isNaN(curValue)||((curValue-=this.stepQuantity)<this.stepQuantity&&(boolSet=!1),boolSet&&(this.isDblQuantity&&(curValue=Math.round(curValue*this.precisionFactor)/this.precisionFactor),this.obQuantity.value=curValue)))},window.JCSaleGiftProduct.prototype.QuantityChange=function(){var curValue=0,boolSet=!0;0===this.errorCode&&this.showQuantity&&(this.canBuy?(curValue=this.isDblQuantity?parseFloat(this.obQuantity.value):parseInt(this.obQuantity.value,10),isNaN(curValue)?this.obQuantity.value=this.stepQuantity:(this.checkQuantity&&(curValue>this.maxQuantity?(boolSet=!1,curValue=this.maxQuantity):curValue<this.stepQuantity&&(boolSet=!1,curValue=this.stepQuantity)),boolSet||(this.obQuantity.value=curValue))):this.obQuantity.value=this.stepQuantity)},window.JCSaleGiftProduct.prototype.QuantitySet=function(index){0===this.errorCode&&(this.canBuy=this.offers[index].CAN_BUY,this.currentPriceMode=this.offers[index].ITEM_PRICE_MODE,this.currentPrices=this.offers[index].ITEM_PRICES,this.currentPriceSelected=this.offers[index].ITEM_PRICE_SELECTED,this.currentQuantityRanges=this.offers[index].ITEM_QUANTITY_RANGES,this.currentQuantityRangeSelected=this.offers[index].ITEM_QUANTITY_RANGE_SELECTED,this.canBuy?(this.obBasketActions&&BX.style(this.obBasketActions,"display",""),this.obNotAvail&&BX.style(this.obNotAvail,"display","none")):(this.obBasketActions&&(BX.style(this.obBasketActions,"opacity","0"),BX.style(BX.findParent(BX(this.obQuantity),{class:"counter_block"}),"display","none")),this.obNotAvail&&BX.style(this.obNotAvail,"display","")),this.showQuantity&&(this.isDblQuantity=this.offers[index].QUANTITY_FLOAT,this.checkQuantity=this.offers[index].CHECK_QUANTITY,this.isDblQuantity?(this.maxQuantity=parseFloat(this.offers[index].MAX_QUANTITY),this.stepQuantity=Math.round(parseFloat(this.offers[index].STEP_QUANTITY)*this.precisionFactor)/this.precisionFactor):(this.maxQuantity=parseInt(this.offers[index].MAX_QUANTITY,10),this.stepQuantity=parseInt(this.offers[index].STEP_QUANTITY,10)),this.obQuantity&&(this.obQuantity.value=this.defaultCount,this.obQuantity.disabled=!this.canBuy),this.obMeasure&&(this.offers[index].MEASURE?BX.adjust(this.obMeasure,{html:this.offers[index].MEASURE}):BX.adjust(this.obMeasure,{html:""}))),this.currentBasisPrice=this.offers[index].BASIS_PRICE)},window.JCSaleGiftProduct.prototype.SelectOfferProp=function(){var i=0,value="",strTreeValue="",arTreeItem=[],RowItems=null,target=BX.proxy_context;if(target&&target.hasAttribute("data-treevalue")&&(strTreeValue=target.getAttribute("data-treevalue"),propModes=target.getAttribute("data-showtype"),arTreeItem=strTreeValue.split("_"),this.SearchOfferPropIndex(arTreeItem[0],arTreeItem[1])&&(RowItems=BX.findChildren(target.parentNode,{tagName:this.skuVisualParams[propModes.toUpperCase()].TAG},!1))&&0<RowItems.length))for(i=0;i<RowItems.length;i++)value=RowItems[i].getAttribute("data-onevalue"),"TEXT"==propModes?value===arTreeItem[1]?RowItems[i].setAttribute("selected","selected"):RowItems[i].removeAttribute("selected"):value===arTreeItem[1]?$(RowItems[i]).addClass(this.skuVisualParams[propModes.toUpperCase()].ACTIVE_CLASS):$(RowItems[i]).removeClass(this.skuVisualParams[propModes.toUpperCase()].ACTIVE_CLASS)},window.JCSaleGiftProduct.prototype.SearchOfferPropIndex=function(strPropID,strPropValue){var strName="",arShowValues=!1,i,j,arCanBuyValues=[],index=-1,arFilter={},tmpFilter=[];for(i=0;i<this.treeProps.length;i++)if(this.treeProps[i].ID===strPropID){index=i;break}if(-1<index){for(i=0;i<index;i++)arFilter[strName="PROP_"+this.treeProps[i].ID]=this.selectedValues[strName];if(strName="PROP_"+this.treeProps[index].ID,!(arShowValues=this.GetRowValues(arFilter,strName)))return!1;if(!BX.util.in_array(strPropValue,arShowValues))return!1;for(arFilter[strName]=strPropValue,i=index+1;i<this.treeProps.length;i++){if(strName="PROP_"+this.treeProps[i].ID,!(arShowValues=this.GetRowValues(arFilter,strName)))return!1;
1if(this.showAbsent)for(arCanBuyValues=[],tmpFilter=[],tmpFilter=BX.clone(arFilter,!0),j=0;j<arShowValues.length;j++)tmpFilter[strName]=arShowValues[j],this.GetCanBuy(tmpFilter)&&(arCanBuyValues[arCanBuyValues.length]=arShowValues[j]);else arCanBuyValues=arShowValues;this.selectedValues[strName]&&BX.util.in_array(this.selectedValues[strName],arCanBuyValues)?arFilter[strName]=this.selectedValues[strName]:arFilter[strName]=arCanBuyValues[0],this.UpdateRow(i,arFilter[strName],arShowValues,arCanBuyValues)}this.selectedValues=arFilter,this.ChangeInfo()}return!0},window.JCSaleGiftProduct.prototype.RowLeft=function(){var i=0,strTreeValue="",index=-1,target=BX.proxy_context;if(target&&target.hasAttribute("data-treevalue")){for(strTreeValue=target.getAttribute("data-treevalue"),i=0;i<this.treeProps.length;i++)if(this.treeProps[i].ID===strTreeValue){index=i;break}-1<index&&this.treeRowShowSize<this.showCount[index]&&(0>this.showStart[index]&&(this.showStart[index]++,BX.adjust(this.obTreeRows[index].LIST,{style:{marginLeft:20*this.showStart[index]+"%"}}),BX.adjust(this.obTreeRows[index].RIGHT,{style:this.treeEnableArrow})),0<=this.showStart[index]&&BX.adjust(this.obTreeRows[index].LEFT,{style:this.treeDisableArrow}))}},window.JCSaleGiftProduct.prototype.RowRight=function(){var i=0,strTreeValue="",index=-1,target=BX.proxy_context;if(target&&target.hasAttribute("data-treevalue")){for(strTreeValue=target.getAttribute("data-treevalue"),i=0;i<this.treeProps.length;i++)if(this.treeProps[i].ID===strTreeValue){index=i;break}-1<index&&this.treeRowShowSize<this.showCount[index]&&(this.treeRowShowSize-this.showStart[index]<this.showCount[index]&&(this.showStart[index]--,BX.adjust(this.obTreeRows[index].LIST,{style:{marginLeft:20*this.showStart[index]+"%"}}),BX.adjust(this.obTreeRows[index].LEFT,{style:this.treeEnableArrow})),this.treeRowShowSize-this.showStart[index]>=this.showCount[index]&&BX.adjust(this.obTreeRows[index].RIGHT,{style:this.treeDisableArrow}))}},window.JCSaleGiftProduct.prototype.UpdateRow=function(intNumber,activeID,showID,canBuyID){var i=0,showI=0,value="",countShow=0,strNewLen="",obData={},pictMode=!1,extShowMode=!1,isCurrent=!1,selectIndex=0,obLeft=this.treeEnableArrow,obRight=this.treeEnableArrow,currentShowStart=0,RowItems=null;if(-1<intNumber&&intNumber<this.obTreeRows.length&&(propMode=this.treeProps[intNumber].DISPLAY_TYPE,(RowItems=BX.findChildren(this.obTreeRows[intNumber].LIST,{tagName:this.skuVisualParams[propMode].TAG},!1))&&0<RowItems.length)){for(selectMode="SELECT"===this.treeProps[intNumber].DISPLAY_TYPE,countShow=showID.length,obData={style:{},props:{disabled:"",selected:""}},i=0;i<RowItems.length;i++)isCurrent=(value=RowItems[i].getAttribute("data-onevalue"))===activeID&&0!=value,BX.util.in_array(value,canBuyID)?obData.props.className=isCurrent?this.skuVisualParams[propMode].ACTIVE_CLASS:"":obData.props.className=isCurrent?this.skuVisualParams[propMode].ACTIVE_CLASS+" "+this.skuVisualParams[propMode].HIDE_CLASS:this.skuVisualParams[propMode].HIDE_CLASS,selectMode?(obData.props.disabled="disabled",obData.props.selected=isCurrent?"selected":""):obData.style.display="none",BX.util.in_array(value,showID)&&(selectMode?obData.props.disabled="":obData.style.display="",isCurrent&&(selectIndex=showI),showI++),BX.adjust(RowItems[i],obData);selectMode&&$(this.obTreeRows[intNumber].LIST).parent().hasClass("ik_select")&&$(this.obTreeRows[intNumber].LIST).ikSelect("reset"),this.showCount[intNumber]=countShow,this.showStart[intNumber]=0}},window.JCSaleGiftProduct.prototype.GetRowValues=function(arFilter,index){var i=0,j,arValues=[],boolSearch=!1,boolOneSearch=!0;if(0===arFilter.length){for(i=0;i<this.offers.length;i++)BX.util.in_array(this.offers[i].TREE[index],arValues)||(arValues[arValues.length]=this.offers[i].TREE[index]);boolSearch=!0}else for(i=0;i<this.offers.length;i++){for(j in boolOneSearch=!0,arFilter)if(arFilter[j]!==this.offers[i].TREE[j]){boolOneSearch=!1;break}boolOneSearch&&(BX.util.in_array(this.offers[i].TREE[index],arValues)||(arValues[arValues.length]=this.offers[i].TREE[index]),boolSearch=!0)}return!!boolSearch&&arValues},window.JCSaleGiftProduct.prototype.GetCanBuy=function(arFilter){var i=0,j,boolSearch=!1,boolOneSearch=!0;for(i=0;i<this.offers.length;i++){for(j in boolOneSearch=!0,arFilter)if(arFilter[j]!==this.offers[i].TREE[j]){boolOneSearch=!1;break}if(boolOneSearch&&this.offers[i].CAN_BUY){boolSearch=!0;break}}return boolSearch},window.JCSaleGiftProduct.prototype.SetCurrent=function(){var i=0,j=0,arCanBuyValues=[],strName="",arShowValues=!1,arFilter={},tmpFilter=[],current=this.offers[this.offerNum].TREE;for(i=0;i<this.treeProps.length&&(strName="PROP_"+this.treeProps[i].ID,arShowValues=this.GetRowValues(arFilter,strName));i++){if(BX.util.in_array(current[strName],arShowValues)?arFilter[strName]=current[strName]:(arFilter[strName]=arShowValues[0],this.offerNum=0),this.showAb
1sent)for(arCanBuyValues=[],tmpFilter=[],tmpFilter=BX.clone(arFilter,!0),j=0;j<arShowValues.length;j++)tmpFilter[strName]=arShowValues[j],this.GetCanBuy(tmpFilter)&&(arCanBuyValues[arCanBuyValues.length]=arShowValues[j]);else arCanBuyValues=arShowValues;this.UpdateRow(i,arFilter[strName],arShowValues,arCanBuyValues)}this.selectedValues=arFilter,this.ChangeInfo()},window.JCSaleGiftProduct.prototype.ChangeInfo=function(){var i=0,j,index=-1,obData={},boolOneSearch=!0,strPrice="";for(i=0;i<this.offers.length;i++){for(j in boolOneSearch=!0,this.selectedValues)if(this.selectedValues[j]!==this.offers[i].TREE[j]){boolOneSearch=!1;break}if(boolOneSearch){index=i;break}}if(-1<index){if(this.obPict){var obData={attrs:{}};this.offers[index].PREVIEW_PICTURE?obData.attrs.src=this.offers[index].PREVIEW_PICTURE.SRC:obData.attrs.src=this.defaultPict.pict.SRC,BX.adjust(BX.findChild(this.obPict,{tag:"img"}),obData)}this.showSkuProps&&this.obSkuProps&&(0===this.offers[index].DISPLAY_PROPERTIES.length?BX.adjust(this.obSkuProps,{style:{display:"none"},html:""}):BX.adjust(this.obSkuProps,{style:{display:""},html:this.offers[index].DISPLAY_PROPERTIES})),this.setQuantityStore(this.offers[index].MAX_QUANTITY,this.offers[index].AVAILIABLE.TEXT),this.offerNum=index,this.QuantitySet(this.offerNum),$(this.obProduct).find(".quantity_block .values").length&&$(this.obProduct).find(".quantity_block .values .item span").text(this.offers[index].MAX_QUANTITY).css({opacity:"1"});var obj=this.offers[index],th=$(this.obProduct),_th=this;"undefined"!=typeof arBasketAspro?this.setActualDataBlock(th,obj):void 0!==window.frameCacheVars&&BX.addCustomEvent("onFrameDataReceived",(function(){_th.setActualDataBlock(th,obj)}))}},window.JCSaleGiftProduct.prototype.setActualDataBlock=function(th,obj){this.setLikeBlock(th,".like_icons .wish_item_button",obj,"DELAY"),this.setLikeBlock(th,".like_icons .compare_item_button",obj,"COMPARE"),this.setBuyBlock(th,obj)},window.JCSaleGiftProduct.prototype.setLikeBlock=function(th,className,obj,type){var block=th;"DELAY"==type&&(obj.CAN_BUY?block.find(className).css("display","block"):block.find(className).hide()),block.find(className).attr("data-item",obj.ID),block.find(className).find("span").attr("data-item",obj.ID),arBasketAspro[type]&&(block.find(className).find(".to").removeClass("added").css("display","block"),block.find(className).find(".in").hide(),void 0!==arBasketAspro[type][obj.ID]&&(block.find(className).find(".to").hide(),block.find(className).find(".in").css("display","block")))},window.JCSaleGiftProduct.prototype.setBuyBlock=function(th,obj){var buyBlock=th.find(".offer_buy_block"),input_value=obj.CONFIG.MIN_QUANTITY_BUY;if(buyBlock.find(".counter_wrapp .counter_block").length&&buyBlock.find(".counter_wrapp .counter_block").attr("data-item",obj.ID),this.offers[this.offerNum].offer_set_quantity&&(input_value=this.offers[this.offerNum].offer_set_quantity),obj.CONFIG.OPTIONS.USE_PRODUCT_QUANTITY_DETAIL&&"ADD"==obj.CONFIG.ACTION&&obj.CAN_BUY){var max=obj.CONFIG.MAX_QUANTITY_BUY>0?"data-max='"+obj.CONFIG.MAX_QUANTITY_BUY+"'":"",counterHtml='<span class="minus">-</span><input type="text" class="text" name="'+obj.PRODUCT_QUANTITY_VARIABLE+'" value="'+input_value+'" /><span class="plus" '+max+">+</span>";arBasketAspro.BASKET&&void 0!==arBasketAspro.BASKET[obj.ID]?buyBlock.find(".counter_wrapp .counter_block").length?buyBlock.find(".counter_wrapp .counter_block").hide():(buyBlock.find(".counter_wrapp").prepend('<div class="counter_block" data-item="'+obj.ID+'"></div>'),buyBlock.find(".counter_wrapp .counter_block").html(counterHtml).hide()):buyBlock.find(".counter_wrapp .counter_block").length?buyBlock.find(".counter_wrapp .counter_block").html(counterHtml).show():(buyBlock.find(".counter_wrapp").prepend('<div class="counter_block" data-item="'+obj.ID+'"></div>'),buyBlock.find(".counter_wrapp .counter_block").html(counterHtml))}else buyBlock.find(".counter_wrapp .counter_block").length&&buyBlock.find(".counter_wrapp .counter_block").hide();var className="ORDER"==obj.CONFIG.ACTION||!obj.CAN_BUY||!obj.CONFIG.OPTIONS.USE_PRODUCT_QUANTITY_DETAIL||"SUBSCRIBE"==obj.CONFIG.ACTION&&"Y"==obj.CATALOG_SUBSCRIBE?"wide":"",buyBlockBtn=$('<div class="button_block"></div>');if(buyBlock.find(".counter_wrapp").find(".button_block").length?arBasketAspro.BASKET&&void 0!==arBasketAspro.BASKET[obj.ID]?(buyBlock.find(".counter_wrapp").find(".button_block").addClass("wide").html(obj.HTML),markProductAddBasket(obj.ID)):className?(buyBlock.find(".counter_wrapp").find(".button_block").addClass("wide").html(obj.HTML),arBasketAspro.SUBSCRIBE&&void 0!==arBasketAspro.SUBSCRIBE[obj.ID]&&markProductSubscribe(obj.ID)):buyBlock.find(".counter_wrapp").find(".button_block").removeClass("wide").html(obj.HTML):(buyBlock.find(".counter_wrapp").append('<div class="button_block '+className+'">'+obj.HTML+"</div>"),arBasketAspro.BASKET&&void 0!==arBasketAspro.BASKET[obj.ID]&&markProductAddBasket(obj.ID),arBasketAspro.SUBSCRIBE&&void 0!==arBasketAspro.SUBSCRIBE[obj.ID]&&markProductSubscribe(obj.ID)),"NOTHING"!==obj.CONFIG.ACTION)if("ADD"==obj.CONFIG.ACTION&&obj.CAN_BUY&&"N"!=obj.SHOW_ONE_CLICK_BUY){var ocb='<span class="transparent big_btn type_block button one_click" data-offers="Y" data-item="'+obj.ID+'" data-iblockID="'+obj.IBLOCK_ID+'" data-quantity="'+obj.CONFIG.MIN_QUANTITY_BUY+'" data-props="'+obj.OFFER_PROPS+'" onclick="oneClickBuy('+obj.ID+", "+obj.IBLOCK_ID+', this)"><span>'+obj.ONE_CLICK_BUY+"</span></span>";buyBlock.find(".wrapp_one_click").length?buyBlock.find(".wrapp_one_click").html(ocb):buyBlock.append('<div class="wrapp_one_click">'+ocb+"</div>")}else buyBlock.find(".wrapp_one_click").length&&buyBlock.find(".wrapp_one_click").remove();else buyBlock.find(".wrapp_one_click").length&&buyBlock.find(".wrapp_one_click").remove();buyBlock.fadeIn(),buyBlock.find(".counter_wrapp .counter_block input").data("product","ob"+this.obProduct.id),this.setPriceAction("","Y"),"Y"==arMaxOptions.THEME.CHANGE_TITLE_ITEM&&$(this.obProduct).find(".item-title a").text(obj.NAME)}
1,window.JCSaleGiftProduct.prototype.setPriceAction=function(change,sku){var check_quantity="",product=$(this.obProduct),is_sku=void 0!==sku&&"Y"==sku,check_quantity;(this.setPrice(),"Y"==arMaxOptions.THEME.SHOW_TOTAL_SUMM)&&(this.offers[this.offerNum].check_quantity?check_quantity="Y":(check_quantity=void 0!==change&&"Y"==change?change:"")&&(this.offers[this.offerNum].check_quantity=!0))},window.JCSaleGiftProduct.prototype.setPrice=function(price,measure){var strPrice,obData;if(this.obPrice){var measure=this.offers[this.offerNum].MEASURE&&"Y"==this.offers[this.offerNum].SHOW_MEASURE?this.offers[this.offerNum].MEASURE:"",product=$(this.obProduct),obPrice=this.offers[this.offerNum].PRICE;this.offers[this.offerNum].offer_set_quantity=this.offers[this.offerNum].CONFIG.MIN_QUANTITY_BUY,$(product).find("input[name=quantity]").length&&(this.offers[this.offerNum].offer_set_quantity=$(product).find("input[name=quantity]").val()),strPrice='<span class="values_wrapper">'+getCurrentPrice(obPrice.VALUE,obPrice.CURRENCY,obPrice.PRINT_VALUE)+"</span>",BX.adjust($(this.obPrice).closest(".cost").find(".price.discount")[0],{html:strPrice}),newPrice='<span class="values_wrapper">'+getCurrentPrice(obPrice.DISCOUNT_VALUE,obPrice.CURRENCY,obPrice.PRINT_DISCOUNT_VALUE)+"</span>",measure&&(newPrice+="/"+measure),BX.adjust(this.obPrice,{html:newPrice}),obPrice.DISCOUNT_VALUE!==obPrice.VALUE&&this.showOldPrice&&obPrice.DISCOUNT_VALUE>0?(price_value=BX.Currency.currencyFormat(obPrice.VALUE*this.offers[this.offerNum].offer_set_quantity,obPrice.CURRENCY),price_value_old=BX.Currency.currencyFormat(obPrice.VALUE,obPrice.CURRENCY),$(this.obPriceOld).find("strike").show().html('<span class="values_wrapper">'+obPrice.PRINT_VALUE.replace(price_value_old,price_value)+"</span>"),this.showPercent&&obPrice.DISCOUNT_VALUE&&($(this.obPriceOld).closest(".cost").find(".sale_block").show(),$(this.obPriceOld).closest(".cost").find(".value").html(obPrice.DISCOUNT_DIFF_PERCENT_RAW),$(this.obPriceOld).closest(".cost").find(".text span").html(BX.Currency.currencyFormat(obPrice.DISCOUNT_DIFF,obPrice.CURRENCY,!0)))):($(this.obPriceOld).find("strike").hide().html(""),this.showPercent&&$(this.obPrice).closest(".cost").find(".sale_block").hide());var eventdata={product:product,measure:measure,config:this.config,offer:this.offers[this.offerNum],obPrice:obPrice};BX.onCustomEvent("onAsproSkuSetPrice",[eventdata])}},window.JCSaleGiftProduct.prototype.setQuantityStore=function(quantity,text){parseFloat(quantity)>0?$(this.storeQuanity).find(".icon").removeClass("order").addClass("stock"):$(this.storeQuanity).find(".icon").removeClass("stock").addClass("order"),$(this.storeQuanity).find(".icon + span").html(text)},window.JCSaleGiftProduct.prototype.InitBasketUrl=function(){switch(this.productType){case 1:case 2:this.basketUrl=this.product.addUrl;break;case 3:this.basketUrl=this.offers[this.offerNum].ADD_URL}this.basketParams={ajax_basket:"Y"},this.showQuantity&&(this.basketParams[this.basketData.quantity]=this.obQuantity.value)},window.JCSaleGiftProduct.prototype.FillBasketProps=function(){if(this.visual.BASKET_PROP_DIV){var i=0,propCollection=null,foundValues=!1,obBasketProps=null;if(this.basketData.useProps&&!this.basketData.emptyProps?this.obPopupWin&&this.obPopupWin.contentContainer&&(obBasketProps=this.obPopupWin.contentContainer):obBasketProps=BX(this.visual.BASKET_PROP_DIV),obBasketProps){if((propCollection=obBasketProps.getElementsByTagName("select"))&&propCollection.length)for(i=0;i<propCollection.length;i++)if(!propCollection[i].disabled)switch(propCollection[i].type.toLowerCase()){case"select-one":this.basketParams[propCollection[i].name]=propCollection[i].value,foundValues=!0}if((propCollection=obBasketProps.getElementsByTagName("input"))&&propCollection.length)for(i=0;i<propCollection.length;i++)if(!propCollection[i].disabled)switch(propCollection[i].type.toLowerCase()){case"hidden":this.basketParams[propCollection[i].name]=propCollection[i].value,foundValues=!0;break;case"radio":propCollection[i].checked&&(this.basketParams[propCollection[i].name]=propCollection[i].value,foundValues=!0)}foundValues||(this.basketParams[this.basketData.props]=[],this.basketParams[this.basketData.props][0]=0)}}},window.JCSaleGiftProduct.prototype.SendToBasket=function(){this.canBuy&&(this.InitBasketUrl(),this.FillBasketProps(),BX.ajax.loadJSON(this.basketUrl,this.basketParams,BX.delegate(this.BasketResult,this)))},window.JCSaleGiftProduct.prototype.Basket=function(){var contentBasketProps="";if(this.canBuy)switch(this.productType){case 1:case 2:this.basketData.useProps&&!this.basketData.emptyProps?(this.InitPopupWindow(),this.obPopupWin.setTitleBar({content:BX.create("div",{style:{marginRight:"30px",whiteSpace:"nowrap"},text:BX.message("CVP_TITLE_BASKET_PROPS")})}),BX(this.visual.BASKET_PROP_DIV)&&(contentBasketProps=BX(this.visual.BASKET_PROP_DIV).innerHTML),this.obPopupWin.setContent(contentBasketProps),this.obPopupWin.setButtons([new BasketButton({ownerClass:this.obProduct.parentNode.parentNode.parentNode.className,text:BX.message("CVP_BTN_MESSAGE_SEND_PROPS"),events:{click:BX.delegate(this.SendToBasket,this)}})]),this.obPopupWin.show()):this.SendToBasket();break;case 3:this.SendToBasket()}},window.JCSaleGiftProduct.prototype.BasketResult=function(arResult){var strContent="",strName="",strPict="",successful=!0,buttons=[];if(this.obPopupWin&&this.obPopupWin.close(),"object"!=typeof arResult)return!1;if(successful="OK"===arResult.STATUS){switch(BX.onCustomEvent("OnBasketChange"),strName=this.product.name,this.productType){case 1:case 2:strPict=this.product.pict.SRC;break;case 3:strPict=this.offers[this.offerNum].PREVIEW_PICTURE?this.offers[this.offerNum].PREVIEW_PICTURE.SRC:this.defaultPict.pict.SRC}strContent='<div style="width: 96%; margin: 10px 2%; text-align: center;"><img src="'+strPict+'" height="130" style="max-height:130px"><p>'+strName+"</p></div>",buttons=[new BasketButton({ownerClass:this.obProduct.parentNode.parentNode.parentNode.className,text:BX.message("CVP_BTN_MESSAGE_BASKET_REDIRECT"),events:{click:BX.delegate((function(){location.href=this.basketData.basketUrl?this.basketData.basketUrl:BX.message("CVP_BASKET_URL")}),this)}})]}else strContent=arResult.MESSAGE?arResult.MESSAGE:BX.message("CVP_BASKET_UNKNOWN_ERROR"),buttons=[new BasketButton({ownerClass:this.obProduct.parentNode.parentNode.parentNode.className,text:BX.message("CVP_BTN_MESSAGE_CLOSE"),events:{click:BX.delegate(this.obPopupWin.close,this.obPopupWin)}})];this.InitPopupWindow(),this.obPopupWin.setTitleBar({content:BX.create("div",{style:{marginRight:"30px",whiteSpace:"nowrap"},text:successful?BX.message("CVP_TITLE_SUCCESSFUL"):BX.message("CVP_TITLE_ERROR")})}),this.obPopupWin.setContent(strContent),this.obPopupWin.setButtons(buttons),this.obPopupWin.show()},window.JCSaleGiftProduct.prototype.InitPopupWindow=function(){this.obPopupWin||(this.obPopupWin=BX.PopupWindowManager.create("CatalogSectionBasket_"+this.visual.ID,null,{autoHide:!1,offsetLeft:0,offsetTop:0,overlay:!0,closeByEsc:!0,titleBar:!0,closeIcon:{top:"10px",right:"10px"}}))}}}(window);
2//# sourceMappingURL=script.min.js.map

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.