1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[83398],{610:(t,e,r)=>{r.d(e,{Z:()=>s});class s{static debounce(t,e){let r,s=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(){for(var i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];s&&!r&&setTimeout(t.bind(t,...o),0),clearTimeout(r),r=setTimeout(t.bind(t,...o),e)}}}},49:(t,e,r)=>{r.d(e,{Z:()=>i});var s=r(140);class i{static isNode(t){return"object"==typeof t&&null!==t&&(t===document||t===window||t instanceof Node)}static hasAttribute(t,e){if(!i.isNode(t))throw Error("The element must be a valid HTML Node!");return"function"==typeof t.hasAttribute&&t.hasAttribute(e)}static getAttribute(t,e){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(r&&!1===i.hasAttribute(t,e))throw Error('The required property "'.concat(e,'" does not exist!'));if("function"!=typeof t.getAttribute){if(r)throw Error("This node doesn't support the getAttribute function!");return}return t.getAttribute(e)}static getDataAttribute(t,e){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2],o=e.replace(/^data(|-)/,""),a=s.Z.toLowerCamelCase(o,"-");if(!i.isNode(t)){if(r)throw Error("The passed node is not a valid HTML Node!");return}if(void 0===t.dataset){if(r)throw Error("This node doesn't support the dataset attribute!");return}let n=t.dataset[a];if(void 0===n){if(r)throw Error('The required data attribute "'.concat(e,'" does not exist on ').concat(t,"!"));return n}return s.Z.parsePrimitive(n)}static querySelector(t,e){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(r&&!i.isNode(t))throw Error("The parent node is not a valid HTML Node!");let s=t.querySelector(e)||!1;if(r&&!1===s)throw Error('The required element "'.concat(e,'" does not exist in parent node!'));return s}static querySelectorAll(t,e){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(r&&!i.isNode(t))throw Error("The parent node is not a valid HTML Node!");let s=t.querySelectorAll(e);if(0===s.length&&(s=!1),r&&!1===s)throw Error('At least one item of "'.concat(e,'" must exist in parent node!'));return s}static getFocusableElements(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body;return t.querySelectorAll('\n input:not([tabindex^="-"]):not([disabled]):not([type="hidden"]),\n select:not([tabindex^="-"]):not([disabled]),\n textarea:not([tabindex^="-"]):not([disabled]),\n button:not([tabindex^="-"]):not([disabled]),\n a[href]:not([tabindex^="-"]):not([disabled]),\n [tabindex]:not([tabindex^="-"]):not([disabled])\n ')}static getFirstFocusableElement(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body;return this.getFocusableElements(t)[0]}static getLastFocusableElement(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,e=this.getFocusableElements(t);return e[e.length-1]}}},266:(t,e,r)=>{r.d(e,{Z:()=>s});class s{static iterate(t,e){if(t instanceof Map||Array.isArray(t))return t.forEach(e);if(t instanceof FormData){for(var r of t.entries())e(r[1],r[0]);return}if(t instanceof NodeList)return t.forEach(e);if(t instanceof HTMLCollection)return Array.from(t).forEach(e);if(t instanceof Object)return Object.keys(t).forEach(r=>{e(t[r],r)});throw Error("The element type ".concat(typeof t," is not iterable!"))}}},140:(t,e,r)=>{r.d(e,{Z:()=>s});class s{static ucFirst(t){return t.charAt(0).toUpperCase()+t.slice(1)}static lcFirst(t){return t.charAt(0).toLowerCase()+t.slice(1)}static toDashCase(t){return t.replace(/([A-Z])/g,"-$1").replace(/^-/,"").toLowerCase()}static toLowerCamelCase(t,e){let r=s.toUpperCamelCase(t,e);return s.lcFirst(r)}static toUpperCamelCase(t,e){return e?t.split(e).map(t=>s.ucFirst(t.toLowerCase())).join(""):s.ucFirst(t.toLowerCase())}static parsePrimitive(t){try{return/^\d+(.|,)\d+$/.test(t)&&(t=t.replace(",",".")),JSON.parse(t)}catch(e){return t.toString()}}}},398:(t,e,r)=>{r.r(e),r.d(e,{default:()=>c});var s=r(49),i=r(266);let o="is-active";class a{resetIterator(){this._iterator=-1}_registerEvents(){this._element.addEventListener("keydown",this._onKeyDown.bind(this))}_onKeyDown(t){let e=s.Z.querySelector(document,this._parentSelector,!1);if(e&&(this._items=e.querySelectorAll(this._itemSelector),0!==this._items.length)){switch(t.key){case"Enter":this._onPressEnter(t);return;case"ArrowDown":t.preventDefault(),this._iterator++;break;case"ArrowUp":t.preventDefault(),this._iterator--;break;default:return}this._clampIterator(),i.Z.iterate(this._items,t=>t.classList.remove(o)),this._getCurrentSelection().classList.add(o)}}_onPressEnter(t){if(!(this._iterator<=-1))try{let e=s.Z.querySelector(this._getCurrentSelection(),"a");t.preventDefault(),e.click()}catch(t){}}_getCurrentSelection(){return this._items[this._iterator]}_clampIterator(){let t=this._getMaxItemCount();this._iterator<0&&(this._iterator=this._infinite?t:0),this._iterator>t&&(this._iterator=this._infinite?0:t)}_getMaxItemCount(){return this._items.length-1}constructor(t,e,r,s=!0){this._element=t,this._parentSelector=e,this._infinite=s,this._itemSelector=r,this.resetIterator(),this._registerEvents()}}var n=r(610);class c extends window.PluginBaseClass{init(){try{this._input=s.Z.querySelector(this.el,".header-search-input")}catch(t){if(localStorage){let e=localStorage.getItem("eDebug");e&&1===parseInt(e,10)&&console.log("SearchHistoryPlugin",t)}return!1}this._navigationHelper=new a(this._input,".".concat(this.options.searchHistoryResultClassName),".".concat(this.options.searchHistoryResultItemClassName),!0),this.registerEvents(),this.registerSubscribers()}registerEvents(){this._input.addEventListener("click",t=>this._onFocus(t)),this._input.addEventListener("input",n.Z.debounce(this._handleInputEvent.bind(this),250),{capture:!0,passive:!0})}registerSubscribers(){window.PluginManager.getPluginInstanceFromElement(this.el,"SearchWidget").$emitter.subscribe("onBodyClick",t=>this._onFocusOut(t))}_handleInputEvent(){this._input.value?this._clearSearchHistory():this._showSearchHistory()}_onFocus(){this._showSearchHistory()}_onFocusOut(t){let e=t.detail&&t.detail.e||t;e.target.closest(".e-header-search-form")||e.target.closest(".".concat(this.options.searchHistoryResultClassName))||this._clearSearchHistory()}_onInput(){this._showSearchHistory()}_showSearchHistory(){if(this._input.value)return;this._clearSearchHistory();let t=this.options.channel,e=this._getSearchHistory(),r=[];t&&e.hasOwnProperty(t)&&(r=e[t]),r.length>0&&this._appendSearchHistory(r)}_clearSearchHistory(){let t=document.querySelector(".".concat(this.options.searchHistoryResultClassName));t&&t.remove()}_getSearchHistory(){return JSON.parse(localStorage.getItem(this.options.localStorageKey))||{}}_appendSearchHistory(t){let e=document.createElement("div");e.classList.add("search-suggest","e-search-history",this.options.searchHistoryResultClassName);let r=document.createElement("ul");r.classList.add("col-12","col-md","search-suggest-container"),t.forEach((t,e)=>{if(!t.hasOwnProperty("searchTerm"))return;let s=t.searchTerm,i=document.createElement("li");r.appendChild(i),i.classList.add("search-suggest-product",this.options.searchHistoryResultItemClassName);let o=document.createElement("a");o.classList.add("search-suggest-product-link");let a=document.createAttribute("href");a.value="".concat(this.options.searchPageUrl).concat(encodeURIComponent(s)),o.setAttributeNode(a);let n=document.createAttribute("title");n.value=s,o.setAttributeNode(n);let c=document.createElement("div");c.classList.add("row","align-items-center","g-0");
1let l=document.createElement("div");l.classList.add("col","search-suggest-product-name"),c.appendChild(l);let h=document.createTextNode(s);l.appendChild(h);let u=document.createElement("a");u.setAttribute("searchHistoryIndex",e),u.classList.add("history-remove");let d=document.createAttribute("href");d.value="#",u.setAttributeNode(d),c.appendChild(u),o.appendChild(c),i.appendChild(o),r.appendChild(i)}),e.appendChild(r),this.el.appendChild(e),this._wrapper=document.querySelector(".e-search-history"),this._wrapper.addEventListener("click",t=>{let e=t.target;e.classList.contains("history-remove")&&e.hasAttribute("searchHistoryIndex")&&(t.preventDefault(),this._removeFromHistory(e.getAttribute("searchHistoryIndex")))})}_removeFromHistory(t){let e=this._getSearchHistory(),r=this.options.channel;r&&(e[r].splice(t,1),localStorage.setItem(this.options.localStorageKey,JSON.stringify(e)),this._showSearchHistory())}}c.options={localStorageKey:"elio-data-discovery-search-history",searchHistoryResultClassName:"js-search-history-result",searchHistoryResultItemClassName:"js-result",searchHistoryInputFieldSelector:"input[type=search]",searchHistoryButtonFieldSelector:"button[type=submit]",searchHistoryCollapseButtonSelector:".js-search-toggle-btn",channel:"",searchPageUrl:""}}}]);
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.