!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="33e1259d-d089-4a75-a86f-bee3cf13971f",e._sentryDebugIdIdentifier="sentry-dbid-33e1259d-d089-4a75-a86f-bee3cf13971f")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5907],{43080:function(e,t,r){"use strict";r.r(t),r.d(t,{__N_SSP:function(){return d}});var a=r(64897),s=r(94922),l=r(46420),i=r(36734),n=r(15188),o=r(84553),c=(r(98670),r(50802)),u=r(52322);var d=!0;t.default=function(e){let{page:t}=e;const r=(0,a.Z)(),d=t.content?.productsCategoryUid,f=[{href:"/",title:"Home"},{href:"/store",title:"My Nintendo Store"},{href:"/store/exclusives",title:"Exclusives"}],p=s.e.ALL_PRODUCTS,h=(0,c.XD)({category:p,productsCategoryUid:d,merchandisedGrid:t?.content?.merchandisedGrid,router:r});return d?(0,u.jsx)(l.X$,{router:r,categoryConfig:h,defaultCategory:p,searchParamWhitelist:i.uy,preserveQueryParamKeys:i.aq,children:(0,u.jsx)(n.Z,{breadcrumbLinks:f,page:t.content,pageIcon:"star",cachePrefix:"exclusives",filterSections:i.Mv,analytics:{eventPrefix:"Exclusives",pageName:"Exclusives PLP"},fullBleedHero:!0})}):(0,u.jsx)(o.Z,{breadcrumbLinks:f,page:t.content,filterSections:i.Mv,analytics:{pageName:"Exclusives PLP"}})}},84553:function(e,t,r){"use strict";var a=r(82269),s=r(95235),l=r(2784),i=r(5632),n=r.n(i),o=r(82091),c=r(97224),u=r(94922),d=r(46420),f=r(51505),p=r(82732),h=r(89125),g=r(75441),m=r(1505),b=r(74070),y=r(8283),x=r(34808),v=r(9873),j=r(90862),P=r(2002),k=r(95395),S=r(83533),w=r(62156),O=r(55850),M=(r(64629),r(36734)),F=r(99140),C=r(23089),_=r(26378),L=r(402),E=r(49481),N=r(73353),D=r(33831),H=r(52322);const B=["title","attribute"];function I(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function T(e){for(var t=1;t{let{breadcrumbLinks:t,filterSections:r,lightScrim:s,page:M,pageIcon:I,sortByOptions:Z,showRating:R,analytics:A,enableStickyCollectionNav:q,fullBleedHero:$,cmsProductPageSize:U,hiddenFilters:V,scrollToProductsRef:G,disableDefaultMarketingPageHeading:X}=e;const{pageHeader:K,ctaCollection:Q,merchandisedGrid:Y,legalText:J,marketingPage:W}=M||{},ee=W?E[W?.templateName??"plmpStandard"]:null,te=X?l.Fragment:h.H.NewLevel,re=(0,k.O_)(),{text:ae}=(0,o.useLocalizer)(),{trackLoadMoreProducts:se}=(0,u.u)(),le=(0,i.useRouter)(),{asPath:ie,pathname:ne,query:oe}=le,ce=(0,k.D9)(oe?.slug),ue=(0,o.useFeature)("wdev-1631-horizontal-tiles"),de=ue?.variant?.payload?.value,fe=(0,S.Z)(S.o.TABLET_SMALL),pe="horizontal"===de&&!fe,he=(0,o.deserializeHash)(ie),ge=(0,l.useRef)(),{0:me,1:be}=(0,l.useState)((()=>Z.find((e=>{let{param:t}=e;return t===he.sort}))?.value||Z[0].value)),{0:ye,1:xe}=(0,l.useState)((()=>parseInt(he.p)||0)),{isFilterModalOpen:ve,selectedSortByOption:je,toggleModalFiltersMenu:Pe,handleSortByChange:ke}=(0,d.sI)({sortBy:me,sortByOptions:Z,analytics:A,applySortBy:e=>{be((()=>e))}}),Se=(0,l.useMemo)((()=>Z.map((e=>{let{value:t,label:r}=e;return{value:t,label:ae(r)}}))),[Z,ae]),we=(0,l.useMemo)((()=>({value:je.value,label:ae(je.label)})),[je,ae]),Oe=(0,l.useMemo)((()=>r.map((e=>{let{attribute:t}=e;return t}))),[r]),Me=(Y||[]).flat(),Fe=(Y||[]).flat().filter((e=>{let{sku:t}=e;return Boolean(t)})),{appliedFilters:Ce,appliedFiltersQuery:_e,filteredProducts:Le,filteredState:Ee,refine:Ne,refineByQuery:De,clearFilters:He}=(0,k.x3)(Fe,Oe,{operator:k.fP.AND,queryToInitializeFilters:he,hidden:V}),Be=0===Ce?.length&&je.value===Z[0].value,Ie=(0,S.Z)(S.o.DESKTOP),Te=(0,l.useRef)();Te.current=Ie;const ze=Be?Me:Le,Ze=(0,l.useMemo)((()=>ze.slice(0,(U||ze.length)*(ye+1))),[ye,ze,U]),Re=Ze.lengthme?[...Ze].sort(me):Ze),[Ze,me]),qe=(0,l.useCallback)((()=>{const e=(0,o.deserializeHash)(ie),t=Z.find((t=>{let{param:r}=t;return r===e.sort}))?.value||Z[0].value;De(e),be((()=>t)),xe(parseInt(e.p)||0)}),[Z,ie,De]),$e=(0,l.useCallback)((e=>{const t=Z.find((e=>{let{value:t}=e;return t===me}))?.param||Z[0].value;return`#${new URLSearchParams(T(T({},e),{},{sort:t,p:ye})).toString()}`}),[Z,me,ye]),Ue=(0,l.useCallback)((e=>(xe((()=>0)),e)),[]),Ve=(0,l.useCallback)((function(){Ue(Ne)(...arguments)}),[Ne,Ue]),Ge=(0,l.useCallback)((function(){Ue(He)(...arguments)}),[He,Ue]),Xe=(0,l.useCallback)((function(){Ue(ke)(...arguments)}),[ke,Ue]),Ke=(0,l.useCallback)((()=>{const{pageName:e}=A;se(e);const t=(0,o.deserializeHash)(),r=ye+1;t.p=r,xe((()=>r))}),[ye,A,se]),Qe=(0,l.useMemo)((()=>$e(_e)),[_e,$e]),Ye=(0,l.useMemo)((()=>Ce.map((e=>({attribute:e.split(k.HA)[0],label:e.split(k.HA)[1],value:e})))),[Ce]),Je=(0,l.useMemo)((()=>A?.featureFlag?{featureFlag:A.featureFlag}:{featureFlag:ue?.id,featureFlagVariant:de}),[A,ue,de]),We=(0,l.useMemo)((()=>r.filter((e=>{let{attribute:t}=e;return Ee[t]?.items?.length>0})).map(((e,t)=>{let{title:r,attribute:s}=e,l=(0,a.Z)(e,B);return(0,H.jsx)(O.vT,T({attribute:s,title:r&&ae(r),startCollapsed:0!==t,refine:Ve,items:Ee[s]?.items||[],showMoreLabel:ae("Show more"),showLessLabel:ae("Show less"),collapsible:!0,limit:5,showMore:!0,analytics:{pageName:A?.pageName}},l),s)}))),[r,Ee,Ve,ae,A]),et=(0,l.useMemo)((()=>(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(O.en,{$singleColumnMobile:pe,children:Ae.map(((e,t)=>e.sku?(0,l.createElement)(j.I8,T(T(T({},Je),{},{key:e.sku+t},e),{},{constrain:!1,showRating:R||Boolean(le.query[F.Tx.UTM_CODE])||!1,mobileHorizontal:pe,analytics:{listDetails:{id:`clp-${(0,P.GL)(A.pageName)}`,name:A.pageName}}})):(0,H.jsx)(_.Z,{asset:e.asset.primary.assetPath,cta:e.cta,heading:e.heading},e.heading+t)))}),Re&&(0,H.jsx)(D.VR,{children:(0,H.jsx)(g.B,{variant:"tertiary",icon:m.Z,onClick:Ke,children:ae("Load more")})})]})),[le.query,A,Je,R,Re,Ae,pe,Ke,ae]);(0,w.Z)({isDesktop:Ie,scrollToRef:ge,scrollToElementID:z,enableStickyCollectionNav:q,pillFarm:Q.list}),(0,l.useEffect)((()=>{n().push({pathname:n().pathname,query:n().query,hash:Qe},null,{shallow:!0}).catch((e=>{if(!e.cancelled)throw e}))}),[Qe]),(0,P.nw)((()=>{qe()})),(0,l.useEffect)((()=>{!0===Te.current&&ge.current&&(0,P.n5)(ge.current,{offsetY:q&&N.d})}),[Ce.length,q]),(0,l.useEffect)((()=>{q&&ge.current&&oe?.slug!==ce&&(0,P.n5)(ge.current,{offsetY:N.d,behavior:"smooth",onlyScrollIfAbove:!0})}),[q,oe?.slug,ce]),(0,l.useEffect)((()=>{const e=oe?.slug;Boolean(ce)&&Boolean(e)&&e!==ce&&qe()}),[qe,ce,oe?.slug]);const tt=(0,l.useMemo)((()=>t?(0,H.jsx)(b.B,{currentPage:ne,children:t.map(((e,t)=>(0,H.jsx)(c.Z,{href:e.href,children:(0,H.jsx)("a",{children:ae(e.title)})},e.title+t)))}):null),[t,ae,ne]),rt=(0,l.useMemo)((()=>K?.asset?.primary?.assetPath?$?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(y.F,{heading:K.heading,subtitle:K.description,image:{desktop:{assetPath:K.asset?.primary?.assetPath},mobile:{assetPath:K.asset?.secondary?.assetPath}},pillFarm:Q.list,icon:I}),(0,H.jsx)(O.Hr,{})]}):(0,H.jsx)(O.tm,{iconName:I,content:{assetPath:K.asset?.primary?.assetPath,assetPathAlt:K.asset?.alt,background:K.background,cta:K.cta,description:K.description,heading:K.heading,modifiers:K.modifiers},lightScrim:s}):null),[K,$,I,s,Q]);return(0,H.jsxs)(L.Kq,{children:[W&&(0,H.jsx)(te,{children:(0,H.jsx)(ee,{marketingPage:W})}),t&&(0,H.jsx)(O.JL,{children:tt}),rt,(0,H.jsxs)(h.H.NewLevel,{children:[!$&&Q?.list.length>0&&(0,H.jsx)(O.$0,{constrained:!0,small:!0,divider:["bottom"],children:(0,H.jsx)(O.l6,{center:!0,items:Q.list})}),(0,H.jsx)("span",{ref:ge,id:"products","data-drawer-id":z}),(0,H.jsx)("span",{ref:G}),(0,H.jsx)(x.S,{size:36,axis:"vertical"}),(0,H.jsxs)(O.He,{children:[(0,H.jsxs)(D.zB,{$breadcrumbs:!!t,children:[(0,H.jsx)(f.D,{children:tt}),(0,H.jsx)(p.S,{label:ae("Sort by"),onSelect:Xe,options:Se,dropdownValue:re?we:null}),(0,H.jsx)(f.M,{children:(0,H.jsx)(O.Lb,{icon:v.Z,variant:"tertiary",onClick:Pe,children:ae("Filter")})})]}),(0,H.jsx)(x.S,{size:32,axis:"vertical"}),(0,H.jsx)(O.dA,{enableStickyFilterPanel:!0,isFilterModalOpen:ve,toggleModalFiltersMenu:Pe,attributeFilterSets:We,isDesktop:Ie,stickyOffset:q&&parseInt(C.TH)+16,customizeFilters:{clearFilters:Ge,removeFilter:Ve,activeFilters:Ye,totalHits:Le.length},children:et}),J&&(0,H.jsx)(D.VH,{children:(0,H.jsx)(O.Ho,{data:J,textVariant:"legal"})})]}),(0,H.jsx)(O.y4,{})]})]})};Z.defaultProps={sortByOptions:M.Op},t.Z=Z},35131:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/store/exclusives",function(){return r(43080)}])}},function(e){e.O(0,[8286,4511,402,5806,5188,9774,2888,179],(function(){return t=35131,e(e.s=t);var t}));var t=e.O();_N_E=t}]); //# sourceMappingURL=exclusives-225008b4bbf82849.js.map