"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9984],{5587:(e,t,l)=>{l.d(t,{x:()=>r});var s=l(25771),i=l(20622),n=l(51529),a=l(10407);function r(e){let{avatar:t,name:l,thumbnailUrl:r,imageUrl:c,className:o,fixed:d=!1,leadingContent:h}=e,x=(0,a.f_)(t,{size:"small"}),m=(0,a.f_)(r.trim()||c.trim(),{size:"small"});return(0,s.jsxs)("div",{className:(0,n.cn)("flex items-center rounded-full border border-white/20","bg-black/30 bg-blend-luminosity backdrop-blur-md",d?"h-10 px-2.5":"h-12 px-3",o),children:[h,(0,s.jsx)(i.e,{src:x,size:d?20:24,alt:l,className:(0,n.cn)("shrink-0",d?"mr-1":"mr-1.5")}),(0,s.jsx)("span",{className:(0,n.cn)("max-w-25 min-w-0 truncate font-medium text-white",d?"text-xs":"text-sm"),children:l}),m?(0,s.jsx)("img",{src:(0,a.f_)(m,{size:"small"}),alt:"",width:40,height:40,className:(0,n.cn)("shrink-0 border border-white/20 object-cover",d?"ml-3 size-8 rounded-[6px]":"ml-4 size-10 rounded-[8px]"),loading:"lazy",decoding:"async"}):(0,s.jsx)("div",{className:(0,n.cn)("shrink-0 border border-white/20 bg-white/10",d?"ml-3 size-8 rounded-[6px]":"ml-4 size-10 rounded-[8px]"),"aria-hidden":!0})]})}},20622:(e,t,l)=>{l.d(t,{e:()=>c});var s=l(25771),i=l(87163),n=l(51529),a=l(57425);let r=e=>{let{className:t="",...l}=e,n=(0,i.useMemo)(()=>({body:'',viewBox:{left:0,top:0,width:24,height:24},left:0,top:0,width:24,height:24}),[]);return(0,s.jsx)("div",{className:t,style:{height:"1em",aspectRatio:1},children:(0,s.jsx)(a.In,{...l,icon:n,height:"1em"})})};function c(e){let{src:t,size:l=40,fallbackIconSize:a=28,alt:c="",className:o,loading:d="lazy"}=e,h="string"==typeof t?t.trim():"",x=""!==h,[m,u]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{u(!1)},[h]),(0,s.jsx)("div",{className:(0,n.cn)("relative box-border flex shrink-0 items-center justify-center overflow-hidden rounded-full bg-neutral-700 text-neutral-400 ring-1 ring-white/10",o),style:{width:l,height:l,fontSize:a},children:x&&!m?(0,s.jsx)("img",{src:h,alt:c,width:l,height:l,className:"h-full w-full object-cover",onError:()=>u(!0),loading:d,fetchPriority:"low",decoding:"async"}):(0,s.jsx)(r,{className:"shrink-0 rounded-full object-cover opacity-[0.16]"})})}},64672:(e,t,l)=>{l.d(t,{O:()=>d});var s=l(25771),i=l(34587),n=l(51529),a=l(45413);let r={src:"/_next/static/media/logo1.fb030383.svg",height:157,width:1108,blurWidth:0,blurHeight:0},c={src:"/_next/static/media/logo2.292e06a1.svg",height:157,width:845,blurWidth:0,blurHeight:0},o={sm:"text-[20px]",md:"text-[24px]",lg:"text-[28px]"};function d(e){let{className:t,size:l="md",redirect:d=!0,smallLogo:h,height:x=28}=e,m=o[l],u=(0,i.rx)(),f="string"==typeof r?r:r.src,p="string"==typeof c?c:c.src,b=(0,s.jsx)("div",{className:(0,n.cn)(m,t,"flex items-center"),children:(0,s.jsx)("img",{src:h?p:f,alt:"",style:{height:x}})}),g=(0,s.jsx)("div",{className:(0,n.cn)(m,t,"flex items-center"),children:(0,s.jsx)("img",{src:h?f:p,alt:"",style:{height:x}})}),w=a.Q?g:b;return u&&d?(0,s.jsx)("a",{href:u,target:"_blank",rel:"noopener noreferrer",className:"inline-block cursor-pointer",children:w}):w}},89984:(e,t,l)=>{l.d(t,{FM:()=>y,P2:()=>v,W8:()=>w,XU:()=>f,Y9:()=>N,dI:()=>m,gP:()=>x,nR:()=>j,v3:()=>p,w3:()=>b});var s=l(25771),i=l(87163),n=l(85151),a=l(73860),r=l(64672),c=l(20622),o=l(51529),d=l(10407),h=l(5587);let x=2e3,m="".concat("https://world-media.pixverse.ai".replace(/\/+$/,""),"/realtime/live-bg.png?x-oss-process=style/cover-webp");function u(e,t){return e?e.startsWith("data:")||e.startsWith("blob:")?e:(0,d.f_)(e,{size:t,otherDomainSkipOssProcess:!1}):""}function f(e){if(e>=1e6){let t=e/1e6;return Number.isInteger(t)?"".concat(t,"M"):"".concat(t.toFixed(1),"M")}if(e>=1e3){let t=e/1e3;return Number.isInteger(t)?"".concat(t,"K"):"".concat(t.toFixed(1),"K")}return String(e)}function p(e){var t;let{phase:l,liveMedia:n,children:r,className:c,scaleMode:d="none",splashBackgroundSrc:h}=e,x=(0,i.useRef)(null),m=(0,a.A)(x),f=(t=null==m?void 0:m.width,"none"!==d&&t?Math.max(Math.min(t/430,1),.4):1),p=u(h,"large");return(0,s.jsxs)("div",{ref:x,className:(0,o.cn)("relative h-full w-full overflow-hidden bg-black text-white",c),children:[p?(0,s.jsx)("img",{src:p,alt:"",className:(0,o.cn)("absolute inset-0 h-full w-full object-cover transition-opacity duration-300","splash"===l?"opacity-100":"opacity-0"),loading:"eager",fetchPriority:"high",decoding:"async"}):null,(0,s.jsx)("div",{className:(0,o.cn)("absolute inset-0 bg-black/18 transition-opacity duration-300","splash"===l?"opacity-100":"opacity-0"),"aria-hidden":!0}),(0,s.jsx)("div",{className:(0,o.cn)("absolute inset-0 transition-opacity duration-300","live"===l?"opacity-100":"opacity-0"),children:n}),(0,s.jsx)("div",{className:"pointer-events-none absolute inset-x-0 top-0 z-10 h-32 bg-gradient-to-b from-black/62 to-transparent"}),(0,s.jsx)("div",{className:"pointer-events-none absolute inset-x-0 bottom-0 z-10 h-52 bg-gradient-to-t from-black/68 to-transparent"}),r?(0,s.jsx)("div",{className:"pointer-events-none absolute inset-0 z-20 overflow-hidden",children:(0,s.jsx)("div",{className:"pointer-events-none absolute top-0 left-0",style:{width:"calc(100% / ".concat(f,")"),height:"calc(100% / ".concat(f,")"),transform:"scale(".concat(f,")"),transformOrigin:"top left"},children:r})}):null]})}function b(e){let{active:t,src:l,className:n,loop:a=!0,muted:r=!0,videoRef:c,preload:d="auto",onEnded:h,onAudibleAutoplayBlocked:x}=e,m=(0,i.useRef)(null),u=null!=c?c:m;return(0,i.useEffect)(()=>{let e=u.current;e&&l&&(e.muted=r,e.load())},[r,l,u]),(0,i.useEffect)(()=>{if(!t)return;let e=u.current;if(!e)return;e.muted=r,e.currentTime=0;let l=e.play();l&&l.catch(()=>{r||(e.muted=!0,null==x||x(),e.play().catch(()=>{}))})},[t,r,x,l,u]),(0,s.jsx)("video",{ref:u,className:(0,o.cn)("h-full w-full object-cover",n),src:l,muted:r,playsInline:!0,loop:a,preload:d,onEnded:h})}function g(){let{t:e}=(0,n.Bd)();return(0,s.jsxs)("div",{className:"flex h-8 items-center gap-1.5 rounded-full border border-white/14 bg-white/14 px-3 text-sm font-medium text-white shadow-[0_8px_24px_rgba(0,0,0,0.24)] backdrop-blur-xl",children:[(0,s.jsx)("span",{className:"size-2.5 rounded-full bg-[#e7383b]","aria-hidden":!0}),(0,s.jsx)("span",{children:e("components.liveShare.live")})]})}function w(e){let{phase:t,room:l}=e,i=u(l.avatarSrc,"small");return(0,s.jsxs)("header",{className:"pointer-events-none absolute top-0 right-0 left-0 z-30 flex h-16 items-center justify-between px-5 pt-[env(safe-area-inset-top)]",children:[(0,s.jsx)("div",{className:"pointer-events-auto min-w-0",children:"splash"===t?(0,s.jsx)(r.O,{redirect:!1,height:16}):(0,s.jsxs)("div",{className:"flex h-9 min-w-0 items-center gap-2 rounded-full border border-white/12 bg-black/28 py-1 pr-3 pl-1.5 text-white shadow-[0_8px_24px_rgba(0,0,0,0.24)] backdrop-blur-xl",children:[(0,s.jsx)(c.e,{src:i,size:26,fallbackIconSize:16,className:"bg-white/12 ring-white/20"}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("p",{className:"max-w-34 truncate text-xs leading-4 font-semibold",children:l.title}),(0,s.jsx)("p",{className:"truncate text-[10px] leading-3 text-white/55",children:l.stats})]})]})}),(0,s.jsx)("div",{className:"pointer-events-auto flex items-center",children:(0,s.jsx)(g,{})})]})}function v(e){let{images:t}=e,{t:l}=(0,n.Bd)(),i=u(null==t?void 0:t.originalSrc,"large"),a=u(null==t?void 0:t.tryOnSrc,"large");return(0,s.jsxs)("div",{className:"absolute inset-x-0 top-[13.5%] z-10 h-[38%] max-h-[328px] min-h-64 px-5",children:[(0,s.jsxs)("div",{className:"relative grid h-full grid-cols-2 gap-4",children:[(0,s.jsx)("div",{className:"h-full overflow-hidden rounded-[22px] border border-white/18 bg-black/18 shadow-[0_20px_42px_rgba(0,0,0,0.25)] backdrop-blur-[2px]",children:i?(0,s.jsx)("img",{src:i,alt:"",className:"h-full w-full object-contain",loading:"eager",decoding:"async"}):null}),(0,s.jsx)("div",{className:"h-full overflow-hidden rounded-[22px] border border-white/75 bg-white/92 shadow-[0_20px_42px_rgba(0,0,0,0.18)]",children:a?(0,s.jsx)("img",{src:a,alt:"",className:"h-full w-full object-contain",loading:"eager",decoding:"async"}):null}),(0,s.jsx)("div",{className:"absolute top-1/2 left-1/2 flex size-14 -translate-x-1/2 -translate-y-1/2 items-center justify-center rounded-full bg-[linear-gradient(135deg,#ff8667_0%,#ed49ba_48%,#6851eb_100%)] text-[26px] leading-none font-black text-white shadow-[0_12px_30px_rgba(224,70,164,0.42)]",children:l("components.liveShare.vs")})]}),(0,s.jsxs)("div",{className:"mt-4 grid grid-cols-2 gap-4 px-8",children:[(0,s.jsx)("div",{className:"mx-auto flex h-8 min-w-24 items-center justify-center rounded-full border border-white/12 bg-white/10 px-4 text-base leading-none font-semibold text-white/86 shadow-[0_8px_18px_rgba(0,0,0,0.2)] backdrop-blur-xl",children:l("components.liveShare.original")}),(0,s.jsx)("div",{className:"mx-auto flex h-8 min-w-24 items-center justify-center rounded-full border border-white/12 bg-white/10 px-4 text-base leading-none font-semibold text-white/86 shadow-[0_8px_18px_rgba(0,0,0,0.2)] backdrop-blur-xl",children:l("components.liveShare.tryOn")})]})]})}function j(e){let{queueItem:t}=e,{t:l}=(0,n.Bd)();return(0,s.jsxs)("div",{className:"absolute right-5 bottom-[calc(6.75rem+env(safe-area-inset-bottom))] left-5 z-20",children:[(0,s.jsx)("p",{className:"mb-2 text-xs leading-4 font-medium text-white/62",children:l("components.liveShare.userPicked")}),(0,s.jsx)(h.x,{...t,fixed:!0,className:"w-fit max-w-full"})]})}function N(e){let{started:t,durationMs:l=x}=e,{t:i}=(0,n.Bd)();return(0,s.jsxs)("div",{className:"absolute right-5 bottom-[calc(2.75rem+env(safe-area-inset-bottom))] left-5 z-20",children:[(0,s.jsx)("p",{className:"mb-3 text-sm leading-5 text-white/62",children:i("components.liveShare.applyingOutfit")}),(0,s.jsx)("div",{className:"h-1 overflow-hidden rounded-full bg-white/18",children:(0,s.jsx)("div",{className:(0,o.cn)("h-full rounded-full bg-[linear-gradient(90deg,#ff6b31_0%,#df45c3_48%,#5c74ff_100%)]",t?"w-full":"w-0"),style:{transition:"width ".concat(l,"ms linear")}})})]})}function y(e){let{phase:t,messages:l=[],headline:i,headlineAlign:a="left"}=e,{t:r}=(0,n.Bd)();return(0,s.jsxs)("div",{className:(0,o.cn)("absolute right-0 bottom-[calc(2rem+env(safe-area-inset-bottom))] left-0 z-20 px-4 transition-all duration-300","live"===t?"translate-y-0 opacity-100":"translate-y-4 opacity-0"),"aria-hidden":"live"!==t,children:[i?(0,s.jsx)("h1",{className:(0,o.cn)("mb-6 max-w-[350px] text-[48px] leading-[1.02] font-black tracking-normal text-white","center"===a?"mx-auto text-center":""),children:i}):null,l.length?(0,s.jsx)("ul",{className:"flex list-none flex-col gap-2","aria-label":r("components.liveShare.chat"),children:l.map(e=>(0,s.jsxs)("li",{className:"w-fit max-w-[78%] rounded-lg bg-black/34 px-2.5 py-2 text-xs leading-4 text-white shadow-[0_8px_20px_rgba(0,0,0,0.18)] backdrop-blur-xl",children:[(0,s.jsxs)("span",{className:"text-white/55",children:[e.name,": "]}),(0,s.jsx)("span",{children:e.content})]},e.id))}):null]})}}}]);