{"version":3,"file":"719.1df5cfb975db614e.js","mappings":"8HAAO,MAAMA,EAAwBC,IACjC,MAAMC,EAAOD,EAAIE,QAAQD,KACnBE,EAAMH,EAAIE,QAAQC,IAClBC,EAAMJ,EAAIE,QAAQE,IAClBC,EAAML,EAAIE,QAAQG,IACxBC,MAAM,mBAA0BL,EAAO,QAAUE,EAAM,QAAUC,EACjE,CACIG,OAAQ,MACRC,QAAS,CACL,OAAU,WACV,gBAAiB,WACjB,yBAA0BC,KAAKC,UAC3BC,OAAOC,SAASC,mBAI3BC,MAAKC,GAAYA,EAASC,SAC1BF,MAAKG,IACFjB,EAAIkB,UAAY,GAChB,MAAMC,GAAW,IAAIC,WAAYC,gBAAgBJ,EAAM,aACvD,GAAIE,EAAS,CACUA,EAASG,iBAAiB,QAE/B,SAANjB,EACAL,EAAIuB,YAAYJ,EAASK,cAAc,QAGvCxB,EAAIuB,YAAYJ,EAASK,cAAc,QAG/CxB,EAAIyB,UAAUC,OAAO,eACrBf,OAAOC,SAASe,qBACpB,IACF,C","sources":["webpack:///./Scripts/brafab.klevurecommentation.js"],"sourcesContent":["export const handleRecommendation = (rec) => {\n const ktag = rec.dataset.ktag;\n const kid = rec.dataset.kid;\n const cat = rec.dataset.cat;\n const pdp = rec.dataset.pdp;\n fetch('/api/klevu' + \"?ktag=\" + ktag + \"&kid=\" + kid + \"&cat=\" + cat,\n {\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 .then(response => response.text())\n .then(data => {\n rec.innerHTML = '';\n const pageHtml = new DOMParser().parseFromString(data, 'text/html');\n if (pageHtml){\n const childNodes = pageHtml.querySelectorAll('li');\n if (childNodes) {\n if (pdp==='true'){\n rec.appendChild(pageHtml.querySelector('div'));\n }\n else{\n rec.appendChild(pageHtml.querySelector('ul'));\n }\n }\n rec.classList.remove('hiddenblock');\n window.__litium.bootstrapComponents();\n }\n });\n}"],"names":["handleRecommendation","rec","ktag","dataset","kid","cat","pdp","fetch","method","headers","JSON","stringify","window","__litium","requestContext","then","response","text","data","innerHTML","pageHtml","DOMParser","parseFromString","querySelectorAll","appendChild","querySelector","classList","remove","bootstrapComponents"],"sourceRoot":""}