Files
louiscklaw 6c60a73f30 update,
2025-01-31 19:15:17 +08:00

6 lines
20 KiB
Plaintext

"use strict";
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="0342c62b-ff65-50fb-a7fb-f0915d420144")}catch(e){}}();
(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[20],{720:(e,r,s)=>{s.d(r,{Z:()=>c});var t=s(0),n=s(99),a=s(1);class o extends t.PureComponent{render(){const e=this.context,{className:r,color:s,size:t}=this.props;return(0,a.jsxs)("svg",{className:r,fill:s??e.urbanGrey60,fillRule:"nonzero",height:t,viewBox:"0 0 24 24",width:t,xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("title",{children:"Close Icon"}),(0,a.jsx)("path",{d:"M13.414 12l5.293 5.293a1 1 0 0 1-1.414 1.414L12 13.414l-5.293 5.293a1 1 0 1 1-1.414-1.414L10.586 12 5.293 6.707a1 1 0 0 1 1.414-1.414L12 10.586l5.293-5.293a1 1 0 0 1 1.414 1.414L13.414 12z"})]})}}o.defaultProps={className:"",size:24},o.contextType=n.WE;const c=o},1509:(e,r,s)=>{s.d(r,{Z:()=>a});var t=s(2),n=(s(0),s(1));const a=(0,t.ZP)({resolved:{},chunkName:()=>"nav-bar-search-input-tooltip",isReady(e){const r=this.resolve(e);return!0===this.resolved[r]&&!!s.m[r]},importAsync:()=>Promise.all([s.e(4),s.e(842),s.e(478)]).then(s.bind(s,1638)),requireAsync(e){const r=this.resolve(e);return this.resolved[r]=!1,this.importAsync(e).then((e=>(this.resolved[r]=!0,e)))},requireSync(e){const r=this.resolve(e);return s(r)},resolve:()=>1638},{fallback:(0,n.jsx)("div",{})})},1507:(e,r,s)=>{s.d(r,{Z:()=>oe});var t=s(9),n=s.n(t),a=s(1302),o=s.n(a),c=s(0),i=s(10),l=s(398),u=s(399),d=s(731),h=s(407),p=s(746),y=s(72),m=s(172),g=s(397),v=s(16),_=s(41),f=s(21),x=s(15),S=s(53),P=s(33),b=s(403),j=s(404),N=s(104),Z=s(723),I=s(17),q=s(18),D=s(1204),k=s(1508),w=s(964),C=s(434),A=s(720),R=s(797),T=s(2424),L=s(1);const z=e=>{const{collection:r,focused:s,onClose:t,query:a}=e,o=(0,i.v9)(f.l$),c=(0,i.v9)(R.D7),u=(0,i.I0)();return(0,L.jsx)("div",{className:n()("D_aZu",{D_aZx:s}),children:(0,L.jsxs)("div",{className:"D_aZv",children:[(0,L.jsx)(y.Z,{singleline:!0,size:"xs",children:o((0,q.ZP)("in: %{collection_name}"),{collection_name:r.name})}),(0,L.jsx)(l.Z,{className:"D_aZw",onClick:()=>{const e=(0,T.Yo)(c??[]);u((0,x.J5)((0,I.gx)(a??"",{...e,includeSuggestions:!0,searchType:"all",tab:C.z.marketplace}))),t()},type:"icon",children:(0,L.jsx)(A.Z,{size:12})})]})})};var Y=s(99),E=s(1200),B=s(51),F="D_ary",O="D_arR",M="D_arS";const H=function(e){const{backgroundColorClass:r,context:s,deriveSearchPath:t,filtersPending:a,filtersError:o,hasTabs:c,journey:l,onSearchFiltersChanged:u,layoutForNavbarSearch:d}=e,h=(0,Y._x)(),p=(0,i.v9)((e=>(0,B.Y2)(e,{journey:l}))),m=d?"":c?"D_arF":"D_arG",v=d||"homeScreen"===s?"input":"input-grey";return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(E.Z,{chipClassName:r,desiredLayout:v,deriveSearchPath:"navBar"===s?t:null,firstChipClassName:m,journey:l,onSubmit:u}),p?null:(0,L.jsx)("div",{className:n()("D_arX",r,!p&&m),children:(0,L.jsx)(y.Z,{className:"D_arY",color:h.urbanGrey60,children:a?"...":o?(0,L.jsx)(g.Z,{id:(0,q.ZP)("Error loading search filters")}):(0,L.jsx)(g.Z,{id:(0,q.ZP)("Search filters missing")})})})]})};var U=s(737),J=s(772);function K(e){const{index:r,searchText:s,selected:t,setSearchText:a,setShowPopover:o,suggestion:{collection:l,text:u},suggestionLink:d}=e,h=(0,i.I0)(),p=(0,Y._x)(),m=(0,i.v9)(f.l$),g=n()(M,{D_arU:t});function v(){const e=s.toLowerCase();if(0===e.length)return u;const r=[];let t=u;for(;;){const s=t.indexOf(e);if(-1===s){r.push(t);break}r.push((0,L.jsxs)(c.Fragment,{children:[t.slice(0,s),(0,L.jsx)(y.Z,{inline:!0,weight:"semibold",children:t.slice(s,s+e.length)})]},s)),t=t.slice(s+e.length)}return(0,L.jsx)(y.Z,{color:p.urbanGrey90,inline:!0,children:r})}return(0,L.jsx)(J.Z,{className:g,classNameText:"D_arT",onClick:()=>{h((0,P.Vh)({name:"search_suggestion_click_dropdown",properties:{category_id:l?l.id:"",initial_query:s,rank_category:r,rank_suggestion:r,suggestion_query:u},type:"action"})),a(s),o(!1)},to:d,children:(0,L.jsx)("span",{className:"D_arV",children:l?(0,L.jsx)(U.Z,{id:q.ZP`%{searchTerm} in %{collectionName}`,options:{collectionName:l?l.ancestorName?m(q.ZP`%{collectionNamePart1} • %{collectionNamePart2}`,{collectionNamePart1:l.name,collectionNamePart2:l.ancestorName}):l.name:"",searchTerm:v()}}):v()})})}var V=s(859),W=s(1509),G=s(1946),$=s(73),X=s(932),Q=s(980),ee=s(981),re=s(2442),se=s(100),te=s(2443),ne=s(411);const ae="saSearchClickedCount",oe=function(e){const{collectionWithAncestors:r,query:s,context:t,journey:a,enableSuggestions:C,allowClearCollection:A,hasTabs:R,filtersPending:T,filtersError:Y,showLogo:E,layoutForNavbarSearch:U}=e,J=(0,m.Z)(),oe=(0,se.D9)(r),[ce,ie]=(0,c.useState)(r),[le,ue]=(0,c.useState)(!1),[de,he]=(0,c.useState)(s||""),[pe,ye]=(0,c.useState)(!1),[me,ge]=(0,c.useState)(!1),[ve,_e]=(0,c.useState)(null),[fe,xe]=(0,c.useState)(!1),Se=(0,i.v9)(D.yH),Pe=(0,i.v9)((e=>(0,B.Y2)(e,{journey:a}))),be=(0,i.v9)((e=>Pe?(0,B.JL)(e,{journey:a,screenId:Pe.screenIds[0]}):null)),je=be?.meta,Ne=!1!==je?.search_input_enabled,Ze=(0,i.v9)((e=>(0,B.$z)(e,{journey:a}))),Ie=(0,i.v9)((e=>(0,B.Jn)(e,{journey:a}))),qe=(0,i.v9)((e=>(0,B.Fw)(e,{journey:a}))),[De,ke]=(0,c.useState)({}),we=(0,te.Z)({query:s??""}).showAdvancedSearchTooltipV1,Ce=(0,i.v9)(w.tk),Ae=(0,i.v9)(w.WA);(0,c.useEffect)((()=>{if(Pe){const e=(0,N.pj)(Pe,qe,Ie,Ze),r=(0,N.YP)(Pe,e,{keepEmptyStrings:!0,removeFalsy:!0});ke(r)}}),[Pe,Ze,Ie,qe]);const Re=(0,i.I0)();(0,c.useEffect)((()=>{he(s||"")}),[s]),(0,c.useEffect)((()=>{o()(r,oe)||ie(r)}),[r,oe]);const Te=(0,i.v9)(f.l$),Le=(0,i.v9)(x.Xt),ze=(0,i.v9)(ee.dQ),Ye=(0,i.v9)($.R9),Ee=(0,i.v9)($.Z2),Be=(0,i.v9)(v.XM),Fe=Be?.profile.marketplace.country.code,Oe=(0,Z.c)("bf-11221-open-sa-on-search-tap"),Me=(0,Z.c)("bf-11221-llm-shopping-assistant")&&Oe&&"SG"===Fe;(0,c.useEffect)((()=>{pe&&!ze?.length||_e(null)}),[pe,ze]);const He=(0,c.useRef)(null),Ue=(0,c.useRef)(null),Je=(0,i.v9)(S.ID),Ke=(0,re.Z)(),Ve=(0,c.useCallback)(((e,r)=>(0,ne.oA)(Ke(e,{collectionId:r}),{search_query_source:"ss_dropdown",search_suggestion_source:r?"ss_dropdown_category_filter":"type_suggest"},Je)),[Ke,Je]),We=(0,c.useCallback)((()=>{if(ze&&null!==ve&&ze?.[ve]){const e=ve,{collection:r,text:s}=ze[e];Re((0,P.Vh)({name:"search_suggestion_click_dropdown",properties:{category_id:r?.id??"",initial_query:de,rank_category:e,rank_suggestion:e,suggestion_query:s},type:"action"})),he(s),ye(!1),ge(!1),Re((0,x.J5)(Ve(s,r?.id)))}}),[Re,Ve,de,ve,ze]),Ge=(0,c.useCallback)((e=>{const{single_picker_category:s,...t}=De,n=e?{...t,location_ids:e}:null,a=(r?r.slice():[]).concat(s?[Ee[Ye[s]]]:[]),o=[...new Set(a)];return(0,I.Dd)({addRecent:!0,canChangeKeyword:!0,includeSuggestions:!0,search:void 0,"t-search_query_source":"direct_search",tab:void 0},(e=>{const r=n?{...e,...n}:{...e,...t};return!Ce&&o?.length?(0,I.vd)(o,{query:de,queryParams:r,redirectToVerticalHomeScreen:!1}):(0,I.gx)(de,r)}))}),[Ye,r,Ee,De,Ce,de]),$e=(0,c.useCallback)((e=>{e&&e.preventDefault(),null===ve?(Re((0,x.J5)(Ge())),Re((0,Q.ck)({payload:{journey:"search_homescreen",searchTerm:""}})),ye(!1),ge(!1),Re((0,X.Jl)({data:null})),Re((0,X.uE)({data:null}))):We()}),[ve,Re,Ge,We]),Xe=()=>{ie(null)},Qe=()=>{ue(!1)},er=e=>{const r=e.target.value;he(r),C&&(ye(!0),Re((0,ee.sF)({query:r,type:"searchBarDropdown"})))},rr=()=>{if(Me&&(0,I.vL)(Le?.pathname??"")&&Be)try{const e=sessionStorage.getItem(ae);if(e){const r=JSON.parse(e);if("number"==typeof r[Be.id])return r[Be.id]<3&&!Se?(xe(!0),Re((0,D.MB)()),r[Be.id]++,void sessionStorage.setItem(ae,JSON.stringify(r))):void 0;{const e={[Be.id]:1};return sessionStorage.setItem(ae,JSON.stringify(e)),xe(!0),void Re((0,D.MB)())}}{const e={[Be.id]:1};sessionStorage.setItem(ae,JSON.stringify(e)),xe(!0),Re((0,D.MB)())}}catch{return}},sr=()=>{const e={};null!=Le&&(0,I.ip)(Le.pathname)&&(e.source="stuff_liked"),Re((0,P.Vh)({name:"search_bar_tapped",properties:{context:de?"filled":"unfilled",search_type:"items",...e},type:"action"})),ue(!0),C&&ye(!0),ge(!0)},tr=()=>{le||ye(!1)},nr=e=>{const{key:r}=e;"Enter"===r?(e.preventDefault(),e.currentTarget.blur(),$e()):ze?.length?"ArrowUp"===r?(e.preventDefault(),_e(null===ve?ze.length-1:0===ve?null:ve-1)):"ArrowDown"===r?ve===ze.length-1?_e(null):_e(null===ve?0:ve+1):"ArrowRight"===r&&null!==ve&&We():_e(null)},ar=e=>{e.fieldsetParam&&ke(e.fieldsetParam)},or="homeScreen"===t?"D_arw":"D_arv";return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)("div",{className:n()("homeScreen"===t&&"D_ars","navBar"===t&&"D_aru",R&&"D_art",T&&"D_arW"),ref:He,children:[E&&(0,L.jsx)(h.Z,{className:"D_arZ",onClick:()=>{Re((0,_.S6)([{eAction:"click",eCategory:"Icons",eLabel:"Main Logo",event:"TopNavClick"}]))},to:"/",children:(0,L.jsx)(V.Z,{size:32,theme:"red"})}),(0,L.jsx)("div",{className:"D_arx",children:(0,L.jsxs)("div",{className:F,children:[(()=>{const e=!U&&!Ae,r=U&&!Ae,o=(0,L.jsx)(H,{backgroundColorClass:or,context:t,deriveSearchPath:Ge,filtersError:Y,filtersPending:T,hasTabs:R,journey:a,layoutForNavbarSearch:U,onSearchFiltersChanged:ar});return(0,L.jsxs)(L.Fragment,{children:[e?o:null,Ne?(0,L.jsxs)("div",{className:n()(F,{D_arz:le}),ref:Ue,children:[U?(0,L.jsx)(b.Z,{className:"D_arN",color:J.urbanGrey40,name:j.T.search}):null,(0,L.jsx)(d.Z,{className:"D_ar_",classNameInputContainer:n()("D_arB",or,U?"D_arE":"D_arC"),classNameInput:n()({D_arH:!de,D_arA:U}),onClick:rr,onChange:er,onFocus:sr,onBlur:Qe,onKeyDown:nr,placeholder:Te(U?(0,I.vL)(Le?.pathname??"")?(0,q.ZP)("Search for anything and everything"):(0,q.ZP)("Search for anything"):(0,q.ZP)("Search for an item")),spellCheck:!1,type:"text",value:de}),A&&ce&&ce.length>0&&!Ae?(0,L.jsx)(z,{collection:ce[ce.length-1],focused:le,onClose:Xe,query:s}):null]}):null,r?(0,L.jsx)("div",{className:"homeScreen"===t?"D_arL":"D_arM"}):null,r?o:null]})})(),(0,L.jsx)("div",{className:n()("D_arI",or),children:(0,L.jsxs)(l.Z,{buttonType:"submit",className:n()("D_arJ",{D_arK:U}),onClick:$e,children:[!U&&(0,L.jsx)(b.Z,{className:"D_arO",color:J.white,name:j.T.search}),(0,L.jsx)(g.Z,{id:(0,q.ZP)("Search")})]})})]})}),C&&pe&&""===de&&(0,L.jsx)(G.Z,{className:O,container:He.current,onPopoverHide:tr,setSearchText:he,setShowPopover:ye,target:Ue.current}),we&&me?(0,L.jsx)(W.Z,{container:He.current,direction:U?"right":"left",onSearchTooltipHide:()=>{le||ge(!1)},target:Ue.current}):null,""!==de&&(0,L.jsxs)(p.Z,{className:O,container:He.current,horizontalAlign:"left",onHide:tr,show:!!C&&pe,target:Ue.current,useTargetWidth:!0,children:[C&&ze?.map(((e,r)=>(0,L.jsx)(K,{index:r,searchText:de,selected:r===ve,setSearchText:he,setShowPopover:ye,suggestion:e,suggestionLink:Ve(e.text,e.collection?.id)},r))),(0,L.jsx)(h.Z,{className:M,to:(0,I.BW)(de),children:(0,L.jsxs)("div",{className:"D_arQ",children:[(0,L.jsx)(u.Z,{className:"D_arP",src:"https://mweb-cdn.karousell.com/build/profile-outlined-46e14bdbc5.svg"}),(0,L.jsx)(y.Z,{children:Te((0,q.ZP)("Search '%{query}' user instead"),{query:de})})]})})]})]}),fe?(0,L.jsx)(k.Z,{onClose:()=>{xe(!1)}}):null]})}},1200:(e,r,s)=>{s.d(r,{Z:()=>a});var t=s(2),n=(s(0),s(1));const a=(0,t.ZP)({resolved:{},chunkName:()=>"search-filters-bar-desktop",isReady(e){const r=this.resolve(e);return!0===this.resolved[r]&&!!s.m[r]},importAsync:()=>Promise.all([s.e(0),s.e(2),s.e(4),s.e(10),s.e(16),s.e(22),s.e(29),s.e(73),s.e(88),s.e(97),s.e(136),s.e(135),s.e(225),s.e(202),s.e(977),s.e(15),s.e(36),s.e(37),s.e(43),s.e(47),s.e(53),s.e(60),s.e(77),s.e(91),s.e(150),s.e(247),s.e(258),s.e(631)]).then(s.bind(s,1630)),requireAsync(e){const r=this.resolve(e);return this.resolved[r]=!1,this.importAsync(e).then((e=>(this.resolved[r]=!0,e)))},requireSync(e){const r=this.resolve(e);return s(r)},resolve:()=>1630},{fallback:(0,n.jsx)("div",{})})},1946:(e,r,s)=>{s.d(r,{Z:()=>a});var t=s(2),n=(s(0),s(1));const a=(0,t.ZP)({resolved:{},chunkName:()=>"search-start-popover-desktop",isReady(e){const r=this.resolve(e);return!0===this.resolved[r]&&!!s.m[r]},importAsync:()=>Promise.all([s.e(1),s.e(986),s.e(641)]).then(s.bind(s,1639)),requireAsync(e){const r=this.resolve(e);return this.resolved[r]=!1,this.importAsync(e).then((e=>(this.resolved[r]=!0,e)))},requireSync(e){const r=this.resolve(e);return s(r)},resolve:()=>1639},{fallback:(0,n.jsx)("div",{})})},790:(e,r,s)=>{s.r(r),s.d(r,{default:()=>c});var t=s(9),n=s.n(t),a=(s(0),s(1507)),o=s(1);const c=function({collectionWithAncestors:e,hidden:r,query:s,showLogo:t}){return r?null:(0,o.jsx)("div",{className:n()("D_Ph",r&&"D_Pj",t&&"D_Pi"),children:(0,o.jsx)(a.Z,{allowClearCollection:!0,collectionWithAncestors:e,context:"navBar",enableSuggestions:!0,journey:"search_local_gc",layoutForNavbarSearch:!0,query:s,showLogo:t})})}},755:(e,r,s)=>{s.d(r,{Z:()=>l}),s(0);var t=s(74),n=s(3),a=s(780),o=s(412),c=s(107),i=s(1);const l=function({kind:e}){const r="modal"===e?c.Fx.Modal:c.Fx.Dialog;(0,o.Z)(!0,void 0,r);const s=(0,c.c0)(!0,null,r);return s?t.createPortal((0,i.jsx)(a.Z,{scroll:"outside",silhouette:"modal"===e?"desktop=small mobile=fullscreen":"dialog",children:(0,i.jsx)(n.Z,{})}),s):null}},941:(e,r,s)=>{s.d(r,{x3:()=>C,LV:()=>w,pn:()=>A,LE:()=>T,g:()=>B,Z7:()=>z,hN:()=>E,O7:()=>Y,r2:()=>L,Rv:()=>I,Zr:()=>Z,aD:()=>D,B:()=>q});var t=s(6),n=s(4),a=s(434),o=s(102),c=s(70),i=s(17),l=s(2426),u=s(8),d=s(73),h=s(106),p=s(980),y=s(432);const m="SearchProductListing";var g=s(103),v=s(12),_=s(24),f=s(5),x=s(15),S=s(406),P=s(964);const b={isSupportedProductSearch:!1,searchProductPageNumber:0,searchProductPaginationInfo:null,searchProductRequestId:null,searchProductResults:null,searchProductUIInfo:null},j=(0,t.oM)({initialState:b,name:m,reducers:{resetSearchProductState:()=>b,updateIsSupportSearchProduct:(e,r)=>{const{isSupported:s}=r.payload;e.isSupportedProductSearch=s},updateSearchProductPageNumber:(e,r)=>{const{number:s}=r.payload;e.searchProductPageNumber=s},updateSearchProductPagination:(e,r)=>{const{session:s,pagination:t}=r.payload;e.searchProductPaginationInfo={pagination:t,session:s}},updateSearchProductRequestId:(e,r)=>{const{requestId:s}=r.payload;e.searchProductRequestId=s},updateSearchProductResult:(e,r)=>{const{data:s}=r.payload;e.searchProductResults=s},updateSearchProductUIInfo:(e,r)=>{const{data:s}=r.payload;e.searchProductUIInfo=s}}}),{updateIsSupportSearchProduct:N,updateSearchProductPagination:Z,updateSearchProductPageNumber:I,updateSearchProductUIInfo:q,updateSearchProductResult:D,updateSearchProductRequestId:k,resetSearchProductState:w}=j.actions;function*C(e,r){yield(0,n.gz)(e.pending());try{const{country_id:s}=yield(0,n.Ys)(_.S$),{addRecent:t,canChangeKeyword:a,"t-search_query_source":i,"t-source":l,brand:u}=yield(0,n.Ys)(x.o2),d=r.filters.filter((e=>"collections"===e.fieldName||"_ce_keywords.brand"===e.fieldName)),m={count:{value:r.count??40},countryId:{value:s},filters:d,query:{enforce:!a,queryString:decodeURIComponent(r.query)},session:{value:r.nextSession},uiInfoOptions:{includeAmountInfo:r.includeAmountInfo,includeCtaButton:r.includeCtaButton,includeHeader:r.includeHeader,includeTab:r.includeTab,includeValuePropositionRibbon:r.includeValuePropositionRibbon}},f=(0,c.z)(16);yield(0,n.gz)(k({requestId:f}));const S=yield(0,n.Ys)(v.c6,{experimentId:"bf-11457-ce-luxury-bags-p2l"}),P=yield(0,n.RE)(g.S,S?(0,o.Iz)():(0,o.s3)(),m),{convertedResults:b,rawListingCards:j}=(0,y.ao)(P.results);yield(0,n.gz)((0,h.gq)({listingCards:j})),yield(0,n.gz)(N({isSupported:P.isSupported})),yield(0,n.gz)(q({data:P.uiInfo})),yield(0,n.gz)(Z({pagination:P.pagination,session:P.session}));const w=yield(0,n.Ys)(Y),C=r.nextSession?[...w??[],...b]:b;yield(0,n.gz)(D({data:C}));const A=yield(0,n.Ys)(B);yield(0,n.gz)(I({number:A+1})),""!==r.query&&t&&(yield(0,n.rM)(p.Y7,(0,p.ck)({payload:{journey:"",searchTerm:r.query}})));const T=r.filters?.map((e=>{if("collections"===e.fieldName)return e.idsOrKeywords?.value?.[0]}));P.isSupported&&(yield(0,n.rM)(R,{brand:u,cId:T?.[0],query:r.query,requestId:f,searchQuerySource:i,source:l})),yield(0,n.gz)(e.success())}catch(r){yield(0,n.gz)(e.error(r))}}function*A(e){const r=yield(0,n.Ys)(u.Y6),s=yield(0,n.Ys)(v.c6,{experimentId:"bsx_ap_m1_serp_and_seller_profile"}),t=yield(0,n.Ys)(v.c6,{experimentId:"bf-10770-value-proposition-awareness-enhancement"}),o=yield(0,n.Ys)(L),{tab:c}=yield(0,n.Ys)(x.o2),i=c===a.z.certified||c===a.z.marketplace;if(s&&(i&&o||(yield(0,n.gz)(w()),yield(0,n.rM)(C,(0,S.Kh)("searchProductGet"),{filters:e.filters,includeCtaButton:!0,includeHeader:!r&&!t,includeTab:!0,includeValuePropositionRibbon:t,query:e.query})),c===a.z.certified&&o)){const r=e.filters?.map((e=>{if("collections"===e.fieldName)return e.idsOrKeywords?.value?.[0]})),s=yield(0,n.Ys)(E);yield(0,n.rM)(R,{cId:r?.[0],query:e.query,requestId:s})}}function*R(e){const r=yield(0,n.Ys)(x.Xt);let s={};if((0,i.ac)(r?.pathname??""))s={browse_type:`certified_${e?.brand?.toLocaleLowerCase().replace(" ","_")||""}`,page_type:"certified_content_feed_page",request_id:e?.requestId,source:e?.source||void 0};else{if(!(yield(0,n.Ys)(P.WA)))return;const r=""===e?.query&&e?.cId?"categories":"search_results",t=e?.cId,a=yield(0,n.Ys)(d.Z2),o=t?a[t]:null;s={browse_session_id:void 0,browse_type:r,category_id:t,cc_id:o?`${o.cc_id}`:void 0,page_type:"certified_products",request_id:e?.requestId,search_query:e?.query,search_query_source:e?.searchQuerySource,source:e?.source||void 0}}yield(0,n.gz)((0,l.H6)({...s}))}function T(e){return e[m].isSupportedProductSearch}function L(e){return e[m].searchProductUIInfo}function z(e){return e[m].searchProductPaginationInfo}function Y(e){return e[m].searchProductResults}function E(e){return e[m].searchProductRequestId}function B(e){return e[m].searchProductPageNumber}j.reducer,f.Z.register(m,j.reducer)},1508:(e,r,s)=>{s.d(r,{Z:()=>o});var t=s(2),n=(s(0),s(755)),a=s(1);const o=(0,t.ZP)({resolved:{},chunkName:()=>"shopping-assistant-modal",isReady(e){const r=this.resolve(e);return!0===this.resolved[r]&&!!s.m[r]},importAsync:()=>Promise.all([s.e(26),s.e(230),s.e(1e3),s.e(657)]).then(s.bind(s,1637)),requireAsync(e){const r=this.resolve(e);return this.resolved[r]=!1,this.importAsync(e).then((e=>(this.resolved[r]=!0,e)))},requireSync(e){const r=this.resolve(e);return s(r)},resolve:()=>1637},{fallback:(0,a.jsx)(n.Z,{kind:"dialog"})})},2442:(e,r,s)=>{s.d(r,{Z:()=>u});var t=s(0),n=s(10),a=s(68),o=s(12),c=s(797),i=s(2424),l=s(17);function u(e){const r=(0,n.v9)(c.D7),s=(0,n.v9)((e=>"treatment"===(0,o.Oe)(e,{experimentId:"bx-4213-ph-web-location-picker"}))),u=(0,a.TH)(),d=(0,a.UO)();return(0,t.useCallback)(((t,n={})=>{const{canChangeKeyword:a=!1,collectionId:o}=n,c=s&&(e?.length||r?.length)?(0,i.Yo)(e||r||[]):null,h=((0,l.Cw)(u.pathname)||(0,l.YA)(u.pathname))&&parseInt((0,l.py)(d.collectionParam??"")??"0",10),p={...c,canChangeKeyword:a,includeSuggestions:!o&&!!h,tab:void 0},y=o||h;let m;return m=!h&&!o||h&&!o||o===h?(0,l.Dd)({...p,search:void 0},(e=>y?(0,l.yu)(y,{query:t,queryParams:e}):(0,l.gx)(t,e))):y?(0,l.yu)(y,{query:t,queryParams:p}):(0,l.gx)(t,p),m}),[e,s,r,u.pathname,d.collectionParam])}},2443:(e,r,s)=>{s.d(r,{Z:()=>l});var t=s(0),n=s(10),a=s(723),o=s(690),c=s(16),i=s(12);const l=function(e){const r=(0,n.I0)(),s=(0,a.c)("advanced-search-v1"),l=(0,n.v9)(c.XM),u=l?String(l.id):null,d=function(){if(!s)return!1;const e=(0,o.IH)({userId:u});if(!e)return!0;switch(!0){case e.useMarks:case!(e=>{if(e.lastRecords&&e.lastRecords?.lastTimestamp){const r=30;return((new Date).getTime()-e.lastRecords.lastTimestamp)/1e3/60/24>r}return!1})({lastRecords:e}):return!1;default:return!0}}();return(0,t.useEffect)((()=>{r((0,i.pu)({experimentIds:["advanced-search-v1"]})),s&&(0,o.Gf)({query:e.query,userId:u})}),[r,s,e.query,u]),{showAdvancedSearchTooltipV1:d}}},964:(e,r,s)=>{s.d(r,{WA:()=>l,tk:()=>i}),s(40);var t=s(434),n=s(12),a=s(15),o=s(17),c=s(941);const i=e=>{const r=(0,n.c6)(e,{experimentId:"bsx_ap_m1_serp_and_seller_profile"}),s=(0,c.LE)(e),t=(0,c.O7)(e),i=(t?.length??0)>0,l=(0,a.Xt)(e),u=(0,o.Uv)(l?.pathname??""),d=(0,o.Cw)(l?.pathname??""),h=(0,o.YA)(l?.pathname??"");return(u||d||h)&&r&&s&&i},l=e=>{const r=i(e),{tab:s}=(0,a.o2)(e);return r&&(void 0===s||s===t.z.certified)}}}]);
//# sourceMappingURL=https://mdev.llesuorac.com/01857052a1fbff6c7926249973b6164fd2b19d8b/fe08074f70ea8cb1.min.js.map
//# debugId=0342c62b-ff65-50fb-a7fb-f0915d420144