enqueueScripts([function(){ !function(t){function e(e){for(var r,u,c=e[0],a=e[1],f=e[2],s=0,p=[];s3&&void 0!==arguments[3]?arguments[3]:"/",n="";if(a&&a>0){var i=new Date;i.setTime((new Date).getTime()+a),n="expires=".concat(i.toUTCString(),";")}document.cookie="".concat(e,"=").concat(encodeURIComponent(t),";").concat(n,"path=").concat(r)}var v=function(){function e(t){Object(o.a)(this,e),this.client=t,this.historyKey="biggy-search-history"}var t,a,r;return Object(s.a)(e,[{key:"topSearches",value:(r=Object(i.a)(n.a.mark((function e(){return n.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.client.query({query:d.a}));case 1:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"suggestionSearches",value:(a=Object(i.a)(n.a.mark((function e(t){return n.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.client.query({query:p.a,variables:{fullText:t}}));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"suggestionProducts",value:(t=Object(i.a)(n.a.mark((function e(t,a,r){var i,o,s,c,l,p,m,d=arguments;return n.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=d.length>3&&void 0!==d[3]&&d[3],o=d.length>4&&void 0!==d[4]?d[4]:"default",s=d.length>5&&void 0!==d[5]&&d[5],c=d.length>6?d[6]:void 0,l=d.length>7?d[7]:void 0,p=d.length>8?d[8]:void 0,m=d.length>9?d[9]:void 0,e.abrupt("return",this.client.query({query:u.a,variables:{simulationBehavior:o,advertisementOptions:m,hideUnavailableItems:s,orderBy:c,fullText:t,facetKey:a,facetValue:r,productOriginVtex:i,count:l,shippingOptions:p,variant:h("sp-variant")},fetchPolicy:"network-only"}));case 8:case"end":return e.stop()}}),e,this)}))),function(e,a,r){return t.apply(this,arguments)})},{key:"searchHistory",value:function(){return(h(this.historyKey)||"").split(",").filter((function(e){return!!e}))}},{key:"prependSearchHistory",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5;if(null!=e&&""!==e.trim()){var a=this.searchHistory();a.indexOf(e)<0&&(a.unshift(e),a=a.slice(0,t)),f(this.historyKey,a.join(","))}}}]),e}()},,,function(e,t){e.exports=regeneratorRuntime},function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.styleguide@9.x/IconClose"]},function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.styleguide@9.x/IconClock"]},function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.product-list-context@0.x/ProductListContext"]},function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.device-detector@0.x/withDevice"]},function(e,t){function a(e,t,a){var r,n,i,o,s;function c(){var u=Date.now()-o;u=0?r=setTimeout(c,t-u):(r=null,a||(s=e.apply(i,n),i=n=null))}null==t&&(t=100);var u=function(){i=this,n=arguments,o=Date.now();var u=a&&!r;return r||(r=setTimeout(c,t)),u&&(s=e.apply(i,n),i=n=null),s};return u.clear=function(){r&&(clearTimeout(r),r=null)},u.flush=function(){r&&(s=e.apply(i,n),i=n=null,clearTimeout(r),r=null)},u}a.debounce=a,e.exports=a},function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.pixel-manager@1.x/PixelContext"]},function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.styleguide@9.x/Spinner"]},function(e,t){e.exports=__RENDER_8_COMPONENTS__["carajas.product-summary@2.x/ProductSummaryCustom"]},function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.product-price@1.x/SellingPrice"]},function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.product-price@1.x/ListPrice"]},function(e,t){e.exports=__RENDER_8_COMPONENTS__["carajas.product-context@0.x/ProductContextProvider"]},,,,,function(e,t,a){"use strict";a.r(t),function(e){var t=a(4);a.p=Object(t.getPublicPath)("carajas.search@2.18.5");var r=Object(t.register)((function(){return a(46)}),e,"carajas.search@2.18.5","carajas.search@2.x","Autocomplete");r.renderHotReload,r.setupHMR}.call(this,a(16)(e))},,,,,,function(e,t,a){"use strict";a.r(t);var r=a(1),n=a.n(r),i=a(5),o=a(9),s=a(10),c=a(23),u=a(22),l=a(13),p=a(0),m=a.n(p),d=a(7),h=a(3),f=a(25),v=a.n(f),g=a(26),y=a.n(g),x=a(27),E=a.n(x),_=a(28),b=a.n(_),k=a(29),S=a.n(k),L=a(30),O=a(21),P=a(14),N=a.n(P),T=a(2),w=a(31),j=a.n(w),C=a(32),I=a.n(C),M=a(11),R=a.n(M),H=a(33),D=a.n(H),F=a(34),V=a.n(F),q=a(35),A=a.n(q),W=a(12),U=a.n(W),B=function(e){var t,a,r,n,i=e.product,o=e.onClick,s=null==i?void 0:i.sku,c=null===(r=null===(a=null===(t=null==s?void 0:s.sellers)||void 0===t?void 0:t[0])||void 0===a?void 0:a.commertialOffer)||void 0===r?void 0:r.taxPercentage;return m.a.createElement("div",null,m.a.createElement(T.Link,{params:{slug:null==i?void 0:i.linkText,id:null==i?void 0:i.productId},page:"store.product",className:"no-underline",onClick:o},m.a.createElement("article",{className:"".concat(U.a.element," flex flex-row justify-start items-center pa3 bg-animate hover-bg-light-gray")},m.a.createElement("div",{className:"".concat(U.a.imageContainer," h3")},m.a.createElement("img",{className:"".concat(U.a.image," h-100 w-auto mw-none"),src:null===(n=null==s?void 0:s.image)||void 0===n?void 0:n.imageUrl})),m.a.createElement("div",{className:"".concat(U.a.information," flex flex-column justify-between items-start ml4")},m.a.createElement("div",{className:U.a.productNameContainer},m.a.createElement("span",{className:"".concat(U.a.productBrand," f5 c-on-base")},i.productName)),m.a.createElement("div",{className:U.a.priceContainer},m.a.createElement(A.a,{product:i,query:{skuId:null==s?void 0:s.itemId}},m.a.createElement("span",{className:"db f7 c-muted-2"},m.a.createElement(V.a,{message:c?"{listPriceWithTax}":"{listPriceValue}"})),m.a.createElement("span",{className:"dib t-small c-muted-2"},m.a.createElement(D.a,{message:c?"{sellingPriceWithTax}":"{sellingPriceValue}"}))))))))},z=function(e){var t=e.term,a=e.title,r=e.products,n=e.showTitle,i=e.totalProducts,o=e.layout,s=e.isLoading,c=e.onProductClick,u=e.onSeeAllClick,l=e.HorizontalProductSummary,p=e.customPage;return 0!==r.length||s?m.a.createElement("section",{className:R.a.tileList},n?m.a.createElement("p",{className:"".concat(R.a.tileListTitle," c-on-base")},a):null,s?m.a.createElement("div",{className:R.a.tileListSpinner},m.a.createElement(j.a,null)):m.a.createElement(m.a.Fragment,null,m.a.createElement("ul",{className:R.a.tileListList,style:{flexDirection:o===re.Horizontal?"column":"row"}},r.map((function(e,a){var r=I.a.mapCatalogProductToProductSummary(e);return m.a.createElement("li",{key:e.productId,className:R.a.tileListItem},o===re.Horizontal?l?m.a.createElement(l,{product:r,placement:"autocomplete",actionOnClick:function(){c(r.productId,a,t)}}):m.a.createElement(B,{product:r,onClick:function(){c(r.productId,a,t)}}):m.a.createElement(T.ExtensionPoint,{id:"product-summary",product:r,placement:"autocomplete",actionOnClick:function(){c(r.productId,a,t)}}))}))),m.a.createElement("footer",{className:R.a.tileListFooter},i>0?m.a.createElement(T.Link,{query:"map=ft&_q=".concat(t),params:{term:t},page:p||"store.search",className:R.a.tileListSeeMore,onClick:function(){return u(t)}},m.a.createElement(h.FormattedMessage,{id:"store/seeMore",values:{count:i}})):null))):null};var Q=a(6),K=a.n(Q),J=function(e){var t;return(null===(t=e.item)||void 0===t?void 0:t.attributes)?m.a.createElement("ul",{className:K.a.itemListSubList},e.item.attributes.map((function(t,a){return m.a.createElement("li",{key:a,className:"".concat(K.a.itemListSubItem," c-on-base pointer"),onMouseOver:function(a){return e.onMouseOver(a,t)},onFocus:function(a){return e.onMouseOver(a,t)},onMouseOut:function(){return e.onMouseOut()},onBlur:function(){return e.onMouseOut()}},m.a.createElement(T.Link,{className:"".concat(K.a.itemListSubItemLink," c-on-base"),to:"/".concat(e.item.value,"/").concat(t.value),query:"map=ft,".concat(t.key),onClick:function(){e.closeModal(),e.onItemClick(t.label,a)}},t.label))}))):null};function $(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=Object(l.a)(e);if(t){var n=Object(l.a)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return Object(u.a)(this,a)}}var G=function(e){Object(c.a)(a,e);var t=$(a);function a(){var e;return Object(o.a)(this,a),(e=t.apply(this,arguments)).state={currentTimeoutId:null},e.handleMouseOver=function(t,a){if(t.stopPropagation(),!e.state.currentTimeoutId){var r=setTimeout((function(){e.props.onItemHover&&e.props.onItemHover(a),e.setState({currentTimeoutId:null})}),100);e.setState({currentTimeoutId:r})}},e.handleMouseOut=function(){var t=e.state.currentTimeoutId;t&&(clearTimeout(t),e.setState({currentTimeoutId:null}))},e}return Object(s.a)(a,[{key:"render",value:function(){var e=this;if(0===this.props.items.length&&!this.props.showTitleOnEmpty)return null;var t=this.props.modifier?K.a["itemList--".concat(this.props.modifier)]:"";return p.createElement("article",{className:"".concat(K.a.itemList," ").concat(t)},this.props.showTitle?p.createElement("p",{className:"".concat(K.a.itemListTitle," c-on-base")},this.props.title):null,p.createElement("ol",{className:K.a.itemListList},this.props.items.map((function(t,a){var r;return p.createElement("li",{key:t.value,className:"".concat(K.a.itemListItem),onMouseOver:function(a){return e.handleMouseOver(a,t)},onFocus:function(a){return e.handleMouseOver(a,t)},onMouseOut:function(){return e.handleMouseOut()},onBlur:function(){return e.handleMouseOut()}},p.createElement(T.Link,{page:null!==(r=e.props.customPage)&&void 0!==r?r:"store.search",params:{term:t.value},query:"map=ft&_q=".concat(t.value),onClick:function(){return e.props.onItemClick(t.value,a)},className:K.a.itemListLink},t.icon?p.createElement("span",{className:K.a.itemListIcon},t.icon):null,t.prefix?p.createElement("span",{className:K.a.itemListPrefix},t.prefix):null,p.createElement("span",{className:"".concat(K.a.itemListLinkTitle," c-on-base")},t.label)),p.createElement(J,{item:t,onMouseOver:e.handleMouseOver,onMouseOut:e.handleMouseOut,closeModal:e.props.closeModal,onItemClick:e.props.onItemClick}))}))))}}]),a}(p.Component),X=a(36);var Z;function Y(e,t,a){return function(r,n){e({page:t,event:"autocomplete",eventType:a,search:{term:r,position:n}})}}function ee(e,t,a,r,n){try{e({event:"autocomplete",eventType:Z.Search,search:{operator:t,misspelled:a,text:decodeURI(n),match:r}})}catch(i){e({event:"autocomplete",eventType:Z.Search,search:{operator:t,misspelled:a,text:n,match:r}})}}!function(e){e.ProductClick="product_click",e.SearchSuggestionClick="search_suggestion_click",e.TopSearchClick="top_search_click",e.HistoryClick="history_click",e.Search="search",e.SeeAllClick="see_all_click"}(Z||(Z={}));var te=function(){var e=Object(i.a)(n.a.mark((function e(t){var a,r,i,o,s,c,u;return n.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(o=new Headers).append("Content-Type","application/json"),s={method:"GET",headers:o,redirect:"follow"},e.next=5,fetch("".concat(t||"","/api/sessions?items=public.shippingOption"),s);case 5:return c=e.sent,e.next=8,c.json();case 8:if(u=e.sent,null===(i=null===(r=null===(a=null==u?void 0:u.namespaces)||void 0===a?void 0:a.public)||void 0===r?void 0:r.shippingOption)||void 0===i?void 0:i.value){e.next=11;break}return e.abrupt("return",null);case 11:return e.abrupt("return",JSON.parse(u.namespaces.public.shippingOption.value));case 12:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function ae(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=Object(l.a)(e);if(t){var n=Object(l.a)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return Object(u.a)(this,a)}}var re;!function(e){e.Horizontal="HORIZONTAL",e.Vertical="VERTICAL"}(re||(re={}));var ne,ie=E.a.ProductListProvider,oe=function(e){Object(c.a)(l,e);var t,a,r,u=ae(l);function l(e){var t;return Object(o.a)(this,l),(t=u.call(this,e)).state={topSearchedItems:[],history:[],products:[],suggestionItems:[],totalProducts:0,queryFromHover:{},dynamicTerm:"",isProductsLoading:!1,currentHeightWhenOpen:0},t.handleItemHover=function(e){"groupValue"in e?(t.setState({dynamicTerm:e.groupValue,queryFromHover:{key:e.key,value:e.value}}),t.updateProducts(e.groupValue)):(t.setState({dynamicTerm:e.value,queryFromHover:{key:void 0,value:void 0}}),t.updateProducts(e.value))},t.getProductLayout=function(){var e=t.props,a=e.productLayout,r=e.isMobile;return void 0!==a?a:r?re.Horizontal:re.Vertical},t.client=new O.a(t.props.client),t.autocompleteRef=m.a.createRef(),t.isIOS=navigator&&!!navigator.userAgent.match(/(iPod|iPhone|iPad)/),t}return Object(s.a)(l,[{key:"fitAutocompleteInWindow",value:function(){if(window&&this.autocompleteRef.current&&this.props.isMobile&&!this.isIOS){var e=window.innerHeight,t=this.autocompleteRef.current.getBoundingClientRect().y,a=this.autocompleteRef.current.offsetHeight,r=a-(t+a-e);this.autocompleteRef.current.style.maxHeight="".concat(r,"px")}}},{key:"addEvents",value:function(){window.addEventListener("resize",S()(this.fitAutocompleteInWindow.bind(this),100))}},{key:"componentDidMount",value:function(){this.updateTopSearches(),this.updateHistory(),this.addEvents()}},{key:"shouldUpdate",value:function(e){return e.inputValue!==this.props.inputValue||!e.isOpen&&this.props.isOpen}},{key:"addTermToHistory",value:function(){var e=window.location.href.split("_q=");if(e[1]){var t=e[1].split("&")[0];try{return this.client.prependSearchHistory(decodeURI(t))}catch(e){return this.client.prependSearchHistory(t)}}}},{key:"closeModal",value:function(){this.props.closeMenu&&this.props.closeMenu()}},{key:"componentDidUpdate",value:function(e){var t=this;if(this.shouldUpdate(e)){this.addTermToHistory(),this.fitAutocompleteInWindow();var a=this.props.inputValue;this.setState({dynamicTerm:a,queryFromHover:void 0}),null===a||""===a?(this.updateTopSearches(),this.updateHistory(),this.setState({suggestionItems:[],products:[]})):this.updateSuggestions().then((function(){return t.fitAutocompleteInWindow(),t.updateProducts(a)})).then((function(){return t.fitAutocompleteInWindow()}))}}},{key:"highlightTerm",value:function(e,t){var a=e.split(t);return m.a.createElement(m.a.Fragment,null,a.map((function(e,r){return m.a.createElement(m.a.Fragment,null,e,r!==a.length-1?m.a.createElement("span",{className:"b"},t):null)})))}},{key:"updateSuggestions",value:(r=Object(i.a)(n.a.mark((function e(){var t,a,r,i,o,s,c=this;return n.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.client.suggestionSearches(this.props.inputValue);case 2:t=e.sent,a=t.data.autocompleteSearchSuggestions.searches,r=this.props.maxSuggestedTerms,i=void 0===r?5:r,o=a.slice(0,i).map((function(e){var t=e.attributes||[];return{term:e.term,attributes:t.map((function(t){return{label:t.labelValue,value:t.value,link:"/".concat(e.term,"/").concat(t.value,"/?map=ft,").concat(t.key),groupValue:e.term,key:t.key}}))}})),s=o.map((function(e){return{label:c.highlightTerm(e.term.toLowerCase(),c.props.inputValue.toLocaleLowerCase()),value:e.term,groupValue:e.term,link:"/".concat(e.term,"?map=ft"),attributes:e.attributes}})),this.setState({suggestionItems:s});case 8:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"updateProducts",value:(a=Object(i.a)(n.a.mark((function e(t){var a,r,i,o,s,c,u,l,p,m,d,h,f,v,g,y,x,E,_,b,k,S;return n.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t,i=this.props,o=i.__unstableProductOrigin,s=i.__unstableProductOriginVtex,c=void 0!==s&&s,u=i.simulationBehavior,l=void 0===u?"default":u,p=i.hideUnavailableItems,m=void 0!==p&&p,d=i.orderBy,h=this.state.queryFromHover,r){e.next=6;break}return this.setState({products:[],totalProducts:0}),e.abrupt("return");case 6:return o&&console.warn("The prop `__unstableProductOrigin` has been deprecated. Use the boolean prop `__unstableProductOriginVtex` instead."),this.setState({isProductsLoading:!0}),e.next=10,te(this.props.runtime.rootPath);case 10:return f=e.sent,v=null!==(a=null==f?void 0:f.map((function(e){return e.value})))&&void 0!==a?a:[],g={showSponsored:!0,sponsoredCount:2,repeatSponsoredProducts:!1,advertisementPlacement:"autocomplete"},e.next=15,this.client.suggestionProducts(r,h?h.key:void 0,h?h.value:void 0,"VTEX"===o||c,l,m,d,this.props.maxSuggestedProducts||3,v,g);case 15:y=e.sent,h||(x=y.data.productSuggestions,E=x.count,_=x.operator,b=x.misspelled,ee(this.props.push,_,b,E,r)),this.setState({isProductsLoading:!1}),k=y.data.productSuggestions,S=k.products.slice(0,this.getProductCount()),this.setState({products:S,totalProducts:k.count});case 21:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"updateTopSearches",value:(t=Object(i.a)(n.a.mark((function e(){var t,a,r,i,o;return n.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.client.topSearches();case 2:t=e.sent,a=t.data.topSearches.searches,r=this.props.maxTopSearches,i=void 0===r?10:r,o=a.slice(0,i).map((function(e,t){return{prefix:m.a.createElement(m.a.Fragment,null,"".concat(t+1),m.a.createElement(h.FormattedMessage,{id:"store/ordinalNumber"})),value:e.term,label:e.term,link:"/".concat(e.term,"?map=ft")}})),this.setState({topSearchedItems:o});case 7:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"updateHistory",value:function(){var e=this.client.searchHistory().slice(0,this.props.maxHistory||5).map((function(e){return{label:(t=e,t.replace(/\$2F/gi,"/")),value:e,link:"/".concat(e,"?map=ft"),icon:m.a.createElement(y.a,null)};var t}));this.setState({history:e})}},{key:"renderSuggestions",value:function(){var e=this,t=!!this.state.suggestionItems&&this.state.suggestionItems.length>0,a=t?m.a.createElement(h.FormattedMessage,{id:"store/suggestions"}):m.a.createElement(h.FormattedMessage,{id:"store/emptySuggestion"});return m.a.createElement(G,{title:a,items:this.state.suggestionItems||[],modifier:"suggestion",showTitle:!t||!this.props.hideTitles,onItemHover:this.handleItemHover,showTitleOnEmpty:0!==this.props.maxSuggestedTerms,onItemClick:function(t,a){Y(e.props.push,e.props.runtime.page,Z.SearchSuggestionClick)(t,a),e.closeModal()},customPage:this.props.customPage,closeModal:function(){return e.closeModal()}})}},{key:"contentWhenQueryIsEmpty",value:function(){var e=this;return m.a.createElement("div",{className:N.a["history-and-top-wrapper"],style:{flexDirection:this.props.historyFirst?"row-reverse":"row"}},!this.props.isMobile||this.props.isMobile&&!this.props.historyFirst||0===this.state.history.length?m.a.createElement(G,{modifier:"top-search",title:m.a.createElement(h.FormattedMessage,{id:"store/topSearches"}),items:this.state.topSearchedItems||[],showTitle:!this.props.hideTitles,onItemClick:function(t,a){Y(e.props.push,e.props.runtime.page,Z.TopSearchClick)(t,a),e.closeModal()},customPage:this.props.customPage,closeModal:function(){return e.closeModal()}}):null,!this.props.isMobile||this.props.isMobile&&this.props.historyFirst?m.a.createElement(G,{modifier:"history",title:m.a.createElement(h.FormattedMessage,{id:"store/history"}),items:this.state.history||[],showTitle:!this.props.hideTitles,onItemClick:function(t,a){Y(e.props.push,e.props.runtime.page,Z.HistoryClick)(t,a),e.closeModal()},customPage:this.props.customPage,closeModal:function(){return e.closeModal()}}):null)}},{key:"contentWhenQueryIsNotEmpty",value:function(){var e=this,t=this.state,a=t.products,r=t.totalProducts,n=t.isProductsLoading,i=this.props,o=i.hideTitles,s=i.push,c=i.runtime,u=i.inputValue,l=u.replace(/\//gi,"$2F");return m.a.createElement(m.a.Fragment,null,this.renderSuggestions(),m.a.createElement(z,{term:l||"",customPage:this.props.customPage,shelfProductCount:this.getProductCount(),title:m.a.createElement(h.FormattedMessage,{id:"store/suggestedProducts",values:{term:u}}),products:a||[],showTitle:!o,totalProducts:r||0,layout:this.getProductLayout(),isLoading:n,onProductClick:function(t,a,r){!function(e,t){return function(a,r,n){return e({page:t,event:"autocomplete",eventType:Z.ProductClick,product:{productId:a,position:r},term:n})}}(s,c.page)(t,a,r),e.closeModal()},onSeeAllClick:function(t){!function(e,t){return function(a){return e({page:t,event:"autocomplete",eventType:Z.SeeAllClick,search:{term:a}})}}(s,c.page)(t),e.closeModal()},HorizontalProductSummary:this.props.HorizontalProductSummary}))}},{key:"renderContent",value:function(){var e=this.props.inputValue.trim();return e&&""!==e?this.contentWhenQueryIsNotEmpty():this.contentWhenQueryIsEmpty()}},{key:"hasContent",value:function(){var e=this.state,t=e.topSearchedItems,a=e.suggestionItems,r=e.history,n=e.products;return t.length>0||a.length>0||r.length>0||n.length>0}},{key:"getProductCount",value:function(){var e=this.props,t=e.customBreakpoints,a=e.isMobile,r=e.maxSuggestedProducts,n=void 0===r?3:r;if(!window||a||!t)return n;var i=window.innerWidth;return t.md&&t.lg&&t.xlg?i>=t.xlg.width?t.xlg.maxSuggestedProducts:i>=t.lg.width?t.lg.maxSuggestedProducts:i>=t.md.width?t.md.maxSuggestedProducts:n:n}},{key:"render",value:function(){var e=this,t=this.props.isOpen&&this.hasContent()?"":N.a["biggy-js-container--hidden"];return m.a.createElement("div",{className:N.a["biggy-autocomplete-wrapper"],style:{width:this.props.autocompleteWidth?"".concat(this.props.autocompleteWidth,"vw"):void 0}},m.a.createElement("section",{ref:this.autocompleteRef,className:"".concat(N.a["biggy-autocomplete"]," ").concat(t," w-100"),style:{flexDirection:this.getProductLayout()===re.Horizontal?"column":"row"}},m.a.createElement(ie,{listName:"autocomplete-result-list"},this.renderContent(),this.props.isMobile?m.a.createElement("button",{onClick:function(){return e.closeModal()},className:N.a["close-btn"]},m.a.createElement(v.a,null)):null)))}}]),l}(m.a.Component),se=Object(L.withPixel)(b()(Object(d.withApollo)((ne=oe,function(e){return m.a.createElement(ne,Object(X.a)({},e,{runtime:Object(T.useRuntime)()}))}))));t.default=se}],[[40,"common"]]]); }], document.currentScript.dataset.index)