!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]="27dfbdee-f54c-4953-9dc4-10f1df5a1893",e._sentryDebugIdIdentifier="sentry-dbid-27dfbdee-f54c-4953-9dc4-10f1df5a1893")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4962],{10339:function(e,t,r){"use strict";r.r(t),r.d(t,{__N_SSP:function(){return p}});var a=r(64897),s=r(94922),l=r(46420),i=r(2002),n=r(36734),o=r(15188),c=r(84553),u=(r(98670),r(82090)),d=r(52322);var p=!0;t.default=function(e){let{page:t,preview:r}=e;const p=(0,a.Z)(),f=t.content.pageHeader.heading,h=t.content?.productsCategoryUid,g=[{href:"/",title:"Home"},{href:"/store",title:"My Nintendo Store"},{href:"/store/exclusives",title:"Exclusives"},{href:"/store/exclusives/[slug]",title:f}],m=s.e.ALL_PRODUCTS,b=(0,u.XD)({category:m,productsCategoryUid:h,merchandisedGrid:t?.content?.merchandisedGrid,router:p});return h?(0,d.jsx)(l.X$,{router:p,categoryConfig:b,defaultCategory:m,searchParamWhitelist:n.uy,preserveQueryParamKeys:n.aq,children:(0,d.jsx)(o.Z,{preview:r,breadcrumbLinks:g,page:t.content,pageIcon:"star",cachePrefix:`${(0,i.GL)(f)}`,filterSections:n.Mv,analytics:{eventPrefix:`Exclusives:${f}`,pageName:`Exclusives PLP - ${f}`}})}):(0,d.jsx)(c.Z,{preview:r,breadcrumbLinks:g,page:t.content,filterSections:n.Mv,analytics:{pageName:`Exclusives PLP - ${f}`}})}},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),p=r(51505),f=r(82732),h=r(37364),g=r(98803),m=r(1505),b=r(26856),y=r(88053),v=r(31837),x=r(9873),j=r(90862),P=r(2002),w=r(95395),k=r(83533),S=r(62156),O=r(88627),M=(r(64629),r(36734)),F=r(99140),C=r(23089),L=r(26378),_=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{preview:t,breadcrumbLinks:r,filterSections:s,lightScrim:M,page:I,pageIcon:Z,sortByOptions:$,showRating:A,analytics:R,enableStickyCollectionNav:q,fullBleedHero:G,cmsProductPageSize:U,hiddenFilters:V,disableDefaultMarketingPageHeading:X}=e;const{pageHeader:K,ctaCollection:Q,merchandisedGrid:Y,legalText:J,marketingPage:W}=I||{},ee=W?E[W?.templateName??"plmpStandard"]:null,te=X?l.Fragment:h.H.NewLevel,re=(0,w.O_)(),{text:ae}=(0,o.useLocalizer)(),{trackLoadMoreProducts:se}=(0,u.u)(),le=(0,i.useRouter)(),{asPath:ie,pathname:ne,query:oe}=le,ce=(0,w.D9)(oe?.slug),ue=(0,o.useFeature)("wdev-1631-horizontal-tiles"),de=ue?.variant?.payload?.value,pe=(0,k.Z)(k.o.TABLET_SMALL),fe="horizontal"===de&&!pe,he=(0,o.deserializeHash)(ie),ge=(0,l.useRef)(),{0:me,1:be}=(0,l.useState)((()=>$.find((e=>{let{param:t}=e;return t===he.sort}))?.value||$[0].value)),{0:ye,1:ve}=(0,l.useState)((()=>parseInt(he.p)||0)),{isFilterModalOpen:xe,selectedSortByOption:je,toggleModalFiltersMenu:Pe,handleSortByChange:we}=(0,d.sI)({sortBy:me,sortByOptions:$,analytics:R,applySortBy:e=>{be((()=>e))}}),ke=(0,l.useMemo)((()=>$.map((e=>{let{value:t,label:r}=e;return{value:t,label:ae(r)}}))),[$,ae]),Se=(0,l.useMemo)((()=>({value:je.value,label:ae(je.label)})),[je,ae]),Oe=(0,l.useMemo)((()=>s.map((e=>{let{attribute:t}=e;return t}))),[s]),Me=(Y||[]).flat(),Fe=(Y||[]).flat().filter((e=>{let{sku:t}=e;return Boolean(t)})),{appliedFilters:Ce,appliedFiltersQuery:Le,filteredProducts:_e,filteredState:Ee,refine:Ne,refineByQuery:De,clearFilters:He}=(0,w.x3)(Fe,Oe,{operator:w.fP.AND,queryToInitializeFilters:he,hidden:V}),Be=0===Ce?.length&&je.value===$[0].value,Ie=(0,k.Z)(k.o.DESKTOP),Te=(0,l.useRef)();Te.current=Ie;const ze=Be?Me:_e,Ze=(0,l.useMemo)((()=>ze.slice(0,(U||ze.length)*(ye+1))),[ye,ze,U]),$e=Ze.lengthme?[...Ze].sort(me):Ze),[Ze,me]),Re=(0,l.useCallback)((()=>{const e=(0,o.deserializeHash)(ie),t=$.find((t=>{let{param:r}=t;return r===e.sort}))?.value||$[0].value;De(e),be((()=>t)),ve(parseInt(e.p)||0)}),[$,ie,De]),qe=(0,l.useCallback)((e=>{const t=$.find((e=>{let{value:t}=e;return t===me}))?.param||$[0].value;return`#${new URLSearchParams(T(T({},e),{},{sort:t,p:ye})).toString()}`}),[$,me,ye]),Ge=(0,l.useCallback)((e=>(ve((()=>0)),e)),[]),Ue=(0,l.useCallback)((function(){Ge(Ne)(...arguments)}),[Ne,Ge]),Ve=(0,l.useCallback)((function(){Ge(He)(...arguments)}),[He,Ge]),Xe=(0,l.useCallback)((function(){Ge(we)(...arguments)}),[we,Ge]),Ke=(0,l.useCallback)((()=>{const{pageName:e}=R;se(e);const t=(0,o.deserializeHash)(),r=ye+1;t.p=r,ve((()=>r))}),[ye,R,se]),Qe=(0,l.useMemo)((()=>qe(Le)),[Le,qe]),Ye=(0,l.useMemo)((()=>Ce.map((e=>({attribute:e.split(w.HA)[0],label:e.split(w.HA)[1],value:e})))),[Ce]),Je=(0,l.useMemo)((()=>R?.featureFlag?{featureFlag:R.featureFlag}:{featureFlag:ue?.id,featureFlagVariant:de}),[R,ue,de]),We=(0,l.useMemo)((()=>s.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:Ue,items:Ee[s]?.items||[],showMoreLabel:ae("Show more"),showLessLabel:ae("Show less"),collapsible:!0,limit:5,showMore:!0,analytics:{pageName:R?.pageName}},l),s)}))),[s,Ee,Ue,ae,R]),et=(0,l.useMemo)((()=>(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(O.en,{$singleColumnMobile:fe,children:Ae.map(((e,t)=>e.sku?(0,l.createElement)(j.I8,T(T(T({},Je),{},{key:e.sku+t},e),{},{constrain:!1,showRating:A||Boolean(le.query[F.Tx.UTM_CODE])||!1,mobileHorizontal:fe,analytics:{listDetails:{id:`clp-${(0,P.GL)(R.pageName)}`,name:R.pageName}}})):(0,H.jsx)(L.Z,{asset:e.asset.primary.assetPath,cta:e.cta,heading:e.heading},e.heading+t)))}),$e&&(0,H.jsx)(D.VR,{children:(0,H.jsx)(g.B,{variant:"tertiary",icon:m.Z,onClick:Ke,children:ae("Load more")})})]})),[le.query,R,Je,A,$e,Ae,fe,Ke,ae]);(0,S.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)((()=>{Re()})),(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&&Re()}),[Re,ce,oe?.slug]);const tt=(0,l.useMemo)((()=>r?(0,H.jsx)(b.B,{currentPage:ne,children:r.map(((e,t)=>(0,H.jsx)(c.Z,{href:e.href,children:(0,H.jsx)("a",{children:ae(e.title)})},e.title+t)))}):null),[r,ae,ne]),rt=(0,l.useMemo)((()=>K?.asset?.primary?.assetPath?G?(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:Z}),(0,H.jsx)(O.Hr,{})]}):(0,H.jsx)(O.tm,{iconName:Z,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:M}):null),[K,G,Z,M,Q]);return(0,H.jsxs)(_.Kq,{preview:t,children:[W&&(0,H.jsx)(te,{children:(0,H.jsx)(ee,{marketingPage:W})}),r&&(0,H.jsx)(O.JL,{children:tt}),rt,(0,H.jsxs)(h.H.NewLevel,{children:[!G&&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)(v.S,{size:36,axis:"vertical"}),(0,H.jsxs)(O.He,{children:[(0,H.jsxs)(D.zB,{$breadcrumbs:!!r,children:[(0,H.jsx)(p.D,{children:tt}),(0,H.jsx)(f.S,{label:ae("Sort by"),onSelect:Xe,options:ke,dropdownValue:re?Se:null}),(0,H.jsx)(p.M,{children:(0,H.jsx)(O.Lb,{icon:x.Z,variant:"tertiary",onClick:Pe,children:ae("Filter")})})]}),(0,H.jsx)(v.S,{size:32,axis:"vertical"}),(0,H.jsx)(O.dA,{enableStickyFilterPanel:!0,isFilterModalOpen:xe,toggleModalFiltersMenu:Pe,attributeFilterSets:We,isDesktop:Ie,stickyOffset:q&&parseInt(C.TH)+16,customizeFilters:{clearFilters:Ve,removeFilter:Ue,activeFilters:Ye,totalHits:_e.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},92070:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/store/exclusives/[slug]",function(){return r(10339)}])}},function(e){e.O(0,[8286,4511,402,5806,5188,9774,2888,179],(function(){return t=92070,e(e.s=t);var t}));var t=e.O();_N_E=t}]); //# sourceMappingURL=[slug]-e95e5183cd823bc1.js.map