"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[612],{78112:function(e,t,l){l.d(t,{Z:function(){return E}});var n,s=l(85893),a=l(11163),r=l(67294),i=l(58533),o=l(75874),d=l(5678),c=l(91997);function m(){return(m=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{limit:t,breakpoints:l}=e;return h.BL.isOn(h.D5)?(0,s.jsx)("div",{className:"mb-52 grid grid-cols-2 gap-2 overflow-hidden p-2 md:grid-cols-3 md:gap-4 md:p-4 lg:grid-cols-4 2xl:grid-cols-5 3xl:grid-cols-6",children:(0,s.jsx)(j.z,{limit:t})}):(0,s.jsx)(g.Z,{breakpointCols:l,className:"masonryContainer mt-3",children:Array(t).fill(void 0).map((e,t)=>{let l;switch(t%3){case 0:l="h-56";break;case 1:l="h-48";break;default:l="h-64"}return(0,s.jsx)(w.r,{height:l},"urls-loading-".concat(t))})})},b=e=>{let{urls:t,breakpoints:l,likedByUsername:n,onItemClick:a}=e;return h.BL.isOn(h.D5)?(0,s.jsx)("div",{className:"mb-52 grid grid-cols-2 gap-2 overflow-hidden p-2 md:grid-cols-3 md:gap-4 md:p-4 lg:grid-cols-4 2xl:grid-cols-5 3xl:grid-cols-6",children:(0,s.jsx)(j.Q,{urls:t,isTitleEnabled:!0,isVideoEnabled:!0,likedByUsername:n})}):(0,s.jsx)(g.Z,{breakpointCols:l,className:"masonryContainer mt-3",children:t.map((e,t)=>(0,s.jsx)(w.C,{onClick:a?()=>a(t):void 0,isPriority:t{let{urls:t,focusIndex:l,likedByUsername:n,onItemView:a}=e,i=0==l?0:l-1,o=0!==l?t.slice(l-1,l+2):t.slice(0,2),d=(0,r.useCallback)(e=>{null!==e&&e.children[l-i].scrollIntoView()},[l,i]);return(0,r.useEffect)(()=>{window.history.replaceState(null,"",y.Z.urlIDPath(t[l].url_id,n))},[t,l,n]),(0,s.jsx)("div",{ref:d,className:"absolute h-full w-full",children:o.map((e,t)=>(0,s.jsx)("div",{className:"h-full",children:(0,s.jsx)(k.C,{className:"m-4",url:e,onView:()=>a(t+i)},e.url_id)},e.url_id))})};var Z=l(27570);let _=e=>{var t,l;let{breakpoints:n,response:m,feedLeadingElement:g,feedTrailingElement:h,likedByUsername:f,metaTags:j,sidePanel:w,urlIds:y=[]}=e,k=(0,a.useRouter)(),[_,E]=(0,r.useState)(k.asPath),[N,C]=(0,r.useState)(!1),[P,L]=(0,r.useState)(0),{isLoading:M,data:I=[],size:S,setSize:B}=m,{lg:T,md:D,sm:O}=o.screens,{width:R}=(0,d.iP)(),A=I.flatMap(e=>{let{items:t}=e;return t}).filter(e=>"url"===e.type),U=(0,r.useRef)(null),V=(0,r.useRef)(null),z=(null===(t=I[0])||void 0===t?void 0:t.items.length)===0,H=(null===(l=I[I.length-1])||void 0===l?void 0:l.items.length)===0,G=!0;(RparseInt(D)||R{if(!U.current)return;let e=I[I.length-1].items.filter(e=>"url"===e.type);U.current.clientHeight0&&W()},[I.length]);let W=()=>{let e=A.map(e=>e.url_id);y.push(...e),B(S+1)},{browserInfo:Q}=(0,c.bN)(),q=(0,r.useCallback)(e=>{window.history.pushState(null,"","".concat(_)),C(!0),L(e)},[_]),J=(0,r.useCallback)(()=>{C(!1),window.history.replaceState(null,"","".concat(_))},[_,C]);(0,r.useEffect)(()=>{let e=e=>{(N&&(null==e?void 0:e.key)==="Escape"||(null==e?void 0:e.key)==="Esc")&&J()};return window.addEventListener("keydown",e),window.addEventListener("popstate",J),()=>{window.removeEventListener("keydown",e),window.removeEventListener("popstate",J)}},[N,C,J]),(0,r.useEffect)(()=>{let e=e=>e===_&&J();return k.events.on("routeChangeStart",e),()=>{k.events.off("routeChangeStart",e)}},[J,_,k.events]),(0,r.useEffect)(()=>{E(k.asPath)},[k.asPath]);let X=(0,r.useMemo)(()=>N?(0,s.jsx)(u.V,{url:A[P]}):j,[N,P,A,j]),Y=(0,r.useMemo)(()=>N?(0,s.jsxs)("div",{className:"absolute bottom-0 z-10 sm:relative",children:[(0,s.jsx)(p,{className:"mb-6 cursor-pointer",onClick:J}),(0,s.jsx)(x.Z,{url:A[P],hideRelated:!G})]}):w,[N,P,w,J,A,G]);return(0,s.jsxs)(s.Fragment,{children:[X,(0,s.jsx)(Z.Z,{className:"flex w-full snap-y snap-mandatory overflow-y-scroll ".concat(N?"h-[calc(100vh-64px)] flex-col-reverse sm:h-full sm:flex-col md:flex-row-reverse":"h-full flex-col md:flex-row"),scrollTarget:V,sidePanel:Y,children:(0,s.jsxs)("div",{className:"relative h-full w-full snap-y snap-mandatory ".concat(G?"":"overflow-y-scroll"," sm:snap-none"),children:[g,V.current&&(0,s.jsx)(i.Z,{style:{overflow:"unset"},next:()=>W(),hasMore:!(z||H),loader:(0,s.jsx)("span",{}),dataLength:A.length,scrollableTarget:G?V.current:(0,s.jsx)(s.Fragment,{}),children:M?(0,s.jsx)(v,{breakpoints:n,limit:24}):A.length>0?N?(0,s.jsx)(F,{urls:A,likedByUsername:f,focusIndex:P,onItemView:e=>L(e)}):(0,s.jsx)("div",{ref:U,children:(0,s.jsx)(b,{urls:A,breakpoints:n,onItemClick:Q.isDesktop?q:void 0})}):(0,s.jsx)(s.Fragment,{})}),!N&&h]})})]})};var E=_},66612:function(e,t,l){l.r(t),l.d(t,{__N_SSP:function(){return L},default:function(){return M}});var n=l(85893),s=l(8433),a=l(67294),r=l(59457),i=l(5678),o=l(78112),d=l(89197),c=l(82483),m=l(40309),p=l(3467),u=l(49117),x=l(49941),g=l(9008),h=l.n(g),f=l(25994),j=l(16846);let w=e=>{let{node:t}=e,l=(0,f.Z)().publicRuntimeConfig;return(0,n.jsxs)(h(),{children:[(0,n.jsx)("link",{rel:"icon",href:"/favicon.ico"}),(0,n.jsx)("link",{rel:"icon",href:"/favicon.png",sizes:"32x32"}),(0,n.jsx)("link",{rel:"canonical",href:j.Z.nodePermalink(t.slug)}),(0,n.jsx)("link",{rel:"home",href:l.baseUrl}),(0,n.jsx)("meta",{name:"referrer",content:"always"},"referrer"),(0,n.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1.0, maximum-scale=5.0, user-scalable=0"},"viewport"),(0,n.jsx)("meta",{property:"fb:app_id",content:"1633239056950945"},"fb:app_id"),(0,n.jsx)("meta",{name:"google-site-verification",content:"DRwMRXEBYGtZLT9oxw2HnjLDkh8y_MhJADnD3LmiCM4"},"google-site-verification"),(0,n.jsx)("meta",{name:"msvalidate.01",content:"E4FA407B6FB31C729CB006EBABE76C31"},"msvalidate.01"),(0,n.jsx)("meta",{property:"al:web:should_fallback",content:"false"},"al:web:should_fallback"),(0,n.jsx)("title",{children:"".concat(t.name," • Mix")}),(0,n.jsx)("meta",{property:"og:type",content:"website"},"og:type"),(0,n.jsx)("meta",{property:"og:title",content:"".concat(t.name," on Mix")},"og:title"),(0,n.jsx)("meta",{property:"og:description",content:"The best media for you from across the web."},"og:description"),(0,n.jsx)("meta",{property:"og:url",content:j.Z.nodePermalink(t.slug)},"og:url"),(0,n.jsx)("meta",{property:"og:site_name",content:"Mix"},"og:site_name"),(0,n.jsx)("meta",{property:"og:image",content:"https://web.archive.org/web/20230205142117/https://assets.mix.com/assets/img/mix-dot-com-cad689f34536e269215f9e95e3973593.jpg"},"og:image"),(0,n.jsx)("meta",{name:"twitter:card",content:"summary_large_image"},"twitter:card"),(0,n.jsx)("meta",{name:"twitter:site",content:"@getmixapp"},"twitter:site"),(0,n.jsx)("meta",{name:"twitter:title",content:"".concat(t.name," on Mix")},"twitter:title"),(0,n.jsx)("meta",{name:"twitter:description",content:"The best media for you from across the web."},"twitter:description"),(0,n.jsx)("meta",{name:"twitter:image",content:"https://web.archive.org/web/20230205142117/https://assets.mix.com/assets/img/mix-dot-com-cad689f34536e269215f9e95e3973593.jpg"},"twitter:image"),(0,n.jsx)("meta",{name:"twitter:url",content:j.Z.nodePermalink(t.slug)},"twitter:url"),(0,n.jsx)("meta",{name:"twitter:app:name:iphone",content:"Mix"},"twitter:app:name:iphone"),(0,n.jsx)("meta",{name:"twitter:app:id:iphone",content:"1092817691"},"twitter:app:id:iphone"),(0,n.jsx)("meta",{name:"twitter:app:url:iphone",content:j.Z.nativePermalink(j.Z.nodePermalink(t.slug))},"twitter:app:url:iphone"),(0,n.jsx)("meta",{property:"al:ios:app_store_id",content:"1092817691"},"al:ios:app_store_id"),(0,n.jsx)("meta",{property:"al:ios:app_name",content:"Mix"},"al:ios:app_name"),(0,n.jsx)("meta",{property:"al:ios:url",content:j.Z.nativePermalink(j.Z.nodePermalink(t.slug))},"al:ios:url"),(0,n.jsx)("meta",{property:"al:android:package",content:"com.mix.android"},"al:android:package"),(0,n.jsx)("meta",{property:"al:android:app_name",content:"Mix"},"al:android:app_name"),(0,n.jsx)("meta",{property:"al:android:url",content:j.Z.nativePermalink(j.Z.nodePermalink(t.slug))},"al:android:url")]})};var v=l(2401);let b=e=>{let{slug:t,isFollowable:l}=e,{isLoading:s,data:a}=(0,m.Q)(x.Z.node.getFollowers(t)),r=null==a?void 0:a.items.filter(e=>"user"===e.type);return l?(0,n.jsx)("div",{children:s?(0,n.jsx)(v.j,{loadingLimit:4,heading:"Followed by"}):r?(0,n.jsx)(v.Z,{users:r,heading:"Followed by"}):(0,n.jsx)(n.Fragment,{})}):null};var y=l(92265);let k=e=>{let{name:t,isFollowable:l,isFollowing:s,slug:a,onFollow:r}=e;return(0,n.jsxs)("div",{className:"space-y-6",children:[(0,n.jsx)("p",{className:"text-3xl font-bold lg:text-4xl",children:t}),l?r?(0,n.jsx)("button",{className:"btn btn-primary btn-dot font-semibold",onClick:r,children:s?"Following":"Follow"}):(0,n.jsx)(y.Z,{className:"btn btn-primary btn-dot",deeplinkUrl:j.Z.nodePermalink(a),children:"Follow"}):(0,n.jsx)(n.Fragment,{})]})};var F=l(50919);let Z=e=>{let{relatedNodes:t,isLoading:l}=e;return(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{className:"mb-3 font-medium opacity-50",children:"Related topics"}),(0,n.jsx)("div",{className:"mb-4 flex flex-wrap",children:l?[,,,].fill(void 0).map((e,t)=>(0,n.jsx)(F.Z,{isLoading:!0},"topic-".concat(t))):t.map(e=>(0,n.jsx)(F.Z,{node:e},"topic-".concat(e.slug)))})]})},_=e=>{let{node:t,isLoading:l,recommendedNodes:s,onFollow:a}=e;return(0,n.jsxs)("div",{className:"space-y-8",children:[(0,n.jsx)(k,{...t,onFollow:a}),(0,n.jsx)(b,{slug:t.slug,isFollowable:t.isFollowable}),l?(0,n.jsx)(Z,{isLoading:!0}):s.length?(0,n.jsx)(Z,{relatedNodes:s}):(0,n.jsx)(n.Fragment,{})]})},E=e=>{let{node:t}=e;return(0,n.jsxs)("div",{className:"col-span-full p-4 text-center lg:p-6",children:[(0,n.jsx)("p",{className:"mb-3 text-sm font-medium opacity-75",children:"Sign up to see all content"}),(0,n.jsx)(y.Z,{className:"btn btn-primary btn-dot",deeplinkUrl:j.Z.nodePermalink(t.slug),children:"Get the App"})]})};var N=p.li.PageContext,C=p.li.PageContext.PageType;let P=e=>{var t;let{nodeDetails:l}=e,{isLoggedIn:p}=(0,c.O)(),g=[],[h,f]=(0,r.x)(l),{commandContext:j,changePageContext:v}=(0,d.D)();(0,a.useEffect)(()=>{f(l)},[l,f]),(0,i.LI)(()=>{v(new N({slug:{value:h.slug},page:C.TOPIC_PROFILE_PAGES,node:{value:h.slug}}))});let b=(0,a.useCallback)(async()=>{try{let e=h.isFollowing?x.Z.node.unfollow:x.Z.node.follow;f(e=>{e.isFollowing=!e.isFollowing}),await s.Z.request(e({slug:h.slug,context:j}))}catch(e){f(e=>{e.isFollowing=!e.isFollowing})}},[j,h.isFollowing,h.slug,f]),y=(0,m.I)(e=>({filter:{slug:h.slug,type:{url:10,node:0===e?5:void 0},page:e+1,ids:g},context:j}),x.Z.recommend.slug),{isLoading:k,data:F}=y,Z=(0,a.useMemo)(()=>null!==(t=null==F?void 0:F[0].items.filter(e=>"node"===e.type))&&void 0!==t?t:[],[F]),P=(0,a.useMemo)(()=>{if(h.isFollowable)return(0,n.jsx)(_,{node:h,isLoading:k,recommendedNodes:Z,onFollow:p?b:void 0})},[k,p,h,Z,b]);return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(o.Z,{breakpoints:P?u.r.breakpointsWithSidebar:u.r.breakpointsFullWidth,feedLeadingElement:h.isFollowable?(0,n.jsx)(n.Fragment,{}):(0,n.jsx)("div",{className:"m-6 text-6xl font-bold",children:h.name}),feedTrailingElement:p?(0,n.jsx)(n.Fragment,{}):(0,n.jsx)(E,{node:h}),metaTags:(0,n.jsx)(w,{node:l}),response:y,sidePanel:P,urlIds:g})})};var L=!0,M=P}}]); //# sourceMappingURL=612-d38654856b482bb3.js.map