1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3682],{50459:function(e){var n={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"CatalogItemProduct"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CatalogItemProduct"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"_id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"wishlistedId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lovedItemId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"product"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"_id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"productId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"primaryImage"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"_id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"URLs"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"medium"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"large"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"small"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"thumbnail"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"richDescription"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"pricing"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"compareAtPrice"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"displayAmount"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"currency"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"code"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"displayPrice"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"minPrice"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"maxPrice"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"variants"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"_id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"variantId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"primaryImage"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"_id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"URLs"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"medium"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"large"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"small"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"thumbnail"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"pricing"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"compareAtPrice"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"displayAmount"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"price"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"currency"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"code"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"displayPrice"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"minPrice"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"maxPrice"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:860}};n.loc.source={body:"fragment CatalogItemProduct on CatalogItemProduct {\n _id\n wishlistedId\n lovedItemId\n product {\n _id\n productId\n primaryImage {\n _id\n URLs {\n medium\n large\n small\n thumbnail\n }\n }\n slug\n title\n description\n richDescription\n vendor\n pricing {\n compareAtPrice {\n displayAmount\n }\n currency {\n code\n }\n displayPrice\n minPrice\n maxPrice\n }\n variants {\n _id\n variantId\n title\n primaryImage {\n _id\n URLs {\n medium\n large\n small\n thumbnail\n }\n }\n pricing {\n compareAtPrice {\n displayAmount\n }\n price\n currency {\n code\n }\n displayPrice\n minPrice\n maxPrice\n }\n }\n }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};e.exports=n},67776:function(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"globalSearchQuery"}
1,variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"shopIds"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchTerm"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"catalogConnection"}},type:{kind:"NamedType",name:{kind:"Name",value:"GlobalSearchConnectionInput"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"wisherConnection"}},type:{kind:"NamedType",name:{kind:"Name",value:"GlobalSearchConnectionInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"globalSearch"},arguments:[{kind:"Argument",name:{kind:"Name",value:"shopIds"},value:{kind:"Variable",name:{kind:"Name",value:"shopIds"}}},{kind:"Argument",name:{kind:"Name",value:"searchTerm"},value:{kind:"Variable",name:{kind:"Name",value:"searchTerm"}}},{kind:"Argument",name:{kind:"Name",value:"catalogConnection"},value:{kind:"Variable",name:{kind:"Name",value:"catalogConnection"}}},{kind:"Argument",name:{kind:"Name",value:"wisherConnection"},value:{kind:"Variable",name:{kind:"Name",value:"wisherConnection"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"wisherResults"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"pageInfo"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"endCursor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"startCursor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hasNextPage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hasPreviousPage"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"edges"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"cursor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"node"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"_id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"username"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"profilePicture"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"profileUrl"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"catalogResults"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"pageInfo"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"endCursor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"startCursor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hasNextPage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hasPreviousPage"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"edges"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"cursor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"node"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"_id"},arguments:[],directives:[]},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CatalogItemProduct"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"_id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"product"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"_id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"shop"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currency"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"code"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"pricing"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"compareAtPrice"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"displayAmount"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"currency"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"code"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"displayPrice"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"minPrice"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"maxPrice"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"primaryImage"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"URLs"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"thumbnail"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"small"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"medium"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"large"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"variants"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"_id"},arguments:[],directives:[]}]}}]}}]}}]}}]}}]}}]}}]}}],loc:{start:0,end:1690}};n.loc.source={body:"query globalSearchQuery(\n $shopIds: [ID]!\n $searchTerm: String\n $catalogConnection: GlobalSearchConnectionInput\n $wisherConnection: GlobalSearchConnectionInput\n) {\n globalSearch(\n shopIds: $shopIds\n searchTerm: $searchTerm\n catalogConnection: $catalogConnection\n wisherConnection: $wisherConnection\n ) {\n wisherResults {\n totalCount\n pageInfo {\n endCursor\n startCursor\n hasNextPage\n hasPreviousPage\n }\n edges {\n cursor\n node {\n _id\n username\n name\n profilePicture\n profileUrl\n }\n }\n }\n catalogResults {\n totalCount\n pageInfo {\n endCursor\n startCursor\n hasNextPage\n hasPreviousPage\n }\n edges {\n cursor\n node {\n _id\n ... on CatalogItemProduct {\n _id\n product {\n _id\n title\n slug\n description\n vendor\n shop {\n currency {\n code\n }\n }\n pricing {\n compareAtPrice {\n displayAmount\n }\n currency {\n code\n }\n displayPrice\n minPrice\n maxPrice\n }\n primaryImage {\n URLs {\n thumbnail\n small\n medium\n large\n }\n }\n variants {\n _id\n }\n }\n }\n }\n }\n }\n }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function i(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);
1else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,n)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,n)})),e.definitions&&e.definitions.forEach((function(e){i(e,n)}))}var t={};function a(e,n){for(var i=0;i<e.definitions.length;i++){var t=e.definitions[i];if(t.name&&t.name.value==n)return t}}n.definitions.forEach((function(e){if(e.name){var n=new Set;i(e,n),t[e.name.value]=n}})),e.exports=n,e.exports.globalSearchQuery=function(e,n){var i={kind:e.kind,definitions:[a(e,n)]};e.hasOwnProperty("loc")&&(i.loc=e.loc);var r=t[n]||new Set,d=new Set,l=new Set;for(r.forEach((function(e){l.add(e)}));l.size>0;){var s=l;l=new Set,s.forEach((function(e){d.has(e)||(d.add(e),(t[e]||new Set).forEach((function(e){l.add(e)})))}))}return d.forEach((function(n){var t=a(e,n);t&&i.definitions.push(t)})),i}(n,"globalSearchQuery")},11553:function(e,n,i){"use strict";i.d(n,{Z:function(){return Q}});var t=i(42982),a=i(70885),r=i(41749),d=i(55517),l=i(22318),s=i(41120),o=i(4942),c=i(85639),u=i(96837),m=i(78921),v=i(96588),k=i(48005),g=i(46829),p=i(11147),h=i(67294);function f(){return(0,h.useContext)(p.i)}var N=i(67776),S=i.n(N);function F(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.push.apply(i,t)}return i}function y(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?F(Object(i),!0).forEach((function(n){(0,o.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):F(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}var b=function(e){var n=e.queryName,i=e.segment,a=e.connection,r=e.data,d=e.limit,l=e.fetchMore;return function(){var e,s,c,u=null===r||void 0===r||null===(e=r[n])||void 0===e||null===(s=e[i])||void 0===s||null===(c=s.pageInfo)||void 0===c?void 0:c.endCursor;u&&l({variables:(0,o.Z)({},a,{first:d,after:u,last:null,before:null}),updateQuery:function(e,a){var r,d=a.fetchMoreResult,l=null===d||void 0===d||null===(r=d[n])||void 0===r?void 0:r[i];if(l.edges.length){var s,c,u=[].concat((0,t.Z)(null===e||void 0===e||null===(s=e[n])||void 0===s||null===(c=s[i])||void 0===c?void 0:c.edges),(0,t.Z)(l.edges));return y(y({},e),{},(0,o.Z)({},n,y(y({},null===e||void 0===e?void 0:e[n]),{},(0,o.Z)({},i,y(y({},l),{},{edges:(0,t.Z)(new Set(u))})))))}return e}})}};function x(){var e,n,i=f().searchTerm,t=(0,g.useQuery)(S(),{skip:!i,variables:{catalogConnection:{first:5},wisherConnection:{first:5},shopIds:["cmVhY3Rpb24vc2hvcDpKOEJocTN1VHRkZ3daeDNyeg=="],searchTerm:i}}),a=t.loading,r=t.data,d=t.fetchMore;return[null===r||void 0===r||null===(e=r.globalSearch)||void 0===e?void 0:e.wisherResults,null===r||void 0===r||null===(n=r.globalSearch)||void 0===n?void 0:n.catalogResults,a,b({queryName:"globalSearch",segment:"wisherResults",connection:"wisherConnection",data:r,limit:5,fetchMore:d}),b({queryName:"globalSearch",segment:"catalogResults",connection:"catalogConnection",data:r,limit:5,fetchMore:d})]}var j=i(64496),P=i(69497),C=i(11163),I=i(37763),w=i.n(I),O=i(85893);function Z(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.push.apply(i,t)}return i}function T(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?Z(Object(i),!0).forEach((function(n){(0,o.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Z(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}var R=(0,s.Z)((function(e){return{textField:{backgroundColor:"#FFFFFF",minWidth:250,margin:0},notchedOutline:{borderRadius:0},textInput:{"&$focused $notchedOutline":{borderColor:"#e6c46e"}},inputRoot:{paddingTop:"0 !important",paddingBottom:"0 !important"},popupIndicatorOpen:{transform:"none",color:"#e6c46e"},focused:{},groupLabel:{backgroundColor:e.palette.background.paper,top:-8},groupUl:{padding:0},itemTitle:{wordBreak:"break-all"},menuItem:{whiteSpace:"normal"}}}));function D(e){var n,i,t,a,r=e.option,d=e.selected,s=e.searchTerm,o=e.clearSearch,u=R(),m=r.product,v=r.title,g=r.type,p=r.profilePicture,h="/images/placeholder.gif";"celebrity"===g&&p&&(h=p),"product"===g&&null!==m&&void 0!==m&&null!==(n=m.primaryImage)&&void 0!==n&&null!==(i=n.URLs)&&void 0!==i&&i.thumbnail&&(h=null===m||void 0===m||null===(t=m.primaryImage)||void 0===t||null===(a=t.URLs)||void 0===a?void 0:a.thumbnail);var f=s&&s.split(" ")||[],N="celebrity"===g?"/[profileUrl]":"/productDetail/[slugOrId]",S="celebrity"===g?"/".concat(null===r||void 0===r?void 0:r.profileUrl):"/productDetail/".concat(m.slug);return(0,O.jsx)(k.Z,{href:N,as:S,onClick:o,children:(0,O.jsxs)(c.Z,{classes:{root:u.menuItem},selected:d,color:"inherit",component:"div",onClick:function(){},onKeyDown:function(){},style:{fontWeight:d?500:400},children:[(0,O.jsx)("img",{src:h,alt:"",style:{width:40,marginRight:16}}),(0,O.jsx)(l.Z,{color:"inherit",variant:"body1",className:u.itemTitle,children:(0,O.jsx)(w(),{searchWords:f,textToHighlight:v,autoEscape:!0,highlightStyle:{fontWeight:600,backgroundColor:"transparent",color:"#e6c46e",padding:0,fontSize:"inherit"}})})]})})}function L(e){var n=e.isLoading,i=e.searchTerm,t=(0,j.Z)("search").t;return n?null:i&&i.length?(0,O.jsxs)("span",{children:[t("noResults")," ",(0,O.jsx)("strong",{children:i})]}):(0,O.jsx)("span",{children:t("enterSearchTerm")})}function _(e){var n=e.group,i=e.children,t=e.wisherResultCount,a=void 0===t?0:t,r=e.catalogResultCount,d=void 0===r?0:r,l=(0,j.Z)("search").t,s=R(),o=(0,h.useMemo)((function(){return"celebrity"===n?"".concat(l("found")," ").concat(a," ").concat(l("celebrities")):"product"===n?"".concat(l("found")," ").concat(d," ").concat(l("products")):"".concat(l("foundIn")," ").concat(n)}),[n,a,d,l]);return(0,O.jsxs)("div",{children:[(0,O.jsxs)(u.Z,{className:s.groupLabel,component:"div",children:[o,":"]}),(0,O.jsx)("div",{children:i})]})}var V=function(e){var n=e.showResults,i=void 0===n||n,r=e.isMobile,d=void 0!==r&&r,l=R(),s=(0,j.Z)("search").t,o=(0,h.useState)(!1),c=o[0],u=o[1],k=x(),g=(0,a.Z)(k,3),p=g[0],N=g[1],S=g[2],F=f(),y=F.searchTermInput,b=F.setSearchTermInput,I=F.searchTerm,w=(0,h.useCallback)((function(){b()}),[b]),Z=(0,h.useMemo)((function(){var e,n,i,a,r=null!==(e=null===p||void 0===p||null===(n=p.edges)||void 0===n?void 0:n.slice(0,5).map((function(e){return e.no
1de})))&&void 0!==e?e:[],d=null!==(i=null===N||void 0===N||null===(a=N.edges)||void 0===a?void 0:a.slice(0,5).map((function(e){return e.node})))&&void 0!==i?i:[];return[].concat((0,t.Z)(r.map((function(e){var n;return T(T({},e),{},{title:null!==(n=null===e||void 0===e?void 0:e.username)&&void 0!==n?n:"",type:"celebrity"})}))),(0,t.Z)(d.map((function(e){var n,i;return T(T({},e),{},{title:null!==(n=null===e||void 0===e||null===(i=e.product)||void 0===i?void 0:i.title)&&void 0!==n?n:"",type:"product"})}))))}),[p,N]);return(0,O.jsx)(v.ZP,{filterOptions:function(e){return e},popupIcon:(0,O.jsx)(P.Z,{}),noOptionsText:(0,O.jsx)(L,{isLoading:S,searchTerm:I}),id:"autosuggest-search",classes:{inputRoot:l.inputRoot,popupIndicatorOpen:l.popupIndicatorOpen},open:c&&Z.length>0,onOpen:function(){i&&u(!0)},onClose:function(){u(!1)},clearOnBlur:!1,groupBy:function(e){return e.type},getOptionLabel:function(e){return e.title},inputValue:y,onInputChange:function(e,n){e&&b(n)},renderGroup:function(e){var n,i;return(0,O.jsx)(_,T(T({},e),{},{wisherResultCount:null!==(n=null===p||void 0===p?void 0:p.totalCount)&&void 0!==n?n:0,catalogResultCount:null!==(i=null===N||void 0===N?void 0:N.totalCount)&&void 0!==i?i:0}))},renderOption:function(e,n){var i=n.selected;return(0,O.jsx)(D,{option:e,selected:i,searchTerm:I,clearSearch:w})},onChange:function(){},options:Z,loading:S,renderInput:function(e){return(0,O.jsx)(m.Z,T(T({},e),{},{fullWidth:!0,classes:{root:l.textField}
1,placeholder:d?"LuxyList":s("searchPlaceholder"),margin:"normal",variant:"outlined",autoFocus:!0,InputProps:T(T({},e.InputProps),{},{type:"search",classes:{root:l.textInput,focused:l.focused,notchedOutline:l.notchedOutline}}),onKeyPress:function(e){"Enter"===e.key&&Z.length>0&&(C.default.push("/search/[searchTerm]","/search/".concat(e.target.value)),u(!1))}}))}})},A=i(41664);function E(e){var n=e.user;return(0,O.jsxs)("div",{children:[(0,O.jsx)(A.default,{href:"/[profileUrl]",as:"/".concat(null===n||void 0===n?void 0:n.profileUrl),children:(0,O.jsx)("a",{children:(0,O.jsxs)("div",{children:[(null===n||void 0===n?void 0:n.profilePicture)&&(0,O.jsx)("img",{src:n.profilePicture,alt:""}),!n.profilePicture&&(0,O.jsx)("img",{src:"/images/avatar_placeholder.jpg",alt:""})]})})}),(0,O.jsx)("p",{children:n.username})]})}var M=i(42267),U=i(75525),G=(0,s.Z)((function(e){return{centeredSearchContainer:{justifyContent:"center",alignItems:"center",margin:e.spacing(4,"auto"),minWidth:"50%"},resultsRow:{margin:e.spacing(4,0)},scrollContainer:{maxHeight:600,overflowY:"auto"},innerGrid:{display:"flex",flexWrap:"wrap"}}}));function $(e){var n=e.wishers,i=e.isLoading,t=e.onLoadMore,a=e.hasNextPage,d=e.isSingleView,l=G(),s=(0,U.Z)({loading:i,hasNextPage:a,onLoadMore:t,scrollContainer:d?"window":"parent"});return(0,O.jsx)("section",{children:(0,O.jsx)("div",{className:d?"":l.scrollC
1ontainer,children:(0,O.jsx)(r.Z,{container:!0,ref:s,spacing:2,className:l.innerGrid,children:n.map((function(e,n){var i;return(0,O.jsx)(E,{user:e},null!==(i=null===e||void 0===e?void 0:e._id)&&void 0!==i?i:n)}))})})})}function B(e){var n=e.catalogItems,i=e.isLoading,t=e.onLoadMore,a=e.hasNextPage,r=e.isSingleView,d=G(),l=(0,U.Z)({loading:i,hasNextPage:a,onLoadMore:t,scrollContainer:r?"window":"parent"});return(0,O.jsx)("section",{children:(0,O.jsx)("div",{className:r?"":d.scrollContainer,children:(0,O.jsx)("div",{ref:l,className:d.innerGrid,children:n.map((function(e,n){var i;return(0,O.jsx)(M.Z,{isCatalog:!0,item:{catalogItem:e}},null!==(i=null===e||void 0===e?void 0:e._id)&&void 0!==i?i:n)}))})})})}var Q=function(e){var n=e.hideCelebrities,i=void 0!==n&&n,s=e.hideProducts,o=void 0!==s&&s,c=G(),u=(0,j.Z)("search").t,m=f().searchTerm,v=x(),g=(0,a.Z)(v,5),p=g[0],N=g[1],S=g[2],F=g[3],y=g[4],b=(0,h.useMemo)((function(){var e,n=!i&&(null===p||void 0===p||null===(e=p.edges)||void 0===e?void 0:e.map((function(e){return e.node})))||[];return(0,t.Z)(new Set(n))}),[p,i]),P=(0,h.useMemo)((function(){var e,n=!o&&(null===N||void 0===N||null===(e=N.edges)||void 0===e?void 0:e.map((function(e){return e.node})))||[];return(0,t.Z)(new Set(n))}),[N,o]),C=!!b.length||!!P.length,I=i||o;return(0,O.jsxs)("div",{children:[(0,O.jsx)("div",{children:(0,O.jsx)("div",{className:c.centeredSearchContainer,children:(0,O.jsx)(V,{showResults:!1})})}),m&&!S&&(0,O.jsxs)(h.Fragment,{children:[(0,O.jsx)(r.Z,{container:!0,className:c.resultsRow,children:(0,O.jsx)(r.Z,{item:!0,md:12,children:(0,O.jsx)(d.Z,{})})}),(0,O.jsx)(r.Z,{container:!0,spacing:3,children:(0,O.jsx)(r.Z,{item:!0,children:C?(0,O.jsxs)(l.Z,{variant:"h3",gutterBottom:!0,children:[u("searchResults"),' "',m,'":']}):(0,O.jsxs)(l.Z,{variant:"h4",align:"center",gutterBottom:!0,children:[u("searchResults2"),' "',m,'", ',u("searchResults3")]})})}),!!b.length&&(0,O.jsxs)(r.Z,{container:!0,spacing:3,alignItems:"center",children:[(0,O.jsx)(r.Z,{item:!0,xs:6,children:(0,O.jsxs)(l.Z,{variant:"h5",gutterBottom:!0,children:[u("found")," ",null===p||void 0===p?void 0:p.totalCount," ",u("wishers"),":"]})}),(0,O.jsx)(r.Z,{container:!0,item:!0,xs:6,justify:"flex-end",children:I?(0,O.jsx)(k.Z,{href:"/search/[searchTerm]",as:"/search/".concat(m),children:u("backToResults")}):(0,O.jsx)(k.Z,{href:"/search/wishers/[searchTerm]",as:"/search/wishers/".concat(m),children:u("showAllWishers")})}),(0,O.jsx)($,{wishers:b,isLoading:S,onLoadMore:F,hasNextPage:null===p||void 0===p?void 0:p.pageInfo.hasNextPage,isSingleView:I})]}),!!P.length&&(0,O.jsxs)(r.Z,{container:!0,spacing:3,alignItems:"center",children:[(0,O.jsx)(r.Z,{item:!0,xs:6,children:(0,O.jsxs)(l.Z,{variant:"h5",gutterBottom:!0,children:[u("found")," ",null===N||void 0===N?void 0:N.totalCount," ",u("products"),":"]})}),(0,O.jsx)(r.Z,{container:!0,item:!0,xs:6,justify:"flex-end",children:I?(0,O.jsx)(k.Z,{href:"/search/[searchTerm]",as:"/search/".concat(m),children:u("backToResults")}):(0,O.jsx)(k.Z,{href:"/search/products/[searchTerm]",as:"/search/products/".concat(m),children:u("showAllProducts")})}),(0,O.jsx)(B,{catalogItems:P,isLoading:S,onLoadMore:y,hasNextPage:null===N||void 0===N?void 0:N.pageInfo.hasNextPage,isSingleView:I})]})]})]})}}}]);
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.