/*! VERSION | 10.78.9 */"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[5254],{21710:(e,t,a)=>{a.r(t),a.d(t,{ViewCamPage:()=>ty,default:()=>tP});var i=a(18775),s=a(66813),l=a(99942),r=a(13165),n=a(27378),o=a(48204),c=a(46424),d=a(59188),m=a(79506);let u={addBotMessage:c.f$},p=(0,o.$j)(null,u)(e=>((0,d.H)(()=>{m.Z.addCallableMethod("sendChatMessage",({sender:t,message:a,username:i,notMentionInvisible:s=!1})=>{e.addBotMessage(t,a,i,s)})}),(0,n.useEffect)(()=>()=>m.Z.terminate()),null));var h=a(52872),v=a(91805),E=a(25416),g=a(80439),S=a(29413),b=a(56509),C=a(95654),f=a(41230),y=a(50423);let T=()=>{let e=(0,C.C)(g.GU),{windowOrientation:t}=(0,y.iP)("windowOrientation"),[a,i]=(0,n.useState)(),[s,l]=(0,n.useState)(!1),r=(0,n.useRef)();return((0,d.H)(()=>{i(t)}),(0,f.l)(()=>{let n=e&&t!==a;e||t===r.current||i(t),n!==s&&l(n),r.current=t},[t]),s)?n.createElement("div",{className:"broadcast-rotate-warning"},n.createElement("div",{className:"broadcast-rotate-warning-content"},n.createElement(S.Z,{img:"device-rotate"}),n.createElement("div",{className:"broadcast-rotate-warning-title"},(0,b.dW)("broadcastRotateWarning.title")),e&&n.createElement(n.Fragment,null,n.createElement("div",{className:"broadcast-rotate-warning-description"},(0,b.dW)("broadcastRotateWarning.descriptionModelOne")),n.createElement("div",{className:"broadcast-rotate-warning-description"},(0,b.dW)("broadcastRotateWarning.descriptionModelTwo"))))):null};var P=a(84807);let w=()=>n.createElement("div",{className:"view-cam"},n.createElement("div",{className:"wrapper"},n.createElement("div",{className:"main"},n.createElement("div",{className:"strut"}))),n.createElement("div",{className:"controls-wrapper"}));var _=a(85353);let N=({isVisible:e=!0,message:t})=>e?n.createElement("div",{className:"loader-wrapper"},n.createElement(_.Z,{isCentered:!0}),t?n.createElement("div",{className:"loader-wrapper-message"},t):null):null,A=({content:e=null,loadingMessage:t=""})=>n.createElement("div",{className:"main"},e,n.createElement(N,{isVisible:!e,message:t}),n.createElement("div",{className:"video"},n.createElement(w,null)));var k=a(41763);let I=(0,n.memo)(({limit:e})=>n.createElement("div",{className:"view-cam-model-list-skeleton widescreen-container model-list-wrapper"},n.createElement("div",{className:"model-list-container"},n.createElement("div",{className:"view-cam-model-list-skeleton__nav-bar"},n.createElement("div",{className:"view-cam-model-list-skeleton__nav-item"}),n.createElement("div",{className:"view-cam-model-list-skeleton__nav-item"}),n.createElement("div",{className:"view-cam-model-list-skeleton__nav-item"}),n.createElement("div",{className:"view-cam-model-list-skeleton__nav-item"})),n.createElement("div",{className:"model-list-container"},n.createElement("div",{className:"paginated model-list"},n.createElement("div",{className:"paginated-list"},(0,k.pB)(e)))))));var M=a(40094),L=a(44766),R=a(33914),U=a(36886),Z=a(62203);let O=["girls","men","trans","related","recommended","couples"],W=({model:e})=>{let t=(0,C.C)(Z.Km),a=(0,C.C)(R.zO),i=(0,U.t)();return i?a?n.createElement(L.Z,{isWidescreen:!0,key:null==e?void 0:e.id,model:e,showFilters:!t,shouldLogPopularSnapshot:!0,preferredOrder:O}):n.createElement(I,{limit:(0,M.zM)()}):n.createElement(I,{limit:M.wT})};var B=a(3620),F=a(4289),D=a(95366),V=a(73545),x=a(99748),$=a(28656),H=a(63256),K=a(12712),G=a(69024),z=a(42191),j=a(62848),Y=a(86320),q=a(87489),Q=a(39709),J=a(21044),X=a(82168),ee=a(69247),et=a(84119),ea=a(93803),ei=a(40108),es=a(62668),el=a(30486),er=a(12710),en=a(80406);let eo=(0,en.P1)([R.HR,R.B8,V.oh],(e,t,a)=>{let{videos:i,photos:s,posts:l}=t;return a?{photosCount:s[a],videosCount:i[a],postsCount:l[a]}:e});var ec=a(2811),ed=a(62779);let em={emitJoinFanClubButtonEvent:es.FY},eu=({viewCamFanClubMediaCounters:e})=>{let t=Object.entries(e).filter(([,e])=>e);return n.createElement("div",{className:(0,x.AK)("fan-club-welcome-stat-wrapper",{"short-wrapper":t.length<3})},t.map(([e,t])=>n.createElement("div",{className:"fan-club-welcome-stat",key:e},n.createElement("div",{className:"fan-club-welcome-stat-number"},(0,er.ER)(t)),n.createElement(el.Z,{messageId:`fanClub.welcome.stats.${e}`,parameters:{count:t},choiceParameter:"count",wrapper:null}))))},ep=e=>{var t;let a=e.userFanClub.tier||"tier1";return n.createElement("ul",{className:"fan-club-welcome-benefits"},n.createElement(et.m,{tier:a,userFanClub:e.userFanClub}),(0,ea.P1)(e.userFanClub,(null===(t=e.userFanClub.subscription)||void 0===t?void 0:t.tier)||"tier1").map(t=>{var a;return n.createElement(ea.MW,{ignoreUnavailable:(null===(a=e.userFanClub.subscription)||void 0===a?void 0:a.status)==="active",onClick:e.onCustomBenefitClick,userFanClub:e.userFanClub,placeId:"fanClubWelcome",key:t.name,benefit:t})}))},eh=(0,o.$j)(e=>{var t,a;return{fanClubMediaCountersByExistingBenefits:eo(e),avatarUrl:null===(t=(0,R.T2)(e))||void 0===t?void 0:t.avatarUrl,userFanClub:(0,R._W)(e),coverImage:null===(a=(0,ec.Mo)(e))||void 0===a?void 0:a.src,modelId:(0,R.iv)(e)}},em)(e=>{var t;let{coverImage:a,userFanClub:i,fanClubMediaCountersByExistingBenefits:s,avatarUrl:l,modelId:r}=e;if(!r)return null;let o=Object.values(s).some(Boolean),c=a&&!a.endsWith(".mp4")?a:l,d=(null==i?void 0:null===(t=i.subscription)||void 0===t?void 0:t.status)===D.Nvf.ACTIVE;return n.createElement("div",{className:"fan-club-welcome"},c&&n.createElement(n.Fragment,null,n.createElement("div",{className:"fan-club-welcome-cover-image",style:{backgroundImage:`url(${c})`}}),n.createElement("div",{className:"fan-club-welcome-cover-image-gradient"})),n.createElement("div",{className:"fan-club-welcome-content"},n.createElement("h3",null,(0,b.dW)("fanClub.welcome.title")),n.createElement("p",{className:"fan-club-welcome-description"},"“",(null==i?void 0:i.description)||D.gzd,"”"),n.createElement("div",{className:"fan-club-welcome-split"},n.createElement(S.Z,{img:"diamond-prince"})),d?n.createElement(ep,{userFanClub:i,onCustomBenefitClick:t=>{var a;e.emitJoinFanClubButtonEvent({currentCustomBenefit:t,selectedTierTab:(null==i?void 0:null===(a=i.subscription)||void 0===a?void 0:a.tier)||"tier1"})}}):n.createElement("p",null,(0,b.dW)("fanClub.welcome.subscribe")),!o&&!d&&i&&n.createElement(ep,{userFanClub:i}),o&&n.createElement(n.Fragment,null,n.createElement(eu,{viewCamFanClubMediaCounters:s}),n.createElement("div",{className:"fan-club-welcome-other"},n.createElement(el.Z,{messageId:"fanClub.welcome.benefits",elements:{accent:n.createElement("span",{className:"accent",onClick:()=>e.emitJoinFanClubButtonEvent()})},wrapper:null}))),d&&i.subscription?n.createElement("button",{onClick:()=>e.emitJoinFanClubButtonEvent({source:"timeline"}),type:"button",className:"user-fan-club-status-btn"},(null==i?void 0:i.subscription)&&n.createElement(n.Fragment,null,n.createElement(ei.g,{tier:i.subscription.tier}),n.createElement(el.Z,{messageId:"fanClub.welcome.subscribedAs",parameters:{tier:(0,b.dW)(`fanClub.user.tiersFriendlyName.${i.subscription.tier}`)}}))):n.createElement(ed.X,{className:"fan-club-welcome__button",source:"timeline",shouldShowIcon:!0})))});var ev=a(72717),eE=a(30464),eg=a(80176),eS=a(16023),eb=a(96679);let eC={[eb.pt]:0,[eb.Ps]:1},ef={routerReplace:eg.sb};class ey extends n.Component{componentDidUpdate(e){e.timelineType!==this.props.timelineType&&this.props.timelineType!==this.state.timelineType&&this.setState({timelineType:this.props.timelineType})}render(){let e=[n.createElement("span",{key:0},n.createElement(S.Z,{img:"diamond"}),(0,b.dW)("fanClub.fanClubPosts"),n.createElement("span",{className:(0,x.AK)("user-feed-link-attention-marker",{"hidden-marker":!this.props.hasModelFeedNewPosts})})),n.createElement("span",{key:1},(0,b.dW)("feed.modelsFeed.titleFullFeed"))];return n.createElement(eE.Z,{items:e,activeItemIndex:eC[this.state.timelineType]||0,onAnimationEnd:this.handleAnimationEnd,onClick:this.handleClick,animationDuration:200})}constructor(e){super(e),(0,i._)(this,"handleClick",e=>{let t=Object.entries(eC).find(([t,a])=>a===e)[0];this.setState({timelineType:t})}),(0,i._)(this,"handleAnimationEnd",()=>{this.state.timelineType!==this.props.timelineType&&this.props.routerReplace({pathname:`/${this.props.username}/${this.state.timelineType}`,state:{shouldSkipScroll:!0}})}),this.state={timelineType:e.timelineType}}}let eT=(0,o.$j)(e=>({viewCamPageBranch:(0,eS.zq)(e)}),ef)(ey);var eP=a(74012);let ew=e=>e?e.toString():"",e_=({model:e,timelineType:t})=>{let a=(0,C.C)(V.tA),i=(0,C.C)(V.L),s=(0,C.C)(R._W),l=(0,C.C)(eP.rc),r=(0,C.C)(R.x$),{isLayoutUpToL:o}=(0,y.iP)("isLayoutUpToL"),c=(0,C.C)(e=>(0,ee.q2)(e,{isLayoutUpToL:o}));(0,n.useEffect)(()=>{"Symbol(timeline)"===ew(a)&&document.querySelector(`.${D.ByQ}`)&&X.Z.to(`.${D.ByQ}`,{duration:D.ct3,skipIfInViewMode:!0,offset:c})},[a,c]);let d=l===e.id,m=(null==s?void 0:s.isActive)||i,u=!!(!d&&m);return u?n.createElement("div",{className:"model-feed-viewcam"},n.createElement("div",{className:"model-feed-viewcam-single-column"},(null==s?void 0:s.isActive)&&n.createElement(eh,null),m&&n.createElement(eT,{username:e.username,timelineType:t,hasModelFeedNewPosts:r}),n.createElement(ev.Z,{model:e,timelineType:t}))):n.createElement(ev.Z,{model:e})};var eN=a(81326),eA=a(32284);let ek=({model:e})=>{let t=(0,C.C)(R.KW),a=(0,C.C)(K.z),i=(0,C.C)(R.x$),s=(0,C.C)(V.L),l=(0,C.C)(R._W),r=s||(null==l?void 0:l.isActive),o=(0,C.C)(e=>(0,R.E)(e)),c=(0,C.C)(t=>(0,eN.g6)(t,e.username)),d=(0,C.C)(H.VgH),m=(0,q.n3)(e),u=(0,B.k6)(),{hasProfile:p,timelineType:h,mediaType:v,mediaId:E}=(0,B.UO)(),g=null,f=(0,n.useRef)(null);if(p||"profile"===f.current&&E?g="profile":h?g="timeline":v&&(g=v),(0,$.L)(()=>{!e||("photos"!==g||c)&&("videos"!==g||o)&&("timeline"!==g||t)||u.replace(`/${e.username}/profile`)},[g,e,e.username,u,c,o,t]),!v&&!h&&!p)return null;f.current=g;let y=d&&e.isNonNude,T=[{key:"profile",label:(0,b.dW)("viewCam.subheader.profile"),to:{pathname:`/${e.username}/profile`,state:{shouldSkipScroll:!0}},isActive:()=>"profile"===g}];return o&&!y&&T.push({key:J.oZ.VIDEOS,label:(0,b.dW)("viewCam.subheader.videos"),count:o,to:{pathname:`/${e.username}/${J.oZ.VIDEOS}`,state:{shouldSkipScroll:!0}},isActive:()=>g===J.oZ.VIDEOS}),c&&!y&&T.push({key:J.oZ.PHOTOS,label:(0,b.dW)("viewCam.subheader.gallery"),count:c,to:{pathname:`/${e.username}/${J.oZ.PHOTOS}`,state:{shouldSkipScroll:!0}},isActive:()=>g===J.oZ.PHOTOS}),t&&T.push({key:"timeline",label:n.createElement(n.Fragment,null,(0,b.dW)(r?"viewCam.subheader.fanClubAndFeed":"viewCam.subheader.feed"),i&&n.createElement("span",{className:"user-feed-link-attention-marker"})),to:{pathname:`/${e.username}/${r?eb.pt:eb.Ps}`,state:{shouldSkipScroll:!0}},isActive:()=>"timeline"===g}),n.createElement("div",{className:(0,x.AK)("view-cam-model-info profile-wrapper",{isTheatreMode:a})},n.createElement("div",{className:"page"},n.createElement("div",{className:"header-sub navigation"},n.createElement("div",{className:"right-navigation-section"},n.createElement(F.rU,{to:`/${e.username}`,className:"close-icon-wrapper","aria-label":(0,b.dW)("aria.links.model")},n.createElement(S.Z,{img:"close-2",size:14})))),n.createElement("div",{className:"profile-cover-wrapper"},n.createElement(Y.Z,{user:(0,eA.T$)(e),isProfileAvailable:!0,editable:!1,isLive:e.isLive,modelData:m})),n.createElement(Q.l,{menuItems:T,className:D.ByQ}),"profile"===g&&n.createElement(n.Fragment,null,n.createElement(j.ZP,{shouldRenderWatchButton:!1,isOwnProfile:!1,isEmbedded:!0,user:(0,eA.T$)(e),modelData:m,isModelsFeedEnabled:!0}),n.createElement("div",{className:"container"},n.createElement(F.rU,{to:`/${e.username}`,className:"bottom-close icon-wrapper","aria-label":(0,b.dW)("aria.links.model")},n.createElement(S.Z,{img:"scroll-top",size:50})))),"timeline"===g&&n.createElement(e_,{model:e,timelineType:h}),g===J.oZ.PHOTOS&&n.createElement(z.Z,{isOwnProfile:!1,user:(0,eA.T$)(e),modelData:m}),g===J.oZ.VIDEOS&&n.createElement(G.J,{wrapper:"user-page",listClassName:"user-videos-page__video-list",isOwnProfile:!1,user:(0,eA.T$)(e),modelData:m})))};var eI=a(94380);let eM=({model:e})=>{let t=(0,eI.T)(),a=null==e?void 0:e.id;return((0,n.useEffect)(()=>{a&&t((0,v.f5)(a))},[a,t]),e)?n.createElement(ek,{model:e}):null};var eL=a(54076),eR=a(75845),eU=a(67809);let eZ=()=>{let e=(0,C.C)(eR.Z8);return(null==e?void 0:e.length)?n.createElement("div",{className:"view-cam-model-tags-specials"},n.createElement("p",{className:"view-cam-model-tags-title"},n.createElement(el.Z,{messageId:"viewCam.tagsInfo.relatedTags"})),n.createElement(eU.ZP,{shouldShowMore:!0,shouldRoute:!0,shouldShowCategoriesButton:!1,tags:e,variant:"multi-line"})):null},eO=({tagGroup:e})=>{if("mixedTags"===e.alias)return null;let t=`viewCam.tagsInfo.tagGroupTitle_${e.alias}`,a=n.createElement(el.Z,{messageId:t}),i=n.createElement("p",{className:"view-cam-model-tags-group-title"},a);return n.createElement("div",{key:e.alias,className:"view-cam-model-tags-group"},n.createElement("p",{className:"view-cam-model-tags-group-title-mobile"},a),n.createElement(eU.ZP,{contentStart:i,shouldRoute:!0,shouldShowCategoriesButton:!1,tags:e.tags,variant:"multi-line"}))},eW=({modelUsername:e})=>{let t=(0,C.C)(eR.dH),a=(0,C.C)(Z.ok);return(null==t?void 0:t.length)?n.createElement(n.Fragment,null,n.createElement(a?"h2":"p",{className:"view-cam-model-tags-title"},n.createElement(el.Z,{messageId:"viewCam.tagsInfo.title",elements:{link:n.createElement(F.rU,{className:"link",to:`/${e}/profile`})},parameters:{modelName:e}})),t.map(e=>n.createElement(eO,{key:e.alias,tagGroup:e}))):null},eB=({model:e})=>e?n.createElement("div",{className:"view-cam-model-tags"},n.createElement(eW,{modelUsername:e.username}),n.createElement(eZ,null)):null;var eF=a(47080);let eD=({model:e,snapshotUrl:t,username:a,hasProfile:i})=>{let s=(0,C.C)(V.Fu),l=(0,C.C)(K.z);return n.createElement(n.Fragment,null,n.createElement(eL.Z,{isTheatreModeActive:l,model:e,snapshotUrl:t,shouldShowOtherModels:s}),n.createElement("div",null,n.createElement(eM,{model:e,username:a,hasProfile:i})),!l&&n.createElement(eF.$,{className:"widescreen-container",onlyPaymenticoAllowed:!0}),s&&!l&&n.createElement(n.Fragment,null,n.createElement(W,{model:e}),n.createElement("div",{className:"widescreen-container"},n.createElement(eB,{model:e}))))};var eV=a(64741),ex=a(20717),e$=a(98371),eH=a(13219),eK=a(79137);let eG=({isAutoSpyExpected:e})=>n.createElement(A,{loadingMessage:e?(0,b.dW)("modelsRoomIsLoading"):""}),ez=n.memo(({model:e,username:t,hasProfile:a,snapshotUrl:i})=>{let s=(0,eI.T)(),l=(0,C.C)(V.Dg),r=(0,C.C)(eP.ts),o=(0,C.C)(e$.ne),c=(0,C.C)(H.AUC),d=(0,ex.jz)(eV.qF.MODEL_PREVIEW),m=(0,n.useRef)(null);return(0,n.useEffect)(()=>{(0,eK.eN)({isLoggedIn:!!r,currentUser:r},{isLoggedIn:!!m.current,currentUser:m.current})&&!o&&a&&e&&s((0,eH.TR)(e.username)),m.current=r},[r,s,o,a,e]),(0,$.L)(()=>{s((0,P.t1)(t))},[s,t]),n.createElement("div",{className:"view-cam-container"},l?n.createElement(eG,{isAutoSpyExpected:l}):n.createElement(eD,{model:e,snapshotUrl:c?d:i,username:t,hasProfile:a}))});var ej=a(89061),eY=a(6966);function eq({image:e}){let t=[];return t.push((0,eY.by)("type","website")),t.push((0,eY.by)("image",e)),t}var eQ=a(88056),eJ=a(59593);let eX=({isOwnCamPage:e,isNonNudeWL:t,match:{params:{username:a,mediaType:i}},titleLimit:s,topicOrGoal:l,hasProfile:r,model:o,xHamsterPornStarUsername:c,isStripChat:d,isXhlOrMirror:m,photosCount:u,snapshotUrl:p,videosCount:h,mediaMeta:v,modelStatus:E,modelAction:g})=>{let S,C,f;let y="",T="",P=(0,ej.Z)(a);if(v)y=(0,b.U1)(`seo.title.${v.type}`,{model:P,...v,seoExtra:!1},{limit:s}),T=v.description||(0,b.U1)("seo.description.media",{model:P,seoExtra:!1},{limit:eJ.J7,shouldShowEllipsis:!0}),S=function({type:e,description:t,media:a}){let i=[];switch(e){case"photo":i=eq({image:a.url});break;case"album":i=eq({image:a.preview});break;case"video":i=function({preview:e}){let t=[];return t.push((0,eY.by)("type","video.other")),e&&t.push((0,eY.by)("image",e)),t}({preview:a.coverUrl})}return i.length&&t&&i.push((0,eY.by)("description",t)),i}(v);else if(i===J.oZ.VIDEOS||i===J.oZ.PHOTOS){let e=i===J.oZ.VIDEOS&&h&&h>=20&&d;y=(0,b.U1)(`seo.title.${i}.${e?"model_many_videos":"model"}`,{username:P,seoExtra:!1,videosCount:h},{limit:s}),T=(0,b.U1)(`seo.description.${i}.model`,{username:P,seoExtra:!1},{limit:eJ.J7,shouldShowEllipsis:!0})}else r?(y=(0,b.U1)("seo.title.profile.model",{username:P,seoExtra:!1},{limit:s}),T=(0,b.U1)("seo.description.profile.model",{username:P,photos:u,videos:h,status:E,seoExtra:!1},{limit:eJ.J7,shouldShowEllipsis:!0})):(y=e?(0,b.B)("seo.title.camMyShow",{seoExtra:!1}):(0,b.U1)("seo.title.cam",{model:P,seoExtra:!1},{limit:s}),T=(0,b.U1)("seo.description.cam",{model:P,topicOrGoal:l,seoExtra:!1},{limit:eJ.J7,shouldShowEllipsis:!0}));return(null==o?void 0:o.isPornStar)&&c?(y=(0,b.B)("seo.title.camPornStar",{model:c,seoExtra:!1}),T=(0,b.B)("seo.description.camPornStar",{model:c,seoExtra:!1,topicOrGoal:l})):t&&(y=(0,b.B)("seo.title.camNonNudeWL",{model:a,seoExtra:!1}),T=(0,b.B)("seo.description.camNonNudeWL",{model:a,seoExtra:!1})),(null==o?void 0:o.isModel)&&"follow-me"===g&&(y=(0,b.B)("seo.title.camFollowMe",{model:a,seoExtra:!1})),d||m?(C=l,f=p):C=T,n.createElement(eQ.Z,{title:y,description:T,descriptionOg:C,imageOg:f,tags:S})};var e0=a(21343),e1=a(29409),e2=a(80905),e5=a(39120),e3=a(80522),e4=a(15428),e6=a(46607);let e8=({isBanned:e,isGeoBanned:t,model:a})=>{let i=t?"country-ban":"account-blocked-colored",s=(0,C.C)(e=>(0,e6.t0)(e,a.id)),l=(0,n.useMemo)(()=>{if(t)return(0,b.dW)("camChat.yourCountryIsBlockedByModel");let e=(null==s?void 0:s.type)||J.Gq.BAN_FOREVER;return n.createElement(n.Fragment,null,a.username,n.createElement("br",null),(0,b.dW)(`bans.profilePeriods.${e}`))},[t,a.username,null==s?void 0:s.type]),r=(0,n.useMemo)(()=>{if(t)return null;let e=(0,b.dW)("bans.profileReasonDescription.common");return!(null==s?void 0:s.reason)||J.Nc.includes(s.reason)?e:n.createElement(n.Fragment,null,n.createElement(el.Z,{elements:{highlight:n.createElement("span",{className:"banned-container-description__highlight"})},messageId:`bans.profileReasonDescription.${s.reason}`}),n.createElement("br",null),e)},[t,null==s?void 0:s.reason]);return e||t?n.createElement(e4.M,{status:t?eJ.EH.SUCCESS:eJ.EH.FORBIDDEN},n.createElement("div",{className:"page view-cam-page banned"},n.createElement("div",{className:"main"},n.createElement("div",{className:(0,x.AK)("banned-container",{"banned-container_geo":t})},n.createElement(S.Z,{img:i,fullyCSSControlled:!0}),n.createElement("div",{className:"banned-container-title"},l),r&&n.createElement("div",{className:"banned-container-description"},r))))):null};var e9=a(64402),e7=a(56828),te=a(45793),tt=a(51702);let ta=({model:e,isGeoBanned:t})=>{let a=(0,C.C)(eS.mT),i=t?"modelAccountHiddenPage":"modelAccountDeletedPage",s=e.isDeleted||e.isBlocked||!1===e.isApprovedModel;return n.createElement(te.Z,{className:"account-disabled-page model-deleted-page container page"},s&&n.createElement(e3.Z,{status:eJ.EH.NOT_FOUND}),n.createElement("div",{className:"deleted-wrapper"},n.createElement(S.Z,{img:"account-disabled",size:100}),n.createElement("div",{className:"account-disabled-header"},(0,b.dW)(`${i}.title`)),n.createElement("div",{className:"account-disabled-description"},(0,b.dW)(`${i}.description`,{modelname:e.username}))),n.createElement("div",null,a?n.createElement(L.Z,{shouldLogPopularSnapshot:!0,model:e,isWidescreen:!1,onlyInitialLoad:!0,showFilters:!0}):n.createElement(e7.Z,{excludeIds:[e.id],isPaginated:!0,shouldLogPopularSnapshot:!0,className:"container"},n.createElement(tt.Z,{isEmbedded:!0,className:"header-sub-simple"}))))},ti=(0,B.EN)((0,o.$j)((e,t)=>{var a;let{username:i}=t.match.params,{auth:{isLoggedIn:s,currentUser:l},viewCam:{isModelNotFounded:r,isModelRequestCompleted:n}}=e,o=(0,e2.AQ)(e,i),c=null!==(a=null==o?void 0:o.isModel)&&void 0!==a&&a;return{isBanned:s&&!!o&&(0,e6.r0)(e,o.id),isGeoBanned:!!o&&(0,e6.mp)(e,o.id),isViewCamPage:(0,eS.mT)(e),isModelNotFounded:r,isModelRequestCompleted:n,isModel:c,currentUser:l,profile:o}})(({children:e,isBanned:t,isGeoBanned:a,isModel:i,profile:s,isModelNotFounded:l,isModelRequestCompleted:r,currentUser:o,isViewCamPage:c,isModelOwnProfile:d})=>d?n.createElement(n.Fragment,null,e):r&&c&&!i&&(null==s?void 0:s.username)?n.createElement(e3.Z,{to:`/user/${s.username}`}):s&&!i||!s&&!r||i&&o&&o.id===s.id&&!1===s.isApprovedModel?n.createElement(n.Fragment,null,e):!s&&l?n.createElement(e9.Z,null):i&&r&&s&&(s.isDeleted||s.isBlocked||!1===s.isApprovedModel||a)?n.createElement(ta,{model:s,isGeoBanned:a}):(null==s?void 0:s.isDeleted)?n.createElement(e9.Z,{status:eJ.EH.GONE}):t||a?n.createElement(e8,{model:s,isBanned:t,isGeoBanned:a}):n.createElement(n.Fragment,null,e)));var ts=a(87937),tl=a(42815),tr=a(13743),tn=a(88275),to=a(98853),tc=a(2656),td=a(58320),tm=a(60278),tu=a(3160),tp=a(65710),th=a(91456),tv=a(38933),tE=a(20243),tg=a(82512),tS=a(66483),tb=a(45061);let tC=()=>{let e=(0,C.C)(V.z7),t=(0,C.C)(V.n5),{isBroadcastSettingsVisible:a}=(0,C.C)(({player:e})=>e),i=(0,n.useRef)(null);return(0,n.useEffect)(()=>{i&&tb.wL.sendMessage({event:tb.JQ.MODEL_STATUS_CHANGED,description:`Status of the model has changed from ${i.current} to ${e}`}),i.current=e},[e]),(0,n.useEffect)(()=>{tb.wL.sendMessage({event:tb.JQ.BROADCAST_WINDOW_UI_STATE_CHANGED,description:`Broadcast window has changed: stream settings ${a?"are visible now":"are not visible anymore"}`})},[a]),(0,n.useEffect)(()=>{tb.wL.setModelId(t)},[t]),null},tf=["profile","videos","photos"];class ty extends n.Component{componentDidMount(){let{isPictureInPictureEnabled:e,isOwnCamPage:t}=this.props;this._isMounted=!0,this.unblockRouter=this.props.history.block(this.routerWillLeave),X.Z.reset(),e&&!t&&this.props.togglePictureInPicture(!1),this.optionalAvailableSettingsLoading()}componentWillUnmount(){var e;let{isPictureInPictureEnabled:t,isOwnCamPage:a,model:i}=this.props;this._isMounted=!1,null===(e=this.unblockRouter)||void 0===e||e.call(this),t&&!a&&(null==i?void 0:i.status)===D.MODEL_STATUSES.STATUS_PUBLIC&&this.props.togglePictureInPicture(!0)}componentDidUpdate(e){!e.model&&this.props.model&&X.Z.reset()}replaceCurrentHistoryEntry(e){var t;let{hasProfile:a,hasRouteConflict:i,match:{params:{username:s},url:r},model:n,modelAction:o,isVisitorsAgreementAccepted:c,isLoggedIn:d}=e;if(!this._isMounted)return!1;let m=!!n&&n.isModel,u=!!n&&n.isStudio,p=a?"/profile":"";return m&&"follow-me"===o?(this.props.routerReplace(`/${n.username}`),!d&&n.isApprovedModel&&(c?this.props.checkInAsReferee(s):this.props.saveModelReferee(s)),!0):m&&i?(this.props.routerReplace(`/cams/${n.username}${p}`),!0):m&&(0,l.Z)(r,"/cams/")&&!i||m&&(null==s?void 0:s.toLowerCase())!==(null===(t=n.username)||void 0===t?void 0:t.toLowerCase())?(this.props.routerReplace(`/${n.username}${p}`),!0):u?(this.props.routerReplace(`/studio/${n.username}${p}`),!0):!!n&&!m&&!u&&(this.props.routerReplace(`/user/${n.username}${p}`),!0)}renderMeta(){return n.createElement(eX,this.props)}renderContainer(){let{isOwnCamPage:e,match:t,model:a,snapshotUrl:i}=this.props;return e?n.createElement(E.Z,{model:a}):n.createElement(ez,{hasProfile:t.params.hasProfile,username:t.params.username,snapshotUrl:i,model:a})}render(){let{isTheatreModeActive:e,isOwnCamPage:t}=this.props;return n.createElement(e5.Z,{propsUpdateToActionsMap:this.propsUpdateToActionsMap,...this.props},n.createElement("div",{className:(0,x.AK)("view-cam-page-wrapper",{"theatre-mode":e})},t&&n.createElement(tC,null),this.renderMeta(),n.createElement(ti,null,n.createElement("div",{className:"view-cam-page"},this.renderContainer(),n.createElement(p,null),t&&eJ.BROWSER_CAPABILITIES.isMobile&&n.createElement(T,null)))))}constructor(...e){super(...e),(0,i._)(this,"_isMounted",!1),(0,i._)(this,"unblockRouter",void 0),(0,i._)(this,"optionalAvailableSettingsLoading",()=>{let{photoConfig:e}=this.props;e||this.props.loadAvailableSettings()}),(0,i._)(this,"routerWillLeave",e=>{var t,a,i;let{location:s,shouldOpenLinksInNewTab:l,isTimeline:n}=this.props,o=null!==(a=null==s?void 0:s.pathname)&&void 0!==a?a:"",c=null!==(i=null==e?void 0:e.pathname)&&void 0!==i?i:"",d=o!==c,m=d&&(0,r.Z)(o)===(0,r.Z)(c),[,,u]=c.split(/\/|#/),p=!tf.includes(u);if(tl.ZP.addClick(c),(0,ts.C5)()&&l)return d&&window.open(e.pathname),!!m&&void 0;!d||"/"===c||!p||n||(null==e?void 0:null===(t=e.state)||void 0===t?void 0:t.shouldSkipScroll)||X.Z.reset(),d&&p&&this.props.giveControlDestroy()}),(0,i._)(this,"propsUpdateToActionsMap",[{update:[eK.M7,eK.iM],action:()=>{let{isActiveModel:e,isOwnCamPage:t,match:{params:{username:a}}}=this.props;if(this.props.hideNotification({key:"subscription"}),!e){this.replaceCurrentHistoryEntry(this.props);return}!t&&e&&this.props.initViewCam(a).finally(()=>this.replaceCurrentHistoryEntry(this.props))}},{update:"model.status",action:()=>{let{model:e}=this.props;e&&(("private"===e.status||"p2p"===e.status)&&e0.a.preload(),"groupShow"===e.status&&e1.r.preload())}}])}}let tT={checkInAsReferee:tp.eT,initViewCam:v.S1,hideNotification:tn.yK,routerReplace:eg.sb,saveModelReferee:tp.cO,togglePictureInPicture:tc.x0,loadAvailableSettings:tu.z,giveControlDestroy:h.Os},tP=(0,o.$j)((e,t)=>{var a;let{auth:{currentUser:i,isLoggedIn:l,isLoggingOut:r}}=e,{match:{params:{hasProfile:n,modelAction:o="",timelineType:c,username:d,mediaType:m}}}=t,u=(0,e2.AQ)(e,d),p=(0,V.__)(e,t),h=(0,tr.Uh)(e,`/${d}`),v=(0,tS.Mp)(e,d),E=null===(a=null==u?void 0:u.isApprovedModel)||void 0===a||a,g=(0,tv.Y)(e),S={};u&&(n||m)&&(S={photosCount:(0,tE.N7)(e,u),videosCount:(0,R.E)(e),modelStatus:u.offlineStatus,siteName:(0,Z.hA)(e)});let b=u?(0,tg.GW)(e,u.id):"",C=(0,td.$C)(e);return{currentUser:i,shouldOpenLinksInNewTab:(0,V.o9)(e,t),hasProfile:!!n,hasRouteConflict:h,isActiveModel:E&&!v||p,isLoggedIn:l&&!r,isNonNudeWL:(0,Z.Km)(e),isStripChat:(0,Z.ok)(e),isXhlOrMirror:(0,Z.cv)(e),photoConfig:(0,th.VD)(e),isOwnCamPage:p,isTheatreModeActive:(0,K.z)(e),mediaMeta:g,model:u,modelAction:o,isTimeline:!!c,snapshotUrl:u?(0,s.iJ)({isBlur:C,isLowQualityPreview:!1,model:(0,eA.T$)(u),modelData:(0,q.tA)(u),snapshotUrlTemplate:(0,H.FOC)(e),hasWebpSupport:(0,H.h69)(e)}).url:null,username:d,titleLimit:(0,Z.Ei)(e),topicOrGoal:(0,V.Ms)(e),isPictureInPictureEnabled:(0,tm.Tm)(e),isVisitorsAgreementAccepted:(0,to.IG)(),xHamsterPornStarUsername:b,...S}},tT)(ty)},54076:(e,t,a)=>{a.d(t,{Z:()=>g});var i=a(27378),s=a(25564),l=a(41784),r=a(80848),n=a(44070),o=a(28070),c=a(99748),d=a(98846),m=a(95654),u=a(50423),p=a(80092),h=a(74012);let v=(0,d.n)({resolved:{},chunkName:()=>"Giveaway",isReady(e){let t=this.resolve(e);return!0===this.resolved[t]&&!!a.m[t]},importAsync:()=>a.e(5577).then(a.bind(a,55502)),requireAsync(e){let t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then(e=>(this.resolved[t]=!0,e))},requireSync(e){let t=this.resolve(e);return a(t)},resolve:()=>55502},{fallback:void 0,ssr:!1}),E=()=>{let e=(0,m.C)(h.ts),t=(0,m.C)(p.gI),a=!e||!e.isStudio&&!e.isModel;return!a||t?null:i.createElement(v,null)},g=({model:e,snapshotUrl:t,shouldShowOtherModels:a,isTheatreModeActive:d})=>{let{isLayoutUpToL:m}=(0,u.iP)("isLayoutUpToL");return i.createElement(i.Fragment,null,!d&&i.createElement(o.Z,{shouldHideNextModel:!a}),i.createElement("div",{className:"page"},i.createElement("div",{className:(0,c.AK)("view-cam-page-main widescreen-container",{"theatre-mode":d})},i.createElement(n.L,null),i.createElement("div",{className:"video"},i.createElement(r.Z,{model:e,snapshotUrl:t})),m&&i.createElement(l.G,null),i.createElement("div",{className:"chat"},i.createElement(s.ZP,{chatOwner:e}),!d&&i.createElement(E,null)))))}},24964:(e,t,a)=>{a.d(t,{Z:()=>o});var i=a(27378),s=a(48204),l=a(4359),r=a(73545),n=a(30486);let o=(0,s.$j)(e=>({joinedUsers:(0,r.xO)(e),timeRemaining:(0,r.g9)(e),isTicketShow:(0,r.yY)(e)}))(e=>{let{joinedUsers:t,timeRemaining:a,isTicketShow:s}=e,r=s?"ticketShowAnnouncement":"groupShowAnnouncement";return i.createElement("div",{className:"group-show-announce"},i.createElement("div",{className:"group-show-announce-head"},i.createElement("div",{className:"group-show-announce-title"},i.createElement(n.Z,{messageId:`viewCam.${r}.${a<=60?"lastMinuteWarning":"groupShowAnnounced"}`,elements:{strong:i.createElement("strong",null)}})),!!t&&i.createElement(n.Z,{messageId:`viewCam.${r}.joinedUsers`,className:"group-show-announce-subtitle",choiceParameter:"joinedUsers",parameters:{joinedUsers:t}})),i.createElement(l.Z,null))})},85183:(e,t,a)=>{a.d(t,{Z:()=>C});var i=a(27378),s=a(48204),l=a(28267),r=a(46424),n=a(24964),o=a(73545),c=a(83550),d=a(11850),m=a(80936),u=a(99382),p=a(30486),h=a(61171),v=a(29413),E=a(43806),g=a(59593),S=a(99748);let b={emitButtonEvent:c.d2,addGroupShowAnnouncementMessage:r.wG,addGroupShowMessageStartInNMinutes:l.gf},C=(0,m.y)("isLayoutUpToS")((0,s.$j)(e=>({groupShowStartTime:(0,o.NN)(e),isGroupShowSlotReserved:(0,o.r_)(e),isTicketShow:(0,o.yY)(e),isTicketShowPaid:(0,o.Ke)(e)}),b)(({groupShowStartTime:e,isGroupShowSlotReserved:t,isTicketShowPaid:a,isLayoutUpToS:s,isTicketShow:l,className:r,emitButtonEvent:o,addGroupShowAnnouncementMessage:c,addGroupShowMessageStartInNMinutes:m})=>{let[b,C]=(0,d.eW)(),f=(0,i.useRef)(null),y=(0,i.useCallback)(e=>{o(g.FO.GROUP_SHOW_DROPDOWN_TOGGLER,{isVisible:b,isLayoutUpToS:s}),C(e)},[s,b,C,o]),T=l?"ticketShow":"groupShow",P=function({isGroupShowSlotReserved:e,isTicketShowPaid:t,isTicketShow:a}){return e||t?"check-1":a?"ticket":"group"}({isGroupShowSlotReserved:t,isTicketShowPaid:a,isTicketShow:l});return i.createElement("div",{className:"group-show-control",ref:f},i.createElement(u.ZP,{className:(0,S.AK)(r,"group-show-btn"),style:"outline",onClick:y},i.createElement(v.Z,{img:P}),i.createElement(p.Z,{messageId:`privateModes.${T}.announcementTimerButton`,elements:{timer:i.createElement(E.Z,{className:"private-show-timer",endTime:e,ticks:{301:()=>{m(5,!0)},601:()=>{m(10,!0)},60:()=>{c({isLastMinute:!0})}}}),accent:i.createElement("span",{className:"pale"}),strong:i.createElement("strong",null)}})),!s&&i.createElement(h.Z,{initiatorRef:f,position:"top",spaced:!0,stateValueGetter:()=>b,contentClassName:"group-show-btn__dropdownContent"},i.createElement(n.Z,null)))}))},48233:(e,t,a)=>{a.d(t,{Z:()=>b});var i=a(27378),s=a(48204),l=a(91805),r=a(33914),n=a(99382),o=a(29413),c=a(43806),d=a(3034),m=a(59593),u=a(99748),p=a(56509),h=a(80176),v=a(7685),E=a(63256),g=a(16023);let S={routerPush:h.J5,requestPrivate:l.zG},b=(0,s.$j)(e=>({offlinePrivateProposal:(0,E.Y52)(e),isViewCamPage:(0,g.mT)(e),proposeError:(0,r.Nh)(e),isProposeLoading:(0,r.sh)(e)}),S)(e=>{var t;let[a,s]=(0,i.useState)(!1),{className:l,model:r,offlinePrivateProposal:h,isViewCamPage:E,proposeError:g,isProposeLoading:S}=e,b=(0,v.L)("request-private-button-");(0,i.useEffect)(()=>{s(!!(null==h?void 0:h.declined))},[h]);let C=h&&!a&&r.id===(null==h?void 0:null===(t=h.model)||void 0===t?void 0:t.id),f="request-private-button";return i.createElement(i.Fragment,null,!!h&&i.createElement(d.Z,{isMobileRelative:!1,indentation:4,placement:"bottom",targetId:b},(0,p.dW)(C?"viewCamStatuses.offline.requestPrivate.alreadyRequestedPrivateOfTheModel":"viewCamStatuses.offline.requestPrivate.alreadyRequestingPrivateFromAnotherModel")),i.createElement("div",{id:b,className:(0,u.AK)("request-private-button",l,{"request-private-button--with-timer":C})},!!g&&i.createElement(d.Z,{isMobileRelative:!1,indentation:4,placement:"top",targetId:f,isForceVisible:!0},(0,p.dW)("viewCamStatuses.offline.requestPrivate.alreadyRequestingPrivateFromAnotherUser")),i.createElement("span",{id:f},i.createElement(n.ZP,{onClick:()=>{if(E){e.requestPrivate(r.id);return}e.routerPush(`/${r.username}`)},disabled:!!h||!!g,loading:S},C?i.createElement("div",{className:"request-private-button__timer"},i.createElement(o.Z,{img:"clock",size:16}),i.createElement(c.Z,{maxTime:m.ht,endTime:h.expiresAt,onTimeEnd:()=>{s(!0)}})):i.createElement(i.Fragment,null,i.createElement(o.Z,{img:"flash"}),(0,p.dW)("viewCamStatuses.offline.requestPrivate.button"))))))})},29409:(e,t,a)=>{a.d(t,{r:()=>r});var i=a(27378),s=a(98655),l=a(98846);let r=(0,l.n)({resolved:{},chunkName:()=>"TicketShowConfirmationModal",isReady(e){let t=this.resolve(e);return!0===this.resolved[t]&&!!a.m[t]},importAsync:()=>a.e(3742).then(a.bind(a,70143)),requireAsync(e){let t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then(e=>(this.resolved[t]=!0,e))},requireSync(e){let t=this.resolve(e);return a(t)},resolve:()=>70143},{ssr:!1,fallback:i.createElement(s.c,null)})},84119:(e,t,a)=>{a.d(t,{m:()=>S});var i=a(27378),s=a(99265),l=a(73545),r=a(33914),n=a(30486),o=a(29413),c=a(56509),d=a(95654),m=a(58543),u=a(63256);let p=({children:e})=>i.createElement("li",{className:"user-fan-club-subscribe-modal-body-benefit"},i.createElement(o.Z,{img:"check-1",size:11}),e),h=({discount:e,type:t})=>e?i.createElement(p,null,i.createElement(n.Z,{messageId:`fanClub.user.subscriptionModal.benefits.${t}`,parameters:{discount:e},elements:{accent:i.createElement("span",{className:"accent"})}})):null,v=({tier:e,type:t})=>{let a=(0,d.C)(l.RR),s=(0,d.C)(l.bk),r=(0,d.C)(t=>(0,l.qA)(t,e));return"private"===t&&s&&r.private?i.createElement(h,{discount:r.private,type:t}):"p2p"===t&&a&&r.p2p?i.createElement(h,{discount:r.p2p,type:t}):null},E=({type:e})=>i.createElement(p,null,(0,c.dW)(`fanClub.user.subscriptionModal.benefits.${e}`)),g={p2p:v,private:v,tipMenu:({tier:e,type:t})=>{let a=(0,d.C)(t=>(0,l.B2)(t,e)),s=(0,d.C)(l.Ol);return s?i.createElement(h,{discount:a,type:t}):null},exclusiveMediaContent:({type:e,tier:t})=>{var a,s;let l=(0,d.C)(u.q26),n=(0,d.C)(u.qX),o=(0,d.C)(r.B8),m=(null!==(a=o.photos[t])&&void 0!==a?a:0)+(null!==(s=o.videos[t])&&void 0!==s?s:0);return n&&m>=l?i.createElement(p,null,(0,c.dW)("fanClub.user.subscriptionModal.benefits.contentAccessCounters",{number:m},"number")):i.createElement(p,null,(0,c.dW)(`fanClub.user.subscriptionModal.benefits.${e}`))},experience:({tier:e,type:t})=>{let a=(0,d.C)(u.HZz),s=(0,d.C)(m.wz);return a&&s?i.createElement(p,null,(0,c.dW)(`fanClub.user.subscriptionModal.benefits.${t}`,{experience:s?s[e]:""})):null},privateChat:E,specialBadgeInChat:E,freeSpying:E},S=({tier:e,userFanClub:t})=>{let a=(0,i.useMemo)(()=>s.y3.filter(({shouldShow:a})=>!a||a({fanClub:t,tier:e})),[e,t]);return i.createElement(i.Fragment,null,a.map(({key:a})=>{let s=g[a];return i.createElement(s,{key:a,userFanClub:t,type:a,tier:e})}))}},93803:(e,t,a)=>{a.d(t,{Lf:()=>m,MW:()=>d,P1:()=>c});var i=a(27378),s=a(84119),l=a(95366),r=a(29413),n=a(3034),o=a(56509);let c=(e,t)=>e.benefits.filter(e=>"custom"===e.type&&e.tiers[t].isActive),d=({userFanClub:e,benefit:t,onClick:a,ignoreUnavailable:s=!1,placeId:c=""})=>{var d;let m;let u=!!((null==e?void 0:null===(d=e.subscription)||void 0===d?void 0:d.tier)&&t.tiers[e.subscription.tier].isActive&&e.subscription.status!==l.Nvf.INACTIVE);if(s&&!u)return null;if(t.isDescriptionExist){if(u)m=i.createElement("span",{className:"user-fan-club-subscribe-modal-body-benefit-description-link active",onClick:()=>null==a?void 0:a(t)},t.name,i.createElement(r.Z,{img:"next-small",size:11}));else{let e=`benefit-custom-${c}${t.name.replace(/\s/g,"_")}-tooltip`;m=i.createElement("span",{className:"user-fan-club-subscribe-modal-body-benefit-description-link",id:e},t.name,i.createElement(r.Z,{img:"next-small",size:11}),i.createElement(n.Z,{className:"model-fan-club-tooltip",isMobileRelative:!1,placement:"top",targetId:e},(0,o.dW)("fanClub.user.subscriptionModal.benefits.subscribeToGetAccessCustomBenefit")))}}else m=t.name;return i.createElement("li",{className:"user-fan-club-subscribe-modal-body-benefit"},i.createElement(r.Z,{img:"gift",size:11}),m)},m=({onCustomBenefitClick:e,userFanClub:t,selectedTier:a})=>{let l=c(t,a);return i.createElement(i.Fragment,null,i.createElement("ul",{className:"user-fan-club-subscribe-modal-body-benefits-list"},i.createElement(s.m,{tier:a,userFanClub:t})),l.length>0&&i.createElement(i.Fragment,null,i.createElement("p",{className:"user-fan-club-subscribe-modal-body-benefits-title"},(0,o.dW)("fanClub.user.subscriptionModal.benefits.titleExtra")),i.createElement("ul",{className:"user-fan-club-subscribe-modal-body-benefits-list"},l.map(a=>i.createElement(d,{onClick:e,userFanClub:t,key:a.name,benefit:a})))))}},99265:(e,t,a)=>{a.d(t,{T0:()=>n,qQ:()=>r,y3:()=>o});var i=a(95366),s=a(79918);let l=e=>{if(!e)return null;for(let t of e)if("card"===t.name){let e={};for(let a of t.packages)e[a.type.slice(-5).toLowerCase()]=a.currencySum;return e}return null},r=(e,t)=>{let a=l(e);return(null==a?void 0:a[t])||null},n=(e,t)=>i.Oc_.indexOf(e)>i.Oc_.indexOf(t),o=[{key:"tipMenu",shouldShow:({fanClub:e,tier:t})=>(0,s.j)(e.benefits,i.Asb.TIP_MENU,t)},{key:"private",shouldShow:({fanClub:e,tier:t})=>(0,s.j)(e.benefits,i.Asb.PRIVATE,t)},{key:"p2p",shouldShow:({fanClub:e,tier:t})=>(0,s.j)(e.benefits,i.Asb.P2P,t)},{key:"privateChat"},{key:"specialBadgeInChat",shouldShow:({fanClub:e,tier:t})=>(0,s.j)(e.benefits,i.QK0.SPECIAL_BADGE_IN_CHAT,t)},{key:"exclusiveMediaContent",shouldShow:({fanClub:e,tier:t})=>!!e.exclusiveContentAccess&&(0,s.j)(e.benefits,i.QK0.CONTENT_ACCESS,t)},{key:"freeSpying",shouldShow:({fanClub:e,tier:t})=>!!e.spyAccess&&(0,s.j)(e.benefits,i.QK0.FREE_SPYING,t)},{key:"experience"}]},40261:(e,t,a)=>{a.d(t,{Z:()=>r});var i=a(27378),s=a(84546),l=a(57174);let r=({onClick:e,size:t="large"})=>i.createElement(l.ZP,{className:"view-cam-controls-btn view-cam-controls__private-tip-button",onClick:e,style:"gold-ds",size:t},i.createElement(s.t,{shortTextId:"button.sendPrivateTipShort",textId:"button.sendPrivateTip"}))},80848:(e,t,a)=>{a.d(t,{Z:()=>ay});var i=a(18775),s=a(26338),l=a(76482),r=a(27378),n=a(48204),o=a(91805),c=a(84807),d=a(73545),m=a(94380),u=a(95654),p=a(63256),h=a(14151),v=a(58320),E=a(60278);let g=()=>{let e=(0,m.T)(),t=(0,u.C)(E.HN),a=(0,u.C)(p.pIH),i=(0,u.C)(d.UP),s=(0,u.C)(d.tM),l=(0,u.C)(d.gJ),n=(0,u.C)(v.fM),o=(0,u.C)(E.Jl);(0,r.useEffect)(()=>{if(!l&&(s&&e((0,c.$5)("")),t&&i)){let t=!n||!o;(!a||a&&t)&&e((0,c.$5)(h.PLAYER_TYPES.WEBRTC))}},[e,t,l,n,i,s,o,a])},S=()=>(g(),null);var b=a(38901),C=a(28865),f=a(64544),y=a(7659),T=a(88569),P=a(95366),w=a(83550),_=a(99382),N=a(30486),A=a(29413),k=a(3034),I=a(59593),M=a(56509),L=a(7474),R=a(65103);let U=({kingInfo:e,becomeKingThreshold:t})=>{let a=(0,m.T)(),i=(0,u.C)(d.PD),s=(0,u.C)(R.Ms);return s&&s===e.kingUsername||(null==i?void 0:i.status)!==P.MODEL_STATUSES.STATUS_PUBLIC?null:r.createElement(_.ZP,{style:"call2action-premium",size:"small",onClick:()=>{let s=e.kingAmount||t;if(s){let t=s-(e.selfAmount||0)+1;a((0,w.FZ)(t))}a((0,w.d2)(I.FO.VIEWCAM_SEND_ONLINE_TIP,{modelId:null==i?void 0:i.id,additionalParam:{amplitudeEventProps:{prodType:P.Hrc.TIP,prodSubtype:P.hZ6.KING}}}))}},r.createElement(N.Z,{messageId:"viewCam.info.tooltip.becomeKing",elements:{icon:r.createElement(A.Z,{className:"king-icon",img:"king"})}}))},Z=e=>{let{fanClubTier:t,kingInfo:a,kingUser:i,kingSettings:s}=e,l=Number(null==s?void 0:s.becomeKingThreshold)||0;return r.createElement("div",{className:"view-cam-info-king"},r.createElement("div",{className:"view-cam-info-king-content",id:"view_cam_info_king"},(0,M.dW)("viewCam.info.king"),i?r.createElement("div",{className:"king-wrapper is-king"},r.createElement(A.Z,{img:"king"}),r.createElement(L.Z,{user:i,isIconVisible:!1,fanClubTier:t,isVisibleTierTooltip:!1,isLevelLeagueStatusVisible:!1,isUltimateIconTooltipVisible:!1})):l>0?r.createElement(N.Z,{className:"become-king-info",messageId:"viewCam.info.kingThreshold",parameters:{amount:l},elements:{accent:r.createElement("span",{className:"king-threshold"})}}):r.createElement("div",{className:"king-wrapper"},r.createElement(A.Z,{img:"king"}),r.createElement("span",{className:"be-first"},(0,M.dW)("viewCam.info.toBeKing"))),a?r.createElement(k.Z,{targetId:"view_cam_info_king",placement:"left",isMobileRelative:!1,maxWidth:350,showDelay:250},i&&r.createElement(N.Z,{className:"king-wrapper-tooltip-title",messageId:"viewCam.info.tooltip.title",elements:{username:r.createElement(L.Z,{user:i,isIconVisible:!1,isLevelLeagueStatusVisible:!1,placeId:"kink-tooltip"}),tokens:r.createElement("span",{className:"king-wrapper-tooltip-tokens"},a.kingAmount)}}),i||l?r.createElement(N.Z,{className:"king-wrapper-tooltip-description",messageId:"viewCam.info.tooltip.description",elements:{tokens:r.createElement("span",{className:"king-wrapper-tooltip-tokens"},a.selfAmount)}}):r.createElement("span",{className:"king-wrapper-tooltip-description"},(0,M.dW)("viewCam.info.tooltip.hint")),r.createElement(U,{kingInfo:a,becomeKingThreshold:l}),r.createElement(T.Z,null)):null))};var O=a(33914),W=a(99748),B=a(12712),F=a(6848);let D=e=>{let t=(0,O.T2)(e),a=(0,d.qF)(e);if(!t||!a)return null;let i=(0,F.dN)(e,t.username);return(null==i?void 0:i[a.id])||null},V=(0,n.$j)(e=>({isTheatreModeActive:(0,B.z)(e),goalData:(0,d.IY)(e),isPromoModel:(0,d.P1)(e),kingUser:(0,d.qF)(e),kingInfo:(0,O.Kd)(e),kingFanClubTier:D(e),kingSettings:(0,d.LF)(e)}))(({goalData:e,isPromoModel:t,kingFanClubTier:a,kingUser:i,kingInfo:s,kingSettings:l,isVisible:n,isTheatreModeActive:o})=>o?null:r.createElement("div",{className:(0,W.AK)("view-cam-info view-cam-info--with-new-goal",{"view-cam-info--visible":n})},r.createElement(y.Z,{goal:e}),!t&&r.createElement(Z,{kingSettings:l,kingInfo:s,kingUser:i,fanClubTier:a})));var x=a(7581),$=a(59010),H=a(36561),K=a(65656),G=a(69353),z=a(59957),j=a(77382),Y=a(91090),q=a(96552),Q=a(78983),J=a(64696),X=a(87766),ee=a(41552),et=a(62182),ea=a(97686),ei=a(47742),es=a(11116),el=a(5144),er=a(79137),en=a(74012);let eo="viewCamUnobtrusiveProposal",ec="watchingLimit",ed="camMembers",em="enjoyWatchHistory",eu=(e,t)=>e.viewCamNotification===es.h3.SUBSCRIBE&&!t.viewCamNotification,ep=(e,t)=>e.currentModalName===I.MODAL_TYPES.AUTH&&!t.currentModalName,eh={addToWatchHistory:H.IH,closeNotification:o.vU,createFreeAccountModal:o.cS,hideModal:j.VG,loadMembers:K.el,showModal:j.K4,resetModelWatchingLimit:o.JY,updateModelWatchingLimit:o.Hn,showNotification:o.c0,discountsReset:ea.B7};class ev extends r.Component{componentDidMount(){this._isMounted=!0,(0,J.Z)(this.propsUpdateToActionsMap,{},this.props)}componentDidUpdate(e){(0,J.Z)(this.propsUpdateToActionsMap,e,this.props)}componentWillUnmount(){this._isMounted=!1,this.stopAllSchedulers()}isViewCamNotificationAllowed(){return I.BROWSER_CAPABILITIES.desktop||I.BROWSER_CAPABILITIES.isTablet}getMinuteOfDay(){let e=(0,Q.YF)(new Date,Q.Ju.day);return 0|(0,Q.og)(new Date,e,Q.$v.minutes)}render(){return null}constructor(e){super(e),(0,i._)(this,"discountsTimeoutId",void 0),(0,i._)(this,"_isMounted",!1),(0,i._)(this,"isSubscriptionPopupClosedByModelChange",!1),(0,i._)(this,"hasShownCreateFreeAccountModal",!1),(0,i._)(this,"hasShownSubscriptionPopup",!1),(0,i._)(this,"propsUpdateToActionsMap",[{update:d.jh,action:()=>{this.hasShownCreateFreeAccountModal=!1,this.hasShownSubscriptionPopup=!1,this.isSubscriptionPopupClosedByModelChange=!0,this.closeSubscriptionPopup(),this.startScheduler(this.props)}},{update:(...e)=>eu(...e),action:()=>{this.isSubscriptionPopupClosedByModelChange?this.isSubscriptionPopupClosedByModelChange=!1:this.hasShownSubscriptionPopup=!0,this.startScheduler(this.props)}},{update:(e,t)=>!e.isCamAvailable&&t.isCamAvailable,action:()=>{this.hasShownSubscriptionPopup||this.startScheduler(this.props)}},{update:["isSubscribed"],action:()=>{let{isSubscribed:e}=this.props;e&&(this.closeSubscriptionPopup(),this.hasShownSubscriptionPopup=!0)}},{update:ep,action:()=>{this.hasShownSubscriptionPopup||this.startScheduler(this.props)}},{update:et.gk,action:()=>this.startScheduler(this.props)},{update:er.tH,action:()=>this.closeSubscriptionPopup()},{update:["isLoggedIn"],action:()=>{let{isLoggedIn:e}=this.props;e?(this.resetAllWatchingLimits(),this.stopWatchingScheduler()):this.startWatchingScheduler()}},{update:["model.id","model.status"],action:()=>{let{model:e}=this.props,t=(null==e?void 0:e.id)&&e.status!==P.MODEL_STATUSES.STATUS_OFF;t?(this.startCamMembersScheduler(),this.startGuestWatchHistoryTimeout()):(this.stopCamMembersScheduler(),this.clearGuestWatchHistoryTimeout())}},{update:["model.id","discounts"],action:()=>{this.discountsTimeoutId&&clearTimeout(this.discountsTimeoutId);let{discounts:e}=this.props;if(!(null==e?void 0:e.activatedTill))return;let t=new Date,a=new Date(null==e?void 0:e.activatedTill),i=a.getTime()-t.getTime();if(i<0){this.props.discountsReset();return}this.discountsTimeoutId=setTimeout(()=>this.props.discountsReset(),i)}}]),(0,i._)(this,"stopAllSchedulers",()=>{this.stopScheduler(),this.stopWatchingScheduler(),this.stopCamMembersScheduler(),this.clearGuestWatchHistoryTimeout(),this.discountsTimeoutId&&clearTimeout(this.discountsTimeoutId)}),(0,i._)(this,"clearGuestWatchHistoryTimeout",()=>{X.Z.stopTimeout(em)}),(0,i._)(this,"startGuestWatchHistoryTimeout",()=>{let{addToWatchHistory:e,model:t,currentUserId:a,watchHistoryTimeoutFromConfig:i}=this.props;this.clearGuestWatchHistoryTimeout();let s=!!a;X.Z.startTimeout(em,"number"==typeof i?1e3*i:15e4,()=>e(t.id,{shouldSendSaveRequest:s,userId:a}))}),(0,i._)(this,"stopScheduler",()=>{X.Z.stopTimeout(eo)}),(0,i._)(this,"startScheduler",e=>{let{isDocumentVisible:t}=e,a=!this.hasShownSubscriptionPopup||!this.hasShownCreateFreeAccountModal;this.stopScheduler(),t&&a&&X.Z.startTimeout(eo,15e4,this.showPopup)}),(0,i._)(this,"showPopup",()=>{if(!this._isMounted)return;let{hasModal:e,isCamAvailable:t,isLoggedIn:a,isPushApiAvailable:i,isSubscribed:s}=this.props;if(!a&&!e){if(i&&t&&!this.hasShownSubscriptionPopup&&!s){this.showSubscriptionPopup();return}this.hasShownCreateFreeAccountModal||(this.hasShownCreateFreeAccountModal=!0,this.props.createFreeAccountModal({triggerSource:Y.Dt.VIEW_CAM_WATCH_MODEL}))}}),(0,i._)(this,"showSubscriptionPopup",()=>{let{model:e}=this.props;this.isSubscriptionPopupClosedByModelChange=!1,this.isViewCamNotificationAllowed()?this.props.showNotification(es.h3.SUBSCRIBE):q.P4.show(el.O,{model:e})}),(0,i._)(this,"closeSubscriptionPopup",()=>{this.isViewCamNotificationAllowed()&&this.props.closeNotification()}),(0,i._)(this,"stopWatchingScheduler",()=>{let{isWatchingIntervalStart:e}=this.state;e&&(X.Z.stopInterval(ec),this.setState({isWatchingIntervalStart:!1}))}),(0,i._)(this,"startWatchingScheduler",()=>{let{isWatchingIntervalStart:e}=this.state;e||(X.Z.startInterval(ec,3e4,this.updateTimeLeft),this.setState({isWatchingIntervalStart:!0}))}),(0,i._)(this,"stopCamMembersScheduler",()=>{X.Z.stopInterval(ed)}),(0,i._)(this,"startCamMembersScheduler",()=>{let{viewersListConfig:e}=this.props;this.stopCamMembersScheduler(),e.isEnabled&&X.Z.startInterval(ed,1e3*e.updateInterval,this.updateCamMembers)}),(0,i._)(this,"hasLimitationExpires",()=>{let{modelWatchingLimit:e}=this.props,{timeStart:t}=e;return t&&new Date(t).getTime()+P.UbK<Date.now()}),(0,i._)(this,"resetWatchingLimit",()=>{let{model:e}=this.props;this.props.resetModelWatchingLimit(e.id)}),(0,i._)(this,"resetAllWatchingLimits",()=>{this.props.resetModelWatchingLimit()}),(0,i._)(this,"updateTimeLeft",()=>{let{isCamAvailable:e,model:t,modelWatchingLimit:a}=this.props,{timeStart:i=Date.now(),minutes:s=[]}=a,l=this.getMinuteOfDay(),r=this.hasLimitationExpires();if(r)this.resetWatchingLimit();else if(e){let e={timeStart:i,minutes:(0,x.Z)((0,$.Z)(s,l))};this.props.updateModelWatchingLimit(t.id,e)}}),(0,i._)(this,"updateCamMembers",()=>{this.props.loadMembers({isDefaultErrorHandlerEnabled:!1})}),this.state={isWatchingIntervalStart:!1}}}let eE=(0,n.$j)((e,{model:t})=>{let{auth:{isLoggedIn:a},config:{data:{viewersList:i}},ui:{currentModalName:s,hasModal:l,isDocumentVisible:r},viewCam:{isCamAvailable:n,notification:o}}=e;return{currentModalName:s,hasModal:l,isCamAvailable:n,isDocumentVisible:r,isLoggedIn:a,isPushApiAvailable:(0,ee.iV)(),isSubscribed:(0,G.LW)(e,null==t?void 0:t.id),viewCamNotification:o,modelWatchingLimit:(0,d.OB)(e),viewersListConfig:i,discounts:(0,ei.Pn)(e),currentUserId:(0,en.rc)(e),watchHistoryTimeoutFromConfig:(0,z.Jc)(e)}},eh)(ev);var eg=a(65631),eS=a(98233);let eb=({image:e,content:t,controls:a,closeClickHandler:i})=>r.createElement("div",{className:"view-cam-notification"},e&&r.createElement("div",{className:"view-cam-notification-image"},e),r.createElement("div",{className:"view-cam-notification-content"},t),a&&r.createElement("div",{className:"view-cam-notification-controls"},a),r.createElement("div",{className:"view-cam-notification-closer",onClick:i},r.createElement("div",{className:"view-cam-notification-closer-icon-wrapper"},r.createElement(A.Z,{img:"close-5"}))));var eC=a(88051),ef=a(87489),ey=a(32284);let eT={closeNotification:o.vU},eP={[es.h3.SUBSCRIBE]:({model:e,closeClickHandler:t})=>{let a=(0,ef.n3)(e);return r.createElement(eb,{content:r.createElement(N.Z,{messageId:"viewCam.notifications.dontMissMe"}),controls:r.createElement(eS.Z,{buttonLocation:I.FO.VIEWCAM_PLAYER_SUBSCRIBE_PROMO,preventResponsiveCaption:!0,style:"blue",subscribeCaption:r.createElement(N.Z,{messageId:"button.notifyMe"}),user:e,withoutTooltip:!0}),image:r.createElement(eC.Z,{isBorderAvatar:!1,user:(0,ey.T$)(e),modelData:a,showOnlineStatus:!1}),closeClickHandler:t})}};class ew extends r.Component{componentDidMount(){(0,J.Z)(this.propsUpdateToActionsMap,{},this.props)}componentDidUpdate(e){(0,J.Z)(this.propsUpdateToActionsMap,e,this.props)}componentWillUnmount(){this.props.closeNotification()}renderNotification(){let{model:e,notification:t}=this.props,a=eP[t];return a?r.createElement(eg.CSSTransition,{classNames:"children-transition",timeout:500},r.createElement(a,{closeClickHandler:this.closeClickHandler,model:e})):null}render(){let{playerType:e}=this.props;return r.createElement(eg.TransitionGroup,{className:(0,W.AK)(["view-cam-notifications",e?`view-cam-notifications-${e}`:""])},this.renderNotification())}constructor(...e){super(...e),(0,i._)(this,"propsUpdateToActionsMap",[{update:["model.id"],action:()=>{let{notification:e}=this.props;e===es.h3.SUBSCRIBE&&this.props.closeNotification()}}]),(0,i._)(this,"closeClickHandler",()=>{this.props.closeNotification()})}}let e_=(0,n.$j)(e=>({notification:(0,O.O5)(e),playerType:(0,v.Aq)(e)}),eT)(ew);var eN=a(65343);let eA=({text:e})=>r.createElement("div",{className:"vc-status-hint"},r.createElement("div",{className:"vc-status-hint-icon-box"},r.createElement(A.Z,{img:"hint",className:"vc-status-hint-icon"})),r.createElement("div",{className:"vc-status-hint-text"},e));var ek=a(10642),eI=a(85353),eM=a(61250);let eL=({duration:e,onOverlimit:t})=>((0,eM.Z)(t,e),null);var eR=a(17473),eU=a(13743);let eZ=()=>{let e=(0,u.C)(O.CR),t=(0,u.C)(eU.lY),[a,i]=(0,r.useState)(new Date);if((0,r.useEffect)(()=>{let e=setInterval(()=>i(e=>new Date(e.getTime()+1e3)),1e3);return()=>clearInterval(e)},[]),null==e)return null;let s=(0,Q.og)(a.getTime()+t,e),l=s<36e5?Q.TIME_FORMATS.MINUTES_SECONDS:Q.TIME_FORMATS.HOURS_MINUTES_SECONDS;return r.createElement("div",{suppressHydrationWarning:!0,className:"vc-status-elapsed-show-time"},(0,M.dW)("viewCamStatuses.heading.showIsOn",{duration:(0,Q.mr)(s,l)}))},eO=({headingIcon:e,headingText:t,withElapsedShowTime:a,subheadingText:i,bodyText:s,controls:l,footerText:n,backdropMode:o,underControlsText:c})=>r.createElement(r.Fragment,null,r.createElement(eR.M,{mode:o}),r.createElement("div",{className:"vc-status-body"},e&&("string"==typeof e?r.createElement(A.Z,{img:e,className:"vc-status-heading-icon"}):e),r.createElement("div",{className:"vc-status-heading-text"},t),a&&r.createElement(eZ,null),i&&r.createElement("div",{className:"vc-status-subheading-text"},"“",i,"”"),s&&r.createElement("div",{className:"vc-status-body-text"},s),l&&r.createElement("div",{className:"vc-status-controls"},l),c&&r.createElement("div",{className:"vc-status-undercontrols-text"},c)),n&&r.createElement("div",{className:"vc-status-footer"},r.createElement(eA,{text:n}))),eW=e=>e?`status-${({[P.MODEL_STATUSES.STATUS_VIRTUAL_PRIVATE]:P.MODEL_STATUSES.STATUS_PRIVATE})[e]||e}`:null,eB=({model:{status:e},...t})=>{let a=(0,m.T)();return r.createElement("div",{className:(0,W.AK)(["vc-status",eW(e)])},e?r.createElement(eO,t):r.createElement(r.Fragment,null,r.createElement(eL,{duration:15e3,onOverlimit:()=>{a((0,ek.t$)("error","ViewCamStatusScreen: Too long video loading after state change",{}))}}),r.createElement(eI.Z,{isCentered:!0})))};var eF=a(89196),eD=a(5637),eV=a(66483);let ex={emitButtonEvent:w.d2,showModal:j.K4,joinToGroupShow:c.W6,loadActiveApps:eF.UQ};class e$ extends r.Component{render(){let{model:e,model:{username:t},description:a,isTicketShow:i,isOngoingTicketShowAvailable:s,viewCamShow:l}=this.props;return(null==l?void 0:l.details.groupShow)?r.createElement(eB,{model:e,withElapsedShowTime:!0,headingIcon:i?r.createElement("div",{className:"vs-status-ticket-show-wrapper"},r.createElement(A.Z,{img:"ticket",size:48}),s&&r.createElement(A.Z,{img:"success-check-white",size:22,className:"vs-status-ticket-show-check-icon"})):"group",headingText:r.createElement(N.Z,{messageId:`viewCamStatuses.heading.${i?"ticketShow":"groupShow"}`,elements:{strong:r.createElement("strong",null)},parameters:{username:t}}),subheadingText:a,controls:this.getControls(),underControlsText:this.getUnderControlsText()}):null}constructor(...e){super(...e),(0,i._)(this,"showJoinGroupShow",()=>{let{model:e,isExtensionsForTicketGroupShowsEnabled:t,isOngoingTicketShowAvailable:a}=this.props;if(!a){q.P4.show(eD.G,{});return}this.props.joinToGroupShow(),t&&this.props.loadActiveApps(e.id)}),(0,i._)(this,"getControls",()=>{let{isModelOrStudio:e,isOngoingTicketShowAvailable:t}=this.props;return e?null:r.createElement(_.ZP,{className:"vc-status-private-btn",onClick:this.showJoinGroupShow,style:t?"apply":"gold-ds",size:"medium"},r.createElement(N.Z,{messageId:`button.${t?"returnToShow":"joinNow"}`}))}),(0,i._)(this,"getUnderControlsText",()=>{let{watchers:e,isOngoingTicketShowAvailable:t}=this.props;return r.createElement(r.Fragment,null,t&&r.createElement(N.Z,{className:"vc-status-undercontrols-text--accent",messageId:"viewCamStatuses.body.alreadyHaveTicket",parameters:{watchers:e}}),e>=2&&!t&&r.createElement(N.Z,{className:"vc-status-undercontrols-text--regular",messageId:"viewCamStatuses.body.groupShowWatching",parameters:{watchers:e}}))})}}let eH=(0,n.$j)((e,t)=>{let a=(0,d.Tn)(e)||t.model.groupShowType===P.G$M.TICKET;return{description:(0,d.cj)(e),isModelOrStudio:(0,eV.ly)(e),watchers:(0,d.xO)(e),isOngoingTicketShowAvailable:a&&(0,O._u)(e),isTicketShow:a,isExtensionsForTicketGroupShowsEnabled:(0,p.RHc)(e),viewCamShow:(0,d.Yq)(e)}},ex)(e$),eK=({model:{username:e}})=>r.createElement("div",{className:"vc-status status-idle"},r.createElement("div",{className:"clock-wrapper"},r.createElement(A.Z,{img:"time-clock"})),r.createElement("div",{className:"status"},r.createElement(N.Z,{className:"status-text",messageId:"viewCam.poster.idle",parameters:{username:e}}))),eG=()=>{let e=(0,u.C)(en.M7),t=(0,m.T)();return r.createElement(_.ZP,{className:"lets-chat-plasma",style:"lets-chat-plasma",onClick:()=>{e?t((0,j.K4)(I.MODAL_TYPES.PLASMA_MESSENGER)):t((0,o.cS)({triggerSource:Y.Dt.SIGNUP_PLASMA_OFFLINE},{type:"chatPlasma"}))}},r.createElement("div",{className:"plasma-icon"}),r.createElement(N.Z,{messageId:"plasma.startChat"}))};var ez=a(48233),ej=a(4289),eY=a(70104);let eq=(0,n.$j)(function(e){return{next:(0,eY.to)(e),modelUsername:e.viewCam.modelUsername}})(({modelUsername:e,next:t})=>{var a,i;let s=(0,r.useRef)(null),[l,n]=(0,r.useMemo)(()=>null!==(a=null==t?void 0:t.period)&&void 0!==a?a:[],[t]),o=(0,r.useMemo)(()=>(0,Q.YF)(new Date,Q.Ju.day),[]),c=(0,r.useMemo)(()=>(0,Q.yG)(o,{seconds:null!=l?l:0}),[o,l]),d=(0,r.useMemo)(()=>(0,Q.yG)(o,{seconds:null!=n?n:0}),[o,n]),m=(0,r.useMemo)(()=>(0,Q.YV)(I.tz.indexOf(null!==(i=null==t?void 0:t.day)&&void 0!==i?i:"mon")),[t]);return(null==t?void 0:t.day)&&(l||n)?r.createElement("div",{className:"schedule-next-informer"},r.createElement(A.Z,{img:"calendar"})," ",(0,M.dW)("schedule.nextBroadcast"),":"," ",r.createElement(ej.OL,{to:{pathname:`/${e}/profile#schedule`},className:"schedule-next-informer__link"},r.createElement("span",{ref:s},r.createElement(A.Z,{img:"info-circle"}),r.createElement(k.Z,{targetRef:s,isMobileRelative:!1,shouldPreventDefault:!0,placement:"top"},(0,M.dW)("schedule.tooltip.yourLocalTime"))),r.createElement("span",{className:"schedule-next-informer__weekday"},r.createElement("span",{className:"schedule-next-informer__weekday-short"},(0,M.dW)(`weekdaysAbbr.${t.day}`)),r.createElement("span",{className:"schedule-next-informer__weekday-full"},m)),"\xa0",(0,Q.mr)(c,Q.TIME_FORMATS.TIME),"\xa0–\xa0",(0,Q.mr)(d,Q.TIME_FORMATS.TIME),r.createElement(A.Z,{img:"chevron-right"}))):null});var eQ=a(1961),eJ=a(56802),eX=a(11850),e0=a(80936),e1=a(75997),e2=a(93776);let e5="subscribe-switch-tooltip",e3={toggleModelNotifications:eQ.oj},e4=(0,e0.y)("isLayoutUpToL")((0,n.$j)((e,t)=>{let{auth:{isLoggedIn:a,isLoggingOut:i}}=e,{model:s}=t;return{isSubscribed:(0,G.LW)(e,s.id),isLoggedIn:a&&!i,isCurrentUserModelOrStudio:(0,e2.ly)(e)}},e3)(({icon:e="bell",isCurrentUserModelOrStudio:t,isLayoutUpToL:a,isSubscribed:i,model:s,toggleModelNotifications:l})=>{let[n,o]=(0,eX.eW)(),c=(0,eX.tI)();return!s.isModel||t?null:r.createElement("div",{className:"subscribe-switch-container"},r.createElement(A.Z,{img:e}),r.createElement("span",{className:"subscribe-caption"},(0,M.dW)("switcher.subscription.subscribe")),r.createElement(e1.Z,{className:"subscribe-switch",iconImg:"check-1",id:e5,isChecked:i,onChange:(e,t)=>{l({model:s,buttonLocation:I.FO.SUBSCRIBE}),e&&o(t)},size:"small",theme:"light"}),n&&r.createElement(eJ.R,{buttonLocation:"PushNotificationPopupOnOfflineViewcamSubscribe",isForcePlacement:!0,isVisible:!0,model:s,onClose:c,placement:a?"bottom":"right",targetId:e5}))}));var e6=a(85037),e8=a(57077),e9=a(50423);let e7=()=>{let{isLayoutUpToL:e}=(0,e9.iP)("isLayoutUpToL");return r.createElement(e8.Lp,{source:Y.mw.OFFLINE_SHUTTER},r.createElement(e6.m,{tooltipPlacement:e?"bottom":"right",className:"add-to-calendar-from-offline-view-cam",buttonClassName:"add-to-calendar-from-offline-view-cam__button",iconClassName:"add-to-calendar-from-offline-view-cam__icon"},r.createElement("span",{className:"media-up-to-m-hidden add-to-calendar-from-offline-view-cam__text"},(0,M.dW)("viewCam.addToCalendar.button"))))};var te=a(28656),tt=a(82169);let ta=(0,n.$j)(e=>({timeDelta:(0,eU.lY)(e),isPlasmaAvailable:(0,d.M9)(e),isModel:(0,eV.A4)(e),shouldShowAddToCalendarButton:(0,eY.rf)(e)}))(({model:e,timeDelta:t,isPlasmaAvailable:a,isModel:i,shouldShowAddToCalendarButton:s})=>{let l=(0,r.useRef)(null),[n,o]=(0,r.useState)(!0),{windowWidth:c,windowHeight:d}=(0,e9.iP)("windowWidth","windowHeight"),m=(0,ef.n3)(e);(0,te.L)(()=>{if(l.current){var e,t,a;let i=(null===(t=(a=l.current).getBoundingClientRect)||void 0===t?void 0:null===(e=t.call(a))||void 0===e?void 0:e.height)||0;o(i>500)}},[c,d]);let u=(0,tt.Z)(e),p=u?"available":"offline",h=(0,tt.x)(a,u),v=e.wentIdleAt||e.statusChangedAt,E=new Date(Date.now()+t);return r.createElement("div",{ref:l,className:"vc-status-offline"},r.createElement("div",{className:"vc-status-offline-inner"},r.createElement("div",null,r.createElement("div",{className:(0,W.AK)("vc-status-avatar-container",{"avatar-hidden":!n})},r.createElement(eC.Z,{className:"vc-status-offline-avatar",isBorderAvatar:!1,user:(0,ey.T$)(e),modelData:m}),r.createElement("div",{className:(0,W.AK)("availability-status",p)},(0,M.dW)(`viewCamStatuses.offline.availabilityStatus.${p}`)))),r.createElement("div",null,v&&r.createElement("div",{className:"offline-status-time",suppressHydrationWarning:!0},(0,M.dW)("viewCam.wasOnline",{lastTimeLabel:(0,Q.fH)(v,E,!1)}))),r.createElement("div",null,e.offlineStatus&&r.createElement(k.Z,{className:"offline-status",isForceVisible:!0,placement:"bottom"},r.createElement(A.Z,{img:"megaphone-bold"}),r.createElement("span",null,e.offlineStatus))),r.createElement("div",null,!i&&r.createElement(r.Fragment,null,!!h&&r.createElement("div",{className:"private-and-start-chatting-mobile-title"},r.createElement("div",null,h)),r.createElement("div",{className:"private-and-start-chatting"},u&&r.createElement("div",{className:"private-and-start-chatting-card"},r.createElement("div",{className:"private-and-start-chatting-title"},(0,M.dW)("viewCamStatuses.offline.requestPrivate.title")),r.createElement("div",{className:"private-and-start-chatting-body"},(0,M.dW)("viewCamStatuses.offline.requestPrivate.body")),r.createElement(ez.Z,{model:e,className:"private-and-start-chatting-button"})),a&&r.createElement("div",{className:(0,W.AK)("private-and-start-chatting-card",{single:!u})},r.createElement("div",{className:"private-and-start-chatting-title"},(0,M.dW)("viewCamStatuses.offline.plasma.title")),r.createElement("div",{className:"private-and-start-chatting-body"},(0,M.dW)("viewCamStatuses.offline.plasma.body")),r.createElement("div",{className:"private-and-start-chatting-button"},r.createElement(eG,null)))))),r.createElement("div",{className:"vc-status-offline-bottom"},r.createElement("div",{className:"vc-status-next-broadcast"},r.createElement(eq,null))),r.createElement("div",{className:"vc-status-subscribe"},r.createElement(e4,{key:e.id,model:e,icon:"notifications-2"}),s&&r.createElement(r.Fragment,null,r.createElement("div",{className:"vc-status-offline__button-divider"}),r.createElement(e7,null)))))}),ti=(0,n.$j)(e=>({isModelOrStudio:(0,eV.ly)(e)}))(({isModelOrStudio:e,model:t,model:{username:a}})=>r.createElement(eB,{model:t,headingIcon:"lock-1",headingText:r.createElement(N.Z,{messageId:`viewCamStatuses.heading.${e?"exclusivePrivateShort":"exclusivePrivate"}`,parameters:{username:a}}),bodyText:e?null:r.createElement(N.Z,{messageId:"viewCamStatuses.body.whenExclusivePrivateEnds"}),footerText:e?null:r.createElement(N.Z,{messageId:"viewCamStatuses.hint.default"})}));var ts=a(56391);let tl={emitButtonEvent:w.d2};class tr extends r.Component{render(){let{canSpy:e,isModelOrStudio:t,model:a,model:{username:i}}=this.props;return r.createElement(eB,{model:a,backdropMode:this.getBackdropMode(),headingIcon:"spy-on",headingText:r.createElement(N.Z,{messageId:t?"viewCamStatuses.heading.privateShort":"viewCamStatuses.heading.private",parameters:{username:i}}),bodyText:t?null:r.createElement(N.Z,{messageId:`viewCamStatuses.body.${e?"reveal":"whenPrivateEnds"}`}),controls:this.getControls(),footerText:t?null:r.createElement(N.Z,{messageId:`viewCamStatuses.hint.${e?"chanceToSpy":"default"}`})})}constructor(...e){super(...e),(0,i._)(this,"startSpyClickHandler",()=>{let{model:{id:e}}=this.props;this.props.emitButtonEvent(I.FO.VIEWCAM_START_SPY,{modelId:e})}),(0,i._)(this,"getBackdropMode",()=>{let{canSpy:e,isBlurVideoOnPrivate:t}=this.props;return t?"transparent":e?"flashlight":""}),(0,i._)(this,"getControls",()=>{let{canSpy:e,isFanClubFreeSpyAvailableForCurrentUser:t,isFreeSpyTrialAvailable:a}=this.props;return e?r.createElement(r.Fragment,null,r.createElement(_.ZP,{className:"vc-status-private-btn",size:"medium",style:"apply-alter",onClick:this.startSpyClickHandler},r.createElement(A.Z,{img:"spy-on",className:"vc-status-private-btn-icon"}),r.createElement(N.Z,{messageId:"button.spyOn",parameters:{username:this.props.model.username}})),!t&&a&&r.createElement(N.Z,{className:"vc-status-first-some-seconds-free",messageId:"viewCamStatuses.body.firstSomeSecondsFree",choiceParameter:"time",parameters:{time:P.LOf},elements:{green:r.createElement("span",{className:"vc-status-first-some-seconds-free-green"})}})):null})}}let tn=(0,n.$j)((e,t)=>{let a=(0,eV.ly)(e),i=(0,O._W)(e);return{canSpy:!!t.model.doSpy&&!a,isModelOrStudio:a,isFanClubFreeSpyAvailableForCurrentUser:(0,ts.aw)(i),isFreeSpyTrialAvailable:(0,d.fj)(e),isBlurVideoOnPrivate:(0,v.$C)(e)}},tl)(tr),to=({model:e=null})=>{if(!e)return null;switch(e.status){case P.MODEL_STATUSES.STATUS_OFF:return r.createElement(ta,{model:e});case P.MODEL_STATUSES.STATUS_IDLE:return r.createElement(eK,{model:e});case P.MODEL_STATUSES.STATUS_PRIVATE:case P.MODEL_STATUSES.STATUS_VIRTUAL_PRIVATE:return r.createElement(tn,{model:e});case P.MODEL_STATUSES.STATUS_P2P:case P.MODEL_STATUSES.STATUS_P2P_VOICE:return r.createElement(ti,{model:e});case P.MODEL_STATUSES.STATUS_GROUP_SHOW:return r.createElement(eH,{model:e});case P.MODEL_STATUSES.STATUS_PUBLIC:return null;default:return r.createElement(eB,{model:e})}};var tc=a(23359),td=a(48250),tm=a(80905),tu=a(68798),tp=a(42200),th=a(62668),tv=a(81346),tE=a(82362),tg=a(54534),tS=a(42815),tb=a(62512),tC=a(37112),tf=a(70203),ty=a(35018),tT=a(27251),tP=a(62203),tw=a(80092),t_=a(2656);let tN={updateIsBackgroundThrottle:t_.gk,updateIsBackgroundForceStopPlaying:t_.ZF};class tA extends r.Component{componentDidUpdate(e){this.props.isBackgroundVideoStopPlayingEnabled&&!e.isBackgroundVideoStopPlayingEnabled&&document.addEventListener("visibilitychange",this.onVisibilityChange)}componentDidMount(){(this.props.isBackgroundThrottleEnabled||this.props.isBackgroundVideoStopPlayingEnabled)&&(this.props.isBackgroundThrottle&&this.props.updateIsBackgroundThrottle(!1),this.props.isForceStopPlaying&&this.props.updateIsBackgroundForceStopPlaying(!1),(0,W.AO)()&&this.launchBackgroundTimer(),document.addEventListener("visibilitychange",this.onVisibilityChange))}componentWillUnmount(){(this.props.isBackgroundThrottleEnabled||this.props.isBackgroundVideoStopPlayingEnabled)&&(document.removeEventListener("visibilitychange",this.onVisibilityChange),this.timer&&clearTimeout(this.timer))}render(){return null}constructor(...e){super(...e),(0,i._)(this,"timer",null),(0,i._)(this,"launchBackgroundTimer",()=>{this.timer=window.setTimeout(()=>{this.props.isBackgroundVideoStopPlayingEnabled?this.props.updateIsBackgroundForceStopPlaying(!0):this.props.isBackgroundThrottleEnabled&&this.props.updateIsBackgroundThrottle(!0),this.timer=null},this.props.backgroundActionDelay)}),(0,i._)(this,"onVisibilityChange",()=>{let e=(0,W.AO)(),{isBackgroundThrottle:t,isForceStopPlaying:a}=this.props;!e||t||a||this.timer||this.launchBackgroundTimer(),!e&&this.timer&&(clearTimeout(this.timer),this.timer=null),!e&&t&&this.props.updateIsBackgroundThrottle(!1),!e&&a&&this.props.updateIsBackgroundForceStopPlaying(!1)})}}let tk=(0,n.$j)(e=>{let t=(0,tw.MC)(e),a=(0,tw.No)(e),i=(0,d.x)(e),s=(0,v.if)(e);return{isBackgroundThrottle:(0,v.zO)(e),isForceStopPlaying:(0,v.aX)(e),isBackgroundThrottleEnabled:!t&&!a,isBackgroundVideoStopPlayingEnabled:(a&&s||t)&&i,backgroundActionDelay:t||a?1e4:6e4}},tN)(tA);var tI=a(36886),tM=a(37051),tL=a(91343),tR=a(52635),tU=a(50557),tZ=a(41950),tO=a(87937),tW=a(16023),tB=a(98371),tF=a(61061),tD=a(51945),tV=a(53514),tx=a(38629),t$=a(78021),tH=a(69497),tK=a(8771),tG=a(32232),tz=a(67007),tj=a(48015),tY=a(4368),tq=a(82349),tQ=a(96811);let tJ=(0,r.forwardRef)(({videoElement:e,lastSnapshotUrl:t,isWatermark:a,wasPlayed:i,modelName:s,isRemote:l,isPlaying:n,isLoading:o,onTimeUpdate:c,isCollectLogs:m},p)=>{let h=(0,u.C)(d.tS),v=r.useRef({right:0,bottom:0}),[E,g]=r.useState(0),S=r.useCallback(()=>{let t=(0,tG.i)(e);v.current!==t&&(v.current=t),v.current=(0,tG.i)(e)},[e,v]);(0,r.useEffect)(()=>{let t;return h&&e&&requestAnimationFrame(()=>{t=(0,W.Cu)(e)}),t},[h,e]),(0,tq.Z)(()=>{S(),e&&(E!==e.currentTime?(g(e.currentTime),tQ.Z.playing(),c&&c()):tQ.Z.paused())},500),(0,tq.Z)(()=>{e&&m&&tC.Z.setFields({width:e.videoWidth,height:e.videoHeight})},1e3);let b=r.useCallback(()=>{(0,tK.zI)().play()},[]);return r.createElement("div",{key:"video_element_wrappper",className:(0,W.AK)("video-element-wrapper",{"video-element-wrapper--loading":o}),ref:p},r.createElement("div",{className:(0,W.AK)("video-element-wrapper-blur",{"with-poster":!i,"with-blur":!0})},t&&r.createElement(tY.s,{src:t,area:"snapshot",username:s})),a&&r.createElement(tz.Z,{position:v.current}),l?o?r.createElement(eI.Z,{isCentered:!0}):n||h?null:r.createElement(tF.Z,{onClick:b}):null,e&&r.createElement(tj.Z.Consumer,null,({registerVideoElement:t})=>{null==t||t(e)}))});var tX=a(75151),t0=a(80439),t1=a(25304),t2=a(84543),t5=a(20717),t3=a(68479),t4=a(74178),t6=a(1210),t8=a(76811),t9=a(28648),t7=a(39975),ae=a(54319);let at=({mmp:e,shouldRequestPermissions:t=!0,onPermissionsRequested:a})=>{let{mediaStream:i,setConstraints:s,availableVideoDevices:l,availableAudioDevices:n,requestPermissions:o}=e.useUserMedia(),c=(0,m.T)(),{broadcastConfig:d}=(0,u.C)(v.df),p=(0,u.C)(v.Ki),h=(0,u.C)(v.Ur),g=(0,u.C)(t0.TM),S=(0,u.C)(E.yV),b=(0,u.C)(E.Jl),C=(0,u.C)(ae.LZ),f=(0,u.C)(tB.$_),y=(0,u.C)(v.fM),T=(0,u.C)(v.jz),P=r.useRef(),w=r.useMemo(()=>({audioDevices:n,videoDevices:l}),[n,l]),_=r.useCallback(e=>{c((0,t_.M7)(e))},[c]);return r.useEffect(()=>{if((l.length||n.length)&&!Object.keys(S).length){let e=(0,t7.K)(f,C,T);!e.videoDeviceId&&(null==l?void 0:l[0])&&(e.videoDeviceId=l[0].deviceId),!e.audioDeviceId&&(null==n?void 0:n[0])&&(e.audioDeviceId=n[0].deviceId),_(e)}},[l,n]),r.useEffect(()=>{let e={audio:{deviceId:S.audioDeviceId||void 0}};e2.L4.isTouchFacingMode&&S.facingMode?e.video={facingMode:S.facingMode}:e.video={deviceId:S.videoDeviceId||void 0},s(e)},[S]),r.useEffect(()=>{t&&!P.current&&(P.current=!0,o(),a&&a())},[o]),r.useEffect(()=>{c((0,t9.Qk)({isMuted:b}))},[b]),r.useEffect(()=>{i&&(i.getAudioTracks().forEach(e=>{e.enabled=!b}),i.getVideoTracks().forEach(e=>{e.enabled=!y}))},[b,y,i]),{settingDevices:w,isBroadcastSettingsVisible:p,isBroadcastMirrored:h,isBroadcastExpandedInCamToCam:g,mediaStream:i,broadcastConfig:d,settings:S,isMuted:b,isCameraDisabled:y,handleBroadcastSettingsChange:_}},aa=!1,ai=({mmpModule:e,shouldShowPip:t})=>{let{playerRef:a}=e.useMouflonPlayer(),i=r.useRef(null),s=r.useRef(null),{settingDevices:l,isBroadcastSettingsVisible:n,broadcastConfig:o,settings:c,mediaStream:d,handleBroadcastSettingsChange:m,isMuted:u,isCameraDisabled:p}=at({mmp:e,shouldRequestPermissions:!aa,onPermissionsRequested:()=>{aa=!0}}),h=r.useMemo(()=>({videoControllerConfig:{rootElement:i.current,autoplay:!0}}),[i.current]),v=r.useMemo(()=>({userId:null==o?void 0:o.userId}),[o]);return o?r.createElement(r.Fragment,null,r.createElement("div",{className:"web-rtc-broadcasting web-rtc-broadcasting--new",ref:i},r.createElement(e.MouflonPlayer,{playerType:e.EPlayerType.BROADCAST,videoElement:s.current||void 0,isABREnabled:!1,volume:0,MediaStream:d||void 0,WebRTCSignallingUrl:o.streamUrl,WebRTCStreamId:o.streamName,WebRTCPublishCustomData:v,WebRTCACLToken:o.broadcastToken,playerConfig:h,playerRef:a,appKey:o.webRTCAppKey,autoplay:!0}),r.createElement("video",{className:t?"":"hidden",ref:s})),!e2.L4.touch&&r.createElement(t8.Z,{settings:c,devices:l,localStream:d,isBroadcastSettingsVisible:n,changeBroadcastStreamSettings:m,isMuted:u,isCameraDisabled:p})):null},as=e=>{let t=(0,u.C)(v.Ki),a=(0,u.C)(v.Ur),i=(0,u.C)(t0.TM),[s,l]=(0,r.useState)(!1),n=(0,r.useCallback)((0,e2.Ds)(e=>{l(e)},1e3),[l]);return((0,r.useEffect)(()=>{n(!!e.shouldRenderCamToCamBroadcast)},[e.shouldRenderCamToCamBroadcast]),e.isWebRTC)?r.createElement("div",{className:"web-rtc-player-wrapper"},r.createElement("div",{className:(0,W.AK)("web-rtc-player",{"cam-to-cam":e.isCamToCam,mirror:a,settings:t&&!e2.L4.touch,"expanded-in-cam-to-cam":i})},r.createElement("div",{className:"web-rtc-content"},r.createElement("div",{className:"web-rtc-content-wrapper"},r.createElement("div",{className:"web-rtc-playing"},r.createElement(tJ,{...e,ref:e.playingVideoRootRef})),s&&r.createElement(ai,{shouldShowPip:e.isCamToCam&&e.isVideoEnabled,mmpModule:e.mmpModule}))))):r.createElement("div",{className:"mse-player"},r.createElement(tJ,{...e,ref:e.playingVideoRootRef}))},al=({playerType:e,wasPlayed:t,lastSnapshotUrl:a,mmpModule:i,onPlaying:s,updateInitializePlayer:l,modelName:n})=>{var c;let p=(0,m.T)(),g=r.useRef((0,tK.zI)()),S=r.useCallback(e=>{p((0,t_.fE)(e.width,e.height))},[p]),b=r.useCallback(e=>{p((0,tX.gi)({error:e.error.message,playerType:e.playerType}))},[p]),{playerRef:C,abrPolicy:f,resolutions:y,videoPlaybackState:T,isLoading:w,isPlaying:_,isErrored:N,isModuleLoading:A}=i.useMouflonPlayer({onPlaying:s,onUpdatePlayerResolution:S,onError:b}),k=(0,u.C)(v.Cj),{playConfig:M,broadcastConfig:L}=(0,u.C)(v.df),R=(0,u.C)(v.PW),{metricsCollectorEndpoint:U,metricsProjectId:Z}=(0,u.C)(v.I4),O=r.useRef(-1),[W,B]=r.useState(null==M?void 0:null===(c=M.preset)||void 0===c?void 0:c.presetQuality),[F,D]=r.useState(k.value),V=(0,u.C)(v.nc),x=(0,u.C)(v.Nl),$=(0,u.C)(v.jq),H=(0,u.C)(d.UP),K=(0,u.C)(t0.TM),G=(0,u.C)(v.Xy),z=(0,u.C)(en.rc),j=(0,u.C)(v.fM),Y=(0,u.C)(E.Jl),q=(0,u.C)(v.Bl),Q=(0,u.C)(v.zO),J=(0,r.useRef)(),[X,ee]=(0,r.useState)(!0),et=(0,u.C)(v.ou),ea=r.useRef(null),ei=r.useMemo(()=>e===h.PLAYER_TYPES.WEBRTC?i.EPlayerType.WEBRTC:t3.iC?i.EPlayerType.NATIVE:i.EPlayerType.HLS,[i,e]);r.useEffect(()=>{ei===i.EPlayerType.WEBRTC&&p((0,t_.G4)(t6.p.WEBRTC_RISTRETTO)),p((0,t_.G4)(ei===i.EPlayerType.NATIVE?t6.p.NATIVE:t6.p.DOPPIO))},[p,i.EPlayerType,ei]),r.useEffect(()=>{var t,a,i;if(!y.length)return;let s=null===(t=(0,t5.en)(y[0].url))||void 0===t?void 0:t.hostname;if(s){let e=s.indexOf("hls-"),t=null===(a=s.split(".")[0])||void 0===a?void 0:a.substr(e);p((0,t1.M3)(t))}let l=O.current,r=I.BROWSER_CAPABILITIES.isMobile?V.startMobileResolution:V.startDesktopResolution,n=(0,E.Fm)(r,y.map((e,t)=>({value:parseInt(e.name,10),index:t}))),o=n.index||0;if(l){let e=Array.from(y).sort((e,t)=>t.bitrate-e.bitrate)[0],t=l>=e.bitrate,a=t?y.findIndex(t=>t.bitrate===e.bitrate):y.findIndex(e=>e.bitrate+1e5>=l&&l>=e.bitrate-1e5);if(a>=0)o=a;else{let e=y.reduce((e,t,a)=>l?l<=t.bitrate&&(!e||l>=t.bitrate)?{level:a,bitrate:t.bitrate}:e:null,null);o=(null==e?void 0:e.level)||o}}if(o||0===o||(o=y.findIndex(e=>`${e.height}p`===h.cC)),null!==o){let t=y[o].name;D(t),e===h.PLAYER_TYPES.HLS&&(null===(i=C.current)||void 0===i||i.setResolutionByName(t))}},[e,C,p,V,y]);let es=r.useMemo(()=>{var e;return(null==M?void 0:null===(e=M.preset)||void 0===e?void 0:e.type)===P.rdN},[M]),el=r.useCallback(()=>{if(g.current){let{videoHeight:e}=g.current;if(es&&!Q&&e!==J.current){let t=e?`${e}p`:null;t&&p((0,o.wb)(t))}J.current=e}},[p,g,Q,es]);r.useEffect(()=>{var e,t;(null==M?void 0:null===(e=M.preset)||void 0===e?void 0:e.name)&&(null==M?void 0:null===(t=M.preset)||void 0===t?void 0:t.name)!==W&&B(M.preset.type===P.pgl?P.pgl:M.preset.presetQuality||M.preset.quality)},[W,M]),r.useEffect(()=>{(0,t2.p)(f,t4.jI)&&p((0,t_.LV)(f))},[p,f]),r.useEffect(()=>{var e;null===(e=C.current)||void 0===e||e.start()},[C]);let er=r.useMemo(()=>{var t;let a=e===h.PLAYER_TYPES.WEBRTC?"video-element web-rtc-video-element":"video-element";return{autoplay:!0,webRTCConfig:{streamDispatcherConfig:{startResolution:null==M?void 0:null===(t=M.preset)||void 0===t?void 0:t.presetQuality,isFastStartEnabled:q},broadcastDispatcherConfig:{enableBackendStreamQualityRecognition:et}},videoControllerConfig:{rootElement:ea.current,minimalPossibleVideoDimension:50,shouldUseCanvas:G,canvasElementClassName:a,videoElementClassName:a,isNonAnonymous:!0,isRemote:!0,autoplay:!0}}},[M,e,F,ea.current,G,q,et]);return r.useEffect(()=>{l()},[l]),(0,r.useEffect)(()=>{ee(!0)},[e]),(0,r.useEffect)(()=>{A||ee(!1)},[A]),(0,r.useEffect)(()=>{H||p((0,t_.UK)(!1))},[H,p]),r.createElement(i.MouflonPlayer,{videoElement:g.current,HLSStreamUrl:x||void 0,NativeStreamURL:x||void 0,WebRTCStreamId:null==M?void 0:M.streamName,WebRTCSignallingUrl:null==M?void 0:M.streamUrl,WebRTCACLToken:null==M?void 0:M.token,playerType:ei,playerRef:C,isABREnabled:es,WebRTCQuality:W,playerConfig:er,abrPresets:R,volume:$,metricsProjectId:Z,metricsCollectionEndpoint:U,appKey:"callbackApp"},r.createElement(as,{mmpModule:i,playingVideoRootRef:ea,lastSnapshotUrl:a,isLoading:w||N||!T,isPlaying:_,wasPlayed:t,isRemote:!0,modelName:n,videoElement:g.current,isWatermark:!(H&&K),onTimeUpdate:el,isCollectLogs:!0,isVideoEnabled:!j,isCamToCam:H,shouldRenderCamToCamBroadcast:!!(H&&L&&z&&!X&&(!j||!Y)),isWebRTC:e===h.PLAYER_TYPES.WEBRTC}))},ar=e=>{let[t,a]=r.useState(null),i=(0,u.C)(O.lw),s=(0,u.C)(O.iv),l=(0,m.T)(),{version:n,maxAttemptsToLoad:o,isEnabled:c,sourceOrigin:d}=(0,u.C)(v.u4);return r.useEffect(()=>{(0,tH.K5)({isExternalSourceEnabled:c,externalVersion:n,externalSourceOrigin:d,maxAttempts:o}).then(({module:e,localModuleLoaderWasUsed:t})=>{e&&(l((0,t_.pF)({playerWasLoadedFromExternalSource:!t,playerVersion:t?void 0:n,isMMP:!0})),a(e))})},[]),t?r.createElement(al,{...e,mmpModule:t,modelName:i,modelId:s}):r.createElement(tJ,{lastSnapshotUrl:e.lastSnapshotUrl,isLoading:!1,isPlaying:!1,wasPlayed:!1,modelName:i,isRemote:!0})},an=["scroll","mousemove","pointerdown","keydown"];class ao extends r.PureComponent{componentDidMount(){this.props.isMediaPage&&an.forEach(e=>document.addEventListener(e,this.handleFirstInteraction)),this.props.updateHLSStreamEndedState(!1),this.removeAudioStartListener=tZ.KY.subscribePlayAudioEvent(e=>{e.detail.playerId!==this.VideoPlayerId&&this.props.togglePlayerAvailability(!1)})}componentDidUpdate(e){var t,a,i;this.updateDocumentVisibilityState(e,this.props),(null==e?void 0:null===(t=e.model)||void 0===t?void 0:t.id)!==(null===(i=this.props)||void 0===i?void 0:null===(a=i.model)||void 0===a?void 0:a.id)&&this.setState({wasPlayed:!1})}componentWillUnmount(){var e;this.updateInitializePlayer&&this.updateInitializePlayer.cancel(),null===(e=this.removeAudioStartListener)||void 0===e||e.call(this),this.props.updateInitializePlayer(!1),this.clearTimeout(),an.forEach(e=>document.removeEventListener(e,this.handleFirstInteraction))}static getDerivedStateFromError(){return{isFailed:!0}}componentDidCatch(e,t){ek.ZP.error(e,t),this.props.apiLog("error",`Player failed: ${e.name}`,{error:e.toString(),errorInfo:t,isMMP:!0})}render(){return this.state.isFailed?r.createElement(tV.Z,null):r.createElement(tx.default,{className:(0,W.AK)("player",eN.j.player,this.props.className)},r.createElement(tD._,null),this.renderPlayerContent(),r.createElement(tR.P,{className:"player__player-controls"}),this.renderStreamController())}constructor(e){super(e),(0,i._)(this,"lastScrollY",0),(0,i._)(this,"updateInitializePlayer",(0,l.Z)(()=>{this.props.updateInitializePlayer(!0)},500)),(0,i._)(this,"removeAudioStartListener",void 0),(0,i._)(this,"VideoPlayerId",`WebRTC${(0,tL.x0)()}`),(0,i._)(this,"timeoutId",void 0),(0,i._)(this,"handleFirstInteraction",e=>{if("scroll"===e.type&&this.lastScrollY<=window.scrollY){this.lastScrollY=window.scrollY;return}this.setState({isAfterUserInteraction:!0}),an.forEach(e=>document.removeEventListener(e,this.handleFirstInteraction))}),(0,i._)(this,"clearTimeout",()=>{void 0!==this.timeoutId&&clearTimeout(this.timeoutId)}),(0,i._)(this,"handlePlaying",()=>{this.state.wasPlayed||(this.setState({wasPlayed:!0}),this.props.onPlaying(),this.props.updateHLSStreamEndedState(!1))}),(0,i._)(this,"togglePlayerAvailabilityIfNeeded",({isDocumentVisible:e,isInPrivate:t,isBlurVideoOnPrivate:a})=>{let i=I.BROWSER_CAPABILITIES.isMobile||I.BROWSER_CAPABILITIES.isTablet;if(i){if(e||a){this.clearTimeout();return}t?this.timeoutId=setTimeout(()=>this.props.togglePlayerAvailability(!1),6e4):this.props.togglePlayerAvailability(!1)}}),(0,i._)(this,"updateDocumentVisibilityState",(e,t)=>{let{isDocumentVisible:a}=t;(0,et.gk)(e,t)&&(a&&this.setState({isDocumentVisible:a}),this.togglePlayerAvailabilityIfNeeded(t))}),(0,i._)(this,"handlePlayClick",()=>{tZ.KY.emitPlayAudioEvent(this.VideoPlayerId),this.props.togglePictureInPicture(!1),this.props.togglePlayerAvailability(!0),this.props.updateDocumentVisibility()}),(0,i._)(this,"handleHLSStreamEnded",()=>{this.props.updateHLSStreamEndedState(!0)}),(0,i._)(this,"handleHLSStreamRestored",()=>{this.props.isHLSStreamWasEnded&&this.props.updateHLSStreamEndedState(!1)}),(0,i._)(this,"renderPlayer",()=>{let{lastSnapshotUrl:e,volume:t,playerType:a,isPlayerAvailability:i,isPictureInPicture:s,isMediaPage:l,isBackgroundForceStopPlaying:n}=this.props,{isDocumentVisible:o,isAfterUserInteraction:c}=this.state;return!o||!i||s||n||l&&!c?r.createElement(tF.Z,{onClick:this.handlePlayClick}):(0,tO.sk)()?r.createElement(r.Fragment,null):r.createElement(ar,{onPlaying:this.handlePlaying,wasPlayed:this.state.wasPlayed,lastSnapshotUrl:{lastSnapshotUrl:e,volume:t}.lastSnapshotUrl,updateInitializePlayer:this.updateInitializePlayer,playerType:a})}),(0,i._)(this,"renderStreamController",()=>{let{playerType:e}=this.props,t=e===h.PLAYER_TYPES.WEBRTC||e===h.PLAYER_TYPES.HLS;return t?r.createElement(t$.Z,null):null}),(0,i._)(this,"renderPlayerContent",()=>r.createElement(tU.s,null,this.renderPlayer())),this.state={wasPlayed:!1,isDocumentVisible:this.props.isDocumentVisible,isFailed:!1,isAfterUserInteraction:!this.props.isMediaPage}}}(0,i._)(ao,"defaultProps",{isLoggedIn:!1,isInCam2Cam:!1,isInPrivate:!1,isPictureInPicture:!1,lastSnapshotUrl:"",playerType:void 0,volume:0,onPlaying:tM.Z,isHLSStreamWasEnded:!1});let ac={togglePlayerAvailability:c.X6,updatePlayerType:c.$5,updateInitializePlayer:t_.kV,updateDocumentVisibility:th.uP,togglePictureInPicture:t_.x0,apiLog:ek.t$,updateHLSStreamEndedState:c.zH,setEmulatePlayerCrashState:t_.LA},ad=(0,n.$j)(e=>{let{auth:{isLoggedIn:t,isLoggingOut:a},viewCam:{model:i,isPlayerAvailability:s},ui:{isDocumentVisible:l},player:{isBroadcastSettingsVisible:r}}=e,n=(0,d.IW)(e),o=n&&(0,d.UP)(e);return{isDocumentVisible:!!l,isBroadcastSettingsVisible:r,isLoggedIn:t&&!a,isInCam2Cam:o,isInPrivate:n,model:i,isMediaPage:(0,tW.HK)(e),playerType:(0,v.Aq)(e),isPlayerAvailability:s,volume:(0,v.Sf)(e),isPictureInPicture:(0,E.bd)(e),isHLSStreamWasEnded:(0,O.pc)(e),deviceType:(0,tB.l7)(e),crashEmulateState:(0,E.jU)(e),isBackgroundForceStopPlaying:(0,v.aX)(e),isBlurVideoOnPrivate:(0,v.$C)(e)}},ac)(ao);var am=a(18984);let au=e=>{let t=(0,u.C)(v.l2),a=(0,tI.t)();return a?t?r.createElement(ad,e):r.createElement(am.ZP,e):null},ap=()=>r.createElement("div",{className:"player-shutter"},r.createElement(A.Z,{img:"no-video"}),r.createElement("div",{className:"text-wrapper"},(0,M.dW)("playerErrors.outdatedBrowser")));var ah=a(99126);let av=({modelStatus:e,isNonNudeWL:t,posterImageUrl:a,children:i,modelName:s,shouldBeBlurred:l,isBackgroundVideo:n,isBlurVideoOnPrivate:o})=>{let c=[P.MODEL_STATUSES.STATUS_PRIVATE,P.MODEL_STATUSES.STATUS_VIRTUAL_PRIVATE,P.MODEL_STATUSES.STATUS_P2P],d=e&&c.includes(e),m=[P.MODEL_STATUSES.STATUS_IDLE,P.MODEL_STATUSES.STATUS_OFF,P.MODEL_STATUSES.STATUS_PRIVATE,P.MODEL_STATUSES.STATUS_VIRTUAL_PRIVATE,P.MODEL_STATUSES.STATUS_P2P,P.MODEL_STATUSES.STATUS_P2P_VOICE,P.MODEL_STATUSES.STATUS_GROUP_SHOW],u=e&&m.includes(e),p=t&&!a;return r.createElement("div",{className:(0,W.AK)("poster",eN.j.player,{"big-height":u,"above-background-video":n||o})},!o&&r.createElement("div",{className:(0,W.AK)("backdrop",{"prevent-dark":d,blur:l,"non-nude-cover":p})},a&&!n&&r.createElement(tY.s,{username:s,area:"offline",src:a})),i)},aE={initRatePrivateModal:o.fm,beginModelWatching:c.yS,beginVrModelWatching:c._s,cancelProposal:o.sA,closeNotification:o.vU,createFreeAccountModal:o.cS,emitButtonEvent:w.d2,goToModel:o.dX,resetViewCam:o.mc,shadeLayout:th.Xk,startWizard:ah.R7,stopShow:o.a$,stopSpy:o.Kp,changeVolume:t_.v6,updatePlayerWasInPlayedState:c.ll,updateHLSStreamEndedState:c.zH},ag=(e,t)=>{var a,i;return(null==e?void 0:null===(a=e.model)||void 0===a?void 0:a.id)!==(null==t?void 0:null===(i=t.model)||void 0===i?void 0:i.id)},aS=(e,t)=>ag(e,t)||(null==e?void 0:e.playerType)!==(null==t?void 0:t.playerType),ab=(e,t)=>{var a,i;return(null==e?void 0:null===(a=e.model)||void 0===a?void 0:a.id)!==(null==t?void 0:null===(i=t.model)||void 0===i?void 0:i.id)},aC=(e,t)=>!e.snapshotUrl&&!!t.snapshotUrl||ab(e,t);class af extends r.Component{componentDidMount(){this._isMounted=!0,this.props.updatePlayerWasInPlayedState(!1),(0,J.Z)(this.propsUpdateToActionsMap,{},this.props),(0,tb.H0)(this,document,"keydown",this.viewCamBlockKeyDownHandler),(0,tb.H0)(this,window,"beforeunload",this.onBeforeUnloadEventHandler),(0,tb.H0)(this,window,"unload",this.onBeforeUnloadEventHandler),(0,tb.H0)(this,window,"pagehide",this.onBeforeUnloadEventHandler)}componentDidUpdate(e){(0,J.Z)(this.propsUpdateToActionsMap,e,this.props)}componentWillUnmount(){this._isMounted=!1;let{model:e}=this.props;e&&this.props.resetViewCam({isResetViewCamConfig:!0,isResetActiveApps:!0,shouldSendWatchTimeWithBeacon:!1}),(0,tb.OM)(this)}checkShowNonNudeShutter(){let{needVerifyAge:e,model:t,isNonNudeCategoryEnabled:a}=this.props;return(0,tu.tB)({needVerifyAge:e,isNonNudeCategoryEnabled:a,model:t})}renderSocket(){let{isLoggedIn:e,currentUserId:t,isUserFanClubActive:a,model:i,isAppBotsEnabled:s}=this.props,{viewServer:l}=this.state,n=i?[`userBanned:${i.id}`,`goalChanged:${i.id}`,`modelStatusChanged:${i.id}`,`broadcastSettingsChanged:${i.id}`,`tipMenuUpdated:${i.id}`,`topicChanged:${i.id}`,`userUpdated:${i.id}`,`interactiveToyStatusChanged:${i.id}`,`groupShow:${i.id}`,`deleteChatMessages:${i.id}`,`tipLeaderboardSettingsUpdated:${i.id}`,`tipMenuLanguageDetected:${i.id}`,...l,...a?[`fanClubUpdated:${i.id}`]:[],...s?[`modelAppUpdated:${i.id}`]:[]]:[],o=e?[`userBroadcastServerChanged:${t}`,`interactiveToyStatusChanged:${t}`,`userViewServerChanged:${t}`,`userViewServerChanged:${t}`]:[],c=i&&e?[`privateStarted:${i.id}`,`privateRecordingSaveConfirmation:${i.id}`,`privateStopped:${i.id}`,`privateUpgraded:${i.id}`,`spyChanged:${i.id}`,`knightChanged:${i.id}`,`userUnbanned:${i.id}`]:[];i&&c.push(`modelDiscountActivated:${i.id}`);let d=i&&e?[{subscriptionKey:`ratePrivate:${i.id}`,callback:this.ratePrivateEventHandler}]:[];return r.createElement(tE.Z,{events:["lotteryChanged",...n,...o,...c],eventsWithCallbacks:d})}renderControlsWrapper(){let{isCamAvailable:e,isPromoModel:t,model:a,shouldRenderPlayerOnBackground:i,isBlurVideoOnPrivate:s,isBackgroundVideoForAvpShutter:l}=this.props;return t||i&&!l||s?null:r.createElement(f.Z,{isCamAvailable:e,model:a})}renderViewCamContent(){let{shouldRenderPlayer:e,shouldRenderPlayerOnBackground:t,isBlurVideoOnPrivate:a}=this.props;return this.checkShowNonNudeShutter()?r.createElement(r.Fragment,null,e&&t&&this.renderPlayer(),this.renderNonNude()):e&&t||a?r.createElement(r.Fragment,null,this.renderPoster(),this.renderPlayer()):e?this.renderPlayer():this.renderPoster()}render(){let{isViewCamInfoVisible:e,model:t,shouldRenderPlayer:a,isWebRTCSupported:i,isVerticalStream:s,shouldRenderPlayerOnBackground:l,isBlurVideoOnPrivate:n}=this.props;return r.createElement(eN.Z,{isViewCamPoster:!a&&!!t||this.checkShowNonNudeShutter()||l||n,className:"view-cam",isVerticalStream:s},i&&r.createElement(S,null),t&&r.createElement(eE,{model:t}),t&&r.createElement(e_,{model:t}),t&&r.createElement(tk,null),r.createElement("div",{className:"wrapper",onClick:this.playerWrapperClickHandler},r.createElement("div",{className:(0,W.AK)("main",(0,tp.v)(this.props))},r.createElement("div",{className:(0,W.AK)("strut",eN.j.boundaryY)},r.createElement(tv.Z,null,this.renderViewCamContent())))),this.renderControlsWrapper(),r.createElement(V,{isVisible:e}),this.renderSocket())}constructor(e){super(e),(0,i._)(this,"isWatchingSuspended",!1),(0,i._)(this,"visibilityChangeCount",0),(0,i._)(this,"_isMounted",!1),(0,i._)(this,"preloadAndSetNextSnapshot",e=>{var t;let a=null===(t=this.props.model)||void 0===t?void 0:t.id;this.setState({lastSnapshotUrl:void 0},()=>{if(!e||!this._isMounted)return;let t=new Image;t.addEventListener("load",()=>{var t;a===(null===(t=this.props.model)||void 0===t?void 0:t.id)&&this._isMounted&&this.setState({lastSnapshotUrl:e})}),t.src=e})}),(0,i._)(this,"propsUpdateToActionsMap",[{update:(e,t)=>!!e.isSocketReady&&!t.isSocketReady,action:()=>{let{isSocketReady:e,isInPrivate:t,privateMode:a}=this.props;!e&&t&&(a?(tS.ZP.addSource(tS.OF.USER_SOCKET_NOT_WORKING),tC.Z.send(tS.OF.USER_SOCKET_NOT_WORKING),this.props.stopShow("socketNotReady")):this.props.cancelProposal("socketNotReady"),this.props.shadeLayout(!1))}},{update:(e,t)=>!(0,s.Z)(e.viewServers,t.viewServers)||e.playerType!==t.playerType,action:()=>this.setViewServer()},{update:aC,action:()=>{let{snapshotUrl:e}=this.props;e&&!this.checkShowNonNudeShutter()&&this.preloadAndSetNextSnapshot(e)}},{update:ab,action:()=>{let{model:e}=this.props;(null==e?void 0:e.isVr)&&this.props.beginVrModelWatching(e)}},{update:ag,action:()=>{this.props.updatePlayerWasInPlayedState(!1)}},{update:aS,action:()=>{let{isDocumentVisible:e,model:t}=this.props;this.isWatchingSuspended=!e,!this.isWatchingSuspended&&t&&this.props.beginModelWatching(t)}},{update:et.Kh,action:()=>{let{isDocumentVisible:e,model:t}=this.props;e&&t&&(this.props.beginModelWatching(t),this.isWatchingSuspended=!1)}},{update:["shouldShadeLayout"],action:()=>{let{shouldShadeLayout:e}=this.props;this.props.shadeLayout(e)}},{update:["shouldRenderPlayer"],action:()=>{let{shouldRenderPlayer:e}=this.props;e||(this.props.updatePlayerWasInPlayedState(!1),this.props.updateHLSStreamEndedState(!1))}},{update:["isDocumentVisible","shouldRenderPlayerOnBackground"],action:()=>{if(this.visibilityChangeCount++,this.props.shouldRenderPlayerOnBackground){this.props.changeVolume(0,!1);return}if(this.visibilityChangeCount<=1)return;let{isDocumentVisible:e}=this.props,t=I.BROWSER_CAPABILITIES.isMobile||I.BROWSER_CAPABILITIES.isTablet;if(t||this.props.isTicketShow){if(e){let e=tf.m.get(P.dAu.PLAYER_VOLUME),t="number"==typeof e?e:50;this.props.changeVolume(t,!1)}else this.props.changeVolume(0,!1)}}}]),(0,i._)(this,"onBeforeUnloadEventHandler",()=>{let{isInPrivate:e,isInSpyMode:t}=this.props;if(t||e){tS.ZP.addSource(tS.OF.USER_CLOSE_BROWSER_IN_PRIVATE);return}this.props.resetViewCam({isResetViewCamConfig:!1,isResetActiveApps:!1,shouldSendWatchTimeWithBeacon:!0})}),(0,i._)(this,"viewCamBlockKeyDownHandler",e=>{let{ctrlKey:t,keyCode:a}=e,{isCurrentUserModelOrStudio:i,isCamAvailable:s,isOwnShow:l,model:r,isNextModelAvailable:n,isPrevModelAvailable:o}=this.props,c=(null==r?void 0:r.status)===P.MODEL_STATUSES.STATUS_PRIVATE||(null==r?void 0:r.status)===P.MODEL_STATUSES.STATUS_VIRTUAL_PRIVATE,d=!l&&!(s&&c),m=a===I.KEY_CODES.sChar,u=a===I.KEY_CODES.comma,p=a===I.KEY_CODES.period;t&&((m||u||p)&&(e.preventDefault(),e.stopPropagation()),l||c||!m||i||this.startPurchaseTokensModalWizard(),u&&d&&o&&this.props.goToModel("prev"),p&&d&&n&&this.props.goToModel("next"))}),(0,i._)(this,"goToNextModel",()=>{this.props.goToModel("next")}),(0,i._)(this,"playerWrapperClickHandler",()=>{this.props.closeNotification()}),(0,i._)(this,"startPurchaseTokensModalWizard",()=>{let{model:e}=this.props;this.props.startWizard(I.MODAL_TYPES.SEND_TIP,{component:"SignUp",action:{backgroundImage:(null==e?void 0:e.avatarUrl)||void 0,type:"buyTokens",user:e},user:e})}),(0,i._)(this,"ratePrivateEventHandler",e=>{var t;let a=null===(t=this.props.model)||void 0===t?void 0:t.id;a&&this.props.initRatePrivateModal(e,a)}),(0,i._)(this,"getPosterImageUrl",()=>{let{model:e,isModelInGroupShow:t,isNonNudeWL:a}=this.props;if(!e||a)return;let{lastSnapshotUrl:i}=this.state,s=i||e.previewUrl;return t?s:e.previewUrl}),(0,i._)(this,"setViewServer",(0,l.Z)(()=>{let{viewServers:e,playerType:t}=this.props,a=[];t===h.PLAYER_TYPES.WEBRTC&&a.push(`viewServerChanged:${e.flashphoner}`),this.setState({viewServer:a})},1e3)),(0,i._)(this,"renderNavButtons",()=>r.createElement("div",{className:"view-cam-room-nav"},r.createElement(tg.Z,{id:"room_nav_next",type:"next-small",onClick:this.goToNextModel,pageNumber:0}))),(0,i._)(this,"renderViewStatus",()=>{let{model:e}=this.props;return r.createElement(to,{model:e||null})}),(0,i._)(this,"renderPoster",()=>{let{model:e,isNextModelAvailable:t,isNonNudeWL:a,shouldRenderPlayerOnBackground:i,isBlurVideoOnPrivate:s}=this.props,l=this.getPosterImageUrl();return r.createElement(av,{modelStatus:null==e?void 0:e.status,modelName:null==e?void 0:e.username,isNonNudeWL:a,posterImageUrl:l,isBackgroundVideo:i,shouldBeBlurred:i,isBlurVideoOnPrivate:s},t&&this.renderNavButtons(),this.renderViewStatus())}),(0,i._)(this,"renderShutter",()=>{let{model:e,isNonNudeWL:t}=this.props,a=this.getPosterImageUrl();return r.createElement(av,{modelStatus:null==e?void 0:e.status,modelName:null==e?void 0:e.name,isNonNudeWL:t,posterImageUrl:a},r.createElement(ap,null))}),(0,i._)(this,"renderNonNude",()=>{let{model:e,shouldRenderPlayer:t,shouldRenderPlayerOnBackground:a}=this.props;return r.createElement(b.u,{isViewcam:!0,model:e?(0,ey.T$)(e):e,modelData:e?(0,ef.tA)(e):void 0,isTranslucent:a&&t},r.createElement(C.R,{isViewcam:!0,isForceWhiteText:!0,triggerSource:Y.Dt.AVP_STREAM_SHUTTER,className:"view-cam__non-nude-shutter"}))}),(0,i._)(this,"onPlaying",()=>{this.props.updatePlayerWasInPlayedState(!0)}),(0,i._)(this,"renderPlayer",()=>{let{isPlayerShuttered:e,isTheatreModeActive:t,shouldRenderPlayerOnBackground:a}=this.props,{lastSnapshotUrl:i}=this.state;return e?this.renderShutter():r.createElement(au,{onPlaying:this.onPlaying,className:(0,W.AK)(a&&"view-cam_bg-player"),lastSnapshotUrl:t?void 0:i})}),this.state={lastSnapshotUrl:void 0,viewServer:[]}}}let ay=(0,e0.y)("isLayoutUpToL")((0,n.$j)((e,t)=>({aspectRatio:(0,ae.rr)(e),isVerticalStream:(0,ae.k_)(e),currentUserId:(0,en.rc)(e),isPlayerShuttered:!(0,eU.Wu)(e),isViewCamInfoVisible:!(0,tc._8)(e,t.isLayoutUpToL),isCamAvailable:(0,O._u)(e),isCurrentUserModelOrStudio:(0,eV.ly)(e),isDocumentVisible:(0,tT.PF)(e),isAppBotsEnabled:(0,p.N$r)(e).appBots,isInSpyMode:(0,d.Hn)(e),isInPrivate:(0,d.IW)(e),isLoggedIn:(0,en.Cg)(e),isNonNudeWL:(0,tP.Km)(e),isMyStudioModel:(0,tm.EP)(e),isNextModelAvailable:(0,td.xr)(e),isModelInGroupShow:(0,d.Vf)(e),isOwnShow:(0,O.$u)(e),isPrevModelAvailable:(0,td.N5)(e),isPromoModel:(0,d.P1)(e),needVerifyAge:(0,p.m5e)(e),isSocketReady:(0,eU.F7)(e),model:(0,O.T2)(e)||t.model,playerType:(0,v.Aq)(e),privateMode:(0,d.Zu)(e),shouldShadeLayout:(0,d.TE)(e),shouldRenderPlayer:(0,d.AO)(e),viewServers:(0,ty.A7)(e),isUserFanClubActive:(0,d._I)(e),isWebRTCSupported:(0,v.XI)(e)(h.PLAYER_TYPES.WEBRTC),isTheatreModeActive:(0,B.z)(e),isNonNudeCategoryEnabled:(0,tw.Sk)(e),shouldRenderPlayerOnBackground:(0,d.qe)(e),isBackgroundVideoForAvpShutter:(0,d.tS)(e),isTicketShow:(0,d.Tn)(e),isBlurVideoOnPrivate:(0,v.$C)(e)}),aE)(af))},64544:(e,t,a)=>{a.d(t,{Z:()=>eu});var i,s=a(18775),l=a(27378),r=a(48204),n=a(10269),o=a(29502),c=a(53229),d=a(51932),m=a(91805),u=a(84807),p=a(24964),h=a(85183),v=a(29409),E=a(77962),g=a(40261),S=a(58024),b=a(41706),C=a(17763),f=a(79690),y=a(95366),T=a(15734),P=a(38486),w=a(23359),_=a(38924),N=a(44589),A=a(80905),k=a(73545),I=a(68798),M=a(18375),L=a(77382),R=a(83550),U=a(80936),Z=a(99382),O=a(57174),W=a(56851),B=a(61171),F=a(29413),D=a(3478),V=a(85353),x=a(2149),$=a(59593),H=a(96552),K=a(99748),G=a(56509),z=a(98846),j=a(37112),Y=a(63256),q=a(27251),Q=a(62203),J=a(80092),X=a(47742),ee=a(79455),et=a(99126),ea=a(93223),ei=a(24449),es=a(74012),el=a(65103),er=a(56391),en=a(66483),eo=a(84546);let ec=(0,z.n)({resolved:{},chunkName:()=>"QuickTipButton",isReady(e){let t=this.resolve(e);return!0===this.resolved[t]&&!!a.m[t]},importAsync:()=>a.e(4762).then(a.bind(a,56289)),requireAsync(e){let t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then(e=>(this.resolved[t]=!0,e))},requireSync(e){let t=this.resolve(e);return a(t)},resolve:()=>56289},{fallback:void 0,ssr:!1});class ed extends(i=l.Component){renderControls(){let{model:e,discounts:t,controlsState:a,viewCamFanClubTier:i,canOpenPrivateMessages:s,isLayoutMoreThanL:r,isSendTipFromSpyModeEnabled:n,isRenameStartPrivateButtonEnabled:o,fanClubPrivateDiscounts:c}=this.props;if(!e)return l.createElement("span",null,"\xa0");switch(a){case"waitingForModelAnswer":return l.createElement("div",{className:"proposal-controls-block"},l.createElement("span",{className:"proposal"},l.createElement(V.Z,{size:24}),(0,G.dW)("viewCam.waitingForModelAnswer")),l.createElement("div",{className:"proposal-cancel",onClick:this.cancelProposalClickHandler},l.createElement(F.Z,{img:"close-5"})));case"startPrivateOrSendTip":{let a=e.doPrivate||e.doP2p,{actual:s,discounted:r,type:n}=(0,I.oB)(e,t,c);return l.createElement(l.Fragment,null,a&&l.createElement("span",{className:"view-cam-controls__btn-wrapper"},l.createElement(Z.ZP,{size:"large",style:"gold-outline-ds",onClick:this.startPrivateClickHandler,className:(0,K.AK)("view-cam-controls-btn view-cam-controls__private-btn",{"view-cam-controls__private-btn--with-discount":!!n})},l.createElement(eo.t,{textId:o?"button.privateShow":"button.startPrivate",shortTextId:"button.startPrivateShort"}),this.renderPrivatePrice(s,r)),n&&l.createElement(x.V,{tier:i,type:n})),this.renderQuickTipButton(),l.createElement("span",{className:"view-cam-controls__btn-wrapper"},this.renderSendTipButton()))}case"joinGroupShowOrSendTip":return l.createElement(l.Fragment,null,l.createElement(h.Z,{className:"view-cam-controls-btn"}),this.renderQuickTipButton(),this.renderSendTipButton());case"quitGroupShowOrTip":return l.createElement(l.Fragment,null,l.createElement(Z.ZP,{size:"large",style:"default-outline",className:"view-cam-controls-btn",onClick:this.handleQuitShowButtonClick},(0,G.dW)("button.quit")),this.renderQuickTipButton(),this.renderSendTipButton());case"sendPrivateTip":return l.createElement(l.Fragment,null,this.renderQuickTipButton(),this.renderSendTipButton({onClick:this.sendPrivateTipClickHandler,isPrivate:!0}));case"endSpy":return l.createElement(l.Fragment,null,l.createElement(O.ZP,{size:"large",style:"end-broadcasting",onClick:this.stopSpyClickHandler,className:"view-cam-controls-btn view-cam-controls__stop-spy"},l.createElement(eo.t,{shortTextId:"button.endSpyShort",textId:"button.endSpy"})),n&&this.renderQuickTipButton(),n&&l.createElement(g.Z,{onClick:()=>{s&&r?(this.props.modelChatSelectTab(y.MODEL_CHAT_TABS.PRIVATE),this.props.setIsPrivateActionListVisible(!0)):this.props.emitButtonEvent($.FO.VIEWCAM_SEND_PRIVATE_TIP,{source:y.buX.TIP_MENU,shouldScrollToChat:!0,isInBackground:!0,modelId:e.id,additionalParam:{amplitudeEventProps:{prodSubtype:y.buX.TIP_MENU,prodType:y.Hrc.TIP}}})}}));case"sendOfflineTip":{let t=(t,a)=>l.createElement(ea.Z,{className:`${t} view-cam-controls-btn view-cam-controls__pm-btn`,triggerSource:$.FO.VIEWCAM_PRIVATE_MESSAGE,shouldRenderIcon:!a,customContent:a,shouldOpen:"privateTab",user:e});return l.createElement(l.Fragment,null,t("btn-default-outline media-up-to-xs-hidden"),t("media-after-s-hidden send-pm-mobile",l.createElement(F.Z,{img:"envelope-bubble"})),l.createElement(g.Z,{onClick:this.sendOfflineTipClickHandler}))}case"sendOfflinePrivateTip":return l.createElement(g.Z,{onClick:this.sendOfflineTipClickHandler});default:return l.createElement("span",null,"\xa0")}}renderGroupShowMobileDropdown(){let{isLayoutUpToS:e,controlsState:t,isXhlOrMirror:a}=this.props;return e&&"joinGroupShowOrSendTip"===t?l.createElement(B.Z,{className:(0,K.AK)("group-show-dropdown-mobile",{"group-show-dropdown-xhl":a}),stateValueGetter:q.X7,position:"bottom",initiatorRef:{current:null}},l.createElement(p.Z,null)):null}renderFavoriteToggle({showAnnounced:e,isSpying:t}){let{isCurrentUserModelOrStudio:a,isInCam2Cam:i,isInPrivateMode:s,isLoggedIn:r,model:n}=this.props;return!n||i||s&&!t?null:l.createElement(C.Z,{showAnnounced:e,canAddToFavorite:!r||!a})}renderUpgradePrivate(){let{isInCam2Cam:e,isInPrivateMode:t,isInSpyMode:a,isCam2camEnabled:i}=this.props;return e||a||!t||!i?null:l.createElement(W.Y,{className:"control view-cam-controls-btn view-cam-controls__upgrade-private"})}renderStopPrivate(){let{isInCam2Cam:e,isInPrivateMode:t,isInSpyMode:a}=this.props;return a?null:e||t?l.createElement(Z.ZP,{className:"control view-cam-controls-btn view-cam-controls__end-cam2cam",onClick:e?this.stopCam2CamClickHandler:this.stopPrivateClickHandler,style:"end-broadcasting"},l.createElement("div",{className:"player-toolbox-icon-item view-cam-controls-btn__stop-spy"},l.createElement(F.Z,{img:"stop",size:14})),l.createElement(eo.t,{className:"view-cam-controls-btn__stop-spy-text",shortTextId:"button.endShort",textId:"button.endPrivate"})):null}renderToolboxControl(){let{isInCam2Cam:e}=this.props;return e?l.createElement(E.Z,null):null}render(){let{controlsState:e,isCamAvailable:t,isCurrentUserModelOrStudio:a,isInSpyMode:i,isMyStudioModel:s,model:r,isModelInGroupShow:n,isCurrentUserInGroupShow:o,isInPrivateMode:c,isInCam2Cam:d,isInFavorites:m,favoritedCount:u,isPrivateToSpyModeTransitionEnabled:p}=this.props,h=s&&(!t||i)&&r.status===y.MODEL_STATUSES.STATUS_PRIVATE,v=!a||h,E="joinGroupShowOrSendTip"===e,g="endSpy"===e;return l.createElement(b.I,{isInFavoritesFromServer:m,favoritedCountFromServer:u,favoritesClickHandler:this.favoritesClickHandler},l.createElement("div",{className:(0,K.AK)("view-cam-controls","with-new-send-tip",{"media-up-to-s-hidden":n&&!o})},l.createElement("div",{className:(0,K.AK)("view-cam-controls-wrapper",{"view-cam-controls-wrapper--private":c,"view-cam-controls-wrapper--cam2cam":d,"view-cam-controls-wrapper--show":E,"view-cam-controls-wrapper--controls-start-spy":"startSpy"===e})},this.renderFavoriteToggle({showAnnounced:E,isSpying:g}),v&&l.createElement(l.Fragment,null,l.createElement("div",{className:"view-cam-controls-wrapper__left"},this.renderStopPrivate()),l.createElement("div",{className:"view-cam-controls-wrapper__center"},this.renderUpgradePrivate(),this.renderToolboxControl()),l.createElement("div",{className:"view-cam-controls-wrapper__right"},l.createElement("div",{className:(0,K.AK)("view-cam-buttons-wrapper",{"view-cam-buttons-wrapper--private-or-cam2cam":c||d||g&&p,"view-cam-buttons-wrapper--offline":"sendOfflineTip"===e})},this.renderControls()),r&&l.createElement(f.ZP,{model:r})))),v&&this.renderGroupShowMobileDropdown()),v&&l.createElement(S.Z,null))}constructor(e){super(e),(0,s._)(this,"showConfirmationModalCounter",void 0),(0,s._)(this,"favoritesClickHandler",e=>{null==e||e.preventDefault(),null==e||e.stopPropagation();let{model:t,isInFavorites:a}=this.props;a||this.props.enableUserFeedIfModelHasPosts(t.id),this.props.toggleFavorite(t)}),(0,s._)(this,"startPrivateClickHandler",()=>{let{model:e}=this.props;this.props.emitButtonEvent($.FO.VIEWCAM_START_PRIVATE,{modelId:e.id})}),(0,s._)(this,"stopPrivateClickHandler",()=>{let{model:e}=this.props;j.Z.send(T.L.STOP_PRIVATE),this.props.emitButtonEvent($.FO.VIEWCAM_STOP_PRIVATE,{modelId:e.id})}),(0,s._)(this,"stopCam2CamClickHandler",()=>{let{model:e}=this.props;j.Z.send(T.L.STOP_CAM_2_CAM),this.props.emitButtonEvent($.FO.VIEWCAM_STOP_P2P,{modelId:e.id})}),(0,s._)(this,"stopSpyClickHandler",()=>{let{model:e}=this.props;j.Z.send(T.L.STOP_SPY),this.props.emitButtonEvent($.FO.VIEWCAM_STOP_SPY,{modelId:e.id})}),(0,s._)(this,"cancelProposalClickHandler",()=>{this.props.cancelProposal("buttonClickHandler")}),(0,s._)(this,"sendTipNewClickHandler",()=>{let{model:e,isInPrivateMode:t,isInCam2Cam:a,isActionMenuVisible:i}=this.props;if(!i){let i=t||a?$.FO.VIEWCAM_SEND_PRIVATE_TIP:$.FO.VIEWCAM_SEND_ONLINE_TIP;this.props.emitButtonEvent(i,{modelId:null==e?void 0:e.id,shouldAvoidTipModal:!0})}this.props.emitButtonEvent($.FO.TIP_MENU_OPEN),this.props.toggleActionMenu(void 0,void 0,{user:e})}),(0,s._)(this,"sendPrivateTipClickHandler",()=>{let{model:e}=this.props;this.props.toggleActionMenu(y.pow.PRIVATE_MENU,void 0,{user:e,isPrivateTip:!0})}),(0,s._)(this,"sendOfflineTipClickHandler",()=>{let{model:e}=this.props;this.props.emitButtonEvent($.FO.VIEWCAM_SEND_OFFLINE_TIP,{modelId:e.id,shouldScrollToChat:!0,additionalParam:{buyTokensSource:ee.t.ViewCamOffline,isPrivateTip:!0}})}),(0,s._)(this,"renderSendTipButton",e=>l.createElement(P.Z,{onClick:this.sendTipNewClickHandler,isActive:this.props.isActionMenuVisible,isActionMenuAvailable:this.props.hasActionMenuItems,className:"send-tip-btn",...e})),(0,s._)(this,"renderQuickTipButton",()=>{let{quickTipAmount:e,isLoggedIn:t,isInSpyMode:a,isLayoutMoreThanM:i,model:s,isCurrentUserUltimate:r,isShortcutForQuickTippingEnabled:n}=this.props,o=[y.MODEL_STATUSES.STATUS_OFF,y.MODEL_STATUSES.STATUS_IDLE];return!(!e||!t||a&&!r||!i||o.includes(s.status))&&n?l.createElement(ec,null):null}),(0,s._)(this,"renderPrivatePrice",(e,t)=>l.createElement("span",{className:"view-cam-controls__private-btn-price"},e&&l.createElement(D.Z,{className:"view-cam-controls__private-btn-actual-price"},e),"\xa0",l.createElement("span",{className:"btn-gold-outline-ds__accent-text"},(0,G.dW)("tokensShort",{amount:t})))),(0,s._)(this,"handleQuitShowButtonClick",()=>{if(this.props.isPerMinuteShow)this.props.quitGroupShow({type:"groupShow"});else{var e,t;null!==(t=(e=this.showConfirmationModalCounter).current)&&void 0!==t||(e.current=0),this.showConfirmationModalCounter.current++,H.P4.show(v.r,{exitTicketShowConfirmationModalShownCount:this.showConfirmationModalCounter.current,onLeave:this.props.quitGroupShow})}}),this.showConfirmationModalCounter=(0,l.createRef)()}}(0,s._)(ed,"defaultProps",{model:null});let em={cancelProposal:m.sA,emitButtonEvent:R.d2,quitGroupShow:m.Mx,startWizard:et.R7,toggleFavorite:c.ZN,enableUserFeedIfModelHasPosts:ei.at,toggleActionMenu:n.Wp,modelChatSelectTab:d.aK,setIsPrivateActionListVisible:o.Jg,setSendTipData:u.pD,updateLandingParam:M.Wv,showModal:L.K4},eu=(0,U.y)("isLayoutUpToS","isLayoutMoreThanL","isLayoutMoreThanM")((0,r.$j)((e,t)=>{let{model:a}=t,i=(0,el.pC)(e),s=!!a&&(0,er.pF)(e,a.id);return{controlsState:(0,k.R3)(e),currentUser:(0,es.ts)(e),favoritedCount:(0,k.D)(e),isCurrentUserModelOrStudio:(0,en.ly)(e),isInFavorites:!!a&&(0,N.D9)(e,a.id),isInSpyMode:(0,k.Hn)(e),isInPrivateMode:(0,k.wp)(e),isModelInGroupShow:(0,k.Vf)(e),isCurrentUserInGroupShow:(0,k._A)(e),isInCam2Cam:(0,k.UP)(e),isPerMinuteShow:!(0,k.Tn)(e),isXhlOrMirror:(0,Q.cv)(e),isLoggedIn:(0,es.Cg)(e),isMyStudioModel:(0,A.EP)(e),isActionMenuVisible:(0,_.AI)(e),hasActionMenuItems:(0,w.KN)(e),isCam2camEnabled:(0,k.RR)(e),canOpenPrivateMessages:i||s,isSendTipFromSpyModeEnabled:(0,Y.MLn)(e),discounts:(0,X.Pn)(e),quickTipAmount:(0,Y.Ppq)(e),isCurrentUserUltimate:(0,en.Kr)(e),isRenameStartPrivateButtonEnabled:(0,J.w4)(e),isShortcutForQuickTippingEnabled:(0,J.IY)(e),landingParams:(0,Y.TK9)(e),isPrivateToSpyModeTransitionEnabled:(0,Y.zP$)(e),fanClubPrivateDiscounts:(0,k.ti)(e),viewCamFanClubTier:(0,k.oh)(e)}},em)(ed))},17763:(e,t,a)=>{a.d(t,{Z:()=>W});var i=a(27378),s=a(61601),l=a(64553),r=a(29413),n=a(99748);let o=()=>{let e=(0,s.KH)(),t=(0,s.bh)(),a="closed"===e;return i.createElement(l.Z,{className:(0,n.AK)("subscriptions-control-toggle"),onClick:()=>{t(a?"opened":"closed")}},i.createElement(r.Z,{img:"chevron-right",className:(0,n.AK)("subscriptions-control-toggle__icon",{closed:a})}))};var c=a(10269),d=a(52913),m=a(76919),u=a(28656);let p=(e,t)=>{(0,u.L)(()=>{let a=null==e?void 0:e.current;if(!t||!a)return;let i=Object.keys(t),s=(0,d.Z)(getComputedStyle(a),i);a.style.transition="unset",Object.assign(a.style,t);let l=new Set(i);setTimeout(()=>{a.addEventListener("transitionend",e=>{if(l.delete((0,m.p)(e.propertyName)),!l.size){let e=i.reduce((e,t)=>(e[t]="",e),{});Object.assign(a.style,e)}}),a.style.transition="",Object.assign(a.style,s)})},[])};var h=a(12710);let v=({favoritedCount:e,className:t})=>i.createElement("div",{className:(0,n.AK)("favorited-count",t)},(0,h.uf)(e,1));var E=a(38924),g=a(57174),S=a(3034),b=a(56509),C=a(94380),f=a(95654),y=a(36886),T=a(50423),P=a(63256),w=a(62203),_=a(80092);let N=e=>{let t=(0,f.C)(_.TF),a=(0,y.t)(),{isLayoutMoreThanL:i,isLayoutUpToDesktop:s}=(0,T.iP)("isLayoutMoreThanL","isLayoutUpToDesktop");return t&&a&&(e?!s:i)},A=({favoritedCount:e,favoritesClickHandler:t,showAnnounced:a,canAddToFavorite:o,innerRef:d,stylesToAnimate:m})=>{let u=(0,f.C)(E.AI),y=(0,f.C)(w.LK),_=(0,C.T)(),A=N(a),{isLayoutUpToS:k,isLayoutUpToDesktop:I}=(0,T.iP)("isLayoutUpToS","isLayoutUpToDesktop"),M=(0,s.bh)(),[L,R]=(0,i.useState)(!1),U=(0,f.C)(P._ol),Z=(0,i.useRef)(null);p(d,m);let O=()=>{if(R(!0),u&&_((0,c.fO)()),k){t(),M("openedFirstTime");return}setTimeout(()=>{t()},150)};return i.createElement("div",{className:(0,n.AK)("add-to-favorite-control",{"add-to-favorite-control--new-appearance":A,animated:L})},A?i.createElement(g.ZP,{className:"add-to-favorite-control__toggle-v2",disabled:!o,onClick:O,innerRef:d,size:"large"},y?i.createElement(r.Z,{className:"add-to-favorite-control__favorite-icon",img:"heart-2"}):i.createElement("span",{className:(0,n.AK)("add-to-favorite-control__favorite-icon","add-to-favorite-control__heart-full")}),(0,b.dW)("button.addToFavorites"),i.createElement("span",{className:"add-to-favorite-control__delimiter"}),i.createElement("span",{className:"add-to-favorite-control__counter"},(0,h.uf)(e,1))):i.createElement(i.Fragment,null,!I&&U&&i.createElement(S.Z,{placement:"top-start",targetRef:Z,gap:22,isForcePlacement:!0,className:"add-to-favorite-control__tooltip",innerClassName:"add-to-favorite-control__tooltip-inner"},(0,b.dW)("button.addToFavorites")),i.createElement(l.Z,{"aria-label":(0,b.dW)("button.addToFavorites"),className:"add-to-favorite-control__toggle",disabled:!o,onClick:O,ref:Z},i.createElement(r.Z,{className:"add-to-favorite-control__favorite-icon add-to-favorite-control__favorite-icon--mobile",img:"heart-fill"}),i.createElement(r.Z,{className:"add-to-favorite-control__favorite-icon  add-to-favorite-control__favorite-icon--desktop",img:L?"heart-fill":"heart-2"})),i.createElement(v,{favoritedCount:e,className:"add-to-favorite-control__favorited-count"})))};var k=a(1961),I=a(56802);let M=({onClick:e,isAnimated:t,className:a})=>{let[s,r]=(0,i.useState)(!1);return i.createElement(l.Z,{className:(0,n.AK)("broken-heart-button",{animated:t,hoverable:s,[a]:!!a}),onClick:e,onMouseEnter:e=>{e.relatedTarget!==window&&r(!0)}},i.createElement("div",{className:"broken-heart-button__left-icon"}),i.createElement("div",{className:"broken-heart-button__right-icon"}))};var L=a(69353),R=a(33914),U=a(46675);let Z=({favoritedCount:e,hasJustBeenAddedToFavorite:t,onFavoriteButtonClick:a,setHasJustBeenAddedToFavorite:s,stylesToAnimate:o,innerRef:c})=>{let d=(0,C.T)(),m=(0,f.C)(_.TF),u=(0,f.C)(R.T2),v=(0,f.C)(e=>(0,L.LW)(e,null==u?void 0:u.id)),[E,g]=(0,i.useState)(!1),[S,b]=(0,i.useState)(!1);p(c,o),(0,i.useEffect)(()=>{t&&g(!0)},[t]);let y=()=>g(!1),T=(0,U.t)(y);return i.createElement("div",{className:(0,n.AK)("subscriptions-control-button-group",{animated:S&&!m}),ref:c},i.createElement(M,{onClick:()=>{b(!0),setTimeout(()=>{a()},200)},isAnimated:S}),i.createElement("span",{className:"subscriptions-control-button-group__counter"},(0,h.uf)(e,1)),i.createElement("div",{className:"subscriptions-control-button-group__divider"}),i.createElement(l.Z,{onClick:e=>{T(e),s(!1);let a=t&&E;a||E&&!v||g(e=>!e),v||d((0,k.oj)({model:u,buttonLocation:"PushNotificationPopupOnAddedToFavs"}))},className:(0,n.AK)("subscriptions-control-button-group__notification-button",{active:v})},i.createElement(r.Z,{img:v?"notifications-2":"notifications-off-2",className:"subscriptions-control-button-group__notification-icon"})),u&&i.createElement(I.R,{onClick:T,onClose:y,buttonLocation:"PushNotificationPopupOnAddedToFavs",model:u,isVisible:E,absolutePlacement:"top",shouldMethodsListBeExpanded:E&&!t,shouldRenderWithoutPortal:!0}))},O=function(){return i.createElement("div",{className:"broken-heart-icons-preloader"})},W=({showAnnounced:e,canAddToFavorite:t})=>{let a=(0,s.KH)(),l=(0,i.useRef)(null),r=(0,i.useRef)(null),[n,c]=(0,i.useState)(!1),[d,m]=(0,i.useState)(),u=(0,s.rr)(),p=(0,s.GS)(),h=(0,s.Ul)();return i.createElement("div",{className:"favorite-control"},i.createElement("div",{className:"favorite-control__mobile"},p&&t&&"hidden"!==a&&i.createElement(o,null)),i.createElement("div",{className:"favorite-control__desktop"},p&&t&&i.createElement(Z,{innerRef:l,stylesToAnimate:d,onFavoriteButtonClick:()=>{if(l.current){let e=getComputedStyle(l.current);m({backgroundColor:e.backgroundColor,width:e.width})}u()},favoritedCount:h,hasJustBeenAddedToFavorite:n,setHasJustBeenAddedToFavorite:c})),(!p||!t)&&i.createElement(A,{stylesToAnimate:d,canAddToFavorite:t,favoritedCount:h,favoritesClickHandler:()=>{if(r.current){let e=getComputedStyle(r.current);m({backgroundColor:e.backgroundColor,width:e.width})}c(!0),u()},showAnnounced:e,innerRef:r}),i.createElement(O,null))}},79690:(e,t,a)=>{a.d(t,{ZP:()=>Z});var i=a(18775),s=a(27378),l=a(48204),r=a(65631),n=a(95366),o=a(73545),c=a(77382),d=a(83550),m=a(80936),u=a(99382),p=a(30486),h=a(29413),v=a(85353),E=a(91090),g=a(59593),S=a(78983),b=a(99748),C=a(56509),f=a(12710),y=a(64696),T=a(62203),P=a(45216),w=a(23766),_=a(60765),N=a(79455),A=a(65103);let k={ADD:"Add",PROCESSING:"Processing",DECLINED:"Declined",SUCCESS:"Success",BUY:"Buy"},I=({isOwnShow:e,model:t={},groupShowMode:a})=>{var i,s,l;if(!t)return 0;let r=t.status;return r===n.hBS.MODE_PRIVATE||r===n.hBS.MODE_VIRTUAL_PRIVATE?null!==(i=e?t.privateRate:t.spyRate)&&void 0!==i?i:0:r===n.hBS.MODE_P2P||r===n.hBS.MODE_P2P_AUDIO?null!==(s=t.p2pRate)&&void 0!==s?s:0:r===n.hBS.MODE_GROUP_SHOW&&"perMinute"===a&&null!==(l=t.groupRate)&&void 0!==l?l:0},M=(e,t)=>{if(!t)return null;let[a,i="00"]=(e/t).toString().split("."),s=parseInt(a,10),l=Math.floor(60*parseFloat(`0.${i}`)).toString();return`0${s}:${1===l.length?"0":""}${l}`},L=({phase:e})=>[k.BUY,k.ADD].includes(e);class R extends s.Component{componentWillUnmount(){this.hide()}componentDidUpdate(e){(0,y.Z)(this.propsUpdateToActionsMap,e,this.props)}componentDidMount(){(0,y.Z)(this.propsUpdateToActionsMap,{},this.props)}updatePanelState({timeLeft:e,isVisible:t,isAvailable:a}){if(a&&!t){this.show(e);return}!a&&t&&L(this.state)&&this.hide()}renderOneClickAdd(e){let{timeLeft:t}=this.state,{isMobile:a,isLightTheme:i}=this.props,l=a?"mobile":"desktop",r=(0,f.W3)(e.currencySum,e.currencyCode);return s.createElement(s.Fragment,null,s.createElement("div",{className:"one-click-recharge-layer-left"},s.createElement(h.Z,{className:"one-click-recharge-icon",img:i?"tokens-lightning-black":"tokens-lightning"}),s.createElement("div",null,s.createElement("div",{className:"one-click-recharge-title"},s.createElement(p.Z,{elements:{highlighted:s.createElement("span",{className:"highlighted-brand"}),hiddenForXs:s.createElement("span",{className:"media-up-to-xs-hidden"}),visibleForXs:s.createElement("span",{className:"media-after-xs-hidden"})},parameters:{time:null!=t?t:""},messageId:`oneClickRecharge.addTokens.${l}.title`})),s.createElement("div",{className:"one-click-recharge-description"},(0,C.dW)(`oneClickRecharge.addTokens.${l}.description`)))),s.createElement("div",{className:"one-click-recharge-layer-right"},s.createElement("div",null,s.createElement(u.ZP,{style:"apply-alter2",onClick:this.addTokensClickHandler},s.createElement(p.Z,{elements:{pale:s.createElement("span",{className:"highlighted-pale"})},parameters:{tk_amount:e.tokensSum,currency_amount:r},messageId:`oneClickRecharge.addTokens.${l}.button`})),!a&&s.createElement("div",{className:"one-click-recharge-alternative-action",onClick:this.buyTokensClickHandler},(0,C.dW)("oneClickRecharge.addTokens.common.buyAnotherAmount"))),s.createElement(u.ZP,{className:"one-click-recharge-close-btn",onClick:this.smoothHidingWithPhaseCheck},s.createElement(h.Z,{img:"close-3"}))))}renderOneClickProcessing(){return s.createElement(s.Fragment,null,s.createElement("div",{className:"one-click-recharge-layer-left"},s.createElement(v.Z,{className:"one-click-recharge-loader",loaderType:"sector-circle",size:30,isInline:!0}),s.createElement("div",{className:"one-click-recharge-title"},(0,C.dW)("oneClickRecharge.processing.title"))),s.createElement("div",{className:"one-click-recharge-layer-right"},s.createElement(u.ZP,{className:"one-click-recharge-close-btn",onClick:this.smoothHidingWithPhaseCheck},s.createElement(h.Z,{img:"close-3"}))))}renderOneClickDeclined(){let{isMobile:e}=this.props;return s.createElement(s.Fragment,null,s.createElement("div",{className:"one-click-recharge-layer-left"},s.createElement(h.Z,{className:"one-click-recharge-icon",img:"tokens-error"}),s.createElement("div",{className:"one-click-recharge-title"},(0,C.dW)("oneClickRecharge.declined.common.title"))),s.createElement("div",{className:"one-click-recharge-layer-right"},s.createElement(u.ZP,{onClick:this.buyTokensClickHandler},(0,C.dW)(`oneClickRecharge.declined.${e?"mobile":"desktop"}.button`)),s.createElement(u.ZP,{className:"one-click-recharge-close-btn",onClick:this.smoothHidingWithPhaseCheck},s.createElement(h.Z,{img:"close-3"}))))}renderOneClickSuccess(){let{lastRefillTokensSum:e}=this.props;return s.createElement(s.Fragment,null,s.createElement("div",{className:"one-click-recharge-layer-left"},s.createElement(h.Z,{className:"one-click-recharge-icon",img:"tokens-check"}),s.createElement("div",{className:"one-click-recharge-title"},s.createElement(p.Z,{elements:{highlighted:s.createElement("span",{className:"highlighted-green"}),br:s.createElement("br",null)},parameters:{tokens:e},messageId:"oneClickRecharge.success.title"}))),s.createElement("div",{className:"one-click-recharge-layer-right"},s.createElement(u.ZP,{className:"one-click-recharge-close-btn",onClick:this.smoothHidingWithPhaseCheck},s.createElement(h.Z,{img:"close-3"}))))}renderOneClickBuy(){let{timeLeft:e}=this.state,{isMobile:t,isLightTheme:a}=this.props,i=t?"mobile":"desktop";return s.createElement(s.Fragment,null,s.createElement("div",{className:"one-click-recharge-layer-left"},s.createElement(h.Z,{className:"one-click-recharge-icon",img:a?"tokens-plus-red":"tokens-plus-orange"}),s.createElement("div",null,s.createElement("div",{className:"one-click-recharge-title"},s.createElement(p.Z,{elements:{highlighted:s.createElement("span",{className:"highlighted-brand"})},parameters:{time:null!=e?e:""},messageId:`oneClickRecharge.buyTokens.${i}.title`})),s.createElement("div",{className:"one-click-recharge-description"},(0,C.dW)(`oneClickRecharge.buyTokens.${i}.description`)))),s.createElement("div",{className:"one-click-recharge-layer-right"},s.createElement(u.ZP,{style:"apply-alter2",onClick:this.buyTokensClickHandler},(0,C.dW)(`oneClickRecharge.buyTokens.${i}.button`)),s.createElement(u.ZP,{className:"one-click-recharge-close-btn",onClick:this.smoothHidingWithPhaseCheck},s.createElement(h.Z,{img:"close-3"}))))}renderClickPhase(){switch(this.state.phase){case k.BUY:return this.renderOneClickBuy();case k.ADD:{let{refillPackage:e}=this.props;if(e)return this.renderOneClickAdd(e);return this.renderOneClickBuy()}case k.DECLINED:return this.renderOneClickDeclined();case k.SUCCESS:return this.renderOneClickSuccess();case k.PROCESSING:return this.renderOneClickProcessing();default:return null}}render(){let{isDisappearing:e,isHiddenByUser:t,phase:a}=this.state,{isAvailable:i,isVisible:l}=this.props,n=L(this.state);return!i&&n||!l&&n||t||!a?null:s.createElement(r.CSSTransition,{classNames:"one-click-recharge-wrapper",in:!e,enter:!1,timeout:1e3,onExited:()=>{this.setState({isDisappearing:!1})}},s.createElement("div",{className:(0,b.AK)("one-click-recharge-wrapper",{"one-click-recharge-wrapper-processing":a===k.PROCESSING})},this.renderClickPhase()))}constructor(e){super(e),(0,i._)(this,"timeoutId",void 0),(0,i._)(this,"propsUpdateToActionsMap",[{update:["isRefillAvailable"],action:()=>{let{isRefillAvailable:e}=this.props;this.setState(t=>{let{phase:a}=t;return!a||L(t)?{...t,phase:k[e?"ADD":"BUY"]}:t})}},{update:["hasPurchaseFailed","purchaseSucceededToken"],action:()=>{let{hasPurchaseFailed:e}=this.props;this.state.phase===k.PROCESSING&&(this.setState({phase:k[e?"DECLINED":"SUCCESS"]}),this.props.resetPurchase(),setTimeout(this.smoothHidingWithoutPhaseCheck,1e4))}},{update:["isVisible","isAvailable"],action:()=>this.updatePanelState(this.props)}]),(0,i._)(this,"updateCountDown",()=>{this.setState(e=>{var t;let a=(null!==(t=e.timeLeft)&&void 0!==t?t:"")>"00:00"?(0,S.qp)(e.timeLeft,1):e.timeLeft;return{...e,timeLeft:a}},()=>{clearTimeout(this.timeoutId),this.timeoutId=setTimeout(this.updateCountDown,1e3)})}),(0,i._)(this,"smoothHidingBase",e=>{this.setState({isDisappearing:!0});let t=L(this.state)&&e;setTimeout(()=>{t&&this.setState({isHiddenByUser:!0}),this.hide()},1e3)}),(0,i._)(this,"smoothHidingWithoutPhaseCheck",()=>{this.smoothHidingBase(!1)}),(0,i._)(this,"smoothHidingWithPhaseCheck",()=>{this.smoothHidingBase(!0)}),(0,i._)(this,"show",e=>{this.props.emitUiEvent(g.Q7.ONE_CLICK_RECHARGE_PANEL_TOGGLED,{value:!0}),this.setState({timeLeft:e},()=>{this.updateCountDown()})}),(0,i._)(this,"hide",()=>{let{isRefillAvailable:e}=this.props;this.props.emitUiEvent(g.Q7.ONE_CLICK_RECHARGE_PANEL_TOGGLED,{value:!1}),this.setState({phase:k[e?"ADD":"BUY"]})}),(0,i._)(this,"buyTokensClickHandler",()=>{this.props.showPurchaseModal({triggerSource:N.t.RefillBuyOtherAmount})}),(0,i._)(this,"addTokensClickHandler",()=>{let{model:e}=this.props;this.props.emitButtonEvent(g.FO.PRIVATE_RECHARGE_ONE_CLICK,{modelId:e.id,refillPackage:this.props.refillPackage,source:N.t.TipFromPrivate,tipAmount:void 0,makeRefill:!0,purchaseFrom:E.Lk.REFILL_PRIVATE_SHOW_PROLONG}),this.setState({phase:k.PROCESSING})}),this.state={isDisappearing:!1,isHiddenByUser:!1,phase:null,timeLeft:null}}}let U={emitButtonEvent:d.d2,emitUiEvent:d.gz,resetPurchase:_.hd,showPurchaseModal:c.U1},Z=(0,m.y)("isLayoutUpToM")((0,l.$j)((e,t)=>{var a;let{auth:{currentUser:i,isLoggedIn:s,isLoggingOut:l},viewCam:{isOwnShow:r,isOneClickRechargePanelVisible:n,isRefillAvailable:c,show:d},tokens:{hasPurchaseFailed:m}}=e,{model:u,isLayoutUpToM:p}=t,h=null==u?void 0:u.status,v=null==d?void 0:d.mode,E=(0,A.xV)(e),g=(0,o.R3)(e),S=null!==(a=null==E?void 0:E.tokens)&&void 0!==a?a:0,b=(0,P.Zf)(e),C=(0,w.UD)(e),f=s&&!l&&!(null==i?void 0:i.isStudio)&&!(null==i?void 0:i.isModel)&&!(null==i?void 0:i.isAdmin)&&!(null==i?void 0:i.isSupport),y=(0,o.U8)(e),_=I({model:u,isOwnShow:r,groupShowMode:y}),N=3*_<=S,k="endSpy"===g&&(0,o.V$)(e),L=f&&v===h&&!N&&!k&&["sendPrivateTip","endSpy","quitGroupShowOrTip"].includes(g);return{refillPackage:b,currentUser:i,hasPurchaseFailed:m,isAvailable:L,isMobile:p,purchaseSucceededToken:(0,w.BN)(e),isRefillAvailable:c,lastRefillTokensSum:C,isVisible:n&&!k,isLightTheme:(0,T.LK)(e),timeLeft:M(S,_)}},U)(R))},58024:(e,t,a)=>{a.d(t,{Z:()=>_});var i=a(27378),s=a(1961),l=a(23849),r=a(64553),n=a(40108),o=a(95366),c=a(73545),d=a(29413),m=a(56509),u=a(80176),p=a(94380),h=a(95654),v=a(96679);let E=({model:e})=>{let t=(0,p.T)(),{isSubscribed:a,tier:s}=(0,h.C)(c.Y4);return i.createElement(r.Z,{className:"subscriptions-control-panel__button",onClick:()=>{t((0,u.sb)(`/${e.username}/${v.pt}`))}},a?i.createElement(n.g,{tier:s,size:20}):i.createElement(d.Z,{className:"subscriptions-control-panel__icon",img:"diamond"}),i.createElement("span",{className:"subscriptions-control-panel__button-label"},a&&s?(0,m.dW)(o.HN4[s]):(0,m.dW)("fanClub.user.joinFanClub")))};var g=a(61601),S=a(12710);let b=()=>{let e=(0,g.bh)(),t=(0,g.rr)(),a=(0,h.C)(c.D);return i.createElement(r.Z,{className:"subscriptions-control-panel__button subscriptions-control-panel__favorited-button",onClick:()=>{t(),e("hidden")}},i.createElement(d.Z,{className:"subscriptions-control-panel__icon subscriptions-control-panel__favorited-icon",img:"heart-fill"}),i.createElement("span",{className:"subscriptions-control-panel__button-label"},(0,m.dW)("viewCam.subscriptionsControl.favorited")),i.createElement("span",{className:"subscriptions-control-panel__button-info"},(0,S.ER)(a)))},C=()=>i.createElement("div",{className:"button-pointer__outer"},i.createElement("div",{className:"button-pointer__inner"})),f=({onClick:e,isNotificationsControlVisible:t,isUserSubscribed:a})=>i.createElement(r.Z,{className:"subscriptions-control-panel__button subscriptions-control-panel__following-button",onClick:e},i.createElement(d.Z,{img:a?"notifications-2":"notifications-off-2",className:"subscriptions-control-panel__icon"}),i.createElement("span",{className:"subscriptions-control-panel__button-label"},(0,m.dW)(a?"viewCam.subscriptionsControl.following":"button.notifyMe")),t&&i.createElement(C,null)),y=()=>{let e=(0,g.KH)(),[t,a]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{"openedFirstTime"===e&&a(!0),"closed"===e&&a(!1)},[e]),{isNotificationsControlVisible:t,setIsNotificationsControlVisible:a,currentPanelStatus:e}};var T=a(69353),P=a(33914),w=a(99748);let _=()=>{let e=(0,p.T)(),t=(0,h.C)(P.T2),{shouldShow:a}=(0,h.C)(c.Y4),r=(0,h.C)(e=>!!t&&(0,T.LW)(e,t.id)),{isNotificationsControlVisible:n,setIsNotificationsControlVisible:o,currentPanelStatus:d}=y();return t&&"hidden"!==d?i.createElement("div",{className:(0,w.AK)("subscriptions-control-panel",{closed:"closed"===d})},["opened","openedFirstTime"].includes(d)&&i.createElement("div",{className:(0,w.AK)("subscriptions-control-panel__icons-panel",{"with-three-button":a})},i.createElement(f,{onClick:()=>{r||e((0,s.oj)({model:t,buttonLocation:"PushNotificationPopupOnAddedToFavs"})),(!n||r)&&o(e=>!e)},isNotificationsControlVisible:n,isUserSubscribed:r}),i.createElement("div",{className:"subscriptions-control-panel__icons-divider"}),i.createElement(b,null),a&&i.createElement(i.Fragment,null,i.createElement("div",{className:"subscriptions-control-panel__icons-divider"}),i.createElement(E,{model:t}))),n&&i.createElement(l.Z,{className:"subscriptions-control-panel__notifications-tooltip",key:String(null==t?void 0:t.id),buttonLocation:"PushNotificationPopupOnAddedToFavs",model:t,isMobile:!0,onClose:()=>{o(!1)},isVisible:!0,shouldMethodsListBeExpanded:!0})):null}},41706:(e,t,a)=>{a.d(t,{I:()=>m});var i=a(27378),s=a(76482),l=a(38924),r=a(33914),n=a(95654);let o=()=>{let e=(0,n.C)(l.AI),t=(0,n.C)(r.iv),[a,s]=(0,i.useState)("closed");return(0,i.useEffect)(()=>{s(e?"hidden":"closed")},[e]),(0,i.useEffect)(()=>{s(e=>"hidden"===e?"hidden":"closed")},[t]),[a,s]},c=({isInFavoritesFromServer:e,favoritedCountFromServer:t,favoritesClickHandler:a})=>{let[l,r]=(0,i.useState)(t),[n,o]=(0,i.useState)(e);(0,i.useEffect)(()=>{o(e)},[e]),(0,i.useEffect)(()=>{r(t)},[t]);let c=(0,s.Z)(a,200);return{favoritedCount:l,isInFavorites:n,toggleFavorite:()=>{o(e=>!e),r(e=>n?e-1:e+1),c()}}};var d=a(56981);let m=({children:e,isInFavoritesFromServer:t,favoritedCountFromServer:a,favoritesClickHandler:s})=>{let[l,r]=o(),{favoritedCount:n,isInFavorites:m,toggleFavorite:u}=c({isInFavoritesFromServer:t,favoritedCountFromServer:a,favoritesClickHandler:s}),p=(0,i.useMemo)(()=>({panelStatus:l,favoritedCount:n,isInFavorites:m}),[l,n,m]),h=(0,i.useMemo)(()=>({setPanelStatus:r,toggleFavorite:u}),[r,u]);return i.createElement(d.O.Provider,{value:p},i.createElement(d.x.Provider,{value:h},e))}},56981:(e,t,a)=>{a.d(t,{O:()=>s,x:()=>l});var i=a(27378);let s=(0,i.createContext)(void 0),l=(0,i.createContext)(void 0)},61601:(e,t,a)=>{a.d(t,{GS:()=>o,KH:()=>c,Ul:()=>n,bh:()=>d,rr:()=>m});var i=a(37051),s=a(27378),l=a(56981),r=a(10642);let n=()=>{let e=(0,s.useContext)(l.O);return e?e.favoritedCount:(r.ZP.error("useFavoritedCount must be used inside SubscriptionsControlStateContext context"),0)},o=()=>{let e=(0,s.useContext)(l.O);return e?e.isInFavorites:(r.ZP.error("useIsInFavorites must be used inside SubscriptionsControlStateContext context"),!1)},c=()=>{let e=(0,s.useContext)(l.O);return e?e.panelStatus:(r.ZP.error("usePanelStatus must be used inside SubscriptionsControlStateContext context"),"closed")},d=()=>{let e=(0,s.useContext)(l.x);return e?e.setPanelStatus:(r.ZP.error("useSetPanelStatus must be used inside SubscriptionsControlActionsContext context"),i.Z)},m=()=>{let e=(0,s.useContext)(l.x);return e?e.toggleFavorite:(r.ZP.error("useToggleFavorite must be used inside SubscriptionsControlActionsContext context"),i.Z)}},82169:(e,t,a)=>{a.d(t,{Z:()=>l,x:()=>s});var i=a(56509);let s=(e,t)=>t&&e?(0,i.dW)("viewCamStatuses.offline.requestPrivate.mobileBody"):t?(0,i.dW)("viewCamStatuses.offline.requestPrivate.mobileBodyOnlyOfflineRequest"):e?(0,i.dW)("viewCamStatuses.offline.requestPrivate.mobileBodyOnlyChatting"):"",l=e=>e.isOfflinePrivateAvailable&&(e.doPrivate||e.doP2p)},44070:(e,t,a)=>{a.d(t,{L:()=>v});var i=a(27378),s=a(73545),l=a(33914),r=a(57174),n=a(29413),o=a(91090),c=a(59593),d=a(96552),m=a(56509),u=a(94380),p=a(95654),h=a(99126);let v=()=>{let e=(0,p.C)(s.TN),t=(0,p.C)(l.T2),a=(0,u.T)(),v=!!(t&&e);(0,d.GT)(v);let E=()=>{a((0,h.R7)(c.MODAL_TYPES.AUTH,{component:"SignUp",action:{backgroundImage:t.avatarUrl||void 0,shouldBypassActionPrefix:!0,type:"continueWatching",user:t},user:t,triggerSource:o.Dt.WATCHING_LIMITATION}))};return v?i.createElement("div",{className:"view-cam-watching-limit"},i.createElement("div",{className:"view-blocked-container"},i.createElement("div",{className:"watching-limit-title"},(0,m.dW)("viewCam.watchingLimit.title")),i.createElement("div",{className:"watching-limit-description"},i.createElement("div",null,(0,m.dW)("viewCam.watchingLimit.description")),i.createElement("div",{className:"watching-limit-description-features"},(0,m.dW)("viewCam.watchingLimit.youWillGet"))),i.createElement("div",{className:"watching-limit-features",onClick:E},i.createElement("div",{className:"watching-limit-feature"},i.createElement(n.Z,{img:"play-2",size:14}),(0,m.dW)("viewCam.watchingLimit.features.watchForFree")),i.createElement("div",{className:"watching-limit-feature"},i.createElement(n.Z,{img:"chat",size:18}),(0,m.dW)("viewCam.watchingLimit.features.publicChat")),i.createElement("div",{className:"watching-limit-feature"},i.createElement(n.Z,{img:"tokens-2",size:20}),(0,m.dW)("viewCam.watchingLimit.features.tokenGiveaway")))),i.createElement(r.ZP,{style:"accept",size:"large",onClick:E},(0,m.dW)("viewCam.watchingLimit.button"))):null}},38486:(e,t,a)=>{a.d(t,{Z:()=>c});var i=a(27378),s=a(84546),l=a(44997),r=a(57174),n=a(29413),o=a(99748);let c=({isActive:e,className:t,style:a,isActionMenuAvailable:c,isPrivate:d,onClick:m})=>i.createElement(r.ZP,{onClick:m,style:d?"gold-ds":"apply-2-ds",styles:a,className:(0,o.AK)(t,"send-tip-button",{"send-tip-button--active":e,"send-tip-button--with-icon":c,"send-tip-button--private":d,"send-tip-button--private-active":d&&e})},i.createElement(s.t,{shortTextId:"button.sendTipShort",textId:"button.sendTip"}),i.createElement(l.k,null),c&&i.createElement("span",{className:(0,o.AK)("send-tip-button__icon-container")},i.createElement(n.Z,{img:e?"chat-actions-active":"chat-actions",className:(0,o.AK)("send-tip-button__icon",{"send-tip-button__icon--active":e})})))},28070:(e,t,a)=>{a.d(t,{Z:()=>J});var i=a(27378),s=a(48204),l=a(3620),r=a(91805),n=a(98568),o=a(4289),c=a(29413),d=a(72914),m=a(88051),u=a(87489),p=a(32284);let h=({onClick:e,model:t,modelUsername:a,isMediaPage:s})=>{let l=(0,u.n3)(t);return i.createElement(o.rU,{key:a,to:`/${a}/profile`,onClick:e,className:"viewcam-profile-menu-item"},i.createElement(m.Z,{className:"viewcam-profile-menu-item__avatar",onlineStatusClassName:"viewcam-profile-menu-item__online-status",user:t?(0,p.T$)(t):{username:a},modelData:l,showOnlineStatus:!0,isBorderAvatar:!0}),i.createElement(d.f,{className:"viewcam-profile-menu-item__label",as:s?"span":"h1",fallback:"span",noWarn:"this is duplicated because of different mobile and desktop menu markups and calculating menu items widths, see ASS-21895"},a,i.createElement(c.Z,{className:"viewcam-profile-menu-item__icon media-up-to-m-hidden",img:"next",size:9})))};var v=a(80905),E=a(73545),g=a(33914),S=a(77382),b=a(97554),C=a(52345),f=a(16040),y=a(1948),T=a(61395),P=a(51702),w=a(91090),_=a(59593),N=a(99748),A=a(56509),k=a(80176),I=a(20717),M=a(94380),L=a(63256),R=a(16023),U=a(62203),Z=a(60673),O=a(62612),W=a(96679),B=a(81326),F=a(74012),D=a(17723),V=a(82512),x=a(66483),$=a(61435);let H={createFreeAccountModal:r.cS,showModal:S.K4,routerReplace:k.sb,analyzeOpenModelProfile:Z.Ch},K={myClub:{iconFile:"myclub-gradient",label:"My.Club"},twitter:{icon:"x-logo-ds",label:"Twitter"},instagram:{icon:"instagram-original",label:"Instagram"},snapchat:{icon:"snapchat-square",label:"Snapchat"},facebook:{icon:"facebook-square",label:"Facebook"},faphouse:{icon:"faphouse",label:"Faphouse"},xhamster:{icon:"xhamster-original",label:"xHamster"},xhamsterPornstar:{icon:"xhamster-original",label:"xhamsterPornstar"},amazonWishlist:{icon:"amazon-square",label:"Amazon"},fancentro:{icon:"fancentro",label:"Fancentro",processUrl:I.uG}},G=e=>{let{modelSocialLinks:t,modelSocialLinksIcons:a,model:s,isShowFaphouseLinkEnabled:l}=e;return(0,i.useMemo)(()=>{let e=null==s?void 0:s.amazonWishlist,r={...t,amazonWishlist:e};return Object.keys(K).filter(e=>!!r[e]&&(!!l||"faphouse"!==e)).map(e=>{let t=K[e],s=t.processUrl?t.processUrl((0,I.jh)(r[e])):(0,I.jh)(r[e]);return{className:"external-link",customItem:i.createElement(y.Z,{className:"header-sub-social-link",href:s,key:t.label,target:"_blank"},t.iconFile?i.createElement("img",{src:(0,I.jz)(`common/components/ui/HeaderSub/images/${t.iconFile}.svg`),className:(0,N.AK)("header-sub-social-link-main-icon","icon",`icon-${t.iconFile}`),alt:"social icon"}):i.createElement(c.Z,{img:t.icon||"question",className:"header-sub-social-link-main-icon"}),a[e]&&i.createElement(c.Z,{img:a[e],size:10,className:"header-sub-social-link-star-icon"}),i.createElement("span",{className:"social-name"},t.label)),label:t.label}})},[a,t,s,l])},z=e=>{let t=(0,M.T)(),{isTimelineModelMenuEnabled:a,shouldShowFanClubButton:s,hasModelFeedNewPosts:l,modelUsername:r}=e,o=(0,i.useCallback)(()=>{t((0,k.sb)(`/${r}/${W.pt}`))},[r,t]);return(0,i.useMemo)(()=>[a&&{label:(0,A.dW)("viewCam.subheader.feed"),route:{pathname:`/${r}/timeline`,hash:""},isActive:()=>!1},s&&{className:"external-link view-cam-header-sub__fan-club-button",customItem:i.createElement(n.Z,{source:"viewcamSubheader",hasUpdate:l,onClick:o}),label:"Fan Club"}],[a,s,l,r,o])},j=e=>{let t=(0,M.T)(),{isLoggedIn:a,shouldShowPlasma:s}=e,l=(0,i.useCallback)(()=>{t(a?(0,S.K4)(_.MODAL_TYPES.PLASMA_MESSENGER):(0,r.cS)({triggerSource:w.Dt.SIGNUP_PLASMA},{type:"chatPlasma"}))},[a,t]);return(0,i.useMemo)(()=>s&&{className:"local-link plasma",customItem:i.createElement("a",{className:"header-sub-social-link",onClick:l},i.createElement(c.Z,{img:"plasma",size:20}),i.createElement("span",{className:"social-name"},"Messenger")),label:"Plasma"},[l,s])},Y=({hasAccessToNotInterestedModels:e,model:t,isLoggedRegularUser:a,isDSAReportModelContentMessageEnabled:s})=>(0,i.useMemo)(()=>[{label:"ModelAdditionalMenu",className:"local-link model-aditional-menu",customItem:i.createElement(b.Z,{shouldSwitchToNextModelOnNotInterested:!0,report:{source:"viewcam"},portalRootId:$.y.IDS.HEADER_SUB_PORTAL_CONTAINER,model:t,variant:"view-cam-header",isReportHidden:s})},e&&{label:"NotInterestedModelButton",className:"header-sub-item-wrapper local-link model-aditional-menu-item",customItem:i.createElement(C.$,{model:t,className:"header-sub-button",shouldSwitchToNextModel:!0})},a&&!s&&{label:"ReportModelButton",className:"header-sub-item-wrapper local-link model-aditional-menu-item",customItem:i.createElement(f.t,{source:"viewcam",model:t,className:"header-sub-button"})},s&&{label:"ReportModelButton",className:"header-sub-item-wrapper local-link model-aditional-menu-item",customItem:i.createElement(O.g,{className:"header-sub-button",reportedUser:t,reportType:"model"})}],[e,a,t,s]),q=(e,t)=>{let{videosCount:a,photosCount:s,modelUsername:l}=e;return(0,i.useMemo)(()=>[{className:"local-link",label:(0,A.dW)("viewCam.subheader.videos"),route:{pathname:`/${l}/videos`,hash:""},count:a,isActive:()=>!1,onClick:()=>t("VIDEO_BUTTON")},{className:"local-link",label:(0,A.dW)("viewCam.subheader.gallery"),route:{pathname:`/${l}/photos`,hash:""},count:s,isActive:()=>!1,onClick:()=>t("ALBUM_BUTTON")}].filter(e=>e.count>0),[s,a,l,t])},Q=e=>{let{model:t,modelUsername:a,isMediaPage:s}=e,l=(0,M.T)(),r=(0,i.useCallback)(e=>{l((0,Z.Ch)({triggerSource:w.YW[e]}))},[l]),n=q(e,r),o=z(e),c=j(e),d=G(e),m=Y(e);return(0,i.useMemo)(()=>[{label:a,customItem:i.createElement(h,{model:t,isMediaPage:s,modelUsername:a,onClick:()=>r("MODEL_NAME")})},{className:"local-link",label:(0,A.dW)("viewCam.subheader.profile"),route:`/${a}/profile`,isActive:()=>!1,badgeRight:i.createElement(T.Z,null),onClick:()=>r("PROFILE_BUTTON")},...n,...o,c,...d,...m].filter(Boolean),[a,t,n,o,c,d,m,s,r])},J=(0,l.EN)((0,s.$j)((e,t)=>{let a=t.match.params.username,i=(0,g.T2)(e),s=i?(0,x.GA)(e,i.id):null,l=(0,U.Km)(e),r=s&&!l?(0,B.g6)(e,s.username):0,n=s&&!l?(0,g.E)(e):0,{modelSocialLinks:o,modelSocialLinksIcons:c}=(0,V.V9)(e,i);return{isLoggedIn:(0,F.M7)(e),isMediaPage:(0,R.HK)(e),shouldShowPlasma:(0,E.M9)(e),shouldShowFanClubButton:(0,E.lv)(e),hasModelFeedNewPosts:(0,g.x$)(e),modelSocialLinks:o,modelSocialLinksIcons:c,model:(0,v.AQ)(e,a),isLoggedRegularUser:(0,F.Tv)(e),modelUsername:a,photosCount:r,videosCount:n,isTimelineModelMenuEnabled:(0,g.KW)(e),hasAccessToNotInterestedModels:(0,D.bl)(e),isShowFaphouseLinkEnabled:(0,L.jcC)(e),isDSAReportModelContentMessageEnabled:(0,L.hzN)(e)}},H)(e=>{let t=Q(e);return i.createElement(P.Z,{className:"view-cam-header-sub",items:t,hasNextModel:!e.shouldHideNextModel,hasSearch:!0,hasCategories:!0})}))},39618:(e,t,a)=>{a.d(t,{G:()=>i,f:()=>s});let i=e=>e.error&&(e.dirty||e.submitFailed)||!e.dirtySinceLastSubmit&&e.submitError&&e.submitFailed,s=e=>!e.dirtySinceLastSubmit&&(e.error||e.submitError)&&e.submitFailed},28656:(e,t,a)=>{a.d(t,{L:()=>l});var i=a(27378),s=a(87937);let l=(0,s.C5)()?i.useLayoutEffect:i.useEffect},18984:(e,t,a)=>{a.d(t,{ZP:()=>B});var i=a(18775),s=a(76482),l=a(37051),r=a(91343),n=a(27378),o=a(48204),c=a(84807),d=a(65343),m=a(52635),u=a(73545),p=a(33914),h=a(10642),v=a(62668),E=a(50557),g=a(41950),S=a(59593),b=a(99748),C=a(98846),f=a(16023),y=a(98371),T=a(62182),P=a(2656),w=a(61061),_=a(51945),N=a(53514),A=a(38629),k=a(78021),I=a(14151),M=a(58320),L=a(60278);let R=(0,C.n)({resolved:{},chunkName:()=>"webRTCPlayer",isReady(e){let t=this.resolve(e);return!0===this.resolved[t]&&!!a.m[t]},importAsync:()=>(0,C.J)(()=>Promise.all([a.e(8794),a.e(9791),a.e(7008),a.e(4052)]).then(a.bind(a,26738))),requireAsync(e){let t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then(e=>(this.resolved[t]=!0,e))},requireSync(e){let t=this.resolve(e);return a(t)},resolve:()=>26738},{isErrorBoundary:!1}),U=(0,C.n)({resolved:{},chunkName:()=>"HLSPlayerWrapper",isReady(e){let t=this.resolve(e);return!0===this.resolved[t]&&!!a.m[t]},importAsync:()=>(0,C.J)(()=>Promise.all([a.e(8794),a.e(6805)]).then(a.bind(a,67830))),requireAsync(e){let t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then(e=>(this.resolved[t]=!0,e))},requireSync(e){let t=this.resolve(e);return a(t)},resolve:()=>67830},{isErrorBoundary:!1}),Z=["scroll","mousemove","pointerdown","keydown"];class O extends n.PureComponent{componentDidMount(){this.props.isMediaPage&&Z.forEach(e=>document.addEventListener(e,this.handleFirstInteraction)),this.props.updateHLSStreamEndedState(!1),this.removeAudioStartListener=g.KY.subscribePlayAudioEvent(e=>{e.detail.playerId!==this.VideoPlayerId&&this.props.togglePlayerAvailability(!1)})}componentDidUpdate(e){var t,a,i;this.updateDocumentVisibilityState(e,this.props),(null==e?void 0:null===(t=e.model)||void 0===t?void 0:t.id)!==(null===(i=this.props)||void 0===i?void 0:null===(a=i.model)||void 0===a?void 0:a.id)&&this.setState({wasPlayed:!1})}componentWillUnmount(){var e;this.updateInitializePlayer&&this.updateInitializePlayer.cancel(),null===(e=this.removeAudioStartListener)||void 0===e||e.call(this),this.props.updateInitializePlayer(!1),this.clearTimeout(),Z.forEach(e=>document.removeEventListener(e,this.handleFirstInteraction))}static getDerivedStateFromError(){return{isFailed:!0}}componentDidCatch(e,t){h.ZP.error(e,t),this.props.apiLog("error",`Player failed: ${e.name}`,{error:e.toString(),errorInfo:t})}render(){return this.state.isFailed?n.createElement(N.Z,null):n.createElement(A.default,{className:(0,b.AK)("player",d.j.player,this.props.className)},n.createElement(_._,null),this.renderPlayerContent(),n.createElement(m.P,{className:"player__player-controls"}),this.renderStreamController())}constructor(e){super(e),(0,i._)(this,"lastScrollY",0),(0,i._)(this,"updateInitializePlayer",(0,s.Z)(()=>{this.props.updateInitializePlayer(!0)},500)),(0,i._)(this,"removeAudioStartListener",void 0),(0,i._)(this,"VideoPlayerId",`WebRTC${(0,r.x0)()}`),(0,i._)(this,"timeoutId",void 0),(0,i._)(this,"handleFirstInteraction",e=>{if("scroll"===e.type&&this.lastScrollY<=window.scrollY){this.lastScrollY=window.scrollY;return}this.setState({isAfterUserInteraction:!0}),Z.forEach(e=>document.removeEventListener(e,this.handleFirstInteraction))}),(0,i._)(this,"clearTimeout",()=>{void 0!==this.timeoutId&&clearTimeout(this.timeoutId)}),(0,i._)(this,"handlePlaying",()=>{this.state.wasPlayed||(this.setState({wasPlayed:!0}),this.props.onPlaying(),this.props.updateHLSStreamEndedState(!1))}),(0,i._)(this,"togglePlayerAvailabilityIfNeeded",({isDocumentVisible:e,isInPrivate:t,isBlurVideoOnPrivate:a})=>{let i=S.BROWSER_CAPABILITIES.isMobile||S.BROWSER_CAPABILITIES.isTablet;if(i){if(e||a){this.clearTimeout();return}t?this.timeoutId=setTimeout(()=>this.props.togglePlayerAvailability(!1),6e4):this.props.togglePlayerAvailability(!1)}}),(0,i._)(this,"updateDocumentVisibilityState",(e,t)=>{let{isDocumentVisible:a}=t;(0,T.gk)(e,t)&&(a&&this.setState({isDocumentVisible:a}),this.togglePlayerAvailabilityIfNeeded(t))}),(0,i._)(this,"handlePlayClick",()=>{g.KY.emitPlayAudioEvent(this.VideoPlayerId),this.props.togglePictureInPicture(!1),this.props.togglePlayerAvailability(!0),this.props.updateDocumentVisibility()}),(0,i._)(this,"handleHLSStreamEnded",()=>{this.props.updateHLSStreamEndedState(!0)}),(0,i._)(this,"handleHLSStreamRestored",()=>{this.props.isHLSStreamWasEnded&&this.props.updateHLSStreamEndedState(!1)}),(0,i._)(this,"renderPlayer",()=>{let{lastSnapshotUrl:e,volume:t,playerType:a,isPlayerAvailability:i,isPictureInPicture:s,isMediaPage:l,isBackgroundForceStopPlaying:r}=this.props,{isDocumentVisible:o,isAfterUserInteraction:c}=this.state;if(!o||!i||s||l&&!c||r)return n.createElement(w.Z,{onClick:this.handlePlayClick});let d={lastSnapshotUrl:e,volume:t};switch(a){case I.PLAYER_TYPES.WEBRTC:return n.createElement(R,{onPlaying:this.handlePlaying,wasPlayed:this.state.wasPlayed,...d,updateInitializePlayer:this.updateInitializePlayer});case I.PLAYER_TYPES.HLS:default:return n.createElement(U,{onPlaying:this.handlePlaying,wasPlayed:this.state.wasPlayed,onStreamEnded:this.handleHLSStreamEnded,onStreamRestored:this.handleHLSStreamRestored,...d,updateInitializePlayer:this.updateInitializePlayer})}}),(0,i._)(this,"renderStreamController",()=>{let{playerType:e}=this.props,t=e===I.PLAYER_TYPES.WEBRTC||e===I.PLAYER_TYPES.HLS;return t?n.createElement(k.Z,null):null}),(0,i._)(this,"renderPlayerContent",()=>n.createElement(E.s,null,this.renderPlayer())),this.state={wasPlayed:!1,isDocumentVisible:this.props.isDocumentVisible,isFailed:!1,isAfterUserInteraction:!this.props.isMediaPage}}}(0,i._)(O,"defaultProps",{isLoggedIn:!1,isInCam2Cam:!1,isInPrivate:!1,isPictureInPicture:!1,lastSnapshotUrl:"",playerType:"",volume:0,onPlaying:l.Z,isHLSStreamWasEnded:!1});let W={togglePlayerAvailability:c.X6,updatePlayerType:c.$5,updateInitializePlayer:P.kV,updateDocumentVisibility:v.uP,togglePictureInPicture:P.x0,apiLog:h.t$,updateHLSStreamEndedState:c.zH,setEmulatePlayerCrashState:P.LA},B=(0,o.$j)(e=>{let{auth:{isLoggedIn:t,isLoggingOut:a},viewCam:{model:i,isPlayerAvailability:s},ui:{isDocumentVisible:l},player:{isBroadcastSettingsVisible:r}}=e,n=(0,u.IW)(e),o=n&&(0,u.UP)(e);return{isDocumentVisible:!!l,isBroadcastSettingsVisible:r,isLoggedIn:t&&!a,isInCam2Cam:o,isInPrivate:n,model:i,isMediaPage:(0,f.HK)(e),playerType:(0,M.Aq)(e),isPlayerAvailability:s,volume:(0,M.Sf)(e),isPictureInPicture:(0,L.bd)(e),isHLSStreamWasEnded:(0,p.pc)(e),deviceType:(0,y.l7)(e),crashEmulateState:(0,L.jU)(e),isBackgroundForceStopPlaying:(0,M.aX)(e),isBlurVideoOnPrivate:(0,M.$C)(e)}},W)(O)},51945:(e,t,a)=>{a.d(t,{_:()=>c});var i=a(27378),s=a(94380),l=a(95654),r=a(63256),n=a(2656),o=a(60278);let c=()=>{let e=(0,l.C)(o.jU),t=(0,l.C)(r.hXr),a=(0,s.T)();return i.useEffect(()=>{if(e&&t)throw a((0,n.LA)(!1)),Error("QA Test error")},[a,e,t]),null}},53514:(e,t,a)=>{a.d(t,{Z:()=>o});var i=a(27378),s=a(65343),l=a(99382),r=a(99748),n=a(56509);let o=()=>i.createElement("div",{className:(0,r.AK)("player-error-boundary",s.j.player)},i.createElement("div",{className:"player-error-boundary__bg"},i.createElement("div",{className:"player-error-boundary__description"},(0,n.dW)("errors.playerFailure.sorry"),i.createElement("br",null),(0,n.dW)("errors.playerFailure.instruction")),i.createElement("div",{className:"player-error-boundary__action"},i.createElement(l.ZP,{style:"default-filled",onClick:()=>{window.location.reload()}},(0,n.dW)("errors.playerFailure.reload")))))},78021:(e,t,a)=>{a.d(t,{Z:()=>h});var i=a(27378),s=a(48204),l=a(75151),r=a(95366),n=a(73545),o=a(33914),c=a(37112),d=a(16023),m=a(96811),u=a(58320);let p={fetchStreamPlayingPercent:l.oz},h=(0,s.$j)(e=>{let t=(0,o.iv)(e),a=(0,n.ze)(e);return{playerType:(0,u.Aq)(e),streamResolution:(0,u.Cj)(e),modelId:t,modelStatus:a,isViewCamPage:(0,d.mT)(e),viewServer:(0,u.A1)(e),streamControllerConfig:(0,u.Yb)(e)}},p)(({playerType:e,streamResolution:t,modelId:a,viewServer:s,modelStatus:l,streamControllerConfig:n,isViewCamPage:o,fetchStreamPlayingPercent:d})=>{let u=(0,i.useCallback)(i=>{a&&l&&(c.Z.setFields({playingPercent:i.playingPercent}),d({playerType:e,streamResolution:t,modelId:a,modelStatus:l,viewServer:s,stats:i}))},[a,l,e,d,t,s]);return(0,i.useEffect)(()=>{l===r.MODEL_STATUSES.STATUS_PUBLIC&&o?m.Z.init({...n,update:u}):m.Z.destroy()},[l,o,n,u]),null})},69497:(e,t,a)=>{a.d(t,{Gi:()=>E,K5:()=>g});var i=a(27378),s=a(97060),l=a(87937),r=a(72036);let n="main.js",o=({version:e,origin:t,moduleName:a})=>`${t}${e?`/v${e}`:""}/${a||n}`,c={},d=async()=>{c.buffer={exports:await a.e(8764).then(a.t.bind(a,48764,19))},c.react={exports:i},c["react/jsx-runtime"]={exports:await a.e(7270).then(a.t.bind(a,24246,19))}},m={},u=async({origin:e,version:t="",moduleName:a=n})=>{let i,l;Object.keys(c).length||await d();let r=o({version:t,origin:e,moduleName:a});if(r in m)return await m[r];m[r]=new Promise(e=>{i=e});try{l=await fetch(r)}catch(e){throw delete m[r],new s.MS(e)}if(!l.ok)throw delete m[r],new s.MS(await l.text());let p=await l.text(),h={exports:{}},{exports:v}=h,E=Function("module","exports","require",p);return E(h,v,a=>{if(a.endsWith(".js")){let i=a;return i.startsWith("./")&&(i=i.slice(2)),u({origin:e,version:t,moduleName:i})}if(c[a]){var i;return null===(i=c[a])||void 0===i?void 0:i.exports}return{}}),i(h.exports),h.exports},p=async()=>a.e(1725).then(a.bind(a,61725)),h=async()=>Promise.all([a.e(7270),a.e(8697)]).then(a.bind(a,28697)),v=async({isExternalSourceEnabled:e,externalSourceOrigin:t,externalVersion:a,maxAttempts:i,localModuleLoader:n})=>{let c=null,d=!1;if((0,l.sk)()||e&&!t)return{module:c,localModuleLoaderWasUsed:d};if(!e)return c=await n(),d=!0,c&&(m[o({version:a,origin:t})]=Promise.resolve(c)),{module:c,localModuleLoaderWasUsed:d};try{c=await (0,r.k)(()=>u({origin:t,version:a}),250,i||0,0,e=>!(e instanceof s.MS))}catch(e){d=!0,(c=await n())&&(m[o({version:a,origin:t})]=Promise.resolve(c))}return{module:c,localModuleLoaderWasUsed:d}},E=async e=>{let{module:t}=await v({...e,localModuleLoader:p});return t},g=async e=>{let{localModuleLoaderWasUsed:t,module:a}=await v({...e,localModuleLoader:h});return{localModuleLoaderWasUsed:t,module:a}}},5144:(e,t,a)=>{a.d(t,{O:()=>r});var i=a(27378),s=a(98655),l=a(98846);let r=(0,l.n)({resolved:{},chunkName:()=>"AddToSubscriptionModal",isReady(e){let t=this.resolve(e);return!0===this.resolved[t]&&!!a.m[t]},importAsync:()=>a.e(2230).then(a.bind(a,63324)),requireAsync(e){let t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then(e=>(this.resolved[t]=!0,e))},requireSync(e){let t=this.resolve(e);return a(t)},resolve:()=>63324},{ssr:!1,resolveComponent:e=>e.AddToSubscriptionModal,fallback:i.createElement(s.c,null)})}}]);