{"version":3,"file":"SmartSearch.min.js","sources":["SmartSearch.js"],"sourcesContent":["(function(w, $, _) {\r\n 'use strict';\r\n\r\n const assetId = '~/Parts/Views/Site/SmartSearch.min.js';\r\n\r\n if (!w.umwAssets || !w.umwAssets[assetId]) {\r\n console.error('No context found for ' + assetId);\r\n return;\r\n }\r\n\r\n for (let ctx of w.umwAssets[assetId]) {\r\n\r\n // ReSharper disable UndeclaredGlobalVariableUsing\r\n const $mainPanel = $('#' + ctx.mainPanelId);\r\n const labels = ctx.labels;\r\n const settings = ctx.settings;\r\n const compiledTemplate = _.template(ctx.templateContent);\r\n const pubSub = w.PubSub;\r\n // ReSharper restore UndeclaredGlobalVariableUsing\r\n w.require(['typeahead', 'bloodhound'],\r\n function () {\r\n $(function () {\r\n let qtyMap = {};\r\n \r\n const $searchBtn = $mainPanel.find('.smart-search__btn');\r\n const $searchInput = $mainPanel.find('.smart-search__input');\r\n $searchBtn.on('click',\r\n function(e) {\r\n e.preventDefault();\r\n const term = $.trim($searchInput.val());\r\n if (term) {\r\n w.location = w.R + settings.searchUrl + encodeURIComponent(term);\r\n }\r\n w.reporWebshopSearchEvent(term);\r\n });\r\n $searchInput.on('keypress',\r\n function(e) {\r\n if (e.keyCode == 13) {\r\n e.preventDefault();\r\n $searchBtn.trigger('click');\r\n }\r\n });\r\n\r\n function notify(message, type) {\r\n const channel = typeof (type) === 'string' && type ? 'notification.' + type : 'notification';\r\n w.PubSub.publish(channel, message);\r\n }\r\n\r\n w.PublicEStore.subscribe(w.PublicEStore.channels.callback.shopCart + '.' + w.PublicEStore.actions.addToCart, addToCartHandler);\r\n w.PublicEStore.subscribe(w.PublicEStore.channels.callback.shopCart + '.' + w.PublicEStore.actions.removeFromCart, removeFromCartHandler);\r\n w.PublicEStore.subscribe(w.PublicEStore.channels.callback.shopCart + '.' + w.PublicEStore.actions.emptyCart, emptyCartHandler);\r\n\r\n function addToCartHandler(topic, dataContract) {\r\n addToCartCallback(dataContract);\r\n }\r\n\r\n function removeFromCartHandler(topic, dataContract) {\r\n _.each(dataContract.result.items,\r\n function(prod) {\r\n if (prod.status.toLowerCase() === 'ok' && typeof (qtyMap[prod.productID]) === 'number') {\r\n qtyMap[prod.productID] = 0;\r\n const $prodCont = $mainPanel.find('[data-prodid=\"' + prod.productID + '\"]');\r\n $prodCont.removeClass('smart-search-suggestion_in-cart');\r\n $prodCont.find('.smart-search-suggestion__fa-shopping-cart').remove();\r\n }\r\n });\r\n }\r\n\r\n function emptyCartHandler(topic, dataContract) {\r\n if (dataContract.status.toLowerCase() === 'ok') {\r\n for (let qty in qtyMap) {\r\n if (qtyMap.hasOwnProperty(qty)) {\r\n qtyMap[qty] = 0;\r\n }\r\n }\r\n const $prodConts = $mainPanel.find('.smart-search-suggestion_product');\r\n $prodConts.removeClass('smart-search-suggestion_in-cart');\r\n $prodConts.find('.smart-search-suggestion__fa-shopping-cart').remove();\r\n }\r\n }\r\n\r\n function addToCartCallback(dataContract) {\r\n _.each(dataContract.result.items,\r\n function(prod) {\r\n if (prod.status.toLowerCase() === 'ok') {\r\n if (typeof (qtyMap[prod.productID]) === 'number') {\r\n if (qtyMap[prod.productID] === 0) {\r\n const $prodCont = $mainPanel.find('[data-prodid=\"' + prod.productID + '\"]');\r\n $prodCont.addClass('smart-search-suggestion_in-cart');\r\n $prodCont.find('.smart-search-suggestion__image-container')\r\n .append('');\r\n }\r\n\r\n qtyMap[prod.productID] += prod.quantity;\r\n }\r\n } else {\r\n notify(prod.message, 'error');\r\n }\r\n });\r\n }\r\n\r\n function errorCallback(errorContract) {\r\n if (errorContract) {\r\n const msg = typeof errorContract === 'string'\r\n ? errorContract\r\n : errorContract.result && errorContract.result.items[0]\r\n ? errorContract.result.items[0].message\r\n : errorContract.message;\r\n notify(msg, 'error');\r\n }\r\n };\r\n\r\n var qtyFocusing = false;\r\n\r\n function validateQty($cont) {\r\n const $qtyTxb = $cont.find('.js-qty-txb');\r\n const qtyVal = $qtyTxb.val();\r\n\r\n if (qtyVal && $.isNumeric(qtyVal)) {\r\n const intQty = parseInt(qtyVal);\r\n const minQty = $cont.data('qty');\r\n\r\n if (intQty >= minQty) {\r\n $cont.removeClass('has-error');\r\n return true;\r\n }\r\n }\r\n\r\n $cont.addClass('has-error');\r\n return false;\r\n }\r\n\r\n function changeQty($cont, diff) {\r\n if (validateQty($cont)) {\r\n const $qtyTxb = $cont.find('.js-qty-txb');\r\n let intQty = parseInt($qtyTxb.val());\r\n\r\n if (diff > 0) {\r\n intQty += diff;\r\n } else {\r\n const minQty = $cont.data('qty');\r\n\r\n if (intQty > minQty) {\r\n intQty += diff;\r\n }\r\n }\r\n\r\n $qtyTxb.val(intQty);\r\n }\r\n }\r\n\r\n // ReSharper disable UndeclaredGlobalVariableUsing\r\n var products = new Bloodhound({\r\n datumTokenizer: Bloodhound.tokenizers.obj.whitespace('title'),\r\n queryTokenizer: Bloodhound.tokenizers.whitespace,\r\n remote: {\r\n url: w.R +\r\n 'handlers/public/ItemSearch.ashx?action=smartsearch' +\r\n '&types=' + (settings.types || '20') +\r\n (settings.rootPages ? '&rootpages=' + settings.rootPages : '') +\r\n (settings.rootFolders ? '&rootfolders=' + settings.rootFolders : '') +\r\n (settings.rootCategories ? '&rootcategories=' + settings.rootCategories : '') +\r\n (settings.imageWidth ? '&imageWidth=' + settings.imageWidth : '') +\r\n (settings.imageMod ? '&imageMod=' + settings.imageMod : '') +\r\n '&showPrice=' + settings.showPrice +\r\n (settings.showOriginalPrice ? '&showOriginalPrice=' + settings.showOriginalPrice : '') +\r\n '&showComparablePrice=' + settings.showComparablePrice +\r\n '&count=' + settings.resultsCount +\r\n (settings.documentCategoriesRoot ? '&docCatRoot=' + settings.documentCategoriesRoot : '') +\r\n '&term=%QUERY',\r\n wildcard: '%QUERY'\r\n }\r\n });\r\n // ReSharper restore UndeclaredGlobalVariableUsing\r\n\r\n const $ta = $mainPanel.find('.js-typeahead');\r\n $ta.typeahead(\r\n { highlight: true, hint: false, minLength: settings.minTermLength },\r\n {\r\n name: 'products',\r\n display: 'title',\r\n source: products,\r\n limit: (settings.resultsCount + 1) * 2, //note: typeahead workaround (rendered counter is incremented before slicing results array)\r\n templates: {\r\n empty: [\r\n '
'\r\n ].join('\\n'),\r\n suggestion: function(context) {\r\n if (context.type === 'prod') {\r\n if (typeof (qtyMap[context.prodID]) === 'undefined') {\r\n qtyMap[context.prodID] = context.qtyInCart ? context.qtyInCart : 0;\r\n } else {\r\n context.qtyInCart = qtyMap[context.prodID];\r\n }\r\n }\r\n\r\n return compiledTemplate({\r\n ctx: context,\r\n searchUrl: w.R + settings.searchUrl,\r\n labels: labels,\r\n settings: settings\r\n });\r\n }\r\n }\r\n })\r\n .bind('typeahead:render',\r\n function () {\r\n $mainPanel.find('.js-qty-cont')\r\n .each(function(i, cont) {\r\n const $cont = $(cont);\r\n $cont.find('.js-btn-dec')\r\n .click(function() {\r\n changeQty($cont, -1);\r\n return false;\r\n });\r\n $cont.find('.js-btn-inc')\r\n .click(function() {\r\n changeQty($cont, 1);\r\n return false;\r\n });\r\n $cont.find('.js-qty-txb')\r\n .click(function() {\r\n qtyFocusing = true;\r\n const $this = $(this);\r\n $this[0].selectionStart = $this[0].selectionEnd = $this.val().length;\r\n $this.focus();\r\n return false;\r\n })\r\n .blur(function(e) {\r\n if (qtyFocusing) {\r\n qtyFocusing = false;\r\n } else if (!e.relatedTarget || !$.contains($mainPanel[0], e.relatedTarget)) {\r\n $ta.typeahead('close');\r\n }\r\n })\r\n .change(function () {\r\n validateQty($cont);\r\n });\r\n });\r\n\r\n $mainPanel.find('.smart-search-suggestion__buy-btn')\r\n .on('click',\r\n function() {\r\n const $cont = $(this).closest('.smart-search-suggestion_product');\r\n const $qtyCont = $cont.find('.js-qty-cont');\r\n let qty;\r\n\r\n if ($qtyCont.length) {\r\n if (!validateQty($qtyCont)) {\r\n return false;\r\n }\r\n\r\n qty = parseInt($cont.find('.js-qty-txb').val());\r\n } else {\r\n qty = $cont.data('qty');\r\n }\r\n\r\n const addContract = {\r\n productId: $cont.data('prodid'),\r\n quantity: qty\r\n };\r\n $.when(w.PublicEStore.addToCart([addContract]))\r\n .then(addToCartCallback, errorCallback);\r\n return false;\r\n });\r\n \r\n reportImpressions($mainPanel);\r\n })\r\n .bind('typeahead:select',\r\n function(e, data) {\r\n if (data) {\r\n if (data.type === 'prod' && data.prodUrl) {\r\n w.location = data.prodUrl;\r\n } else if (data.type === 'document' && data.documentUrl) {\r\n w.location = data.documentUrl;\r\n } else if (data.type === 'event' && data.eventUrl) {\r\n w.location = data.eventUrl;\r\n }\r\n }\r\n });\r\n\r\n //note: typeahead workaround - result items were closing on setting focus at quantity input\r\n var origClose = $ta.data('ttTypeahead').close;\r\n $ta.data('ttTypeahead').close = function() {\r\n if (!qtyFocusing) {\r\n origClose.apply(this, arguments);\r\n }\r\n qtyFocusing = false;\r\n };\r\n pubSub.publish(\"frontend.smartsearch.init\", \"init\");\r\n\r\n function reportImpressions($searchResults) {\r\n try {\r\n const listName = $.trim(document.title) + ' > ' + labels.smartSearch;\r\n const productImpressions = [];\r\n\r\n $searchResults.find('[data-prodid]').each(function () {\r\n const $prod = $(this);\r\n\r\n const productId = parseInt($prod.data('prodid'));\r\n if (productId > 0) {\r\n productImpressions.push({ productId: productId, $links: $prod.find('.js-product-link') });\r\n }\r\n });\r\n \r\n if (productImpressions.length > 0) {\r\n w.reportProductListView(w.productListType.searchResults, listName, productImpressions);\r\n }\r\n } catch (e) {\r\n console.error('Failed to report smartsearch\\'s products impressions. ' + e);\r\n }\r\n }\r\n });\r\n });\r\n }\r\n})(window, window.jQuery, _);"],"names":["w","$","_","assetId","umwAssets","let","ctx","$mainPanel","mainPanelId","labels","settings","compiledTemplate","template","templateContent","pubSub","PubSub","require","qtyMap","$searchBtn","find","$searchInput","notify","message","type","publish","addToCartCallback","dataContract","each","result","items","prod","$prodCont","status","toLowerCase","productID","addClass","append","quantity","errorCallback","errorContract","on","e","preventDefault","term","trim","val","location","R","searchUrl","encodeURIComponent","reporWebshopSearchEvent","keyCode","trigger","PublicEStore","subscribe","channels","callback","shopCart","actions","addToCart","topic","removeFromCart","removeClass","remove","emptyCart","qty","hasOwnProperty","$prodConts","qtyFocusing","validateQty","$cont","qtyVal","isNumeric","intQty","parseInt","data","changeQty","diff","$qtyTxb","minQty","products","Bloodhound","datumTokenizer","tokenizers","obj","whitespace","queryTokenizer","remote","url","types","rootPages","rootFolders","rootCategories","imageWidth","imageMod","showPrice","showOriginalPrice","showComparablePrice","resultsCount","documentCategoriesRoot","wildcard","$ta","typeahead","highlight","hint","minLength","minTermLength","name","display","source","limit","templates","empty","noItemsFound","join","suggestion","context","prodID","qtyInCart","bind","i","cont","click","$this","this","selectionStart","selectionEnd","length","focus","blur","relatedTarget","contains","change","closest","$qtyCont","addContract","productId","when","then","reportImpressions","$searchResults","listName","document","title","smartSearch","productImpressions","$prod","push","$links","reportProductListView","productListType","searchResults","console","error","prodUrl","documentUrl","eventUrl","origClose","close","apply","arguments","window","jQuery"],"mappings":"CAAA,CAAUA,EAAGC,EAAGC,KAGZ,IAAMC,EAAU,wCAEhB,GAAKH,EAAEI,WAAcJ,EAAEI,UAAUD,GAKjC,IAAKE,IAAIC,KAAON,EAAEI,UAAUD,GAAU,CAGlC,IAAMI,EAAaN,EAAE,IAAMK,EAAIE,WAAW,EACpCC,EAASH,EAAIG,OACbC,EAAWJ,EAAII,SACfC,EAAmBT,EAAEU,SAASN,EAAIO,eAAe,EACjDC,EAASd,EAAEe,OAEjBf,EAAEgB,QAAQ,CAAC,YAAa,cACpB,WACIf,EAAE,WACEI,IAAIY,EAAS,GAEPC,EAAaX,EAAWY,KAAK,oBAAoB,EACjDC,EAAeb,EAAWY,KAAK,sBAAsB,EAkB3D,SAASE,EAAOC,EAASC,GAErBvB,EAAEe,OAAOS,QADyB,UAAlB,OAAO,GAAuBD,EAAO,gBAAkBA,EAAO,eACpDD,CAAO,CACrC,CAmCA,SAASG,EAAkBC,GACvBxB,EAAEyB,KAAKD,EAAaE,OAAOC,MACvB,SAASC,G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