(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9478],{31767:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/watch",function(){return n(24689)}])},89090:function(e,t,n){"use strict";var o=n(30139),s=n(85893);t.Z=(0,o.Z)((0,s.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete")},29173:function(e,t,n){"use strict";var o=n(30139),s=n(85893);t.Z=(0,o.Z)((0,s.jsx)("path",{d:"M15.41 16.59 10.83 12l4.58-4.59L14 6l-6 6 6 6z"}),"KeyboardArrowLeft")},86142:function(e,t,n){"use strict";var o=n(30139),s=n(85893);t.Z=(0,o.Z)((0,s.jsx)("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"MoreVert")},49555:function(e,t,n){"use strict";var o=n(30139),s=n(85893);t.Z=(0,o.Z)((0,s.jsx)("path",{d:"M2.01 21 23 12 2.01 3 2 10l15 2-15 2z"}),"Send")},95611:function(e,t,n){"use strict";n.d(t,{Z:function(){return b}});var o,s=n(67294),r=n(90512),i=n(94780),a=n(66643),l=n(21485),c=n(92276),d=n(57280),u=n(77527),x=n(2807),h=n(44001),m=n(1588),p=n(34867);function v(e){return(0,p.ZP)("MuiInputAdornment",e)}let f=(0,m.Z)("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var g=n(85893);let j=e=>{let{classes:t,disablePointerEvents:n,hiddenLabel:o,position:s,size:r,variant:l}=e,c={root:["root",n&&"disablePointerEvents",s&&"position".concat((0,a.Z)(s)),l,o&&"hiddenLabel",r&&"size".concat((0,a.Z)(r))]};return(0,i.Z)(c,v,t)},w=(0,u.ZP)("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t["position".concat((0,a.Z)(n.position))],!0===n.disablePointerEvents&&t.disablePointerEvents,t[n.variant]]}})((0,x.Z)(e=>{let{theme:t}=e;return{display:"flex",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(t.vars||t).palette.action.active,variants:[{props:{variant:"filled"},style:{["&.".concat(f.positionStart,"&:not(.").concat(f.hiddenLabel,")")]:{marginTop:16}}},{props:{position:"start"},style:{marginRight:8}},{props:{position:"end"},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:"none"}}]}}));var b=s.forwardRef(function(e,t){let n=(0,h.i)({props:e,name:"MuiInputAdornment"}),{children:i,className:a,component:u="div",disablePointerEvents:x=!1,disableTypography:m=!1,position:p,variant:v,...f}=n,b=(0,d.Z)()||{},I=v;v&&b.variant,b&&!I&&(I=b.variant);let Z={...n,hiddenLabel:b.hiddenLabel,size:b.size,disablePointerEvents:x,position:p,variant:I},y=j(Z);return(0,g.jsx)(c.Z.Provider,{value:null,children:(0,g.jsx)(w,{as:u,ownerState:Z,className:(0,r.Z)(y.root,a),ref:t,...f,children:"string"!=typeof i||m?(0,g.jsxs)(s.Fragment,{children:["start"===p?o||(o=(0,g.jsx)("span",{className:"notranslate","aria-hidden":!0,children:"​"})):null,i]}):(0,g.jsx)(l.Z,{color:"textSecondary",children:i})})})})},79768:function(e,t,n){"use strict";n.d(t,{g:function(){return c}});var o=n(85893),s=n(75878),r=n(19948),i=n(8598),a=n(9466),l=n(31904);let c=e=>{let{userId:t,src:n,size:c={}}=e,d=(0,a.K)(i.y.image["streamer-icon"]);return(0,o.jsx)(s.J,{href:(0,l.jD)(t),id:d,children:(0,o.jsx)(r.f,{src:n,size:c})})}},93215:function(e,t,n){"use strict";n.d(t,{u:function(){return d}});var o=n(85893),s=n(75878),r=n(28077),i=n(86553),a=n(8598),l=n(74513),c=n(9466);let d=()=>{let e=(0,c.K)(a.y.button["to-home"]);return(0,o.jsx)(s.J,{"aria-label":(0,i.x)("common.to-home"),id:e,href:(0,l.m9)(l.q.root),children:(0,o.jsx)(r.s,{buttonsize:"large",sx:{height:56,minWidth:228},children:(0,i.x)("common.to-home")})})}},64893:function(e,t,n){"use strict";n.d(t,{_:function(){return h}});var o=n(85893),s=n(75878),r=n(85905),i=n(722),a=n(66892),l=n(94919),c=n(8598),d=n(9466),u=n(31904),x=n(84166);let h=e=>{let{contentInfo:t}=e,n=(0,d.K)(c.y.image["content-thumbnail"],null==t?void 0:t.contentId);return(0,o.jsx)(s.J,{"aria-label":null==t?void 0:t.title,href:(0,u.t)(t),id:n,children:(0,o.jsxs)(x.Z,{gap:1,sx:{width:"100%"},children:[(0,o.jsx)(a.$,{contentInfo:t}),(0,o.jsx)(i.k,{contentInfo:t}),(0,o.jsx)(l.w,{contentInfo:t,sx:{...r.B[14]}})]})})}},16238:function(e,t,n){"use strict";n.d(t,{B:function(){return d}});var o=n(85893),s=n(75878),r=n(62e3),i=n(8598),a=n(9466),l=n(31904),c=n(21485);let d=e=>{let{name:t,userId:n,maxLine:d=2,sx:u}=e,x=(0,a.K)(i.y.link["streamer-name"],n),h=2===d?r.e3:r.cL;return(0,o.jsx)(s.J,{href:(0,l.jD)(n),id:x,style:{width:"fit-content",display:"flex"},children:(0,o.jsx)(c.Z,{sx:{...u,...h},children:t})})}},3901:function(e,t,n){"use strict";n.d(t,{j:function(){return a}});var o=n(85893),s=n(13524),r=n(86553),i=n(21485);let a=e=>{let{fans:t,sx:n}=e;return(0,o.jsx)(i.Z,{sx:{...n,color:s._o.caption},children:void 0!==t&&(0,r.x)("content.".concat(t<=1?"fan":"fans"),{value:l(t)})})},l=e=>e<=999?e:e<=999999?(Math.floor(e/1e3*10)/10).toFixed(1)+"k":(Math.floor(e/1e6*10)/10).toFixed(1)+"M"},31962:function(e,t,n){"use strict";n.d(t,{c:function(){return o}});let o=(0,n(4480).cn)({key:"contentRoleInfoState",default:void 0})},65059:function(e,t,n){"use strict";n.d(t,{H:function(){return o}});let o=(0,n(4480).cn)({key:"playerErrorCodeState",default:void 0})},24689:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return nw}});var o=n(85893),s=n(2962),r=n(9008),i=n.n(r),a=n(11163),l=n(67294),c=n(4480),d=n(86553),u=n(8520),x=n(12080),h=n(63530),m=n(5152),p=n.n(m),v=n(69657),f=n(13524),g=n(67013),j=n(91550),w=n(56509),b=n(76150),I=n(74513),Z=n(24675),y=n(12041),C=n(15063),S=n(56912);let E=(0,b.c$)(),k=e=>{let{openChat:t,setOpenChat:n,setChatTypeOpen:s}=e,r=(0,l.useContext)(y.B),[i,a]=(0,l.useState)(),c=(0,C.YF)(null==r?void 0:r.contentInfo);(0,l.useEffect)(()=>{if(r){let e=new URL((0,I.J1)((0,C.Bv)(null==r?void 0:r.contentInfo)?"chat-bar":"chat-replay-bar"));e.searchParams.set(Z.l.content,null==r?void 0:r.contentInfo.contentId),window.location.port&&e.searchParams.set(Z.l.token,(0,w.h)()||""),a(e.href)}},[r]),(0,l.useEffect)(()=>{if(window)return window.addEventListener("message",d),()=>{window.removeEventListener("message",d)}},[t]);let d=e=>{let t=new URL(e.origin);if(t.origin!==E&&"localhost"!==t.hostname&&t.hostname!==I.B2)return;let o=e.data;switch(e.data.action){case j.Yw.chatFrame.noticeReady:case j.Yw.chatFrame.open:n(o.openChat);break;case j.Yw.chatFrame.tipOpen:s("TIP");break;case j.Yw.chatFrame.vCoinOpen:s("V_COIN_TIP")}};return!(0,C.Nt)(null==r?void 0:r.contentInfo)||(null==r?void 0:r.contentInfo.isEnabledChatReplay)?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(S.Z,{sx:{mt:1,opacity:.25}}),(0,o.jsx)("iframe",{id:"iframe-chat-bar-for-mobile",name:"iframe-chat-bar-for-mobile",src:i,style:{width:"100%",minHeight:c?"80px":"40px",height:c?"80px":"40px",border:"none"}}),(0,o.jsx)(S.Z,{sx:{opacity:.25}})]}):null};var B=n(48583),R=n(447),P=n(38398),L=n(88097),z=n(57592),M=n(24109),F=n(42431),V=n(82878),T=n(31904),J=n(3314),A=n(4291);let D=(0,b.c$)(),W={position:"absolute",inset:0,backgroundColor:f.wJ.background.dark,height:"100vh",minHeight:"100vh",overflowY:"hidden",zIndex:V.b.watch.chatFrame},_=e=>{let{openChat:t,chatTypeOpen:n,setOpenChat:s,setFocusInput:r,setChatTypeOpen:i,onClickSubscriptionButton:a}=e,c=(0,g.dD)(),d=(0,g.qN)(),u=(0,g.pG)(),x=(0,B.Dv)(R.l),h=(0,l.useContext)(y.B),[m,p]=(0,l.useState)({status:""}),[v,f]=(0,l.useState)(),[b,S]=(0,l.useState)(),[E,k]=(0,l.useState)("0px"),[V,_]=(0,l.useState)(),Y=(0,F.d)();(0,M.W)(),(0,l.useEffect)(()=>{if(h){let e=new URL((0,I.J1)((0,C.Bv)(null==h?void 0:h.contentInfo)?"chat":"chat-replay"));e.searchParams.set(Z.l.content,null==h?void 0:h.contentInfo.contentId),e.searchParams.set(Z.l.chat.renderCount,x.toString()),window.location.port&&e.searchParams.set(Z.l.token,(0,w.h)()||""),S(e.href)}G()},[h]),(0,l.useEffect)(()=>{if(b){let e=new URL(b);x.toString()!==e.searchParams.get(Z.l.chat.renderCount)&&(e.searchParams.set(Z.l.chat.renderCount,x.toString()),S(e.href))}},[x,b]),(0,l.useEffect)(()=>{G()},[u,t]),(0,l.useEffect)(()=>{if(window)return window.addEventListener("message",O),()=>{window.removeEventListener("message",O)}},[t]),(0,l.useEffect)(()=>{if(u)return window.addEventListener("resize",G),()=>{window.removeEventListener("resize",G)}},[E,u]),(0,l.useEffect)(()=>{c&&((0,j.fe)(j.Yw.chatFrame.focusInput,{focus:Y}),r&&r(Y))},[Y]),(0,l.useEffect)(()=>{!1===V&&"TIP"===n?((0,j.fe)(j.Yw.chatFrame.tipOpen),i(void 0)):!1===V&&"V_COIN_TIP"===n?((0,j.fe)(j.Yw.chatFrame.vCoinOpen),i(void 0)):!1===V&&G()},[V]);let G=()=>{setTimeout(()=>{if(u){let e=.01*window.innerHeight;document.documentElement.style.setProperty("--vh",e+"px");let t=document.getElementById("tips-player-bar");if(t){let e=t.getBoundingClientRect(),n=Math.round(e.y+e.height),o="calc(var(--vh, 1vh) * 100 - ".concat(n,"px)");o!==E&&k(o)}}else k("".concat(z.Q,"px"))},L.y.chat.resize)},O=e=>{let t=new URL(e.origin);if(t.origin!==D&&"localhost"!==t.hostname&&t.hostname!==I.B2)return;let n=e.data;switch(e.data.action){case j.Yw.chatFrame.noticeReady:case j.Yw.chatFrame.open:s(n.openChat);break;case j.Yw.chatFrame.fullscreen:if(d){let e=document.getElementById("tips-player-bar");e&&(e.style.display=n.value?"none":"block"),_(n.value)}else u&&!n.value&&_(n.value);break;case j.Yw.payment.start:f({...n.tip,contentId:null==h?void 0:h.contentInfo.contentId,isEnabledTips:null==h?void 0:h.contentInfo.isEnabledTips,receivedUserId:null==h?void 0:h.streamerInfo.userId,paymentType:"TIP"});break;case j.Yw.tip.messageFinish:p({status:n.action});break;case j.Yw.tip.messageFail:p({data:n.message,status:n.action});break;case j.Yw.chatFrame.showSignIn:(0,T.B2)((0,I.cy)("sign-in"));break;case j.Yw.chatFrame.showSubscriptionPlan:a(n.userId);break;case j.Yw.payment.secureAuthComplete:p({data:n.params,status:n.action})}},H=t&&(0,C.YF)(null==h?void 0:h.contentInfo);return(0,o.jsx)(o.Fragment,{children:(0,o.jsxs)(A.Z,{in:H,collapsedSize:50,...H?{timeout:L.y.chat.collapse}:{},children:[(0,o.jsx)(J.Z,{sx:V?W:{position:"relative",overflowY:"hidden",height:E,minHeight:E},children:(0,o.jsx)("iframe",{id:"tips-chat-frame",loading:"lazy",name:"tips-chat-frame",src:b,style:{position:"absolute",border:"none",height:"100%",overflow:"hidden",width:"100%"}})}),v&&h&&(0,o.jsx)(P.a,{paymentProcessInfo:m,tipData:v,handleClosePurchaseTipDialog:()=>{f(void 0),p({status:""})}})]})})};var Y=n(85905),G=n(83853),O=n(63766),H=n(17543),N=n(31589);let U=e=>(0,o.jsx)(N.Z,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...e,children:(0,o.jsx)("path",{d:"M21 9L17 5V8H10V10H17V13M7 11L3 15L7 19V16H14V14H7V11Z",fill:"white"})});var K=n(4336),q=n(21485);let $=e=>{let{message:t,onClick:n}=e;return(0,o.jsxs)(K.Z,{variant:"outlined",sx:{borderRadius:50,py:.5,px:1.5,"&.MuiButton-outlined":{borderColor:f.wJ.border.container,"&:hover":{backgroundColor:"transparent"}}},onClick:n,children:[(0,o.jsx)(U,{}),(0,o.jsx)(q.Z,{sx:{...Y.B["14to12"],whiteSpace:"nowrap",ml:.5},children:t})]})};var Q=n(36609),X=n(98711),ee=n(42632),et=n(82742),en=n(79833),eo=n(53352),es=n(85985),er=n(52857);let ei=e=>(0,o.jsx)(er.Z,{sx:{p:0},...e,src:void 0,children:(0,o.jsx)(es.k,{src:e.src,sx:{height:{xs:48,sm:64},width:{xs:48,sm:64},opacity:e.disabled?.4:1}})});var ea=n(8598);let el=(0,c.cn)({key:"watchPageTabIndexState",default:0});var ec=n(9466),ed=n(5210);let eu=()=>{let e="ja"===Q.ZP.language?"ja":"en",t=(0,g.qN)(),n=(0,l.useContext)(y.B),s=(0,l.useContext)(H.V),[r,i]=(0,c.FV)(el),[a,u]=(0,l.useState)(!1),[x,h]=(0,l.useState)(!1),m=(0,C.Bv)(null==n?void 0:n.contentInfo),p=(0,ee.nJ)(s.user),v=null==n?void 0:n.contentInfo.isEnabledComments,f=null==n?void 0:n.contentInfo.isEnabledChats,w=null==n?void 0:n.contentInfo.isEnabledTips,b=(0,ec.K)(ea.y.input["content-comment-sp"]),I=(0,ec.K)(ea.y.input["content-comment-pc"]),Z=new URLSearchParams;return Z.append(X.l.origin,location.href),(0,l.useEffect)(()=>{if(1===r&&a){if(t){let e=document.getElementById(b);null==e||e.focus()}else{let e=document.getElementById(I);null==e||e.focus()}u(!1)}},[a]),m?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(J.Z,{sx:ex,children:[(0,o.jsx)(ei,{title:(0,d.x)("aria-label.button.open-tip"),src:(0,en.x)(en.o.images.eventSupport[e].tip),onClick:()=>{p?h(!0):(0,j.fe)(j.Yw.chatFrame.clickEventTipIcon)},disabled:!f||!w}),(0,o.jsx)(et.L,{width:24}),(0,o.jsx)(ei,{title:(0,d.x)("aria-label.button.open-vcoin"),src:(0,en.x)(en.o.images.eventSupport[e].vCoin),onClick:()=>{p?h(!0):(0,j.fe)(j.Yw.chatFrame.clickEventVCoinIcon)},disabled:!f||!w}),(0,o.jsx)(et.L,{width:24}),(0,o.jsx)(ei,{title:(0,d.x)("aria-label.button.open-chat"),src:(0,en.x)(en.o.images.eventSupport[e].chat),onClick:()=>{p?h(!0):(0,j.fe)(j.Yw.chatFrame.clickEventChatIcon)},disabled:!f})]}),(0,o.jsx)(eo.g,{open:x,search:Z.toString(),setOpen:h})]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(J.Z,{sx:ex,children:(0,o.jsx)(ei,{title:(0,d.x)("aria-label.button.open-comment"),src:(0,en.x)(en.o.images.eventSupport[e].comment),onClick:()=>{p?h(!0):(i(1),u(!0))},disabled:!v})}),(0,o.jsx)(eo.g,{open:x,search:Z.toString(),setOpen:h})]})},ex={minWidth:"208px",display:"flex",justifyContent:"flex-start",background:"transparent",px:1,[ed.u3.eventPlayerSp]:{minWidth:"208px",background:f.aG.primary.light,borderRadius:"100px",border:"1px solid ".concat(f.wJ.border.box),justifyContent:"center",px:3,py:1}},eh=e=>{let{minValue:t,maxValue:n,currentValue:s,width:r,height:i}=e,a=em(t,n,s);return(0,o.jsx)(J.Z,{"aria-hidden":"true","aria-valuenow":s,"aria-valuemin":t,"aria-valuemax":n,role:"progressbar",sx:{...100===a&&{filter:"drop-shadow(0px 0px 6px ".concat(f.wJ.shadow.expBar,")")},width:r||360},children:(0,o.jsx)(J.Z,{sx:{height:i||16,backgroundColor:f.wJ.background.linearProgress,borderRadius:"100px"},children:(0,o.jsx)(J.Z,{sx:{height:"inherit",width:"".concat(a,"%"),...100===a&&{border:"1px solid ".concat(f.wJ.border.linearProgress)},borderRadius:"inherit",overflow:"hidden"},children:(0,o.jsx)(J.Z,{sx:{height:"inherit",width:"".concat(100/a*100,"%"),background:f.WK,borderRadius:"inherit"}})})})})},em=(e,t,n)=>t<n?100:(n-e)/(t-e)*100;var ep=n(53790),ev=n(77527);let ef=(0,ev.ZP)(e=>{var t,n;return(0,o.jsxs)(q.Z,{sx:{whiteSpace:"nowrap",...e.styles},children:[null===(t=e.currentValue)||void 0===t?void 0:t.toLocaleString(),"/",null===(n=e.maxValue)||void 0===n?void 0:n.toLocaleString()]})})({});var eg=n(54034),ej=n(42820),ew=n(33453),eb=n(84166);let eI=e=>{let{open:t,setOpen:n}=e,s="ja"===Q.ZP.language?"ja":"en",r=(0,l.useContext)(y.B),i=(0,C.Bv)(null==r?void 0:r.contentInfo),a=()=>{n(!1)};return(0,o.jsxs)(ew.Z,{open:t,sx:{"& .MuiPaper-root":{backgroundColor:f.aG.primary.main,borderRadius:0,m:"auto",width:{xs:375,sm:660},maxWidth:"100%"}},onClose:a,children:[(0,o.jsxs)(J.Z,{sx:{height:"55px",borderBottom:"1px solid ".concat(f.wJ.border.headerBottom)},children:[(0,o.jsx)(q.Z,{id:"Event-support-help-title",align:"center",sx:{fontWeight:"bold",py:2},children:(0,d.x)("event-support.help-dialog.title")}),(0,o.jsx)(ej.h,{onClose:a})]}),(0,o.jsxs)(J.Z,{sx:{m:"auto",pt:3,width:{xs:351,sm:612}},children:[(0,o.jsx)(eZ,{name:(0,d.x)("event-support.help-dialog.subtitle.event-support-gauge-guide")}),(0,o.jsxs)(J.Z,{sx:{mb:3,p:"12px",background:f.aG.primary.light},children:[(0,o.jsxs)(J.Z,{sx:{paddingBottom:"12px"},children:[(0,o.jsx)(q.Z,{sx:{mb:"11.5px",...Y.B[14],fontWeight:"bold"},children:(0,d.x)("event-support.help-dialog.subtitle.event-support-gauge")}),(0,o.jsxs)(eb.Z,{alignItems:"center",direction:"row",gap:1,children:[(0,o.jsx)(eh,{currentValue:273,minValue:0,maxValue:1e3,width:209,height:9}),(0,o.jsx)(ef,{currentValue:273,maxValue:1e3,styles:{...Y.B["14to12"],fontWeight:"bold"}})]})]}),(0,o.jsx)(ey,{name:"event-support-gauge"})]}),(0,o.jsx)(eZ,{name:(0,d.x)("event-support.help-dialog.subtitle.build-up-gauge")}),(0,o.jsx)(J.Z,{sx:{mb:6,p:"12px",background:f.aG.primary.light,".event-exp-elm:not(:last-of-type)":{pb:3.5}},children:i?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(eC,{name:"tip",src:(0,en.x)(en.o.images.eventSupport[s].tip)}),(0,o.jsx)(eC,{name:"vcoin",src:(0,en.x)(en.o.images.eventSupport[s].vCoin)}),(0,o.jsx)(eC,{name:"chat",src:(0,en.x)(en.o.images.eventSupport[s].chat)})]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(eC,{name:"play-button",src:(0,en.x)(en.o.images.player.button.bigPlay)}),(0,o.jsx)(eC,{name:"comment",src:(0,en.x)(en.o.images.eventSupport[s].comment)})]})})]})]})},eZ=e=>{let{name:t}=e;return(0,o.jsx)(q.Z,{sx:{...Y.B[14],paddingLeft:"12px",paddingBottom:"8px",fontWeight:"bold"},children:t})},ey=e=>{let{name:t}=e;return(0,o.jsx)(q.Z,{sx:{...Y.B[14]},children:(0,o.jsx)("div",{dangerouslySetInnerHTML:{__html:(0,d.x)("event-support.help-dialog.message.".concat(t))}})})},eC=e=>{let{name:t,src:n}=e;return(0,o.jsxs)(J.Z,{className:"event-exp-elm",children:[(0,o.jsxs)(J.Z,{sx:{display:"flex"},children:[(0,o.jsx)(J.Z,{children:(0,o.jsx)(es.k,{src:n,sx:{height:40,width:40}})}),(0,o.jsx)(q.Z,{sx:{...Y.B[14],paddingLeft:"11px",marginY:"auto",fontWeight:"bold"},children:(0,d.x)("event-support.help-dialog.subtitle.".concat(t))})]}),(0,o.jsx)(J.Z,{sx:{pt:1.5,backgroundColor:f.aG.primary.light},children:(0,o.jsx)(ey,{name:t})})]})};var eS=n(78736),eE=n(64742),ek=n(78958),eB=n(30139),eR=(0,eB.Z)((0,o.jsx)("path",{d:"M14.4 6 14 4H5v17h2v-7h5.6l.4 2h7V6z"}),"AssistantPhoto"),eP=n(9645),eL=n(25026),ez=n(76592),eM=n(19827),eF=n(46577),eV=n(8863);let eT=e=>{let{myPointInfo:t,rankingEventInfo:n,size:s}=e,r=(0,c.sJ)(eS.g),i=(0,ek.l9)(),a=(0,ek.pG)(),u=(0,l.useContext)(y.B),[x,h]=(0,l.useState)(!1),m=()=>{h(!0)},p=(null==t?void 0:t.chatCountCycle)?null==t?void 0:t.chatCountCycle:0,v=eE.iU[p];return(0,o.jsxs)(eL.Z,{children:[(0,o.jsx)(ez.Z,{"aria-label":(0,d.x)("event-support.button.event-support-menu"),children:(0,o.jsx)(eM.Z,{sx:{td:{py:0,px:0,border:0},"td:not(:first-of-type)":{pl:1},"td:last-of-type":{pl:.5}},children:a||r&&i?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(eF.Z,{children:(0,o.jsx)(eV.Z,{colSpan:2,children:(0,o.jsx)(eA,{onClick:m})})}),(0,o.jsxs)(eF.Z,{sx:{width:"100%"},children:[(0,o.jsx)(eV.Z,{"aria-hidden":!0,sx:{width:"100%"},children:(0,o.jsx)(eD,{currentValue:null==t?void 0:t.point,maxValue:null==n?void 0:n.fanRewardPoint,size:s,sx:{mt:.5}})}),(0,o.jsx)(eV.Z,{sx:{textAlign:"right"},children:(0,o.jsx)(eW,{currentValue:null==t?void 0:t.point,maxValue:null==n?void 0:n.fanRewardPoint,sx:{mt:.5,ml:.5}})})]}),(0,C.Bv)(null==u?void 0:u.contentInfo)&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(eF.Z,{children:(0,o.jsx)(eV.Z,{colSpan:2,children:(0,o.jsx)(e_,{sx:{mt:1}})})}),(0,o.jsxs)(eF.Z,{children:[(0,o.jsx)(eV.Z,{"aria-hidden":!0,sx:{width:"100%"},children:(0,o.jsx)(eY,{color:v,currentValue:null==t?void 0:t.chatCount,maxValue:null==n?void 0:n.maxChatCount,sx:{mt:.5}})}),(0,o.jsx)(eV.Z,{sx:{textAlign:"right"},children:(0,o.jsx)(eG,{color:v,currentValue:null==t?void 0:t.chatCount,maxValue:null==n?void 0:n.maxChatCount,sx:{mt:.5}})})]})]})]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(eF.Z,{children:[(0,o.jsx)(eV.Z,{children:(0,o.jsx)(eA,{onClick:m})}),(0,o.jsx)(eV.Z,{"aria-hidden":!0,sx:{width:"100%"},children:(0,o.jsx)(eD,{currentValue:null==t?void 0:t.point,maxValue:null==n?void 0:n.fanRewardPoint,size:s})}),(0,o.jsx)(eV.Z,{sx:{textAlign:"right"},children:(0,o.jsx)(eW,{currentValue:null==t?void 0:t.point,maxValue:null==n?void 0:n.fanRewardPoint,sx:{ml:.5}})})]}),(0,C.Bv)(null==u?void 0:u.contentInfo)&&(0,o.jsx)(o.Fragment,{children:(0,o.jsxs)(eF.Z,{children:[(0,o.jsx)(eV.Z,{children:(0,o.jsx)(e_,{sx:{mt:1}})}),(0,o.jsx)(eV.Z,{"aria-hidden":!0,sx:{width:"100%"},children:(0,o.jsx)(eY,{color:v,currentValue:null==t?void 0:t.chatCount,maxValue:null==n?void 0:n.maxChatCount,sx:{mt:1}})}),(0,o.jsx)(eV.Z,{sx:{textAlign:"right"},children:(0,o.jsx)(eG,{color:v,currentValue:null==t?void 0:t.chatCount,maxValue:null==n?void 0:n.maxChatCount,sx:{mt:1}})})]})})]})})}),(0,o.jsx)(eI,{open:x,setOpen:h})]})},eJ=e=>{let{label:t}=e;return(0,o.jsx)(q.Z,{sx:{...Y.B["16to12"],marginRight:"4px",fontWeight:"bold",whiteSpace:"nowrap"},children:t})},eA=e=>{let{onClick:t}=e;return(0,o.jsxs)(J.Z,{sx:{display:"flex"},children:[(0,o.jsx)(eJ,{label:(0,d.x)("event-support.event-support-gauge")}),(0,o.jsx)(eP.Z,{onClick:t,sx:{cursor:"pointer",height:{xs:16,sm:20},width:{xs:16,sm:20},color:f.wJ.icon.caption}})]})},eD=e=>{let{currentValue:t=0,maxValue:n=1,size:s,sx:r={}}=e;return(0,o.jsx)(J.Z,{sx:r,children:(0,o.jsx)(eh,{currentValue:t,minValue:0,maxValue:n,width:s,height:9})})},eW=e=>{let{currentValue:t=0,maxValue:n=1,sx:s={}}=e,r=n>t?t:n;return(0,o.jsx)(J.Z,{sx:s,children:(0,o.jsx)(ef,{currentValue:r,maxValue:n,styles:{...Y.B["14to12"],fontWeight:"bold"}})})},e_=e=>{let{sx:t={}}=e,n=(0,ek.qN)();return(0,o.jsxs)(J.Z,{sx:{display:"flex",...t},children:[(0,o.jsx)(eJ,{label:(0,d.x)("event-support.chat-message-count")}),(0,o.jsx)(ep._,{id:"event-support-chat-message-count",label:(0,d.x)("event-support.helper.chat-message-count",{url:eg.pg.help.aboutRankingMetrics}),iconSize:n?16:20,iconSx:{".MuiSvgIcon-root":{color:f.wJ.icon.caption}}})]})},eY=e=>{let{color:t,currentValue:n=0,maxValue:s=1,sx:r={}}=e,i=100/s,a=Array.from({length:s},(e,t)=>t<n);return(0,o.jsx)(J.Z,{"aria-hidden":"true",sx:{display:"flex",gap:"5px",width:"100%",height:"20px",border:"1px solid ".concat(n>=s?t:f.wJ.background.skelton),borderRadius:f.Cz.borderRadius.input,...n>=s&&{boxShadow:"0px 0px 3px 0px ".concat(t)},p:"6px",...r},children:a.map((e,n)=>(0,o.jsx)("div",{style:{background:e?t:f.wJ.background.skelton,width:"".concat(i,"%"),height:"100%"}},n))})},eG=e=>{let{color:t,currentValue:n=0,maxValue:s=1,sx:r={}}=e;return(0,o.jsx)(J.Z,{sx:r,children:(0,o.jsxs)(eb.Z,{alignItems:"center",direction:"row",justifyContent:"space-between",gap:1,children:[(0,o.jsx)(eR,{sx:{color:n>=s?t:f.wJ.background.skelton}}),(0,o.jsx)(ef,{currentValue:n,maxValue:s,styles:{...Y.B["14to12"],fontWeight:"bold"}})]})})};var eO=n(2010);let eH=e=>{let{rankingEventInfo:t,handleClickSwitch:n}=e,s=(0,ek.Tf)(),r=(0,l.useContext)(y.B),{settings:i}=(0,l.useContext)(H.V),[a,c]=(0,l.useState)();(0,l.useEffect)(()=>{if(!r||!t)return;u();let e=setInterval(()=>{u()},null==i?void 0:i.pollingTimeSettings.rankingSupportGauge);return()=>{e&&clearInterval(e)}},[r,t,i]);let u=async()=>{r&&t&&c(await eO.PI.getRankingEventMyPoint(null==r?void 0:r.contentInfo.contentId,t.rankingEventId))},x={[Z.l.rankingEventUserId]:(null==r?void 0:r.streamerInfo.userId)||"",[Z.l.tabIndex.rankingEventDetail]:"1"},h=(0,o.jsx)(J.Z,{sx:{pt:1},children:(0,o.jsx)(eT,{myPointInfo:a,rankingEventInfo:t,size:"100%"})}),m=(0,o.jsxs)(eb.Z,{component:"main",direction:"row",justifyContent:"space-between",alignItems:"flex-start",sx:{backgroundColor:f.wJ.background.layer,px:2,py:3},children:[(0,o.jsx)(J.Z,{sx:{maxWidth:281,pt:"5px",".ranking-event-banner-item-countdown-timer":{backgroundColor:f.aG.primary.main}},children:(0,o.jsx)(O.M,{rankingEventInfo:t,params:x})}),(0,o.jsxs)(eb.Z,{sx:{width:"100%",pl:"37px"},children:[h,(0,o.jsxs)(eb.Z,{direction:"row",justifyContent:"space-between",alignItems:"flex-end",sx:{pt:2},children:[(0,o.jsx)(eu,{}),(0,o.jsx)($,{message:(0,d.x)("event-support.button.title-page"),onClick:n})]})]})]}),p=(0,o.jsxs)(eb.Z,{direction:"column",sx:{p:1.5,pb:1.5},children:[h,(0,o.jsxs)(eb.Z,{alignItems:"center",sx:{pt:2},children:[(0,o.jsx)(eu,{}),(0,o.jsx)(J.Z,{sx:{pt:.5},children:eN}),(0,o.jsx)(J.Z,{sx:{maxWidth:224},children:(0,o.jsx)(G.o,{rankingEventInfo:t,params:x,sx:{borderRadius:f.Cz.borderRadius.medium}})}),(0,o.jsx)(J.Z,{sx:{pt:2.5},children:(0,o.jsx)($,{message:(0,d.x)("event-support.button.title-page"),onClick:n})})]})]});return s?p:m},eN=(0,o.jsx)(J.Z,{sx:{position:"relative",top:12,left:90,zIndex:1,background:f.FL.blight,borderRadius:"5px",p:"1px",height:24,m:"auto"},children:(0,o.jsx)(J.Z,{sx:{display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:f.aG.primary.main,borderRadius:"5px",height:22},children:(0,o.jsx)(q.Z,{sx:{...Y.B[11],mx:"11px"},children:(0,d.x)("event-support.participating")})})});var eU=n(21137),eK=n(59093),eq=n(98574);let e$=e=>{var t,n,s;let{isTitleBreak:r}=e,i=(0,l.useContext)(y.B),a=(0,eK.Kj)(null!==(t=null==i?void 0:i.contentInfo.contentId)&&void 0!==t?t:""),c=(0,o.jsx)(q.Z,{sx:{...Y.B["14to12"],color:f.wJ.font.caption,wordBreak:"keep-all",whiteSpace:"nowrap"},children:(0,eq._$)(null==i?void 0:i.contentInfo)}),d=(0,o.jsxs)(eb.Z,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:2,sx:{pt:2,width:"100%"},children:[c,(0,o.jsx)(eb.Z,{direction:"row",alignItems:"center",justifyContent:"flex-end",spacing:2.5,children:(0,o.jsx)(eU.T,{defaultSharedText:"",watchPageUrl:a,title:null!==(n=null==i?void 0:i.contentInfo.title)&&void 0!==n?n:""})})]}),u=(0,o.jsxs)(eb.Z,{direction:"row",alignItems:"center",justifyContent:r?"space-between":"flex-end",spacing:3,children:[c,(0,o.jsx)(eU.T,{defaultSharedText:"",watchPageUrl:a,title:null!==(s=null==i?void 0:i.contentInfo.title)&&void 0!==s?s:""})]});return r?d:u},eQ=()=>{let e=(0,l.useContext)(y.B),t=(0,c.sJ)(eS.g),n=(0,ek.l9)(),s=(0,ek.pG)(),[r,i]=(0,l.useState)(),[a,u]=(0,l.useState)(!1),x=s||t&&n;(0,l.useEffect)(()=>{e&&e.contentInfo.isRankingEvent&&(async()=>{let t=await eO.PI.getRankingEvent(null==e?void 0:e.contentInfo.contentId);i(t),t&&u(!0)})()},[e]);let h=()=>{u(e=>!e)};return a?(0,o.jsx)(eH,{rankingEventInfo:r,handleClickSwitch:h}):(0,o.jsx)(o.Fragment,{children:(0,o.jsxs)(eb.Z,{direction:x?"column":"row",justifyContent:x?"center":"space-between",spacing:3,sx:{backgroundColor:"transparent",[ed.u3.playerPc]:{backgroundColor:f.wJ.background.layer},px:{xs:1,sm:2},pt:{xs:1,sm:3},pb:{xs:1.5,sm:3}},children:[(0,o.jsx)(J.Z,{sx:{width:"auto"},children:(0,o.jsx)(q.Z,{sx:{...Y.B["18to14"],fontWaight:"bold"},children:null==e?void 0:e.contentInfo.title})}),(0,o.jsxs)(J.Z,{children:[(0,o.jsx)(e$,{isTitleBreak:x}),r&&(0,o.jsx)(J.Z,{sx:{pt:x?2.5:2,textAlign:x?"center":"end"},children:(0,o.jsx)($,{message:(0,d.x)("event-support.button.event-support-menu"),onClick:h})})]})]})})};var eX=n(50033),e0=n(21797),e1=n(27894),e2=n(58533),e5=n(55371),e3=n(85596),e4=n(63439),e8=n(17255),e9=n(15342),e6=n(119),e7=n(28077),te=n(15343),tt=n(72970),tn=n(19948),to=n(97182);let ts=e=>(0,o.jsx)(J.Z,{sx:{position:"relative",display:"inline-flex",p:"2px",height:"32px",width:"32px"},children:(0,o.jsx)(to.Z,{...e,variant:"determinate",size:20,thickness:6,sx:{color:f.aG.notice.main,m:"auto"}})}),tr=e=>{let{show:t,setShow:n}=e,[s,r]=(0,l.useState)(0),i=(0,l.useRef)();return(0,l.useEffect)(()=>(t&&(r(20),i.current=setInterval(()=>{r(e=>e<=100?e+20:0)},1e3)),()=>{i.current&&clearInterval(i.current)}),[t]),(0,l.useEffect)(()=>{s>100&&(i.current&&clearInterval(i.current),r(0),n(!1))},[s]),t?(0,o.jsx)(ts,{value:s}):(0,o.jsx)(o.Fragment,{})};var ti=n(25946),ta=n(59223),tl=n(6431);function tc(e){let t=(0,l.useRef)(null),n=(0,l.useRef)(null);return n.current&&n.current.update(e),(0,l.useEffect)(()=>(n.current=new tl.cW({...e,ref:t}),()=>{n.current=null}),[]),l.createElement("div",{ref:t})}var td=(0,eB.Z)((0,o.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M8.5 8c.83 0 1.5.67 1.5 1.5S9.33 11 8.5 11 7 10.33 7 9.5 7.67 8 8.5 8M12 18c-2.28 0-4.22-1.66-5-4h10c-.78 2.34-2.72 4-5 4m3.5-7c-.83 0-1.5-.67-1.5-1.5S14.67 8 15.5 8s1.5.67 1.5 1.5-.67 1.5-1.5 1.5"}),"EmojiEmotions"),tu=(0,eB.Z)((0,o.jsx)("path",{d:"M21 4H3c-1.1 0-2 .9-2 2v13c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2M7 12v2H5v-2zm-2-2V8h2v2zm6 2v2H9v-2zm-2-2V8h2v2zm7 6.5c0 .28-.22.5-.5.5h-7c-.28 0-.5-.22-.5-.5s.22-.5.5-.5h7c.28 0 .5.22.5.5M15 12v2h-2v-2zm-2-2V8h2v2zm4 4v-2h2v2zm2-4h-2V8h2z"}),"KeyboardAltRounded"),tx=n(90512),th=n(94780),tm=n(44001),tp=n(1588),tv=n(34867);function tf(e){return(0,tv.ZP)("MuiCardContent",e)}(0,tp.Z)("MuiCardContent",["root"]);let tg=e=>{let{classes:t}=e;return(0,th.Z)({root:["root"]},tf,t)},tj=(0,ev.ZP)("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:16,"&:last-child":{paddingBottom:24}}),tw=l.forwardRef(function(e,t){let n=(0,tm.i)({props:e,name:"MuiCardContent"}),{className:s,component:r="div",...i}=n,a={...n,component:r},l=tg(a);return(0,o.jsx)(tj,{as:r,className:(0,tx.Z)(l.root,s),ownerState:a,ref:t,...i})}),tb=e=>{let{inputRef:t,openEmoji:n,setOpenEmoji:s}=e;return(0,o.jsx)(er.Z,{onClick:()=>{s(!n);let e=t.current;var o=e.selectionStart;e.focus(),e.setSelectionRange(o,o)},children:n?(0,o.jsx)(tu,{}):(0,o.jsx)(ti.m,{title:(0,d.x)("common.tooltip.emoji"),children:(0,o.jsx)(td,{})})})},tI=e=>{let{inputRef:t,openEmoji:n,setOpenEmoji:s,onChange:r}=e;return(0,o.jsx)(o.Fragment,{children:n&&(0,o.jsx)(tw,{sx:tZ,children:(0,o.jsx)(tc,{data:ta,onEmojiSelect:e=>{let n=t.current,o=n.value;var i=n.selectionStart,a=o.slice(0,i),l=o.slice(i,o.length);r(a+e.native+l),n.focus(),setTimeout(()=>{n.setSelectionRange(i+2,i+2)},20),s(!1)},dynamicWidth:!0,emojiSize:20,locale:"ja",navPosition:"none",previewEmoji:"point_up",previewPosition:"none",searchPosition:"none",theme:"dark"})})})},tZ={"em-emoji-picker":{border:"1px solid rgba(255, 255, 255, 0.2)"}};var ty=n(4890),tC=n(49555),tS=n(57326),tE=n(95611);let tk=e=>{let{postComment:t,setInputError:n}=e,s=(0,g.qN)(),r=(0,l.useContext)(y.B),{user:i}=(0,l.useContext)(H.V),a=(0,l.useRef)(),[c,u]=(0,l.useState)(),[x,h]=(0,l.useState)(!1),[m,p]=(0,l.useState)(""),[v,j]=(0,l.useState)(!1),w=(0,ec.K)(ea.y.input["content-comment-sp"]),b=(0,ec.K)(ea.y.input["content-comment-pc"]);(0,l.useEffect)(()=>{C()},[r]);let I=()=>{s||u(!0)},Z=e=>{p(e)},C=()=>{c&&u(!1),p(""),x&&h(!1)},S=()=>{try{let e=m.trim();if((0,tt.x)(m)||v)return;3e3<(0,te.Vr)(e)?n((0,d.x)("comment.error-message.input-over",{value:3e3})):(n(""),j(!0),t(m.trim()),C())}catch(e){console.log(e)}},E=c&&(0,o.jsxs)(eb.Z,{alignItems:"flex-start",direction:"row",justifyContent:"space-between",sx:{pt:.5},children:[(0,o.jsx)(tb,{inputRef:a,openEmoji:x,setOpenEmoji:h}),(0,o.jsxs)(J.Z,{children:[(0,o.jsx)(e7.s,{variant:"text",onClick:()=>{x&&h(!1),C()},children:(0,d.x)("common.button.cancel")}),(0,o.jsx)(e7.s,{disabled:v,sx:{fontWeight:"normal !important"},onClick:S,children:(0,d.x)("comment.title")})]})]}),k=(0,o.jsx)(tS.Z,{multiline:!0,id:w,inputRef:a,inputMode:"text",placeholder:(0,d.x)("comment.add-comment"),size:"small",value:m,sx:{borderBottom:"1px solid ".concat(f.wJ.border.outline),color:f.wJ.font.basic,".MuiOutlinedInput-root":{p:1}},onChange:e=>Z(e.target.value),onTouchEnd:I,slotProps:{input:{endAdornment:(0,o.jsx)(tE.Z,{position:"end",children:(0,o.jsxs)(J.Z,{sx:{width:40},children:[!v&&(0,o.jsx)(er.Z,{onTouchEnd:S,children:(0,o.jsx)(tC.Z,{})}),(0,o.jsx)(tr,{show:v,setShow:j})]})})}}}),B=(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(tS.Z,{multiline:!0,id:b,inputRef:a,inputMode:"text",placeholder:(0,d.x)("comment.add-comment"),value:m,sx:{borderBottom:"1px solid ".concat(f.wJ.border.outline),color:f.wJ.font.basic,".MuiOutlinedInput-root":{p:1}},onChange:e=>Z(e.target.value),onClick:I,onFocus:I,onKeyDown:e=>{(0,ty.mq)(e)&&S()}}),(0,o.jsx)(J.Z,{sx:{height:0,visibility:"hidden"},children:(0,o.jsx)(tr,{show:v,setShow:j})})]});return(0,o.jsxs)(eb.Z,{direction:"row",spacing:{xs:1,sm:2},children:[(0,o.jsx)(tn.f,{src:null==i?void 0:i.icon,size:{xs:"34px",sm:"47px"}}),(0,o.jsxs)(eb.Z,{width:"100%",children:[s?k:B,E,(0,o.jsx)(tI,{inputRef:a,openEmoji:x,setOpenEmoji:h,onChange:Z})]})]})};var tB=n(45229),tR=n(6085),tP=n(62e3),tL=n(79768),tz=n(95697),tM=n(89090),tF=n(86142),tV=n(7638),tT=n(82621),tJ=n(15972);let tA=e=>{let{comment:t,deleteComment:n,editable:s,handleCloseMenu:r}=e,[i,a]=(0,l.useState)(!1),[c,u]=(0,l.useState)(null),x=!!c,h=()=>{i&&a(!1),u(null),r()},m=[];return s&&m.push({icon:(0,o.jsx)(tM.Z,{}),name:"delete",onClick:()=>{a(!0),r()}}),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(J.Z,{sx:{disppay:"flow-root"},children:[(0,o.jsx)(er.Z,{"aria-controls":x?"comment-action-menu":void 0,"aria-haspopup":"true","aria-expanded":x?"true":void 0,disabled:0===m.length,id:"comment-action-button",onClick:e=>{u(e.currentTarget)},sx:{px:0,opacity:m.length>0?1:0},children:(0,o.jsx)(tF.Z,{})}),(0,o.jsx)(tT.Z,{id:"comment-action-menu",anchorEl:c,open:x,onClose:h,MenuListProps:{"aria-labelledby":"comment-action-button"},children:m.map(e=>(0,o.jsxs)(tJ.Z,{onClick:e.onClick,children:[(0,o.jsx)(tV.Z,{children:e.icon}),(0,o.jsx)(q.Z,{sx:{...Y.B[14]},children:(0,d.x)("common.button.".concat(e.name))})]},e.name))})]}),(0,o.jsx)(tz.Q,{confirmLabel:(0,d.x)("common-ui-components.button.delete"),label:(0,d.x)("common-ui-components.message.delete-confirm",{value:(0,d.x)("comment.title")}),open:i,onClose:h,onConfirm:()=>{try{h(),n(t.commentId)}catch(e){console.log(e)}}})]})};var tD=n(31962),tW=(0,eB.Z)((0,o.jsx)("path",{d:"m23 12-2.44-2.79.34-3.69-3.61-.82-1.89-3.2L12 2.96 8.6 1.5 6.71 4.69 3.1 5.5l.34 3.7L1 12l2.44 2.79-.34 3.7 3.61.82L8.6 22.5l3.4-1.47 3.4 1.46 1.89-3.19 3.61-.82-.34-3.69zm-12.91 4.72-3.8-3.81 1.48-1.48 2.32 2.33 5.85-5.87 1.48 1.48z"}),"Verified");let t_={marginLeft:.5,marginRight:.5,paddingRight:1,paddingLeft:1,backgroundColor:f.aG.notice.main,color:f.wJ.font.dark,borderRadius:"11px",fontSize:Y.B["14to12"],fontWeight:"bold"},tY={color:f.wJ.font.caption,px:0,pt:.5,textAlign:"left",width:"fit-content"},tG=e=>{var t,n;let{comment:s,deleteComment:r,hoveredCommentId:i,setHoveredCommentId:a}=e,u=(0,g.qN)();(0,ec.K)(ea.y.button.comment.show,s.commentId);let x=(0,ec.K)(ea.y.button.comment.hide,s.commentId),h=(0,l.useContext)(y.B),{user:m}=(0,l.useContext)(H.V),p=(0,c.sJ)(tD.c),[v,j]=(0,l.useState)(!1),[w,b]=(0,l.useState)(!1),I=(null==h?void 0:null===(t=h.streamerInfo)||void 0===t?void 0:t.userId)===s.userId,Z=(null==m?void 0:m.userId)===s.userId||(null==h?void 0:null===(n=h.streamerInfo)||void 0===n?void 0:n.userId)===(null==m?void 0:m.userId)||(null==p?void 0:p.isProductionManager)===!0,C="comment-id-".concat(s.commentId);(0,l.useEffect)(()=>{let e=document.getElementById(C);(0,ty.Vt)(e)>3&&(j(!0),b(!0))},[]);let S=e=>{Z&&a(e)},E=(0,o.jsxs)(eb.Z,{alignItems:"flex-start",direction:u?"column":"row",sx:{mb:{xs:1,sm:.5}},children:[(0,o.jsxs)(q.Z,{gap:.5,sx:{display:"inline-flex",verticalAlign:"sub"},children:[(0,ty.RD)(s)&&(0,o.jsx)(tW,{sx:{...Y.B[22],display:"inline",color:s.isStreamer?f.aG.notice.main:f.wJ.icon.production}}),(0,o.jsx)(q.Z,{component:"span",sx:{fontSize:Y.B["14to12"],...I&&{...t_}},children:s.name})]}),(0,o.jsx)(q.Z,{sx:{marginLeft:1,fontSize:Y.B["12"],color:f.wJ.font.caption,whiteSpace:"nowrap"},children:(0,tB.f)(s.createdAt)})]}),k=(0,o.jsx)(tR.S,{id:x,disableRipple:!0,sx:tY,onClick:()=>{b(!w)},children:(0,d.x)("comment.".concat(w?"read-more":"show-less"))});return(0,o.jsxs)(eb.Z,{direction:"row",spacing:{xs:1,sm:2},onMouseEnter:()=>S(Number(s.commentId)),onMouseLeave:()=>S(0),children:[s.isStreamer?(0,o.jsx)(tL.g,{src:s.icon,userId:s.userId,size:{xs:"34px",sm:"47px"}}):(0,o.jsx)(tn.f,{src:s.icon,size:{xs:"34px",sm:"47px"}}),(0,o.jsxs)(eb.Z,{width:"100%",onTouchEnd:e=>{S(0===i?Number(s.commentId):0)},children:[E,(0,o.jsx)(q.Z,{id:C,sx:{fontSize:Y.B["16to14"],...w&&{...(0,tP.Mb)(3)},whiteSpace:"pre-wrap"},children:s.message}),v&&k]}),(0,o.jsx)(J.Z,{sx:{visibility:i===Number(s.commentId)?"visible":"hidden"},children:(0,o.jsx)(tA,{comment:s,deleteComment:r,editable:Z,handleCloseMenu:()=>{a(0)}})})]})},tO=()=>{let{user:e}=(0,l.useContext)(H.V),t=(0,l.useContext)(y.B),n=(0,B.b9)(e5.Z),s=null==t?void 0:t.contentInfo.contentId,[r,i]=(0,l.useState)(0),[a,c]=(0,l.useState)([]),[u,x]=(0,l.useState)(!1),[h,m]=(0,l.useState)({offset:0,limit:20}),[p,v]=(0,l.useState)(),[g,j]=(0,l.useState)(0);(0,l.useEffect)(()=>{s&&(w(),(async()=>{var t,n,o;try{let o=[];(0,ee.nJ)(e)||(o=null===(t=await eO.Y_.getMyComments(s,{limit:2}))||void 0===t?void 0:t.comments);let r=null===(n=await eO.Y_.getComments(s,h))||void 0===n?void 0:n.comments;if(r){let e=(0,e8.R1)([...o,...r],"commentId");c(e)}x(r.length===h.limit)}catch(e){v((0,d.x)("server-error.".concat(null===(o=e.response)||void 0===o?void 0:o.code))),x(!1)}})())},[s]),(0,l.useEffect)(()=>{s&&(h.offset||0)>0&&eO.Y_.getComments(s,h).then(e=>{e.comments&&c((0,e8.R1)([...a,...e.comments],"commentId")),x(e.comments.length===h.limit),w()}).catch(e=>{var t;v((0,d.x)("server-error.".concat(null===(t=e.response)||void 0===t?void 0:t.code))),x(!1)})},[s,h.offset]);let w=()=>{eO.Y_.getCommentCount(s).then(e=>{i(e.commentsCount)}).catch(e=>{var t;v((0,d.x)("server-error.".concat(null===(t=e.response)||void 0===t?void 0:t.code)))})},b=e=>{eO.Y_.deleteComment(e).then(()=>{c(a.filter(t=>t.commentId!==e)),w(),n((0,d.x)("comment.message.deleted"))}).catch(e=>{var t;v((0,d.x)("server-error.".concat(null===(t=e.response)||void 0===t?void 0:t.code)))})};return(0,o.jsxs)(eb.Z,{sx:{px:{xs:2,sm:3},py:{xs:2.5,sm:3.5},position:"relative"},children:[(0,o.jsx)(q.Z,{sx:{...Y.B["18to14"]},children:(0,d.x)("comment.comment-count",{value:r.toLocaleString()})}),(0,o.jsx)(et.L,{height:"24px"}),(0,ee.nJ)(e)?(0,o.jsxs)(eb.Z,{alignItems:"center",direction:"row",gap:3,children:[(0,o.jsx)(q.Z,{sx:{...Y.B["16to14"],color:f.wJ.font.caption},children:(0,d.x)("comment.message.sign-in-to-post")}),(0,o.jsx)(e9.$,{})]}):(0,o.jsx)(tk,{postComment:e=>{s&&eO.Y_.postComment(s,{message:e}).then(e=>{let t=Array.from(a);t.unshift(e),c(t),w(),v("")}).catch(e=>{var t;v((0,d.x)("server-error.".concat(null===(t=e.response)||void 0===t?void 0:t.code)))})},setInputError:v}),(0,o.jsx)(e3.f,{errorMessage:p,sx:{px:{xs:5,sm:8},py:1}}),(0,o.jsx)(e2.Z,{dataLength:(null==a?void 0:a.length)||0,next:()=>{m(e=>({...e,offset:null==a?void 0:a.length}))},hasMore:u,loader:u&&(null==a?void 0:a.length)>0&&(0,o.jsx)(e6.Q,{}),style:{overflowY:"hidden"},children:(0,o.jsx)(eb.Z,{sx:{mt:{xs:4,sm:6}},children:a.map((e,t)=>(0,o.jsxs)(J.Z,{children:[(0,o.jsx)(tG,{comment:e,deleteComment:b,hoveredCommentId:g,setHoveredCommentId:j}),(0,o.jsx)(et.L,{height:{xs:"16px",sm:"32px"}})]},e.commentId))})}),(0,o.jsx)(e4.B,{})]})};var tH=n(11008),tN=n(39295),tU=n(37858),tK=n(3544),tq=n(16238),t$=n(3901);let tQ=e=>{var t,n,s;let{onChangeFollow:r}=e,i=(0,l.useContext)(y.B),a=(0,g.qN)();return(0,o.jsxs)(eb.Z,{direction:"row",justifyContent:"space-between",alignItems:"center",gap:.5,children:[(0,o.jsxs)(eb.Z,{direction:"row",alignItems:"center",gap:1,children:[(0,o.jsx)(tL.g,{size:{xs:"47px",sm:"56px"},src:null==i?void 0:i.streamerInfo.icon,userId:null==i?void 0:i.streamerInfo.userId}),(0,o.jsxs)(eb.Z,{gap:.5,children:[(0,o.jsx)(tq.B,{name:null==i?void 0:null===(t=i.streamerInfo)||void 0===t?void 0:t.name,userId:null==i?void 0:null===(n=i.streamerInfo)||void 0===n?void 0:n.userId,sx:Y.B["16to12"]}),(0,o.jsx)(t$.j,{fans:null==i?void 0:null===(s=i.streamerInfo)||void 0===s?void 0:s.followerCount,sx:Y.B["14to13"]})]}),!a&&(null==i?void 0:i.streamerInfo.voice)&&(0,o.jsx)(tK.b,{voice:i.streamerInfo.voice,size:32})]}),(0,o.jsx)(tU.r,{userId:null==i?void 0:i.streamerInfo.userId,callback:r})]})},tX=e=>{let{setOpenReturnGacha:t,onChangeFollow:n,onClickSubscriptionButton:s}=e,r=(0,l.useContext)(y.B),i=(null==r?void 0:r.streamerInfo.isEnabledStreamerSubscription)===!0;return(0,o.jsxs)(J.Z,{sx:{backgroundColor:{xs:"transparent",sm:f.wJ.background.layer},px:{xs:1.5,sm:3},py:{xs:3,sm:4}},children:[(0,o.jsx)(tQ,{onChangeFollow:n}),(0,o.jsxs)(J.Z,{sx:{display:"flex",alignItems:"center",flexDirection:"row",gap:{xs:2,sm:3},pt:{xs:1,sm:2}},children:[(0,o.jsx)(tH.U,{isEnabledReturnGacha:null==r?void 0:r.streamerInfo.isEnabledReturnGacha,size:64,onClick:()=>{t(!0)}}),(0,o.jsx)(tN.X,{size:64,show:i,onClick:s})]}),(null==r?void 0:r.contentInfo.summary)&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(S.Z,{sx:{pt:{xs:3,sm:2}}}),(0,o.jsx)(J.Z,{sx:{px:{xs:1,sm:0},pt:3},children:(0,o.jsx)(q.Z,{dangerouslySetInnerHTML:{__html:"".concat((null==r?void 0:r.contentInfo.summary)||"")},sx:{"> p":{margin:"0"},a:{color:f.aG.tertiary.main}}})})]})]})},t0=e=>{let{message:t}=e;return t?(0,o.jsx)(J.Z,{sx:{py:2},children:(0,o.jsx)(q.Z,{role:"alert",sx:{...Y.B[14],color:f.aG.warn.main},children:t})}):null};var t1=n(75878),t2=n(722),t5=n(64893),t3=n(66892),t4=n(15917),t8=n(94919);let t9=e=>{let{contentInfo:t}=e,n=(0,ek.qN)(),s=(0,ec.K)(ea.y.image["content-thumbnail"],null==t?void 0:t.contentId),r=(0,o.jsxs)(eb.Z,{"aria-hidden":!0,direction:"row",spacing:1,children:[(0,o.jsx)(J.Z,{children:(0,o.jsx)(t3.$,{contentInfo:t,width:"172px"})}),(0,o.jsxs)(eb.Z,{gap:"2px",sx:{width:"calc( 100% - 180px )"},children:[(0,o.jsx)(t8.w,{contentInfo:t,sx:{...Y.B[14]}}),(0,o.jsx)(t2.n,{contentInfo:t}),(0,o.jsx)(q.Z,{sx:{...Y.B[12],...tP.cL,color:f.wJ.font.caption},children:null==t?void 0:t.name}),(0,o.jsx)(t4.X,{contentInfo:t,sx:{...Y.B[12]}})]})]}),i=(0,o.jsxs)(eb.Z,{sx:{px:2.5},children:[(0,o.jsx)(t5._,{contentInfo:t}),(0,o.jsx)(tq.B,{name:null==t?void 0:t.name,userId:null==t?void 0:t.userId,sx:{...Y.B[12],color:f.wJ.font.caption,pt:.5}}),(0,o.jsx)(t4.X,{contentInfo:t,sx:{...Y.B[12],pt:.5}})]});return(0,o.jsx)(J.Z,{children:(0,o.jsx)(t1.J,{"aria-label":t.name+t.title,href:(0,T.t)(t),id:s,children:n?i:r})})},t6=()=>{let e=(0,l.useContext)(y.B),[t,n]=(0,l.useState)([]),[s,r]=(0,l.useState)({page:1,pageSize:12}),[i,a]=(0,l.useState)(!0),[c,u]=(0,l.useState)(),[x,h]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{let e=()=>{let e=!document.getElementById("watch-right-contents");x!=e&&h(e)};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[x]),(0,l.useEffect)(()=>{e&&eO.Ew.getRelatedContents(null==e?void 0:e.contentInfo.contentId,s).then(e=>{var o;1===s.page?n(e.contents):n((0,e8.R1)([...t,...e.contents],"contentId")),((null===(o=e.contents)||void 0===o?void 0:o.length)<s.pageSize||5===s.page)&&a(!1)}).catch(e=>{var t;u((0,d.x)("server-error.".concat(null===(t=e.response)||void 0===t?void 0:t.code))),a(!1)})},[s,e]),(0,o.jsxs)(o.Fragment,{children:[t.length>0&&!x&&(0,o.jsx)(q.Z,{sx:{...Y.B[18]},children:(0,d.x)("content.child-title.related-contents")}),(0,o.jsx)(J.Z,{sx:{pt:3},children:(0,o.jsx)(e2.Z,{dataLength:t.length,next:()=>{r(e=>({...e,page:s.page+1}))},hasMore:i,loader:i&&t.length>0&&(0,o.jsx)(e6.Q,{}),style:{overflowY:"hidden"},scrollableTarget:document.getElementById("tips-watch-wrapper")?"tips-watch-wrapper":"",children:(0,o.jsxs)(o.Fragment,{children:[t.map(e=>(0,o.jsx)(J.Z,{sx:{pb:{xs:3,sm:1}},children:(0,o.jsx)(t9,{contentInfo:e},e.contentId)},e.contentId)),(0,o.jsx)(t0,{message:c})]})})})]})},t7=e=>{let{setOpenReturnGacha:t,onChangeFollow:n,onClickSubscriptionButton:s}=e,r=(0,l.useContext)(y.B),[i,a]=(0,c.FV)(el),[u,x]=(0,l.useState)(!1);(0,l.useEffect)(()=>{a(0)},[r]),(0,l.useEffect)(()=>{let e=()=>{let e=!document.getElementById("watch-right-contents");u!=e&&x(e)};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[u]);let h=!(0,C.Bv)(null==r?void 0:r.contentInfo)&&(null==r?void 0:r.contentInfo.isEnabledComments),m=[];return m.push((0,o.jsx)(tX,{setOpenReturnGacha:t,onChangeFollow:n,onClickSubscriptionButton:s})),h&&m.push((0,o.jsx)(tO,{})),u&&m.push((0,o.jsx)(t6,{})),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(eX.L,{height:{xs:"8px",sm:"16px"}}),(0,o.jsxs)(e0.Yt,{"aria-label":(0,d.x)("aria-label.tab-contents"),onChange:(e,t)=>{a(t)},value:i,children:[(0,o.jsx)(e0.iC,{label:(0,d.x)("content.child-title.summary"),...(0,e0.fI)(0)}),h&&(0,o.jsx)(e0.iC,{label:(0,d.x)("content.child-title.comment"),...(0,e0.fI)(1)}),u&&(0,o.jsx)(e0.iC,{label:(0,d.x)("content.child-title.related-contents"),...(0,e0.fI)(2)})]}),m.map((e,t)=>(0,o.jsx)(e1.L,{value:i,index:t,children:e},"tab-".concat(t)))]})};var ne=n(18406);let nt=()=>{let{user:e}=(0,l.useContext)(H.V),t=(0,l.useContext)(y.B),n=(0,c.Zl)(tD.c);(0,l.useEffect)(()=>{if(!t||!e||!e.isProductionManager){n({isProductionManager:!1});return}(async()=>{try{n(await eO.PI.getRole(null==t?void 0:t.contentInfo.contentId))}catch(e){console.error(e)}})()},[e,t])},nn=p()(()=>Promise.all([n.e(9321),n.e(1396),n.e(9743),n.e(4133)]).then(n.bind(n,4133)),{loadableGenerated:{webpack:()=>[4133]},ssr:!1}),no=e=>{let{setOpenReturnGacha:t,onChangeFollow:n,onClickSubscriptionButton:s}=e,r=(0,l.useContext)(y.B),i=(0,ek.pG)(),a=(0,g.dD)(),d=(0,v.U)(),[u,x]=(0,c.FV)(ne.B),[h,m]=(0,l.useState)(!1),[p,w]=(0,l.useState)(!1),[b,I]=(0,l.useState)(),[Z,C]=(0,l.useState)(0),[S,E]=(0,l.useState)(),[B,R]=(0,l.useState)(!1);nt(),(0,l.useEffect)(()=>(r&&(E((0,o.jsx)(nn,{})),R(ns(null==r?void 0:r.contentInfo))),()=>{E(void 0)}),[r]),(0,l.useEffect)(()=>{if(!r)return;let e=()=>{let e=!i||!d&&!h;u!==e&&x(e),i&&setTimeout(()=>{let e=(0,ty.gp)();Z!==e&&C(Math.floor(e))},100)};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[u,r,d,i,h,Z]),(0,l.useEffect)(()=>{a&&i&&setTimeout(()=>{if(h){window.scroll({top:0,behavior:"smooth"});let e=document.getElementById("main-wrapper");e&&e.scrollIntoView({behavior:"smooth",block:"start"})}},L.y.chat.focus)},[a,i,p,h]),(0,l.useEffect)(()=>{(0,j.fe)(j.Yw.chatFrame.displayChanged)},[i,d]);let P=d?{mx:"auto",overflow:"hidden",height:"".concat(Z,"px"),scrollbarWidth:"none",...ed.TN}:{width:"100%",overflowY:h?"hidden":"auto",height:"".concat(Z,"px"),scrollbarWidth:"none"},z=i?{position:"sticky",top:0,zIndex:V.b.watch.sticky,backgroundColor:f.aG.primary.main}:{pt:2,width:"calc( 100% - ".concat(422,"px)")},M=B&&(!i||i&&h);return(0,o.jsxs)(J.Z,{id:i?"tips-watch-wrapper":"",sx:i?P:{width:"100%",maxWidth:"1700px",display:"flex",mx:"auto",px:3},children:[(0,o.jsxs)(J.Z,{id:i?"tips-player-bar":"",sx:z,children:[(0,o.jsx)(J.Z,{children:S}),!i&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(eQ,{}),(0,o.jsx)(t7,{setOpenReturnGacha:t,onChangeFollow:n,onClickSubscriptionButton:s})]})]}),(0,o.jsxs)(J.Z,{id:i?"watch-bottom-contents":"watch-right-contents",sx:{...i?{}:{pt:2,pl:3,width:"".concat(422,"px")}},children:[M&&(0,o.jsx)(_,{openChat:h,chatTypeOpen:b,setOpenChat:m,setFocusInput:w,setChatTypeOpen:I,onClickSubscriptionButton:s}),!M&&i&&(0,o.jsxs)(J.Z,{children:[!h&&(0,o.jsx)(eQ,{}),B&&(0,o.jsx)(k,{openChat:h,setOpenChat:m,setChatTypeOpen:I}),!h&&(0,o.jsx)(t7,{setOpenReturnGacha:t,onChangeFollow:n,onClickSubscriptionButton:s})]}),!i&&(0,o.jsx)(J.Z,{sx:{pt:B?{xs:0,sm:"28px"}:0},children:(0,o.jsx)(t6,{})})]})]})},ns=e=>{let t=!1;return(0,C.Bv)(e)?t=!0:(0,C.Nt)(e)&&(t=(null==e?void 0:e.isEnabledChatReplay)===!0),t};var nr=n(93215),ni=n(56720);let na=e=>{let{contentInfo:t,streamerInfo:n}=e,s=(0,g.qN)(),r=(0,o.jsxs)(eb.Z,{direction:"row",columnGap:2,children:[(0,o.jsx)(t3.$,{isErrorPage:!0,showLabel:!0,contentInfo:t,width:"375px"}),(0,o.jsxs)(eb.Z,{gap:1,children:[(0,o.jsx)(t8.w,{contentInfo:t,sx:{...Y.B[18],lineHeight:"20px"}}),(0,o.jsxs)(eb.Z,{alignItems:"center",direction:"row",spacing:1,children:[(0,o.jsx)(tL.g,{size:"28px",src:n.icon,userId:n.userId}),(0,o.jsx)(tq.B,{name:n.name,userId:n.userId,sx:{...Y.B[12],color:f.wJ.font.caption}})]}),(0,o.jsxs)(eb.Z,{gap:1,sx:{pt:2},children:[(0,o.jsx)(t2.n,{contentInfo:t}),(0,o.jsx)(t4.X,{contentInfo:t,sx:{...Y.B[12],color:f.wJ.font.info}})]}),(0,o.jsx)(q.Z,{sx:{...Y.B[12],...tP.cL,color:f.wJ.font.info},children:(0,o.jsx)(ni.h,{contentInfo:t})})]})]}),i=(0,o.jsxs)(eb.Z,{gap:1,sx:{width:"100%"},children:[(0,o.jsx)(t3.$,{isErrorPage:!0,contentInfo:t,width:"inherit"}),(0,o.jsx)(t2.k,{contentInfo:t}),(0,o.jsx)(t8.w,{contentInfo:t,sx:Y.B[14]})]});return s?i:r},nl=e=>{let{contentId:t,onChangeFollow:n}=e,s=(0,g.qN)(),[r,i]=(0,l.useState)();return((0,l.useEffect)(()=>{eO.PI.getOutOfScopeError(t).then(e=>{i(e)}).catch(e=>{console.error(e)})},[]),null==r?void 0:r.streamerInfo)?(0,o.jsx)(J.Z,{id:"watch-invalid-wrapper",children:(0,o.jsxs)(J.Z,{sx:{pt:{xs:6,sm:12},mb:5,px:1},children:[(0,o.jsx)(q.Z,{align:"center",sx:{...Y.B[14],fontWeight:"bold"},children:(0,d.x)("content.message.follower-only")}),(0,o.jsx)(J.Z,{sx:{m:"auto",mt:{xs:4,sm:10},maxWidth:636},children:(0,o.jsxs)(eb.Z,{direction:"row",justifyContent:"space-between",alignItems:"center",gap:.5,children:[(0,o.jsxs)(eb.Z,{direction:"row",justifyContent:"flex-start",alignItems:"center",gap:1,children:[(0,o.jsx)(tL.g,{size:{xs:"47px",sm:"56px"},src:r.streamerInfo.icon,userId:r.streamerInfo.userId}),(0,o.jsxs)(eb.Z,{direction:"column",justifyContent:"flex-start",alignItems:"flex-start",gap:{xs:.5,sm:1},children:[(0,o.jsx)(tq.B,{name:r.streamerInfo.name,userId:r.streamerInfo.userId,sx:Y.B["16to14"]}),(0,o.jsx)(t$.j,{fans:r.streamerInfo.followerCount,sx:Y.B["14to13"]})]}),r.streamerInfo.voice&&!s&&(0,o.jsx)(tK.b,{streamerId:r.streamerInfo.userId,voice:r.streamerInfo.voice,size:32})]}),(0,o.jsx)(tU.r,{userId:r.streamerInfo.userId,callback:n})]})}),(0,o.jsx)(J.Z,{sx:{m:"auto",mt:{xs:6,sm:10},maxWidth:"1000px"},children:(0,o.jsx)(na,{contentInfo:r.contentInfo,streamerInfo:r.streamerInfo})}),(0,o.jsx)(J.Z,{sx:{mt:{xs:6,sm:"152px"},textAlign:"center"},children:(0,o.jsx)(nr.u,{})})]})}):null};var nc=n(36082),nd=n(44910),nu=n(67429),nx=n(60792),nh=n(56339),nm=n(92163);let np=e=>{let{contentId:t,getContent:n}=e,s=(0,a.useRouter)(),{user:r}=(0,l.useContext)(H.V),i=(0,B.b9)(nc.u),c=(0,ec.K)(ea.y.button.back),[u,x]=(0,l.useState)(),[h,m]=(0,l.useState)(),[p,v]=(0,l.useState)(),[g,j]=(0,l.useState)(!1),[w,b]=(0,l.useState)(),[y,C]=(0,l.useState)(!1),S=(0,l.useRef)(new URLSearchParams);(0,l.useEffect)(()=>{E()},[]);let E=async()=>{try{let e=await eO.PI.getOutOfScopeError(t);x(e);let{subscriptions:n}=await eO._7.getMySubscriptions(e.streamerInfo.userId);v(n[0]);let o=await eO._7.getPlans(e.streamerInfo.userId,t);m(o)}catch(t){var e;i((0,d.x)("server-error.".concat(null===(e=t.response)||void 0===e?void 0:e.code)))}};return(null==u?void 0:u.streamerInfo)&&h?(0,o.jsxs)(J.Z,{id:"watch-invalid-wrapper",sx:{position:"relative",pb:"200px"},children:[(0,o.jsx)(nd.x,{id:c,sx:{position:"absolute",top:{xs:16,sm:20},left:{xs:12,sm:36},color:f.aG.info.main},onClick:()=>{var e;let t=null!==(e=new URLSearchParams(location.search).get(Z.l.origin))&&void 0!==e?e:"";t&&(0,nu.Ih)(t)?s.replace(t):s.push((0,I.k7)(""))}}),(0,o.jsxs)(eb.Z,{alignItems:"center",gap:{xs:4,sm:7},pt:{xs:10,sm:9},pb:{xs:6,sm:9},children:[(0,o.jsx)(q.Z,{sx:{...Y.B["16to14"],fontWeight:"bold"},children:(0,d.x)("content.message.subscription-only")}),(0,o.jsx)(J.Z,{sx:{maxWidth:"1000px",px:{xs:1.5},width:"100%"},children:(0,o.jsx)(na,{contentInfo:u.contentInfo,streamerInfo:u.streamerInfo})}),(0,o.jsxs)(eb.Z,{sx:{gap:1,maxWidth:"1000px",width:"100%"},children:[(0,o.jsx)(q.Z,{sx:{textAlign:"center",...Y.B["20to18"],fontWeight:"bold"},children:(0,d.x)("subscription.title.plan-list")}),(0,o.jsx)(J.Z,{sx:{backgroundColor:{sm:f.aG.primary.main},border:{sm:"1px solid ".concat(f.E0.light)},borderRadius:f.Cz.borderRadius.card},children:(0,o.jsx)(nm.e,{mySubscription:p,subscriptionPlanInfo:h,onClickSubscribeButton:e=>{(0,ee.nJ)(r)?(S.current.append(Z.l.origin,location.href),S.current.append(Z.l.content,t),j(!0)):(null==u?void 0:u.streamerInfo.userId)===(null==r?void 0:r.userId)?i((0,d.x)("subscription.error.cannot-subscribe-own-plan")):b(e)}})})]})]}),(0,o.jsx)(J.Z,{sx:{textAlign:"center"},children:(0,o.jsx)(nr.u,{})}),w&&(0,o.jsx)(nv,{open:!0,streamer:u.streamerInfo,mySubscription:p,subscriptionPlanInfo:w,onClose:()=>{b(void 0),y&&(n(),E(),C(!1))},onFinishedPayment:()=>{C(!0)}}),(0,o.jsx)(eo.g,{open:g,setOpen:j,search:S.current.toString()})]}):null},nv=e=>{let{streamer:t,mySubscription:n,open:s,subscriptionPlanInfo:r,onClose:i,onFinishedPayment:a}=e;return n?(0,o.jsx)(nx.R,{mySubscription:n,open:s,streamer:t,subscriptionPlanInfo:r,onClose:i,onFinishedPayment:a}):(0,o.jsx)(nh.x,{streamer:t,open:s,subscriptionPlanInfo:r,onClose:i,onFinishedPayment:a})},nf=()=>(0,o.jsx)(J.Z,{id:"watch-invalid-wrapper",children:(0,o.jsxs)(J.Z,{textAlign:"center",sx:{pt:{xs:2,sm:7},px:1,pb:5},children:[(0,o.jsx)(q.Z,{align:"center",sx:{mt:{xs:2,sm:5},fontWeight:"bold"},children:(0,d.x)("content.message.unavailable-video")}),(0,o.jsx)(J.Z,{sx:{maxWidth:"100%",width:820,mx:"auto",mt:4,mb:6},children:(0,o.jsx)(es.k,{src:(0,en.x)(en.o.images.visual.welcome),sx:{height:"100%",width:"100%"}})}),(0,o.jsx)(nr.u,{})]})});var ng=n(5553),nj=n(65059),nw=()=>{var e,t,n,r;let m=(0,a.useRouter)(),[p,v]=(0,l.useState)(),[f,g]=(0,l.useState)(!1),[j,w]=(0,l.useState)(),[b,I]=(0,c.FV)(nj.H),[S,E]=(0,l.useState)(),k=(0,l.useRef)();(0,l.useEffect)(()=>{z(),(async()=>{k.current=new URLSearchParams(location.search).get(Z.l.content),await B()})()},[location.search]);let B=async()=>{if(k.current){p&&v(void 0);try{v(await eO.PI.getContent(k.current)),b&&I(void 0)}catch(t){var e;I(null===(e=t.response)||void 0===e?void 0:e.code)}}else m.push((0,T.in)(ng.S[404]["unavailable-video"])).then(()=>{z()})};(0,l.useEffect)(()=>{R()},[b]);let R=()=>{b&&b!==ng.S[403]["follower-only"]&&b!==ng.S[404]["unavailable-video"]&&b!==ng.S[403]["subscription-only"]&&b!==ng.S.network&&b!==ng.S.timeout&&m.push((0,T.in)(b)).then(()=>{z()})},P=async()=>{(b===ng.S[403]["follower-only"]||(0,C.uF)(null==p?void 0:p.contentInfo))&&await B()},L=async e=>{try{w("string"==typeof e?e:null==p?void 0:p.streamerInfo.userId)}catch(e){var t;I(null===(t=e.response)||void 0===t?void 0:t.code)}},z=()=>{p&&v(void 0),S&&E(void 0),b&&I(void 0),f&&g(!1)};(0,l.useEffect)(()=>{E(F())},[p,b]);let M=()=>{let e=new URL(location.href);e.searchParams.delete(Z.l.origin),m.replace(e.toString())},F=()=>b===ng.S[403]["follower-only"]?(M(),(0,o.jsx)(nl,{contentId:k.current,onChangeFollow:P})):b===ng.S[403]["subscription-only"]?(0,o.jsx)(np,{contentId:k.current,getContent:B}):b===ng.S[404]["unavailable-video"]?(M(),(0,o.jsx)(nf,{})):void 0===p?(0,o.jsx)(o.Fragment,{}):(M(),(0,o.jsx)(no,{setOpenReturnGacha:g,onChangeFollow:P,onClickSubscriptionButton:L}));return(0,o.jsxs)(u.E,{children:[(0,o.jsx)(i(),{children:(0,o.jsx)("title",{children:(null==p?void 0:null===(e=p.contentInfo)||void 0===e?void 0:e.title)?(null==p?void 0:null===(t=p.contentInfo)||void 0===t?void 0:t.title)+(0,d.x)("content.head-title"):(0,d.x)("app-title")})}),(null==p?void 0:null===(n=p.contentInfo)||void 0===n?void 0:n.title)?(0,o.jsx)(s.PB,{title:(null==p?void 0:null===(r=p.contentInfo)||void 0===r?void 0:r.title)+(0,d.x)("content.head-title")}):(0,o.jsx)(o.Fragment,{}),(0,o.jsxs)(y.B.Provider,{value:p,children:[S,(0,o.jsx)(x.x,{open:f,setOpen:g,streamerUserId:null==p?void 0:p.streamerInfo.userId}),p&&j&&(0,o.jsx)(h.Z,{open:!0,streamerId:j,onClose:()=>{w(void 0)}})]})]})}},83853:function(e,t,n){"use strict";n.d(t,{o:function(){return u}});var o=n(85893),s=n(85985),r=n(53751),i=n(98711),a=n(79557),l=n(59093),c=n(67429),d=n(4336);let u=e=>{var t;let{rankingEventInfo:n,params:u,sx:x,children:h}=e;return(0,o.jsxs)(d.Z,{disableRipple:!0,sx:{display:"flex",flexDirection:"column",p:0},onClick:()=>{var e;let t=(0,l.qg)(new URL((0,a.LS)()?(0,r.iB)("ranking-event/detail"):(0,r.k7)("ranking-event/detail")));t.searchParams.set(i.l.rankingEvent,null!==(e=null==n?void 0:n.rankingEventId)&&void 0!==e?e:""),u&&Object.keys(u).forEach(e=>{t.searchParams.set(e,u[e])}),(0,c.eX)(t.toString())},children:[(0,o.jsx)(s.k,{alt:null==n?void 0:n.eventTitle,title:null==n?void 0:n.eventTitle,src:null==n?void 0:null===(t=n.banner)||void 0===t?void 0:t[300],sx:{...x}}),h]},null==n?void 0:n.rankingEventId)}},63766:function(e,t,n){"use strict";n.d(t,{M:function(){return m}});var o=n(85893),s=n(67294),r=n(83853),i=n(44208),a=n(13524),l=n(17255),c=n(86553),d=n(21485);let u=e=>{let{fontSize:t,rankingEventInfo:n}=e,r=(0,i.e)(n),[u,x]=(0,s.useState)(""),h="SCHEDULED"===(0,s.useRef)(r.eventStatus).current&&"STARTED"===r.eventStatus;(0,s.useEffect)(()=>{let e=(0,c.x)("common-component.ranking-event.list.event-status.".concat(r.eventStatus));h&&(e=(0,c.x)("common-component.ranking-event.list.event-status.get-started")),x(e)},[r.eventStatus,r.isTargetAchieved]);let m=r&&!r.isTargetAchieved&&!h&&(0,o.jsx)(o.Fragment,{children:r.days?(0,c.x)("common-component.common.date.day",{value:r.days}):(0,o.jsxs)(o.Fragment,{children:[void 0!==r.hours&&(0,c.x)("common-component.common.date.hour",{value:r.hours}),void 0!==r.minutes&&(0,c.x)("common-component.common.date.minute",{value:(0,l.Hr)(r.minutes)}),void 0!==r.seconds&&(0,c.x)("common-component.common.date.second",{value:(0,l.Hr)(r.seconds)})]})});return(0,o.jsxs)(d.Z,{sx:{...t,fontWeight:"bold",color:(r.totalRemainHours||0)>=1||"ENDED"===r.eventStatus?"":a.aG.warn.main},children:[u,m]})};var x=n(85905),h=n(3314);let m=e=>{let{rankingEventInfo:t,params:n}=e,[i,l]=(0,s.useState)(x.B[14]),c=(0,s.useRef)(null);return(0,s.useEffect)(()=>{let e=()=>{var e,t;let n=(null!==(t=null===(e=c.current)||void 0===e?void 0:e.clientWidth)&&void 0!==t?t:0)<=320?x.B[12]:x.B[14];n!==i&&l(n)};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[]),(0,o.jsx)(r.o,{rankingEventInfo:t,params:n,sx:{borderTopLeftRadius:a.Cz.borderRadius.medium,borderTopRightRadius:a.Cz.borderRadius.medium},children:(0,o.jsx)(h.Z,{className:"ranking-event-banner-item-countdown-timer",sx:{background:a.wJ.background.eventRemainDate,py:{xs:.5,sm:1},textAlign:"center",width:"100%",borderBottomLeftRadius:a.Cz.borderRadius.medium,borderBottomRightRadius:a.Cz.borderRadius.medium},children:(0,o.jsx)(u,{rankingEventInfo:t,fontSize:i})})})}},44208:function(e,t,n){"use strict";n.d(t,{e:function(){return u},g:function(){return h}});var o=n(64077),s=n(49017),r=n(32082),i=n(44961),a=n(81719),l=n(19724),c=n.n(l),d=n(67294);let u=e=>{let[t,n]=c()({countdown:!0,updateWhenTargetAchieved:!0});(0,d.useEffect)(()=>{s()},[e,t]),(0,d.useEffect)(()=>{n&&(t.isRunning()&&t.stop(),"STARTED"===h(null==e?void 0:e.eventEndedAt,null==e?void 0:e.eventStartedAt)&&s())},[n,t]);let s=()=>{let n;if(!e)return;let s=h(e.eventEndedAt,e.eventStartedAt);"STARTED"===s?n=e.eventEndedAt:"SCHEDULED"===s&&(n=e.eventStartedAt);let r=new Date,i=n?new Date(n):new Date,a=(0,o._)(i,r),l=x(a);a>0&&t.start({startValues:l})},r=t.getTotalTimeValues(),{days:i,hours:a,minutes:l,seconds:u}=t.getTimeValues(),v={};return r.days>0&&(v.days=i),r.hours>0&&(v.hours=a),r.minutes>0&&(v.minutes=l),r.seconds>0&&(v.seconds=u),v.totalRemainHours=r.hours,e&&(v.eventStatus=h(null==e?void 0:e.eventEndedAt,null==e?void 0:e.eventStartedAt)),(null==e?void 0:e.entryEndedAt)&&(v.isEntryEnded=p(e),v.isEntryBefore=m(e),v.isEntryPeriod=!v.isEntryEnded&&!v.isEntryBefore),"ENDED"===v.eventStatus&&(v.isTargetAchieved=!0),v},x=e=>({days:Math.floor(e/864e5),hours:Math.floor(e/36e5)%24,minutes:Math.floor(e/6e4)%60,seconds:Math.floor(e/1e3)%60}),h=(e,t)=>{let n=(0,s.n)(new Date,999),o=new Date(null!=t?t:""),l=new Date(null!=e?e:"");return(0,r.q)(n,l)||(0,i.A)(n,l)?"ENDED":(0,a.R)(n,o)?"SCHEDULED":"STARTED"},m=e=>{var t;let n=(0,s.n)(new Date,999),o=new Date(null!==(t=null==e?void 0:e.entryStartedAt)&&void 0!==t?t:"");return(0,a.R)(n,o)},p=e=>{var t;let n=(0,s.n)(new Date,999),o=new Date(null!==(t=null==e?void 0:e.entryEndedAt)&&void 0!==t?t:"");return(0,i.A)(n,o)}},44910:function(e,t,n){"use strict";n.d(t,{x:function(){return c}});var o=n(85893),s=n(85905),r=n(86553),i=n(29173),a=n(4336),l=n(21485);let c=e=>(0,o.jsxs)(a.Z,{...e,disableRipple:!0,variant:"text",sx:{display:"flex",gap:.5,p:0,...e.sx},children:[(0,o.jsx)(i.Z,{sx:{height:40,width:40,color:"inherit"}}),(0,o.jsx)(l.Z,{sx:{...s.B[14],color:"inherit"},children:(0,r.x)("common-ui-components.button.back")})]})},95697:function(e,t,n){"use strict";n.d(t,{Q:function(){return x}});var o=n(85893),s=n(82742),r=n(18801),i=n(85905),a=n(13524),l=n(86553),c=n(33453),d=n(84166),u=n(21485);let x=e=>{let{open:t,label:n,cancelLabel:x,confirmLabel:h,onClose:m,onConfirm:p}=e;return(0,o.jsxs)(c.Z,{open:t,sx:{"& .MuiBackdrop-root":{backgroundColor:a.wJ.background.dialogBackdrop},"& .MuiDialog-paper":{backgroundColor:a.aG.primary.main,width:{xs:280,sm:480},height:"auto !important",borderRadius:"8px",boxShadow:"none"}},children:[(0,o.jsx)(s.L,{height:40}),(0,o.jsx)(u.Z,{dangerouslySetInnerHTML:{__html:n||""},sx:{...i.B[16],fontWeight:"bold",px:3,color:a.wJ.font.basic}}),(0,o.jsx)(s.L,{height:24}),(0,o.jsxs)(d.Z,{direction:"row",mr:2,mb:3,justifyContent:"flex-end",spacing:2,children:[(0,o.jsx)(r.z,{variant:"outlined",onClick:m,children:(0,o.jsx)(u.Z,{sx:{...i.B[14],fontWeight:"bold"},children:null!=x?x:(0,l.x)("common-ui-components.button.cancel")})}),(0,o.jsx)(r.z,{variant:"contained",onClick:p,children:(0,o.jsx)(u.Z,{sx:{...i.B[14],fontWeight:"bold"},children:null!=h?h:(0,l.x)("common-ui-components.button.ok")})})]})]})}},85596:function(e,t,n){"use strict";n.d(t,{f:function(){return a}});var o=n(85893),s=n(85905),r=n(13524),i=n(21485);let a=e=>{let{ariaLabel:t,errorMessage:n,sx:a}=e;return(0,o.jsx)(o.Fragment,{children:n&&(0,o.jsx)(i.Z,{"aria-label":null!=t?t:n,role:"alert",sx:{...s.B[14],color:r.aG.warn.main,marginTop:1,width:{xs:"100%",sm:"max-content"},"& a":{color:r.aG.tertiary.main,textDecoration:"underline"},...a},children:(0,o.jsx)("span",{dangerouslySetInnerHTML:{__html:n}})})})}},18801:function(e,t,n){"use strict";n.d(t,{z:function(){return a}});var o=n(85893),s=n(13524),r=n(16829),i=n(4336);let a=(0,r.Z)(e=>(0,o.jsx)(i.Z,{disableRipple:!0,...e,sx:{color:s.wJ.font.basic,"&.MuiButton-contained":{color:"info"===e.buttoncolor?s.wJ.font.dark:s.wJ.font.basic,backgroundColor:e.buttoncolor?s.aG[e.buttoncolor].main:s.aG.secondary.main},"&.MuiButton-outlined":{borderColor:s.wJ.border.input,"&:hover":{backgroundColor:"transparent"}},"&.MuiButton-contained, &.MuiButton-outlined, &.MuiButton-text":{"&.Mui-disabled":{color:"info"===e.buttoncolor?s.wJ.font.dark:s.wJ.font.basic,opacity:s.wJ.opacity.disabled}},...e.sx}}))({borderRadius:"6px",fontWeight:"bold",height:"42px",minWidth:"118px",whiteSpace:"nowrap"})},49017:function(e,t,n){"use strict";n.d(t,{n:function(){return r}});var o=n(16393),s=n(46042);function r(e,t,n){return(0,o.L)((null==n?void 0:n.in)||e,+(0,s.Q)(e)+t)}},32082:function(e,t,n){"use strict";n.d(t,{q:function(){return r}});var o=n(46042);function s(e,t){let n=(0,o.Q)(e,null==t?void 0:t.in);return n.setMilliseconds(0),n}function r(e,t){return+s(e)==+s(t)}}},function(e){e.O(0,[7603,9510,2178,9332,1156,5037,4278,1812,2608,4347,2261,3550,4332,9527,8491,6737,370,3792,9724,4184,5053,1097,660,4458,3229,9991,3530,872,501,2888,9774,179],function(){return e(e.s=31767)}),_N_E=e.O()}]);