PageSourceSearch

https://www.baratza.com/account/_next/static/chunks/2441.1e41a26a39030b8c.js

js baratza.com collected 2026-10-02 04:22:26 UTC 15,881 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2441],{42441:(e,t,r)=>{r.r(t),r.d(t,{default:()=>eu});var i=r(37876),n=r(14232),s=r(49528),a=r(3964),l=r(31078),o=r(95062),c=r.n(o),u=r(39271);function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function p(){return(p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e}).apply(this,arguments)}function h(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,x(i.key),i)}}function f(e,t){return(f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function g(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function y(e,t,r){return(t=x(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function x(e){var t=function(e,t){if("object"!==d(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!==d(i))return i;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===d(t)?t:String(t)}function b(e){return{targetedIndex:e.indexId}}var v=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");a.prototype=Object.create(e&&e.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),e&&f(a,e);var t,r,i,s=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,r=m(a);return e=t?Reflect.construct(r,arguments,m(this).constructor):r.apply(this,arguments),function(e,t){if(t&&("object"===d(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return g(e)}(this,e)});function a(e){var t;if(!(this instanceof a))throw TypeError("Cannot call a class as a function");return y(g(t=s.call(this,e)),"state",{indexContext:b(t.props)}),y(g(t),"unregisterWidget",void 0),t.props.contextValue.onSearchParameters(t.getSearchParameters.bind(g(t)),{ais:t.props.contextValue,multiIndexContext:t.state.indexContext},t.props,void 0,a.displayName),t}return r=[{key:"componentDidMount",value:function(){this.unregisterWidget=this.props.contextValue.widgetsManager.registerWidget(this)}},{key:"componentDidUpdate",value:function(e){this.props.indexName!==e.indexName&&this.props.contextValue.widgetsManager.update()}},{key:"componentWillUnmount",value:function(){"function"==typeof this.unregisterWidget&&this.unregisterWidget()}},{key:"getSearchParameters",value:function(e,t){return e.setIndex(this.props?this.props.indexName:t.indexName)}},{key:"render",value:function(){return 0===n.Children.count(this.props.children)?null:n.createElement(u.y5,{value:this.state.indexContext},this.props.children)}}],i=[{key:"getDerivedStateFromProps",value:function(e){return{indexContext:b(e)}}}],r&&h(a.prototype,r),i&&h(a,i),Object.defineProperty(a,"prototype",{writable:!1}),a}(n.Component);y(v,"propTypes",{indexName:c().string.isRequired,indexId:c().string.isRequired,children:c().node}),y(v,"displayName","AlgoliaIndex"),y(v,"$$type","ais.index"),y(v,"$$widgetType","ais.index");var j=function(e){var t=e.indexName;return n.createElement(u.Cx,null,function(r){return n.createElement(v,p({contextValue:r,indexId:t},e))})};j.propTypes={indexName:c().string.isRequired,indexId:c().string};var C=r(7135),P=r(89099),N=r(76757),w=r(25753),S=r(63645),I=r(46674),O=r(44936),E=r(31923),k=r(6
17069),A=r(80537);let R=(0,E.A)({displayName:"AlgoliaHits",$$type:"ais.hits",getProvidedProps:function(e,t,r){var i=(0,k.h1)(r,{ais:e.contextValue,multiIndexContext:e.indexContextValue});if(!i)return{hits:[]};var n=(0,A.Zp)(i.hits,i.hitsPerPage,i.page);return{hits:(0,A.PD)(n,i.queryID)}},getSearchParameters:function(e){return e}});var _=r(15039),q=r.n(_),T=(0,r(59876).p)("Hits"),B=function(e){return n.createElement("div",{style:{borderBottom:"1px solid #bbb",paddingBottom:"5px",marginBottom:"5px",wordBreak:"break-all"}},JSON.stringify(e).slice(0,100),"...")},D=function(e){var t=e.hits,r=e.className,i=e.hitComponent,s=void 0===i?B:i;return n.createElement("div",{className:q()(T(""),void 0===r?"":r)},n.createElement("ul",{className:T("list")},t.map(function(e){return n.createElement("li",{className:T("item"),key:e.objectID},n.createElement(s,{hit:e}))})))},$=c().shape({objectID:c().oneOfType([c().string,c().number]).isRequired});D.propTypes={hits:c().arrayOf($.isRequired).isRequired,className:c().string,hitComponent:c().any};let H=R(D,{$$widgetType:"ais.hits"});var M=r(92568),V=r(8799),F=r(97798),U=r(36538),W=r(20717),z=r(68843),L=r(19754),G=r(11741),J=r(70380),Q=r(45856);let Y=(e,t)=>r=>{r.preventDefault();let i=r.currentTarget.id,n=t[i];if(!n)return void console.warn("[FilterPills] No label mapping found for pill ID: ".concat(i));window.dispatchEvent(new CustomEvent("toggleFilterSidenav")),setTimeout(()=>{window.dispatchEvent(new CustomEvent("toggleMenuComp",{detail:{label:e(n)}}))},250)};var K=r(8109);let X="gs-filters.product-category",Z="gs-filters.sort-by",ee=e=>{var t;let{query:r="",globalConfig:s,aemData:o,hitCount:c,primarySearchIndex:u,onHandleNbHits:d=()=>void 0}=e,{algoliaAemConfig:p}=o,h=(0,V.l)().width<F.eV,{t:f}=(0,C.Bd)(),{indexName:g,showMoreCountDesktop:m,showMoreCountMobile:y}=u,{locale:x="en-US",aemLocale:b,currencySymbol:v="$",currencyCode:j="USD",shopByColour:P="false",hidePrice:N=!1}=s,S=x.startsWith("zh")?b:x,O=(0,J.LP)(S),E=(0,Q.a)(s),[k,A]=(0,n.use
1State)(p),[R,_]=(0,n.useState)({hitsPerPage:p.length,enableABTest:!1,distinct:null!=(t=p.distinct)?t:0}),[q,T]=(0,n.useState)(0),B=(0,n.useCallback)(()=>{var e;let t=null!=(e=h?y:m)?e:12;A(e=>({...e,length:Math.min(e.length+t,1e3)})),_(e=>({...e,hitsPerPage:Math.min(e.hitsPerPage+t,1e3)}))},[h,y,m]),D=Y(f,{primaryCategory:X,allFilters:Z,sortBy:Z});return(0,i.jsxs)(a.A,{indexName:g,searchClient:E,children:[(0,i.jsx)(l.A,{...R,ruleContexts:["noLegacy"],hitsPerPage:k.length,query:r}),(0,i.jsxs)(L.WQ,{t:f,hitCount:null!=c?c:void 0,children:[!N&&(0,i.jsx)(L.Ph,{label:f(Z),t:f,defaultRefinement:g,sortFacetValuesBy:"",items:[{value:"".concat(g),label:f("gs-filters.sort-relevance")},{value:"".concat(g,"_price_asc"),label:f("gs-filters.sort-price-asc")},{value:"".concat(g,"_price_desc"),label:f("gs-filters.sort-price-desc")}],options:{type:"radio"}}),(0,i.jsx)(L.K1,{label:f(X),t:f,facetOrdering:!0,limit:100,transformItems:z.l2,attributes:["hierarchicalCategories_".concat(O,".lvl0"),"hierarchicalCategories_".concat(O,".lvl1"),"hierarchicalCategories_".concat(O,".lvl2")]}),(0,i.jsx)(L.zI,{label:f("gs-filters.algolia.itemGroupID"),attribute:"itemGroupID",t:f,facetOrdering:!0,limit:100,transformItems:(0,z.So)(f),operator:"or"}),"true"===P&&(0,i.jsx)(L.zI,{label:f("gs-filters.algolia.color_".concat(O)),attribute:"color_".concat(O),t:f,facetOrdering:!0,limit:100,operator:"or",transformItems:z.l2}),!N&&(0,i.jsx)(L.CQ,{label:f("gs-filters.algolia.sortPrice"),attribute:"sortPrice",t:f,options:{locale:x,currencySymbol:v,currencyCode:j}})]}),(0,i.jsx)(w.b,{hide:!0,handleNbHits:function(e){d(e)},handleRenderedHits:T}),!!c&&(0,i.jsxs)("div",{children:[(0,i.jsxs)("div",{className:"gs-filter-tabs",children:[(0,i.jsx)(U.a,{id:"allFilters",label:f("gs-filters.all-filters"),icon:(0,i.jsx)(W.w,{}),onClick:D}),(0,i.jsxs)("div",{className:"gs-filter-swipe",children:[(0,i.jsx)(U.a,{id:"primaryCategory",label:f(X),icon:"+",onClick:D}),(0,i.jsx)(L.Ue,{attribute:"itemGroupID",transformItems:(0,z.So)(f),classnames:""})]}),!N&&(0,i.jsx)(U.a,{id:"sortBy",label:f(Z),icon:(0,i.jsx)(W.g,{}),onClick:D})]}),(0,i.jsxs)("div",{className:"gs-filter-refinements",children:[(0,i.jsx)(L.tJ,{transformItems:z.uT,t:f,options:{i18nMap:{...z.Ny,hierarchicalCategories:{key:"gs-filters.algolia.product-hierarchical",priority:0}},locale:x,currencySymbol:v,currencyCode:j}}),(0,i.jsx)(L.X$,{t:f,canRefine:!0})]})]}),null!==c&&0===c&&(0,i.jsx)(G.A,{type:"primary",locale:x,indexName:g}),(0,i.jsx)("div",{className:"gs-result-product-grid",children:(0,i.jsx)(H,{hitComponent:et(s)})}),!!c&&(0,i.jsx)(I.EY,{tag:"p",type:"p3",className:"gs-result-text",children:f("gs-filters.showing-results-of",{count:q,total:c})}),!!c&&q>=k.length&&q<c&&(0,i.jsx)("div",{className:"gs-result-pagination",children:(0,i.jsx)(M.$,{variant:"primaryOutline",size:"lg",onClick:B,children:f("gs-show-more","Show More")})})]})},et=e=>t=>{let{hit:r}=t;return(0,i.jsx)(K.f,{hit:r,locale:e.locale,aemLocale:e.aemLocale,hidePrice:e.hidePrice,region:e.region,language:e.language})};var er=r(50134);let ei="gs-filters.inspo-category",en="gs-filters.sort-by",es=e=>{var t;let{query:r="",globalConfig:s,hitCount:o,aemData:c,onHandleNbHits:u=()=>void 0,secondarySearchIndex:d}=e,{algoliaAemConfig:p}=c,{t:h}=(0,C.Bd)(),f=(0,V.l)().width<F.eV,{indexName:g,showMoreCountDesktop:m,showMoreCountMobile:y}=d,{locale:x="en-US",currencySymbol:b="$",currencyCode:v="USD"}=s,j=(0,Q.a)(s),[P,N]=(0,n.useState)(p),[S,O]=(0,n.useState)({hitsPerPage:p.length,enableABTest:!1,distinct:null!=(t=d.distinct)?t:0}),[E,k]=(0,n.useState)(0),A=(0,n.useCallback)(()=>{var e;let t=null!=(e=f?y:m)?e:12;N(e=>({...e,length:Math.min(e.length+t,1e3)})),O(e=>({...e,hitsPerPage:Math.min(e.hitsPerPage+t,1e3)}))},[f,y,m]),R=Y(h,{secondaryCategory:ei,allFilters:en,sortBy:en});return(0,i.jsxs)(a.A,{indexName:g,searchClient:j,children:[(0,i.jsx)(l.A,{...S,ruleContexts:["noLegacy"],hitsPerPage:P.length,query:r}),(0,i.jsxs)(L.WQ,{t:h,hitCount:null!=o?o:void 0,children:[(0,i.jsx)(L.Ph,{label:h(en),t:h,defaultRefinement:g,sortFacetValuesBy:"",items:[{value:g,label:h("gs-filters.sort-relevance")},{value:"Inspiration_".concat((0,J.LP)(x),"_lastmodified_desc"),label:h("gs-filters.sort-lastmodified-desc")}],options:{type:"radio"}}),(0,i.jsx)(L.K1,{label:h(ei),t:h,facetOrdering:!0,limit:100,transformItems:z.l2,attributes:["hierarchicalCategories.lvl0","hierarchicalCategories.lvl1","hierarchicalCategories.lvl2"]}),(0,i.jsx)(L.zI,{label:h("gs-filters.inspo-type"),attribute:"type",t:h,facetOrdering:!0,limit:100,transformItems:(0,z.ci)(h),operator:"or"})]}),(0,i.jsx)(w.b,{hide:!0,handleNbHits:function(e){u(e)},handleRenderedHits:k}),!!o&&(0,i.jsxs)("div",{children:[(0,i.jsxs)("div",{className:"gs-filter-tabs",children:[(0,i.jsx)(U.a,{id:"allFilters",label:h("gs-filters.all-filters"),icon:(0,i.jsx)(W.w,{}),onClick:R}),(0,i.jsxs)("div",{className:"gs-filter-swipe",children:[(0,i.jsx)(U.a,{id:"secondaryCategory",label:h(ei),icon:"+",onClick:R}),(0,i.jsx)(L.Ue,{attribute:"type",transformItems:(0,z.ci)(h),classnames:""})]}),(0,i.jsx)(U.a,{id:"sortBy",label:h(en),icon:(0,i.jsx)(W.g,{}),onClick:R})]}),(0,i.jsxs)("div",{className:"gs-filter-refinements",children:[(0,i.jsx)(L.tJ,{transformItems:z.uT,t:h,options:{i18nMap:{...z.Ny,hierarchicalCategories:{key:"gs-filters.algolia.inspo-hierarchical",priority:0}},locale:x,currencySymbol:b,currencyCode:v}}
1),(0,i.jsx)(L.X$,{canRefine:!0})]})]}),null!==o&&0===o&&(0,i.jsx)(G.A,{type:"secondary",locale:x,indexName:g}),(0,i.jsx)("div",{className:"gs-result-inspo-grid",children:(0,i.jsx)(H,{hitComponent:ea(s,h)})}),!!o&&(0,i.jsx)(I.EY,{tag:"p",type:"p3",className:"gs-result-text",children:h("gs-filters.showing-results-of",{count:E,total:o})}),!!o&&E>=P.length&&E<o&&(0,i.jsx)("div",{className:"gs-result-pagination",children:(0,i.jsx)(M.$,{variant:"primaryOutline",size:"lg",onClick:A,children:h("gs-show-more","Show More")})})]})},ea=(e,t)=>r=>{let{hit:n}=r,s=(0,z.IC)(n,(null==e?void 0:e.locale)||"",t);return(0,i.jsx)(er.s,{...s,variant:"SearchResult"})};var el=r(59874),eo=r(99602);let ec=(0,s.A)(e=>(((e,t,r)=>{let i=(0,n.useRef)(!1);(0,n.useEffect)(()=>{t||r||i.current||!e||(i.current=!0,function(e){var t;let r=[],i=[];e.forEach(e=>{(null==e?void 0:e.count)?r.push((null==e?void 0:e.section)||""):i.push((null==e?void 0:e.section)||"")});let n={screen:"Result",searchString:(null==(t=e.find(e=>e.query))?void 0:t.query)||"",matchSections:r,noMatchSections:i,counts:e};eo.Ay.track("GS RESULTS",{searchResult:n})}(Object.keys(e).map(t=>{var r,i;return{section:String(t).startsWith("Inspiration")?"Inspiration":"Products & Accessories",count:(null==(r=e[t])?void 0:r.nbHits)||0,query:(null==(i=e[t])?void 0:i.query)||""}})))},[t,r,e]),(0,n.useEffect)(()=>{t&&(i.current=!1)},[t])})(e.allSearchResults,e.searching,e.isSearchStalled),(0,i.jsx)(i.Fragment,{}))),eu=(0,O.Ud)(e=>{let{algoliaAemConfig:t,searchResultSuggestedData:r}=e,{globalConfig:s}=(0,el.h5)(),o=(0,P.useRouter)(),{t:c}=(0,C.Bd)(),u=(0,Q.a)(s);(e=>{(0,n.useEffect)(()=>{if(!e)return void console.warn("GlobalConfig is missing - BazaarVoice ratings will not display");let{bvClientname:t,bvSiteid:r,bvEnvironment:i,bvLocale:n}=e;if(!t||!r||!i||!n)return void console.warn("BazaarVoice config is incomplete in globalConfig:",{bvClientname:t,bvSiteid:r,bvEnvironment:i,bvLocale:n});(()=>{if(document.querySelector("#bv-script"))return;let e=document.createElement("script");e.setAttribute("async",""),e.setAttribute("id","bv-script"),e.setAttribute("src","https://apps.bazaarvoice.com/deployments/".concat(t,"/").concat(r,"/").concat(i,"/").concat(n,"/bv.js")),document.body.appendChild(e)})()},[e])})(s);let{primarySearchIndex:d,secondarySearchIndex:p}=t,{query:h,q:f}=(0,S.jr)(),{activeTabIndex:g,setActiveTabIndex:m}=(0,n.useContext)(O.wP),y=!d.indexName||d.hide,x=!p.indexName||p.hide,[b,v]=(0,n.useState)(y?0:null),[E,k]=(0,n.useState)(x?0:null);function A(e){v(e)}function R(e){k(e)}let _=(0,n.useMemo)(()=>[{label:"".concat((null==d?void 0:d.title)||""," (").concat(b||0,")"),Component:(0,i.jsx)(ee,{primarySearchIndex:d,query:h,globalConfig:s,aemData:e,hitCount:b,onHandleNbHits:A}),showTab:!y},{label:"".concat(p.title||""," (").concat(E||0,")"),Component:(0,i.jsx)(es,{secondarySearchIndex:p,query:h,globalConfig:s,aemData:e,hitCount:E,onHandleNbHits:R}),showTab:!x}].filter(e=>!!e.showTab),[b,E,d,p,h,s,t,r]);function q(e){let t=N.parse(e);return Number.parseInt(String(Array.isArray(null==t?void 0:t.tab)?t.tab[0]:null==t?void 0:t.tab)||"0",10)}let T=b||E;return((0,n.useEffect)(()=>{let e=q(o.asPath.split("?")[1]||"")||0;g!==e&&_[e]?m(e):d.indexName||m(1)},[o.asPath]),(0,n.useEffect)(()=>{1===(q(o.asPath.split("?")[1]||"")||0)&&E&&E>0||0===b&&E&&E>0?m(1):m(0)},[b,E]),y&&x)?(0,i.jsx)(i.Fragment,{}):(0,i.jsxs)(a.A,{indexName:d.indexName||p.indexName,searchClient:u,children:[(0,i.jsx)(l.A,{ruleContexts:["noLegacy"],hitsPerPage:t.length,distinct:t.distinct,query:h}),(0,i.jsx)(w.b,{hide:!0,handleNbHits:A}),!x&&(0,i.jsxs)(j,{indexName:p.indexName,children:[(0,i.jsx)(l.A,{ruleContexts:["noLegacy"],hitsPerPage:t.length,distinct:t.distinct,query:h}),(0,i.jsx)(w.b,{hide:!0,handleNbHits:R})]}),(0,i.jsx)(ec,{}),(0,i.jsxs)("div",{className:"gs-result",children:[(0,i.jsxs)(I.EY,{tag:"h1",type:"h4",className:"gs-result-title",children:[!!T&&c("gs-filters.showing-results-for",{title:f}),null!==T&&!T&&c("gs-filters.showing-empty-results-for",{title:f})]}),(0,i.jsx)(O.tU,{tabItems:_,options:{onActiveStateChanged:function(e){if(_[e]){let t={...N.parse(o.asPath.split("?")[1]||"",{sort:!1}),tab:e},r=o.asPath.split("?")[0].split("#")[0];o.push({pathname:r,query:t},void 0,{shallow:!0})}}}})]})]})})}}]);

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.