1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="75211191-b67f-41f6-84d5-ffc84249fab4",e._sentryDebugIdIdentifier="sentry-dbid-75211191-b67f-41f6-84d5-ffc84249fab4")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9520,4416],{12106:function(e,t,n){n.r(t),n.d(t,{NotificationsV2:function(){return K}});var i=n(27573),l=n(7653),a=n(65123),o=n(49104),s=n(78399),r=s.default.div.withConfig({componentId:"sc-4685edca-0"})(["",""],e=>{let{theme:{color:t,space:n}}=e;return(0,s.css)(["display:flex;align-items:center;justify-content:center;padding:"," ",";color:",";text-align:center;"],n[24],n[16],t.element.regular)});let d=e=>{let{text:t}=e;return(0,i.jsx)(r,{className:"empty-box",children:(0,i.jsx)(o.ZT.Body,{size:"medium",children:t})})};var c=n(37603),u=n(12775),m=n(96),p=s.default.div.withConfig({componentId:"sc-55127beb-0"})(["",""],e=>{let{theme:{space:t}}=e;return(0,s.css)(["width:100%;display:flex;align-items:center;justify-content:flex-start;gap:",";"],t[8])});let h=e=>{let{children:t}=e;return(0,i.jsx)(p,{className:"buttons-wrapper",children:t})},v=e=>{e.setQueryData([m.U7p.config],e=>{var t,n;return{...e,data:{...null==e?void 0:e.data,profileInformation:{data:{...null==e?void 0:null===(n=e.data)||void 0===n?void 0:null===(t=n.profileInformation)||void 0===t?void 0:t.data,message_cnt:null}}}}})},f=e=>(0,m.BRU)({queryKey:[m.U7p.notif],initialPageParam:m.bVV.notifData.replace(":type",e),isInfiniteScroll:!0,enabled:!!e,gcTime:0}),g=e=>{let{readAllLink:t}=e,{t:n}=(0,a.$G)(),{mutate:l}=(0,m.QTX)(),s=(0,u.NL)();return(0,i.jsxs)(h,{children:[t&&(0,i.jsx)(o.zx,{buttonType:"natural",variant:"tertiary",size:"small",text:n("notifications:readAll"),onClick:()=>{l({url:t}),v(s)}}),(0,i.jsx)(o.zx,{buttonType:"natural",variant:"tertiary",size:"small",endIcon:"Left",text:n("notifications:viewAll"),href:(0,m.qXE)(m.Z6p.profileNotifications)})]})},x=e=>{let{direction:t="Right",onClick:n}=e;return(0,i.jsx)(o.hU,{icon:"Right"===t?"Back":"Forward",variant:"transparent",buttonType:"natural",onClick:n,size:"small"})};n(27522),n(97661);var b=n(13933),j=n(74176);n(30563);var k=n(67978);let w=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"md";return"sm"===e?"small":"medium"},y=e=>{var t,n,s;let{id:r,className:d,status:c="no",link:u,size:p="md",channelId:h,showTooltip:v=!1}=e,{t:f}=(0,a.$G)(),g=(0,m.pmc)(),x=(0,m.s68)(e=>e.deviceSize),{data:y}=(0,j.X)(),{isPending:_,mutate:N}=(0,k.c)({channelId:h,onSuccess:e=>{if(null==e?void 0:e.data){var t,n;g({type:(null==e?void 0:null===(t=e.data)||void 0===t?void 0:t.type)==="yes"?"successful":"warning",message:f("common:pushNotification.".concat((null==e?void 0:null===(n=e.data)||void 0===n?void 0:n.type)==="yes"?"toastActiveText":"toastDiactiveText"))})}}}),C=null==y?void 0:y[h],A=(null==C?void 0:C.push_follow_status)||c,M=(null==C?void 0:C.link_toggle_push_follow)||u,z=(0,i.jsx)(o.hU,{buttonType:"natural",variant:"yes"===A?"secondary":"tertiary",id:r,className:(0,m.dhh)(d,{active:"yes"===A}),size:w(p),icon:"yes"===A?"NotifFilled":"Notif",onClick:e=>{e.stopPropagation(),N({url:M})},loading:_,"aria-label":f("accessibilityLabel.activeNotif")}),{data:L}=(0,m.Gi)(),T=null==L?void 0:null===(s=L.data)||void 0===s?void 0:null===(n=s.profileInformation)||void 0===n?void 0:null===(t=n.data)||void 0===t?void 0:t.hash_user_id;return((0,l.useEffect)(()=>{(0,b.kQ)()&&"yes"===A&&(0,b._o)(T)},[A,T]),v&&"no"===A)?(0,i.jsx)(o.u,{variant:"new",content:(0,i.jsx)(o.ZT.Label,{size:"mobile"===x||"tablet"===x?"small":"medium",children:f("common:pushNotification.notifOffTooltipSuggested")}),defaultOpen:!0,buttonLabel:f("common:close"),position:"top",children:z}):z},_=e=>{let t=(0,b.kQ)()?0:void 0;return(0,i.jsx)(m.cNl,{name:"PushNotificationActionSuspense",eventName:m.FPR.playerEvents.canPlayThrough,timeout:t,children:(0,i.jsx)(y,{...e})})};var N=s.default.div.withConfig({componentId:"sc-70c29b91-0"})(["",""],e=>{let{theme:{space:t,color:n}}=e;return(0,s.css)(["display:flex;align-items:center;.push-notification-action{margin-",":",";}.active{.icon > path{fill:",";}}&:has(.tooltip.visible){overflow:visible;}"],t.right,t[4],n.element.bold)});let C=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"md";return"sm"===e?"small":"medium"},A=e=>{let{id:t="",className:n,channelId:s,status:r,link:d,size:c="md",notifLink:u,notifStatus:p="no",buttonStyle:h}=e,{t:v}=(0,a.$G)(),f=(0,m.s68)(e=>e.openAuthModal),{data:g}=(0,j.X)(),x=null==g?void 0:g[s],b=(null==x?void 0:x.link_toggle_push_follow)||u,k=(null==x?void 0:x.status)||r,w="follow"===k,[y,A]=(0,l.useState)(!1),M=(0,l.useRef)(null),z=(0,l.useRef)(k),{isPending:L,mutate:T}=(0,j.w)(s);(0,l.useEffect)(()=>
1{w&&"follow"!==z.current&&(A(!0),M.current&&clearTimeout(M.current),M.current=setTimeout(()=>{A(!1)},1e4)),z.current=k},[w,k]),(0,l.useEffect)(()=>()=>{M.current&&clearTimeout(M.current)},[]);let I=e=>{e.stopPropagation(),"login"===r?f():T({url:(null==x?void 0:x.link)||d})};return(0,l.useEffect)(()=>{var e,n;return t&&(null===(n=document)||void 0===n||null===(e=n.getElementById(t))||void 0===e||e.addEventListener("click",I)),()=>{var e,n;t&&(null===(n=document)||void 0===n||null===(e=n.getElementById(t))||void 0===e||e.removeEventListener("click",I))}},[null==x?void 0:x.link,t]),(0,i.jsxs)(N,{className:(0,m.dhh)("follow-action",n),children:[(0,i.jsx)(o.zx,{id:t,className:(0,m.dhh)("follow",w?"followed":"not-followed"),size:C(c),text:v(w?"followed":"follow"),buttonType:"natural",variant:w?"tertiary":null!=h?h:"primary",loading:L,...!t&&{onClick:I}}),w&&b&&(0,i.jsx)(_,{className:"push-notification-action",size:c,link:b,status:p,channelId:s,showTooltip:y})]})};var M=s.default.div.withConfig({componentId:"sc-58550347-0"})(["width:100%;flex:1;"]);let z=e=>{let{title:t,children:n,onGroupClick:l,groupDetailsAPI:a}=e;return(0,i.jsx)(M,{onClick:()=>l(a,t),"aria-hidden":"true",children:n})};var L=n(56683);function T(){let e=(0,L._)(["\n width: 68px;\n "]);return T=function(){return e},e}function I(){let e=(0,L._)(["\n &,\n .follow-action{\n .button {\n padding: 9.1px 5px;\n .content {\n font-size: 12px;\n line-height:12px;}\n }\n "]);return I=function(){return e},e}var E=s.default.div.withConfig({componentId:"sc-e1e1c82c-0"})(["",""],e=>{let{theme:{space:t,color:n,mediaQuery:i}}=e;return(0,s.css)(["width:100%;display:flex;align-items:center;flex:1;justify-content:space-between;.details-link-wrapper{cursor:pointer;flex:1;display:flex;text-decoration:none;color:inherit;}.details{flex:1;padding-",":",";.body{display:flex;align-items:center;text-align:",";b{font-weight:700;font-variation-settings:'wght' 700;}.body-text{font-weight:400;font-variation-settings:'wght' 400;color:",";a,.link{color:inherit;text-decoration:none;font-weight:700;font-variation-settings:'wght' 700;&:hover,&:focus,&:active{color:inherit;text-decoration:none;}}}}.footer{display:flex;align-items:center;margin-top:",";.link{margin-",":auto;text-decoration:none;color:",";&:hover,&:focus,&:active{text-decoration:none;color:",";}}.label-text{text-align:",";color:",";}}}.avatar-group{flex-shrink:0;align-self:flex-start;}.thumbnail{align-self:flex-start;&.short-image{div{width:38px;height:68px;}}div{width:84px;height:48px;background-repeat:no-repeat;background-position:center center;background-size:cover;border-radius:6px;","}}",""],t.left,t[12],t.right,n.element.bold,t[4],t.right,n.element.regular,n.element.regular,t.right,n.element.regular,i("xs","max")(T()),i("xs","max")(I()))});let S=e=>{var t;let{id:n,text:a,endArrowButton:s,timeAgo:r,groupDetailsAPI:d,groupTitle:c,groupData:u,video:p,rulesLink:h,rulesText:v,actionButton:f,channel:g,footerChildren:b,customVideoLink:j,type:k,detailsLink:w,onGroupClick:y}=e,_=(0,m.s68)(e=>e.deviceSize),N="mobile"===_||"tablet"===_,C=null==g?void 0:null===(t=g.follow)||void 0===t?void 0:t.data,M=(0,l.useMemo)(()=>{var e,t;return null!==(t=null==u?void 0:null===(e=u.avatars)||void 0===e?void 0:e.map((e,t)=>({id:"".concat(e,"-").concat(t),src:e,alt:"avatar-".concat(t)})))&&void 0!==t?t:[]},[null==u?void 0:u.avatars]),L=()=>(0,i.jsxs)("div",{className:(0,m.dhh)("details",{"has-action":!!p||!!f||!!(null==C?void 0:C.link)||!!(null==u?void 0:u.avatars)}),children:[(0,i.jsxs)("div",{className:"body",children:[a&&(0,i.jsx)(o.ZT.Body,{className:"body-text",size:N?"small":"medium",children:a}),s&&(0,i.jsx)(x,{direction:"Left"})]}),(r||b||v)&&(0,i.jsxs)("div",{className:"footer",children:[r&&(0,i.jsx)(o.ZT.Label,{size:"small",children:r}),h&&v&&(0,i.jsx)(o.rU,{href:h,target:"_blank",rel:"noreferrer",children:v}),b]})]}),T=(0,l.useCallback)(e=>{if(!w)return;let t=e.target;t.closest("a")||t.closest("button")||"A"===t.tagName||"BUTTON"===t.tagName||(e.preventDefault(),e.stopPropagation(),window.location.href=w)},[w]);return(0,i.jsxs)(E,{className:"content",children:[(0,i.jsx)(()=>
1d?(0,i.jsx)(z,{title:c,onGroupClick:y,groupDetailsAPI:d,children:(0,i.jsx)(L,{})}):w?(0,i.jsx)("div",{className:"details-link-wrapper",onClick:T,children:(0,i.jsx)(L,{})}):(0,i.jsx)(L,{}),{}),f,(null==C?void 0:C.link)&&(0,i.jsx)(A,{id:n,size:"md",link:(null==C?void 0:C.link)||"",status:(null==C?void 0:C.status)||"unfollow",channelId:String((null==C?void 0:C.userid)||"")}),M.length>0&&(0,i.jsx)("div",{className:"avatar-group",children:(0,i.jsx)(o.Jh,{avatars:M,max:3,size:"small"})}),p&&(0,i.jsx)(o.rU,{className:(0,m.dhh)("thumbnail",{"short-image":"short_service_release"===k}),href:j||(0,m.nRM)("video",p.uid,"/v/".concat(p.uid)),children:(0,i.jsx)("div",{style:{backgroundImage:"url(".concat(p.small_poster,")")}})})]})},P=e=>{let{id:t,type:n,channel:l,video:s,timeAgo:r,text:d,bodyStatus:c,delete_reason:u,groupCount:p,groupData:h,closeLink:v,rulesLink:g,pinLink:x,groupDetailsAPI:b,showLink:j,isModal:k,onGroupClick:w,onGetNotifications:y}=e,{t:_}=(0,a.$G)(),N=null==l?void 0:l.attributes,C=(null==l?void 0:l.avatar)||(null==N?void 0:N.avatar)||(null==l?void 0:l.pic)||(null==N?void 0:N.pic),A=(null==l?void 0:l.displayName)||(null==N?void 0:N.displayName)||(null==l?void 0:l.name)||(null==N?void 0:N.name)||"",M=(null==l?void 0:l.username)||(null==N?void 0:N.username),z=(null==l?void 0:l.link)||(null==N?void 0:N.link),{refetch:L}=f(k?"list":"listbytype"),{mutate:T}=(0,m.QTX)({onSuccess:e=>{e&&(L(),y&&y())}});switch(n){case"short_export":return(0,i.jsx)(S,{timeAgo:r,text:(0,m.gb6)(d),video:s,customVideoLink:"".concat((0,m.vkz)(m.Z6p.dashboardEditVideo,{uid:(null==s?void 0:s.uid)||""}),"?activetab=2")});case"short_service_release":return(0,i.jsx)(S,{type:n,timeAgo:r,text:(0,i.jsx)(a.a1,{i18nKey:"".concat(_("published"===c?"notifications:shortRelease":"notifications:shortReleaseError")),t:_,tOptions:{interpolation:{escapeValue:""}},values:{video:(0,m.yH)(null==s?void 0:s.title)},components:{b:(0,i.jsx)("b",{})}}),video:s,customVideoLink:"".concat((0,m.vkz)(m.Z6p.dashboardEditVideo,{uid:(null==s?void 0:s.uid)||""}),"?activetab=2")});case"reply_comment":case"video_comment":return(0,i.jsx)(S,{timeAgo:r,video:s,detailsLink:j,text:(0,i.jsx)(a.a1,{i18nKey:"".concat(_("video_comment"===n?"notifications:commentNotif":"notifications:replyCommentNotif")),t:_,tOptions:{interpolation:{escapeValue:""}},values:{user:(0,m.yH)(l.displayName),video:(0,m.yH)(null==s?void 0:s.title),comment:(0,m.yH)(d)},components:{userLink:(0,i.jsx)(o.rU,{href:(0,m.nRM)("channel",l.username,l.link)}),videoLink:(0,i.jsx)(o.rU,{href:(0,m.nRM)("video",null==s?void 0:s.uid,"/v/".concat(null==s?void 0:s.uid))}),b:(0,i.jsx)("b",{})}})});case"channel_follow":return(0,i.jsx)(S,{id:t,timeAgo:r,channel:l,text:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o.rU,{href:(0,m.nRM)("channel",l.username,l.link),children:(0,m.yH)(l.displayName)})," ",(0,m.yH)(d)]})});case"channel_follow_group":return(0,i.jsx)(S,{groupTitle:_("notifications:follows"),groupDetailsAPI:b,onGroupClick:w,timeAgo:r,groupData:h,endArrowButton:!0,text:(0,i.jsx)(a.a1,{i18nKey:"notifications:followGroupNotif",t:_,tOptions:{interpolation:{escapeValue:""}},values:{user:(0,m.yH)(l.displayName),otherUsers:p-1},components:{b:(0,i.jsx)("b",{})}})});case"like_group":return(0,i.jsx)(S,{groupTitle:_("notifications:likes"),groupDetailsAPI:b,onGroupClick:w,timeAgo:r,video:s,endArrowButton:!0,text:(0,i.jsx)(a.a1,{i18nKey:"notifications:likeGroupNotif",t:_,tOptions:{interpolation:{escapeValue:""}},values:{user:(0,m.yH)(l.displayName),otherUsers:p-1},components:{b:(0,i.jsx)("b",{})}})});case"reshare":return(0,i.jsx)(S,{timeAgo:r,video:s,text:(0,i.jsx)(a.a1,{i18nKey:_("notifications:reshareNotif"),t:_,tOptions:{interpolation:{escapeValue:""}},values:{user:(0,m.yH)(l.displayName),videoTitle:(0,m.yH)(null==s?void 0:s.title)},components:{b:(0,i.jsx)("b",{}),userLink:(0,i.jsx)(o.rU,{href:(0,m.nRM)("channel",l.username,l.link)}),videoLink:(0,i.jsx)(o.rU,{href:(0,m.nRM)("video",null==s?void 0:s.uid,"/v/".concat(null==s?void 0:s.uid))})}})});case"like":return(0,i.jsx)(S,{timeAgo:r,video:s,text:(0,i.jsx)(a.a1,{i18nKey:_("notifications:likeNotif"),t:_,tOptions:{interpolation:{escapeValue:""}},values:{user:(0,m.yH)(l.displayName)}
1,components:{userLink:(0,i.jsx)(o.rU,{href:(0,m.nRM)("channel",l.username,l.link)}),b:(0,i.jsx)("b",{})}})});case"flash_msg_boost":case"flash_msg_general":case"flash_msg_danger":case"flash_msg_income":return(0,i.jsx)(S,{rulesLink:g,rulesText:_("notifications:moreInfo"),timeAgo:r,text:(0,m.yH)("object"==typeof d?null==d?void 0:d.notify_txt:d)});case"operator":return(0,i.jsx)(S,{rulesLink:g,rulesText:_("header.viewPolicies"),timeAgo:r,text:(0,i.jsx)(a.a1,{i18nKey:_("notifications:operatorDeleteReason"),t:_,tOptions:{interpolation:{escapeValue:""}},values:{title:(0,m.yH)(null==s?void 0:s.title),reason:u.trim()},components:{b:(0,i.jsx)("b",{})}})});case"operator_group":case"flash_msg":return(0,i.jsx)(S,{groupTitle:_("notifications:operatorNotifications"),onGroupClick:w,groupDetailsAPI:b,timeAgo:r,endArrowButton:!0,actionButton:(0,i.jsx)(o.zx,{className:"pin-button",text:_(x?"notifications:pin":"notifications:removePin"),size:"small",buttonType:"natural",variant:"tertiary",startIcon:x?"Pin":"Unpin",onClick:e=>{e.stopPropagation(),T({url:x||v||""})}}),text:(0,i.jsx)(i.Fragment,{children:(0,m.yH)(d)})});case"schedule_publish":return(0,i.jsx)(S,{video:s,timeAgo:r,text:(0,m.yH)(d)});case"subscribe":return(0,i.jsx)(S,{timeAgo:r,channel:N?{...N,avatar:C,displayName:A,username:M,link:z}:l,text:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o.rU,{href:(0,m.nRM)("channel",l.username,l.link),children:(0,i.jsx)("b",{children:(0,m.yH)(l.displayName)})})," ",(0,m.yH)(null==d?void 0:d.replace(l.displayName,"").trim())]})});case"content_id":return(0,i.jsx)(S,{video:s,timeAgo:r,text:(0,m.yH)(d),footerChildren:"approve"===c&&(0,i.jsx)(o.rU,{href:"".concat(m.Z6p.dashboardEditVideo.replace(":uid",null==s?void 0:s.uid),"?activetab=1"),className:"link approve",children:_("notifications:viewDetails")})});default:return null}};var O=s.default.div.withConfig({componentId:"sc-2af06ddb-0"})(["",""],e=>{let{theme:{space:t,color:n}}=e;return(0,s.css)(["position:relative;display:flex;margin-",":",";align-self:flex-start;.link{display:flex;}.label-icon{position:absolute;padding:2px;border-radius:100%;border:1.5px solid ",";bottom:-3px;",":-3px;background:",";font-size:17px;fill:",";}.icon-favoritefilled{background:",";fill:",";}.avatar-icon{padding:",";border-radius:100%;fill:",";font-size:36px;border:1px solid ",";&.icon{&.icon-users{background:",";path{fill:",";}}&-warningfilled{background:",";}&-errorfilled,&-tick,&-publish{background:",";}&-close,&-sparkle,&.error{background:",";}&.published{background:",";}&-sparkle{&.completed{background:",";}}}}"],t.left,t[12],n.background.base,t.left,n.element.bold,n.background.base,n.theme.aparat.regular,n.fixed.white,t[8],n.fixed.white,n.background.ghost,n.element.bold,n.background.ghost,n.system.warning.regular,n.system.highlight.regular,n.system.danger.regular,n.system.success.regular,n.system.success.regular)});let V=e=>{let{channel:t,iconLabel:n,iconAvatar:a,isAvatarLink:s=!0,bodyStatus:r}=e,d=(0,l.useCallback)(()=>(0,i.jsx)(o.JO,{name:a,className:(0,m.dhh)("avatar-icon",r)}),[a,r]),c=(0,l.useCallback)(()=>(0,i.jsx)(o.qE,{src:null==t?void 0:t.avatar,size:"medium",alt:null==t?void 0:t.displayName}),[null==t?void 0:t.avatar,null==t?void 0:t.displayName]),u=(0,l.useCallback)(()=>(0,i.jsx)(o.rU,{href:(0,m.nRM)("channel",null==t?void 0:t.username,null==t?void 0:t.link),children:(0,i.jsx)(c,{})}),[null==t?void 0:t.username,null==t?void 0:t.link,c]),p=(0,l.useCallback)(()=>(0,i.jsxs)(i.Fragment,{children:[s?(0,i.jsx)(u,{}):(0,i.jsx)(c,{}),n&&(0,i.jsx)(o.JO,{name:n,className:"label-icon"})]}),[s,n,u,c]);return(0,i.jsx)(O,{className:"profile",children:(0,i.jsx)(()=>t?(0,i.jsx)(p,{}):a?(0,i.jsx)(d,{}):null,{})})},H=e=>{let{type:t,channel:n,bodyStatus:l}=e;switch(t){case"short_export":return(0,i.jsx)(V,{iconAvatar:"Sparkle",bodyStatus:l||""});case"short_service_release":return(0,i.jsx)(V,{iconAvatar:"Sparkle",bodyStatus:l});case"reply_comment":return(0,i.jsx)(V,{channel:n,iconLabel:"Reply"});case"video_comment":return(0,i.jsx)(V,{channel:n,iconLabel:"CommentFilled"});case"channel_follow":case"subscribe":return(0,i.jsx)(V,{channel:n});case"channel_follow_group":return(0,i.jsx)(V,{iconAvatar:"Users"});case"like_group":return(0,i.jsx)(V,{channel:n,iconLabel:"FavoriteFilled",isAvatarLink:!1});case"reshare":return(0,i.jsx)(V,{channel:n,iconLabel:"Repost"});
1case"like":return(0,i.jsx)(V,{channel:n,iconLabel:"FavoriteFilled"});case"flash_msg_boost":return(0,i.jsx)(V,{iconAvatar:"Rocket"});case"operator_group":case"operator":case"flash_msg_general":case"flash_msg_danger":return(0,i.jsx)(V,{iconAvatar:"WarningFilled"});case"flash_msg_income":return(0,i.jsx)(V,{iconAvatar:"Revenue"});case"flash_msg":return(0,i.jsx)(V,{iconAvatar:"ErrorFilled"});case"schedule_publish":return(0,i.jsx)(V,{iconAvatar:"Publish"});case"content_id":return(0,i.jsx)(V,{iconAvatar:"reject"===l?"Close":"Tick"});default:return null}};var R=s.default.li.withConfig({componentId:"sc-edd7e28b-0"})(["",";"],e=>{let{theme:{space:t,color:n,rounded:i}}=e;return(0,s.css)(["display:flex;width:100%;padding:"," ",";border-radius:",";&:not(:last-child){margin-bottom:",";}&.unread{background:",";}&:hover{&:not(&.unread){background:",";}}"],t[16],t[12],i[8],t[4],n.system.highlight.weak,n.background.ghost)});let U=e=>{let{type:t,id:n,channel:l,video:a,timeAgo:o,text:s,bodyStatus:r,delete_reason:d,packageData:c,groupCount:u,groupData:p,closeLink:h,rulesLink:v,pinLink:f,groupDetailsAPI:g,showLink:x,status:b,onGroupClick:j,onGetNotifications:k}=e;return(0,i.jsxs)(R,{className:(0,m.dhh)({unread:"unread"===b}),"aria-label":(0,m.yH)(String(s)),tabIndex:0,children:[(0,i.jsx)(H,{type:t,channel:l,bodyStatus:r}),(0,i.jsx)(P,{type:t,id:n,channel:l,video:a,packageData:c,timeAgo:o,text:s,bodyStatus:r,delete_reason:d,groupCount:u,groupData:p,closeLink:h,rulesLink:v,pinLink:f,groupDetailsAPI:g,showLink:x,status:b,onGroupClick:j,onGetNotifications:k})]})},F=e=>(0,m.NqS)((0,m.oeL)(e)),G=e=>{let{data:t,isLoading:n}=(0,u.aM)({queryKey:[m.U7p.notifSubMenu,e],queryFn:()=>F(e),enabled:!!e,retry:5,gcTime:0});return{data:t,isLoading:n}};var D=s.default.div.withConfig({componentId:"sc-b019ba84-0"})(["",";"],e=>{let{theme:{space:t,color:n},$isModal:i}=e;return(0,s.css)(["position:",";right:0;left:0;top:0;bottom:0;z-index:3;background-color:",";.submenu-header{position:relative;padding:"," ",";border-bottom:1px solid ",";text-align:",";display:flex;align-items:center;.item{display:inline-flex;align-items:center;&:first-child{color:",";h4{margin-",":",";}}&:last-child{margin-",":auto;}}}.submenu-content{height:",";overflow:hidden scroll;margin-",":",";padding:",";&::-webkit-scrollbar{width:4px;background-color:transparent;}&::-webkit-scrollbar-thumb{background-color:",";border-radius:10px;}}.submenu-list{list-style:none;margin:0;padding:0;overflow:hidden;}"],i?"absolute":"static",n.background.base,t[16],t[24],n.border.light,t.right,n.element.bold,t.right,t[4],t.right,i?"50vh":"auto",t.left,t[4],t[12],n.element.weak)});let Z=e=>{let{title:t,apiLink:n,isModal:s,onClose:r}=e,{t:u}=(0,a.$G)(),{data:m,isLoading:p}=G(n),h=(0,l.useCallback)(()=>{var e;return(null==m?void 0:null===(e=m.data)||void 0===e?void 0:e.length)?m.data.map(e=>{let{act_type:t,id:n,delete_reason:l,time_ago:a,rules_link:o,body:s,video:{data:r},profile:{data:d}}=e;return(0,i.jsx)(U,{id:n,type:t,delete_reason:l,rulesLink:o,text:s,channel:d,timeAgo:a,video:r},"notif".concat(n))}):(0,i.jsx)(d,{type:"message",text:u("notifications:emptyMessages")})},[m]);return(0,i.jsxs)(D,{$isModal:s,children:[s&&(0,i.jsxs)("div",{className:"submenu-header",children:[(0,i.jsxs)("div",{className:"item",children:[(0,i.jsx)(x,{direction:"Right",...r&&{onClick:()=>r(!1)}}),(0,i.jsx)(o.ZT.Heading,{size:"h4",children:t})]}),(0,i.jsx)("div",{className:"item",children:(0,i.jsx)(g,{})})]}),(0,i.jsx)("div",{className:"submenu-content",children:(0,i.jsxs)("ul",{className:"submenu-list",children:[m&&(0,i.jsx)(h,{}),p&&(0,i.jsx)(c.o,{})]})})]})};function B(){let e=(0,L._)(["\n display: none;\n "]);return B=function(){return e},e}function q(){let e=(0,L._)(["\n margin-",": 0;\n width: 100%;\n "]);return q=function(){return e},e}function $(){let e=(0,L._)(["\n border-bottom: none;\n padding: "," "," ",";\n "]);return $=function(){return e},e}function Q(){let e=(0,L._)(["\n justify-content: space-between;\n\n &>.button,\n .link {\n width: 50%;\n .button {\n width: 100%;\n }\n }\n "]);return Q=function(){return e},e}var X=s.default.div.withConfig({componentId:"sc-4a0bdd79-0"})(["",";"],e=>{let{theme:{space:t,color:n,mediaQuery:i},$isModal:l}=e;return(0,s.css)(["background:",";.header{position:relative;display:flex;padding:"," ",";border-bottom:1px solid ",";border-color:",";.item-head{display:inline-flex;align-items:center;&:first-child{color:",";","}&:last-child{text-align:",";margin-",":auto;","}}"," .buttons-wrapper{","}}.body-list{height:",";overflow:hidden scroll;margin-",":",";padding:",";&::-webkit-scrollbar{width:4px;background-color:transparent;}&::-webkit-scrollbar-thumb{background-color:",";border-radius:10px;}&::-webkit-scrollbar-track{padding:10px;margin:10px;}.list{list-style:none;margin:0;padding:0;overflow:hidden;}.empty-box{padding:"," ",";text-align:center;img{max-width:170px;margin:0 auto ",";}span{display:block;color:",";}}}
1"],n.background.base,t[16],t[24],n.border.light,n.border.light,n.element.bold,i("xs","max")(B()),t.left,t.right,i("xs","max")(q(),t.right),i("xs","max")($(),t[16],t[16],t[12]),i("xs","max")(Q()),l?"50vh":"auto",t.left,t[4],t[12],n.element.weak,t[32],t[16],t[32],n.element.bold)});let K=e=>{var t,n,s;let{isModal:r=!1,setSettingData:u}=e,{t:m}=(0,a.$G)(),{data:p,isLoading:h}=f(r?"list":"listbytype"),v=null==p?void 0:null===(s=p.pages)||void 0===s?void 0:null===(n=s.at(0))||void 0===n?void 0:null===(t=n.meta)||void 0===t?void 0:t.read_all_link,[x,b]=(0,l.useState)(""),[j,k]=(0,l.useState)(""),[w,y]=(0,l.useState)(!0),_=(e,t)=>{b(e),k(t),y(!0)},N=()=>{b(""),k("")};(0,l.useEffect)(()=>{if(!r&&p){var e,t,n;let i=null==p?void 0:null===(n=p.pages)||void 0===n?void 0:null===(t=n.at(0))||void 0===t?void 0:null===(e=t.meta)||void 0===e?void 0:e.setting_notify;u&&i&&u(i)}},[p]);let C=(0,l.useCallback)(()=>{var e,t;if(h)return(0,i.jsx)(c.o,{});let n=null==p?void 0:null===(t=p.pages)||void 0===t?void 0:null===(e=t.map(e=>null==e?void 0:e.data))||void 0===e?void 0:e.flat();return(null==n?void 0:n.length)?(0,i.jsx)(l.Suspense,{fallback:(0,i.jsx)(c.o,{}),children:n.map(e=>{let t,{act_type:n,body:l,body_status:a,cnt_new_msg:o,time_ago:s,id:r,profile:d,video:c,link_details:u,close_link:m,rules_link:p,pin_link:h,show_link:v,type:f,sub_type:g,is_follow_group:x,extra_info:b,package:j}=e;return t="short_service_release"===g?"short_service_release":x?"channel_follow_group":n,(0,i.jsx)(U,{id:r,type:t,channel:null==d?void 0:d.data,video:null==c?void 0:c.data,packageData:j,timeAgo:s,text:l,bodyStatus:a,status:f,closeLink:m,rulesLink:p,pinLink:h,groupDetailsAPI:u,groupCount:o,groupData:b?{avatars:b}:void 0,showLink:v,onGroupClick:_},"notif".concat(r))})}):(0,i.jsx)(d,{type:"message",text:m("notifications:emptyNotifications")})},[p,h]),A=(0,l.useCallback)(()=>r?(0,i.jsx)(Z,{apiLink:x,isModal:r,title:j,onClose:N}):(0,i.jsx)(o.u_,{show:w,onClose:()=>y(!1),children:(0,i.jsx)(Z,{apiLink:x,isModal:r})}),[r,w,x,j]);return(0,i.jsxs)(i.Fragment,{children:[x&&(0,i.jsx)(A,{}),(0,i.jsxs)(X,{$isModal:r,children:[r&&(0,i.jsxs)("div",{className:"header",children:[(0,i.jsx)("div",{className:"item-head",children:(0,i.jsx)(o.ZT.Heading,{size:"h4",children:m("notifications:notifications")})}),(0,i.jsx)("div",{className:"item-head",children:(0,i.jsx)(l.Suspense,{fallback:null,children:(0,i.jsx)(g,{readAllLink:v})})})]}),(0,i.jsx)("div",{className:"body-list",children:(0,i.jsx)("ul",{className:"list",children:(0,i.jsx)(C,{})})})]})]})}},22865:function(e,t,n){n.d(t,{c:function(){return c}});var i=n(27573),l=n(7653),a=n(96),o=n(49104),s=n(49018),r=n(78399),d=r.default.div.withConfig({componentId:"sc-5bd51b68-0"})(["",""],e=>{let{theme:{space:t,mode:n,color:i}}=e;return(0,r.css)(["width:100%;display:flex;align-items:center;justify-content:center;padding:14px ",";border:1px solid ",";border-radius:10px;.mini-title{margin-right:",";color:",";}.label-text{max-width:fit-content;}.icon{fill:",";margin-",":6px;}&.non-bordered-item{border:none;}&.primary-item{background-color:",";.label-text{color:",";}.icon{fill:",";}&.sib-app-item .icon{fill:",";}}"],t[12],i.border.light,t[4],i.element.regular,i.element.bold,t.left,i.background.extraBold,i.element.inverted.bold,i.element.inverted.bold,"light"===n?"#eaf2ff":"#0047FF")});let c=e=>{let{items:t,onAppInstall:n}=e,{data:r,mutate:c,isPending:u}=(0,a.QTX)();(0,l.useEffect)(()=>{c({url:a.bVV.app.downloadConfig})},[c]);let m=(0,l.useMemo)(()=>(null==t?void 0:t.length)?t.map((e,l)=>{let{link:s,name:c,title:m,mini_title:p,icon:h}=e;return{id:c||m,disabled:"android-direct-link"===c&&u,content:(0,i.jsxs)(d,{className:(0,a.dhh)({"primary-item":0===l||4===l,"non-bordered-item":0===l||l===t.length-1,"sib-app-item":"ios-sib-app-link"===c}),children:[(0,i.jsx)(o.JO,{name:h,width:"20",height:"20"}),(0,i.jsx)(o.ZT.Label,{size:"medium",className:"label-text",children:m}),p&&(0,i.jsx)(o.ZT.Button,{size:"small",className:"mini-title",children:p})]}),onClick:()=>{var e,t,i,l;null==n||n();let a="android-direct-link"===c?(null==r?void 0:null===(t=r.data)||void 0===t?void 0:null===(e=t.android)||void 0===e?void 0:e.link)||(null==r?void 0:null===(l=r.data)||void 0===l?void 0:null===(i=l.andoridtv)||void 0===i?void 0:i.link):s;a&&window.open(a,"_blank")}}}):[],[r,u,t,n]);return(0,i.jsx)(s.q,{menuList:m,menuItemClassName:"app-dl-menu-item"})}},64066:function(e,t,n){n.r(t),n.d(t,{ProfileMenuV2:function(){return V}});var i=n(27573),l=n(96),a=n(51366),o=n(7653),s=n(65123),r=n(67837),d=n(12775),c=n(49104),u=n(12106),m=n(22865),p=n(56683),h=n(78399);function v(){let e=(0,p._)(["\n border-color: ",";\n "]);return v=function(){return e},e}var f=h.default.header.withConfig({componentId:"sc-6136f7c9-0"})(["",""],e=>{let{theme:{color:t,space:n,mediaQuery:i,dir:l},noBorderBottom:a}=e;return(0,h.css)(["&.profile-menu-header{display:flex;justify-content:space-between;align-items:center;padding:"," "," ",";border-bottom:",";padding-bottom:",";margin-bottom:",";margin-bottom:",";",";}&.single-header{border-bottom:none;}.none-login-header{",";}.user-info{.text-button{padding:0;}}.none-login-header{display:flex;width:100%;justify-content:space-between;align-items:center;background:transparent;border:0;padding:0;svg{fill:",";}.header-text{color:",";display:flex;flex-direction:column;justify-content:flex-start;align-items:flex-start;.header-sub-text{margin-top:",";}}}.user{display:flex;.profile-menu-avatar{display:flex;align-items:center;justify-content:center;}.user-info{padding-",":",";}}.user-name{margin-bottom:",";}.user-mask-number{direction:ltr;font-size:12px;margin-bottom:",";color:",";}.go-channels{border-radius:0px;.button{border-radius:0px;}}.go-channels > .icon,.go-channels > .content{color:",";fill:",";}
1.icon-verified{fill:",";}"],n[16],n[24],n[12],a?"none":"solid 1px ".concat(t.border.light),n[8],n[8],a?"".concat(n[8]):"0px",i("xs","max")(v(),t.border.light),"rtl"===l?"margin-".concat(n.right,": ").concat(n[16],";"):"margin-".concat(n.left,": ").concat(n[16],";"),t.element.bold,t.element.bold,n[4],n.right,n[16],n[4],n[4],t.element.bold,t.element.bold,t.element.bold,t.element.bold)});let g=e=>{let{userName:t,userImage:n,switchAccount:a,maskNumber:r,maskEmail:d,hasOtherAccounts:u}=e,{t:m}=(0,s.$G)(),p=(0,l.s68)(e=>e.isLogin),h=(0,l.s68)(e=>e.openAuthModal),v=()=>{h()},g=(0,o.useCallback)(()=>(0,i.jsxs)("div",{className:"user",children:[(0,i.jsx)(c.rU,{className:"profile-menu-avatar",href:(0,l.qXE)("/".concat(t)),children:(0,i.jsx)(c.qE,{src:n,size:"semiLarge",alt:t,state:n?"custom":"default"})}),(0,i.jsxs)("div",{className:"user-info",children:[(0,i.jsx)(c.ZT.Heading,{size:"h3",className:"user-name",children:(0,l.gb6)(t)}),a&&(0,i.jsx)(c.ZT.Heading,{size:"h3",className:"user-mask-number",children:(0,l.gb6)(r||d||"")}),!a&&(0,i.jsx)(c.zx,{size:"small",startIcon:"Launch",className:"go-channels",buttonType:"natural",variant:"transparent",href:(0,l.qXE)("/".concat(t)),text:m("common:profileMenu.seeChannel")})]})]}),[d,r,a,m,n,t]),x=(0,o.useCallback)(()=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(c.qE,{size:"huge",state:"default"}),(0,i.jsxs)("button",{type:"button",onClick:v,className:"none-login-header",children:[(0,i.jsxs)("div",{className:"header-text",children:[(0,i.jsx)(c.ZT.Heading,{size:"h3",children:m("common:profileMenu.loginOrSignUp")}),(0,i.jsx)(c.ZT.Button,{size:"small",className:"header-sub-text",children:m("common:profileMenu.inAparat")})]}),(0,i.jsx)(c.JO,{width:"20",height:"20",name:"Left"})]})]}),[m]);return(0,i.jsxs)(f,{className:(0,l.dhh)("profile-menu-header",{"mobile-profile-menu-header":!p,"single-header":!p}),noBorderBottom:a&&u,children:[p?(0,i.jsx)(g,{}):(0,i.jsx)(x,{}),a&&(0,i.jsx)(c.JO,{name:"Verified",className:"icon-verified",width:"20px",height:"20px"})]})};var x=n(49018);function b(){let e=(0,p._)(["\n margin-",": ",";\n "]);return b=function(){return e},e}function j(){let e=(0,p._)(["\n padding: 10px !important;\n "]);return j=function(){return e},e}var k=h.default.div.withConfig({componentId:"sc-b0ce6702-0"})(["",";"],e=>{let{theme:{space:t,color:n,mediaQuery:i}}=e;return(0,h.css)(["width:100%;margin-top:",";margin-bottom:",";margin-",":",";display:flex;flex-direction:column;position:relative;border-bottom:1px solid ",";"," .title-wrapper{width:100%;display:flex;flex-direction:row;align-items:center;color:",";padding:"," 20px;margin-bottom:",";.menu-list-title{white-space:nowrap;margin-",":",";}.line{height:1px;width:100%;background:",";}}.theme-switcher-item{padding:10px !important;min-height:40px;border-radius:",";&:not(:last-child){margin-bottom:6px;}.icon-start,.icon-end{font-size:20px;}.icon-end{margin-",":auto;}&:has(.icon-end){background:",";}","}"],t[4],t[4],t.right,t[8],n.border.light,i("xs","max")(b(),t.right,t[4]),n.element.regular,t[4],t[8],t.left,t[4],n.border.light,t[8],t.right,n.background.weak,i("xs","max")(j()))});let w=e=>{let{items:t}=e,{t:n}=(0,s.$G)(),a=(0,l.s68)(e=>e.theme),r=(0,l.s68)(e=>e.setTheme),[d,c]=(0,o.useState)(),u=e=>{l.QkP.set(l.y$h.THEME,e,l.jyl)},m=()=>{var e,t;return(null===(t=window)||void 0===t?void 0:null===(e=t.matchMedia("(prefers-color-scheme: dark)"))||void 0===e?void 0:e.matches)?"dark":"light"},p=e=>{(0,l.qQZ)(l.dAu.SELECTED_THEME,e)},h=e=>{let t=a;switch(e){case"devices":t=m(),c("devices"),p("system");break;case"brightness":t="light",c("brightness"),p("light");break;case"darkness":t="dark",c("darkness"),p("dark")}u(t),r(t)},v=(0,o.useMemo)(()=>null==t?void 0:t.map(e=>({id:"theme-switcher-".concat(null==e?void 0:e.icon),text:null==e?void 0:e.title,iconStart:(0,l.VFE)(null==e?void 0:e.icon),iconEnd:(null==e?void 0:e.icon)===d?"Tick":void 0,onClick:()=>h(null==e?void 0:e.icon)})),[d,t]),f=e=>{switch(e){case"dark":return"darkness";case"light":return"brightness";default:return"devices"}};return(0,o.useEffect)(()=>{var e;let t=null!==(e=l.QkP.get(l.y$h.THEME))&&void 0!==e?e:(0,l.$oy)(l.dAu.SELECTED_THEME);t?c(f(t)):c("light"===a?"brightness":"darkness")},[a]),(0,i.jsx)(k,{children:(0,i.jsx)(x.q,{title:n("common:profileMenu.aparatAppearance"),menuList:v,menuItemClassName:"theme-switcher-item"})})};function y(){let e=(0,p._)(["\n display: none;\n "]);return y=function(){return e},e}function _(){let e=(0,p._)(["\n &:not(.no-hover):hover {\n background-color: ",";\n }\n "]);return _=function(){return e},e}let N=h.default.button.withConfig({componentId:"sc-942c6419-0"})(["",""],e=>{let{theme:{color:t}}=e;return(0,h.css)(["position:relative;display:inline-flex;appearance:none;border:0;padding:0;background-color:transparent;.red-dot{width:10px;height:10px;border-radius:50%;background-color:",";position:absolute;top:0;left:0;border:1px solid ",";}"],t.theme.aparat.regular,t.background.base)}),C=h.default.div.withConfig({componentId:"sc-942c6419-1"})(["",""],e=>{let{theme:{color:t,space:n,mediaQuery:i}}=e;return(0,h.css)([".desktop-active-head{display:flex;align-items:center;padding:5px 17px;.button{width:fit-content;}}.menu-item{display:flex;text-align:",";width:100%;position:relative;padding:"," ",";&:first-child:not(.is-submenu):not(.is-theme):not(.isNoLoginSetting){padding-top:",";}&:last-child:not(.is-submenu):not(.is-theme){padding-bottom:",";}&.has-border{padding-bottom:",";margin-bottom:",";&::after{content:'';position:absolute;width:calc(100% - ",");height:0;border-bottom:solid 1px ",";left:",";right:",";bottom:0;","}}&.is-submenu{border-bottom:solid 1px ",";}&.is-theme{.menu-list,.menu-wrapper{display:block;width:100%;}.title-wrapper{width:100%;display:flex;flex-direction:row;align-items:center;color:",";.menu-list-title{white-space:nowrap;margin-",":",";}.line{height:1px;width:100%;background:",";}}}&.notifs{padding-bottom:",";}.menu-button{display:flex;align-items:center;width:100%;gap:",";padding:11px 12px;border:none;background:transparent;cursor:pointer;color:inherit;}.button{padding:11px 12px;","}.button:not(.back-btn){display:flex;width:100%;justify-content:start;.icon{min-width:20px;}&:not(.theme-btn) > span{flex:1;text-align:",";}}.link{width:100%;}}"],n.right,n[4],n[16],n[16],n[16],n[8],n[4],n[24],t.border.light,
1n[16],n[16],i("xs","max","list")(y()),t.border.light,t.element.regular,n.left,n[4],t.border.light,n[16],n[8],i("sm","min","list")(_(),t.background.ghost),n.right)});var A=h.default.div.withConfig({componentId:"sc-bebd5b24-0"})(["",";"],e=>{let{theme:{color:t,space:n}}=e;return(0,h.css)([".back-btn{& + .text-button{padding-",":0;}}.notif-badge{margin-",":",";}.heading{color:",";&.other-heading{padding:",";& ~ .menu-item:nth-child(7){padding-bottom:",";}}&.has-border{border-top:solid 1px ",";padding-top:20px;}}.mini-title{margin-right:",";color:",";}.accounts-wrapper{padding:0px ",";}.accounts-main{border-bottom:solid 1px ",";}.account-item{padding:"," 0px "," 0px;display:flex;align-items:center;gap:12px;}.account-info{display:flex;flex-direction:column;align-items:start;margin-right:12px;}.content{display:flex;}.app-dl-items{padding-top:",";padding-bottom:",";}.account-name{font-weight:500;line-height:24px;color:",";}.account-username{font-size:12px;opacity:0.7;direction:ltr;color:",";}.switch-btn{display:flex;height:60px;width:100%;justify-content:start;}.line-wrapper{width:100%;display:flex;flex-direction:row;align-items:center;color:",";.label-text{white-space:nowrap;margin-",":",";}.line{height:1px;width:100%;background:",";}}"],n.right,n.right,n[4],t.element.bold,n[12],n[16],t.border.light,n[4],t.element.regular,n[16],t.border.light,n[16],n[12],n[8],n[16],t.element.bold,t.element.regular,t.element.regular,n.left,n[4],t.background.ghost)});let M=e=>{var t,n,a,p,h;let{items:v,openSubmenu:f=()=>{},openNotifications:x=()=>{},closeNotifications:b=()=>{},isMobile:j,accounts:k}=e,{t:y}=(0,s.$G)(),_=(0,l.s68)(e=>e.isLogin),N=(0,l.s68)(e=>e.lang),M=(0,l.s68)(e=>e.profileOppenedMenu.activeMenu),z=(0,l.s68)(e=>e.setShowProfileSubMenu),L=(0,l.s68)(e=>e.setOpenedProfileMenu),T=(0,o.useRef)(null),I=(0,d.NL)(),{data:E,refetch:S}=(0,l.Gi)(),P=null==E?void 0:null===(n=E.data)||void 0===n?void 0:null===(t=n.profileInformation)||void 0===t?void 0:t.data,O=null==E?void 0:null===(h=E.data)||void 0===h?void 0:null===(p=h.profileInformation)||void 0===p?void 0:null===(a=p.data)||void 0===a?void 0:a.message_cnt,V=Object.values(k||{}).filter(e=>!e.current_user),H=Object.values(k||{}).some(e=>!e.current_user),R=(null==M?void 0:M.name)==="switch",{mutate:U}=(0,l._y5)(e=>{e&&(r.N_.getInstance().remove("AuthV1"),S(),I.invalidateQueries({queryKey:[l.U7p.videoCSR]}),window.location.href=l.Z6p.home)}),{data:F,mutate:G}=(0,l.QTX)(),D=e=>{if((null==e?void 0:e.sub_menu)&&(null==M?void 0:M.name)===(null==e?void 0:e.name))return;(null==e?void 0:e.name)==="logout"&&U(),(null==e?void 0:e.sub_menu)&&f(e.name);let t=null==e?void 0:e.sub_menu,n=null==e?void 0:e.sub_menu_2,i=n?[...t,...n]:t;t&&(z(!0),L({data:i,activeMenu:{title:null==e?void 0:e.title,name:null==e?void 0:e.name}}))},Z=()=>{var e,t,n,i,l,a,o;if(j){(null==M?void 0:M.name)==="notifications"?b():x();return}let s=null==E?void 0:null===(i=E.data)||void 0===i?void 0:null===(n=i.dashboardV2Menu)||void 0===n?void 0:null===(t=n.data)||void 0===t?void 0:null===(e=t.menu)||void 0===e?void 0:e.find(e=>(null==e?void 0:e.name)==="settings");if((null==M?void 0:M.name)==="notifications"){L({data:null==s?void 0:s.sub_menu,activeMenu:{title:null==s?void 0:s.title,name:"settings"}});return}L({data:null==E?void 0:null===(o=E.data)||void 0===o?void 0:null===(a=o.dashboardV2Menu)||void 0===a?void 0:null===(l=a.data)||void 0===l?void 0:l.mini_menu,activeMenu:{title:y("common:header.notifications"),name:"notifications"}})},B=e=>{G({url:"".concat(l.bVV.switchAccounts,"?userid=").concat(e),method:"POST"})},q=(0,o.useCallback)(()=>(null==M?void 0:M.name)==="switch"||(j?!M||(null==M?void 0:M.name)==="settings":!M),[j,M]),$=(0,o.useCallback)(e=>{let t=(null==e?void 0:e.link)&&(null==e?void 0:e.name)!=="logout"?null==e?void 0:e.link:"";return(0,i.jsx)("div",{className:(0,l.dhh)("menu-item","menu-item-".concat(null==e?void 0:e.name),{isNoLoginSetting:(null==e?void 0:e.name)==="settings","has-border":!M&&!j&&["settings","stats"].includes(null==e?void 0:e.name)||["ads","stats","income","addOutlined"].includes(null==e?void 0:e.name)||j&&(null==e?void 0:e.name)==="addOutlined",isLang:(null==e?void 0:e.icon)===N}),children:(0,i.jsx)(c.zx,{buttonType:"natural",variant:"transparent",startIcon:(null==e?void 0:e.icon)===N?"Tick":(0,l.VFE)(null==e?void 0:e.icon),size:"medium",className:"text-btn",text:(null==e?void 0:e.title)?(0,i.jsxs)(i.Fragment,{children:[e.title,(null==e?void 0:e.mini_title)&&(0,i.jsxs)("span",{className:"mini-title",children:[" ",e.mini_title]})]}):null,endIcon:(null==e?void 0:e.sub_menu)?"Left":void 0,href:t||void 0,...!!t&&{rel:"noopener noreferrer",target:"_self"},...!t&&{onClick:()=>D(e)}})})},[N,M,j]);return(0,o.useEffect)(()=>{(null==F?void 0:F.data)&&(S(),window.location.href=l.Z6p.home)},[F]),(0,i.jsxs)(A,{className:"mobile-content",ref:T,children:[q()&&(0,i.jsx)(g,{userName:(null==P?void 0:P.username)||(null==P?void 0:P.name),maskNumber:null==P?void 0:P.mask_mobile_val
1id_local,maskEmail:null==P?void 0:P.mask_email,userImage:null==P?void 0:P.pic_s,switchAccount:R,hasOtherAccounts:H}),(0,i.jsxs)(C,{className:"profile-menu-content-items",children:[(null==M?void 0:M.name)==="switch"&&V.length>0&&(0,i.jsx)("div",{className:j?"accounts-wrapper-mobile":"accounts-wrapper",children:(0,i.jsxs)("div",{className:"accounts-main",children:[(0,i.jsxs)("div",{className:"line-wrapper",tabIndex:0,children:[(0,i.jsx)(c.ZT.Label,{size:"small",children:y("common:profileMenu.otherAccounts")}),(0,i.jsx)("div",{className:"line"})]}),V.map((e,t)=>(0,i.jsx)("div",{className:"account-item",children:(0,i.jsxs)("button",{type:"button",className:"switch-btn menu-button",onClick:()=>B(e.id||""),children:[(0,i.jsx)(c.qE,{src:e.pic_m,size:"small",alt:e.username,state:e.pic_m?"custom":"default"}),(0,i.jsxs)("div",{className:"account-info",children:[(0,i.jsx)("div",{className:"account-name",children:e.username}),(0,i.jsx)("div",{className:"account-username",children:e.mask_mobile_valid_local||e.mask_email})]})]})},t))]})}),(null==M?void 0:M.name)==="installAppAparat"&&(0,i.jsx)("div",{className:"menu-item app-dl-items",children:(0,i.jsx)(m.c,{items:v.map(e=>{var t;return{name:e.name,title:e.title,mini_title:null!==(t=e.mini_title)&&void 0!==t?t:void 0,link:e.link,icon:(0,l.VFE)(e.icon)}})})}),(null==M?void 0:M.name)!=="notifications"&&(null==M?void 0:M.name)!=="installAppAparat"&&(null==v?void 0:v.map((e,t)=>(0,i.jsxs)(o.Fragment,{children:[(null==M?void 0:M.name)==="other_services"&&0===t&&j&&(0,i.jsx)(c.ZT.Heading,{size:"h4",className:"other-heading",children:y("common:profileMenu.otherServices")}),(null==M?void 0:M.name)==="other_services"&&6===t&&j&&(0,i.jsx)(c.ZT.Heading,{size:"h4",className:"has-border other-heading",children:y("common:profileMenu.aboutAparat")}),(null==e?void 0:e.name)!=="theme"&&(null==e?void 0:e.name)!=="logout"&&(null==e?void 0:e.name)!=="notify"&&$(e),(null==e?void 0:e.name)==="settings"&&(null==e?void 0:e.sub_menu)&&j&&_&&(0,i.jsx)("div",{className:"menu-item notifs",children:(0,i.jsx)(c.zx,{buttonType:"natural",variant:"transparent",startIcon:"Notif",size:"medium",className:"text-btn",endIcon:"Left",text:(0,i.jsxs)(i.Fragment,{children:[y("common:header.notifications"),O>0&&(0,i.jsx)(c.Ct,{className:"notif-badge",variant:"alert",size:"small",text:String(O)})]}),onClick:Z})})]},"item-".concat(t+1)))),(null==v?void 0:v.some(e=>(null==e?void 0:e.name)==="theme"))&&(null==M?void 0:M.name)!=="installAppAparat"&&(0,i.jsx)("div",{className:"menu-item is-theme",children:(0,i.jsx)(w,{items:null==v?void 0:v.filter(e=>(null==e?void 0:e.name)==="theme")})}),(null==v?void 0:v.some(e=>(null==e?void 0:e.name)==="logout"))&&(null==M?void 0:M.name)!=="installAppAparat"&&$(v.find(e=>(null==e?void 0:e.name)==="logout")),(null==M?void 0:M.name)==="notifications"&&j&&(0,i.jsx)("div",{className:"mobile-notifs",children:(0,i.jsx)(u.NotificationsV2,{isModal:!0})})]})]})},z=e=>{var t,n;let{onClick:a,showProfileMenu:o,hasUnreadNotifications:r}=e,{t:d}=(0,s.$G)(),{data:u}=(0,l.Gi)(),m=null==u?void 0:null===(n=u.data)||void 0===n?void 0:null===(t=n.profileInformation)||void 0===t?void 0:t.data,p=(0,l.s68)(e=>e.deviceSize);return(0,i.jsxs)(N,{"aria-label":d("accessibilityLabel.myChannelData"),"aria-expanded":o,onClick:e=>{null==a||a(e)},children:[(0,i.jsx)(c.qE,{src:null==m?void 0:m.pic_m,size:"mobile"===p||"tablet"===p?"small":"medium",alt:null==m?void 0:m.username,state:(null==m?void 0:m.pic_m)?"custom":"default"}),r&&(0,i.jsx)("span",{className:"red-dot"})]})};var L=h.default.div.withConfig({componentId:"sc-5921c94e-0"})(["",""],e=>{let{theme:{space:t}}=e;return(0,h.css)(["position:relative;display:inline-flex;align-items:center;.dropdown-panel{position:absolute;inset-inline-end:0;top:calc(100% + ",");z-index:100001;.dropdown{position:relative;top:0;left:0;right:auto;padding:0;}}"],t[8])});let T=e=>{let{className:t,trigger:n,width:a="280px",onOpen:s,onClose:r,children:d}=e,[u,m]=(0,o.useState)(!1),p=(0,o.useRef)(null);(0,l.t$X)(p,()=>{u&&(m(!1),null==r||r())});let h=()=>{let e=!u;if(m(e),e){null==s||s();return}null==r||r()},v=(0,o.cloneElement)(n,{onClick:e=>{var t,i;null===(t=(i=n.props).onClick)||void 0===t||t.call(i,e),h()},className:(0,l.dhh)(n.props.className,{"is-open":u}),showProfileMenu:u});return(0,i.jsxs)(L,{ref:p,className:(0,l.dhh)("profile-dropdown",t),children:[v,u&&(0,i.jsx)("div",{className:"dropdown-panel",children:(0,i.jsx)(c.Lt,{show:!0,width:a,children:d})})]})},I=()=>{var e,t,n,a;let o=(0,l.s68)(e=>e.openAuthModal),s=(0,l.s68)(e=>e.isLogin),{data:r}=(0,l.Gi)(),d=null==r?void 0:null===(n=r.data)||void 0===n?void 0:null===(t=n.dashboardV2Menu)||void 0===t?void 0:null===(e=t.data)||void 0===e?void 0:e.menu,u=(0,l.s68)(e=>e.setOpenedProfileMenu),m=(0,l.s68)(e=>e.profileOppenedMenu.data),p=(0,l.s68)(e=>e.profilePrevOpennedMenu.data),h=(0,l.s68)(e=>e.profileOppenedMenu.activeMenu),v=(0,l.s68)(e=>e.profilePrevOpennedMenu.prevActiveMenu),f=null==d?void 0:null===(a=d.find(e=>"switch"===e.name))||void 0===a?void 0:a.accounts;return(0,i.jsxs)(T,{width:"280px",trigger:(0,i.jsx)(z,{}),onOpen:()=>
1{if(s){u({data:d,activeMenu:null});return}o()},children:[(0,i.jsx)(C,{children:h&&(0,i.jsx)("div",{className:"menu-item is-submenu desktop-active-head",children:(0,i.jsx)(c.zx,{buttonType:"natural",variant:"transparent",startIcon:"Back",size:"medium",className:"back-btn text-btn no-hover",text:null==h?void 0:h.title,onClick:()=>{(null==p?void 0:p.length)<5?u({data:d,activeMenu:null}):u({data:p,activeMenu:v})}})})}),(0,i.jsx)(M,{items:m,isMobile:!1,accounts:f})]})};var E=h.default.div.withConfig({componentId:"sc-53b80111-0"})(["",""],e=>{let{theme:{color:t,space:n}}=e;return(0,h.css)(["display:flex;height:100%;.mobile-header{width:100%;display:flex;justify-content:space-between;align-items:center;.header-cell{width:100%;}.header-btn{border-bottom:solid 1px ",";width:100%;}.text-btn{margin-bottom:",";}}.mobile-profile-menu{width:100%;z-index:4;background-color:",";height:100%;overflow:hidden;body.has-vpn-banner &{height:calc(100vh - ",");}.profile-menu-content{height:100%;position:relative;display:flex;flex-direction:column;overflow-y:auto;-webkit-overflow-scrolling:touch;.mobile-content{.title-wrapper{padding:"," 20px;margin-bottom:",";}.menu-item{padding:"," ",";&:not(:last-child){margin-bottom:0;}&.has-border{margin-bottom:",";border-bottom:solid 1px ",";}.content{padding:10px ",";}&.notification{.label-text{flex:unset;}.icon-left{margin-",":auto;}}}}.social-list{padding-right:25px;padding-left:25px;}}}.user-info{padding-right:16px;text-align:end;}.upload-btn-wrap{border-top:solid 1px ",";background-color:",";padding:",";margin-top:auto;.upload-btn{width:100%;}}.line-wrapper{margin-right:12px;}.account-info{margin-right:12px;}.account-item{margin-right:12px;margin-left:12px;}"],t.border.light,n[8],t.background.base,e=>{let{theme:{vpnBannerHeight:t}}=e;return t},n[4],n[8],n[8],n[12],n[8],t.border.light,n[12],n.right,t.border.light,t.background.base,n[12])});let S={switch:"profile_switch",settings:"profile_settings",other_services:"profile_other_services",installAppAparat:"profile_installAppAparat",about_aparat:"profile_about_aparat",notifications:"profile_notifications",notify:"profile_notifications"},P=()=>window.history.state&&"object"==typeof window.history.state?{...window.history.state}:{},O=()=>{var e,t,n,r,d,u,m;let{t:p}=(0,s.$G)(),h=(0,l.jDj)(),{data:v}=(0,l.Gi)(),f=(0,o.useRef)(null),g=(0,o.useRef)(null),[x,b]=(0,l.te0)("profile"),[j,k]=(0,l.te0)("profile_switch"),[w,y]=(0,l.te0)("profile_settings"),[_,N]=(0,l.te0)("profile_notifications"),[C,A]=(0,l.te0)("profile_about_aparat"),[L,T]=(0,l.te0)("profile_installAppAparat"),[I,O]=(0,l.te0)("profile_other_services"),V=null==v?void 0:null===(n=v.data)||void 0===n?void 0:null===(t=n.profileInformation)||void 0===t?void 0:null===(e=t.data)||void 0===e?void 0:e.message_cnt,H=x||j||w||_||C||L||I;(0,l.yi1)(H,a.AV);let R=(null==v?void 0:null===(u=v.data)||void 0===u?void 0:null===(d=u.dashboardV2Menu)||void 0===d?void 0:null===(r=d.data)||void 0===r?void 0:r.mini_menu)||[],U=(0,l.s68)(e=>e.profileOppenedMenu.data),F=(0,l.s68)(e=>e.profilePrevOpennedMenu.data),G=(0,l.s68)(e=>e.profileOppenedMenu.activeMenu),D=(0,l.s68)(e=>e.profilePrevOpennedMenu.prevActiveMenu),Z=(0,l.s68)(e=>e.setOpenedProfileMenu),B=(0,l.s68)(e=>e.setShowProfileSubMenu),q=null==R?void 0:null===(m=R.find(e=>"switch"===e.name))||void 0===m?void 0:m.accounts,$=(0,o.useCallback)(()=>{B(!1),Z({data:R,activeMenu:null})},[R,Z,B]),Q=(0,o.useCallback)(()=>{let e=null==R?void 0:R.find(e=>(null==e?void 0:e.name)==="settings");Z({data:null==e?void 0:e.sub_menu,activeMenu:{title:null==e?void 0:e.title,name:"settings"}})},[R,Z]),X=(0,o.useCallback)(()=>{let e=P();(0,l.LY0)(),window.history.replaceState(e,"",window.location.pathname+window.location.search),k(!1),y(!1),N(!1),A(!1),T(!1),O(!1),b(!1),$()},[$,A,T,b,N,O,y,k]),K=(0,o.useCallback)(e=>{if((null==G?void 0:G.name)!==e)switch(e){case"switch":k(!0);break;case"settings":y(!0);break;case"other_services":O(!0);break;case"installAppAparat":T(!0);break;case"about_aparat":A(!0);break;case"notifications":case"notify":N(!0)}},[null==G?void 0:G.name,A,T,N,O,y,k]),J=(0,o.useCallback)(()=>{let e=(null==G?void 0:G.name)?S[G.name]:void 0;if(e&&window.location.hash==="#".concat(e)){window.history.back();return}if(!(null==D?void 0:D.name)){Z({data:R,activeMenu:null});return}Z({data:F,activeMenu:D})},[null==G?void 0:G.name,R,D,F,Z]),Y=(0,o.useCallback)(()=>{N(!0),Z({data:R,activeMenu:{title:p("common:header.notifications"),name:"notifications"}})},[R,N,Z,p]),W=(0,o.useCallback)(()=>{N(!1),Q()},[Q,N]);(0,o.useEffect)(()=>{w||(null==G?void 0:G.name)!=="settings"||$(),j||(null==G?void 0:G.name)!=="switch"||$(),C||(null==G?void 0:G.name)!=="about_aparat"||$(),L||(null==G?void 0:G.name)!=="installAppAparat"||$(),I||(null==G?void 0:G.name)!=="other_services"||$(),_||(null==G?void 0:G.name)!=="notifications"&&(null==G?void 0:G.name)!=="notify"||Q()},[null==G?void 0:G.name,C,L,_,I,w,j,Q,$]),(0,o.useEffect)(()=>
1{if(null===g.current){g.current=h;return}g.current!==h&&(g.current=h,H&&X())},[h,H,X]),(0,o.useEffect)(()=>{H?document.documentElement.style.overflowY="hidden":document.documentElement.style.overflowY="scroll"},[H]);let ee=(0,o.useCallback)(()=>(0,i.jsx)("div",{className:"header-btn",children:(0,i.jsx)(c.zx,{buttonType:"natural",variant:"transparent",startIcon:"Back",size:"medium",className:"text-btn",text:null==G?void 0:G.title,onClick:J})}),[null==G?void 0:G.title,J]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(z,{showProfileMenu:H,onClick:()=>{H?X():(b(!0),Z({data:R,activeMenu:null}))},hasUnreadNotifications:!!V&&Number(V)>0}),(0,i.jsx)(c.u_,{show:H,onClose:X,hasBottomSheet:!0,hasGrip:!0,height:528,scrollable:!0,children:(0,i.jsx)(E,{children:(0,i.jsxs)("div",{className:"mobile-profile-menu",ref:f,children:[(0,i.jsx)("header",{className:"mobile-header",children:(0,i.jsx)("div",{className:"header-cell",children:(null==U?void 0:U.length)>0&&G&&(0,i.jsx)(ee,{})})}),(0,i.jsxs)("div",{className:"profile-menu-content",children:[(0,i.jsx)(M,{items:null!=U?U:R,openSubmenu:K,openNotifications:Y,closeNotifications:W,accounts:q,isMobile:!0}),!G&&(0,i.jsx)("div",{className:"upload-btn-wrap",children:(0,i.jsx)(c.zx,{buttonType:"natural",variant:"primary",startIcon:"Upload",className:"upload-btn",text:p("common:header.uploadVideo"),href:(0,l.qXE)(l.Z6p.newUpload)})})]})]})})})]})},V=()=>{let e=(0,l.s68)(e=>e.deviceSize);return(0,l.eIi)(a.AV.sm.min)||"mobile"===e?(0,i.jsx)(O,{}):(0,i.jsx)(I,{})}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.