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]=`3957ff2f-bf10-4987-aae5-7387c53e0bf1`,e._sentryDebugIdIdentifier=`sentry-dbid-3957ff2f-bf10-4987-aae5-7387c53e0bf1`)}catch{}import{o as e}from"./rolldown-runtime-nx40z1zs.js";import{Ag as t,Br as n,Ct as r,Pd as i,Pt as a,Qh as o,Zm as s,_r as c,ai as l,ng as u,pa as d,pi as f,ui as p,xi as m}from"./entry.client-mpghtlrl.js";import"./workspace-leaf-files-oergw4h0.js";var h=t(),g=e(f(),1),_=(0,g.default)(`relative`,`w-[248px]`,`shrink-0`,`self-stretch`,`mask-image-[linear-gradient(to_bottom,black_50%,rgba(0,0,0,0))]`),v=(0,g.default)(`flex`,`absolute`,`inset-0`,`gap-layout-vertical-group-of-items-tight`,`overflow-hidden`),y=e=>(0,g.default)(`flex`,`flex-col`,`gap-layout-vertical-group-of-items-tight`,e),b=(0,g.default)(`aspect-square`,`rounded-regular`,`w-[120px]`,`overflow-hidden`),x=(0,g.default)(`-mt-[60px]`),S=u(),C=e=>{let t=(0,h.c)(23),{images:n,direction:r,shouldAnimate:i,className:a,scrollDuration:o}=e,s=o===void 0?60:o;if(n.length===0)return null;let c;t[0]!==i||t[1]!==n?(c=i?[...n,...n]:n,t[0]=i,t[1]=n,t[2]=c):c=t[2];let l=c,u=r===`up`?`translateY(0%)`:`translateY(-50%)`,d=r===`up`?`translateY(-50%)`:`translateY(0%)`,f;t[3]===a?f=t[4]:(f=y(a),t[3]=a,t[4]=f);let m;t[5]===l?m=t[6]:(m=l.map(E),t[5]=l,t[6]=m);let g;t[7]!==f||t[8]!==m?(g=(0,S.jsx)(`div`,{className:f,children:m}),t[7]=f,t[8]=m,t[9]=g):g=t[9];let _=g;if(!i){let e;return t[10]===_?e=t[11]:(e=(0,S.jsx)(`div`,{className:`overflow-hidden`,children:_}),t[10]=_,t[11]=e),e}let v;t[12]===u?v=t[13]:(v={transform:u},t[12]=u,t[13]=v);let b;t[14]===d?b=t[15]:(b={transform:d},t[14]=d,t[15]=b);let x;t[16]===s?x=t[17]:(x={duration:s,ease:`linear`,repeat:1/0,repeatType:`loop`},t[16]=s,t[17]=x);let C;return t[18]!==v||t[19]!==b||t[20]!==x||t[21]!==_?(C=(0,S.jsx)(`div`,{className:`overflow-hidden`,children:(0,S.jsx)(p,{initial:v,animate:b,transition:x,children:_})}),t[18]=v,t[19]=b,t[20]=x,t[21]=_,t[22]=C):C=t[22],C},w=e=>{let t=(0,h.c)(5),{className:n}=e,r;t[0]===n?r=t[1]:(r=y(n),t[0]=n,t[1]=r);let i;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=Array.from({length:12},D),t[2]=i):i=t[2];let a;return t[3]===r?a=t[4]:(a=(0,S.jsx)(`div`,{className:`overflow-hidden`,children:(0,S.jsx)(l,{className:r,children:i})}),t[3]=r,t[4]=a),a},T=e=>{let t=(0,h.c)(5),{src:n,alt:i}=e,o;t[0]!==n||t[1]!==i?(o=n&&(0,S.jsx)(a,{src:n,alt:i,aspectRatio:`1/1`,getResizedImageUrl:r,constraintSet:{entries:[],defaultEntry:{size:{width:120},imageType:`jpg`}}}),t[0]=n,t[1]=i,t[2]=o):o=t[2];let s;return t[3]===o?s=t[4]:(s=(0,S.jsx)(`div`,{className:b,children:o}),t[3]=o,t[4]=s),s};function E(e,t){return(0,S.jsx)(T,{...e},`${e.alt}-${t}`)}function D(e,t){return(0,S.jsx)(m,{className:b},t)}function O(e,t){let n=e.filter(e=>e!=null),r=new Set,a=n.filter(e=>{let t=e.ids.xboxTitleId;return t&&r.has(t)?!1:(t&&r.add(t),!0)}),o=(a.length>=t?a:[...a,...n.filter(e=>!a.includes(e))]).map(e=>({src:i(e),alt:e.title??``})).filter(e=>e.src!=null).slice(0,t);return o.length>=12?o:[]}var k=e=>{let t=(0,h.c)(18),{isPending:n,isError:r,images:i,animationIsEnabled:a,scrollDuration:o}=e,s=o===void 0?60:o;if(n){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,S.jsx)(A,{}),t[0]=e):e=t[0],e}if(r||i.length===0)return null;let c=Math.floor(i.length/2),l;t[1]!==i||t[2]!==c?(l=i.slice(0,c),t[1]=i,t[2]=c,t[3]=l):l=t[3];let u=l,d;t[4]!==i||t[5]!==c?(d=i.slice(c),t[4]=i,t[5]=c,t[6]=d):d=t[6];let f=d,p=a&&i.length>=20,m;t[7]!==u||t[8]!==p||t[9]!==s?(m=(0,S.jsx)(C,{images:u,direction:`down`,shouldAnimate:p,scrollDuration:s}),t[7]=u,t[8]=p,t[9]=s,t[10]=m):m=t[10];let g;t[11]!==f||t[12]!==p||t[13]!==s?(g=(0,S.jsx)(C,{images:f,direction:`up`,className:x,shouldAnimate:p,scrollDuration:s}),t[11]=f,t[12]=p,t[13]=s,t[14]=g):g=t[14];let y;return t[15]!==m||t[16]!==g?(y=(0,S.jsx)(`div`,{className:_,children:(0,S.jsxs)(`div`,{className:v,children:[m,g]})}),t[15]=m,t[16]=g,t[17]=y):y=t[17],y},A=()=>{let e=(0,h.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,S.jsx)(l,{className:_,children:(0,S.jsxs)(`div`,{className:v,children:[(0,S.jsx)(w,{}),(0,S.jsx)(w,{className:x})]})}),e[0]=t):t=e[0],t},j=c(k,({siglId:e=d.CloudMostPopular,scrollDuration:t})=>{let{sigl:r,catalog:i}=s(),{data:a,isPending:c,isError:l}=o(r.queries.sigl.getOptions({siglId:e})),u=n()===`full`,f=u?20:12,p=f*2,m=(a?.products??[]).slice(0,p),{data:h,isPending:g,isError:_}=o({...i.queries.productInfos.basic.getOptions({productIds:m}),enabled:m.length>0}),v=O(h??[],f);return{isPending:c||m.length>0&&g,isError:l||_,images:v,animationIsEnabled:u,scrollDuration:t}});export{j as t};