1import{d as F,g,a as w,i,r as y,t as f,e as U,c as k}from"./web-Bf5s-bfW.js";import{e as M,b as n,q as N,r as q,a as E,F as C,S,p as R,i as j}from"./solid-CxN7oBiC.js";import{d as z,H as G}from"./gc_sdk_partner_config-CZZotJWC.js";import{u as H}from"./icons-DaD63GyN.js";import{u as O,S as Z}from"./use_smart_search-Dc7G7w-4.js";import{u as Y,h as Q}from"./routing-DiG4O4UF.js";import{r as K,q as J}from"./query-CCK8ilVl.js";import{u as W}from"./repo_context-BlsUr76K.js";import{S as X}from"./sdk_full_page_loader-Ci93Dn9s.js";import{c as ee}from"./createAsync-ClGXKSgT.js";import"./etc-C4njaG5h.js";import"./index-BcLIwR4t.js";import"./common-B0Jw61e1.js";import"./snackbar-B3Kyxyn3.js";import"./icons-CCbAo7Bs.js";import"./events-BeaGbsfN.js";import"./number-B_BhWxZ7.js";import"./debounce-vNSi-bT1.js";import"./intercom-Bja0o_BM.js";import"./job-B03zVIpe.js";import"./border_gradient_telescope-CAJg9e6D.js";import"./trigger_app_events-CsxL6GyX.js";import"./local_storage-DFxxYqIm.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"6f733099e5334164e635d861caf3350518bfeb4d"}}catch{}})();try{(function(){var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="25766fc1-6fea-4622-bf3d-b6043f3a9b9a",e._sentryDebugIdIdentifier="sentry-dbid-25766fc1-6fea-4622-bf3d-b6043f3a9b9a")})()}catch{}const P="search_keyword_view_data";async function te(e){return{recentSearches:await e.getRecentSearches()}}function re(e){const r=Y(),[d]=Q(),{searchBrands:c,trendingSearches:a}=z(),l=H(),s=d.q??"",[h,p]=M(s),v=t=>{t?.voucherProduct?.status!=="INACTIVE"&&r(`/buy/${t?.brandKey??t?.id??""}`)},x=O({searchText:h,setSearchText:p,onBrandClick:v,onSearchComplete:()=>K(P)});return{viewData:e,searchText:h,setSearchText:p,trendingSearches:a,searchBrands:c,smartSearch:x,onPillClick:t=>{l.logEvent("trending_pill_clicked",{keyword:t}),x.selectKeyword(t)},onBrandClick:v,onBrandNavigate:t=>{r(`/buy/${t}`)},onRecentSearchClick:t=>{l.logEvent("recent_search_clicked",{type:t.type,searchKey:t.searchKey}),t.type==="CATEGORY_SEARCH"?x.selectCategory({id:"",name:t.searchKey,title:t.displayText,logoUrl:"",brandLogoUrls:[],brandCount:0}):x.selectKeyword(t.searchKey)},goBack:()=>{history.back()}}}const V=q();function T(){const e=N(V);if(!e)throw new Error("useViewContext must be used within ViewProvider");return e}function ne(e){return n(V.Provider,{get value(){return e.value},get children(){return e.children}})}var le=f('<svg xmlns=http://www.w3.org/2000/svg width=16 height=16 viewBox="0 0 16 16"fill=none><path d="M11.6667 0.666504C11.9799 2.54659 13.4532 4.01987 15.3333 4.33316C13.4532 4.64645 11.9799 6.11973 11.6667 7.99982C11.3534 6.11973 9.88008 4.64645 8 4.33316C9.88008 4.01987 11.3534 2.54659 11.6667 0.666504Z"fill=url(#paint0_linear_253_5304)></path><path d="M11.6667 0.666504C11.9799 2.54659 13.4532 4.01987 15.3333 4.33316C13.4532 4.64645 11.9799 6.11973 11.6667 7.99982C11.3534 6.11973 9.88008 4.64645 8 4.33316C9.88008 4.01987 11.3534 2.54659 11.6667 0.666504Z"fill=black fill-opacity=0.2></path><path d="M6.00007 3.99988C6.45576 6.73454 8.59872 8.8775 11.3334 9.3332C8.59872 9.78889 6.45576 11.9318 6.00007 14.6665C5.54437 11.9318 3.40141 9.78889 0.666748 9.3332C3.40141 8.8775 5.54437 6.73454 6.00007 3.99988Z"fill=url(#paint1_linear_253_5304)></path><path d="M6.00007 3.99988C6.45576 6.73454 8.59872 8.8775 11.3334 9.3332C8.59872 9.78889 6.45576 11.9318 6.00007 14.6665C5.54437 11.9318 3.40141 9.78889 0.666748 9.3332C3.40141 8.8775 5.54437 6.73454 6.00007 3.99988Z"fill=black fill-opacity=0.2></path><defs><linearGradient id=paint0_linear_253_5304 x1=8 y1=4.33316 x2=15.3333 y2=4.33316 gradientUnits=userSpaceOnUse><stop stop-color=#FF6D6F></stop><stop offset=1 stop-color=#7B43FF></stop></linearGradient><linearGradient id=paint1_linear_253_5304 x1=0.666748 y1=9.3332 x2=11.3334 y2=9.3332 gradientUnits=userSpaceOnUse><stop stop-color=#FF6D6F></stop>
1<stop offset=1 stop-color=#7B43FF>'),ie=f('<div class="flex w-full flex-col gap-4"><div class="flex items-center gap-1 px-4"><!$><!/><p class="text-caption-medium uppercase tracking-[0.4px]"style="background-image:linear-gradient(90deg, #FF6D6F 0%, #7B43FF 100%);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text">Search an idea, occasion or a product</p></div><div class="no-scrollbar w-full overflow-x-auto"><div class="flex w-full flex-col gap-2"><div class="flex w-max gap-2 px-4"></div><div class="flex w-max gap-2 px-4 ">'),D=f('<button class="flex h-9 items-center justify-center rounded-[40px] border border-stroke-1 bg-background-normal-primary px-4"><span class="whitespace-nowrap text-para-3-medium text-text-normal-primary">');const ae=()=>g(le);function se(){const{trendingSearches:e,onPillClick:r}=T(),d=E(()=>e().filter((a,l)=>l%2===0)),c=E(()=>e().filter((a,l)=>l%2===1));return n(S,{get when(){return e().length>0},get children(){var a=g(ie),l=a.firstChild,s=l.firstChild,[h,p]=w(s.nextSibling);h.nextSibling;var v=l.nextSibling,x=v.firstChild,b=x.firstChild,m=b.nextSibling;return i(l,n(ae,{}),h,p),i(b,n(C,{get each(){return d()},children:u=>(()=>{var o=g(D),t=o.firstChild;return o.$$click=()=>r(u),i(t,u),y(),o})()})),i(m,n(C,{get each(){return c()},children:u=>(()=>{var o=g(D),t=o.firstChild;return o.$$click=()=>r(u),i(t,u),y(),o})()})),a}})}F(["click"]);var oe=f('<svg xmlns=http://www.w3.org/2000/svg width=20 height=20 viewBox="0 0 20 20"fill=none><path d="M8.33325 13.3333L11.6666 9.99996L8.33325 6.66663"stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round>'),ce=f('<div class="flex items-end"><span class="text-title-4-semi-bold text-success-base"></span><div class="flex h-7 items-end pb-0.5 text-success-base"><span class="text-title-6-semi-bold text-success-base">% OFF</span><!$><!/>'),de=f('<button class="flex shrink-0 flex-col gap-2"><div class="size-[100px] overflow-hidden rounded-[16px]"><div class="grid size-full grid-cols-2 grid-rows-2 gap-1"></div></div><div class="flex flex-col gap-0.5 px-0.5"><p class="w-[100px] truncate text-left text-para-3-medium text-text-normal-primary"></p><p class="w-[100px] truncate text-left text-label-regular text-text-normal-secondary"></p><!$><!/>'),ue=f('<div class="overflow-hidden rounded-[16px] border-[0.5px] border-stroke-1"><img class="size-full object-cover">'),ge=f('<div class="flex flex-col gap-4"><p class="px-4 text-caption-medium uppercase tracking-[0.4px] text-text-normal-secondary">Recent searches</p><div class="no-scrollbar flex gap-[13px] overflow-x-scroll px-4">');const he=()=>g(oe);function pe(e){const r=()=>e.item.brands.slice(0,4),d=()=>{const c=e.item.brands;return c.length===0?0:Math.max(...c.map(a=>a.discountPercentage))};return(()=>{var c=g(de),a=c.firstChild,l=a.firstChild,s=a.nextSibling,h=s.firstChild,p=h.nextSibling,v=p.nextSibling,[x,b]=w(v.nextSibling);return U(c,"click",e.onClick,!0),i(l,n(C,{get each(){return r()},children:m=>(()=>{var u=g(ue),o=u.firstChild;return R(t=>{var _=m.sqLogoUrl,$=m.name;return _!==t.e&&k(o,"src",t.e=_),$!==t.t&&k(o,"alt",t.t=$),t},{e:void 0,t:void 0}),u})()})),i(h,()=>e.item.displayText),i(p,()=>`${e.item.brands.length} ${e.item.brands.length===1?"brand":"brands"}`),i(s,n(S,{get when(){return d()>0},get children(){var m=g(ce),u=m.firstChild,o=u.nextSibling,t=o.firstChild,_=t.nextSibling,[$,B]=w(_.nextSibling);return i(u,d),i(o,n(he,{}),$,B),m}}),x,b),y(),c})()}function xe(){const{viewData:e,onRecentSearchClick:r}=T(),d=()=>e().recentSearches.searches;return n(S,{get when(){return d().length>0},get children(){var c=g(ge),a=c.firstChild,l=a.nextSibling;return i(l,n(C,{get each(){return d()},children:s=>n(pe,{item:s,onClick:()=>r(s)})})),c}})}F(["click"]);var fe=f('<svg xmlns=http://www.w3.org/2000/svg width=20 height=20 viewBox="0 0 20 20"fill=none><path d="M8.33325 13.3333L11.6666 9.99996L8.33325 6.66663"stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round>'),me=f('<div class="flex flex-col gap-4"><p class="px-4 text-caption-medium uppercase tracking-[0.4px] text-text-normal-secondary">Top brands</p><div class="no-scrollbar flex gap-[13px] overflow-x-scroll px-4">'),ve=f('<div class="flex items-end"><span class="text-title-4-semi-bold text-success-base"></span><div class="flex h-7 items-end pb-0.5 text-success-base"><span class="text-title-6-semi-bold text-success-base">% OFF</span><!$><!/>'),be=f('<button class="flex shrink-0 flex-col gap-2"><div class="size-[100px] overflow-hidden rounded-[16px] border-[0.5px] border-stroke-1"><img class="size-full object-cover"></div><div class="flex flex-col gap-0.5 px-0.5"><p class="w-[100px] truncate text-left text-para-3-medium text-text-normal-primary"></p><p class="w-[100px] truncate text-left text-label-regular text-text-normal-secondary"></p><!$><!/>');const _e=()=>g(fe);function $e(){const{searchBrands:e,onBrandClick:r}=T();return n(S,{get when(){return e().length>0},get children(){var d=g(me),c=d.firstChild,a=c.nextSibling;return i(a,n(C,{get each(){return e()},children:l=>(()=>{var s=g(be),h=s.firstChild,p=h.firstChild,v=h.nextSibling,x=v.firstChild,b=x.nextSibling,m=b.nextSibling,[u,o]=w(m.nextSibling);return s.$$click=()=>r(l),i(x,()=>l.voucherProduct.title),i(b,()=>
1l.displayTags?.[0]??""),i(v,n(S,{get when(){return l.voucherProduct.discountPercentage>0},get children(){var t=g(ve),_=t.firstChild,$=_.nextSibling,B=$.firstChild,I=B.nextSibling,[A,L]=w(I.nextSibling);return i(_,()=>l.voucherProduct.discountPercentage),i($,n(_e,{}),A,L),t}}),u,o),R(t=>{var _=l.voucherProduct.sqLogoUrl??l.voucherProduct.logoUrl??l.voucherProduct.iconImageUrl,$=l.voucherProduct.title;return _!==t.e&&k(p,"src",t.e=_),$!==t.t&&k(p,"alt",t.t=$),t},{e:void 0,t:void 0}),y(),s})()})),d}})}F(["click"]);var we=f('<div class="relative flex min-h-dvh w-full flex-col bg-background-normal-primary sm:max-w-[375px]"><!$><!/><div class="flex flex-col gap-8 overflow-hidden pt-4"><!$><!/><!$><!/><!$><!/>');const Se=J(e=>te(e),P);function Ce(){return n(G,{onRetry:()=>{K(P)},headerTitle:"",class:"min-h-dvh",get children(){return n(ye,{})}})}function ye(){const e=W(),r=ee(()=>Se(e),{deferStream:!0});return n(j,{get fallback(){return n(X,{})},get children(){return n(S,{get when(){return r()},get children(){return n(ke,{get viewData(){return r()}})}})}})}function ke(e){const r=re(()=>e.viewData);return n(ne,{value:r,get children(){var d=g(we),c=d.firstChild,[a,l]=w(c.nextSibling),s=a.nextSibling,h=s.firstChild,[p,v]=w(h.nextSibling),x=p.nextSibling,[b,m]=w(x.nextSibling),u=b.nextSibling,[o,t]=w(u.nextSibling);return i(d,n(Z,{get searchText(){return r.searchText},get setSearchText(){return r.setSearchText},get onBrandClick(){return r.onBrandClick},get onBrandNavigate(){return r.onBrandNavigate},get onClose(){return r.goBack},get trendingSearches(){return r.trendingSearches},get smartSearch(){return r.smartSearch}}),a,l),i(s,n(se,{}),p,v),i(s,n(xe,{}),b,m),i(s,n($e,{}),o,t),d}})}function Qe(){return n(Ce,{})}export{Qe as default}; 2//# sourceMappingURL=search-keywords-diMQb3ub.js.map
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.