5855.3508f5922084523c.js
25.5 KB
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1831,1964,5855,9116],{3441:(e,t,n)=>{n.d(t,{S:()=>i});var r=n(25771),l=n(88355),a=n(34438),A=n(8640);let i=e=>{let{className:t,icon:n,title:i,description:s,confirmText:o,cancelText:c,onConfirm:u,onCancel:d,confirmButton:m,cancelButton:p}=e;return(0,r.jsxs)(a.P.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:(0,l.A)("flex h-full w-full flex-col items-center text-center",t),children:[n||null,i?(0,r.jsx)("h1",{className:"mb-1.5 text-xl font-bold text-white",children:i}):null,s?(0,r.jsx)("p",{className:"mb-6 max-w-[80%] text-sm text-zinc-500",children:s}):null,(0,r.jsxs)("div",{className:(0,l.A)("flex gap-7 max-md:flex-col"),children:[m,p,!m&&o?(0,r.jsx)(A.$,{ring:!0,shape:"round",onClick:u,type:"secondary",children:o}):null,!p&&c?(0,r.jsx)(A.$,{shape:"round",onClick:d,children:c}):null]})]})}},9116:(e,t,n)=>{n.d(t,{P5:()=>c,Pp:()=>o,oh:()=>u});var r=n(31964);let l=null,a=null,A=new Set,i=new Set,s=e=>{let{targetRoute:t,trigger:n,kind:l,status:a,cacheHit:A}=e,s="".concat(n,":").concat(t,":").concat(l,":").concat(a);i.has(s)||(i.add(s),(0,r.Yc)("realtime_entry_prefetch",{prefetch_trigger:n,prefetch_kind:l,prefetch_status:a,prefetch_cache_hit:A,target_route:t,target_module:(e=>e.startsWith("/world-play")?"WorldPlayRealtime":e.startsWith("/preset-config")?"RealtimeVideo":"")(t)}))},o=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"unknown";if(!e)return Promise.resolve();if(e.startsWith("/world-play")){let r=!!l;return(s({targetRoute:e,trigger:t,kind:"module",status:r?"hit":"started",cacheHit:r}),r)?l||Promise.resolve():(!l&&(l=Promise.all([n.e(5390),n.e(6953),n.e(2699),n.e(3),n.e(1573),n.e(980),n.e(7173),n.e(5833),n.e(2728),n.e(5588),n.e(4611),n.e(1981),n.e(109),n.e(4617),n.e(445),n.e(4397),n.e(4233),n.e(7027),n.e(3474),n.e(1298),n.e(2321),n.e(7956),n.e(8917),n.e(1459),n.e(824),n.e(5278),n.e(7328),n.e(3809),n.e(4823),n.e(8948),n.e(314),n.e(3144),n.e(2241),n.e(5094),n.e(8858),n.e(4732),n.e(2245),n.e(1831)]).then(n.bind(n,22245))),l).then(()=>{s({targetRoute:e,trigger:t,kind:"module",status:"success",cacheHit:!1})}).catch(n=>{throw l=null,s({targetRoute:e,trigger:t,kind:"module",status:"error",cacheHit:!1}),n})}if(e.startsWith("/preset-config")){let r=!!a;return(s({targetRoute:e,trigger:t,kind:"module",status:r?"hit":"started",cacheHit:r}),r)?a||Promise.resolve():(!a&&(a=Promise.all([n.e(5390),n.e(6953),n.e(2699),n.e(3),n.e(1573),n.e(980),n.e(7173),n.e(5833),n.e(2728),n.e(5588),n.e(4611),n.e(1981),n.e(109),n.e(4617),n.e(445),n.e(4397),n.e(4233),n.e(7027),n.e(3474),n.e(1298),n.e(2321),n.e(7956),n.e(8917),n.e(1459),n.e(824),n.e(5278),n.e(7328),n.e(3809),n.e(4823),n.e(8948),n.e(314),n.e(3144),n.e(2241),n.e(5094),n.e(8858),n.e(4732),n.e(5929),n.e(1503),n.e(8329),n.e(2957),n.e(6422),n.e(5577),n.e(984),n.e(6733),n.e(4644)]).then(n.bind(n,22957))),a).then(()=>{s({targetRoute:e,trigger:t,kind:"module",status:"success",cacheHit:!1})}).catch(n=>{throw a=null,s({targetRoute:e,trigger:t,kind:"module",status:"error",cacheHit:!1}),n})}return Promise.resolve()},c=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"unknown";if(!t)return;let r=A.has(t);try{r||(A.add(t),e.prefetch(t)),s({targetRoute:t,trigger:n,kind:"route_module",status:r?"hit":"started",cacheHit:r})}catch(e){}o(t,n).catch(()=>{})},u=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"desktop_idle";return(e=>{let t=window;if("function"==typeof t.requestIdleCallback){let n=t.requestIdleCallback(e,{timeout:1200});return()=>{var e;return null==(e=t.cancelIdleCallback)?void 0:e.call(t,n)}}let n=globalThis.setTimeout(e,0);return()=>globalThis.clearTimeout(n)})(()=>{o(e,t).catch(()=>{})})}},11656:(e,t,n)=>{n.d(t,{$:()=>s});var r=n(25771),l=n(85151),a=n(88355),A=n(62902),i=n(50167);let s=()=>{let{t:e}=(0,l.Bd)();return(0,r.jsxs)("div",{className:(0,a.A)("relative z-1 flex h-full w-full items-center justify-center"),children:[(0,r.jsx)(A.A,{className:(0,a.A)("absolute! top-0 left-0 z-0 h-full w-full"),color1:"#423900",color2:"#040024",color3:"#3b006b",timeSpeed:1.45,colorBalance:-.02,warpStrength:1.4,warpFrequency:5,warpSpeed:2.3,warpAmplitude:36,blendAngle:-94,blendSoftness:.29,rotationAmount:480,noiseScale:2.35,grainAmount:.18,grainScale:2.2,grainAnimated:!1,contrast:1.55,gamma:1.6,saturation:1.65,centerX:-.02,centerY:0,zoom:1.65}),(0,r.jsxs)("div",{className:"relative z-2 flex w-full flex-col items-center gap-2 text-center text-white/70",children:[(0,r.jsx)(i.R,{className:"text-6xl text-white/80"}),(0,r.jsx)("div",{className:"text-[20px] font-medium",children:e("components.discover.worldCard.sessionError","Session Error!")}),(0,r.jsx)("div",{className:"mx-[20%] text-sm",children:e("components.discover.worldCard.errorDescription","Please try again later.")})]})]})}},15266:(e,t,n)=>{n.d(t,{Y:()=>r});function r(e){if(!e)return"***";let t=String(e);if(t.length<=8)return"***";let n=t.substring(0,4),r=t.substring(t.length-4);return"".concat(n,"***").concat(r)}},15313:(e,t,n)=>{n.d(t,{o:()=>c});var r=n(25771),l=n(85151),a=n(88355),A=n(8640),i=n(62902),s=n(50167),o=n(28858);let c=()=>{let{t:e}=(0,l.Bd)(),t=(0,o.kE)();return(0,r.jsxs)("div",{className:(0,a.A)("relative z-1 flex h-full w-full items-center justify-center"),children:[(0,r.jsx)(i.A,{className:(0,a.A)("absolute! top-0 left-0 z-0 h-full w-full"),color1:"#423900",color2:"#040024",color3:"#3b006b",timeSpeed:1.45,colorBalance:-.02,warpStrength:1.4,warpFrequency:5,warpSpeed:2.3,warpAmplitude:36,blendAngle:-94,blendSoftness:.29,rotationAmount:480,noiseScale:2.35,grainAmount:.18,grainScale:2.2,grainAnimated:!1,contrast:1.55,gamma:1.6,saturation:1.65,centerX:-.02,centerY:0,zoom:1.65}),(0,r.jsxs)("div",{className:"relative z-2 flex w-full flex-col items-center gap-4 text-center text-white/70",children:[(0,r.jsx)(s.R,{className:"text-6xl text-white/80"}),(0,r.jsx)("div",{className:"text-[20px] font-medium",children:e("components.discover.worldCard.sessionEnd")}),(0,r.jsxs)("div",{className:"mx-[20%] text-sm",children:[e("components.discover.worldCard.endedDescriptionLine1","This live stream has ended."),(0,r.jsx)("br",{}),e("components.discover.worldCard.endedDescriptionLine2","Back to World Gallery to View More")]}),(0,r.jsx)(A.$,{shape:"round",ring:!0,type:"secondary",onClick:()=>t.push("/discover/gallery/"),children:e("components.live.backToGallery")})]})]})}},17938:(e,t,n)=>{n.r(t),n.d(t,{LivePageClient:()=>R});var r=n(25771),l=n(87163),a=n(85151),A=n(30990),i=n(41377),s=n(35104),o=n(37468),c=n(30008),u=n(3441),d=n(28133),m=n(49855),p=n(28858),h=n(65303),f=n(10407),v=n(39502),x=n(22524),w=n(93397),g=n(15313),_=n(11656),C=n(25234),S=n(89232);async function y(){var e;let t=navigator,n=null==(e=t.getAutoplayPolicy)?void 0:e.call(t,"mediaelement");if(n)return n;let r=new Audio("data:audio/wav;base64,UklGRgQCAABXQVZFZm10IBAAAAABAAEAQB8AAIA+AAACABAAZGF0YeABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=");r.muted=!1,r.volume=1,r.setAttribute("playsinline","true");try{let e=r.play();return e&&await e,"allowed"}catch(e){return"allowed-muted"}finally{r.pause(),r.removeAttribute("src"),r.load()}}let b=(0,i.default)(()=>Promise.all([n.e(7399),n.e(8140),n.e(411),n.e(8484),n.e(5719),n.e(8886),n.e(5065),n.e(7827),n.e(5745),n.e(9168),n.e(9454),n.e(7002),n.e(1803),n.e(8413),n.e(4965),n.e(6953),n.e(2699),n.e(3),n.e(1573),n.e(980),n.e(5833),n.e(2728),n.e(5588),n.e(4611),n.e(1981),n.e(109),n.e(4617),n.e(445),n.e(4397),n.e(4233),n.e(7027),n.e(3474),n.e(1298),n.e(2321),n.e(7956),n.e(8917),n.e(1459),n.e(824),n.e(5278),n.e(7328),n.e(3809),n.e(4823),n.e(8948),n.e(314),n.e(3144),n.e(2241),n.e(7429)]).then(n.bind(n,17429)).then(e=>e.DefaultLive),{loadableGenerated:{webpack:()=>[17429]},ssr:!1}),E=(0,i.default)(()=>Promise.all([n.e(4002),n.e(6953),n.e(2699),n.e(3),n.e(1573),n.e(980),n.e(7173),n.e(990),n.e(6960),n.e(5833),n.e(2728),n.e(5588),n.e(4611),n.e(1981),n.e(109),n.e(4617),n.e(445),n.e(4397),n.e(4233),n.e(7027),n.e(3474),n.e(1298),n.e(2321),n.e(7956),n.e(8917),n.e(1459),n.e(824),n.e(5278),n.e(7328),n.e(3809),n.e(4823),n.e(8948),n.e(314),n.e(3144),n.e(2241),n.e(9984),n.e(265),n.e(8905),n.e(7023)]).then(n.bind(n,88905)).then(e=>e.DressLive),{loadableGenerated:{webpack:()=>[88905]},ssr:!1}),N=()=>(0,r.jsx)("div",{className:"fixed inset-0 z-50 min-h-screen",children:(0,r.jsx)(C.R,{})}),I=e=>{let{children:t}=e;return(0,r.jsx)("div",{className:"fixed inset-0 z-1002 h-dvh w-screen",children:t})},k=e=>{var t;let{detailAudioMuted:n,onDetailAudioMutedChange:l}=e,{sessionState:a}=c.Z.useData(),{liveInfo:A}=c.Z.useOptions();return"end"===a?(0,r.jsx)(I,{children:(0,r.jsx)(g.o,{})}):"error"===a?(0,r.jsx)(I,{children:(0,r.jsx)(_.$,{})}):"block"===a?(0,r.jsx)(I,{children:(0,r.jsx)(w.e,{})}):"connecting"===a?null:(null==A||null==(t=A.extra)?void 0:t.extraType)===m.fW.dress?(0,r.jsx)(E,{detailAudioMuted:n}):(0,r.jsx)(b,{detailAudioMuted:n,onDetailAudioMutedChange:l})},j=e=>{let{detailAudioMuted:t,onBootstrapConnectingChange:n,onDetailAudioMutedChange:a}=e,{sessionState:A}=c.Z.useData(),i=(0,l.useRef)(A);i.current=A,(0,l.useEffect)(()=>{n("connecting"===A)},[n,A]);let{send:s}=c.Z.useEvents();return(0,l.useEffect)(()=>{if("end"!==i.current)return(0,f.x3)().then(e=>{e&&s("join",void 0)}),()=>{"end"!==i.current&&(0,f.x3)().then(e=>{e&&s("leave",void 0)})}},[s]),(0,r.jsx)(k,{detailAudioMuted:t,onDetailAudioMutedChange:a})},T=()=>{var e;let{t}=(0,a.Bd)(),i=(0,p.kE)(),f=(0,s.useSearchParams)(),w=f.get("sessionId"),_=f.get("presetId"),C=f.get("liveType")||"",b=f.get("from")||"",E=f.get("account_id")||"",[k,T]=(0,l.useState)(null),R=(0,l.useRef)(new Set);(0,l.useEffect)(()=>{if(w||_){if(C===m.fW.dress)return void Promise.all([n.e(4002),n.e(6953),n.e(2699),n.e(3),n.e(1573),n.e(980),n.e(7173),n.e(990),n.e(6960),n.e(5833),n.e(2728),n.e(5588),n.e(4611),n.e(1981),n.e(109),n.e(4617),n.e(445),n.e(4397),n.e(4233),n.e(7027),n.e(3474),n.e(1298),n.e(2321),n.e(7956),n.e(8917),n.e(1459),n.e(824),n.e(5278),n.e(7328),n.e(3809),n.e(4823),n.e(8948),n.e(314),n.e(3144),n.e(2241),n.e(9984),n.e(265),n.e(8905),n.e(7023)]).then(n.bind(n,88905));""===C&&Promise.all([n.e(7399),n.e(8140),n.e(411),n.e(8484),n.e(5719),n.e(8886),n.e(5065),n.e(7827),n.e(5745),n.e(9168),n.e(9454),n.e(7002),n.e(1803),n.e(8413),n.e(4965),n.e(6953),n.e(2699),n.e(3),n.e(1573),n.e(980),n.e(5833),n.e(2728),n.e(5588),n.e(4611),n.e(1981),n.e(109),n.e(4617),n.e(445),n.e(4397),n.e(4233),n.e(7027),n.e(3474),n.e(1298),n.e(2321),n.e(7956),n.e(8917),n.e(1459),n.e(824),n.e(5278),n.e(7328),n.e(3809),n.e(4823),n.e(8948),n.e(314),n.e(3144),n.e(2241),n.e(7429)]).then(n.bind(n,17429))}},[C,_,w]);let[D,M]=(0,l.useState)(null),{loading:P,data:U}=(0,A.A)(async()=>{if(!w&&!_)return T({icon:(0,r.jsx)(d.$,{className:"text-6xl opacity-80"}),confirmText:t("components.live.backToGallery"),onConfirm:()=>i.push("/discover/gallery/"),title:t("components.live.emptyTitle"),description:t("components.live.emptyDescription")}),null;T(null);try{let e=await (0,o.gf)({sessionId:w,presetId:_});if(!e)return T({icon:(0,r.jsx)(d.$,{className:"text-6xl opacity-80"}),confirmText:t("components.live.backToGallery"),onConfirm:()=>window.location.reload(),title:t("components.live.emptyTitle"),description:t("components.live.emptyDescription")}),null;return e||null}catch(e){if(h.d.isResponseUnAuthorized(e))return T({icon:(0,r.jsx)(d.$,{className:"text-6xl opacity-80"}),title:t("components.live.loginRequiredTitle"),description:t("components.live.loginRequiredDescription")}),null;T({icon:(0,r.jsx)(d.$,{className:"text-6xl opacity-80"}),confirmText:t("components.live.retry"),onConfirm:()=>window.location.reload(),title:t("components.live.errorTitle"),description:t("components.live.errorDescription")})}return null},{manual:!1,refreshDeps:[w,_]});(0,l.useEffect)(()=>{M(null)},[_,w]);let X=!!(U&&w&&String(U.db_session_id)===w),z=!!(U&&_&&String(null==(e=U.preset_info)?void 0:e.preset_id)===_),L=X||z,O=!!(L&&U&&!U.end),B=P||O&&!1!==D,{detailAudioMuted:W,keepMuted:q,playWithSound:Y,setDetailAudioMuted:F,showAudioAutoplayPrompt:H}=function(e){let{active:t,sessionId:n}=e,[r,a]=(0,l.useState)(!0),[A,i]=(0,l.useState)(!1),s=(0,l.useRef)(!1);(0,l.useEffect)(()=>{if(s.current=!1,a(!0),i(!1),!t||!n)return;let e=!1;return y().then(t=>{e||s.current||(a("allowed"!==t),i("allowed-muted"===t))}),()=>{e=!0}},[t,n]);let o=(0,l.useCallback)(e=>{s.current=!0,a(e),i(!1)},[]);return{detailAudioMuted:r,keepMuted:(0,l.useCallback)(()=>{o(!0)},[o]),playWithSound:(0,l.useCallback)(()=>{o(!1)},[o]),setDetailAudioMuted:o,showAudioAutoplayPrompt:A}}({active:O,sessionId:w||(_?"preset:".concat(_):null)});return((0,l.useEffect)(()=>{var e,t,n;if(!O||!U)return;let r="".concat(U.db_session_id,":").concat(b,":").concat(E);R.current.has(r)||(R.current.add(r),(0,v.u4)({key:v.yW.REALTIME_LIVEROOM_ENTER,params:{[v.pX.PRESET_ID]:String(null!=(t=null==(e=U.preset_info)?void 0:e.preset_id)?t:""),[v.pX.SESSION_ID]:String(null!=(n=U.db_session_id)?n:""),[v.pX.REALTIME_MODEL]:(e=>{var t;return(null==(t=e.extra)?void 0:t.extraType)===m.fW.dress?"V":"R"})(U),[v.pX.ENTER_SOURCE]:b,[v.pX.SHARER_UID]:E,[v.pX.QUEUED_USER_CNT]:(e=>{var t,n,r,l,a,A,i;return null!=(i=null!=(A=null==(n=e.extra)||null==(t=n.queue)?void 0:t.total)?A:null==(a=e.extra)||null==(l=a.queue)||null==(r=l.items)?void 0:r.length)?i:0})(U),[v.pX.CURRENT_ACTIVE_CONTENT_TYPE]:(e=>{var t;let n=null==(t=e.extra)?void 0:t.nowActive;return n?n.isDefault?"default_live":"user_interacting":""})(U)}}))},[U,b,O,E]),P||!k&&U&&L)?!P&&L&&(null==U?void 0:U.end)?(0,r.jsx)(I,{children:(0,r.jsx)(g.o,{})}):(0,r.jsxs)("div",{className:"relative min-h-screen",children:[B&&(0,r.jsx)(N,{}),(0,r.jsx)(x.H,{open:H,onCancel:q,onConfirm:Y}),L&&U&&!U.end?(0,r.jsx)(c.Z,{joinOptions:{appid:U.agora_app_id,channel:U.channel_name,token:U.agora_token,uid:U.agora_uid},ready:!!(U.agora_app_id&&U.channel_name&&U.agora_token&&U.agora_uid),liveInfo:U,children:(0,r.jsx)(S.D,{liveInfo:U,children:(0,r.jsx)(j,{detailAudioMuted:W,onBootstrapConnectingChange:M,onDetailAudioMutedChange:F})})},U.db_session_id):null]}):(0,r.jsx)("div",{className:"flex min-h-screen flex-col items-center justify-center",children:(0,r.jsx)(u.S,{...k})})},R=()=>(0,r.jsx)(l.Suspense,{fallback:(0,r.jsx)(N,{}),children:(0,r.jsx)(T,{})})},21831:(e,t,n)=>{n.d(t,{Iz:()=>A,PN:()=>i,YH:()=>s,f1:()=>a});let r="world_play_preset_cache",l="world_play_ended_preset_id",a=e=>{try{let t=window.sessionStorage.getItem(r),n=t?JSON.parse(t):{};n[String(e.id)]={cachedAt:Date.now(),preset:e},window.sessionStorage.setItem(r,JSON.stringify(n))}catch(e){}},A=e=>{try{let t=window.sessionStorage.getItem(r);if(!t)return null;let n=JSON.parse(t)[String(e)];if(!n||Date.now()-n.cachedAt>3e5)return null;return n.preset}catch(e){return null}},i=e=>{if(e)try{window.sessionStorage.setItem(l,String(e))}catch(e){}},s=e=>{if(!e)return!1;try{return window.sessionStorage.getItem(l)===String(e)}catch(e){return!1}}},22524:(e,t,n)=>{n.d(t,{H:()=>A});var r=n(25771),l=n(85151),a=n(69190);function A(e){let{open:t,onCancel:n,onConfirm:A}=e,{t:i}=(0,l.Bd)();return(0,r.jsx)(a.aF,{open:t,width:360,title:i("components.live.audioPromptTitle"),subTitle:i("components.live.audioPromptDescription"),cancelText:i("components.live.audioPromptCancel"),confirmText:i("components.live.audioPromptConfirm"),showCloseButton:!1,maskClosable:!1,overlayClassName:"!z-[1100]",contentClassName:"!z-[1101]",onCancel:n,onConfirm:A})}},25234:(e,t,n)=>{n.d(t,{R:()=>c});var r=n(25771),l=n(87163),a=n(85151),A=n(88355),i=n(72564),s=n(62902),o=n(18870);let c=()=>{let[e,t]=(0,l.useState)(0),n=(0,l.useRef)(0),c=(0,l.useRef)(null);(0,l.useEffect)(()=>{t(0),c.current=performance.now();let e=r=>{var l;let a=null!=(l=c.current)?l:r,A=r-a;t(A),A<15e3&&(n.current=requestAnimationFrame(e))};return n.current=requestAnimationFrame(e),()=>{cancelAnimationFrame(n.current)}},[]);let{t:u}=(0,a.Bd)(),d=100*(1-(1-Math.min(1,e/15e3))**3),m=Math.min(99,Math.round(d));return(0,r.jsxs)("div",{className:(0,A.A)("relative z-1 flex h-full w-full flex-col items-center justify-center text-center"),children:[(0,r.jsx)(s.A,{className:(0,A.A)("absolute! top-0 left-0 z-0 h-full w-full"),color1:"#423900",color2:"#040024",color3:"#3b006b",timeSpeed:1.45,colorBalance:-.02,warpStrength:1.4,warpFrequency:5,warpSpeed:2.3,warpAmplitude:36,blendAngle:-94,blendSoftness:.29,rotationAmount:480,noiseScale:2.35,grainAmount:.18,grainScale:2.2,grainAnimated:!1,contrast:1.55,gamma:1.6,saturation:1.65,centerX:-.02,centerY:0,zoom:1.65}),e>=15e3?(0,r.jsxs)("div",{className:"animate-in fade-in z-2 flex flex-col items-center gap-3 pt-1 text-center duration-500",role:"status","aria-live":"polite",children:[(0,r.jsx)(i.A,{className:"size-10 text-white/90 motion-safe:animate-spin","aria-hidden":!0}),(0,r.jsx)("p",{className:"text-sm text-white/55",children:u("components.discover.worldCard.connectionExceptionRetrying","Connection exception. Retrying…")})]}):(0,r.jsxs)("div",{className:"animate-in fade-in z-2 w-full space-y-3 duration-500",children:[(0,r.jsxs)("p",{className:"font-semibold tracking-tight text-white tabular-nums transition-[opacity,transform] duration-300 ease-out","aria-live":"polite",children:[m,(0,r.jsx)("span",{className:"font-medium text-white/70",children:"%"})]}),(0,r.jsx)("div",{children:u("components.discover.worldCard.connectingToLiveStream","Connecting to live stream...")}),(0,r.jsx)(o.z,{percent:d,className:"mx-auto h-2 w-[30%] bg-white/10",barClassName:"transition-none",gradient:!0,gradientClassName:"bg-linear-to-r from-violet-500 to-fuchsia-500","aria-label":u("components.discover.worldCard.connectionProgress","Connection progress")})]})]})}},31964:(e,t,n)=>{n.d(t,{$S:()=>c,Yc:()=>m,c4:()=>u,k4:()=>p,re:()=>d});var r=n(15266),l=n(22199);let a="realtime_launch_trace",A=()=>{var e;return(null==(e=window.crypto)?void 0:e.randomUUID)?window.crypto.randomUUID():"".concat(Date.now().toString(36),"-").concat(Math.random().toString(36).slice(2,10))},i=e=>({...e,launchMode:e.launchMode||"unknown",entrySource:e.entrySource||"unknown"}),s=()=>{try{let e=window.sessionStorage.getItem(a);if(!e)return null;let t=JSON.parse(e);if(!t.launchTraceId||!t.startedAt)return null;if(Date.now()-t.startedAt>18e5)return window.sessionStorage.removeItem(a),null;return i(t)}catch(e){return null}},o=e=>{try{window.sessionStorage.setItem(a,JSON.stringify(i(e)))}catch(e){}},c=e=>{let t=s();if(!t)return null;let n=i({...t,...e});return o(n),n},u=function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=s();if(n)return c(t)||n;let r=i({launchTraceId:A(),startedAt:Date.now(),launchMode:t.launchMode||"unknown",entrySource:t.entrySource||"unknown",targetRoute:t.targetRoute,pipeline:t.pipeline,presetId:t.presetId,reservationId:t.reservationId});return o(r),m("realtime_entry_click",{pipeline:r.pipeline||"default",preset_id:null!=(e=r.presetId)?e:"",fallback_entry:!0}),r},d=()=>(e=>{var t;return e?{launch_trace_id:e.launchTraceId,launch_mode:e.launchMode,entry_source:e.entrySource,target_route:e.targetRoute||"",launch_pipeline:e.pipeline||"",launch_preset_id:null!=(t=e.presetId)?t:"",launch_reservation_id:e.reservationId?(0,r.Y)(e.reservationId):"",launch_elapsed_ms:Date.now()-e.startedAt}:{launch_trace_id:"",launch_mode:"unknown",entry_source:"unknown",target_route:"",launch_pipeline:"",launch_preset_id:"",launch_reservation_id:"",launch_elapsed_ms:null}})(s()),m=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;(0,l.Zp)(e,{...d(),...t},n)},p=function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=i({launchTraceId:A(),startedAt:Date.now(),launchMode:t.launchMode||"unknown",entrySource:t.entrySource||"unknown",targetRoute:t.targetRoute,pipeline:t.pipeline,presetId:t.presetId,reservationId:t.reservationId});return o(n),m("realtime_entry_click",{pipeline:n.pipeline||"default",preset_id:null!=(e=n.presetId)?e:""}),n}},89232:(e,t,n)=>{n.d(t,{D:()=>h,r:()=>p});var r=n(25771),l=n(87163),a=n(30008),A=n(49855),i=n(25781),s=n(39502);let o=()=>{},c=(0,l.createContext)({recordComment:o,recordDownload:o,recordSelectMedia:o,recordShare:o,recordUploadMedia:o,reportExit:o,setUploadingMedia:o}),u=()=>({active:!1,startedAt:0,userWatchRoundCnt:0,userInteractCnt:0,userInteractCntDefault:0,userInteractCntCustom:0,userMediaCnt:0,userInQueueCnt:0,uploadMediaCnt:0,selectMediaCnt:0,shareCnt:0,downloadCnt:0,commentCnt:0,watchRoundKeys:new Set,userInteractKeys:new Set,userQueueKeys:new Set}),d=e=>e?e.queueId||"".concat(e.uid,"-").concat(e.timestamp,"-").concat(e.revision):"",m=(e,t)=>!!(e&&t>0&&Number(e.uid)===Number(t));function p(){return(0,l.useContext)(c)}function h(e){let{children:t,liveInfo:n}=e,{sessionState:o}=a.Z.useData(),{active:p,queueItem:h}=a.Z.useDress(),f=(0,i.kH)(e=>e.userInfo.accountId),v=(0,l.useRef)(n),x=(0,l.useRef)(o),w=(0,l.useRef)(p),g=(0,l.useRef)(h),_=(0,l.useRef)(f),C=(0,l.useRef)(0),S=(0,l.useRef)(null),y=(0,l.useRef)(u());v.current=n,x.current=o,w.current=p,g.current=h,_.current=f;let b=(0,l.useCallback)(()=>{null!=S.current&&(window.clearTimeout(S.current),S.current=null)},[]),E=(0,l.useCallback)(e=>{let t=y.current;if(!t.active)return;let n=d(e);!n||t.watchRoundKeys.has(n)||(t.watchRoundKeys.add(n),t.userWatchRoundCnt+=1)},[]),N=(0,l.useCallback)(e=>{let t=y.current;if(!t.active||!m(e,_.current))return;let n=d(e);if(!(!n||t.userInteractKeys.has(n))){if(t.userInteractKeys.add(n),t.userInteractCnt+=1,null==e?void 0:e.isDefault){t.userInteractCntDefault+=1;return}t.userInteractCntCustom+=1}},[]),I=(0,l.useCallback)(e=>{let t=y.current;if(!t.active||!m(e,_.current))return;let n=d(e);!n||t.userQueueKeys.has(n)||(t.userQueueKeys.add(n),t.userInQueueCnt+=1)},[]),k=(0,l.useCallback)(()=>{E(w.current),N(w.current),I(g.current)},[N,I,E]),j=(0,l.useCallback)(()=>{"end"!==x.current&&v.current&&!y.current.active&&"hidden"!==document.visibilityState&&(y.current={...u(),active:!0,startedAt:Date.now()},k())},[k]),T=(0,l.useCallback)(()=>C.current>0?"uploading_media":m(w.current,_.current)?"interacting":m(g.current,_.current)?"in_queue":"watching",[]),R=(0,l.useCallback)(e=>{var t,n,r,l;b();let a=y.current,i=v.current;if(!a.active||!i)return;a.active=!1;let o=Math.max(0,(Date.now()-a.startedAt)/1e3);(0,s.u4)({key:s.yW.REALTIME_LIVEROOM_EXIT,params:{[s.pX.PRESET_ID]:String(null!=(n=null==(t=i.preset_info)?void 0:t.preset_id)?n:""),[s.pX.SESSION_ID]:String(null!=(r=i.db_session_id)?r:""),[s.pX.REALTIME_MODEL]:(null==i||null==(l=i.extra)?void 0:l.extraType)===A.fW.dress?"V":"R",[s.pX.EXIT_TYPE]:e,[s.pX.PLAY_DURATION]:Number(o.toFixed(2)),[s.pX.USER_QUEUE_STATUS]:T(),[s.pX.USER_WATCH_ROUND_CNT]:a.userWatchRoundCnt,[s.pX.USER_INTERACT_CNT]:a.userInteractCnt,[s.pX.USER_INTERACT_CNT_DEFAULT]:a.userInteractCntDefault,[s.pX.USER_INTERACT_CNT_CUSTOM]:a.userInteractCntCustom,[s.pX.USER_MEDIA_CNT]:a.userMediaCnt,[s.pX.USER_IN_QUEUE_CNT]:a.userInQueueCnt,[s.pX.UPLOAD_MEDIA_CNT]:a.uploadMediaCnt,[s.pX.SELECT_MEDIA_CNT]:a.selectMediaCnt,[s.pX.SHARE_CNT]:a.shareCnt,[s.pX.DOWNLOAD_CNT]:a.downloadCnt,[s.pX.COMMENT_CNT]:a.commentCnt}})},[b,T]),D=(0,l.useCallback)(()=>{y.current.active&&(y.current.commentCnt+=1)},[]),M=(0,l.useCallback)(()=>{y.current.active&&(y.current.downloadCnt+=1)},[]),P=(0,l.useCallback)(()=>{y.current.active&&(y.current.shareCnt+=1)},[]),U=(0,l.useCallback)(()=>{y.current.active&&(y.current.userMediaCnt+=1,y.current.uploadMediaCnt+=1)},[]),X=(0,l.useCallback)(()=>{y.current.active&&(y.current.userMediaCnt+=1,y.current.selectMediaCnt+=1)},[]),z=(0,l.useCallback)(e=>{C.current=Math.max(0,C.current+(e?1:-1))},[]);(0,l.useEffect)(()=>(j(),()=>{R("unknown")}),[R,j]),(0,l.useEffect)(()=>{"end"===o&&R("live_end")},[R,o]),(0,l.useEffect)(()=>{E(p),N(p)},[p,N,E]),(0,l.useEffect)(()=>{I(h)},[h,I]),(0,l.useEffect)(()=>{let e=()=>{if("hidden"===document.visibilityState){b(),S.current=window.setTimeout(()=>{S.current=null,R("switch_tab")},150);return}b(),j()},t=()=>{R("close_tab")},n=()=>{R("back_prev_page")};return document.addEventListener("visibilitychange",e),window.addEventListener("pagehide",t),window.addEventListener("popstate",n),()=>{document.removeEventListener("visibilitychange",e),window.removeEventListener("pagehide",t),window.removeEventListener("popstate",n),b()}},[b,R,j]);let L=(0,l.useMemo)(()=>({recordComment:D,recordDownload:M,recordSelectMedia:X,recordShare:P,recordUploadMedia:U,reportExit:R,setUploadingMedia:z}),[D,M,X,P,U,R,z]);return(0,r.jsx)(c.Provider,{value:L,children:t})}},93397:(e,t,n)=>{n.d(t,{e:()=>s});var r=n(25771),l=n(85151),a=n(88355),A=n(62902),i=n(28133);let s=()=>{let{t:e}=(0,l.Bd)();return(0,r.jsxs)("div",{className:(0,a.A)("relative z-1 flex h-full w-full items-center justify-center"),children:[(0,r.jsx)(A.A,{className:(0,a.A)("absolute! top-0 left-0 z-0 h-full w-full"),color1:"#423900",color2:"#040024",color3:"#3b006b",timeSpeed:1.45,colorBalance:-.02,warpStrength:1.4,warpFrequency:5,warpSpeed:2.3,warpAmplitude:36,blendAngle:-94,blendSoftness:.29,rotationAmount:480,noiseScale:2.35,grainAmount:.18,grainScale:2.2,grainAnimated:!1,contrast:1.55,gamma:1.6,saturation:1.65,centerX:-.02,centerY:0,zoom:1.65}),(0,r.jsxs)("div",{className:"relative z-2 flex w-full flex-col items-center gap-2 text-center text-white/70",children:[(0,r.jsx)(i.$,{className:"text-6xl text-white/80"}),(0,r.jsx)("div",{className:"text-[20px] font-medium",children:e("components.discover.worldCard.sessionBlocked","Session Blocked!")}),(0,r.jsx)("div",{className:"mx-[20%] text-sm",children:e("components.discover.worldCard.blockedDescription","Will be right back! Please wait.")})]})]})}}}]);