PageSourceSearch

https://felicia.md/local/templates/aspro-lite/components/bitrix/sale.gift.main.products/main/script.min.js

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

1BX.namespace("BX.Sale"),BX.Sale.GiftMainProductsClass=function(){var GiftMainProductsClass=function(parameters){this.ajaxUrl="/bitrix/components/bitrix/sale.gift.main.products/ajax.php",this.contextAjaxData=parameters.contextAjaxData||{},this.mainProductState=parameters.mainProductState||null,this.injectId=parameters.injectId||null,this.isGift=!!parameters.isGift,this.productId=parameters.productId,this.offerId=parameters.offerId,this.offers=parameters.offers||[],this.setEvents(),document.location.hash.match(/as_gift/g)&&(this.isGift?this.enableGift():this.raiseNonGiftEvent()),BX.bindDelegate(BX(this.injectId),"click",{tagName:"a"},BX.proxy(this.clickNavLink,this))};return GiftMainProductsClass.prototype.clickNavLink=function(e){if(this.onPageNavigationByLink(BX.proxy_context))return BX.PreventDefault(e)},GiftMainProductsClass.prototype.setEvents=function(){BX.addCustomEvent("onCatalogStoreProductChange",BX.proxy(this.onCatalogStoreProductChange,this)),BX.addCustomEvent("onAddToBasketMainProduct",BX.proxy(this.onAddToBasketMainProduct,this))},GiftMainProductsClass.prototype.unsubscribeEvents=function(){BX.removeCustomEvent("onCatalogStoreProductChange",BX.proxy(this.onCatalogStoreProductChange,this))},GiftMainProductsClass.prototype.onAddToBasketMainProduct=function(productObject){this.enableGift()},GiftMainProductsClass.prototype.onCatalogStoreProductChange=function(offerId){offerId!=this.offerId&&$(this.injectId).length&&BX.ajax({url:this.ajaxUrl,method:"POST",data:BX.merge(this.contextAjaxData,{offerId:offerId,mainProductState:this.mainProductState,SITE_ID:BX.message("SITE_ID")}),dataType:"html",processData:!1,start:!0,onsuccess:BX.delegate((function(html){this.offerId=offerId;var ob=BX.processHTML(html);ob.HTML?(this.unsubscribeEvents(),BX(this.injectId).innerHTML=ob.HTML,BX.ajax.processScripts(ob.SCRIPT)):document.location.hash.match(/as_gift/g)&&(this.isGift?this.raiseGiftEvent():this.raiseNonGiftEvent())}),this)})},GiftMainProductsClass.prototype.onPageNavigationByLink=function(link){var isValidNavigationLink;return!!BX.delegate((function(link){return!(!BX.type.isElementNode(link)||!link.href)&&(link.href.indexOf(this.ajaxUrl)>=0||-1!==link.href.indexOf("PAGEN_"))}),this)(link)&&(BX.ajax({url:link.href,method:"POST",data:BX.merge(this.contextAjaxData,{SITE_ID:BX.message("SITE_ID")}),dataType:"html",processData:!1,start:!0,onsuccess:BX.delegate((function(html){var ob=BX.processHTML(html);ob.HTML&&(this.unsubscribeEvents(),BX(this.injectId).innerHTML=ob.HTML,BX.ajax.processScripts(ob.SCRIPT))}),this)}),!0)},GiftMainProductsClass.prototype.enableGift=function(){this.isGift=!0,this.raiseGiftEvent()},GiftMainProductsClass.prototype.raiseGiftEvent=function(){BX.onCustomEvent("onSaleProductIsGift",[this.productId,this.offerId])},GiftMainProductsClass.prototype.raiseNonGiftEvent=function(){BX.onCustomEvent("onSaleProductIsNotGift",[this.productId,this.offerId])},GiftMainProductsClass}();
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.