{"version":3,"file":"460.652a4c45a254f877.js","mappings":"0HAAO,MAAMA,EAAmBA,CAACC,EAAWC,KAExCD,EAAUE,iBAAiB,SAAS,SAAqBC,GACrD,MAAMC,EAAiBD,EAAEE,OAAOC,UAAUC,SAAS,cACnD,IAAIC,EAAM,GACNC,EAAQ,GACZ,MAAMC,EAAKC,KAAKC,QAAQ,iBAClBC,EAAeC,SAASC,eAAe,iBACvCC,EAAYL,KAAKM,cAAc,cACjCD,IACAP,EAAQO,EAAUE,aAAa,YAE/BR,EAAGS,QAAQC,UACXZ,EAAM,uBACKE,EAAGS,QAAQE,SAClB,MAAQX,EAAGS,QAAQC,SACnB,MAAQnB,EACR,MAAQU,KAAKQ,QAAQG,MACrB,MAAQb,EAERL,GACAmB,MAAMf,EAAK,CACPgB,OAAQ,MACRC,QAAS,CACL,OAAU,WACV,gBAAiB,WACjB,yBAA0BC,KAAKC,UAC3BC,OAAOC,SAASC,oBAKzBF,OAAOC,SAASC,eAAeC,wBACtCvB,EAAM,yBAA2BoB,OAAOC,SAASC,eAAeC,wBAA0B,MAAQpB,KAAKQ,QAAQG,MACxGM,OAAOC,SAASG,UAAUC,oBACjCzB,EAAM,2BAA6BoB,OAAOC,SAASG,UAAUC,oBAAsB,MAAQtB,KAAKQ,QAAQG,MACjGT,IACPL,EAAM,4BAA8BG,KAAKQ,QAAQG,MAAQ,MAAQY,mBAAmBpB,SAASG,cAAc,UAAUkB,YAEpH/B,GACDgC,eAAeC,QAAQ,QAAS7B,EAExC,GAAE,C","sources":["webpack:///./Scripts/brafab.klevu.js"],"sourcesContent":["export const handleAnalaytics = (wrapperEl, index) =>\n{\n wrapperEl.addEventListener('click', function handleClick(e) {\n const buyButtonClick = e.target.classList.contains('buy-button');\n let req = '';\n let price = ''\n const ul = this.closest('.product-list');\n const searchResult = document.getElementById('search-result');\n const priceProp = this.querySelector('#priceprop');\n if (priceProp) {\n price = priceProp.getAttribute('content');\n }\n if (ul.dataset.klevurec) {\n req = '/api/klevu/recnav?' +\n \"t=\" + ul.dataset.klevutag +\n \"&r=\" + ul.dataset.klevurec +\n \"&i=\" + index +\n \"&v=\" + this.dataset.klevu +\n \"&p=\" + price;\n\n if (buyButtonClick) {\n fetch(req, {\n method: 'GET',\n headers: {\n 'pragma': 'no-cache',\n 'cache-control': 'no-cache',\n 'litium-request-context': JSON.stringify(\n window.__litium.requestContext\n )\n }\n });\n }\n } else if (window.__litium.requestContext.productCategorySystemId) {\n req = '/api/klevu/catnav?cat=' + window.__litium.requestContext.productCategorySystemId + \"&v=\" + this.dataset.klevu;\n } else if (window.__litium.constants.productListSystemId) {\n req = '/api/klevu/listnav?list=' + window.__litium.constants.productListSystemId + \"&v=\" + this.dataset.klevu;\n } else if (searchResult) {\n req = '/api/klevu/quicksearch?v=' + this.dataset.klevu + \"&q=\" + encodeURIComponent(document.querySelector('.query').innerHTML);\n }\n if (!buyButtonClick) {\n sessionStorage.setItem('klevu', req);\n }\n });\n}"],"names":["handleAnalaytics","wrapperEl","index","addEventListener","e","buyButtonClick","target","classList","contains","req","price","ul","this","closest","searchResult","document","getElementById","priceProp","querySelector","getAttribute","dataset","klevurec","klevutag","klevu","fetch","method","headers","JSON","stringify","window","__litium","requestContext","productCategorySystemId","constants","productListSystemId","encodeURIComponent","innerHTML","sessionStorage","setItem"],"sourceRoot":""}