1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[243],{60243:(e,l,t)=>{t.r(l),t.d(l,{default:()=>_});var a=t(83095),n=t.n(a);t(18109),t(50412),t(33461),t(23823);var r=t(14232),i=t(18847),c=t.n(i),s=t(84646),o=t(86364),u=t(12552),d=t(99674),p=t(83495),h=t(98290),g=t(37876);function f(e,l){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);l&&(a=a.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),t.push.apply(t,a)}return t}function b(e){for(var l=1;l<arguments.length;l++){var t=null!=arguments[l]?arguments[l]:{};l%2?f(Object(t),!0).forEach(function(l){n()(e,l,t[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):f(Object(t)).forEach(function(l){Object.defineProperty(e,l,Object.getOwnPropertyDescriptor(t,l))})}return e}let m=c()(()=>t.e(6629).then(t.bind(t,76629)),{loadableGenerated:{webpack:()=>[76629]}}),y=c()(()=>t.e(2577).then(t.bind(t,72577)),{loadableGenerated:{webpack:()=>[72577]}}),x=c()(()=>t.e(9178).then(t.bind(t,29178)),{loadableGenerated:{webpack:()=>[29178]}}),v=c()(()=>Promise.resolve().then(t.bind(t,45480)),{loadableGenerated:{webpack:()=>[45480]}}),j=c()(()=>t.e(386).then(t.bind(t,60386)),{loadableGenerated:{webpack:()=>[60386]}}),P=c()(()=>t.e(9509).then(t.bind(t,49509)),{loadableGenerated:{webpack:()=>[49509]}}),w=(0,s.Rx)(e=>{var l,t,a,n,i,c,s,f,w;let{hits:_,state:O,dispatch:q,isNewSearchPage:k=!1,onClickCallback:S}=e,{dtcConstants:C}=(0,p.oO)(),N=0===((null==_?void 0:_.length)||0);null==O||null==(l=O.searchStaticContent)||null==(t=l.mostRecentProducts)||t.map(e=>e.fields),null==O||null==(a=O.searchStaticContent)||null==(n=a.recommendedProducts)||n.map(e=>e.fields),(0,r.useEffect)(()=>{(null==O?void 0:O.showAutocomplete)||(null==O?void 0:O.searchValue)==""||(null==O?void 0:O.searchValue)!=(null==O?void 0:O.queryParm)||(null==q||q(b({type:o.Nm.isSpinning,payload:!1},O)),null==q||q(b({type:o.Nm.hitsResponse,payload:_},O)))},[_]);let A=k&&(!(null==O?void 0:O.filerClicked)||(null==O?void 0:O.filerClicked)==="all"),T=["article","collection","faq","page","need"],E=T.includes(null==O?void 0:O.filerClicked)?null==O?void 0:O.filerClicked:null,{0:V,1:G}=(0,r.useState)({article:[],collection:[],faq:[],page:[],need:[]});(0,r.useEffect)(()=>{if(!A&&!E||!(null==O?void 0:O.queryParm))return void G({article:[],collection:[],faq:[],page:[],need:[]});let e=(0,h.c)(),l=E?[E]:T,t=l.map(e=>({indexName:"crawler_oralb_it_faqpage_prod",params:{query:O.queryParm,hitsPerPage:E?20:4,facetFilters:[`pageType:${e}`]}}));e.search(t).then(e=>{let t={article:[],collection:[],faq:[],page:[],need:[]};l.forEach((l,a)=>{var n;t[l]=(null==(n=e.results[a])?void 0:n.hits)||[]}),G(t)}).catch(()=>{})},[null==O?void 0:O.queryParm,A,E]);let{0:L,1:R}=(0,r.useState)(null);(0,r.useEffect)(()=>{(A||(null==O?void 0:O.filerClicked)==="product")&&(null==O?void 0:O.queryParm)?(0,h.c)().search([{indexName:"crawler_oralb_it_faqpage_prod",params:{query:O.queryParm,hitsPerPage:1,facetFilters:["pageType:product"]}}]).then(e=>{var l,t;R((null==e||null==(l=e.results)||null==(t=l[0])?void 0:t.nbHits)??0)}).catch(()=>{}):R(null)},[null==O?void 0:O.queryParm,A,null==O?void 0:O.filerClicked]);let F=null,D=r.useMemo(()=>{let e={product:[],collection:[],article:[],faq:[],page:[],need:[]};if(Array.isArray(_))for(let l of _)e[l.pageType]&&e[l.pageType].push(l);return e},[_]),I=D.product,Q=D.collection,H=D.article,U=D.faq,$=D.page,B=D.need,M=null!==L?L>0:I.length>0,Y=null==O?void 0:O.filerClicked,Z=e=>!Y||"all"===Y||Y===e;if(N){let e=null==O||null==(i=O.searchStaticContent)||null==(c=i.noResultLabel)?void 0:c.replace("${QUERY}",null==O?void 0:O.searchValue);F=(0,g.jsx)("span",{className:"ob-search-block__no-results-title !m-0 inline-block w-full py-1 text-center font-bold !text-lg !text-search_grey_700 2md:py-2 lg_up:!text-22 custom_xl:!text-3xl",children:(0,u.QZ)(e)})}else F=_&&!k?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(x,{attribute:"pageType",state:O,dispatch:q}),(0,g.jsx)(y,{state:O,dispatch:q}),null==_?void 0:_.map((e,l)=>(0,g.jsx)(m,{hit:e,isNewSearchPage:k},l)),(0,g.jsx)(P,{state:O,dispatch:q})]}):(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(y,{state:O,dispatch:q}),(0,g.jsx)(x,{attribute:"pageType",state:O,dispatch:q,isNewSearchPage:!0}),(null==O?void 0:O.isSpinning)?(0,g.jsx)("span",{className:"ob-search-block__no-results-title !m-0 inline-block w-full py-1 text-center font-bold !text-lg
1!text-search_grey_700 2md:py-2 lg_up:!text-22 custom_xl:!text-3xl",children:(null==C||null==(s=C.ALGOLIA_CONSTANTS)||null==(f=s.SEARCH_CONST)?void 0:f.loading)||"Loading..."}):(0,g.jsxs)(g.Fragment,{children:[Z("product")&&M&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("h5",{className:d.c.searchResultsPageView,children:null==C||null==(w=C.ALGOLIA_CONSTANTS)?void 0:w.PRODUCTS_LABEL}),(0,g.jsx)(v,{listingPage:"",onAddToCart:S,searchQuery:(null==O?void 0:O.queryParm)||"",isNestedInInstantSearch:!0})]}),Z("article")&&(A||"article"===E?V.article:H).length>0&&(0,g.jsx)(j,{hits:A||"article"===E?V.article:H,pageView:"Article"}),Z("collection")&&(A||"collection"===E?V.collection:Q).length>0&&(0,g.jsx)(j,{hits:A||"collection"===E?V.collection:Q,pageView:"Collection"}),Z("faq")&&(A||"faq"===E?V.faq:U).length>0&&(0,g.jsx)(j,{hits:A||"faq"===E?V.faq:U,pageView:"FAQ"}),Z("page")&&(A||"page"===E?V.page:$).length>0&&(0,g.jsx)(j,{hits:A||"page"===E?V.page:$,pageView:"Page"}),Z("need")&&(A||"need"===E?V.need:B).length>0&&(0,g.jsx)(j,{hits:A||"need"===E?V.need:B,pageView:"Need"}),!M&&(0,g.jsx)(P,{state:O,dispatch:q,isNewSearchPage:k})]})]});return F}),_=r.memo(w)}}]);
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.