try{let e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`aaa3084c-43cb-4544-b481-4fd849fbeb3b`,e._sentryDebugIdIdentifier=`sentry-dbid-aaa3084c-43cb-4544-b481-4fd849fbeb3b`)}catch{}import{o as e}from"./rolldown-runtime-nx40z1zs.js";import{Ag as t,Gu as n,Qm as r,Um as i,Yh as a,Zm as o,_r as s,jg as c,ng as l}from"./entry.client-mpghtlrl.js";import{C as u}from"./game-tile-gvlusypf.js";import{r as d}from"./stream-gate-hooks-bpatbpk5.js";var f=t(),p=e(c(),1),m=l(),h=(0,p.createContext)({}),g=e=>{let t=(0,f.c)(5),{children:n,productId:r}=e,i=d(r,`RecentsTile`),a;t[0]===i?a=t[1]:(a={launchStream:i},t[0]=i,t[1]=a);let o=a,s;return t[2]!==o||t[3]!==n?(s=(0,m.jsx)(h.Provider,{value:o,children:n}),t[2]=o,t[3]=n,t[4]=s):s=t[4],s},_=e=>{let t=(0,f.c)(13),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({productId:r,onPress:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=u.useComponent(),{launchStream:o}=(0,p.useContext)(h),s;t[4]!==o||t[5]!==n||t[6]!==r?(s=o?()=>n(r,o):void 0,t[4]=o,t[5]=n,t[6]=r,t[7]=s):s=t[7];let c=s,l;return t[8]!==a||t[9]!==c||t[10]!==r||t[11]!==i?(l=(0,m.jsx)(a,{onPress:c,productId:r,...i}),t[8]=a,t[9]=c,t[10]=r,t[11]=i,t[12]=l):l=t[12],l},v=e=>{let t=(0,f.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({onPress:n,launchContainer:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]!==n||t[5]!==r?(a=(0,m.jsx)(_,{onPress:n,...r}),t[4]=n,t[5]=r,t[6]=a):a=t[6];let o=a;if(i){let e;return t[7]!==i||t[8]!==o?(e=(0,p.cloneElement)(i,{},o),t[7]=i,t[8]=o,t[9]=e):e=t[9],e}return o},y=s(v,({...e})=>{let t=e.productId,n=t?(0,m.jsx)(g,{productId:t}):null;return{...e,productId:t,launchContainer:n}}),b=e=>{let t=(0,f.c)(5),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r=y.useComponent(),i;return t[2]!==r||t[3]!==n?(i=(0,m.jsx)(r,{...n}),t[2]=r,t[3]=n,t[4]=i):i=t[4],i},x=()=>{let e=(0,f.c)(11),t=i(),s;e[0]===t?s=e[1]:(s=t.getLogger(`RecentsList`),e[0]=t,e[1]=s);let c=s,{dialog:l}=o(),{trackUserAction:u}=r(),d;e[2]===l.mutations.goBack?d=e[3]:(d=l.mutations.goBack.getOptions(),e[2]=l.mutations.goBack,e[3]=d);let{mutateAsync:p}=a(d),m;e[4]!==p||e[5]!==u||e[6]!==l.keys.guide.fullPath||e[7]!==c?(m=(e,t)=>{p().then(()=>{u(`CloseModal`,{modalType:l.keys.guide.fullPath,dismissMethod:`sideEffect`},`Press`);let r=n.stream.byProductId.$buildPath({params:{productId:e}});t(),u(`NavigateInApp`,{source:location.pathname,destination:r},`Press`)}).catch(e=>{c.error(`Failed to go back from GuideDialog`,{error:e})})},e[4]=p,e[5]=u,e[6]=l.keys.guide.fullPath,e[7]=c,e[8]=m):m=e[8];let h=m,g;return e[9]===h?g=e[10]:(g={handlePress:h},e[9]=h,e[10]=g),g};export{v as n,b as r,x as t};