1 line
119 KiB
Plaintext
1 line
119 KiB
Plaintext
"use strict";(self.webpackChunkdouyin_web=self.webpackChunkdouyin_web||[]).push([["52587"],{363884:function(e,t,n){n(490629);var i=n(320165),o=n(101199),a=n(849023),l=n(664681),s=n(670299),r=n(988805),c=n(286066);let u=n(856652).i1.GROUP_CHAT,d=(0,a.observer)(function(e){let{converSationListOrigin:t,curUserInfo:n,theme:a,userInfoFromServerMap:d}=c.Z,{conversation:_,uid:v,conversationId:p,isGroup:f}=e,[E,m]=(0,o.useState)();if((0,o.useEffect)(()=>{_?m(_):(null==t?void 0:t.length)&&(f?p&&m(t.find(e=>e.id===p)):v&&m(t.find(e=>e.toParticipantUserId===v)))},[t,_,f,p,v]),!E)return null;let{toParticipantUserId:h}=E,g=null==d?void 0:d[h],I=(null==g?void 0:g.follow_status)===r.$u.FollowEach;return(0,i.jsx)(l.S,{platform:s.i.WEB,theme:a,isFollowEach:I,conversation:E,isGroup:(null==E?void 0:E.type)===u,close_consecutive_chat:null==n?void 0:n.close_consecutive_chat,needSyncClientCloseConsecutiveChat:!0})});t.Z=d},34841:function(e,t,n){n.d(t,{n:function(){return m}});var i=n(629686),o=n(402748),a=n(811603);n(490629),n(683656),n(759943);var l=n(320165),s=n(101199),r=n(431356),c=n.n(r),u=n(469935),d=n.n(u),_=n(766409),v=n(519877),p=n(184644),f=n(901540),E=n(598444);let m=(0,s.forwardRef)((e,t)=>{let{className:n,srcList:r,size:u,style:m,uniqKey:h,onClick:g,onLoad:I,needCenterZoom:O=!1,sendUseLog:C,abTestData:M}=e,N=(0,a._)(e,["className","srcList","size","style","uniqKey","onClick","onLoad","needCenterZoom","sendUseLog","abTestData"]),[T,L]=(0,s.useState)(r),[w,S]=(0,s.useState)(null),[R,y]=(0,s.useState)({}),[A,D]=(0,s.useState)(!1),x=(0,s.useRef)(0),b=(0,s.useRef)(!1),k=(0,s.useRef)(!1),U=async e=>{if(!e||b.current)return;b.current=!0;let[t,n]=await (0,E.Z)((0,v.FF)(e));if(t)return;let i=null==n?void 0:n.UrlList;(null==i?void 0:i.length)&&(x.current=0,L(i))},G=(0,s.useCallback)(e=>{D(!1),S(e)},[]),j=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(e&&D(!0),!c()(T)){e&&U(T);return}let t=x.current;t<T.length?(G(T[t]),x.current++):e&&U(T[0])};if((0,s.useEffect)(()=>{L(r)},[r]),(0,s.useEffect)(()=>{c()(T)?j():!(null==R?void 0:R[h])&&G(T)},[T]),!w)return(0,l.jsx)("div",(0,o._)((0,i._)({},N),{ref:t,onClick:g,style:m,className:d()(p.default.imgReal,n)}));let F=(0,f.Z)(String(w)).replace("https://p1.pstatp.","https://sf1-cdn-tos.douyinstatic.").replace("https://p3.pstatp.","https://sf3-cdn-tos.douyinstatic.").replace("https://p6.pstatp.","https://sf6-cdn-tos.douyinstatic.").replace("https://p9.pstatp.","https://sf6-cdn-tos.douyinstatic.");return(u&&(F=F.replace(/~\d+x\d+\.image$/,`~${u}.image`).replace(/~noop\.image$/,`~${u}.image`)),F&&h&&y((0,o._)((0,i._)({},R),{[h]:F})),A)?(0,l.jsx)("div",(0,o._)((0,i._)({},N),{ref:t,onClick:g,style:m,className:d()(p.default.imgReal,n)})):O?(0,l.jsx)(_.k,(0,o._)((0,i._)({},N),{ref:t,onClick:g,style:m,onLoad:I,className:d()(p.default.imgReal,n),src:F,onError:j,onMouseEvent:e=>{!k.current&&"wheel"===e&&(null==C||C(),k.current=!0)}})):(0,l.jsx)("img",(0,o._)((0,i._)({},N),{ref:t,onClick:g,style:m,onLoad:I,className:d()(p.default.imgReal,n),src:F,onError:j}))})},867373:function(e,t,n){n.d(t,{C9:function(){return I},RP:function(){return g},Uo:function(){return m},bf:function(){return E},dy:function(){return h},lk:function(){return O},vW:function(){return p},wq:function(){return f}}),n(414931),n(706056),n(683656),n(759943),n(656562),n(992871),n(490629);var i=n(361073),o=n.n(i),a=n(720709),l=n(101199),s=n(851504),r=n(914278),c=n(286066),u=n(998629),d=n(209998),_=n(839977),v=n(949868).Buffer;function p(e){var t;let{sender:n}=e,i=(0,_.Z)(n),{nickname:o,remark_name:a}=(null===c.Z||void 0===c.Z?void 0:null===(t=c.Z.userInfoFromServerMap)||void 0===t?void 0:t[n])||{};return a||i||o}function f(e){let{referenceInfo:t}=e;if(!t)return"";try{var n;let{hint:e}=t,{refmsg_uid:i}=JSON.parse(e),{nickname:o,remark_name:a}=(null===c.Z||void 0===c.Z?void 0:null===(n=c.Z.userInfoFromServerMap)||void 0===n?void 0:n[i])||{},l=(0,_.Z)(i);return`${a||l||o||""}`}catch(e){return""}}function E(e){let{referenceInfo:t}=e;if(!t)return"";try{let{hint:n,ref_message_type:i}=t,{content:a}=JSON.parse(n),l=o().fromValue(i).toString(),s="";switch(Number(l)){case u.pp.TEXT:s=a;break;case u.pp.CHANGE_STORY_PICTURE:case u.pp.STORY_PICTURE_ONCE_VIEW:case u.pp.STORY_PICTURE:s="[图片]";break;case u.pp.BIG_EMOJI:s="[表情]";break;case u.pp.STORY_VIDEO_ONCE_VIEW:case u.pp.STORY_VIDEO:s="[视频]";break;case u.pp.SHARE_AWEME:case u.pp.REF_MSG:case u.pp.SHARE_PHOTOS:s=a;break;case u.pp.TEXT_ONCE_VIEW:s="仅看一次消息";break;case u.pp.SHARE_COMMENT:case u.pp.BULLET:s=a;break;default:s="暂不支持该回复类型"}return`${f(e)}:${s}`}catch(e){return""}}let m=e=>{let{conversationType:t,conversationId:n,type:i}=e,o=t===a.m.ConversationType.GROUP_CHAT;return{message_type:(0,d.G)(e),conversation_id:n,chat_type:o?"group":"private"}},h=(e,t)=>null==t?void 0:t.slice().reverse().find(t=>{var n;let i=e[t.sender];return null==i?void 0:null===(n=i.im_role_ids)||void 0===n?void 0:n.includes(s.L.AiChatBotRole)}),g=e=>{let t=[u.pp.SYSTEM,u.pp.GROUP_NOTICE_MESSAGE,u.pp.GROUP_GREET_MESSAGE,u.pp.STRANGER_GREET_MESSAGE,u.pp.STORY_VIDEO_ONCE_VIEW,u.pp.STORY_PICTURE_ONCE_VIEW,u.pp.TEXT_ONCE_VIEW];return null==e?void 0:e.slice().reverse().find(e=>{let{isRecalled:n,visible:i,isFromMe:o,type:a}=e||{};return i&&o&&!n&&!t.includes(a)})},I=e=>{let{message:t,onDownloadClick:n,onDownloadShow:i,downloadHref:o,downloadAttr:a,showDownloadRef:s,getCanShow:c}=e,{isFromMe:u,content:d,ext:_}=t;return(0,l.useCallback)(()=>{var e,t;let l="",v=[];if(u){let t,u;if(null==_?void 0:_["s:send_response_check_msg"])try{u=null==(t=JSON.parse(null==_?void 0:_["s:send_response_check_msg"]))?void 0:null===(e=t.status_msg)||void 0===e?void 0:e.msg_content}catch(e){}[7400,8201].includes(null==t?void 0:t.status_code)?(l="为保护你的信息与身份安全,请在完成实名认证后再发送消息,前往「{{1}}」进行实名认证",v=[{key:1,action:4,name:"抖音APP",link:"https://www.douyin.com/downloadpage/app"}]):[8402].includes(null==t?void 0:t.status_code)?(l="发送失败,根据实名制要求,请前往 {{1}} 内完成实名认证",v=[{key:1,action:4,name:"抖音App",link:"https://www.douyin.com/downloadpage/app"}]):[7183].includes(null==t?void 0:t.status_code)?(l="由于多闪与抖音不在本地区运营,私信功能无法使用",v=[]):[7284].includes(null==t?void 0:t.status_code)?(l="由于你的隐私设置,对方无法回复你的私信。你可以在 {{1}} 修改状态",v=[{key:1,action:4,name:"抖音App",link:"https://www.douyin.com/downloadpage/app"}]):s.current||c()?(!s.current&&(i(),(0,r.D0)("im")),s.current=!0,l="及时接收好友消息回复,{{1}}",v=[{key:1,action:1,name:"下载客户端",link:o,onClick:n,isALink:!0,aLinkProps:{download:a}}]):(l=(null==u?void 0:u.tips)||"",v=(null==u?void 0:u.template)||[])}else{let e;if(d)try{e=null===(t=JSON.parse(d))||void 0===t?void 0:t.ext}catch(e){}l=(null==e?void 0:e.new_tips)||"",v=(null==e?void 0:e.new_template)||[],!l&&(null==e?void 0:e.tips)&&(l=(null==e?void 0:e.tips)||"",v=(null==e?void 0:e.template)||[])}return{tips:l,tipsTpl:v}},[t,n,i,o,a,s])()},O=e=>{let t=new Blob([v.from(e.replace(/^data:image\/(png|jpeg|jpg);base64,/,""),"base64")]);return(window.URL||window.webkitURL).createObjectURL(t)}},422928:function(e,t,n){n.d(t,{E9:function(){return r},FO:function(){return u},Nk:function(){return s},S6:function(){return l},hu:function(){return d},r9:function(){return a},sP:function(){return c}});var i=n(383955),o=n(998629);let a={LOVE:{key:"e:love",value:'{"emoji_data":{"icon_url":"https://p6.douyinpic.com/aweme-client-static-resource/single_msg_emoji_love_1588747335.png~tplv-obj.image","me_text":"","text":"❤️"},"type":1}'}},l={RECALL_ROLE:"s:recall_role",RECALL_UID:"s:recall_uid",SDK_TEXT_RECALL_TIMESTAMP:"s:text_recall_timestamp",SDK_RIP_MEDIA:"a:s_rip_media",GROUP_AVATAR:"a:ab_avatar",KEY_DISABLE_REF_MSG:"a:disable_ref_msg",MSG_DISABLE_OPTION:"a:disable_op",KEY_CREATE_GROUP_TYPE:"a:s_group_create_type"},s={KEY_CREATE_GROUP_TYPE:"a:s_group_create_type"},r={[i.Hv.REGULAR_USER]:[i.DK.DELETE_CONVERSATION,i.DK.STICK_ON_TOP,i.DK.REPORT,i.DK.SET_MUTED,i.DK.BLOCK_USER],[i.Hv.REGULAR_GROUP]:[i.DK.DELETE_CONVERSATION,i.DK.STICK_ON_TOP,i.DK.REPORT,i.DK.SET_MUTED,i.DK.QUIT_GROUP],[i.Hv.REGULAR_SELF]:[i.DK.DELETE_CONVERSATION,i.DK.STICK_ON_TOP,i.DK.SET_MUTED],[i.Hv.STARNGER_ITEM]:[i.DK.DELETE_CONVERSATION,i.DK.REPORT,i.DK.BLOCK_USER],[i.Hv.STRANGER_BOX]:[i.DK.DELETE_CONVERSATION],[i.Hv.REGULAR_DAREN_USER]:[i.DK.DELETE_CONVERSATION,i.DK.STICK_ON_TOP,i.DK.ENABLE_PIGEON_SYNC,i.DK.REPORT,i.DK.SET_MUTED,i.DK.BLOCK_USER]},c={[i.DK.INIT_VALUE]:"",[i.DK.DELETE_CONVERSATION]:"删除后将清除本会话的聊天记录",[i.DK.QUIT_GROUP]:"确认退出此群聊?",[i.DK.DISSOLVE_GROUP]:"确认解散此群聊,所有成员将退出群聊,无法接收消息"},u={CONVETSAION_DETAIL_CONENT:"conversaton-detail-content",CONVERSAION_DETAIL_INPUT_CONTENT:"conversaton-detail-input-content"},d={showImNewMeessage:{[o.pp.STORY_VIDEO]:!0},showImNewMeessage2:{[o.pp.CHANGE_STORY_PICTURE]:!0,[o.pp.STORY_PICTURE_ONCE_VIEW]:!0,[o.pp.STORY_VIDEO_ONCE_VIEW]:!0,[o.pp.TEXT_ONCE_VIEW]:!0}}},856652:function(e,t,n){n.d(t,{c5:function(){return o},i1:function(){return i}});var i={ONE_TO_ONE_CHAT:1,1:"ONE_TO_ONE_CHAT",GROUP_CHAT:2,2:"GROUP_CHAT",LIVE_CHAT:3,3:"LIVE_CHAT",BROADCAST_CHAT:4,4:"BROADCAST_CHAT",AI_DOUBLE_CHAT:17,17:"AI_DOUBLE_CHAT"},o={Error:"error",WebSocketConnected:"websocket-connected",WebSocketDisconnected:"websocket-disconnected",WebSocketReceiveUnexpectedFrame:"websocket-receive-unexpected-frame",ReceiveNewMessage:"receive-new-message",ReceiveSelfMessage:"receive-self-message",ReceiveCommandMessage:"receive-command-message",ReceiveBroadcastNewMessage:"receive-broadcast-new-message",ReceiveBroadcastSelfMessage:"receive-broadcast-self-message",ReceiveNewUpdateExtMessage:"receive-new-update-ext-message",ReceiveNewP2PMessage:"receive-new-p2p-message",MessageUpsert:"message-upsert",ConversationChange:"conversation-change",ConversationUpsert:"conversation-upsert",ConversationDissolve:"conversation-dissolve",ConversationBlock:"conversation-block",ParticipantUpsert:"participant-upsert",ParticipantJoin:"participant-join",ParticipantLeave:"participant-leave",ParticipantBlock:"participant-block",ParticipantChange:"participant-change",MessageSend:"message-send",MessageRecall:"message-recall",MessageDelete:"message-delete",ConversationDelete:"conversation-delete",ConversationLeave:"conversation-leave",ConversationCreate:"conversation-create",ConversationJoin:"conversation-join",ReadReceiptChange:"read-receipt-Change",ReceiveNewStrangerMessage:"receive-new-stranger-message",StrangerUpgrade:"stranger-upgrade",MessagePropertyUpsert:"message-property-upsert",InitLoadPage:"init-load-page",InitFinish:"init-finish",InitParticipant:"init-participant",TagListUpdate:"tag-list-update"}},219976:function(e,t,n){n.d(t,{v:function(){return s}});var i=n(720709),o=n(267310),a=n(654047);let{GROUP_CHAT:l}=i.m.ConversationType;function s(e){var t;let{id:n,type:i,toParticipantUserId:s,lastMessage:r,coreInfo:c={},ext:u}=e||{},d=i===l,{userInfoFromServerMap:_,getPatchUserInfoAsync:v}=(0,a.getImStore)(),{createdAt:p}=r||{},{name:f,icon:E}=c,m=(null==_?void 0:_[s])||{};!m&&v(s);let h=(d?(null==u?void 0:u["a:ab_avatar"])||E:null==m?void 0:null===(t=m.avatar_thumb)||void 0===t?void 0:t.url_list)||"",g=(null==m?void 0:m.remark_name)||(null==m?void 0:m.nickname)||s||"";return{headIcon:h,title:d?f||n:g,timeStr:(0,o.xS)(p)}}},267310:function(e,t,n){n.d(t,{lD:function(){return c},v1:function(){return u},xS:function(){return r}});var i=n(732979),o=n.n(i),a=n(297738),l=n.n(a);o().extend(l());let s={0:"星期日",1:"星期一",2:"星期二",3:"星期三",4:"星期四",5:"星期五",6:"星期六"};function r(e){if(Date.now()-new Date(e).getTime()<=3e5)return"刚刚";let t=o()(e),n=o()(),i=t.format("HH:mm")||"";return e>n.startOf("day").valueOf()?i:e>n.subtract(1,"day").startOf("day").valueOf()?"昨天":e>=n.subtract(3,"day").startOf("day").valueOf()?s[t.day()]:e>=n.startOf("year").valueOf()?t.format("MM-DD")||"":t.format("YYYY-MM-DD")||""}function c(e){if(Date.now()-new Date(e).getTime()<=3e5)return"刚刚";let t=o()(e),n=o()(),i=t.format("HH:mm")||"";if(e>n.startOf("day").valueOf())return i;if(e>n.subtract(1,"day").startOf("day").valueOf())return`昨天 ${i}`;if(e>=n.subtract(3,"day").startOf("day").valueOf()){let e=t.day();return`${s[e]} ${i}`}return t.format("YYYY-MM-DD HH:mm")||""}function u(e){return!!(Date.now()-new Date(e).getTime()<=3e5)||!1}},654047:function(e,t,n){let i;n.r(t),n.d(t,{getImStore:function(){return s}});var o=n(399989),a=n(286066),l=n(575559);let s=()=>{if(!i)try{i=o.O.getIsSaasPopup()?l.J:a.Z}catch(e){throw i=void 0,e}return i}},697127:function(e,t,n){n.d(t,{k:function(){return a}});var i=n(480333),o=n(198231);class a{static create(e){return(!a._instance||a._instance._uid!==e)&&(a._instance=new a(e)),a._instance}static get instance(){return a._instance}static destroy(){a._instance=null}recordAction(e){this._manager.recordAction(e)}reportAction(e){return this._manager.reportAction(e)}constructor(e){(0,i._)(this,"_manager",void 0),(0,i._)(this,"_uid",void 0),this._uid=e,this._manager=new o.ko({maxActions:2,accessKey:"VZcz8scZJMw3EQmQ5vvVoxPXiodEysQx",uid:e})}}(0,i._)(a,"_instance",null)},131653:function(e,t,n){n.d(t,{Z:function(){return o}});var i=n(480333);n(679308);class o{constructor(){(0,i._)(this,"promise",void 0),(0,i._)(this,"resolve",void 0),(0,i._)(this,"reject",void 0),this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}}},901540:function(e,t,n){n(683656),n(759943);t.Z=function(e){return e?e.replace(/^http:\/\//g,"https://"):e}},469674:function(e,t,n){n.d(t,{Mb:function(){return u},Yr:function(){return c},_m:function(){return d},zq:function(){return r}}),n(490629),n(362051),n(414931);var i=n(101199),o=n(396868),a=n(782166),l=n(549998);function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5,n=(0,i.useRef)(0),o=(0,i.useRef)(null);return()=>{o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{n.current=0},500);let i=n.current+1;i===t?(e(),n.current=0):n.current=i}}function r(e){return s(()=>{(0,a.J)(JSON.stringify(e,function(){let e=new WeakSet;return function(t,n){if("object"==typeof n&&null!==n){if(e.has(n))return;e.add(n)}return n}}())),o.F.info("已复制会话信息")})}function c(e){return s(()=>{(0,a.J)(JSON.stringify({userId:e.ctx.option.userId,serverId:e.serverId,conversationShortId:e.conversationShortId,ext:e.ext,conversationId:e.conversationId,indexInConversation:e.indexInConversation.toString(),type:e.type,content:e.content,createdAt:e.createdAt.toString(),referenceInfo:e.referenceInfo,isRecalled:e.isRecalled,sender:e.sender,__internal_cachedReadReceipt_test:e.getReadReceipt()},null,2)),o.F.info("已复制消息信息")})}function u(e){return s(()=>{l.ImSdk.markConversationRead(e.lastMessage,!1,!0),o.F.info("已尝试重置未读水位")})}function d(e){return s(()=>{(0,a.J)(JSON.stringify(e,null,2)),o.F.info("已复制消息信息")})}},209054:function(e,t,n){n.d(t,{Up:function(){return a},hp:function(){return i}}),n(14275),n(759943);let i=()=>{let{host:e}=location;return/live\.douyin\.com/.test(e)},o=e=>i()||/^\/(root|follow)\/live(\/|$)/.test(null!=e?e:location.pathname),a=(e,t)=>!!((null==e?void 0:e.imIsReplaceTab)||(null==e?void 0:e.imIsSlidePopup)||(null==e?void 0:e.liveSideAreaEntry)===1&&o(t))},839977:function(e,t,n){var i=n(286066);t.Z=e=>{var t;let{curConversation:n,userInfoFromSdkMap:o}=i.Z,{id:a}=n||{},{alias:l}=(null==o?void 0:null===(t=o[a])||void 0===t?void 0:t[e])||{};return l}},232900:function(e,t,n){n.d(t,{p:function(){return s}}),n(490629);var i=n(623594),o=n(598444),a=n(286066),l=n(383955);let s=async e=>{if(!e)return l.$u.FollowRelationUnknown;let{uidSecUidMap:t,userFollowStatusMap:n}=a.Z;if((null==n?void 0:n[e])||(null==n?void 0:n[e])===0)return null==n?void 0:n[e];let s=(null==t?void 0:t[e])||"";if(s){let[t,n]=await (0,o.Z)((0,i.RK)(s));if(t)return l.$u.FollowRelationUnknown;if(n){var r,c;let t=null!==(c=null==n?void 0:n.follow_status)&&void 0!==c?c:l.$u.FollowRelationUnknown;return null===(r=a.Z.setUserFollowStatusMap)||void 0===r||r.call(a.Z,e,t),t}}return l.$u.FollowRelationUnknown}},609571:function(e,t,n){n.d(t,{$0:function(){return r},T4:function(){return u},gD:function(){return s},n6:function(){return c}});var i=n(720709),o=n(867373),a=n(383955),l=n(422928);let s=e=>{var t,n;let i=null==e?void 0:null===(n=e.coreInfo)||void 0===n?void 0:null===(t=n.ext)||void 0===t?void 0:t[l.Nk.KEY_CREATE_GROUP_TYPE];return!!i&&("5"===i||"2"===i)},r=e=>{let{ext:t,sender:n,isFromMe:s,conversationType:r}=e,c=Number(t[l.S6.RECALL_ROLE]),u=t[l.S6.RECALL_UID];if(u&&r===i.m.ConversationType.GROUP_CHAT&&n!==u&&c!==a.GB.MEMBER)return c===a.GB.OWNER?{text:"群主撤回一条消息"}:{text:"群管理员撤回一条消息"};return s?{text:"你撤回了一条消息",reEdit:!0}:{text:`${(0,o.vW)(e)}撤回一条消息`}},c=e=>{var t;return"1"===String(null==e?void 0:null===(t=e.ext)||void 0===t?void 0:t["a:s_banned"])},u=e=>{let t=i.m.ConversationType.GROUP_CHAT;return(null==e?void 0:e.type)===t}},226808:function(e,t,n){n.d(t,{Z:function(){return v}});var i=n("618759"),o=n("480333"),a=n("121998"),l=n("103680");let s="https://www.douyin.com";var r=n("131653"),c=n("542046"),u=class e{constructor(){(0,o._)(this,"waitToInitDeferred",void 0),(0,o._)(this,"messageHandler",e=>{var t,n,i,o;(null==e?void 0:null===(t=e.data)||void 0===t?void 0:t.type)==="onFirstScreen"&&(null===(i=this.waitToInitDeferred)||void 0===i||i.resolve()),(null==e?void 0:null===(n=e.data)||void 0===n?void 0:n.type)==="pang"&&(null===(o=this.waitToInitDeferred)||void 0===o||o.resolve())}),(0,o._)(this,"listenerMessageFromTargetWindow",()=>{l.on("postMessage",(e,t)=>{this.messageHandler(t)})}),(0,o._)(this,"sendMessageToTargetWindow",(e,t)=>{l.invoke("postMessage",{toPageName:"im-page",type:e,params:t})}),(0,o._)(this,"openImNewPage",async e=>{var t;let{data:n}=await l.invoke("getMultitaskingWindowCount"),i=`${s}/chat?${a.stringify({isPopup:1,multi_window_open_from:"auto_open",multi_window_order:String(n)})}`,o=await l.invoke("createMultitaskingWindow",{url:i,useSmallMode:!1,useExtendTop:!0,useReuse:!0,useToMain:!0,useReload:!1,windowSize:{width:960,height:656,minWidth:748}});(null==o?void 0:null===(t=o.data)||void 0===t?void 0:t.useReuse)?(this.waitToInitDeferred=this.waitToInitDeferred||new r.Z,this.waitToInitDeferred.resolve()):this.waitToInitDeferred=new r.Z,this.openOrCreateConversation(e),(0,c.G)("open_im_new_page",{enter_from:e.enterFrom,launch_from:"aweme_desktop"})}),(0,o._)(this,"openOrCreateConversation",async e=>{if(!!e)await this.waitToInitDeferred.promise,this.sendMessageToTargetWindow("OpenConversationIfCreate",e)}),this.listenerMessageFromTargetWindow()}},d=n("396868"),_=class e{constructor(){(0,o._)(this,"targetWindow",void 0),(0,o._)(this,"waitToInitDeferred",void 0),(0,o._)(this,"isTargetWindowOkForWeb",()=>{if(this.targetWindow&&!1===this.targetWindow.closed)try{if(this.targetWindow.origin===s)return!0}catch(e){}return!1}),(0,o._)(this,"messageHandler",e=>{var t,n;if(e.origin===s)(null==e?void 0:null===(t=e.data)||void 0===t?void 0:t.type)==="onFirstScreen"&&(null===(n=this.waitToInitDeferred)||void 0===n||n.resolve())}),(0,o._)(this,"sendMessageToTargetWindow",(e,t)=>{this.targetWindow.postMessage({toPageName:"im-page",type:e,params:t},s)}),(0,o._)(this,"openImNewPage",e=>{let t=`${s}/chat?${a.stringify({isPopup:1})}`;if(this.waitToInitDeferred=new r.Z,this.isTargetWindowOkForWeb()){this.waitToInitDeferred.resolve(),this.openOrCreateConversation(e),this.targetWindow.focus();return}window.removeEventListener("message",this.messageHandler),this.targetWindow=window.open(t),this.targetWindow?(window.addEventListener("message",this.messageHandler),this.openOrCreateConversation(e)):d.F.info("页面打开失败,请重试"),(0,c.G)("open_im_new_page",{enter_from:e.enterFrom,launch_from:"aweme_web"})}),(0,o._)(this,"openOrCreateConversation",async e=>{if(!!e)await this.waitToInitDeferred.promise,this.sendMessageToTargetWindow("OpenConversationIfCreate",e)})}},v=(0,i.DT)()?new u:new _},771779:function(e,t,n){n.d(t,{B:function(){return l}});var i=n(618759),o=n(915821),a=n(236785),l={NotOpen:0,0:"NotOpen",OpenOnConversationClick:1,1:"OpenOnConversationClick",OpenOnConversationDetailClick:2,2:"OpenOnConversationDetailClick"};t.Z=e=>{var t,n,l;if(!e)return 0;if((0,i.DT)()){if(!(0,a.T)())return 0;let e=null!==(l=(0,i.FJ)().awemePcClient)&&void 0!==l?l:"";if((0,o.y)(e,"<","6.4.0"))return 0}return(null===(t=e.pc_im_new_window)||void 0===t?void 0:t.open_type)==="conversation_click"?1:(null===(n=e.pc_im_new_window)||void 0===n?void 0:n.open_type)==="conversation_detail_click"?2:0}},724622:function(e,t,n){var i=n(771779),o=n(286066);t.Z=()=>(0,i.Z)(o.Z.abTestData)===i.B.OpenOnConversationClick},549998:function(e,t,n){let i;n.r(t),n.d(t,{ImSdk:function(){return eY},IM_EVENT_NAMES:function(){return eV}});var o,a=n("480333"),l=n("629686"),s=n("402748"),r=n("916706");n("490629"),n("374954"),n("559352"),n("414931"),n("706056"),n("679308"),n("14275"),n("759943"),n("705200"),n("490917"),n("416175"),n("362051"),n("313036");var c=n("697127"),u=n("720709"),d=n("236922"),_=n("386227"),v=n("586037"),p=n("405110"),f=n("704442"),E=n("887558"),m=n("68146"),h=n("39313"),g=n("20194"),I=n("872931"),O=n("977187"),C=n("801253"),M=n("638033"),N=n("694253"),T=n("350856"),L=n.n(T),w=n("337793"),S=n.n(w),R=n("361073"),y=n.n(R),A=n("687581"),D=n("709705"),x=n("810069"),b=n("414061"),k=n("618759"),U=n("103680"),G=n("499059"),j=n("953851"),F=n("851504"),P=n("210124"),W=n("426038"),Z=n("960496"),V=n("173379"),H=n("53702"),B=n("973140");let Y={disableInitPull:!1,appId:6383,userId:"",deviceId:"",boe:!0,debug:!0,apiUrl:"http://imapi-boe.douyin.com",frontierUrl:"ws://frontier-boe.douyin.com/ws/v2",token:"",authType:u.m.AuthType.SESSION_AUTH,devicePlatform:"douyin_pc",appKey:"e1bd35ec9db7b8d846de66ed140b1ad9",service:5,fpId:9,withCredentials:!0,maxMessageCount:0,inboxType:0,timeout:3e4,acceptIncorrectInboxType:!0,biz:"douyin_web",disablePullIntervalWhenWsIsOnline:!1,triggerPullWhenReceiveEmptyContent:!0};var K=n("421914"),q=n("797194");class J extends K.f{async process(e){var t;let n=null==e?void 0:null===(t=e.data)||void 0===t?void 0:t.type;return(0,q.aU)(n)?(e.needContinue=!1,e.data=null,e):e}}var $=n("711061"),z=n("699679");class Q extends $.v{install(){}async sendPacket(e){return this.fillTtWidParam(e),e}fillTtWidParam(e){let t={};try{let e=(0,z.F)({});t.deviceId="0",t.session_did="0",t.webid=e.webid,t.fp=e.fp}catch(e){}e.device_id="0",e.headers=(0,l._)({},e.headers,t)}}var X=n("752865"),ee=n("396868"),et=n("422928"),en=n("998629"),ei=n("383955"),eo=n("640234"),ea=n("232900"),el=n("598444"),es=n("671623"),er=n("286066"),ec=n("542046"),eu=n("203085"),ed=n("209998");let{ConversationType:e_}=u.m,{GROUP_CHAT:ev,ONE_TO_ONE_CHAT:ep}=e_;var ef=async e=>{let{conversationType:t,isFromMe:n,conversationId:i}=e,{curConversation:o}=er.Z,{toParticipantUserId:a=""}=o||{},l=t===ev?ei.eD.GROUP:ei.eD.PRIVATE,s=n?ei.IM.ISME:ei.IM.NOISME,r={chat_type:l,is_self:s,message_type:(0,ed.G)(e),conversation_id:i};if(t===ep&&a){let e=await (0,ea.p)(a);r.personal_relation=String(e)}return r},eE=n("274470"),em=n("882626");n("834923");var eh=new WeakMap;class eg{add(){let e;return(0,eE._)(this,eh).push(new Promise(t=>{e=t})),e}run(e){return Promise.all((0,eE._)(this,eh)).then(t=>{null==e||e(t)})}constructor(){(0,em._)(this,eh,{writable:!0,value:[]})}}var eI=n("263070"),eO=n("219976"),eC=n("209054"),eM=n("802309"),eN=n("694432"),eT=n("623594"),eL=n("897471"),ew=n.n(eL),eS=n("144985"),eR=n("609571"),ey=n("121034");let{GROUP_CHAT:eA,ONE_TO_ONE_CHAT:eD}=n("856652").i1,ex=(e,t)=>{let{shareConversationInfoList:n,followList:i,followUidList:o}=(0,eS.Z)(e);t.setAllFriendListRealToFix(o);let a=[...n,...i].map(e=>{let{conv_type:n,conv_id:i,sec_uid:o}=e;if(n===eA){let e=t.getConversationByShortId(i);if((0,eR.n6)(e)||!(null==e?void 0:e.isMember)||(0,ey.BE)(e))return null;let{coreInfo:n={},id:o="",ext:a}=e,{name:l,icon:s}=n;return{type:eA,nickname:l,avatar_thumb:{url_list:[].concat((null==a?void 0:a["a:ab_avatar"])||s||"")},hasShared:!1,conversationShortId:o,uid:o,isRoundAvatar:!!(null==a?void 0:a["a:ab_avatar"])}}let a=t.getUserInfoBySecUid(o);return!a||a.is_block?null:(0,l._)({type:eD,isRoundAvatar:!1},a)}).filter(e=>e);return ew()(a,e=>null==e?void 0:e.uid)};var eb=n("226808"),ek=n("724622"),eU=n("131653");let eG=/(https?:\/\/[A-Z0-9+&@#\/%?=~_|!:,.;]+)/i,ej=/http[s]?:\/\/live\.douyin\.com\/[\w\d]+/gi,{ConversationType:eF}=u.m,{GROUP_CHAT:eP,ONE_TO_ONE_CHAT:eW}=eF,eZ=new B.Z;var eV={IM_SEND_MSG:"IM_SEND_MSG",IM_DELETE_CONVERSATION:"IM_DELETE_CONVERSATION",IM_VIDEO_MSG_RECALLED:"IM_VIDEO_MSG_RECALLED",IM_SEND_MSG_TIME_OUT:"IM_SEND_MSG_TIME_OUT"};let eH={disableInitPull:!1,appId:6383,appKey:"e1bd35ec9db7b8d846de66ed140b1ad9",userId:"",deviceId:"",service:5,debug:!1,apiUrl:"https://imapi.douyin.com",frontierUrl:"wss://frontier-im.douyin.com/ws/v2",authType:u.m.AuthType.SESSION_AUTH,token:"",fpId:9,withCredentials:!0,inboxType:1,devicePlatform:"douyin_pc",timeout:3e4,acceptIncorrectInboxType:!0,sharkAppName:"douyin_pc",maxMessageCount:0,sharkPriorityRegion:"cn",biz:"douyin_web",monitor:[...A.oe.getSlardarInstance()?[new d.a(A.oe.getSlardarInstance())]:[],new _.Cu({event(e,t){var n,i;null===(n=(i=window).collectEvent)||void 0===n||n.call(i,e,t)}},{metricsToReport:[..._.Dp,(0,_.af)(v.U.BizSdkInit+v.U.SuccessSuffix)]})],ppe:null!==(o=(0,D.$o)(W.LocalStorageKeys.ImOptionPPE))&&void 0!==o?o:void 0,webSocketLevel:(0,D.$o)(W.LocalStorageKeys.ImOptionDisableWS)?p._.Disable:p._.PushOnly,useBadgeCountForUnread:!0,unreadCountReport:!0,disablePullIntervalWhenWsIsOnline:!1,triggerPullWhenReceiveEmptyContent:!0},eB=[f.D,E.l,m.v,Q,h.b,g.n,I.x];class eY{static get actionManager(){var e,t,n,i;return null!==(i=c.k.instance)&&void 0!==i?i:c.k.create(null!==(n=null===(t=eY.bytedIMInstance)||void 0===t?void 0:null===(e=t.option)||void 0===e?void 0:e.userId)&&void 0!==n?n:"")}static tryStart(e,t,n){var o;let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};eI.Z.warn("登录用户信息",t);let{uid:s}=t||{},{bytedIMInstance:r}=eY;er.Z.setIsLogin(e);let c=null===(o=(0,x.Es)())||void 0===o?void 0:o.user_unique_id;return e?!r&&(eM.Z.mark("imsdk_try_start"),i=s,eY.init((0,l._)({userId:s,deviceId:c||s,pullInterval:n.pullInterval},a),!0===Z.uZ)):r&&eY.destroy(),eY.bytedIMInstance}static init(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t?(0,l._)({},Y,e):(0,l._)({},eH,e);eI.Z.warn("IM 初始化参数",n),!(0,eC.hp)()&&(n.authType=u.m.AuthType.PASSPORT_CERT_AUTH,n.securityScene="web_protect",n.securityCertType="cookie",eB.push(O.f)),e.storage&&eB.push(C.C),eY.idToken=eN.ZP.instance({aid:6383});let i=new M.A(n,eB);return eY.bytedIMInstance=i,(0,X.B)(i),i.resolve(N.Uk.MessageManager).processors.unshift(new J(i.ctx)),eM.Z.mark("imsdk_init_start"),i.init().then(()=>{(0,eT.v5)({}).then(e=>{var t;ex(e,{getConversationByShortId:e=>{var t;return eY.fetchConversation({shortId:e,inboxType:0}),null===er.Z||void 0===er.Z?void 0:null===(t=er.Z.conversationInfoMap)||void 0===t?void 0:t[e]},getUserInfoBySecUid:e=>{var t,n;let i=null===er.Z||void 0===er.Z?void 0:null===(t=er.Z.secUidUserInfoMap)||void 0===t?void 0:t[e];return!i&&(null===er.Z||void 0===er.Z||null===(n=er.Z.getUserInfoMapAsync)||void 0===n||n.call(er.Z,[e])),i},setAllFriendListRealToFix:null===er.Z||void 0===er.Z?void 0:null===(t=er.Z.setAllFriendListRealToFix)||void 0===t?void 0:t.bind(er.Z)})}),eY.getStrangerConversationPreview(),eY.getAllUserConversation(!0),eM.Z.mark("imsdk_init_end"),eM.Z.measure("imsdk_init_start","imsdk_init_end")}),eI.Z.warn("IM 实例",i),eY.listenEvents(),eY.bytedIMInstanceDeferred.resolve(i),b.emit(b.EVENT.IMInstanceReady),i}static destroy(){var e;eY.imEvents(),null===(e=eY.bytedIMInstance)||void 0===e||e.dispose(),eY.bytedIMInstance=null,(0,X.B)(null),c.k.destroy()}static onEvent(e,t){return eZ.on(e,t)}static emitEvent(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];eZ.emit(e,...n)}static offEvent(e,t){eZ.off(e,t)}static clearConversationMessage(e){var t,n;null===(n=eY.bytedIMInstance)||void 0===n||null===(t=n.clearConversationMessages)||void 0===t||t.call(n,{conversationIds:e,limitMessage:1e3})}static checkAndReportReadIndexGreater(e){for(let t of e){let e=t.readIndex,n=t.lastMessageIndex;if(e&&(null==n?void 0:n.greaterThan(0))&&e.sub(n).greaterThanOrEqual(1e4)){let{shortId:i}=t;if(eY.reportedReadIndexGreater.has(i))continue;(0,ec.G)("imsdk_debug_read_index_greater",{conversation_type:t.type,index_distance:e.sub(n).toNumber(),conversation_id:t.id,conversation_short_id:i,conversation_read_index:e.toString(),message_index_in_conversation:n.toString(),user_id:t.ctx.option.userId,debug_version:"2"}),eY.reportedReadIndexGreater.add(i)}}}static updateIsStrangerConver(){var e;let{id:t}=(null===er.Z||void 0===er.Z?void 0:er.Z.curConversation)||{},n=null===er.Z||void 0===er.Z?void 0:null===(e=er.Z.conversationMap)||void 0===e?void 0:e[t],i=null==n?void 0:n.isStrangerConversation;er.Z.setIsStrangerConversation(i)}static setCurConversation(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;if((0,ek.Z)()&&e)return eb.Z.openImNewPage({conversationId:e.id,isStrangeConversation:null==e?void 0:e.isStrangerConversation,enterFrom:t||"setCurConversation"}),!0;if(er.Z.setCurConverSation(e),e){let{isStrangerConversation:e=!1}=er.Z;e?eY.strangerMessageUpsert():eY.messageUpsert(),eM.Z.mark("im_conversation_change")}else er.Z.setCurMessageList([]);return!1}static listenEvents(){let{bytedIMInstance:e}=eY;if(!e)return;let t=null==e?void 0:e.event;eM.Z.mark("imsdk_listen_events_start");let n=t.subscribe(p.c5.ConversationChange,()=>{eY.conversationChange(),eY.unreadCountReport()}),i=t.subscribe(p.c5.MessageUpsert,e=>{if(e){let{type:t}=e;if(t===en.pp.GROUP_NOTICE_MESSAGE){let{curConversation:e}=er.Z;e&&eY.getMoreParticipants({conversation:e})}}eY.messageUpsert()}),o=t.subscribe(p.c5.ReceiveNewMessage,e=>{eI.Z.log("ReceiveNewMessage",e),er.Z.pushNewMsgInList(e,e=>eY.getConversationById(e)),this.syncToTray()}),a=t.subscribe(p.c5.MessageRecall,e=>{eI.Z.log("MessageRecall",e);let{curConversation:t}=er.Z,{conversationId:n,type:i}=e;(null==t?void 0:t.id)===n&&(null===en.ds||void 0===en.ds?void 0:en.ds.includes(i))&&eY.emitEvent("IM_VIDEO_MSG_RECALLED",e)}),l=t.subscribe(p.c5.InitFinish,()=>{var t,n;eY.checkClientPush(),er.Z.isSdkInitFinish=!0,eM.Z.mark("imsdk_listen_events_end"),(0,ec.G)("im_sdk_init_time",{duration:eM.Z.measure("imsdk_listen_events_start","imsdk_listen_events_end"),cold_launch_duration:performance.now(),conversation_number:null==e?void 0:null===(n=e.getConversationList)||void 0===n?void 0:null===(t=n.call(e))||void 0===t?void 0:t.length})});eY.imEvents=()=>{t.unsubscribe(p.c5.MessageUpsert,i),t.unsubscribe(p.c5.ConversationChange,n),t.unsubscribe(p.c5.ReceiveNewMessage,o),t.unsubscribe(p.c5.InitFinish,l),t.unsubscribe(p.c5.MessageRecall,a)}}static syncToTray(){if(!!(0,k.DT)())U.invoke("isTopWebview").then(e=>{var t;if(!!e.data)j.a.setImConvUnreadData({message:((null===(t=er.Z.conversationListFilter)||void 0===t?void 0:t.slice())||[]).map(e=>{var t;if(!e.unreadCount||e.isMuted||!e.lastMessage)return null;let n=(0,eO.v)(e);return{conversation_name:n.title,unread_count:e.unreadCount,conversation_id:e.shortId,last_message_time:e.lastMessage.createdAt?Number(e.lastMessage.createdAt):0,last_message_id:e.lastMessage.serverId,avatar_url:null!==(t=Array.isArray(n.headIcon)?n.headIcon[0]:n.headIcon)&&void 0!==t?t:"",type:e.type,open_url:`sslocal://chat/center?conv_short_id=${e.shortId}&conversation_id=${e.id}`,is_stick_on_top:e.isStickOnTop}}).filter(e=>!!e)})})}static setConversationSettingInfo(e,t){let{bytedIMInstance:n}=eY;null==n||n.setConversationSettingInfo((0,l._)({conversation:e},t))}static async handleDeleteConversation(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>{};eY.emitEvent("IM_DELETE_CONVERSATION",e),t&&await (0,es.Z)(t),null==n||n()}static deleteConversation(e){if(!e)return;let{bytedIMInstance:t}=eY;null==t||t.deleteConversation({conversation:e}),null===er.Z||void 0===er.Z||er.Z.setCurConverSation()}static async deleteStrangerConversation(e,t){if(!e)return;let{bytedIMInstance:n}=eY,[i,o]=await (0,el.F)(null==n?void 0:n.deleteStrangerConversation({conversation:e}));if(!i)null==t||t(),null===er.Z||void 0===er.Z||er.Z.setCurConverSation()}static deleteAllStrangerConversation(){let{bytedIMInstance:e}=eY;null==e||e.deleteAllStrangerConversation(),null===er.Z||void 0===er.Z||er.Z.setCurConverSation(),null===er.Z||void 0===er.Z||er.Z.setIsInStrangerConversationList(!1)}static async getConversationWithUid(e){if(!e)return;let t=await eY.bytedIMInstanceDeferred.promise;if(!t)return;let n=t.getConversationList(),i={};S()(n,e=>{let{id:t,type:n,toParticipantUserId:o}=e;n===eW&&o&&(i[o]=e)});let o=null==i?void 0:i[e];if(!o){var a;let[n,i]=await (0,el.F)(t.createConversation({type:eW,participants:e,inboxType:0}));if(n)return;let{statusCode:l,body:s}=i,r=null==s?void 0:null===(a=s.conversation)||void 0===a?void 0:a.conversation_id;0===l&&r&&(o=t.getConversation({conversationId:r}))}return o}static async getAllUserConversation(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],{hasJoinGroupObj:t}=er.Z,n=t;if(n.loading)return;if(e){let e={conversation:[],cursor:"0",hasMore:!0,loading:!1};er.Z.setHasJoinGroup(e),n=e}er.Z.setHasJoinGroup((0,s._)((0,l._)({},n),{loading:!0}));let{cursor:i,hasMore:o}=n;if(o){var a;let{bytedIMInstance:e}=eY,[t,o]=await (0,el.F)(null==e?void 0:e.getUserConversationList({type:eP,inboxType:0,limit:10,sortType:1,cursor:i}));if(eI.Z.log("getAllUserConversation",t,o),t){er.Z.setHasJoinGroup((0,s._)((0,l._)({},n),{loading:!1}));return}let{conversation:r,cursor:c,hasMore:u}=o||{},d=null===(a=n.conversation)||void 0===a?void 0:a.concat(r);er.Z.setHasJoinGroup({conversation:d,cursor:y().fromValue(c).toString(),hasMore:u,loading:!1})}}static createMsg(e,t){let n=null===er.Z||void 0===er.Z?void 0:er.Z.curConversation;return(0,r._)(eY,eY,e$).call(eY,n,e,t)}static async sendMessage(e,t){let{bytedIMInstance:n}=eY,i=null===er.Z||void 0===er.Z?void 0:er.Z.curConversation;if(!n||!i)return;let[o,a]=await (0,el.F)((0,r._)(eY,eY,e$).call(eY,i,e)),l=!1;return setTimeout(()=>{!l&&eY.emitEvent("IM_SEND_MSG_TIME_OUT",{message:a})},450),(0,r._)(this,eY,eJ).call(eY,a,t).then(()=>(l=!0,a))}static resendMessage(e,t){return(0,r._)(this,eY,eJ).call(eY,e,t)}static getConversationById(e){var t,n,i,o;let{bytedIMInstance:a}=eY,l=null;try{l=null===(t=a.getConversationList({filter:t=>t.id===e||t.shortId===e}))||void 0===t?void 0:t[0]}catch(t){A.oe.captureException("IM",t,{conversationId:e,userId:null==a?void 0:null===(n=a.option)||void 0===n?void 0:n.userId,conversationCount:String(null===(i=null!==(o=a.getConversationList())&&void 0!==o?o:[])||void 0===i?void 0:i.length)})}return l}static async getConversationByIdWithOnline(e){let t=this.getConversationById(e.conversationId);if(t)return t;if(!t){let{bytedIMInstance:t}=eY;return await t.getConversationOnline(e)}}static async fetchConversation(e){let{bytedIMInstance:t}=eY;if(t){let[n,i]=await (0,el.F)(t.fetchConversation(e));return i}}static async sendUserMsg(e,t,n){let i=null==e?void 0:e.length;if(!i)return;let{bytedIMInstance:o}=eY,a=o.getConversationList(),c={};S()(a,e=>{let{id:t,type:n,toParticipantUserId:i}=e;n===eW&&i&&(c[i]=e)});let u=new eg,d=new eg;for(let a=0;a<i;a++){let i=e[a],v=null==c?void 0:c[i];if(!v&&i){var _;let[e,t]=await (0,el.F)(o.createConversation({type:eW,participants:i,inboxType:0}));if(e)continue;let{statusCode:n,body:a}=t,l=null==a?void 0:null===(_=a.conversation)||void 0===_?void 0:_.conversation_id;0===n&&l&&(v=o.getConversation({conversationId:l}))}if(v){let[e,i]=await (0,el.F)((0,r._)(eY,eY,e$).call(eY,v,t));if(!i)continue;let o=u.add(),a=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];o(t)},c=d.add(),_=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];c(t)};await (0,r._)(this,eY,eJ).call(eY,i,(0,s._)((0,l._)({},n),{beforeSend:a,afterSend:_}))}}u.run(null==n?void 0:n.beforeSend),d.run(null==n?void 0:n.afterSend)}static async sendGroupMsg(e,t,n){let i=null==e?void 0:e.length;if(!i)return;let o=null===er.Z||void 0===er.Z?void 0:er.Z.conversationInfoMap,a=new eg,c=new eg,{bytedIMInstance:u}=eY;for(let d=0;d<i;d++){let i=e[d],_=null==o?void 0:o[i];if(!_){let e={conversationId:i,shortId:i,type:eP},[t,n]=await (0,el.F)(u.getConversationOnline(e));!t&&n&&(_=n)}if(_){let[e,i]=await (0,el.F)((0,r._)(eY,eY,e$).call(eY,_,t));if(i){let e=a.add(),t=function(){for(var t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];e(n)},o=c.add(),u=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];o(t)};await (0,r._)(this,eY,eJ).call(eY,i,(0,s._)((0,l._)({},n),{beforeSend:t,afterSend:u}))}}}a.run(null==n?void 0:n.beforeSend),c.run(null==n?void 0:n.afterSend)}static async getIdConverMap(e){let{bytedIMInstance:t}=eY,n=t.getConversationList(),i={},o={};S()(n,e=>{let{id:t,type:n,toParticipantUserId:a}=e;n===eW&&a?i[a]=e:n===eP&&(o[t]=e)});let a=e.length;for(let n=0;n<a;n++){let{uid:o,type:a}=e[n];if(a===eW&&o&&!i[o]){var l;let[e,n]=await (0,el.F)(t.createConversation({type:eW,participants:o,inboxType:0}));if(e)continue;let{statusCode:a,body:s}=n,r=null==s?void 0:null===(l=s.conversation)||void 0===l?void 0:l.conversation_id;0===a&&r&&(i[o]=t.getConversation({conversationId:r}))}}return{converPrevOne2OneMap:i,converPrevGroupMap:o}}static async sendUserAndGroupMsg(e,t,n){let i=null==e?void 0:e.length;if(!i)return;let[o,a]=await (0,el.F)(eY.getIdConverMap(e));if(o)return;let{converPrevOne2OneMap:c,converPrevGroupMap:u}=a,d=new eg,_=new eg;for(let o=0;o<i;o++){let{uid:i,type:a}=e[o],v=a===eW?c[i]:u[i];if(v){let[e,i]=await (0,el.F)((0,r._)(eY,eY,e$).call(eY,v,t));if(!i)continue;let o=d.add(),a=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];o(t)},c=_.add(),u=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];c(t)};await (0,r._)(this,eY,eJ).call(eY,i,(0,s._)((0,l._)({},n),{beforeSend:a,afterSend:u}))}}d.run(null==n?void 0:n.beforeSend),_.run(null==n?void 0:n.afterSend)}static async recallMessage(e){let{bytedIMInstance:t}=eY;return null==t?void 0:t.recallMessage({message:e})}static deleteMessage(e){let{bytedIMInstance:t}=eY;return null==t?void 0:t.deleteMessage({message:e})}static async setLikeMsg(e,t,n){let i=await ef(e);return i.action=n?"cancel":"like",(0,ec.G)("like_message",i),(0,r._)(this,eY,ez).call(eY,e,(0,l._)((0,s._)((0,l._)({},et.r9.LOVE),{operation:u.m.OPERATION_TYPE.ADD_PROPERTY_ITEM}),t))}static async setMsgFlightStatus(e,t){return(0,r._)(this,eY,ez).call(eY,e,{key:"flightStatus",value:t,operation:u.m.OPERATION_TYPE.ADD_PROPERTY_ITEM})}static getMoreMessage(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50,n=Promise.resolve({messages:[],hasMore:null,cursor:0});if(!e)return n;let{bytedIMInstance:i}=eY,o=e.getMessageList(),a=null==o?void 0:o[0],l=i.getMessagesByConversation({conversation:e,cursor:a,limit:t}).then(e=>(eY.messageUpsert(),e));return a?l:n}static getConversationParticipants(e){let{bytedIMInstance:t}=eY,n=t.getConversationParticipants({conversation:e});return(0,r._)(this,eY,eQ).call(eY,null==e?void 0:e.id,n,!0),n}static getMoreParticipants(e){let{bytedIMInstance:t}=eY;return Promise.all([t.getConversationParticipantsAsync((0,l._)({},e)),t.getConversationBots({conversation:e.conversation}).catch(e=>null)]).then(t=>{var n;let[i,o]=t,a=[...i,...o];return(0,r._)(this,eY,eQ).call(eY,null===(n=e.conversation)||void 0===n?void 0:n.id,a,!0),a}).catch(()=>[])}static async leaveConversation(e){let{bytedIMInstance:t}=eY;await t.leaveConversation({conversation:e}),await t.deleteConversation({conversation:e}),null===er.Z||void 0===er.Z||er.Z.setCurConverSation()}static async dissolveConversation(e){let{bytedIMInstance:t}=eY;await t.dissolveConversation({conversation:e}),await t.deleteConversation({conversation:e}),null===er.Z||void 0===er.Z||er.Z.setCurConverSation()}static getAllUserFromServer(){let e=(0,r._)(this,eY,eX).call(eY);return er.Z.getUserInfoMapAsync(e)}static getAllStrangerFromServer(){let e=(0,r._)(this,eY,e0).call(eY);return er.Z.getUserInfoMapAsync(e)}static getStrangerFromServerWithConver(e){let{userInfoFromServerMap:t,curUserInfo:n}=er.Z,i=null==n?void 0:n.uid,{id:o="",firstPageParticipant:a=[],participants:l}=e||{},s=null==t?void 0:t[o],c=l||(null==a?void 0:a.participants)||[];if((0,r._)(this,eY,eQ).call(eY,o,c,!0),!s){let e=[];c.forEach(t=>{let{userId:n,secUid:o,user_id:a,sec_uid:l}=t;(n||y().fromValue(a).toString())!==i&&e.push(o||l)}),er.Z.getUserInfoMapAsync(e)}}static async markConversationRead(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],{indexInConversation:i="",conversationId:o}=e||{},{bytedIMInstance:a}=eY,l=null;try{l=a.getConversation({conversationId:o})}catch(e){return}if(!!l){if(n)return l.settingInfo._readIndex=y().ZERO,a.markConversationRead({conversation:l});if(i&&l){if(t)a.markStrangerConversationRead({conversation:l});else{var s,r;(null==l?void 0:null===(r=l.lastMessageIndex)||void 0===r?void 0:null===(s=r.eq)||void 0===s?void 0:s.call(r,i))?a.markConversationRead({conversation:l,force:!0}):a.markConversationRead({conversation:l,readIndex:i})}}}}static async markAllStrangerConversationRead(){let{bytedIMInstance:e}=eY;return e.markAllStrangerConversationRead()}static async getMessgeByServerId(e){let{conversation:t,serverMessageId:n}=e,{bytedIMInstance:i}=eY;return i.getMessageByServerId({conversation:t,serverMessageId:n})}static checkClientPush(){let{conversationId:e,userId:t,enterMethod:n}=G.Le.getConfig(G.gI.IMStatusStore)||{};e&&b.emit(b.EVENT.openImConversation,{conversationId:e,enterMethod:n||ei.eY.CLIENT_PUSH}),t&&b.emit(b.EVENT.sendImUserMsg,{uid:t,enterMethod:n||ei.eY.CLIENT_PUSH}),e||t||!n||b.emit(b.EVENT.openImConversation,{enterMethod:n||ei.eY.CLIENT_PUSH})}static async isFromGroupOwner(e){if(!e)return!1;let{bytedIMInstance:t}=eY,{conversationId:n,sender:i}=e;if(!i)return!1;let o=t.getConversation({conversationId:n});if(!o)return!1;let{type:a,coreInfo:l}=o;return a===eP&&(null==l?void 0:l.owner)===i}static async getMoreVideoInMsg(){let{curConversation:e}=er.Z;(null===er.Z||void 0===er.Z?void 0:er.Z.curMsgOptPopId)&&er.Z.setCurMsgOptPopId();let t=[],n=[];if(e){let[i,o]=await (0,el.F)(eY.getMoreMessage(e));if(i)return{hasMore:!0,awemeIds:t,videoMsgList:n};let{hasMore:a=!0,messages:l=[]}=o||{};return S()(l,e=>{let{type:i,isRecalled:o,clientId:a}=e;if(!o&&(null===en.ds||void 0===en.ds?void 0:en.ds.includes(i))){let{itemId:i,item_id:o}=(0,eo.t)(e)||{},l=null!=i?i:o;l&&(t.push(l),n.push({awemeId:l,msgClientId:a}))}}),{hasMore:a,awemeIds:t,videoMsgList:n}}return{hasMore:!0,awemeIds:t,videoMsgList:n}}static upsertConversationSettingExtInfo(e,t){if(!e)return;let{bytedIMInstance:n}=eY;null==n||n.upsertConversationSettingExtInfo((0,l._)({conversation:e},t))}static async addParticipants(e){let{bytedIMInstance:t}=eY;return await t.addParticipants(e)}}async function eK(e,t,n){var i,o,a;let l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",{conversationId:s,conversationType:r,referenceInfo:c,mentionedUsers:u,type:d}=t,{isOpenMessageList:_}=er.Z;if(!e)return;let{toParticipantUserId:v}=e,p=r===eW?await (0,ea.p)(v):ei.$u.FollowRelationUnknown;if(c){let e={conversation_id:s,chat_type:ed.n[r],message_type:n};r===eW&&(e.personal_relation=String(p)),(0,ec.G)("quote_message",e)}u&&u.length>0&&u.forEach(e=>{var t;let n=er.Z.userInfoFromServerMap[e];(0,ec.G)("send_at_message",{conversation_id:s,at_user_id:e,at_type:(null==n?void 0:null===(t=n.im_role_ids)||void 0===t?void 0:t.includes(F.L.AiChatBotRole))?"ai_role":"user",at_ai_name:null==n?void 0:n.nickname})});let f={conversation_id:s,chat_type:ed.n[r],to_user_id:v||"",message_type:n,real_message_type:d,enter_method:eu.Q[l],online_status:null===(i=V.m.statusStore[er.Z.uidSecUidMap[v]])||void 0===i?void 0:i.lastActiveLogValue};f.is_fold=Number(!_),r===eW&&(f.personal_relation=String(p),(null===(a=er.Z.userInfoFromServerMap[v])||void 0===a?void 0:null===(o=a.im_role_ids)||void 0===o?void 0:o.includes(F.L.AiChatBotRole))&&(f.chat_type="ai_role")),(0,ec.G)("send_message",f),(0,ec.G)("soraka_sli_report",{scene:"pc-im-send-message",status:"begin",context:f});let{text:E=""}=(0,eo.t)(t);if(eG.test(E)){let e=ej.test(E);(0,ec.G)("send_link",{enter_from:eu.Q[l],chat_type:ed.n[r],conversation_id:s,to_user_id:v||"",link_type:e?"live_share_link":"other"})}}function eq(e,t,n,i){var o,a,s,r,c;let u,d=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",_=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},{conversationId:v,conversationType:p,type:f,serverId:E,mentionedUsers:m}=t;if(!e||!i){(0,ec.G)("soraka_sli_report",{scene:"pc-im-send-message",status:"fail",context:{conversation_id:v,message_type:n,real_message_type:f,messgae_id:E||"",enter_method:eu.Q[d],error_message:"fe: thisConver or res is null"}});return}let{toParticipantUserId:h}=e,{statusCode:g,success:I,checkCode:O}=i;m&&m.length>0&&m.forEach(e=>{var t;let n=er.Z.userInfoFromServerMap[e];(0,ec.G)("send_at_message_response",{conversation_id:v,at_user_id:e,at_type:(null==n?void 0:null===(t=n.im_role_ids)||void 0===t?void 0:t.includes(F.L.AiChatBotRole))?"ai_role":"user",at_ai_name:null==n?void 0:n.nickname})});let C=p===eW&&(null===(a=er.Z.userInfoFromServerMap[h])||void 0===a?void 0:null===(o=a.im_role_ids)||void 0===o?void 0:o.includes(F.L.AiChatBotRole));try{u=JSON.parse((null==i?void 0:null===(c=i.body)||void 0===c?void 0:c.check_message)||"{}")}catch(e){}let M=(0,l._)({conversation_id:v,chat_type:C?"ai_role":ed.n[p],to_user_id:h||"",message_type:n,real_message_type:f,send_status:I?"success":"failure",status_code:`${g}`,check_code:(null==O?void 0:O.toString())||"",messgae_id:E||"",raw_check_code:(0,H.Zs)(t),enter_method:eu.Q[d]||eu.Q.unknown,check_message_status_code:(null==u?void 0:u.status_code)||"",error_tips:(null==u?void 0:null===(r=u.status_msg)||void 0===r?void 0:null===(s=r.msg_content)||void 0===s?void 0:s.tips)||""},_);(0,ec.G)("send_message_response",M),(0,ec.G)("soraka_sli_report",{scene:"pc-im-send-message",status:I?"success":"fail",context:M})}async function eJ(e,t){let{beforeSend:n=()=>{},afterSend:i=()=>{},enter_method:o="",retrying:a=!1}=t;if(e){var l,s,c,u,d,_,v,f,E,m,h;let{conversationId:t}=e;eY.actionManager.reportAction({conversationId:null==e?void 0:e.conversationId,conversationShortId:null==e?void 0:e.conversationShortId,messageClientId:null===(l=e.ext)||void 0===l?void 0:l["s:client_message_id"],content:null==e?void 0:e.content,msgType:null==e?void 0:e.type});let{bytedIMInstance:g}=eY,I=g.getConversation({conversationId:t}),O=(0,ed.G)(e);(0,r._)(eY,eY,eK).call(eY,I,e,O,o),null==n||n(e),eY.idToken=eN.ZP.instance({aid:6383});let[C,M]=await (0,el.F)(eY.idToken.getIdentitySecurityToken({scene:"web_im"},a));if((null==C?void 0:null===(s=C.data)||void 0===s?void 0:s.is_zti_timeout_error)===1){e.flightStatus=p.b3.Failed,ee.F.info("系统繁忙,修改时间后可以正常使用私信功能");let n={conversation_id:t,send_status:"failure",enter_method:eu.Q[o]||eu.Q.unknown,raw_check_code:(0,H.Zs)(e),error_code:null==C?void 0:null===(f=C.data)||void 0===f?void 0:f.error_code,is_network_error:null==C?void 0:null===(E=C.data)||void 0===E?void 0:E.is_network_error,is_zti_timeout_error:1};(0,ec.G)("send_message_response",n);return}let{identity_security_param:N,real_device_id:T}=M||{};g.updateSendMessageHeaders({identity_security_token:N||"",identity_security_device_id:T||"",identity_security_aid:"6383"});let L=await g.sendMessage({message:e});if(a)return L;if((null==L?void 0:null===(c=L.body)||void 0===c?void 0:c.status)===3)try{let t=JSON.parse((null==L?void 0:L.checkMsg)||"{}");if(null==t?void 0:t.decision_conf){ee.F.info("行为存在异常,需要完成二次验证");try{await (0,P.dI)({request:()=>null},{headers:{"x-vc-bdturing-parameters":btoa(t.decision_conf)},config:{url:""}},{uid:null===(m=er.Z.curUserInfo)||void 0===m?void 0:m.uid}),L=await eY.resendMessage(e,{enter_method:o,retrying:!0})}catch(e){}}(null==t?void 0:t.status_code)===7914&&(null===(h=JSON.parse((null==t?void 0:t.extra)||"null"))||void 0===h?void 0:h.identity_token_check_status)==="fail"&&(L=await eY.resendMessage(e,{enter_method:o,retrying:!0}))}catch(e){}eY.emitEvent("IM_SEND_MSG",{message:e,res:L});let w={tokenRes:`${!!(null==M?void 0:M.identity_security_param)},${!!(null==M?void 0:M.real_device_id)}`,identitySecurityTokenError:C?JSON.stringify({error_code:null==C?void 0:null===(u=C.data)||void 0===u?void 0:u.error_code,is_network_error:null==C?void 0:null===(d=C.data)||void 0===d?void 0:d.is_network_error,is_zti_timeout_error:null==C?void 0:null===(_=C.data)||void 0===_?void 0:_.is_zti_timeout_error,message:null==C?void 0:null===(v=C.data)||void 0===v?void 0:v.description}):""};return(0,r._)(this,eY,eq).call(eY,I,e,O,L,o,w),null==i||i({conversation:I,message:e,res:L}),L}}function e$(e,t,n){let{bytedIMInstance:i}=eY,o=(0,q.MZ)(t,n);return null==i?void 0:i.createMessage((0,l._)({conversation:e},o))}function ez(e,t){let{bytedIMInstance:n}=eY;return null==n?void 0:n.modifyMessageProperty({message:e,modifyContent:[t]})}function eQ(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],{curUserInfo:i}=er.Z,o=null==i?void 0:i.uid,a=[];S()(t,t=>{let{userId:n,role:i,secUid:l,user_id:s,sec_uid:r,alias:c=""}=t,u=n||y().fromValue(s).toString();u!==o&&a.push(u),u&&er.Z.setUserInfoFromSdkMap(e,u,{alias:c,uid:u,role:i,sec_uid:l||r})}),er.Z.setConversationUserids(e,a,n)}function eX(){let{converSationListOrigin:e,uidSecUidMap:t,userInfoFromSdkMap:n,userInfoFromServerMap:i}=er.Z;S()(e,e=>{let{id:t,type:i,toParticipantUserId:o,firstPageParticipant:a,participants:l}=e;null==n||n[t],(0,r._)(this,eY,eQ).call(eY,t,l||(null==a?void 0:a.participants),!1)});let o=[];return S()(t,(e,t)=>{let n=i[t];e&&!n&&o.push(e)}),o}function e0(){let{strangerConverListObj:e,uidSecUidMap:t,userInfoFromSdkMap:n,userInfoFromServerMap:i}=er.Z,o=(null==e?void 0:e.conversation)||[],a=[];return S()(o,e=>{let{id:t="",firstPageParticipant:i=[],participants:o}=e;null==n||n[t],(0,r._)(this,eY,eQ).call(eY,t,o||(null==i?void 0:i.participants),!0)}),S()(t,(e,t)=>{let n=i[t];e&&!n&&a.push(e)}),a}(0,a._)(eY,"bytedIMInstance",null),(0,a._)(eY,"bytedIMInstanceDeferred",new eU.Z),(0,a._)(eY,"idToken",null),(0,a._)(eY,"imEvents",()=>{}),(0,a._)(eY,"conversationChange",L()(()=>{var e,t;let n=null!==(t=null===(e=eY.bytedIMInstance)||void 0===e?void 0:e.getConversationList({filter:e=>{var t,n,o,a,l;return(null===(l=e.firstPageParticipant)||void 0===l?void 0:null===(a=l.participants)||void 0===a?void 0:null===(o=a.map)||void 0===o?void 0:null===(n=o.call(a,e=>{var t,n;return null==e?void 0:null===(n=e.user_id)||void 0===n?void 0:null===(t=n.toString)||void 0===t?void 0:t.call(n)}))||void 0===n?void 0:null===(t=n.includes)||void 0===t?void 0:t.call(n,i))&&!(null==e?void 0:e.isStrangerConversation)&&!(0,ey.BE)(e)}}))&&void 0!==t?t:[];return er.Z.setConverSationList(n),er.Z.setConversationMap(n),eY.checkAndReportReadIndexGreater(n),Promise.all([eY.getAllUserFromServer(),eY.getStrangerConversationPreview()]).then(()=>{eY.syncToTray()}),eY.updateIsStrangerConver(),n},200)),(0,a._)(eY,"reportedReadIndexGreater",new Set),(0,a._)(eY,"messageUpsert",L()(()=>{var e;let t=null===er.Z||void 0===er.Z?void 0:er.Z.curConversation,n=null!==(e=null==t?void 0:t.getMessageList())&&void 0!==e?e:[];er.Z.setCurMessageList(n)},200)),(0,a._)(eY,"strangerMessageUpsert",L()(async()=>{var e;let t=null===er.Z||void 0===er.Z?void 0:er.Z.curConversation;null===(e=eY.bytedIMInstance)||void 0===e||e.getStrangerConversationMessage({conversation:t}).then(e=>{er.Z.setCurMessageList(null!=e?e:[])}).catch(e=>{})},200)),(0,a._)(eY,"getStrangerConversationList",async function(){var e,t,n;let i=arguments.length>0&&void 0!==arguments[0]&&arguments[0],{strangerConverListObj:o,setIsShowGetStrangeConversationListLoading:a,abTestData:r,setIsShowGetConversaionListLoading:c}=er.Z;a(!0);let u=!!(null==r?void 0:null===(e=r.imPerformanceOptimization)||void 0===e?void 0:e.im_entrance_display);!u&&c(!0);let d=o;if(null==d?void 0:d.loading)return;er.Z.setStrangerConverListObj((0,s._)((0,l._)({},d),{loading:!0})),i&&(d={conversation:[],cursor:"0",hasMore:!0,loading:!1,unreadCount:0});let{cursor:_="0",hasMore:v=!0}=d;if(!v){er.Z.setStrangerConverListObj((0,s._)((0,l._)({},d),{loading:!1}));return}let[p,f]=await (0,el.F)(null===(t=eY.bytedIMInstance)||void 0===t?void 0:t.getStrangerConversationList({limit:10,cursor:_}));p&&er.Z.setStrangerConverListObj((0,s._)((0,l._)({},d),{loading:!1}));let{conversation:E,cursor:m,hasMore:h,unreadCount:g}=f||{},I=(null==d?void 0:null===(n=d.conversation)||void 0===n?void 0:n.concat(E))||[];er.Z.setStrangerConverListObj({conversation:I,cursor:y().fromValue(m).toString(),hasMore:h,unreadCount:g,loading:!1}),a(!1),!u&&c(!1),er.Z.setConversationMap(I),eY.getAllStrangerFromServer(),eY.updateIsStrangerConver()}),(0,a._)(eY,"getStrangerConversationPreview",L()(()=>{var e;return null===(e=eY.bytedIMInstance)||void 0===e?void 0:e.getStrangerPreview({}).then(e=>{if(eI.Z.log("new-preview",e),e){let{conversation:t={},unreadCount:n=0}=e;eY.getStrangerFromServerWithConver(t),er.Z.setStrangerMessageUnreadCount(n),er.Z.setStrangerBoxCover(t)}else er.Z.setStrangerBoxCover(null),er.Z.setStrangerMessageUnreadCount(0)})},200)),(0,a._)(eY,"unreadCountReport",L()(()=>{let{bytedIMInstance:e}=eY;null==e||e.unreadCountReport()},200))},209998:function(e,t,n){n.d(t,{G:function(){return d},n:function(){return _}});var i=n(720709),o=n(998629),a=n(640234),l=n(752865);let{ConversationType:s}=i.m,{GROUP_CHAT:r,ONE_TO_ONE_CHAT:c}=s,u=async e=>{if(!e)return!1;let t=(0,l.i)();if(!t)return!1;let{conversationId:n,sender:i}=e;if(!i)return!1;let o=t.getConversation({conversationId:n});if(!o)return!1;let{type:a,coreInfo:s}=o;return a===r&&(null==s?void 0:s.owner)===i},d=e=>{let{type:t,ext:n}=e,i=(0,a.t)(e),l=null==i?void 0:i.type,s="";switch(t){case o.pp.TEXT:s="text";break;case o.pp.SHARE_WEB:0!==(null==i?void 0:i.aweType)&&(s=(null==i?void 0:i.msgTrack)||"");break;case o.pp.SHARE_WEB_FROM_THIRD_MESSAGE:s="share_from_third";break;case o.pp.XPLAN_STICKER_EMOJI:s=l===o.c6.AWEME_XEMOJI?"xmoji":"emoji";break;case o.pp.BIG_EMOJI:s=l===o.c6.AWEME_EMOJI_SELF?"emoji":l===o.c6.AWEME_NET_SEARCH_GIF?"giphy":l===o.c6.AWEME_GREET_EMOJI?"emoji":l===o.c6.AWEME_LITE_MSG_EMOJI?"lite_emoji":l===o.c6.AWEME_LITE_MSG_EMOJI_NEW?"lite_emoji":l===o.c6.AWEME_INTERACTIVE_EMOJI?"lite_emoji":"emoji";break;case o.pp.ONE_CARD:l===o.c6.GROUP_VOTE&&(s="poll");break;case o.pp.VOICE:case o.pp.ENCRYPT_VOICE:case o.pp.IM_ENCRYPT_VOICE:s="audio";break;case o.pp.ONLY_PICTURE:case o.pp.STORY_PICTURE:s="pic";break;case o.pp.STORY_VIDEO:s="video";break;case o.pp.SHARE_AWEME:s="share_video";break;case o.pp.SHARE_PHOTOS:s="share_photos";break;case o.pp.SHARE_COMPILATION:s="share";break;case o.pp.SHARE_USER:case o.pp.SHARE_MUSIC:case o.pp.SHARE_CHALLENGE:case o.pp.SHARE_STICKER:s="page";break;case o.pp.RED_PACKET:s="redpacket";break;case o.pp.SHARE_MINI_APP:s="mini_app";break;case o.pp.REF_MSG:s="ref_message";break;case o.pp.FRIEND_VIDEO_DM_COMMENT:s="friend_video_card";break;case o.pp.GROUP_INVITE_MESSAGE:let r=null==n?void 0:n["a:group_invite"];if("1"==`${r}`)s="group_card";else{let e=null==i?void 0:i.aweme_invite_card;s=(null==e?void 0:e.card_type)===1?"group_card":"unknown"}break;case o.pp.COMMAND_SHARE:s="token_video_card";break;case o.pp.SHARE_LIVE:s=l===o.c6.LIVE_KTV?"familiar_invitation_ktv":l===o.c6.LIVE_VOICE?"familiar_invitation_chatting_room":"live_card";break;case o.pp.FEED_LIVE_SHARE_INVITE_MESSAGE:s="co_play_invitation";break;case o.pp.DIRECT_INVITE:s="invite";break;case o.pp.GAME_INVITE:case o.pp.GAME_INVITE_V2:s="chat_game";break;case o.pp.CLOUD_GAME_INVITE:s="cloud_game_card";break;case o.pp.COUPON_ENTERPRISE:case o.pp.COUPON_FANS_GROUP:s="fansgroup_coupon";break;case o.pp.CHAT_CALL:s="chat_call";break;case o.pp.SHARE_PICTURE:s="share_picture";break;case o.pp.AT_FRIEND_INTERACT:s="publish_at";break;case o.pp.URGE_LEAVE_MESSAGE:s=u(e)?"reply_to_update":"ask_for_update";break;case o.pp.SHARE_LOCATION:s="location";break;case o.pp.STORY_PICTURE_ONCE_VIEW:s="only_once_pic";break;case o.pp.STORY_VIDEO_ONCE_VIEW:s="only_once_video";break;case o.pp.SHARE_COMMENT:s="share_comment";break;case o.pp.BULLET:s="bullet";break;default:s="unknown"}return s},_={[r]:"group",[c]:"private"}},144985:function(e,t,n){var i=n(629686),o=n(402748);n(374954),n(490629);var a=n(337793),l=n.n(a);let{GROUP_CHAT:s,ONE_TO_ONE_CHAT:r}=n(856652).i1,c=e=>e>=0?e:1/0,u=(e,t,n,i)=>{if(!e)return[];let o=0,a=[];for(let l=0;l<e.length;l++)if(o<t){let t=n(e[l]);if(!t||i.has(t))continue;i.add(t),a.push(e[l]),o++}else break;return a},d={enable:!0,recent_share_count:-1,sort_info_count:-1,signle_follow_count:-1,double_follow_count:-1};t.Z=e=>{var t;let{sorted_info:n,remove_share_panel_info:a=[],mix_recent_share_users:_=[],followings:v=[]}=e||{},{signle_follow_count:p,double_follow_count:f,recent_share_count:E,sort_info_count:m}=d,h=new Set,g=[],I=[],O=[],C=v;l()(a,e=>{let t=e.conv_id||e.sec_uid;h.add(t)});let M=c(E),N=c(m),T=u(_,M,e=>e.sec_uid||e.conv_id,h).map(e=>(0,o._)((0,i._)({},e),{conv_type:e.sec_uid?r:s})),L=u(n,N,e=>e.sec_uid||e.conv_short_id_str||e.conv_id,h).map(e=>(0,o._)((0,i._)({},e),{conv_id:String(e.conv_short_id_str||e.conv_id||""),conv_type:e.sec_uid?r:s}));for(let e=0;e<(null==C?void 0:C.length);e++){let t=C[e],n=(null==t?void 0:t.sec_uid)||t.uid||(null==t?void 0:t.conv_id);if("0"!==t.uid&&h.has(n))continue;let i=c(f),o=c(p);if(I.length<i&&(null==t?void 0:t.follow_status)===2?I.push(t):g.length<o&&(null==t?void 0:t.follow_status)===1?g.push(t):(null==t?void 0:t.follow_status)===0&&O.push(t),I.length>=i&&g.length>=o)break}let w=(null==C?void 0:null===(t=C.map)||void 0===t?void 0:t.call(C,e=>e.uid))||[];return{shareConversationInfoList:[...T,...L],followList:C=[...I,...g,...O],followUidList:w}}},499329:function(e,t,n){n.d(t,{Z:function(){return eZ}});var i=n("629686"),o=n("402748");n("490629"),n("706056");var a=n("320165"),l=n("101199"),s=n("469935"),r=n.n(s),c=n("849023"),u=n("732979"),d=n.n(u),_=n("198412"),v=n.n(_),p=n("933524"),f=n("795653"),E=n("709705"),m=n("414061"),h=n("426038"),g=n("173379");n("240148"),n("759943");var I=n("472054"),O=n("696492"),C=n("319053"),M=n("33482"),N=n("46892");let T=(0,l.forwardRef)((e,t)=>(0,a.jsxs)("svg",(0,o._)((0,i._)({width:20,height:20,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:[(0,a.jsx)("circle",{cx:10,cy:10,r:10,fill:"url(#atIcon_svg__paint0_linear_731_20431)"}),(0,a.jsx)("path",{d:"M10.18 14.715c.346 0 1.016-.075 1.016-.075s.554-.062.498-.605c-.057-.543-.612-.43-.612-.43l-.098.011-.182.019-.166.014c-.13.01-.245.014-.341.014a4.405 4.405 0 0 1-1.525-.254 3.404 3.404 0 0 1-1.192-.729 3.273 3.273 0 0 1-.775-1.146 3.945 3.945 0 0 1-.275-1.509c0-.523.087-1.012.262-1.464a3.57 3.57 0 0 1 .737-1.178 3.368 3.368 0 0 1 1.147-.786 3.75 3.75 0 0 1 1.48-.285c.495 0 .952.067 1.37.202.42.136.78.336 1.083.602.304.267.54.596.712.99.17.392.256.842.256 1.349 0 .6-.11 1.077-.327 1.432-.218.355-.493.533-.826.533-.163 0-.272-.05-.327-.146a.72.72 0 0 1-.083-.362c0-.126.015-.261.044-.405.03-.144.054-.275.07-.393l.459-2.11c.047-.229-.058-.468-.456-.52-.397-.053-.63.175-.665.346l-.08.395h-.013c-.068-.194-.214-.359-.436-.494s-.495-.203-.82-.203a2.14 2.14 0 0 0-1.025.247 2.62 2.62 0 0 0-.794.653c-.222.27-.393.579-.513.925a3.204 3.204 0 0 0-.179 1.052c0 .609.158 1.103.474 1.483.316.38.765.57 1.345.57.385 0 .71-.09.974-.272.265-.181.461-.374.59-.577h.064c0 .246.102.448.307.609.205.16.478.24.82.24.328.002.653-.065.955-.196.303-.13.572-.327.807-.59.235-.26.423-.586.564-.975a3.93 3.93 0 0 0 .211-1.344c0-.684-.126-1.28-.378-1.787A3.711 3.711 0 0 0 13.325 6.3a4.365 4.365 0 0 0-1.454-.76 5.693 5.693 0 0 0-1.692-.254c-.674 0-1.309.12-1.902.361a4.915 4.915 0 0 0-1.557.995 4.662 4.662 0 0 0-1.05 1.496 4.553 4.553 0 0 0-.385 1.876c0 .684.117 1.316.352 1.895.235.578.566 1.075.993 1.489.427.414.942.737 1.544.97.602.232 1.27.348 2.005.348zm-.462-3.308a.775.775 0 0 1-.41-.095.796.796 0 0 1-.25-.24.857.857 0 0 1-.128-.318 1.762 1.762 0 0 1-.032-.323c0-.203.028-.414.083-.634.056-.22.137-.42.244-.602.1-.174.233-.326.39-.45a.855.855 0 0 1 .539-.177c.162 0 .299.034.41.101a.77.77 0 0 1 .262.26c.064.105.11.224.135.355.025.13.038.264.038.4 0 .168-.023.354-.07.557-.045.198-.12.388-.224.564-.1.17-.236.317-.397.43a1.002 1.002 0 0 1-.59.172z",fill:"#fff"}),(0,a.jsx)("defs",{children:(0,a.jsxs)("linearGradient",{id:"atIcon_svg__paint0_linear_731_20431",x1:10,y1:0,x2:11.339,y2:19.91,gradientUnits:"userSpaceOnUse",children:[(0,a.jsx)("stop",{stopColor:"#FFD771"}),(0,a.jsx)("stop",{offset:1,stopColor:"#FFAD10"})]})})]}))),L=(0,l.forwardRef)((e,t)=>(0,a.jsxs)("svg",(0,o._)((0,i._)({width:20,height:20,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:[(0,a.jsx)("circle",{cx:10,cy:10,r:10,fill:"url(#commentIcon_svg__paint0_linear_731_20419)"}),(0,a.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 13.464c2.627 0 4.757-1.85 4.757-4.133 0-2.282-2.13-4.133-4.757-4.133s-4.757 1.85-4.757 4.133 2.13 4.133 4.757 4.133zm-2.4-3.312a.618.618 0 1 0 0-1.237.618.618 0 0 0 0 1.237zm3.018-.624a.619.619 0 1 1-1.237 0 .619.619 0 0 1 1.237 0zm1.782.618a.619.619 0 1 0 0-1.237.619.619 0 0 0 0 1.237z",fill:"#fff"}),(0,a.jsx)("path",{d:"M10.07 13.788v-.674l2.946-.599-2.138 1.667a.5.5 0 0 1-.807-.394z",fill:"#fff"}),(0,a.jsx)("defs",{children:(0,a.jsxs)("linearGradient",{id:"commentIcon_svg__paint0_linear_731_20419",x1:10,y1:0,x2:10,y2:20,gradientUnits:"userSpaceOnUse",children:[(0,a.jsx)("stop",{stopColor:"#5FDAFF"}),(0,a.jsx)("stop",{offset:1,stopColor:"#076EFF"})]})})]}))),w=(0,l.forwardRef)((e,t)=>(0,a.jsxs)("svg",(0,o._)((0,i._)({width:20,height:20,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:[(0,a.jsx)("circle",{cx:10,cy:10,r:10,fill:"url(#diggIcon_svg__paint0_linear_728_20419)"}),(0,a.jsx)("g",{filter:"url(#diggIcon_svg__filter0_i_728_20419)",children:(0,a.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.378 7.021a2.503 2.503 0 0 0-.42.574 2.424 2.424 0 0 0-.419-.575 1.97 1.97 0 0 0-1.436-.591c-1.377 0-2.512 1.108-2.512 2.743 0 1.815 1.524 3.615 3.857 5.135.178.12.375.228.51.228.133 0 .334-.108.513-.228 2.333-1.52 3.856-3.32 3.856-5.135 0-1.635-1.135-2.743-2.511-2.743a1.97 1.97 0 0 0-1.438.592z",fill:"#fff"})}),(0,a.jsxs)("defs",{children:[(0,a.jsxs)("filter",{id:"diggIcon_svg__filter0_i_728_20419",x:5.591,y:6.429,width:8.736,height:9.598,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[(0,a.jsx)("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),(0,a.jsx)("feBlend",{in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),(0,a.jsx)("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,a.jsx)("feOffset",{dy:1.492}),(0,a.jsx)("feGaussianBlur",{stdDeviation:2.238}),(0,a.jsx)("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:-1,k3:1}),(0,a.jsx)("feColorMatrix",{values:"0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.34 0"}),(0,a.jsx)("feBlend",{in2:"shape",result:"effect1_innerShadow_728_20419"})]}),(0,a.jsxs)("linearGradient",{id:"diggIcon_svg__paint0_linear_728_20419",x1:10,y1:0,x2:10,y2:20,gradientUnits:"userSpaceOnUse",children:[(0,a.jsx)("stop",{stopColor:"#FFA189"}),(0,a.jsx)("stop",{offset:1,stopColor:"#FF1F5F"})]})]})]}))),S=(0,l.forwardRef)((e,t)=>(0,a.jsxs)("svg",(0,o._)((0,i._)({width:20,height:20,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:[(0,a.jsxs)("g",{clipPath:"url(#danmakuIcon_svg__clip0_742_20449)",children:[(0,a.jsx)("path",{d:"M10 20c5.523 0 10-4.477 10-10S15.523 0 10 0 0 4.477 0 10s4.477 10 10 10z",fill:"url(#danmakuIcon_svg__paint0_linear_742_20449)"}),(0,a.jsx)("path",{d:"M5.836 6.328h2.06V8.8h-2.06v2.06h2.06v2.883h-2.06M9.54 10.448V7.152h4.119v3.296h-4.12zM9.125 12.098h4.944M11.602 7.152v7.004M10.367 5.918l.824 1.236M12.84 5.918l-.824 1.236M9.54 8.8h4.119",stroke:"#fff",strokeWidth:1.1,strokeLinecap:"round",strokeLinejoin:"round"})]}),(0,a.jsxs)("defs",{children:[(0,a.jsxs)("linearGradient",{id:"danmakuIcon_svg__paint0_linear_742_20449",x1:10.833,y1:20,x2:11.25,y2:"-.417",gradientUnits:"userSpaceOnUse",children:[(0,a.jsx)("stop",{stopColor:"#22A2FF"}),(0,a.jsx)("stop",{offset:1,stopColor:"#45B9FF"})]}),(0,a.jsx)("clipPath",{id:"danmakuIcon_svg__clip0_742_20449",children:(0,a.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})]})]})));var R=n("995066"),y=n("534321"),A=n("34841"),D=n("234150"),x=n("176449");let b={[O.I6.AT]:T,[O.I6.COMMENT]:L,[O.I6.COMMENT_DANMAKU]:S,[O.I6.DIGG]:w},k=(0,c.inject)("noticeStore")((0,c.observer)(e=>{let{userSecUid:t="",srcList:n=[],className:i,avatarClassName:o,iconType:l,iconWidth:s=22,iconHeight:c=22,iconViewBox:u="0 0 22 22",iconClassName:d,canEnterUserPage:_=!0,showScene:v=O.DL.NOTICE_LIST,showBadge:p=!1}=e,f=b[l]||"";return _&&t?(0,a.jsx)(D.a,{isNeedSeoOpt:!1,href:(0,N.HC)(t,`enter_from=${y.QZ[v]}`),target:"_blank",rel:"noopener noreferrer",children:(0,a.jsxs)("div",{className:r()(R.default.userAvatar,i),"data-e2e":"user-avatar-card",onClick:e=>{e.stopPropagation(),m.emit(m.EVENT.ListenVideoPipWindowClose)},children:[(0,a.jsx)(A.n,{srcList:n,className:r()(R.default.userAvatar,o)}),p?(0,a.jsx)("div",{className:R.default.mutedBadge}):null,f?(0,a.jsx)("div",{className:R.default.iconBox,children:(0,a.jsx)(x.Z,{src:f,width:s,height:c,viewBox:u,className:r()(R.default.icon,d)})}):null]})}):(0,a.jsxs)("div",{className:r()(R.default.userAvatar,i),onClick:e=>e.stopPropagation(),children:[(0,a.jsx)(A.n,{srcList:n,className:r()(R.default.userAvatar,o)}),p?(0,a.jsx)("div",{className:R.default.mutedBadge}):null,f?(0,a.jsx)("div",{className:R.default.iconBox,children:(0,a.jsx)(x.Z,{src:f,width:s,height:c,viewBox:u,className:r()(R.default.icon,d)})}):null]})}));var U=n("785413"),G=n("76484"),j=n("363884");let F=(0,c.inject)("noticeStore")((0,c.observer)(e=>{let{userName:t="",labelText:n="",showLabel:i=!0,className:o,userSecUid:l="",uid:s="",canEnterUserPage:c=!0,showScene:u=O.DL.NOTICE_LIST,noticeStore:d}=e,_=(0,U.V)({enable:!0,secUid:l}),v=null==_?void 0:_.isOnline,{abTestData:p}=d;return(0,a.jsxs)("div",{className:r()(G.default.userNameContainer,o),onClick:e=>e.stopPropagation(),children:[c&&l?(0,a.jsx)(D.a,{className:G.default.userName,href:(0,N.HC)(l,`enter_from=${y.QZ[u]}`),target:"_blank",rel:"noopener noreferrer",onClick:()=>{m.emit(m.EVENT.ListenVideoPipWindowClose)},children:(0,a.jsx)("div",{className:G.default.userName,"data-e2e":"user-name-card",children:t})}):(0,a.jsx)("div",{className:G.default.userName,children:t}),(0,a.jsx)(j.Z,{uid:s}),v?(0,a.jsx)("div",{className:G.default.onlineTag,children:"在线"}):(null==_?void 0:_.lastActiveText)?(0,a.jsx)("div",{className:G.default.userLabel,children:null==_?void 0:_.lastActiveText}):i&&n?(0,a.jsx)("div",{className:G.default.userLabel,children:n}):null]})})),P=(0,l.forwardRef)((e,t)=>(0,a.jsx)("svg",(0,o._)((0,i._)({width:26,height:20,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:(0,a.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3 0a3 3 0 0 0-3 3v14a3 3 0 0 0 3 3h10.655A7.5 7.5 0 0 1 26 11.5V4.802c0-1.198-1.335-1.913-2.332-1.248L21 5.333V3a3 3 0 0 0-3-3H3zm5.777 6.518A.5.5 0 0 0 8 6.934v6.132a.5.5 0 0 0 .777.416l4.599-3.066a.5.5 0 0 0 0-.832L8.777 6.518z",fill:"#41424C"})}))),W=(0,l.forwardRef)((e,t)=>(0,a.jsxs)("svg",(0,o._)((0,i._)({width:12,height:12,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:[(0,a.jsx)("circle",{cx:6,cy:6,r:5.25,transform:"rotate(45 6 6)",stroke:"#41424C",strokeWidth:1.5}),(0,a.jsx)("path",{fill:"#41424C",d:"M2.995 1.934l7.071 7.071-1.06 1.061-7.072-7.071z"})]})));var Z=n("889174"),V=n("409554"),H=n("263070");let B=e=>e===O.EV.FollowEachOtherStatus,Y=e=>e===O.EV.FollowEachOtherStatus||e===O.EV.FollowingStatus,K=e=>{let t=null==e?void 0:e.ban_user_functions;return!!t&&(null==t?!!void 0:!!t.contains)&&((null==t?void 0:t.contains(1))===!0||(null==t?void 0:t.contains(18))===!0||(null==t?void 0:t.contains(19))===!0)||!1},q=e=>{var t,n,i,o,a;let{author:l={},is_delete:s}=e;if(!0===s)return!0;let{uid:r}=l||{},{uid:c}=V.Z,u=r===c;return H.Z.log("checkShowDeletedCover",e,u),(!!((null==e?void 0:null===(t=e.status)||void 0===t?void 0:t.private_status)===O.ut.AUTHOR_VISIBLE&&(null===(n=e.status)||void 0===n?void 0:n.part_see)===1&&!u||(null==e?void 0:null===(i=e.status)||void 0===i?void 0:i.privateStatus)===O.ut.FRIEND_VISIBLE&&!1===B(null==l?void 0:l.follow_status)&&!u||(null==e?void 0:null===(o=e.status)||void 0===o?void 0:o.self_see)===!0&&!u||(null==e?void 0:null===(a=e.status)||void 0===a?void 0:a.is_prohibited)===!0&&!u||(null==l?void 0:l.secret)===1&&!1===Y(null==l?void 0:l.follow_status)&&!u||(null==l?void 0:l.is_blocking_v2)===!0&&!u||(null==l?void 0:l.is_blocked_v2)===!0&&!u||(null==l?void 0:l.user_canceled)===!0&&!u||(null==l?void 0:l.is_ban)===!0&&!u||K(l)&&!u)||(null==l?void 0:l.is_not_show)===!0&&!u)&&!0},J=(0,c.inject)("noticeStore")((0,c.observer)(e=>{var t,n,i;let{awemeInfo:o={},className:l}=e,{aweme_id:s,status:c={},video:u={}}=o;return!s||c.is_delete||q(o)||(null==u?void 0:null===(n=u.cover)||void 0===n?void 0:null===(t=n.url_list)||void 0===t?void 0:t.length)===0?(0,a.jsxs)("div",{className:r()(Z.default.awemeCover,Z.default.awemeDeleted,l),children:[(0,a.jsx)(x.Z,{src:P,width:26,height:20,viewBox:"0 0 26 20"}),(0,a.jsx)(x.Z,{src:W,width:12,height:12,viewBox:"0 0 12 12",className:Z.default.playIcon})]}):(0,a.jsx)(A.n,{srcList:(null==u?void 0:null===(i=u.cover)||void 0===i?void 0:i.url_list)||[],className:r()(Z.default.awemeCover,l)})}));var $=n("163448");let z=(0,c.inject)("noticeStore")((0,c.observer)(e=>{var t;let{commentText:n="",stickerInfo:i=null,needEllipsis:o=!1,className:l,commentStatus:s=O.ql.ALL_VISIBLE,showContentType:c=O.PY.COMMENT_INFO,awemeInfo:u={},imageList:d=null}=e,{status:_={}}=u,v=c===O.PY.AWEME_INFO&&(null==_?void 0:_.is_delete)||c===O.PY.COMMENT_INFO&&s===O.ql.DELETE;return(0,a.jsx)("div",{className:r()($.default.content,l),children:v?(0,a.jsx)("div",{children:c===O.PY.AWEME_INFO?"此作品已删除":"此评论已删除"}):(0,a.jsxs)("pre",{className:o?$.default.contentEllipsis:"",children:[n||"",i?"[表情]":null,d?null===(t=d.map)||void 0===t?void 0:t.call(d,()=>"[图片]").join(""):null]})})})),Q=(0,c.inject)("noticeStore")((0,c.observer)(e=>{var t,n;let{noticeInfo:i={},createTime:o="",awemeId:s="0",noticeType:c,canEnterUserPage:u=!0,needContentEllipsis:d=!1,showAwemeCover:_=!0,handleAwemeStatus:v=()=>{},handleClickNotice:p=()=>{},showScene:f,userNameClassName:E,contentInfoClassName:m,hintClassName:h,closeRender:g,showNoticeUnread:N=!1,noticeStore:T={}}=e,{user_info:L={},sub_type:w=O.vw.NORMAL,aweme:S={},label_text:R="",content:y="",sticker:A=null,comment_status:D=O.ql.ALL_VISIBLE}=i,{abTestData:x}=T,b=(0,l.useCallback)(()=>{var e;let{status:t={}}=S,{is_delete:n=!1}=t;if(!s||"0"===s||n){null==v||v(O.bj.DELETED);return}let{schema_url:o=""}=i,a=(null===(e=o.match(/cid=(\d+)/))||void 0===e?void 0:e[1])||"";null==p||p({awemeId:s,cid:a},t)},[s,i]);return(0,a.jsxs)("div",{className:r()(I.default.noticeContainer,I.default.noticeContainerTestGroup),onClick:b,children:[(0,a.jsxs)("div",{className:I.default.noticeInfo,children:[(0,a.jsx)(k,{srcList:(null==L?void 0:null===(t=L.avatar_thumb)||void 0===t?void 0:t.url_list)||[],userSecUid:null==L?void 0:L.sec_uid,iconType:c,canEnterUserPage:u,showScene:f,showBadge:N}),(0,a.jsxs)("div",{className:I.default.mainInfo,children:[(0,a.jsx)(F,{userName:(null==L?void 0:L.remark_name)||(null==L?void 0:L.nickname)||"",labelText:R,userSecUid:null==L?void 0:L.sec_uid,uid:null==L?void 0:L.uid,canEnterUserPage:u,showScene:f,className:E}),(0,a.jsx)(z,{commentText:y,stickerInfo:A,needEllipsis:d,commentStatus:D,showContentType:null===(n=C.zC[c])||void 0===n?void 0:n[w],awemeInfo:S,className:m}),(0,a.jsxs)("div",{className:r()(I.default.hint,h),children:[(0,a.jsx)("span",{children:(null===M.P2||void 0===M.P2?void 0:M.P2[w])||""}),(0,a.jsx)("span",{children:o})]})]})]}),_?(0,a.jsx)(J,{awemeInfo:S,className:I.default.awemeCover}):g]})}));var X=n("728143");let ee=(0,c.inject)("noticeStore")((0,c.observer)(e=>{var t;let{noticeInfo:n={},createTime:i="",awemeId:o="0",noticeType:s,canEnterUserPage:c=!0,needContentEllipsis:u=!1,showAwemeCover:d=!0,handleAwemeStatus:_=()=>{},handleClickNotice:v=()=>{},showScene:p,userNameClassName:f,contentInfoClassName:E,hintClassName:m,closeRender:h,showNoticeUnread:g=!1,noticeStore:I={}}=e,{aweme:N={},comment:T={},comment_type:L=O.W1.NORMAL,label_text:w=""}=n||{},{abTestData:S}=I,{user:R={}}=T,y=(0,l.useCallback)(()=>{let{status:e={}}=N,{is_delete:t=!1}=e;if(!o||"0"===o||t){null==_||_(O.bj.DELETED);return}let{cid:n=""}=T;null==v||v({awemeId:o,cid:n},e)},[o,T]);return(0,a.jsxs)("div",{className:r()(X.default.noticeContainer,X.default.noticeContainerTestGroup),onClick:y,children:[(0,a.jsxs)("div",{className:X.default.noticeInfo,children:[(0,a.jsx)(k,{srcList:(null==R?void 0:null===(t=R.avatar_thumb)||void 0===t?void 0:t.url_list)||[],userSecUid:null==R?void 0:R.sec_uid,iconType:s,canEnterUserPage:c,showScene:p,showBadge:g}),(0,a.jsxs)("div",{className:X.default.mainInfo,children:[(0,a.jsx)(F,{userName:(null==R?void 0:R.remark_name)||(null==R?void 0:R.nickname)||"",labelText:w,userSecUid:null==R?void 0:R.sec_uid,uid:null==R?void 0:R.uid,canEnterUserPage:c,showScene:p,className:f}),(0,a.jsx)(z,{commentText:(null==T?void 0:T.text)||"",stickerInfo:(null==T?void 0:T.sticker)||null,needEllipsis:u,commentStatus:null==T?void 0:T.status,showContentType:C.zC[s],className:E,imageList:(null==T?void 0:T.image_list)||null}),(0,a.jsxs)("div",{className:r()(X.default.hint,m),children:[(0,a.jsx)("span",{children:(null===M.JO||void 0===M.JO?void 0:M.JO[L])||""}),(0,a.jsx)("span",{children:i})]})]})]}),d?(0,a.jsx)(J,{awemeInfo:N,className:X.default.awemeCover}):h]})})),et=(0,l.forwardRef)((e,t)=>(0,a.jsx)("svg",(0,o._)((0,i._)({width:5,height:8,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:(0,a.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M.167.167a.571.571 0 0 0 0 .808L3.192 4 .167 7.025a.571.571 0 1 0 .808.808l3.429-3.429a.571.571 0 0 0 0-.808L.975.167a.571.571 0 0 0-.808 0z",fill:"#2F3035",fillOpacity:".7"})})));var en=n("42636");let ei=(0,c.inject)("noticeStore")((0,c.observer)(e=>{var t,n;let{noticeStore:i={},noticeInfo:o={},createTime:s="",noticeId:c="",awemeId:u="0",noticeType:d,canEnterUserPage:_=!0,showAwemeCover:v=!0,handleAwemeStatus:p=()=>{},handleClickNotice:f=()=>{},showScene:E=O.DL.NOTICE_LIST,userNameClassName:h,contentInfoClassName:g,hintClassName:I,closeRender:T,showNoticeUnread:L=!1}=e,{aweme:w={},comment:S={},from_user:R=[],merge_count:b=1,digg_type:U=O.vq.NORMAL,label_text:G="",danmaku_info:j}=o||{},P=(null==R?void 0:R[0])||{},W=b>1&&(null==R?void 0:R.length)>1,Z=(0,l.useRef)(null),{abTestData:V}=i,H=(0,l.useCallback)(()=>{let{status:e={}}=w,{is_delete:t=!1}=e;if(!u||"0"===u||t){null==p||p(O.bj.DELETED);return}let{cid:n=""}=S,i={danmakuId:null==j?void 0:j.danmaku_id,danmakuOffset:null==j?void 0:j.offset,status:null==j?void 0:j.status};null==f||f({awemeId:u,cid:n},e,i)},[u,S]);return(0,l.useEffect)(()=>{switch(U){case O.vq.NORMAL:case O.vq.DIGG_ITEM:Z.current=u;break;case O.vq.DIGG_COMMENT:case O.vq.DIGG_DANMAKU:Z.current=c}},[U,c,o,u]),(0,a.jsxs)("div",{className:r()(en.default.noticeContainer,en.default.noticeContainerTestGroup),style:{height:W?103:90},onClick:H,children:[(0,a.jsxs)("div",{className:en.default.noticeInfo,children:[(0,a.jsx)(k,{srcList:(null==P?void 0:null===(t=P.avatar_thumb)||void 0===t?void 0:t.url_list)||[],userSecUid:null==P?void 0:P.sec_uid,iconType:d,canEnterUserPage:_,showScene:E,showBadge:L}),(0,a.jsxs)("div",{className:en.default.mainInfo,children:[(0,a.jsx)(F,{userName:(null==P?void 0:P.remark_name)||(null==P?void 0:P.nickname)||"",labelText:G,userSecUid:null==P?void 0:P.sec_uid,uid:null==P?void 0:P.uid,canEnterUserPage:_,showScene:E,className:h}),(0,a.jsx)("div",{className:r()(en.default.mainContent,g),children:`${b>1?`等${b}人`:""}${M.bk[U]}`}),W?(0,a.jsxs)("div",{className:en.default.userList,children:[null==R?void 0:null===(n=R.slice(1,5))||void 0===n?void 0:n.map(e=>{var t;return(0,a.jsx)("div",{className:en.default.userItem,children:(0,a.jsx)(D.a,{href:(0,N.HC)((null==e?void 0:e.sec_uid)||"",`enter_from=${y.QZ[E]}`),target:"_blank",rel:"noopener noreferrer",onClick:()=>{m.emit(m.EVENT.ListenVideoPipWindowClose)},children:(0,a.jsx)(A.n,{srcList:(null==e?void 0:null===(t=e.avatar_thumb)||void 0===t?void 0:t.url_list)||[],className:en.default.userItem,onClick:e=>e.stopPropagation()})})},null==e?void 0:e.uid)}),(null==R?void 0:R.length)>5?(0,a.jsx)("div",{className:r()(en.default.userItem,en.default.rightArrow),onClick:e=>{let t=Z.current;if(!!t&&"0"!==t)null==i||i.setUserListFilter({itemId:t,type:C.FJ[O.I6.DIGG],diggType:U}),null==i||i.setShowUserList(!0),e.stopPropagation()},children:(0,a.jsx)(x.Z,{src:et,width:5,height:8,viewBox:"0 0 5 8",className:en.default.rightArrow})}):null]}):null,(0,a.jsx)("div",{className:r()(en.default.hint,I),children:s})]})]}),v?(0,a.jsx)(J,{awemeInfo:w,className:en.default.awemeCover}):T]})}));var eo=n("565069");let ea=(0,l.forwardRef)((e,t)=>(0,a.jsxs)("svg",(0,o._)((0,i._)({width:20,height:20,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:[(0,a.jsx)("circle",{cx:10,cy:10,r:10,fill:"url(#diggIcon_svg__paint0_linear_728_20419)"}),(0,a.jsx)("g",{filter:"url(#diggIcon_svg__filter0_i_728_20419)",children:(0,a.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.378 7.021a2.503 2.503 0 0 0-.42.574 2.424 2.424 0 0 0-.419-.575 1.97 1.97 0 0 0-1.436-.591c-1.377 0-2.512 1.108-2.512 2.743 0 1.815 1.524 3.615 3.857 5.135.178.12.375.228.51.228.133 0 .334-.108.513-.228 2.333-1.52 3.856-3.32 3.856-5.135 0-1.635-1.135-2.743-2.511-2.743a1.97 1.97 0 0 0-1.438.592z",fill:"#fff"})}),(0,a.jsxs)("defs",{children:[(0,a.jsxs)("filter",{id:"diggIcon_svg__filter0_i_728_20419",x:5.591,y:6.429,width:8.736,height:9.598,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[(0,a.jsx)("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),(0,a.jsx)("feBlend",{in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),(0,a.jsx)("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,a.jsx)("feOffset",{dy:1.492}),(0,a.jsx)("feGaussianBlur",{stdDeviation:2.238}),(0,a.jsx)("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:-1,k3:1}),(0,a.jsx)("feColorMatrix",{values:"0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.34 0"}),(0,a.jsx)("feBlend",{in2:"shape",result:"effect1_innerShadow_728_20419"})]}),(0,a.jsxs)("linearGradient",{id:"diggIcon_svg__paint0_linear_728_20419",x1:10,y1:0,x2:10,y2:20,gradientUnits:"userSpaceOnUse",children:[(0,a.jsx)("stop",{stopColor:"#FFA189"}),(0,a.jsx)("stop",{offset:1,stopColor:"#FF1F5F"})]})]})]}))),el=(0,l.forwardRef)((e,t)=>(0,a.jsxs)("svg",(0,o._)((0,i._)({width:20,height:20,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:[(0,a.jsx)("circle",{cx:10,cy:10,r:10,fill:"url(#recommendIcon_svg__paint0_linear_7909_420438)"}),(0,a.jsx)("path",{d:"M12.066 13.725H8.172V8.663l2.24-2.239a.688.688 0 0 1 .973 0 .637.637 0 0 1 .156.409v.136l-.429 1.694h2.122c.208 0 .39.078.545.234a.747.747 0 0 1 .234.545v.779a.797.797 0 0 1-.058.292l-1.169 2.745a.786.786 0 0 1-.292.33.76.76 0 0 1-.428.137zm-4.52-5.062v5.062h-.933a.625.625 0 0 1-.625-.625V9.288c0-.345.28-.625.625-.625h.933z",fill:"#fff"}),(0,a.jsx)("defs",{children:(0,a.jsxs)("linearGradient",{id:"recommendIcon_svg__paint0_linear_7909_420438",x1:10,y1:0,x2:10,y2:20,gradientUnits:"userSpaceOnUse",children:[(0,a.jsx)("stop",{stopColor:"#88FFB9"}),(0,a.jsx)("stop",{offset:1,stopColor:"#13C15A"})]})})]})));var es=n("424207"),er=n("580251");let ec={[O.I6.RECOMMEND]:"work_recommended",[O.I6.FOLLOW_RECOMMEND]:"recommend_plus_one",[O.I6.FOLLOW_DIGG_RECOMMEND]:"recommend_from_me",[O.I6.FOLLOWER_DIGG_RECOMMEND]:"recommend_from_me"},eu={[O.I6.RECOMMEND]:el,[O.I6.FOLLOW_RECOMMEND]:el,[O.I6.FOLLOW_DIGG_RECOMMEND]:ea,[O.I6.FOLLOWER_DIGG_RECOMMEND]:ea},ed=(0,c.inject)("noticeStore")((0,c.observer)(e=>{let{userSecUid:t="",srcList:n=[],className:i,avatarClassName:o,iconType:l,iconWidth:s=22,iconHeight:c=22,iconViewBox:u="0 0 22 22",iconClassName:d,canEnterUserPage:_=!0,showScene:v=O.DL.NOTICE_LIST,showBadge:p=!1,onClick:f}=e,E=eu[l]||"";return _&&t?(0,a.jsx)(D.a,{isNeedSeoOpt:!1,href:(0,N.HC)(t,`enter_from=${y.QZ[v]}`),target:"_blank",rel:"noopener noreferrer",onClick:f,children:(0,a.jsxs)("div",{className:r()(es.default.userAvatar,i),"data-e2e":"user-avatar-card",onClick:e=>{(null==n?void 0:n.length)>1?e.preventDefault():(e.stopPropagation(),(0,er.Gb)("notification_message_inner_message",{action_type:"show",message_type:"message",account_type:ec[l]}))},children:[(null==n?void 0:n.length)>1?(0,a.jsxs)("div",{children:[(0,a.jsx)(A.n,{srcList:n[0],className:r()(es.default.userAvatarItemFirst)}),(0,a.jsx)(A.n,{srcList:n[1],className:r()(es.default.userAvatarItemSecond)})]}):(0,a.jsx)("div",{children:(0,a.jsx)(A.n,{srcList:n[0],className:r()(es.default.userAvatar,o)})}),p?(0,a.jsx)("div",{className:es.default.mutedBadge}):null,E?(0,a.jsx)("div",{className:es.default.iconBox,children:(0,a.jsx)(x.Z,{src:E,width:s,height:c,viewBox:u,className:r()(es.default.icon,d)})}):null]})}):(0,a.jsxs)("div",{className:r()(es.default.userAvatar,i),onClick:e=>{(null==n?void 0:n.length)>1?e.preventDefault():(e.stopPropagation(),(0,er.Gb)("notification_message_inner_message",{action_type:"show",message_type:"message",account_type:ec[l]}))},children:[(null==n?void 0:n.length)>1?(0,a.jsxs)("div",{children:[(0,a.jsx)(A.n,{srcList:n[0],className:r()(es.default.userAvatarItemFirst)}),(0,a.jsx)(A.n,{srcList:n[1],className:r()(es.default.userAvatarItemSecond)})]}):(0,a.jsx)("div",{children:(0,a.jsx)(A.n,{srcList:n[0],className:r()(es.default.userAvatar,o)})}),p?(0,a.jsx)("div",{className:es.default.mutedBadge}):null,E?(0,a.jsx)("div",{className:es.default.iconBox,children:(0,a.jsx)(x.Z,{src:E,width:s,height:c,viewBox:u,className:r()(es.default.icon,d)})}):null]})}));var e_=n("966473");let ev={[O.I6.RECOMMEND]:"work_recommended",[O.I6.FOLLOW_RECOMMEND]:"recommend_plus_one",[O.I6.FOLLOW_DIGG_RECOMMEND]:"recommend_from_me",[O.I6.FOLLOWER_DIGG_RECOMMEND]:"recommend_from_me"},ep=(0,c.inject)("noticeStore")((0,c.observer)(e=>{var t,n,i,o;let{noticeStore:s={},noticeInfo:c={},createTime:u="",awemeId:d="0",noticeType:_,canEnterUserPage:v=!0,showAwemeCover:p=!0,handleAwemeStatus:f=()=>{},handleClickNotice:E=()=>{},showScene:m=O.DL.NOTICE_LIST,userNameClassName:h,contentInfoClassName:g,hintClassName:I,closeRender:C,showNoticeUnread:M=!1}=e,{aweme:N={},comment:T={},from_user:L=[],label_text:w="",danmaku_info:S,content:R,sub_type:y}=c||{},A=(null==L?void 0:L[0])||{},D=(null==L?void 0:L.length)>1,x=(0,e_.Y)(()=>{(0,er.Gb)("notification_message_inner_message",{action_type:"show",message_type:"message",account_type:ev[_]})}),{abTestData:b}=s,k=(0,l.useCallback)(()=>{(0,er.Gb)("notification_message_inner_message",{action_type:"click",message_type:"message",account_type:ev[_]});let{status:e={}}=N,{is_delete:t=!1}=e;if(!d||"0"===d||t){null==f||f(O.bj.DELETED);return}let{cid:n=""}=T,i={danmakuId:null==S?void 0:S.danmaku_id,danmakuOffset:null==S?void 0:S.offset,status:null==S?void 0:S.status};null==E||E({awemeId:d,cid:n},e,i)},[d,T]);return(0,a.jsxs)("div",{className:r()(eo.default.noticeContainer),style:{height:90},onClick:k,ref:x,children:[(0,a.jsxs)("div",{className:eo.default.noticeInfo,children:[(0,a.jsx)(ed,{srcList:D?[(null==A?void 0:null===(t=A.avatar_thumb)||void 0===t?void 0:t.url_list)||[],(null==L?void 0:null===(i=L[1])||void 0===i?void 0:null===(n=i.avatar_thumb)||void 0===n?void 0:n.url_list)||[]]:[(null==A?void 0:null===(o=A.avatar_thumb)||void 0===o?void 0:o.url_list)||[]],userSecUid:null==A?void 0:A.sec_uid,iconType:_,canEnterUserPage:v,showScene:m,showBadge:M,onClick:e=>{_===O.I6.FOLLOW_RECOMMEND}}),(0,a.jsxs)("div",{className:eo.default.mainInfo,children:[(0,a.jsx)(F,{userName:(null==A?void 0:A.remark_name)||(null==A?void 0:A.nickname)||"",labelText:w,userSecUid:null==A?void 0:A.sec_uid,uid:null==A?void 0:A.uid,canEnterUserPage:v,showScene:m,className:h}),(0,a.jsx)("div",{className:r()(eo.default.mainContent,g),children:R}),(0,a.jsx)("div",{className:r()(eo.default.hint,I),children:u})]})]}),p?(0,a.jsx)(J,{awemeInfo:N,className:eo.default.awemeCover}):C]})}));var ef=n("908219"),eE=n.n(ef),em=n("48795"),eh=n("132825"),eg=n("795919"),eI=n("217969"),eO=n("829683"),eC=n("598444"),eM=n("337747");let eN=(0,c.inject)("noticeStore")((0,c.observer)(e=>{var t,n;let{noticeInfo:s={},createTime:c="",noticeType:u,noticeId:_="",canEnterUserPage:v=!0,handleClickNotice:p=()=>{},needContentEllipsis:f=!1,userNameClassName:g,contentInfoClassName:I,hintClassName:C,showNoticeUnread:N=!1,noticeStore:T={},noticeLogInfo:L={}}=e,{from_user:w={},content:S=""}=s,{followStatusMap:R={},abTestData:A}=T,[D,x]=(0,l.useState)(!1),[b,U]=(0,l.useState)(O.EV.NoRelationStatus),[G,j]=(0,l.useState)(O.EV.NoRelationStatus),P=(0,l.useCallback)(()=>d()().format("YYYY-MM-DD")!==(0,E.$o)(h.LocalStorageKeys.LastDayEnterNotice),[]),W=(0,l.useCallback)(()=>(0,E.qQ)(h.LocalStorageKeys.LastDayEnterNotice,d()().format("YYYY-MM-DD")),[]),Z=(0,l.useCallback)(()=>{P()&&((0,er.Gb)("interact_cell_click_all",{}),W())},[]),V=eE()(async()=>{(0,er.Gb)("interact_cell_click",(0,o._)((0,i._)({},L),{follow_act:y.M5.APPROVE_FOLLOW_REQUEST,personal_relation:String(G)})),Z();let{uid:e=""}=w;if(!e)return;let[t,n]=await (0,eC.F)(null==eh?void 0:eg.g(e));if(t)return;let{status_code:a}=n||{};if(0===a){var l;x(!1),U(O.EV.FollowingStatus),null===(l=T.setFollowStatusMap)||void 0===l||l.call(T,e,O.$y.FOLLOWER,O.EV.FollowingStatus)}else{let{status_msg:e=""}=n;eM.J.emit(eM.v.SHOW_TOAST,{text:e})}},500),H=async()=>{if((0,er.Gb)("interact_cell_click",(0,o._)((0,i._)({},L),{follow_act:y.M5.REJECT_FOLLOW_REQUEST,personal_relation:String(G)})),Z(),!_)return;let[e,t]=await (0,eC.F)(null==eh?void 0:eI.Zt(O.pC.REJECT_FOLLOW_REQUEST,_));if(e)return;let{status_code:n}=t||{};0===n&&eM.J.emit(eM.v.DELETE_NOTICE,_)},B=eE()(async e=>{(0,er.Gb)("interact_cell_click",(0,o._)((0,i._)({},L),{follow_act:y.M5[e],personal_relation:String(G)})),Z();let{uid:t=""}=w;if(!t)return;let[n,a]=await (0,eC.F)(null==eh?void 0:eg.P(t,e));if(n)return;let{follow_status:l,status_code:s}=a||{};if(0===s){var r;(0,er.Gb)(y.M5[e],{enter_from:"interact_cell",personal_relation:String(G)}),j(l),null===(r=T.setFollowStatusMap)||void 0===r||r.call(T,t,O.$y.FOLLOW,l),e===O.Ol.FOLLOW&&m.emit(m.EVENT.showClientDownloadGuide,{isShow:!0,type:"follow",text:"及时接收「关注的人」开播提醒",from:"im"})}else{let{status_msg:e=""}=a;eM.J.emit(eM.v.SHOW_TOAST,{text:e})}},500);return(0,l.useEffect)(()=>{x(u===O.RI.FOLLOW_REQUEST&&(null==w?void 0:w.follower_request_status)===O.il.ACTIVE)},[w,u]),(0,l.useEffect)(()=>{var e,t,n,i;let o=null!==(n=null==R?void 0:null===(e=R[null==w?void 0:w.uid])||void 0===e?void 0:e[O.$y.FOLLOWER])&&void 0!==n?n:(null==w?void 0:w.follower_status)||O.EV.NoRelationStatus;j(null!==(i=null==R?void 0:null===(t=R[null==w?void 0:w.uid])||void 0===t?void 0:t[O.$y.FOLLOW])&&void 0!==i?i:(null==w?void 0:w.follow_status)||O.EV.NoRelationStatus),U(o)},[w,R]),(0,a.jsxs)("div",{className:r()(eO.default.noticeContainer,eO.default.noticeContainerTestGroup),onClick:p,children:[(0,a.jsxs)("div",{className:eO.default.noticeInfo,children:[(0,a.jsx)(k,{srcList:(null==w?void 0:null===(t=w.avatar_thumb)||void 0===t?void 0:t.url_list)||[],userSecUid:null==w?void 0:w.sec_uid,iconType:u,canEnterUserPage:v,showBadge:N}),(0,a.jsxs)("div",{className:eO.default.mainInfo,children:[(0,a.jsx)(F,{userName:(null==w?void 0:w.remark_name)||(null==w?void 0:w.nickname)||"",showLabel:!1,userSecUid:null==w?void 0:w.sec_uid,uid:null==w?void 0:w.uid,canEnterUserPage:v,className:g,nameMaxWidth:D?110:148}),(0,a.jsx)("div",{className:r()(eO.default.mainContent,{[eO.default.contentEllipsis]:f},I),style:{maxWidth:D?112:148},children:S||(null===M.LS||void 0===M.LS?void 0:M.LS[u])||""}),(0,a.jsx)("div",{className:r()(eO.default.hint,C),children:c})]})]}),(0,a.jsx)("div",{className:eO.default.btnContainer,children:D?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(em.Button,{size:"small",type:"secondary",theme:"solid",className:r()(eO.default.btnItem,eO.default.smallBtn),onClick:H,children:"移除"}),(0,a.jsx)(em.Button,{size:"small",theme:"solid",className:r()(eO.default.btnItem,eO.default.smallBtn),onClick:V,children:"通过"})]}):(0,a.jsx)(em.Button,{size:"small",className:r()(eO.default.btnItem,{[eO.default.hasFollowedBtn]:G!==O.EV.NoRelationStatus}),theme:G===O.EV.NoRelationStatus?"solid":"outline",onClick:()=>{let e=G===O.EV.NoRelationStatus?O.Ol.FOLLOW:O.Ol.UNFOLLOW;e===O.Ol.UNFOLLOW?eM.J.emit(eM.v.OPEN_CONFIRM_MODAL,{content:"确认取消关注?",onConfirm:()=>B(e)}):B(e)},"data-e2e":"notice-follow-button",children:null===M.MN||void 0===M.MN?void 0:null===(n=M.MN[b])||void 0===n?void 0:n[G]})})]})}));var eT=n("715320");let eL=(0,l.forwardRef)((e,t)=>(0,a.jsx)("svg",(0,o._)((0,i._)({width:8,height:8,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:(0,a.jsx)("path",{d:"M7.667 7.667a.757.757 0 0 1-1.07 0l-2.32-2.319-2.318 2.32a.757.757 0 1 1-1.07-1.071l2.318-2.32L.888 1.96a.757.757 0 1 1 1.07-1.07l2.32 2.318L6.597.888a.757.757 0 0 1 1.07 1.07l-2.319 2.32 2.32 2.319a.757.757 0 0 1 0 1.07z",fill:"#2F3035",fillOpacity:".9"})})));var ew=n("801589");let eS=(0,c.inject)("noticeStore")((0,c.observer)(function(e){var t;let{noticeInfo:n={},createTime:i="",awemeId:o="0",noticeType:l,canEnterUserPage:s=!0,needContentEllipsis:c=!1,showAwemeCover:u=!0,handleAwemeStatus:d=()=>{},handleClickNotice:_=()=>{},showScene:v,userNameClassName:p,contentInfoClassName:f,hintClassName:E,closeRender:m,showNoticeUnread:h=!1,noticeStore:g={}}=e,{aweme:I={},comment:N={},comment_type:T=O.W1.NORMAL,label_text:L="",title:w,content:S}=n||{},{abTestData:R}=g,{user:y={}}=N;return(0,a.jsx)("div",{className:r()(ew.default.noticeContainer,ew.default.noticeContainerTestGroup),children:(0,a.jsxs)("div",{className:ew.default.noticeInfo,children:[(0,a.jsx)(k,{srcList:(null==y?void 0:null===(t=y.avatar_thumb)||void 0===t?void 0:t.url_list)||[],userSecUid:null==y?void 0:y.sec_uid,iconType:l,canEnterUserPage:s,showScene:v,showBadge:h}),(0,a.jsxs)("div",{className:ew.default.mainInfo,children:[(0,a.jsx)(F,{userName:(null==y?void 0:y.remark_name)||(null==y?void 0:y.nickname)||"未知用户",labelText:L,userSecUid:null==y?void 0:y.sec_uid,uid:null==y?void 0:y.uid,canEnterUserPage:s,showScene:v,className:p}),(0,a.jsx)(z,{commentText:(null==N?void 0:N.text)||"",stickerInfo:(null==N?void 0:N.sticker)||null,needEllipsis:c,commentStatus:null==N?void 0:N.status,showContentType:C.zC[l],className:f,imageList:(null==N?void 0:N.image_list)||null}),(0,a.jsxs)("div",{className:r()(ew.default.hint,E),children:[(0,a.jsx)("span",{children:(null===M.JO||void 0===M.JO?void 0:M.JO[T])||""}),(0,a.jsx)("span",{children:i})]})]})]})})}));var eR=n("121998"),ey=n("831908");let eA={1:"对你的作品发布了弹幕",2:"回复了你的弹幕",3:"回复了你的弹幕"},eD=(0,c.inject)("noticeStore")((0,c.observer)(function(e){var t;let{noticeInfo:n={},createTime:i="",awemeId:o="7118023827577146632",noticeType:s,canEnterUserPage:c=!0,needContentEllipsis:u=!1,showAwemeCover:d=!0,handleAwemeStatus:_=()=>{},handleClickNotice:v=()=>{},showScene:p,userNameClassName:f,contentInfoClassName:E,hintClassName:m,closeRender:h,showNoticeUnread:g=!1,noticeStore:I={}}=e,{aweme:M={},comment:N={},label_text:T="",cell_schema:L="",author:w,content:S,from_user:R,danmaku_info:y}=n||{},A=null==R?void 0:R[0],{abTestData:D}=I,x=(0,l.useMemo)(()=>{let{danmaku_id:e,danmaku_offset:t,status:n}=eR.parse(L)||{};return{danmakuId:e,danmakuOffset:Number(t),status:Number(n)}},[L]),b=(0,l.useCallback)(()=>{let{status:e={}}=M,{is_delete:t=!1}=e;if(!o||"0"===o||t){null==_||_(O.bj.DELETED);return}let{cid:n=""}=N;null==v||v({awemeId:o,cid:n},e,x)},[o,N,x]);return(0,a.jsxs)("div",{className:r()(ey.default.noticeContainer,ey.default.noticeContainerTestGroup),onClick:b,children:[(0,a.jsxs)("div",{className:ey.default.noticeInfo,children:[(0,a.jsx)(k,{srcList:(null==A?void 0:null===(t=A.avatar_thumb)||void 0===t?void 0:t.url_list)||[],userSecUid:null==A?void 0:A.sec_uid,iconType:s,canEnterUserPage:c,showScene:p,showBadge:g}),(0,a.jsxs)("div",{className:ey.default.mainInfo,children:[(0,a.jsx)(F,{userName:w,labelText:T,userSecUid:null==A?void 0:A.sec_uid,canEnterUserPage:c,showScene:p,className:f}),(0,a.jsx)(z,{commentText:S,stickerInfo:(null==N?void 0:N.sticker)||null,needEllipsis:u,commentStatus:null==N?void 0:N.status,showContentType:C.zC[s],className:E,imageList:(null==N?void 0:N.image_list)||null}),(0,a.jsxs)("div",{className:r()(ey.default.hint,m),children:[(0,a.jsx)("span",{children:eA[(null==y?void 0:y.danmaku_notice_type)||1]}),(0,a.jsx)("span",{children:i})]})]})]}),d?(0,a.jsx)(J,{awemeInfo:M,className:ey.default.awemeCover}):h]})}));var ex=n("337322");let eb=(0,l.forwardRef)((e,t)=>(0,a.jsx)("svg",(0,o._)((0,i._)({width:12,height:4,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:(0,a.jsx)("path",{d:"M2.667 2A1.333 1.333 0 1 1 0 2a1.333 1.333 0 0 1 2.667 0zM7.333 2a1.333 1.333 0 1 1-2.666 0 1.333 1.333 0 0 1 2.666 0zM10.667 3.333a1.333 1.333 0 1 0 0-2.666 1.333 1.333 0 0 0 0 2.666z",fill:"#2F3035",fillOpacity:".9"})}))),ek=(0,c.inject)("noticeStore")((0,c.observer)(e=>{let{noticeId:t="",noticeType:n,noticeLogInfo:i={}}=e,[o,s]=(0,l.useState)(!1),r=(0,l.useRef)(null),c=(0,l.useRef)(null),{interact_type:u,personal_relation:d,from_user_id:_}=i,v=async()=>{if(!t)return;let e=n===O.I6.FOLLOW_REQUEST?O.pC.REJECT_FOLLOW_REQUEST:O.pC.REGULAR,[i,o]=await (0,eC.F)((0,eI.Zt)(e,t));if(i)return;let{status_code:a}=o||{};0===a&&eM.J.emit(eM.v.DELETE_NOTICE,t),(0,er.Gb)("interact_setting_click",{interact_type:u,personal_relation:d,from_user_id:_,action:y.xi[e]})},p=()=>{!o&&(0,er.Gb)("interact_setting_show",{interact_type:u,personal_relation:d,from_user_id:_}),s(!0)},f=()=>{s(!1)};return(0,a.jsx)("div",{className:ex.default.optContainer,onMouseEnter:()=>{let e=r.current;e&&(clearTimeout(e),r.current=null),p()},onMouseLeave:()=>{r.current=setTimeout(()=>{f(),r.current=null},500)},children:(0,a.jsx)(em.Dropdown,{className:ex.default.optPos,visible:o,position:"bottomRight",render:(0,a.jsx)(em.Dropdown.Menu,{className:ex.default.optionList,children:(0,a.jsx)(em.Dropdown.Item,{className:ex.default.option,onClick:v,children:"删除消息"})}),getPopupContainer:()=>c.current||document.body,children:(0,a.jsx)("div",{className:ex.default.optIcon,ref:c,style:{position:"relative"},children:(0,a.jsx)(x.Z,{src:eb,width:12,height:4,viewBox:"0 0 12 4"})})})})}));var eU=n("603217"),eG=n("613553"),ej=n("267310"),eF=n("469674");let eP={[O.I6.AT]:{component:Q},[O.I6.COMMENT]:{component:ee},[O.I6.DIGG]:{component:ei},[O.I6.FOLLOW]:{component:eN},[O.I6.FOLLOW_REQUEST]:{component:eN},[O.I6.COMMENT_DANMAKU]:{component:eD},[O.I6.GENERAL]:{component:eS},[O.I6.FOLLOW_DIGG_RECOMMEND]:{component:ep},[O.I6.FOLLOWER_DIGG_RECOMMEND]:{component:ep},[O.I6.RECOMMEND]:{component:ep},[O.I6.FOLLOW_RECOMMEND]:{component:ep}},eW=e=>{let{handleClosePush:t}=e,n=(0,f.O)();return(0,a.jsxs)("div",{className:r()(eT.default.operateBox,{[eT.default.ohosOperateBox]:n}),children:[(0,a.jsx)("div",{className:eT.default.replyBtn,children:"查看"}),(0,a.jsx)("div",{className:eT.default.closeContainer,onClick:e=>e.stopPropagation(),children:(0,a.jsx)(x.Z,{src:eL,className:eT.default.closeBtn,viewBox:"0 0 8 8",onClick:t})})]})};var eZ=(0,c.inject)("noticeStore")((0,c.observer)(e=>{var t,n,s;let{notice:c={},handleDelete:u=()=>{},className:_,showScene:f=O.DL.NOTICE_LIST,handleClickInPush:I=()=>{},noticeListViewPortHeight:N=0,noticeListScrollTop:T=0,noticeRank:L=0,handleClosePush:w=()=>{}}=e,{type:S,has_read:R=!0,create_time:A,nid_str:D="",aweme_id:x,__by_insert:b}=c,{[null!==(s=null===C.ke||void 0===C.ke?void 0:C.ke[S])&&void 0!==s?s:null===C.ke||void 0===C.ke?void 0:C.ke[O.I6.GENERAL]]:k={}}=c,U=v()(k,C.Se[S]),G=x||(null==k?void 0:null===(t=k.aweme)||void 0===t?void 0:t.aweme_id),j=null==eP?void 0:null===(n=eP[S])||void 0===n?void 0:n.component,F=f===O.DL.NOTICE_LIST,P=f===O.DL.NOTICE_PUSH,W=f===O.DL.NOTICE_LIST,Z=f===O.DL.NOTICE_PUSH,V=f===O.DL.NOTICE_LIST&&!R,H=f===O.DL.NOTICE_PUSH?O._q.NOTICE_PUSH:O._q.NOTICE_CELL,B=(0,o._)((0,i._)({},(0,eU.e)(c,H)),{rank:L}),[Y,K]=(0,l.useState)(!1),[q,J]=(0,l.useState)("auto"),$=(0,l.useRef)(null),z=(0,l.useRef)(!1),[Q,X]=(0,p.Z)($.current);(0,l.useLayoutEffect)(()=>{X&&(0,er.Gb)("pc_notice_message_show",{notice_type:S,notice_id:D,has_read:R})},[X]);let ee=(0,l.useCallback)(()=>d()().format("YYYY-MM-DD")!==(0,E.$o)(h.LocalStorageKeys.LastDayEnterNotice),[]),et=(0,l.useCallback)(()=>(0,E.qQ)(h.LocalStorageKeys.LastDayEnterNotice,d()().format("YYYY-MM-DD")),[]),en=(0,l.useCallback)(()=>{ee()&&((0,er.Gb)("interact_cell_click_all",{}),et())},[]),ei=(0,l.useCallback)(function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:O.bj.DELETED,n=M.TR[t];if(eM.J.emit(eM.v.SHOW_TOAST,{text:n,showInDlg:W}),f===O.DL.NOTICE_PUSH){null==I||I(null);return}(0,er.Gb)("interact_cell_click",(0,o._)((0,i._)({},B),{online_status:null===(e=g.m.statusStore[U])||void 0===e?void 0:e.lastActiveLogValue,video_status:y.uS[O.bj.DELETED]})),en()},[]),eo=(0,l.useCallback)(function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(f===O.DL.NOTICE_PUSH){null==I||I(e);return}if((null===C.p0||void 0===C.p0?void 0:C.p0.includes(S))&&e){var a;let{personal_relation:l,interact_type:s}=B;m.emit(m.EVENT.openNoticeAwemeModal,(0,o._)((0,i._)({},e),{logParams:{enter_from:y.QZ[O.DL.NOTICE_LIST],personal_relation:l,interact_type:s},danmakuInfo:n}));let{private_status:r=0}=t;r?B.video_status=y.uS[O.bj.PRIVATE]:B.video_status=y.uS[O.bj.PUBLIC_VISIBLE],(0,er.Gb)("interact_cell_click",(0,o._)((0,i._)({},B),{online_status:null===(a=g.m.statusStore[U])||void 0===a?void 0:a.lastActiveLogValue})),en()}},[S,f]);(0,l.useEffect)(()=>{let e=eM.J.on(eM.v.DELETE_NOTICE,e=>{D===e&&(J(0),K(!0),setTimeout(()=>null==u?void 0:u(),500))});return()=>null==e?void 0:e()},[D,u]);let ea=(0,l.useCallback)((e,t)=>{if((0,eG.o)($.current,e,t,30)&&!z.current){var n;(0,er.Gb)("interact_cell_show",(0,o._)((0,i._)({},B),{online_status:null===(n=g.m.statusStore[U])||void 0===n?void 0:n.lastActiveLogValue})),z.current=!0}},[]);(0,l.useEffect)(()=>{f===O.DL.NOTICE_LIST&&ea(N,T)},[N,T]),(0,l.useEffect)(()=>{let e=eM.J.on(eM.v.ENTER_NOTICELIST_FROM_OTHER_PAGE,()=>{z.current=!1,setTimeout(()=>{ea(N,T)},100)});return()=>e()},[N,T]),(0,l.useEffect)(()=>{let e=$.current;e&&J(e.clientHeight||0)},[]);let el=(0,eF._m)(c);return j?(0,a.jsxs)("div",{className:r()(eT.default.cellContainer,_,{[eT.default.noticeDeleted]:Y,[eT.default.cellContainerEnableHoverStyle]:f===O.DL.NOTICE_LIST,[eT.default.highlight]:b}),style:{height:q},ref:$,onContextMenuCapture:e=>{e.preventDefault(),el()},children:[(0,a.jsx)(j,{awemeId:G,noticeId:D,noticeInfo:k,createTime:(0,ej.xS)(1e3*A),noticeType:S,needContentEllipsis:P,showAwemeCover:!Z,handleAwemeStatus:ei,handleClickNotice:eo,showScene:f,userNameClassName:eT.default.userName,contentInfoClassName:eT.default.contentInfo,hintClassName:eT.default.hint,closeRender:eW({handleClosePush:w}),showNoticeUnread:V,noticeLogInfo:B}),F?(0,a.jsx)("div",{className:eT.default.optCard,children:(0,a.jsx)(ek,{noticeId:D,noticeType:S,noticeLogInfo:B})}):null]}):null}))},696492:function(e,t,n){n.d(t,{$y:function(){return N},B2:function(){return o},DL:function(){return E},EV:function(){return s},I6:function(){return a},No:function(){return m},Ol:function(){return p},PY:function(){return C},RI:function(){return r},VG:function(){return g},W1:function(){return c},Wu:function(){return _},_q:function(){return I},bj:function(){return h},gc:function(){return i},il:function(){return f},pC:function(){return v},ql:function(){return O},ut:function(){return M},vq:function(){return u},vw:function(){return d},yK:function(){return l}});var i={ALL_WITH_RECOMMEND:"25",RECOMMEND:"26",ALL:"6",COMMENT:"7",DIGG:"8",AT:"9",FOLLOW:"10",COMMENT_DANMAKU:"-1"};let o={6:700,7:2,8:3,9:6,10:401,"-1":520};var a={COMMENT:31,31:"COMMENT",FOLLOW:33,33:"FOLLOW",DIGG:41,41:"DIGG",AT:45,45:"AT",FOLLOW_REQUEST:98,98:"FOLLOW_REQUEST",COMMENT_DANMAKU:513,513:"COMMENT_DANMAKU",GENERAL:-1,"-1":"GENERAL",RECOMMEND:9009,9009:"RECOMMEND",FOLLOW_RECOMMEND:9002,9002:"FOLLOW_RECOMMEND",FOLLOW_DIGG_RECOMMEND:514,514:"FOLLOW_DIGG_RECOMMEND",FOLLOWER_DIGG_RECOMMEND:9067,9067:"FOLLOWER_DIGG_RECOMMEND"},l={USE_COUNT:1,1:"USE_COUNT",USE_PUSH:2,2:"USE_PUSH"},s={RelationUnknown:-1,"-1":"RelationUnknown",NoRelationStatus:0,0:"NoRelationStatus",FollowingStatus:1,1:"FollowingStatus",FollowEachOtherStatus:2,2:"FollowEachOtherStatus",FollowRequestStatus:4,4:"FollowRequestStatus"},r={FOLLOW:33,33:"FOLLOW",FOLLOW_REQUEST:98,98:"FOLLOW_REQUEST"},c={NORMAL:0,0:"NORMAL",COMMENT:1,1:"COMMENT",REPLY_COMMENT:2,2:"REPLY_COMMENT",REPLY_UNDER_ITEM:11,11:"REPLY_UNDER_ITEM",REPLY_UNDER_COMMENT:12,12:"REPLY_UNDER_COMMENT"},u={NORMAL:0,0:"NORMAL",DIGG_ITEM:1,1:"DIGG_ITEM",DIGG_COMMENT:3,3:"DIGG_COMMENT",DIGG_DANMAKU:16,16:"DIGG_DANMAKU"},d={NORMAL:0,0:"NORMAL",CREATE_AT:1,1:"CREATE_AT",COMMENT_AT:2,2:"COMMENT_AT"},_={GENERAL:0,0:"GENERAL",VIDEO:4,4:"VIDEO",IMAGE_VIDEO:61,61:"IMAGE_VIDEO",VIDEO_TOGETHER:66,66:"VIDEO_TOGETHER",NOTE:68,68:"NOTE",SOCIAL_COMMON_PUBLISH:109,109:"SOCIAL_COMMON_PUBLISH"},v={REGULAR:0,0:"REGULAR",REJECT_FOLLOW_REQUEST:1,1:"REJECT_FOLLOW_REQUEST"},p={UNFOLLOW:0,0:"UNFOLLOW",FOLLOW:1,1:"FOLLOW"},f={DONE:0,0:"DONE",ACTIVE:1,1:"ACTIVE"},E={NOTICE_LIST:1,1:"NOTICE_LIST",NOTICE_PUSH:2,2:"NOTICE_PUSH"},m={IM:"im",NOTICE:"notice"},h={DELETED:1,1:"DELETED",PRIVATE:2,2:"PRIVATE",PUBLIC_VISIBLE:3,3:"PUBLIC_VISIBLE"},g={SHOW_MERGE:1,1:"SHOW_MERGE",NOT_SHOW_MERGE:2,2:"NOT_SHOW_MERGE"},I={NOTICE_PUSH:1,1:"NOTICE_PUSH",NOTICE_CELL:2,2:"NOTICE_CELL",DIGG_USER_LIST:3,3:"DIGG_USER_LIST"},O={DELETE:0,0:"DELETE",ALL_VISIBLE:1,1:"ALL_VISIBLE"},C={AWEME_INFO:1,1:"AWEME_INFO",COMMENT_INFO:2,2:"COMMENT_INFO"},M={PUBLIC_VISIBLE:0,0:"PUBLIC_VISIBLE",AUTHOR_VISIBLE:1,1:"AUTHOR_VISIBLE",FRIEND_VISIBLE:2,2:"FRIEND_VISIBLE"},N={FOLLOW:1,1:"FOLLOW",FOLLOWER:2,2:"FOLLOWER"}},534321:function(e,t,n){n.d(t,{M5:function(){return c},QZ:function(){return l},XV:function(){return o},Yk:function(){return a},uS:function(){return s},xi:function(){return r}});var i=n(696492);let o={[i.I6.AT]:"at",[i.I6.COMMENT]:{[i.W1.NORMAL]:"comment",[i.W1.COMMENT]:"comment",[i.W1.REPLY_COMMENT]:"quote",[i.W1.REPLY_UNDER_ITEM]:"comment",[i.W1.REPLY_UNDER_COMMENT]:"quote"},[i.I6.DIGG]:{[i.vq.NORMAL]:"like",[i.vq.DIGG_ITEM]:"like",[i.vq.DIGG_COMMENT]:"like_comment",[i.vq.DIGG_DANMAKU]:"like_danmaku"},[i.I6.FOLLOW]:"follow",[i.I6.FOLLOW_REQUEST]:"follow_request",[i.I6.COMMENT_DANMAKU]:"danmaku"},a={[i.vq.NORMAL]:{[i.VG.NOT_SHOW_MERGE]:"like_single",[i.VG.SHOW_MERGE]:"like_group"},[i.vq.DIGG_ITEM]:{[i.VG.NOT_SHOW_MERGE]:"like_single",[i.VG.SHOW_MERGE]:"like_group"},[i.vq.DIGG_COMMENT]:{[i.VG.NOT_SHOW_MERGE]:"like_comment_single",[i.VG.SHOW_MERGE]:"like_comment_group"},[i.vq.DIGG_DANMAKU]:{[i.VG.NOT_SHOW_MERGE]:"like_danmaku_single",[i.VG.SHOW_MERGE]:"like_danmaku_group"}},l={[i.DL.NOTICE_LIST]:"interact_cell",[i.DL.NOTICE_PUSH]:"interact_push"},s={[i.bj.DELETED]:"delete",[i.bj.PRIVATE]:"private",[i.bj.PUBLIC_VISIBLE]:""},r={[i.pC.REGULAR]:"delete",[i.pC.REJECT_FOLLOW_REQUEST]:"delete"},c={[i.Ol.FOLLOW]:"follow",[i.Ol.UNFOLLOW]:"follow_cancel",APPROVE_FOLLOW_REQUEST:"accept",REJECT_FOLLOW_REQUEST:"remove"}},33482:function(e,t,n){n.d(t,{JO:function(){return l},LS:function(){return a},MN:function(){return o},P2:function(){return r},TR:function(){return c},bk:function(){return s}});var i=n(696492);let o={[i.EV.NoRelationStatus]:{[i.EV.NoRelationStatus]:"关注",[i.EV.FollowingStatus]:"已关注",[i.EV.FollowRequestStatus]:"已请求"},[i.EV.FollowingStatus]:{[i.EV.NoRelationStatus]:"回关",[i.EV.FollowingStatus]:"互相关注",[i.EV.FollowEachOtherStatus]:"互相关注",[i.EV.FollowRequestStatus]:"已请求"},[i.EV.FollowEachOtherStatus]:{[i.EV.NoRelationStatus]:"回关",[i.EV.FollowingStatus]:"互相关注",[i.EV.FollowEachOtherStatus]:"互相关注",[i.EV.FollowRequestStatus]:"已请求"}},a={[i.RI.FOLLOW]:"关注了你",[i.RI.FOLLOW_REQUEST]:"发来关注请求"},l={[i.W1.NORMAL]:"评论了你的作品",[i.W1.COMMENT]:"评论了你的作品",[i.W1.REPLY_COMMENT]:"回复了你的评论",[i.W1.REPLY_UNDER_ITEM]:"评论了你的作品",[i.W1.REPLY_UNDER_COMMENT]:"在你的评论下回复"},s={[i.vq.NORMAL]:"赞了你的作品",[i.vq.DIGG_ITEM]:"赞了你的作品",[i.vq.DIGG_COMMENT]:"赞了你的评论",[i.vq.DIGG_DANMAKU]:"赞了你的弹幕"},r={[i.vw.NORMAL]:"在发布作品时提到了你",[i.vw.CREATE_AT]:"在发布作品时提到了你",[i.vw.COMMENT_AT]:"在评论中提到了你"},c={[i.bj.DELETED]:"此作品已删除",[i.bj.PRIVATE]:"视频消失了,请继续浏览其他作品"}},319053:function(e,t,n){n.d(t,{Et:function(){return _},FJ:function(){return p},J$:function(){return r},Se:function(){return a},YC:function(){return l},Ym:function(){return c},eY:function(){return d},hz:function(){return s},ke:function(){return o},p0:function(){return v},v4:function(){return u},zC:function(){return f}}),n(490629);var i=n(696492);let o={[i.I6.FOLLOW]:"follow",[i.I6.FOLLOW_REQUEST]:"follow",[i.I6.DIGG]:"digg",[i.I6.COMMENT]:"comment",[i.I6.AT]:"at",[i.I6.COMMENT_DANMAKU]:"interactive_notice",[i.I6.GENERAL]:"general_notice",[i.I6.RECOMMEND]:"interactive_notice",[i.I6.FOLLOW_RECOMMEND]:"interactive_notice",[i.I6.FOLLOW_DIGG_RECOMMEND]:"interactive_notice",[i.I6.FOLLOWER_DIGG_RECOMMEND]:"interactive_notice"},a={[i.I6.FOLLOW]:"from_user.sec_uid",[i.I6.FOLLOW_REQUEST]:"from_user.sec_uid",[i.I6.DIGG]:"from_user[0].sec_uid",[i.I6.COMMENT]:"comment.user.sec_uid",[i.I6.AT]:"user_info.sec_uid",[i.I6.COMMENT_DANMAKU]:"from_user[0].sec_uid",[i.I6.GENERAL]:"__DONT_HAVE_THIS__",[i.I6.RECOMMEND]:"from_user[0].sec_uid",[i.I6.FOLLOW_RECOMMEND]:"from_user[0].sec_uid",[i.I6.FOLLOW_DIGG_RECOMMEND]:"from_user[0].sec_uid",[i.I6.FOLLOWER_DIGG_RECOMMEND]:"from_user[0].sec_uid"};i.gc.ALL,i.gc.FOLLOW,i.gc.AT,i.gc.COMMENT,i.gc.DIGG,i.gc.COMMENT_DANMAKU;let l=[{label:"全部消息",value:i.gc.ALL_WITH_RECOMMEND},{label:"粉丝",value:i.gc.FOLLOW},{label:"@我的",value:i.gc.AT},{label:"评论",value:i.gc.COMMENT},{label:"赞",value:i.gc.DIGG},{label:"弹幕",value:i.gc.COMMENT_DANMAKU},{label:"推荐",value:i.gc.RECOMMEND}],s=[i.W1.NORMAL,i.W1.COMMENT,i.W1.REPLY_COMMENT,i.W1.REPLY_UNDER_ITEM,i.W1.REPLY_UNDER_COMMENT],r=[i.vq.NORMAL,i.vq.DIGG_ITEM,i.vq.DIGG_COMMENT],c=[...r,i.vq.DIGG_DANMAKU],u=[i.vw.NORMAL,i.vw.CREATE_AT,i.vw.COMMENT_AT],d=[i.Wu.GENERAL,i.Wu.VIDEO,i.Wu.IMAGE_VIDEO,i.Wu.VIDEO_TOGETHER,i.Wu.SOCIAL_COMMON_PUBLISH,i.Wu.NOTE],_=[i.I6.AT,i.I6.COMMENT,i.I6.RECOMMEND,i.I6.FOLLOW_RECOMMEND,i.I6.FOLLOW_DIGG_RECOMMEND,i.I6.FOLLOWER_DIGG_RECOMMEND],v=[i.I6.AT,i.I6.COMMENT,i.I6.COMMENT_DANMAKU,i.I6.DIGG,i.I6.RECOMMEND,i.I6.FOLLOW_RECOMMEND,i.I6.FOLLOW_DIGG_RECOMMEND,i.I6.FOLLOWER_DIGG_RECOMMEND],p={[i.I6.DIGG]:1},f={[i.I6.COMMENT]:i.PY.COMMENT_INFO,[i.I6.AT]:{[i.vw.NORMAL]:i.PY.AWEME_INFO,[i.vw.CREATE_AT]:i.PY.AWEME_INFO,[i.vw.COMMENT_AT]:i.PY.COMMENT_INFO}}},409554:function(e,t,n){var i=n(480333),o=n(629686),a=n(402748);n(706056),n(374954);var l=n(731343),s=n(522023),r=n.n(s),c=n(337793),u=n.n(c),d=n(953851),_=n(499059),v=n(414061),p=n(618759),f=n(103680),E=n(696492),m=n(319053);t.Z=new class e{get noticeUnreadCount(){let e=r()(Object.values(this.noticeUnreadCountMap||{}),e=>e),t=_.Le.getConfig(_.gI.UnReadCount)||{},n=t.notice||0;return _.Le.setConfig(_.gI.UnReadCount,(0,o._)({},t,{notice:e})),n!==e&&v.emit(v.EVENT.updateUnReadCount,!0),e}setAbTestData(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.abTestData=e}setShowNoticeTypeList(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.showNoticeTypeList=e}setNoticeGroupMap(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t={};null==e||e.forEach(e=>{let{type:n,group:i}=e||{};n&&(t[n]=i)}),Object.keys(E.B2).forEach(e=>{!t[e]&&(t[e]=E.B2[e])}),this.noticeGroupMap=t}setNoticeUnreadCountMap(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;if(!e||e===E.gc.ALL)return;let l=(null===(t=this.noticeUnreadCountMap)||void 0===t?void 0:t[e])||0,s=(0,a._)((0,o._)({},this.noticeUnreadCountMap),{[e]:l+n});this.noticeUnreadCountMap=s,this.syncToTray(),i&&(this.noticeLatestTime=i)}clearNoticeUnreadCountList(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:E.gc.ALL,t=this.noticeUnreadCountMap||{};[E.gc.ALL,E.gc.ALL_WITH_RECOMMEND].includes(e)?Object.keys(t).forEach(e=>{t[e]=0}):t=(0,a._)((0,o._)({},t),{[e]:0}),this.noticeUnreadCountMap=t,this.syncToTray()}setNoticeListObj(e){this.noticeListObj=e}clearNoticeList(){this.setNoticeListObj({noticeList:[],minTime:0,maxTime:0,hasMore:1,loading:!1})}setNoticeListInsertNoticeId(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.noticeListInsertNoticeId=e}clearUserList(){let e={userList:[],minTime:0,maxTime:0,hasMore:!0,loading:!1,userType:E.vq.NORMAL};this.setUserListObj(e)}setUserListObj(e){this.userListObj=e}setFollowRecommendUserListObj(e){this.followRecommendUserListObj=e}setShowUserList(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.showUserList=e}setShowFollowRecommendUserList(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.showFollowRecommendUserList=e}setCurNoticeFilter(e){this.curNoticeFilter=e}resetNoticeFilter(){this.curNoticeFilter=null===m.YC||void 0===m.YC?void 0:m.YC["0"]}setUserListFilter(e){this.userListFilter=e}pushNewNoticeInList(e){if(!!e&&!!this.isLogin&&!this.showNoticeDlg&&!!this.canShowNoticePush)this.noticePushList=this.noticePushList||[],this.noticePushList.push(e)}clearOldNoticeInPushList(){var e,t;let n=(null===(e=this.noticePushList)||void 0===e?void 0:e.length)||0;if(!(n<=1))null===(t=this.noticePushList)||void 0===t||t.splice(0,n-1)}clearNoticePushList(){this.noticePushList=[]}closeNoticePushPop(e){var t,n;if(!(null===(t=this.noticePushList)||void 0===t?void 0:t.length))return;let i=0;u()(this.noticePushList,(t,n)=>{(null==t?void 0:t.nid_str)===e&&(i=n)}),null===(n=this.noticePushList)||void 0===n||n.splice(i,1)}setShowNoticeDlg(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.showNoticeDlg=e}setUid(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.uid=e}setIsLogin(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.isLogin=e}setCanShowNoticePush(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.canShowNoticePush=e}setFollowStatusMap(e,t,n){var i;if(!t)return;let l=(null===(i=this.followStatusMap)||void 0===i?void 0:i[e])||{},s=(0,a._)((0,o._)({},l),{[t]:n}),r=(0,a._)((0,o._)({},this.followStatusMap),{[e]:s});this.followStatusMap=r}clearFollowStatusMap(){this.followStatusMap={}}syncToTray(){if(!!(0,p.DT)())f.invoke("isTopWebview").then(e=>{if(!!e.data)d.a.setNoticeUnreadData({unreadCount:this.noticeUnreadCount,latestTime:this.noticeLatestTime})})}constructor(){(0,i._)(this,"abTestData",{}),(0,i._)(this,"showNoticeTypeList",!1),(0,i._)(this,"noticeGroupMap",{}),(0,i._)(this,"noticeUnreadCountMap",{}),(0,i._)(this,"noticeLatestTime",0),(0,i._)(this,"noticeListObj",{noticeList:[],minTime:0,maxTime:0,hasMore:1,loading:!1}),(0,i._)(this,"noticeListInsertNoticeId",""),(0,i._)(this,"userListObj",{userList:[],minTime:0,maxTime:0,hasMore:!0,loading:!1,userType:E.vq.NORMAL}),(0,i._)(this,"followRecommendUserListObj",{userList:[],title:""}),(0,i._)(this,"showUserList",!1),(0,i._)(this,"showFollowRecommendUserList",!1),(0,i._)(this,"curNoticeFilter",null===m.YC||void 0===m.YC?void 0:m.YC["0"]),(0,i._)(this,"userListFilter",{itemId:"0",type:m.FJ[E.I6.DIGG]}),(0,i._)(this,"showNoticeDlg",!1),(0,i._)(this,"isLogin",!1),(0,i._)(this,"uid",""),(0,i._)(this,"noticePushList",[]),(0,i._)(this,"canShowNoticePush",!0),(0,i._)(this,"followStatusMap",{}),(0,l.makeAutoObservable)(this,{abTestData:l.observable,showNoticeTypeList:l.observable,noticeGroupMap:l.observable,noticeUnreadCountMap:l.observable,noticeListObj:l.observable,userListObj:l.observable,followRecommendUserListObj:l.observable,showUserList:l.observable,showFollowRecommendUserList:l.observable,curNoticeFilter:l.observable,userListFilter:l.observable,noticePushList:l.observable,showNoticeDlg:l.observable,isLogin:l.observable,uid:l.observable,canShowNoticePush:l.observable,followStatusMap:l.observable,noticeUnreadCount:l.computed,setAbTestData:l.action,setShowNoticeTypeList:l.action,setNoticeGroupMap:l.action,setNoticeUnreadCountMap:l.action,setNoticeListObj:l.action,setUserListObj:l.action,setShowUserList:l.action,setCurNoticeFilter:l.action,resetNoticeFilter:l.action,setUserListFilter:l.action,pushNewNoticeInList:l.action,clearOldNoticeInPushList:l.action,clearNoticePushList:l.action,closeNoticePushPop:l.action,setShowNoticeDlg:l.action,setIsLogin:l.action,setUid:l.action,clearNoticeList:l.action,clearUserList:l.action,setCanShowNoticePush:l.action,setFollowStatusMap:l.action,clearFollowStatusMap:l.action})}}},613553:function(e,t,n){n.d(t,{j:function(){return i},o:function(){return o}});let i=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20;if(!e)return!1;let{scrollTop:n,scrollHeight:i,offsetHeight:o}=e||{};return n>i-o-t},o=(e,t,n,i)=>{if(!(e&&t>0))return!1;let o=e.offsetTop+i;return o>=n&&o-n<=t}},337747:function(e,t,n){n.d(t,{J:function(){return i},v:function(){return o}});let i=new(n(973140)).Z,o={OPEN_CONFIRM_MODAL:"openConfirmModal",CLOSE_CONFIRM_MODAL:"closeConfirmModal",DELETE_NOTICE:"deleteNotice",SHOW_TOAST:"showToast",ENTER_NOTICELIST_FROM_OTHER_PAGE:"enterNoticeListFromOtherPage"}},603217:function(e,t,n){n.d(t,{e:function(){return a}}),n(938445),n(644892);var i=n(696492),o=n(534321);let a=function(e){var t,n,a,l,s,r,c;let u,d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i._q.NOTICE_PUSH,_={},{type:v}=e||{};switch(v){case i.I6.AT:let{at:p={}}=e,{user_info:f={},sub_type:E=i.vw.NORMAL}=p;u=f,_.group_id=(null==e?void 0:e.aweme_id)||(null==p?void 0:null===(t=p.aweme)||void 0===t?void 0:t.aweme_id),_.interact_type=o.XV[v];break;case i.I6.COMMENT:let{comment:m={}}=e,{comment:h={},comment_type:g=i.W1.NORMAL}=m,{user:I={}}=h;u=I,_.group_id=(null==e?void 0:e.aweme_id)||(null==m?void 0:null===(n=m.aweme)||void 0===n?void 0:n.aweme_id),_.interact_type=null===(a=o.XV[v])||void 0===a?void 0:a[g];break;case i.I6.DIGG:let{digg:O={}}=e,{from_user:C=[],digg_type:M=i.vq.NORMAL}=O;if(u=(null==C?void 0:C[0])||{},_.group_id=(null==e?void 0:e.aweme_id)||(null==O?void 0:null===(l=O.aweme)||void 0===l?void 0:l.aweme_id),_.interact_type=null===(s=o.XV[v])||void 0===s?void 0:s[M],i._q.NOTICE_CELL){let{merge_count:e}=O,t=e>1&&(null==C?void 0:C.length)>1?i.VG.SHOW_MERGE:i.VG.NOT_SHOW_MERGE;_.interact_type=null===(r=o.Yk[M])||void 0===r?void 0:r[t],_.like_cnt=e}break;case i.I6.FOLLOW:case i.I6.FOLLOW_REQUEST:let{follow:N={}}=e;u=(null==N?void 0:N.from_user)||{},_.interact_type=o.XV[v];break;case i.I6.COMMENT_DANMAKU:let{interactive_notice:T={}}=e;u=(null==T?void 0:null===(c=T.from_user)||void 0===c?void 0:c[0])||{},_.interact_type=o.XV[v]}let{uid:L="",follow_status:w=i.EV.RelationUnknown,follower_status:S=i.EV.RelationUnknown}=u||{};return _.personal_relation=String(w),_.from_user_id=L,_}},580251:function(e,t,n){n.d(t,{Gb:function(){return d}});var i=n("629686"),o=n("601034"),a=n("759894"),l=n("624508");let s=new l.h({interact_notif_show:{eventName:"interact_notif_show",params:{}},interact_notif_hover:{eventName:"interact_notif_hover",params:{}},interact_push_show:{eventName:"interact_push_show",params:{}},interact_push_click:{eventName:"interact_push_click",params:{}},interact_push_close:{eventName:"interact_push_close",params:{}},interact_cell_show:{eventName:"interact_cell_show",params:{}},interact_cell_click:{eventName:"interact_cell_click",params:{}},interact_setting_show:{eventName:"interact_setting_show",params:{}},interact_setting_click:{eventName:"interact_setting_click",params:{}},interact_like_show:{eventName:"interact_like_show",params:{}},enter_personal_detail:{eventName:"enter_personal_detail",params:{}},follow:{eventName:"follow",params:{}},follow_cancel:{eventName:"follow_cancel",params:{}},interact_login_notify:{eventName:"interact_login_notify",params:{enter_from:"",is_new:0}},interact_cell_click_all:{eventName:"interact_cell_click_all",params:{}},interact_notif_stay_time:{eventName:"interact_notif_stay_time",params:{}},pc_notice_entry_show:{eventName:"pc_notice_entry_show",params:{duration:"",ready_type:""}},pc_notice_stay_time:{eventName:"pc_notice_stay_time",params:{duration:"",close_type:"hover"}},pc_notice_show:{eventName:"pc_notice_show",params:{status:"",unread_count:0}},pc_notice_click:{eventName:"pc_notice_click",params:{notice_type:"",click_type:""}},pc_notice_message_show:{eventName:"pc_notice_message_show",params:{notice_type:"",notice_id:"",click_type:""}},pc_notice_message_click:{eventName:"pc_notice_message_click",params:{notice_type:"",notice_id:"",click_type:""}},pc_notice_window_show_duration:{eventName:"pc_notice_window_show_duration",params:{duration_fcp:"",duration_fmp:""}},notification_message_inner_message:{eventName:"notification_message_inner_message",params:{action_type:"",message_type:"",account_type:""}}});var r=n("542046");let c=()=>null===o.yW||void 0===o.yW?void 0:(0,o.yW)(),u=()=>null===a.vM||void 0===a.vM?void 0:(0,a.vM)(),d=(e,t)=>{try{s.sendLog(e,(0,i._)({page_host:r.pageHost,enter_from:c(),previous_page:u()},t||{}))}catch(e){}}},519877:function(e,t,n){n.d(t,{FF:function(){return M},aC:function(){return L},do:function(){return g}});var i=n(629686);n(374954),n(679308);var o=n(30995),a=n(333047),l=n(960496),s=n(911429),r=n(811277),c=n(337793),u=n.n(c);let{COMMON_SEARCH_PARAMS:d,DISABLE_SECRET_VIDEO_PARAMS:_,CHANNEL_PC_WEB:v}=o||{},{ERROR_CODE:p}=a||{},f="large",E="medium",m="thumb",h="still",g={SIZE_ORIGIN:"",SIZE_LARGE:f,SIZE_MEDIUM:E,SIZE_THUMB:m,SIZE_STILL:h},I=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";switch(!e&&(e=""),e){case"":return l.uZ?"tplv-3kqv52n45a-get:.image":"tplv-x-get:.image";case m:return l.uZ?"tplv-3kqv52n45a-get:thumb.image":"tplv-x-get:thumb.image";case E:return l.uZ?"tplv-3kqv52n45a-get:medium.image":"tplv-x-get:medium.image";case f:return l.uZ?"tplv-3kqv52n45a-get:large.image":"tplv-x-get:large.image";case h:return l.uZ?"tplv-3kqv52n45a-get:still.image":"tplv-x-get:still.image";default:return l.uZ?"tplv-3kqv52n45a-get:.image":"tplv-x-get:.image"}};async function O(e){let t=[];return e.forEach(e=>{t.push({url:e})}),await (0,s.v_)("/aweme/v1/web/privacy/batch_convert_image/",(0,i._)({},d),{},{data:{convert_params:t},headers:{"Content-Type":"application/json; charset=UTF-8"}})}let C=new r.n({max:20,timeWait:300,runOperation:e=>{let t=[];u()(e,e=>{let{param:n}=e;t.push(n)}),O(t).then(t=>{var n;let i=null==t?void 0:null===(n=t.data)||void 0===n?void 0:n.pack_results;(null==t?void 0:t.status_code)===0&&(null==i?void 0:i.length)?u()(e,(e,t)=>{var n,o;let a=i[t];a?null==e||null===(n=e.resolve)||void 0===n||n.call(e,a):null==e||null===(o=e.reject)||void 0===o||o.call(e,"error")}):(0,r.h)(e,"")}).catch(t=>{(0,r.h)(e,t)})}});async function M(e){return C.add(e)}async function N(e){let t=[];return e.forEach(e=>{let{uri:n,size:i,tpl:o}=e;t.push({uri:n,format:I(i),tpl:o||(""===o?"":"%s://%v/%v~%v")})}),await (0,s.v_)("/aweme/v1/web/privacy/batch_build_image/",(0,i._)({},d),{},{data:{convert_params:t},headers:{"Content-Type":"application/json; charset=UTF-8"}})}let T=new r.n({max:20,timeWait:300,runOperation:e=>{let t=[];u()(e,e=>{let{param:n}=e;t.push(n)}),N(t).then(t=>{var n;let i=null==t?void 0:null===(n=t.data)||void 0===n?void 0:n.pack_results;(null==t?void 0:t.status_code)===0&&(null==i?void 0:i.length)?u()(e,(e,t)=>{var n,o;let a=i[t];a?null==e||null===(n=e.resolve)||void 0===n||n.call(e,a):null==e||null===(o=e.reject)||void 0===o||o.call(e,"error")}):(0,r.h)(e,"")}).catch(t=>{(0,r.h)(e,t)})}});async function L(e,t){return T.add({uri:e,size:t})}},132825:function(e,t,n){n.r(t),n.d(t,{approveFollowRequest:function(){return o.g},deleteNotice:function(){return i.Zt},followUser:function(){return o.P},getAwemeDiggUserList:function(){return i.Ds},getCommentDiggUserList:function(){return i.Ex},getNoticeDetail:function(){return i.ul},getNoticeList:function(){return i.vo},getNoticeUnreadCount:function(){return i.sX}});var i=n(217969),o=n(795919)},795919:function(e,t,n){n.d(t,{P:function(){return s},g:function(){return r}});var i=n(629686);n(679308);var o=n(30995),a=n(911429);let{COMMON_SEARCH_PARAMS:l}=o||{};async function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return await (0,a.v_)("/aweme/v1/web/commit/follow/user/",(0,i._)({},l),{user_id:e,type:t})}async function r(e){return await (0,a.v_)("/aweme/v1/web/commit/follow/request/approve/",(0,i._)({},l),{from_user_id:e})}},413367:function(){},47069:function(){},687841:function(){},89855:function(){}}]); |