"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[6806],{23594:(e,t,i)=>{i.d(t,{X:()=>o});var n=i(40099);const o=(e,t)=>{const i=(0,n.useRef)(!1);(0,n.useEffect)((()=>()=>{i.current=!0}),[]),(0,n.useEffect)((()=>()=>{i.current&&e()}),t)}},10753:(e,t,i)=>{i.d(t,{B:()=>C});var n=i(2787),o=i(40099),a=i(11060),r=i(27600),l=i(58542),s=i(50299),d=i(70911),c=i(96754),u=i(58180),p=i(25616),h=i(57431),g=i(93608),m=i(28086),f=i(55988),_=i(23303),v=i(73174),b=i(17446),y=i(90570);const x="three_column",C=(0,o.memo)((function({isOnTabBar:e}){const t=(0,p.s)(),i=(0,a.W6)(),C=(0,s.Z)(),[{isFetching:w},k]=(0,m.I)(d.e,{resetStateBeforeDispatch:!0}),[I,S]=(0,b.B6)(),[T,Y]=(0,f._K)((e=>e.list.length>0)),D=(0,c.x6)((e=>{var t;return BigInt(null!==(t=e.total)&&void 0!==t?t:0)>0})),P=e?"small":"medium",F=e?"secondary":"primary",L=(0,o.useMemo)((()=>{var e,t;return null!==(t=null===(e=(0,h.x)().user)||void 0===e?void 0:e.uniqueId)&&void 0!==t?t:""}),[]),[j,E]=(0,o.useState)(!1),[U,M]=(0,o.useState)(!1),[B,A]=(0,o.useState)(""),[O,q]=(0,o.useState)(!1),R=(0,o.useCallback)((e=>{const t=(0,y.w)(L,B,e);i.push(t)}),[i,L,B]),z=(0,o.useCallback)((e=>{E(!1),M(!1),g.f.sendEvent("collection_create_success",{video_selection:"added_videos",play_mode:x}),R(e)}),[R]),[N,W]=(0,v.l)({onSuccess:z,enterMethod:"collection_creation",playModeForTea:x}),H=w||N,V=(0,o.useCallback)((({statusCode:e,collectionIdString:i})=>{if(0===e&&i)if(E(!1),M(!1),0===I.size){const e=T?"did_not_select":"no_candidate";g.f.sendEvent("collection_create_success",{video_selection:e,play_mode:x}),C({success:!0,message:t("collectionsProfilePage_collectionsPage_topSection_collectionToast")}),R(i)}else W(i,I);else C({success:!1,message:t("Sorry, something wrong with the server, please try again.")})}),[I,T,C,t,R,W]),$=(0,o.useCallback)((()=>{return e=this,t=void 0,n=function*(){yield k({collectionName:B.trim(),collectionStatus:O?3:1},V)},new((i=void 0)||(i=Promise))((function(o,a){function r(e){try{s(n.next(e))}catch(e){a(e)}}function l(e){try{s(n.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,l)}s((n=n.apply(e,t||[])).next())}));var e,t,i,n}),[B,O,k,V]),K=(0,o.useCallback)((()=>{E(!1),M(!0),g.f.sendEvent("name_collection",{make_public:O?1:0,enter_method:e?"top_right_button":"middle_button",play_mode:x})}),[e,O]),G=(0,o.useCallback)((()=>{M(!1),E(!0)}),[]),Z=(0,o.useCallback)((()=>{A(""),q(!1),S.clear(),Y.resetCandidates(),M(!1),E(!0),g.f.sendEvent("create_collection",{enter_method:e?"top_right_button":"middle_button",has_collections:D?1:0,play_mode:x})}),[S,Y,e,D]),J=(0,o.useCallback)((e=>{g.f.sendEvent("close_create_collection",{stage:e,play_mode:x})}),[]),Q=(0,o.useCallback)((e=>{E(e),e||U||J("naming stage")}),[U,J]),X=(0,o.useCallback)((e=>{M(e),e||j||J(T?"select videos stage":"no videos to select")}),[j,J,T]);return(0,n.FD)("div",{children:[(0,n.Y)(l.I05,{leadingIcon:(0,n.Y)(r.l,{}),label:t("create_new_collection_btn"),size:P,variant:F,onClick:Z,"data-e2e":"collection-action-create","aria-label":t("create_new_collection_btn")}),(0,n.Y)(u.k,{open:j,onOpenChange:Q,name:B,onNameChange:A,isPublic:O,onIsPublicChange:q,onNext:K}),(0,n.Y)(_.l,{isFromCreateCollection:!0,open:U,onOpenChange:X,onPrev:G,onCommit:$,loading:H})]})}))},90570:(e,t,i)=>{i.d(t,{w:()=>a});var n=i(11060),o=i(82715);function a(e,t,i){return(0,n.tW)(o.OZ.collection,{uniqueId:e,title:encodeURIComponent(t),id:i})}},6865:(e,t,i)=>{i.d(t,{W:()=>p});var n=i(2787),o=i(49057),a=i(96689),r=i(40935),l=i(45445),s=i(38597),d=i(40099),c=i(3885),u=i(20948);const p=(0,d.memo)((function({relation:e,uniqueId:t,nickname:i,style:p={},hideMutualIcon:h=!1,teaParams:g}){var m;const{user:f}=null!==(m=(0,o.W)((()=>["user"]),[]))&&void 0!==m?m:{},_=(0,d.useRef)(null),v=!!f&&t===f.uniqueId,b=(0,a.K)({query:{enter_method:"click_follow"}}),{handleFollow:y,text:x,isFollowing:C,relation:w}=(0,r.Tu)({uniqueId:t,teaParams:g,onNeedLogin:b}),[k,I]=(0,d.useState)(!1),S=3===w,T=4===w,Y=C&&!(null==f?void 0:f.hasIMPermission),D=T||S||Y||C&&(null==f?void 0:f.hasIMPermission);(0,d.useEffect)((()=>{T&&s.h.handleBlockShow(!T)}),[T]);const P=(0,d.useCallback)((()=>{I(!0)}),[]),F=(0,d.useCallback)((()=>{I(!1)}),[]),L=(0,d.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),T?P():y(e)}),[T,P,y]);return(0,n.FD)(n.FK,{children:[!v&&(0,n.Y)(u.s5,{ref:_,children:(0,n.FD)(u.lZ,{size:"small",buttonTheme:D?"default":"primary","data-e2e":"follow-button",onClick:L,style:p,"aria-label":`${x} ${i}`,isButtonDefaultStyle:null!=D&&D,children:[2!==e||h?null:(0,n.Y)(c.Yn,{}),x]})}),(0,n.Y)(l.j,{visible:k,uniqueId:t,onClose:F})]})}))},20948:(e,t,i)=>{i.d(t,{lZ:()=>c,rO:()=>l,s5:()=>s});var n=i(62186),o=i(72153),a=i(88091),r=i(97397);const l=(0,n.default)(a.I0,{target:"e1bph0nm0"})((({theme:{colors:e}})=>({padding:"4px 8px",borderRadius:"4px",borderColor:e.ConstTextInverse2,minWidth:"unset",height:"unset","> div":{minWidth:"38px",height:"15px",fontWeight:"bold",fontSize:"12px"}})),"label:StyledFollowButton;"),s=(0,n.default)("div",{target:"e1bph0nm1"})((({hide:e})=>[{display:e?"none":"1"}]),"label:DivFollowButtonWrapperV2;");function d(e,t){return e?{borderRadius:"8px",backgroundColor:t.BGInput,borderStyle:"none",":hover":{backgroundColor:t.BGInput2}}:{borderRadius:"8px"}}const c=(0,n.default)(r.y,{target:"e1bph0nm2"})((({isButtonDefaultStyle:e,theme:t})=>[(0,o.zy)({theme:t,fontFamily:"TikTokFont",fontWeight:"semiBold"}),{fontSize:"16px",flex:1,lineHeight:"36px"},d(e,t.colors)]),"label:StyledFollowButtonV2;")},7914:(e,t,i)=>{i.d(t,{$s:()=>m,Br:()=>c,Hn:()=>f,Iz:()=>u,Le:()=>s,Qs:()=>g,RY:()=>v,T8:()=>d,dJ:()=>h,ip:()=>p});var n=i(75431),o=i(62186),a=i(28367),r=i(72153),l=i(97397);const s=(0,o.default)("div",{target:"e1xjit530"})({width:"400px",padding:"32px",boxSizing:"border-box"},"label:DivContainer;"),d=(0,o.default)("p",{target:"e1xjit531"})((({theme:e})=>[(0,r.zy)({theme:e,fontWeight:"semiBold",fontFamily:"TikTokFont",color:"TextPrimary"}),{fontSize:"24px",lineHeight:"36px",textAlign:"center",marginBottom:"16px"}]),"label:PTitle;"),c=(0,o.default)("p",{target:"e1xjit532"})((({theme:{colors:e}})=>({color:e.TextSecondary,fontSize:"16px",lineHeight:"22px",textAlign:"center",marginBottom:"24px"})),"label:PInfo;"),u=(0,o.default)("ul",{target:"e1xjit533"})({paddingInlineStart:"12px"},"label:UlInfo;"),p=(0,o.default)("li",{target:"e1xjit534"})((({theme:{colors:e}})=>({color:e.TextSecondary,fontSize:"15px",lineHeight:"18px",marginBottom:"11px",":last-child":{marginBottom:"24px"}})),"label:LiInfo;"),h=(0,o.default)("div",{target:"e1xjit535"})({display:"flex",justifyContent:"space-between"},"label:DivBtnContainer;"),g=(0,o.default)(l.y,{target:"e1xjit536"})({minWidth:"164px",height:"48px",fontSize:"16px"},"label:StyledBtn;"),m=(0,o.default)(l.y,{target:"e1xjit537"})({minWidth:"336px",width:"336px",":not(:last-child)":{marginBottom:"12px"}},"label:StyledLargeBtn;"),f=(0,o.default)("div",{target:"e1xjit538"})((({theme:{colors:e}})=>({width:"336px",color:e.TextPrimary,fontSize:"16px",lineHeight:"24px",height:"48px",display:"flex",justifyContent:"center",alignItems:"center",cursor:"pointer"})),"label:DivTextBtn;"),_=(0,n.i7)({from:{transform:"rotateZ(0)"},to:{transform:"rotateZ(360deg)"}}),v=(0,o.default)(a.A,{target:"e1xjit539"})({animation:`${_} 1s infinite`},"label:StyledProgressCircle;")},97614:(e,t,i)=>{i.d(t,{Y:()=>p,d:()=>c});var n=i(2787),o=i(67518),a=i(41271),r=i(40099),l=i(25616),s=i(73211),d=i(7914);const c="48",u=[{info:"blue_v_change_username_review_modal_desc",replaceUserNameTag:"%s"},{info:"blue_v_change_name_review_modal_desc",replaceNameTag:"%s"},{info:"blue_v_webapp_change_name_review_modal_desc",replaceUserNameTag:"%1s",replaceNameTag:"%2s"}],p=(0,r.memo)((({onCancel:e,onConfirm:t,changeType:i,username:p,name:h})=>{const g=(0,l.s)(),{updatingProfile:m}=(0,a.P)(s.it),f=(0,r.useCallback)((()=>{e()}),[e]),_=(0,r.useCallback)((()=>{!m&&t(!1)}),[t,m]),v=u[i];let b=g(v.info);v.replaceUserNameTag&&(b=b.replace(v.replaceUserNameTag,p).replace("%d",c)),v.replaceNameTag&&(b=b.replace(v.replaceNameTag,h).replace("%d",c));const{colors:y}=(0,o.u)();return(0,n.FD)(d.Le,{children:[(0,n.Y)(d.T8,{children:g("blue_v_change_name_review_modal_title")}),(0,n.Y)(d.Br,{children:b}),(0,n.FD)(d.dJ,{children:[(0,n.Y)(d.Qs,{disabled:m,onClick:f,children:g("blue_v_change_name_review_cancel_btn")}),(0,n.Y)(d.Qs,{buttonTheme:"primary",onClick:_,children:m?(0,n.Y)(d.RY,{fill:y.ConstTextInverse,width:20,height:20}):g("blue_v_change_name_review_submit_btn")})]})]})}))},73211:(e,t,i)=>{i.d(t,{it:()=>S,jp:()=>y,CS:()=>x});var n=i(58632),o=i(64162),a=i(4126),r=i(93995),l=i(72916),s=i(20259),d=i(23999),c=i(8536),u=i(74690),p=i(80339),h=i(26324),g=i(52913),m=i(7672),f=i(4474),_=i(26325),v=i(55099);let b=class{constructor(e){this.fetch=e}updateUserProfile(e){return this.fetch.post("/api/update/profile/",{body:(0,f.stringify)(Object.assign(Object.assign({},e),{tt_csrf_token:this.fetch.csrfToken})),baseUrlType:2,headers:{[_.nk]:this.fetch.csrfToken}})}removeBlueV(e){return this.fetch.post("/tiktok/v1/username/save_async/",{body:(0,f.stringify)({username:e,process_type:1}),baseUrlType:2,headers:{[_.nk]:this.fetch.csrfToken}})}checkUniqueId(e){return this.fetch.get("/api/uniqueid/check/",{query:{unique_id:e},baseUrlType:2,headers:{[_.nk]:this.fetch.csrfToken}})}uploadImage(e){const t=new FormData;return t.append("file",e),t.append("source","0"),this.fetch.post("/api/upload/image/",{body:t,baseUrlType:2,headers:{[_.nk]:this.fetch.csrfToken},omitContentType:!0})}updateUniqueId(e){return this.fetch.post("/passport/web/login_name/update/",{body:(0,f.stringify)({login_name:e}),baseUrlType:2,headers:{[_.nk]:this.fetch.csrfToken}})}};b=(0,n.__decorate)([(0,m._)(),(0,n.__metadata)("design:paramtypes",[v.p])],b);const y=-1,x=0;var C,w,k,I;!function(e){e[e.InitialState=0]="InitialState",e[e.Valid=1]="Valid",e[e.Invalid=2]="Invalid"}(C||(C={})),function(e){e[e.IllegalLetter=1027]="IllegalLetter",e[e.SensitiveWord=1028]="SensitiveWord",e[e.Used=1024]="Used",e[e.OnceIn30day=1330]="OnceIn30day",e[e.ServerUpgrading=1331]="ServerUpgrading",e[e.ProfileUnderCertification=1332]="ProfileUnderCertification",e[e.ProfileUnderReview=1333]="ProfileUnderReview"}(w||(w={})),function(e){e[e.SUCCESS=0]="SUCCESS",e[e.ErrServiceInternal=4]="ErrServiceInternal",e[e.ErrInvalidParam=5]="ErrInvalidParam",e[e.ErrPermissionDenied=7]="ErrPermissionDenied",e[e.ErrHitSharkSlideVerifyCode=3058]="ErrHitSharkSlideVerifyCode",e[e.ErrHitSharkClickVerifyCode=3059]="ErrHitSharkClickVerifyCode",e[e.UserUpdateProfileFailed=2060]="UserUpdateProfileFailed",e[e.UserSignatureTooLong=2080]="UserSignatureTooLong",e[e.UserNicknameTooLong=2079]="UserNicknameTooLong",e[e.ErrNicknameUpdateIllegal=2550]="ErrNicknameUpdateIllegal",e[e.ErrCheckMtUpdateUser=2160]="ErrCheckMtUpdateUser",e[e.MtUpdateProfileIsBan=23]="MtUpdateProfileIsBan",e[e.AccountIsBanned=9]="AccountIsBanned",e[e.UpdateNickNameFailedDueToFrequencyControl=3002265]="UpdateNickNameFailedDueToFrequencyControl",e[e.ECommerceNickNameUpdateFailed=3002328]="ECommerceNickNameUpdateFailed"}(k||(k={})),function(e){e[e.NotAvailable=4]="NotAvailable",e[e.InvalidParameters=5]="InvalidParameters",e[e.SUCCESS=0]="SUCCESS",e[e.OtherError=6]="OtherError"}(I||(I={}));let S=class extends o.E{constructor(e,t){super(),this.service=e,this.accountService=t,this.defaultState={uploadImgCode:y,uniqueIdValid:0,checkLoading:!1,nickNameValid:0,saveCode:y,avatarInfo:{url:"",uri:""},newUniqueInfo:{uniqueId:""},checkUniqueIdCode:y,uploadingFile:!1,updatingProfile:!1}}setUploadImgCode(e,t){e.uploadImgCode=t}SetSaveCode(e,t){e.saveCode=t}SetCheckUniqueIdCode(e,t){e.checkUniqueIdCode=t}setUniqueIdValid(e,t){e.uniqueIdValid=t}setCheckLoading(e,t){e.checkLoading=t}setAvatarInfo(e,t){e.avatarInfo=t}setNewUniqueId(e,t){e.newUniqueInfo=t}setNickNameValid(e,t){e.nickNameValid=t}setUploadingFile(e,t){e.uploadingFile=t}setUpdatingProfile(e,t){e.updatingProfile=t}updateUserProfile(e){return e.pipe((0,l.n)((e=>{const{uniqueId:t,needUpdateUniqueId:i,needRemoveBlueV:n}=e,o=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o(0,d.of)({data:{error_code:1331}}))),(0,c.Z)((e=>{const{error_code:i}=e,a=[],r=void 0===i,l=1027===i||1028===i||1024===i;return a.push(this.getActions().setUniqueIdValid(l?2:1)),r&&n?this.service.removeBlueV(t).pipe((0,c.Z)((()=>this.handleUpdateProfile(o,t))),(0,s.W)((()=>this.handleUpdateProfile(o,t)))):r?this.handleUpdateProfile(o,t):(0,d.of)(this.getActions().SetSaveCode(i),this.getActions().setUpdatingProfile(!1),...a)})),(0,u.Z)(this.getActions().setUpdatingProfile(!0))):n?this.service.removeBlueV(t).pipe((0,c.Z)((()=>this.handleUpdateProfile(o,t))),(0,s.W)((()=>this.handleUpdateProfile(o,t)))):this.handleUpdateProfile(o,t)})))}handleUpdateProfile(e,t){return Object.values(e).some((e=>void 0!==e))?this.service.updateUserProfile(e).pipe((0,s.W)((()=>(0,d.of)({status_code:1331,user:{unique_id:"",secUid:""}}))),(0,c.Z)((({status_code:e,user:i})=>{const n=[];return 2550===e?n.push(this.getActions().setNickNameValid(2550===e?2:1)):(e===x&&n.push(this.getActions().setNewUniqueId({uniqueId:i.unique_id||t})),n.push(this.getActions().SetSaveCode(e))),(0,d.of)(...n)})),(0,u.Z)(this.getActions().setUpdatingProfile(!0)),(0,p.q)(this.getActions().setUpdatingProfile(!1))):(0,d.of)(this.getActions().setNewUniqueId({uniqueId:t}),this.getActions().SetSaveCode(x),this.getActions().setUpdatingProfile(!1))}checkUniqueId(e){return e.pipe((0,l.n)((e=>this.service.checkUniqueId(e).pipe((0,s.W)((()=>(0,d.of)({status_code:6,is_valid:!1}))),(0,c.Z)((({status_code:e,is_valid:t})=>{const i=[];return t&&4!==e?t&&0===e&&i.push(this.getActions().setUniqueIdValid(1)):i.push(this.getActions().setUniqueIdValid(2)),i.push(this.getActions().SetCheckUniqueIdCode(e)),(0,d.of)(...i)})),(0,u.Z)(this.getActions().setCheckLoading(!0)),(0,p.q)(this.getActions().setCheckLoading(!1))))))}uploadImage(e){return e.pipe((0,l.n)((e=>this.service.uploadImage(e).pipe((0,c.Z)((({status_code:e,data:t})=>{const i={url:"",uri:""};return t&&(i.uri=t.uri,i.url=t.url_list[0]),(0,d.of)(this.getActions().setAvatarInfo(i),this.getActions().setUploadImgCode(e))})),(0,u.Z)(this.getActions().setUploadingFile(!0)),(0,p.q)(this.getActions().setUploadingFile(!1))))))}};(0,n.__decorate)([(0,a.h5)(),(0,n.__metadata)("design:type",Function),(0,n.__metadata)("design:paramtypes",[Object,Number]),(0,n.__metadata)("design:returntype",void 0)],S.prototype,"setUploadImgCode",null),(0,n.__decorate)([(0,a.h5)(),(0,n.__metadata)("design:type",Function),(0,n.__metadata)("design:paramtypes",[Object,Number]),(0,n.__metadata)("design:returntype",void 0)],S.prototype,"SetSaveCode",null),(0,n.__decorate)([(0,a.h5)(),(0,n.__metadata)("design:type",Function),(0,n.__metadata)("design:paramtypes",[Object,Number]),(0,n.__metadata)("design:returntype",void 0)],S.prototype,"SetCheckUniqueIdCode",null),(0,n.__decorate)([(0,a.h5)(),(0,n.__metadata)("design:type",Function),(0,n.__metadata)("design:paramtypes",[Object,Number]),(0,n.__metadata)("design:returntype",void 0)],S.prototype,"setUniqueIdValid",null),(0,n.__decorate)([(0,a.h5)(),(0,n.__metadata)("design:type",Function),(0,n.__metadata)("design:paramtypes",[Object,Boolean]),(0,n.__metadata)("design:returntype",void 0)],S.prototype,"setCheckLoading",null),(0,n.__decorate)([(0,a.h5)(),(0,n.__metadata)("design:type",Function),(0,n.__metadata)("design:paramtypes",[Object,Object]),(0,n.__metadata)("design:returntype",void 0)],S.prototype,"setAvatarInfo",null),(0,n.__decorate)([(0,a.h5)(),(0,n.__metadata)("design:type",Function),(0,n.__metadata)("design:paramtypes",[Object,Object]),(0,n.__metadata)("design:returntype",void 0)],S.prototype,"setNewUniqueId",null),(0,n.__decorate)([(0,a.h5)(),(0,n.__metadata)("design:type",Function),(0,n.__metadata)("design:paramtypes",[Object,Number]),(0,n.__metadata)("design:returntype",void 0)],S.prototype,"setNickNameValid",null),(0,n.__decorate)([(0,a.h5)(),(0,n.__metadata)("design:type",Function),(0,n.__metadata)("design:paramtypes",[Object,Boolean]),(0,n.__metadata)("design:returntype",void 0)],S.prototype,"setUploadingFile",null),(0,n.__decorate)([(0,a.h5)(),(0,n.__metadata)("design:type",Function),(0,n.__metadata)("design:paramtypes",[Object,Boolean]),(0,n.__metadata)("design:returntype",void 0)],S.prototype,"setUpdatingProfile",null),(0,n.__decorate)([(0,a.Mj)(),(0,n.__metadata)("design:type",Function),(0,n.__metadata)("design:paramtypes",[h.c]),(0,n.__metadata)("design:returntype",void 0)],S.prototype,"updateUserProfile",null),(0,n.__decorate)([(0,a.Mj)(),(0,n.__metadata)("design:type",Function),(0,n.__metadata)("design:paramtypes",[h.c]),(0,n.__metadata)("design:returntype",void 0)],S.prototype,"checkUniqueId",null),(0,n.__decorate)([(0,a.Mj)(),(0,n.__metadata)("design:type",Function),(0,n.__metadata)("design:paramtypes",[h.c]),(0,n.__metadata)("design:returntype",void 0)],S.prototype,"uploadImage",null),S=(0,n.__decorate)([(0,r.n)("EditProfileModule"),(0,n.__metadata)("design:paramtypes",[b,g.r])],S)},70119:(e,t,i)=>{i.d(t,{oU:()=>C,yo:()=>w,lD:()=>I,s5:()=>k});var n=i(2787),o=i(53602),a=i(67518),r=i(25616),l=i(60484),s=i(88920),d=i(40099),c=i(24643),u=i(84987);const p={id:"bookmark-23c42bb3",use:"bookmark-23c42bb3-usage",viewBox:"0 0 72 72",content:''};var h=i(21765),g=i(99260),m=i(8877),f=i(92032),_=i(62186),v=i(58542);const b=(0,_.default)("div",{target:"e1brhnzw0"})((()=>({height:"92px",width:"92px",backgroundColor:v.Tj4.UISheetFlat2,color:v.Tj4.UIText1,borderRadius:"50%",display:"flex",justifyContent:"center",alignItems:"center"})),"label:DivErrorIconWrapper;"),y=(0,n.Y)(o.A,Object.assign({},h.LR)),x=(0,n.Y)((function(e){const t=(0,d.useContext)(u.X);return(0,d.useLayoutEffect)((()=>(t.add(p),()=>{t.remove("bookmark-23c42bb3")})),[]),(0,c.jsx)("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor"},e,{children:(0,c.jsx)("use",{xlinkHref:"#bookmark-23c42bb3"},void 0)}),void 0)}),Object.assign({},h.I9)),C=({Icon:e})=>(0,n.Y)(b,{children:(0,n.Y)(e,{size:"44px"})}),w=(0,d.memo)((function({detailInfo:{statusCode:e}}){const t=(0,m.M_)(),i=(0,g.tg)(),o=(0,d.useCallback)((()=>{t.setUniqueId(void 0),t.getUserInfo(Object.assign({},i))}),[t,i]);return(0,n.Y)(h.QW,{statusCode:e,iconElement:y,onRefresh:o})})),k=(0,d.memo)((function({listInfo:{statusCode:e},detailInfo:t,listKey:i}){var o;const a=(0,f.Ag)(),r=(0,d.useCallback)((()=>{var e,n;a.resetItemList(i),a.getItemList(i,{secUid:null!==(n=null===(e=t.user)||void 0===e?void 0:e.secUid)&&void 0!==n?n:""})}),[a,null===(o=t.user)||void 0===o?void 0:o.secUid,i]);return(0,n.Y)(h.QW,{statusCode:e,iconElement:y,onRefresh:r})})),I=(0,d.memo)((function({listKey:e,detailInfo:t}){const i=(0,r.s)(),{uniqueId:o,secUid:c}=(0,l.L$)(t.user),{colors:u}=(0,a.u)(),{isInProductHoldout:p}=(0,s.Vv)(),m=!p,f=(0,g.b3)({uniqueId:o,secUid:c}),_=(0,d.useMemo)((()=>"favorites"===e?(0,n.Y)("div",{style:{color:u.Primary2},children:x}):m?(0,n.Y)(C,{Icon:v.OBN}):y),[e,u]),b=(0,d.useMemo)((()=>"user-post"===e?f?{title:i("profile_personal_no_content_title"),desc:i("profile_personal_no_content_body")}:{title:i("profile_no_content_title"),desc:i("profile_no_content_des")}:"favorites"===e?{title:i("fc_view_empty_videos_title"),desc:i("fc_view_fav_empty_videos_desc")}:"user-liked"===e?f?{title:i("profile_public_nolikes_title"),desc:i("profile_self_public_nolikes")}:{title:i("profile_public_nolikes_title"),desc:i("profile_others_public_nolikes").replace("%s",o)}:{title:"",desc:""}),[f,e,i,o]);return(0,n.Y)(h.LL,{iconElement:_,emptyTip:b})}))},60193:(e,t,i)=>{i.d(t,{V:()=>h});var n=i(2787),o=i(53602),a=i(20986),r=i(25616),l=i(60484),s=i(88920),d=i(58542),c=i(21765),u=i(99260),p=i(70119);function h({user:e,listKey:t}){const i=(0,r.s)(),{relation:h,openFavorite:g,uniqueId:m="",privateAccount:f,secret:_,secUid:v}=(0,l.L$)(e),b=null!=f?f:_,y=(0,u.b3)({uniqueId:m,secUid:v}),{isInProductHoldout:x}=(0,s.Vv)(),C=!x;return 4===h?{title:i("profile_no_content_title"),desc:i("profile_others_blocked_post_body"),icon:C?(0,n.Y)(p.oU,{Icon:d.O6d}):(0,n.Y)(o.A,Object.assign({},c.LR))}:5===h?{title:i("profile_no_content_title"),desc:i("profile_others_block_post_body"),icon:C?(0,n.Y)(p.oU,{Icon:d.O6d}):(0,n.Y)(o.A,Object.assign({},c.LR))}:b&&!y&&1!==h&&2!==h?{title:i("This account is private"),desc:i("profile_others_private_body"),icon:C?(0,n.Y)(p.oU,{Icon:d.O6d}):(0,n.Y)(o.A,Object.assign({},c.LR))}:"user-liked"!==t||g||y?null:{title:i("profile_others_like_private_title"),desc:i("profile_others_like_private_body").replace("%s",m),icon:(0,n.Y)("div",{"data-e2e":"like-lock-icon",style:{display:"flex"},children:(0,n.Y)(a.A,Object.assign({},c.LR))}),isLikePrivate:!0}}},3885:(e,t,i)=>{i.d(t,{QD:()=>p,XT:()=>s,Yn:()=>c,iH:()=>d,rO:()=>h,tR:()=>g,xI:()=>u});var n=i(62186),o=i(17784),a=i(62738),r=i(72153),l=i(97397);const s=(0,n.default)("div",{target:"e18e4obn0"})((({theme:e})=>[(0,r.zy)({theme:e,fontFamily:"TikTokDisplayFont",fontWeight:"semiBold",typography:"P1"}),{position:"relative",width:"208px",height:"36px",padding:"0",margin:"0",marginTop:"16px"}]),"label:DivShareFollowContainer;"),d=(0,n.default)("div",{target:"e18e4obn1"})((({hide:e,status:t})=>{const i=t===o.ns||t===o._K,n=t===o.ns||t===o.ze;return[{display:"flex",position:"absolute",left:"0",top:"0",opacity:Number(i),zIndex:e?-1:"unset"},n?{transition:"opacity 0.5s"}:null]}),"label:DivMessageContainer;"),c=(0,n.default)(a.A,{target:"e18e4obn2"})((({theme:{direction:e}})=>(0,r.mp)({direction:e,marginEnd:8})),"label:StyledArrowLeftRight;"),u=(0,n.default)(l.y,{target:"e18e4obn3"})((({theme:{direction:e}})=>[{height:"36px",lineHeight:"22px"},(0,r.mp)({direction:e,marginEnd:8})]),"label:StyledMessageButton;"),p=(0,n.default)("div",{target:"e18e4obn4"})((({hide:e,status:t})=>{const i=t===o.ns||t===o._K,n=t===o.ns||t===o.ze;return[{position:"absolute",left:"0",top:"0",minWidth:"208px",height:"36px",lineHeight:"22px",zIndex:e?-1:"unset",opacity:Number(i)},n?{transition:"opacity 0.5s"}:null]}),"label:DivFollowButtonWrapper;"),h=(0,n.default)(l.y,{target:"e18e4obn5"})({minWidth:"208px",lineHeight:"22px"},"label:StyledFollowButton;"),g=(0,n.default)("div",{target:"e18e4obn6"})((({theme:{direction:e,colors:t}})=>[{display:"flex",justifyContent:"center",alignItems:"center",boxSizing:"border-box",width:"36px",height:"36px",border:"1px solid rgba(22, 24, 35, .12)",borderRadius:"4px",cursor:"pointer",position:"relative",backgroundColor:t.BGSecondary2,float:(0,r.t7)(e,"end"),":hover":{backgroundColor:t.BGView}}]),"label:DivFollowIconContainer;")},41213:(e,t,i)=>{i.r(t),i.d(t,{default:()=>Dr});var n=i(2787),o=i(72268),a=i.n(o),r=i(40099),l=i(11060),s=i(36488),d=i(43108),c=i(88920),u=i(19442),p=i(43626),h=i(32125),g=i(91210),m=i(83266),f=i(84908),_=i(93751),v=i(26930),b=i(57431),y=i(30349),x=i(75774),C=i(24834),w=i(21765),k=i(67518),I=i(46682),S=i(41271),T=i(25616),Y=i(60484),D=i(79983),P=i(49057),F=i(52333),L=i(39952),j=i(97397),E=i(33634),U=i(70510),M=i(48455),B=i(43583),A=i(97539),O=i(77985),q=i(57566),R=i(53962),z=i(95364);const N=(0,O.E)("create_video_playlist")((0,r.memo)((()=>{const[{list:e},t]=(0,I.S)(D.O,{selector:e=>{var t;return null!==(t=e.create_video_playlist)&&void 0!==t?t:{}},dependencies:[]}),{showBrowserMode:i}=(0,r.useContext)(p.g),o=(0,r.useCallback)((e=>()=>{i({index:e,id:"create_video_playlist",playProgress:0,reportTeaParams:{}})}),[i]),a=(0,r.useCallback)((({id:e,index:t})=>(0,n.Y)(R.$E,{target:"_blank",rel:"opener",needPostDragIcon:!0,id:e,index:t,onClickVideoItem:o(t)},e)),[o]),l=(0,r.useCallback)((i=>{if(!i.destination)return;const n=(0,q.Y)(e,i.source.index,i.destination.index);t.setItemListById({key:"create_video_playlist",list:n})}),[t,e]);return(0,n.Y)(z.er,{children:(0,n.Y)(q.q,{onDragEnd:l,renderItem:a,list:e})})})));var W=i(58632),H=i(64162),V=i(4126),$=i(93995),K=i(340),G=i(8536),Z=i(23999),J=i(72916),Q=i(20259),X=i(74690),ee=i(80339),te=i(26324),ie=i(64356),ne=i(11983),oe=i(7672),ae=i(4474),re=i(26325),le=i(55099);let se=class{constructor(e){this.fetch=e}createPlaylistWithItems(e){var t;return this.fetch.post("/api/playlist/create_with_items/",{baseUrlType:2,headers:{[re.nk]:this.fetch.csrfToken},body:ae.stringify({name:e.name,itemIds:null!==(t=e.itemIds)&&void 0!==t?t:""})})}};se=(0,W.__decorate)([(0,oe._)(),(0,W.__metadata)("design:paramtypes",[le.p])],se);var de=i(17995),ce=i(47479),ue=i(97446),pe=i(8877);let he=class extends H.E{constructor(e,t,i,n){super(),this.service=e,this.itemList=t,this.t=i,this.jotaiStore=n,this.defaultState={loading:!1,statusCode:0}}setLoading(e,t){e.loading=t}setStatusCode(e,t){e.statusCode=t}setPlaylist(e,t){(0,ce.MA)().setPlaylist(t)}setPlaylistDetail(e,t){(0,ue._J)().setPlaylistDetail(t)}setProfileState(e,t){(0,pe.$4)().setProfileState(t)}resetCreatePlaylistState(e){return e.pipe((0,G.Z)((()=>(0,Z.of)(this.getActions().dispose$(),this.getActions().setLoading(!1),this.getActions().setStatusCode(0)))))}createPlaylistWithItems(e){return e.pipe((0,J.n)((({name:e,cover:t,itemIds:i=[],creator:n})=>{const o=this.jotaiStore.get(ce.c8),a={name:e,cover:t,itemIds:null==i?void 0:i.join(",")};return this.service.createPlaylistWithItems(a).pipe((0,Q.W)((()=>(0,Z.of)({statusCode:-1,playlistId:"",statusMsg:""}))),(0,G.Z)((({statusCode:a,playlistId:r="",statusMsg:l=""})=>{const s=0===a?"1":"0",d=i.length;if(L.c.handlePostCreatingPlaylist({status:s,fail_reason:l,video_cnt:d,playlist_id:r}),L.c.handleAddPlaylistVideo({enter_method:"create_playlist",video_cnt:d,playlist_id:r,video_list:i.join(","),status:s}),206001===a)return ne.F.open({content:this.t("playlist_webapp_toast_error_cheatPlaylist"),duration:3,widthType:"half"}),(0,Z.of)(this.noop());if(0!==a&&206002!==a)return ne.F.open({content:this.t("playlist_webapp_toast_error_tryagain"),duration:3,widthType:"half"}),(0,Z.of)(this.noop());const{playList:c=[]}=o,u={id:r,name:e,mixId:r,mixName:e,cover:t,videoCount:d,creator:n};return ne.F.open({content:this.t("playlist_webapp_toast_created"),type:"success",duration:3,widthType:"half"}),(0,Z.of)(this.getActions().setStatusCode(a),this.getActions().setPlaylist(Object.assign(Object.assign({},o),{playList:[r,...c]})),this.getActions().setPlaylistDetail(u),this.itemList.getActions().setItemListById({key:r,list:i}),this.itemList.getActions().resetItemList({key:"create_video_playlist"}),this.itemList.getActions().resetItemList({key:"user-post-public",loading:!1}),this.getActions().setProfileState("initial"))})),(0,X.Z)(this.getActions().setLoading(!0)),(0,ee.q)(this.getActions().setLoading(!1)))})))}};(0,W.__decorate)([(0,V.uk)(),(0,W.__metadata)("design:type",te.c)],he.prototype,"dispose$",void 0),(0,W.__decorate)([(0,V.h5)(),(0,W.__metadata)("design:type",Function),(0,W.__metadata)("design:paramtypes",[Object,Boolean]),(0,W.__metadata)("design:returntype",void 0)],he.prototype,"setLoading",null),(0,W.__decorate)([(0,V.h5)(),(0,W.__metadata)("design:type",Function),(0,W.__metadata)("design:paramtypes",[Object,Number]),(0,W.__metadata)("design:returntype",void 0)],he.prototype,"setStatusCode",null),(0,W.__decorate)([(0,V.h5)(),(0,W.__metadata)("design:type",Function),(0,W.__metadata)("design:paramtypes",[Object,Object]),(0,W.__metadata)("design:returntype",void 0)],he.prototype,"setPlaylist",null),(0,W.__decorate)([(0,V.h5)(),(0,W.__metadata)("design:type",Function),(0,W.__metadata)("design:paramtypes",[Object,Object]),(0,W.__metadata)("design:returntype",void 0)],he.prototype,"setPlaylistDetail",null),(0,W.__decorate)([(0,V.h5)(),(0,W.__metadata)("design:type",Function),(0,W.__metadata)("design:paramtypes",[Object,String]),(0,W.__metadata)("design:returntype",void 0)],he.prototype,"setProfileState",null),(0,W.__decorate)([(0,V.Mj)(),(0,W.__metadata)("design:type",Function),(0,W.__metadata)("design:paramtypes",[te.c]),(0,W.__metadata)("design:returntype",void 0)],he.prototype,"resetCreatePlaylistState",null),(0,W.__decorate)([(0,V.Mj)(),(0,W.__metadata)("design:type",Function),(0,W.__metadata)("design:paramtypes",[te.c]),(0,W.__metadata)("design:returntype",void 0)],he.prototype,"createPlaylistWithItems",null),he=(0,W.__decorate)([(0,$.n)("CreatePlaylistModule"),(0,W.__param)(2,(0,K.y)(ie.hp)),(0,W.__param)(3,(0,K.y)(de.J7)),(0,W.__metadata)("design:paramtypes",[se,D.O,Function,Object])],he);const ge=(0,r.memo)((()=>{var e;const t=(0,T.s)(),{isDark:i}=(0,k.u)(),[{targetSecUid:o},a]=(0,pe.dF)((e=>{var t;return{targetSecUid:null!==(t=e.secUid)&&void 0!==t?t:""}}),h.bN),[{loading:l},s]=(0,I.S)(he,{selector:e=>({loading:e.loading}),dependencies:[]}),{loading:d=!1,hasMore:c=!0}=(0,Y.L$)((0,S.P)(D.O,{selector:e=>e["user-post-public"],dependencies:[]})),{user:u,abTestVersion:p,language:g}=(0,Y.L$)((0,P.W)((()=>["user","abTestVersion","language"]),[])),{uid:m}=(0,Y.L$)(u),[{list:_=[]},v]=(0,I.S)(D.O,{selector:e=>{var t;return null!==(t=e.create_video_playlist)&&void 0!==t?t:{}},dependencies:[]}),b=null!==(e=_[0])&&void 0!==e?e:"",{video:y,author:x=""}=(0,Y.L$)((0,S.P)(F.k,{selector:e=>e[b],dependencies:[b]})),C=(0,Y.L$)((0,f.nW)((e=>e.users[x]),h.bN)),{cover:w}=(0,Y.L$)(y),{playlistName:O,checkSuccess:q}=(0,S.P)(M.m,{selector:e=>({playlistName:e.playlistName,checkSuccess:e.isValid&&e.hasChecked}),dependencies:[]}),R=0===_.length,W=O.length>0&&O.length<=B.F&&q&&!R,[H,V]=(0,r.useState)(!1),$=(0,r.useCallback)((()=>{V(!0),L.c.handleClickAddPlaylistVideo({enter_method:"create_playlist"})}),[]),K=(0,r.useCallback)((()=>{a.setProfileState("initial")}),[a]);(0,r.useEffect)((()=>()=>v.resetItemList({key:"create_video_playlist"})),[]);const G=(0,r.useCallback)((()=>{!d&&c&&v.getUserVideoListByType({secUid:o,key:"user-post-public",userId:m,abTestVersion:p,language:g,user:u})}),[p,c,v,g,d,o,m,u]),Z=(0,r.useCallback)((()=>{l||s.createPlaylistWithItems({name:O,itemIds:_,cover:w,creator:C})}),[w,l,s,C,O,_]);return(0,n.FD)(U.mn,{children:[(0,n.FD)(U.cv,{children:[(0,n.FD)(z.T,{onClick:K,children:[(0,n.Y)(z.Ul,{}),t("playlist_webapp_creation_backBtn")]}),(0,n.FD)(z.wV,{children:[(0,n.Y)(z.AE,{children:t("playlist_webapp_creation_header_create")}),(0,n.Y)(z.JX,{children:t("playlist_webapp_creation_desc")}),(0,n.FD)(z.Y4,{children:[(0,n.Y)(z.TQ,{children:t("playlist_webapp_upload_dropdown_nameaplaylist")}),(0,n.FD)(z.iT,{children:[(0,n.Y)(z.EU,{isRed:O.length>B.F,children:`${O.length}`})," ",(0,n.Y)(z.EU,{children:` / ${B.F}`})]})]}),(0,n.Y)(B.y,{}),(0,n.FD)(z.Y4,{children:[(0,n.FD)(z.TQ,{children:[t("videos")," ",_.length>0?`(${_.length})`:""]}),!R&&(0,n.FD)(z.vx,{onClick:$,children:[(0,n.Y)(z.iP,{}),t("playlist_webapp_upload_addtoplaylist")]})]}),R&&(0,n.FD)(z.OA,{onClick:$,children:[i?(0,n.Y)(z.sJ,{}):(0,n.Y)(z.S_,{}),(0,n.Y)(z.RX,{children:t("playlist_webapp_creation_selectvid_desc")})]}),!R&&(0,n.Y)(N,{}),(0,n.FD)(U.dJ,{children:[(0,n.Y)(j.y,{style:E.i9,onClick:K,children:t("playlist_webapp_creation_btn_cancel")}),(0,n.Y)(j.y,{style:E.i9,disabled:!W,loading:l,buttonTheme:"primary",loadingFill:i?"#fff":void 0,onClick:Z,children:t("playlist_webapp_creation_btn_create")})]})]})]}),(0,n.Y)(A.$,{itemListKey:"user-post-public",drawerActive:H,setDrawerActive:V,onHitBottom:G,selectedVideoListKey:"create_video_playlist"})]})}));var me=i(70119),fe=i(40935),_e=i(44935),ve=i(89311),be=i(26192),ye=i(7859),xe=i(39771),Ce=i(72688),we=i(70294),ke=i(59504),Ie=i(25047),Se=i(73580),Te=i(87664),Ye=i(48615),De=i(81211),Pe=i(37434),Fe=i(86152),Le=i(58305),je=i(45297),Ee=i(52913),Ue=i(54129),Me=i(82548),Be=i(93608),Ae=i(97706),Oe=i(62186),qe=i(72153);const Re=(0,Oe.default)("div",{target:"e162h3pn0"})({padding:"16px",width:"264px",wordBreak:"break-word"},"label:DivTipWrapper;"),ze=(0,Oe.default)("h3",{target:"e162h3pn1"})((({theme:e})=>(0,qe.zy)({theme:e,typography:"P2",color:"ConstTextInverse",fontWeight:"semiBold"})),{marginBottom:"4px"},"label:H3TipTitle;"),Ne=(0,Oe.default)("p",{target:"e162h3pn2"})((({theme:e})=>(0,qe.zy)({theme:e,typography:"P3",color:"ConstTextInverse"})),"label:PTipDesc;"),We=(0,Oe.default)("div",{target:"e162h3pn3"})({display:"flex",justifyContent:"flex-end"},"label:DivButtonWrapper;"),He=(0,Oe.default)("button",{target:"e162h3pn4"})(qe.WA,(({theme:e})=>(0,qe.zy)({theme:e,typography:"P2",color:"ConstTextInverse",fontWeight:"semiBold"})),{cursor:"pointer"},"label:ButtonOk;"),Ve=(0,Oe.default)("button",{target:"e162h3pn5"})(qe.WA,(({theme:e})=>(0,qe.zy)({theme:e,typography:"P2",color:"ConstTextInverse",fontWeight:"semiBold"})),{cursor:"pointer"},"label:ButtonCancel;"),$e=(0,r.memo)((({showPopover:e,title:t,description:i,cancelText:o,okText:a,onOkClick:l,onCancel:s})=>{const{colors:d,direction:c}=(0,k.u)(),u=(0,r.useRef)(!1);(0,r.useEffect)((()=>{let t;return e&&(t=window.setTimeout((()=>{u.current=!0,s("auto_cancel")}),5e3)),()=>clearTimeout(t)}),[s,e]),(0,r.useEffect)((()=>()=>{e&&!u.current&&s("other")}),[e]);const p=(0,r.useCallback)((()=>{l()}),[l]),h=(0,r.useCallback)((()=>{u.current=!0,s("cancel")}),[s]),g="ltr"===c?"bottomLeft":"bottomRight";return(0,n.Y)(Ae.z,{active:e,backgroundColor:d.ConstSecondary2,placement:g,arrowMargin:"58px",margin:"0",children:(0,n.FD)(Re,{children:[(0,n.Y)(ze,{children:t}),(0,n.Y)(Ne,{children:i}),(0,n.FD)(We,{children:[(0,n.Y)(Ve,{onClick:h,children:o}),a&&(0,n.Y)(He,{onClick:p,children:a})]})]})})}));var Ke=i(73635),Ge=i(1257),Ze=i(47926),Je=i(26847),Qe=i(12527),Xe=i(73211),et=i(83162);const tt=(0,Oe.default)("div",{target:"e1gjao0r0"})((({theme:e})=>[(0,qe.zy)({theme:e,fontWeight:"semiBold",fontFamily:"TikTokFont"}),{height:"72px",padding:"12px 24px 0 24px",boxSizing:"border-box",fontSize:"24px",color:e.colors.TextPrimary,display:"flex",alignItems:"center",background:e.colors.BGPrimary}]),"label:DivHeaderContainer;"),it=(0,Oe.default)("div",{target:"e1gjao0r1"})({lineHeight:"36px"},"label:DivText;"),nt=(0,Oe.default)("div",{target:"e1gjao0r2"})((({theme:e})=>[{cursor:"pointer",width:"24px",height:"24px",display:"inline-block",transform:"rtl"===e.direction?"rotateY(180deg)":""},(0,qe.mp)({direction:e.direction,marginEnd:"8px"})]),"label:DivArrow;"),ot=(0,Oe.default)("div",{target:"e1gjao0r3"})({background:"#000000",paddingTop:"32px"},"label:DivContentContainer;"),at=(0,Oe.default)("div",{target:"e1gjao0r4"})({height:"441px",width:"700px",overflow:"hidden",position:"relative",display:"flex",alignItems:"center",justifyContent:"center"},"label:DivZoomArea;"),rt=(0,Oe.default)("div",{target:"e1gjao0r5"})({width:"360px",height:"360px",borderRadius:"360px",boxShadow:"0 0 0 250px rgba(0, 0, 0, 0.3)",position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",pointerEvents:"none"},"label:DivMask;"),lt=(0,Oe.default)("div",{target:"e1gjao0r6"})({fontSize:"14px",lineHeight:"22px",color:"#ffffff",height:"69px",display:"flex",alignItems:"center",justifyContent:"center"},"label:DivSlider;"),st=(0,Oe.default)("span",{target:"e1gjao0r7"})((({theme:e})=>(0,qe.mp)({direction:e.direction,marginEnd:"16px"})),"label:SpanLabel;"),dt=(0,Oe.default)("div",{target:"e1gjao0r8"})((({theme:{colors:e}})=>({height:"86px",display:"flex",padding:"0 24px",justifyContent:"flex-end",alignItems:"center",background:e.BGPrimary})),"label:DivFooterContainer;"),ct=(0,Oe.default)(j.y,{target:"e1gjao0r9"})((({theme:e})=>[{lineHeight:"24px",minWidth:"0",padding:"7px 16px"},(0,qe.mp)({direction:e.direction,marginStart:"16px"})]),"label:StyledBtn;"),ut=(0,Oe.default)("div",{target:"e1gjao0r10"})({width:"320px",height:"16px",position:"relative"},"label:DivSliderContainer;"),pt=(0,Oe.default)("div",{target:"e1gjao0r11"})({height:"6px",borderRadius:"3px",background:"#ffffff",position:"absolute",width:"100%",left:"0",top:"5px",cursor:"pointer"},"label:DivSliderBar;"),ht=(0,Oe.default)("div",{target:"e1gjao0r12"})({height:"6px",borderRadius:"3px",width:"100%",position:"absolute",left:"0",top:"5px",cursor:"pointer",overflow:"hidden"},"label:DivSliderProgress;"),gt=(0,Oe.default)("div",{target:"e1gjao0r13"})({width:"100%",background:"#FE2C55",height:"100%",transformOrigin:"left"},"label:DivSliderColor;"),mt=(0,Oe.default)("div",{target:"e1gjao0r14"})((({theme:e})=>[{width:"16px",height:"16px",borderRadius:"16px",background:"#FE2C55",position:"absolute",top:0,left:0,cursor:"pointer"},(0,qe.mp)({direction:e.direction,marginStart:"-8px"})]),"label:DivSliderDot;"),ft=(0,Oe.default)("img",{target:"e1gjao0r15"})({maxWidth:"unset"},"label:Img;"),_t=(0,r.memo)((({onPercentChange:e,transformScalePercent:t})=>{const i=(0,r.useRef)(null),o=(0,r.useRef)(null),a=(0,r.useRef)(null),l=(0,r.useRef)(null),{direction:s}=(0,k.u)(),d=(0,r.useCallback)((t=>{e(t)}),[e]),{percent:c,bindDrag:u,seek:p,update:h}=(0,et.M)({direction:s,progressRef:l,circleRef:a,barRef:o,initialPercent:0,draggingPercentCb:d});(0,r.useEffect)((()=>{h(t)}),[h,t]);const g="ltr"===s?{left:`calc(${100*c}%)`}:{right:`calc(${100*c}%)`},m="ltr"===s?{transform:`scaleX(${c})`}:{transform:`scaleX(${c})`,transformOrigin:"right"};return(0,n.FD)(ut,{ref:i,children:[(0,n.Y)(pt,{onMouseDown:u,onClick:p,ref:l}),(0,n.Y)(ht,{ref:o,onClick:p,onMouseDown:u,children:(0,n.Y)(gt,{style:m})}),(0,n.Y)(mt,{style:g,onMouseDown:u,ref:a})]})}));const vt=360,bt=(0,r.memo)((({onClose:e,onSaveAvatar:t,imageInfo:i,style:o={}})=>{const{url:a,width:l,height:s,initScale:d}=i,[c,u]=(0,r.useState)(0),[{uploadImgCode:p,uploadingFile:h},g]=(0,I.S)(Xe.it),m=(0,T.s)(),f=(0,r.useRef)(null),_=(0,r.useCallback)((()=>{e()}),[e]);(0,r.useEffect)((()=>{p===Xe.CS?t():p!==Xe.jp&&ne.F.open({content:m("editprofile_editpage_error_photofail_others"),duration:2})}),[p,t,m]);const v=(0,r.useCallback)((()=>{return e=void 0,t=void 0,n=function*(){if(f.current){const{positionX:e,positionY:t,scale:i}=f.current.state;try{const n=yield function(e,t,i,n){return new Promise(((o,a)=>{const r=new Image;r.src=e,r.onload=()=>{const e=document.createElement("canvas");e.width=200,e.height=200;const a=e.getContext("2d"),l=0-t/n,s=0-i/n,d=360/n,c=360/n;null==a||a.drawImage(r,l,s,d,c,0,0,200,200),e.toBlob((e=>{e&&o(e)}))},r.onerror=()=>{a()}}))}(a,e,t,i*d);g.uploadImage(n)}catch(e){ne.F.open({content:m("editprofile_editpage_error_photofail_others"),duration:2})}}},new((i=void 0)||(i=Promise))((function(o,a){function r(e){try{s(n.next(e))}catch(e){a(e)}}function l(e){try{s(n.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,l)}s((n=n.apply(e,t||[])).next())}));var e,t,i,n}),[d,a,g,m]),b=(0,r.useMemo)((()=>({direction:"ltr",height:"360px",width:"360px",overflow:"unset"})),[]),y=(0,r.useMemo)((()=>({cursor:"move"})),[]),x=(0,r.useCallback)((e=>{const{scale:t}=e.state;u(Math.max(t-1,0)/7)}),[]),C=(0,r.useCallback)((e=>{if(f.current){const{setTransform:t,state:{positionX:i,positionY:n,scale:o}}=f.current,a=7*e+1;let r=Math.min(i-l*(a-o)/2,0),d=Math.min(n-s*(a-o)/2,0);d+s*a{const d=(0,T.s)(),c=(0,r.useCallback)((()=>{e()}),[e]),u=(0,r.useCallback)((()=>{l?s((e=>Object.assign(Object.assign({},e),{confirmStep:"blueVConfirm"}))):t(!1)}),[l,s,t]),p=xt[o];let h=d(p.info);return p.replaceTag&&(h=h.replace(p.replaceTag,a)),(0,n.FD)(yt.Le,{"data-e2e":"set-username-popup",children:[(0,n.Y)(yt.T8,{"data-e2e":"set-username-popup-title",children:d(p.title)}),(0,n.Y)(yt.Br,{"data-e2e":"set-username-popup-desc",children:h}),(0,n.FD)(yt.dJ,{children:[(0,n.Y)(yt.Qs,{"data-e2e":"set-username-popup-cancel",onClick:c,children:d("editprofile_cancel")}),(0,n.Y)(yt.Qs,{"data-e2e":"set-username-popup-confirm",disabled:!i,buttonTheme:"primary",onClick:u,children:d("nickname_username_change_pop_up_cta_2")})]})]})})),wt=[{title:"blue_v_change_username_modal_title",desc1:"blue_v_change_username_modal_desc",desc2:"blue_v_change_username_modal_desc_2"},{title:"blue_v_change_name_modal_title",desc1:"blue_v_change_name_modal_desc",desc2:"blue_v_change_name_modal_desc_2"},{title:"blue_v_change_username_name_modal_title",desc1:"blue_v_webapp_change_name_modal_desc",desc2:"blue_v_webapp_change_name_modal_desc_2"}],kt=(0,r.memo)((({onCancel:e,nextStep:t,changeType:i})=>{const o=(0,T.s)(),a=(0,r.useCallback)((()=>{e()}),[e]),l=(0,r.useCallback)((()=>{t((e=>Object.assign(Object.assign({},e),{confirmStep:"loseVerifyConfirm"})))}),[t]),s=(0,r.useCallback)((()=>{t((e=>Object.assign(Object.assign({},e),{confirmStep:"submitConfirm"})))}),[t]),d=wt[i];return(0,n.FD)(yt.Le,{children:[(0,n.Y)(yt.T8,{children:o(d.title)}),(0,n.FD)(yt.Iz,{children:[(0,n.Y)(yt.ip,{children:o(d.desc1)}),(0,n.Y)(yt.ip,{children:o(d.desc2)})]}),(0,n.FD)("div",{children:[(0,n.Y)(yt.$s,{buttonTheme:"primary",onClick:s,children:o("blue_v_change_name_modal_submit_request_btn")}),(0,n.Y)(yt.$s,{onClick:l,children:o("blue_v_change_name_modal_change_btn")}),(0,n.Y)(yt.Hn,{buttonTheme:"default",onClick:a,children:o("blue_v_change_name_review_cancel_btn")})]})]})})),It=[{info:"blue_v_change_username_lose_badge_modal_title",replaceUserNameTag:"%s"},{info:"blue_v_change_name_lose_badge_modal_title",replaceNameTag:"%s"},{info:"blue_v_webapp_change_name_lose_badge_modal_title",replaceUserNameTag:"%1s",replaceNameTag:"%2s"}],St=(0,r.memo)((({onCancel:e,onConfirm:t,changeType:i,username:o,name:a})=>{const{updatingProfile:l}=(0,S.P)(Xe.it),s=(0,T.s)(),d=(0,r.useCallback)((()=>{e()}),[e]),c=(0,r.useCallback)((()=>{!l&&t(!0)}),[t,l]),u=It[i];let p=s(u.info);u.replaceUserNameTag&&(p=p.replace(u.replaceUserNameTag,o)),u.replaceNameTag&&(p=p.replace(u.replaceNameTag,a));const{colors:h}=(0,k.u)();return(0,n.FD)(yt.Le,{children:[(0,n.Y)(yt.T8,{children:p}),(0,n.Y)(yt.Br,{children:s("blue_v_change_name_lose_badge_modal_desc")}),(0,n.FD)(yt.dJ,{children:[(0,n.Y)(yt.Qs,{disabled:l,onClick:d,children:s("blue_v_change_name_review_cancel_btn")}),(0,n.Y)(yt.Qs,{buttonTheme:"primary",onClick:c,children:l?(0,n.Y)(yt.RY,{fill:h.ConstTextInverse,width:20,height:20}):s("blue_v_change_name_lose_badge_confirm_btn")})]})]})}));var Tt=i(97614),Yt=i(75431),Dt=i(54502),Pt=i(28367),Ft=i(4538);const Lt=(0,Oe.default)("div",{target:"e13yu7jj0"})((({showVerified:e})=>({height:e?"754px":"700px"})),"label:DivModalContainer;"),jt=(0,Oe.default)("div",{target:"e13yu7jj1"})((({theme:e})=>[{padding:"24px 24px 12px 24px",lineHeight:"36px",borderBottom:`0.5px solid ${e.colors.LinePrimary2}`,display:"flex",justifyContent:"space-between",alignItems:"center"}]),"label:DivHeaderContainer;"),Et=(0,Oe.default)("h1",{target:"e13yu7jj2"})((({theme:e})=>[(0,qe.zy)({theme:e,fontWeight:"semiBold",fontFamily:"TikTokFont"}),{fontSize:"24px",color:e.colors.TextPrimary}]),"label:H1Header;"),Ut=(0,Oe.default)("div",{target:"e13yu7jj3"})((({theme:e})=>[{width:"24px",height:"24px",cursor:"pointer","&:focus-visible":{outline:`2px solid ${e.colors.Negative}`}},(0,qe.mp)({direction:e.direction,marginEnd:"12px"})]),"label:DivCloseContainer;"),Mt=(0,Oe.default)("div",{target:"e13yu7jj4"})((({theme:{colors:e}})=>({height:"86px",display:"flex",padding:"0 24px",justifyContent:"flex-end",borderTop:`0.5px solid ${e.LinePrimary2}`,alignItems:"center",position:"absolute",width:"100%",bottom:0})),"label:DivFooterContainer;"),Bt=(0,Oe.default)(j.y,{target:"e13yu7jj5"})((({theme:e})=>[{lineHeight:"24px",padding:"7px 16px",minWidth:"96px",height:"36px"},(0,qe.mp)({direction:e.direction,marginStart:"16px"})]),"label:StyledBtn;"),At=(0,Oe.default)("div",{target:"e13yu7jj6"})({width:"700px",padding:"8px 24px 0 24px"},"label:DivContentContainer;"),Ot=(0,Oe.default)("div",{target:"e13yu7jj7"})({padding:"16px 0",display:"flex"},"label:DivItemContainer;"),qt=(0,Oe.default)(Ot,{target:"e13yu7jj10"})((({theme:{colors:e}})=>({borderBottom:`0.5px solid ${e.TUXLineSecondary3}`})),"label:StyledItemContainerWithLine;"),Rt=(0,Oe.default)("div",{target:"e13yu7jj11"})((({theme:e})=>[(0,qe.zy)({theme:e,fontWeight:"semiBold",fontFamily:"TikTokFont"}),{lineHeight:"24px",fontSize:"16px",width:"120px",marginRight:"24px"}]),"label:DivLabel;"),zt=(0,Oe.default)("div",{target:"e13yu7jj12"})({position:"relative",height:"96px"},"label:DivAvatarContent;"),Nt=(0,Oe.default)("div",{target:"e13yu7jj13"})({position:"relative"},"label:DivEditAreaContainer;"),Wt=(0,Oe.default)("input",{target:"e13yu7jj14"})((({theme:{colors:e}})=>({width:"360px",height:"38px",borderRadius:"4px",background:e.BGInput,caretColor:"#fe2c55",fontSize:"16px",color:e.TextPrimary,lineHeight:"24px",outline:"none",border:"none",padding:"7px 12px",boxSizing:"border-box","&:focus":{background:e.BGInput2,outline:"1.5px solid rgba(22, 24, 35, 0.2)"}})),"label:InputText;"),Ht=(0,Oe.default)("div",{target:"e13yu7jj15"})((({theme:{colors:e}})=>({fontSize:"16px",lineHeight:"24px",color:e.TextPrimary,marginBottom:"16px"})),"label:DivReadOnlyText;"),Vt=Wt.withComponent("textarea"),$t=(0,Oe.default)(Vt,{target:"e13yu7jj16"})({height:"100px",padding:"12px",resize:"none"},"label:StyledInputTextArea;"),Kt=(0,Oe.default)("p",{target:"e13yu7jj17"})((({theme:{colors:e}})=>({fontSize:"12px",color:e.TextSecondary,lineHeight:"18px",marginTop:"16px",maxWidth:"460px",overflow:"hidden"})),"label:PProfileSite;"),Gt=(0,Oe.default)(Kt,{target:"e13yu7jj18"})({marginTop:"8px",width:"360px"},"label:StyledTip;"),Zt=(0,Oe.default)("div",{target:"e13yu7jj19"})((({theme:{colors:e}})=>({color:e.TextSecondary,fontSize:"12px",lineHeight:"18px"})),"label:DivTextCount;"),Jt=(0,Oe.default)("div",{target:"e13yu7jj20"})((({theme:e})=>[{width:"32px",height:"32px",borderRadius:"16px",background:e.colors.BGTertiary,border:"1px solid #D0D0D3",boxSizing:"border-box",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",position:"absolute",bottom:"0","&:focus-visible":{outline:`2px solid ${e.colors.Negative}`}},(0,qe.mp)({direction:e.direction,marginStart:"192px"})]),"label:DivAvatarEditIcon;"),Qt=(0,Oe.default)(Ft.i,{target:"e13yu7jj21"})((({theme:e})=>(0,qe.mp)({direction:e.direction,marginStart:"128px"})),"label:StyledAvatar;"),Xt=(0,Oe.default)("input",{target:"e13yu7jj22"})({width:"1px",height:"1px",position:"absolute",top:0,left:0,opacity:0},"label:InputUpload;"),ei=(0,Oe.default)("p",{target:"e13yu7jj23"})({height:"18px",lineHeight:"18px",color:"#FF4C3A",fontSize:"12px",marginTop:"6px"},"label:PInputError;"),ti=(0,Oe.default)(Dt.A,{target:"e13yu7jj24"})((({theme:e})=>[(0,qe.mp)({direction:e.direction,start:"328px"}),{position:"absolute",top:"11px"}]),"label:StyledTickBold;"),ii=(0,Yt.i7)({from:{transform:"rotateZ(0)"},to:{transform:"rotateZ(360deg)"}}),ni=(0,Oe.default)(Pt.A,{target:"e13yu7jj25"})((({theme:e})=>[(0,qe.mp)({direction:e.direction,end:"12px"}),{position:"absolute",top:"7px",animation:`${ii} 1s infinite`}]),"label:StyledProgressCircle;"),oi=e=>{const{onBioChange:t,bio:i,bioValid:o,onBioValidChange:a}=e,l=(0,T.s)(),s=(0,r.useCallback)((e=>{const{value:i}=e.target;i.split("\n").length<=5?(a("bioValid",i.length<=80),t("bio",i)):ne.F.open({content:l("editprofile_editpage_error_row"),duration:2})}),[t,a,l]);return(0,n.FD)(Nt,{children:[(0,n.Y)($t,{"data-e2e":"edit-profile-bio-input",style:{outline:o?"":"1.5px solid #FF4C3A"},placeholder:l("editprofile_editpage_bio"),onChange:s,value:i}),(0,n.FD)(Zt,{children:[(0,n.FD)("span",{style:{color:o?"":"#FF4C3A"},children:[i.length,"/"]}),80]})]})};var ai=i(50490);const ri=["jpg","jpeg","png","tiff","heic","webp"],li=ri.map((e=>`.${e}`)).join(","),si=({fileUploadRef:e,processCallback:t,errorCallback:i})=>{const n=(0,r.useRef)({url:"",width:0,height:0,initScale:1}),o=(0,r.useCallback)((()=>{e.current.value="",e.current.click()}),[e]),a=(0,r.useCallback)((e=>{return o=void 0,a=void 0,l=function*(){const o=e.target.files[0];if(o.size>10485760)return void i(0);try{const e=yield(e=>new Promise(((t,i)=>{const n=new FileReader;n.onload=function(e){var n,o,a;const r=null===(n=e.target)||void 0===n?void 0:n.result;if(r&&"string"!=typeof r){const e=null!==(o=(0,ai.filetypeinfo)(new Uint8Array(r)))&&void 0!==o?o:[{typename:""}];t(null===(a=e[0])||void 0===a?void 0:a.typename)}else i()},n.onerror=()=>{i()},n.readAsArrayBuffer(e)})))(o);if(!ri.includes(e))return void i(1)}catch(e){return void i(1)}const a=URL.createObjectURL(o),{width:r,height:l}=yield function(e){return new Promise(((t,i)=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.width,height:n.height})},n.onerror=()=>{i()}}))}(a);let s=vt,d=vt;r>l?s=d*r/l:d=s*l/r,n.current={url:a,width:s,height:d,initScale:s/r},t()},new((r=void 0)||(r=Promise))((function(e,t){function i(e){try{s(l.next(e))}catch(e){t(e)}}function n(e){try{s(l.throw(e))}catch(e){t(e)}}function s(t){var o;t.done?e(t.value):(o=t.value,o instanceof r?o:new r((function(e){e(o)}))).then(i,n)}s((l=l.apply(o,a||[])).next())}));var o,a,r,l}),[t,i]);return{handleFileChange:a,imageInfoRef:n,handleAvatarEditIconClick:o}},di=e=>{const{onNameChange:t,onNameErrorChange:i,name:o,nameErrMsg:a,nameChangeInfo:l,nickNameControlDay:s}=e,d=(0,T.s)(),{nickNameValid:c}=(0,S.P)(Xe.it);(0,r.useEffect)((()=>{1===c?i("nameErrMsg",""):2===c&&i("nameErrMsg",d("editprofile_editpage_error_namenotavail"))}),[c,i,d]);const u=(0,r.useCallback)((e=>{const{value:n}=e.target;n.length>30?i("nameErrMsg",d("editprofile_editpage_error_max")):i("nameErrMsg",""),t("name",n)}),[t,i,d]);return(0,n.Y)(Nt,{"data-e2e":"edit-profile-name-input",children:l.changeable?(0,n.FD)(n.FK,{children:[(0,n.Y)(Wt,{"aria-invalid":Boolean(a),"aria-label":a,style:{outline:a?"1.5px solid #FF4C3A":""},placeholder:d("editprofile_editpage_name"),value:o,onChange:u}),a?(0,n.Y)(ei,{children:a}):(0,n.Y)(Gt,{children:d("nickname_change_1st_time_description").replace("%d",s)})]}):(0,n.FD)(n.FK,{children:[(0,n.Y)(Ht,{children:o}),(0,n.Y)(Gt,{children:d("nickname_change_description").replace("%d",s).replace("%s",l.nextTimeStr)})]})})};var ci=i(90159);const ui=/^[0-9a-z._A-Z]{2,24}$/,pi=e=>{const{username:t,onUsernameChange:i,onUsernameErrorChange:o,uniqueIdChangeInfo:a,usernameErrMsg:l}=e,[{checkLoading:s,uniqueIdValid:d,checkUniqueIdCode:c},u]=(0,I.S)(Xe.it),p=(0,T.s)(),{colors:h}=(0,k.u)(),g=(0,ci.d7)((e=>{u.checkUniqueId(e.toLowerCase())}),[u],1e3);(0,r.useEffect)((()=>{1===d&&ui.test(t)?o("usernameErrMsg",""):2===d&&o("usernameErrMsg",p("editprofile_editpage_error_notavailable"))}),[d,t]),(0,r.useEffect)((()=>{6===c&&ne.F.open({content:p("editprofile_editpage_error_tryagain"),duration:2})}),[c]);const m=(0,r.useCallback)((e=>{const{value:t}=e.target;t.length<2?o("usernameErrMsg",p("editprofile_editpage_error_min2char")):t.length>24?o("usernameErrMsg",p("editprofile_editpage_error_username_max")):ui.test(t)?g(t):o("usernameErrMsg",p("editprofile_editpage_error_notavailable")),i("userName",t)}),[g,i,o,p]);return(0,n.Y)(Nt,{"data-e2e":"edit-profile-username-input",children:a.changeable?(0,n.FD)(n.FK,{children:[(0,n.Y)(Wt,{"aria-invalid":Boolean(l),"aria-label":l,style:{outline:l?"1.5px solid #FF4C3A":""},placeholder:p("editprofile_editpage_username"),value:t,onChange:m}),(()=>{const e=l,t=d;return e?(0,n.Y)(ei,{children:e}):s?(0,n.Y)(ni,{fill:h.LineInput,width:24,height:24}):t?(0,n.Y)(ti,{fill:"#0BE09B",width:16,height:16}):void 0})(),(0,n.FD)(Kt,{"data-e2e":"edit-profile-username-link",children:["www.tiktok.com/@",t]}),(0,n.Y)(Gt,{"data-e2e":"edit-profile-username-tip",children:p("editprofile_editpage_username_subtext1")})]}):(0,n.FD)(n.FK,{children:[(0,n.Y)(Ht,{children:t}),(0,n.FD)(Kt,{children:["www.tiktok.com/@",t]}),(0,n.Y)(Gt,{children:p("editprofile_editpage_username_subtext2").replace("%s",a.nextTimeStr)})]})})},hi="reset",gi="report",mi=(0,r.memo)((({visible:e=!1,user:t,onCloseModal:i,onUpdated:o,uniqueIdChangeInfo:a,editProfileFrom:l,nameChangeInfo:s,nickNameControlDay:d})=>{const{signature:c,nickname:u,avatarThumb:p,uniqueId:h}=t,[g,m]=(0,r.useState)(!1),[{confirmStep:f,changeType:_},v]=(0,r.useState)({changeType:3,confirmStep:"none"}),b=(0,r.useRef)(null),[{checkLoading:y,avatarInfo:x,saveCode:C,updatingProfile:w},S]=(0,I.S)(Xe.it),Y=(0,T.s)(),D=Boolean(t.verified),P=(0,r.useCallback)(((e,i)=>{if(i.type===gi){const n=i.playload?2:1;return Ue.s.handleSaveReport(Object.assign(Object.assign({},((e,t,i)=>({username_updated:e.userName===t.uniqueId?0:i,photo_updated:e.avatar===t.avatarThumb?0:i,bio_updated:e.bio===t.signature?0:i,name_updated:e.name===t.nickname?0:i}))(e,t,n)),{enter_from:l})),e}return i.type===hi?Object.assign(Object.assign({},e),i.playload):Object.assign(Object.assign({},e),{[i.type]:i.playload})}),[t,l]),[F,L]=(0,r.useReducer)(P,{userName:h,name:u,bio:c,avatar:p,nameErrMsg:"",usernameErrMsg:"",bioValid:!0}),j=(0,r.useMemo)((()=>((e,t,i,n,o)=>{const{name:a,userName:r,bio:l,nameErrMsg:s,usernameErrMsg:d,bioValid:c,avatar:u}=e,{nickname:p,signature:h,uniqueId:g,avatarThumb:m}=i,f=Boolean(a)&&a!==p,_=Boolean(r)&&r!==g,v=l!==h,b=Boolean(o.uri&&u!==m);return(f||_||v||b)&&!s&&!d&&!n&&c&&!t})(F,w,t,y,x)),[F,w,y,t,x]),E=(0,r.useCallback)((()=>{m(!0)}),[]),U=(0,r.useCallback)((e=>{const t=((e,t)=>{let i="";return 0===e?i=t("editprofile_editpage_error_photofail_max"):1===e&&(i=t("editprofile_editpage_error_image_cantuse")),i})(e,Y);ne.F.open({content:t,duration:2})}),[Y]),{imageInfoRef:M,handleAvatarEditIconClick:B,handleFileChange:A}=si({fileUploadRef:b,processCallback:E,errorCallback:U}),O=(0,r.useCallback)((e=>{A(e)}),[A]);(0,r.useEffect)((()=>{x.url&&L({type:"avatar",playload:x.url})}),[x]),(0,r.useEffect)((()=>{if(!w){if(0===C)return L({type:gi}),void o("submitConfirm"===f);const e=((e,t,i)=>{let n="";switch(e){case 1332:n=t("editprofile_editpage_error_cantmodify_others");break;case 1333:n=t("editprofile_editpage_error_cantmodify_review");break;case 1330:n=t("editprofile_editpage_error_username_cantchange");break;case 23:n=t("alert_user_update_profile_limited_toast");break;case 9:n=t("account_status_banned");break;case 3002265:n=t("nickname_change_fail_toast").replace("%d",i);break;case 3002328:n=t("ecom_changename_web");break;default:e!==Xe.jp&&(n=t("editprofile_editpage_error_tryagain"))}return n})(C,Y,d);e&&L({type:gi,playload:" "}),e&&ne.F.open({content:e,duration:2})}}),[C,w,f]);const q=(0,r.useCallback)((()=>{L({type:hi,playload:{userName:h,name:u,bio:c,avatar:p,nameErrMsg:"",usernameErrMsg:"",bioValid:!0}}),S.setUpdatingProfile(!1),S.setAvatarInfo({uri:"",url:""}),S.SetSaveCode(Xe.jp),S.setNickNameValid(0),S.setUploadImgCode(Xe.jp),S.setUniqueIdValid(0)}),[p,S,u,c,h]);(0,r.useEffect)((()=>{L({type:hi,playload:{userName:h,name:u,bio:c,avatar:p,nameErrMsg:"",usernameErrMsg:"",bioValid:!0}})}),[p,u,c,h]);const R=(0,r.useCallback)((()=>{i(),Ue.s.handleCancelEditProfile({enter_from:l}),q()}),[l,i,q]),z=(0,r.useCallback)((()=>{F.userName!==h&&F.name!==u?v({changeType:2,confirmStep:"frequencyConfirm"}):F.userName!==h?v({changeType:0,confirmStep:"frequencyConfirm"}):F.name!==u?v({changeType:1,confirmStep:"frequencyConfirm"}):S.updateUserProfile({signature:F.bio!==c?F.bio:void 0,nickname:F.name!==u?F.name:void 0,avatar_uri:x.uri?x.uri:void 0,uniqueId:F.userName.toLowerCase(),needUpdateUniqueId:F.userName.toLowerCase()!==h,needRemoveBlueV:!1})}),[F.userName,F.name,F.bio,h,u,S,c,x.uri]),N=(0,r.useCallback)((()=>{v({changeType:3,confirmStep:"none"}),q()}),[q]),W=(0,r.useCallback)((e=>{S.updateUserProfile({signature:F.bio!==c?F.bio:void 0,nickname:F.name!==u?F.name:void 0,avatar_uri:x.uri?x.uri:void 0,uniqueId:F.userName.toLowerCase(),needUpdateUniqueId:F.userName.toLowerCase()!==h,needRemoveBlueV:e})}),[S,F.bio,F.name,F.userName,c,u,x.uri,h]),H=(0,r.useCallback)((e=>{27===e.keyCode&&(e.stopPropagation(),e.preventDefault(),R())}),[R]),V=(0,r.useCallback)((e=>{13===e.keyCode&&(e.stopPropagation(),e.preventDefault(),R())}),[R]),$=(0,r.useCallback)((e=>{var t;13===e.keyCode&&(e.stopPropagation(),e.preventDefault(),null===(t=b.current)||void 0===t||t.click())}),[]),K=(0,r.useCallback)(((e,t)=>{L({type:e,playload:t})}),[]),G=(0,r.useCallback)((()=>{m(!1),S.setUploadImgCode(Xe.jp)}),[S]),{colors:Z}=(0,k.u)();return(0,n.Y)(Ze.i,{style:{background:Z.BGSecondary},compact:!0,isOpen:e,children:"none"!==f?(()=>{const e={isVerified:D,replaceStr:d,changeType:_,active:!w,onCancel:N,onConfirm:W,username:F.userName,name:F.name,nextStep:v};switch(f){case"frequencyConfirm":return(0,n.Y)(Ct,Object.assign({},e));case"blueVConfirm":return(0,n.Y)(kt,Object.assign({},e));case"loseVerifyConfirm":return(0,n.Y)(St,Object.assign({},e));case"submitConfirm":return(0,n.Y)(Tt.Y,Object.assign({},e));default:return null}})():(0,n.FD)(Lt,{"aria-label":Y("editprofile_editprofile"),role:"dialog",onKeyDown:H,"data-e2e":"edit-profile-popup",showVerified:D&&!g,children:[(0,n.FD)(jt,{"data-e2e":"edit-profile-header",children:[(0,n.Y)(Et,{children:Y("editprofile_editprofile")}),(0,n.Y)(Ut,{"aria-label":Y("Close_button"),role:"button",tabIndex:0,onKeyDown:V,onClick:R,"data-e2e":"edit-profile-close",children:(0,n.Y)(Ke.A,{width:"24",height:"24",fill:Z.TextSecondary})})]}),(0,n.FD)(At,{children:[(0,n.FD)(qt,{children:[(0,n.Y)(Rt,{"data-e2e":"edit-profile-photo",children:Y("editprofile_editpage_photo")}),(0,n.FD)(zt,{"data-e2e":"edit-profile-avatar",children:[(0,n.Y)(Qt,{onClick:B,src:F.avatar,isShowLive:!1,isShowLiveTag:!1,needAnimation:!1,size:96}),(0,n.FD)(Jt,{"aria-label":Y("editprofile_editpage_photo"),role:"button",tabIndex:0,onKeyDown:$,"data-e2e":"edit-profile-avatar-edit-icon",onClick:B,children:[(0,n.Y)(Ge.A,{width:16,height:16}),(0,n.Y)(Xt,{ref:b,tabIndex:-1,type:"file",accept:li,onChange:O})]})]})]}),(0,n.FD)(qt,{children:[(0,n.Y)(Rt,{"data-e2e":"edit-profile-username",children:Y("editprofile_editpage_username")}),(0,n.Y)(pi,{username:F.userName,usernameErrMsg:F.usernameErrMsg,uniqueIdChangeInfo:a,onUsernameErrorChange:K,onUsernameChange:K})]}),(0,n.FD)(qt,{children:[(0,n.Y)(Rt,{"data-e2e":"edit-profile-name",children:Y("editprofile_editpage_name")}),(0,n.Y)(di,{name:F.name,nameErrMsg:F.nameErrMsg,onNameChange:K,onNameErrorChange:K,nameChangeInfo:s,nickNameControlDay:d})]}),(0,n.FD)(Ot,{children:[(0,n.Y)(Rt,{"data-e2e":"edit-profile-bio",children:Y("editprofile_editpage_bio")}),(0,n.Y)(oi,{bio:F.bio,bioValid:F.bioValid,onBioChange:K,onBioValidChange:K})]})]}),(0,n.FD)(Mt,{children:[(0,n.Y)(Bt,{"data-e2e":"edit-profile-cancel",size:"tiny",onClick:R,children:Y("editprofile_cancel")}),(0,n.Y)(Bt,{"data-e2e":"edit-profile-save",size:"tiny",buttonTheme:"primary",onClick:z,disabled:!j,children:Y("editprofile_save")})]}),g&&(0,n.Y)(bt,{style:{position:"absolute",left:0,top:0,background:"#fff",borderRadius:"8px"},imageInfo:M.current,onClose:G,onSaveAvatar:G})]})})}));var fi=i(24643),_i=i(84987);const vi={id:"edit-fd9cf296",use:"edit-fd9cf296-usage",viewBox:"0 0 20 20",content:''};function bi(e){const t=(0,r.useContext)(_i.X);return(0,r.useLayoutEffect)((()=>(t.add(vi),()=>{t.remove("edit-fd9cf296")})),[]),(0,fi.jsx)("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor"},e,{children:(0,fi.jsx)("use",{xlinkHref:"#edit-fd9cf296"},void 0)}),void 0)}const yi=(0,Oe.default)("div",{target:"e33dl3i0"})({position:"relative",height:"36px",padding:0,margin:0,marginTop:"16px",display:"flex",alignItems:"center"},"label:DivEditContainer;"),xi=(0,Oe.default)(j.y,{target:"e33dl3i1"})((({theme:{direction:e}})=>[{height:"36px",fontSize:"16px",display:"flex",alignItems:"center",padding:"0 16px",minWidth:"136px",lineHeight:"24px","> span":{whiteSpace:"nowrap"}},(0,qe.mp)({direction:e,marginEnd:8})]),"label:StyledEditButton;"),Ci=(0,Oe.default)(bi,{target:"e33dl3i2"})((({theme:{direction:e,colors:t}})=>[{width:"20px",height:"20px",color:t.Primary2},(0,qe.mp)({direction:e,marginEnd:6})]),"label:StyledEditIcon;");function wi(e,t){const i=e+24*t*60*60,n=Date.now();return e&&i>Math.ceil(n/1e3)?{changeable:!1,nextTime:i}:{changeable:!0,nextTime:0}}var ki;!function(e){e.VerifyTip="1",e.ProfileUpdateTip="2"}(ki||(ki={}));const Ii=(0,r.memo)((function(){const e=(0,T.s)();return(0,r.useEffect)((()=>{Be.f.sendEvent("Promote_entrance_show",{enter_from:"personal_page_profile"})}),[]),(0,n.FD)(xi,{size:"medium",onClick:()=>{Be.f.sendEvent("Promote_entrance_click",{enter_from:"personal_page_profile"}),window.location.href="/promote/web/main?enter_from=personal_page_profile"},children:[(0,n.Y)(Te.x,{color:"Primary2"}),(0,n.Y)("span",{style:{marginInlineStart:6},children:e("Promote_web_entrance_profile")})]})})),Si=(0,r.memo)((function({user:e}){var t,i,o;const[a,l]=(0,r.useState)(!1),[s,d]=(0,r.useState)(!1),{uniqueIdModifyTime:u,nickNameModifyTime:p}=e,[h,g]=(0,r.useState)({changeable:!0,nextTimeStr:""}),[m,f]=(0,r.useState)({changeable:!0,nextTimeStr:""}),{language:_}=null!==(t=(0,P.W)((()=>["language"]),[]))&&void 0!==t?t:{},{config:v}=null!==(i=(0,Ye.U)((()=>["config"]),[]))&&void 0!==i?i:{},b=null!==(o=null==v?void 0:v.nickNameControlDay)&&void 0!==o?o:"7",y=null!=_?_:"en",[{newUniqueInfo:x},C]=(0,I.S)(Xe.it),w=(0,De.U)({pathname:(0,Ce.fJR)({uniqueId:x.uniqueId}),search:{}}),k=(0,T.s)(),[S,Y]=(0,r.useState)(""),D=(0,Pe.Us)(),F=(0,Se.Nj)(Ee.r);(0,r.useEffect)((()=>{D.appContext&&F.setContext(D.appContext)}),[D.appContext,F]),(0,r.useEffect)((()=>{if(u){const{changeable:e,nextTime:t}=wi(Number(u),30),i=(0,Fe.SV)(Number(t),y,"MMM D, YYYY");g({changeable:e,nextTimeStr:i})}}),[y,u]),(0,r.useEffect)((()=>{if(p){const{changeable:e,nextTime:t}=wi(Number(p),Number(b)),i=(0,Fe.SV)(Number(t),y,"MMM D, YYYY");f((t=>Object.assign(Object.assign({},t),{changeable:e,nextTimeStr:i})))}}),[y,p,b]);const{removeEditProfilePop:L}=(0,c.gR)();(0,r.useEffect)((()=>{const e=!(0,Le._S)(je.vt)&&!L;e&&(Ue.s.handleShowProfileTooltip({enter_from:"personal_homepage"}),(0,Le.AP)(je.vt,"1"),Me.U.handlePopupShow({enter_method:"edit_profile_popup"})),d(e)}),[L]),(0,r.useEffect)((()=>{const e=(0,Le.Hd)(je.Iw);e&&(Y(e),l(!0),(0,Le.X)(je.Iw))}),[]);const j=(0,r.useCallback)((()=>{Ue.s.handleClickEditProfile({enter_from:"personal_homepage"}),Y("personal_homepage"),l(!0)}),[]),E=(0,r.useCallback)((()=>{l(!1)}),[]),U=(0,r.useCallback)((e=>{Ue.s.handleCloseProfileTooltip({enter_from:"personal_homepage",close_method:e}),d(!1)}),[]),M=(0,r.useCallback)((e=>{(0,Le.J2)(je.BP,e?"1":"2"),C.SetSaveCode(Xe.jp),l(!1),setTimeout((()=>{window.location.href=w}),3e3)}),[w,C]),B=!!e.HasPromoteEntry;return(0,n.FD)(yi,{"data-e2e":"edit-profile-entrance",children:[(0,n.FD)(xi,{onClick:j,size:"medium",children:[(0,n.Y)(Ci,{}),(0,n.Y)("span",{children:k("editprofile_editprofile")})]}),B&&(0,n.Y)(Ii,{}),(0,n.Y)(mi,{editProfileFrom:S,uniqueIdChangeInfo:h,nameChangeInfo:m,onUpdated:M,onCloseModal:E,visible:a,user:e,nickNameControlDay:b}),(0,n.Y)($e,{onCancel:U,showPopover:s,cancelText:k("editprofile_close"),title:k("editprofile_tooltip_title"),description:k("editprofile_tooltip_subtitle")})]})}));var Ti=i(85349),Yi=i(30543),Di=i(68662),Pi=i(17772);const Fi=(0,Oe.default)("div",{target:"edpgb5h0"})((()=>({height:"696px",minWidth:"560px",maxWidth:"700px"})),"label:DivModalContainer;"),Li=(0,Oe.default)("div",{target:"edpgb5h1"})((()=>[{padding:"24px",lineHeight:"36px",display:"flex",justifyContent:"space-between",alignItems:"center"}]),"label:DivHeaderContainer;"),ji=(0,Oe.default)("h1",{target:"edpgb5h2"})((({theme:e})=>[(0,qe.zy)({theme:e,fontWeight:"bold",fontFamily:"TikTokFont"}),{fontSize:"24px",color:e.colors.TextPrimary,width:"100%",textAlign:"center"}]),"label:H1Header;"),Ei=(0,Oe.default)("div",{target:"edpgb5h3"})((({theme:e})=>[{width:"32px",height:"32px",cursor:"pointer","&:focus-visible":{outline:`2px solid ${e.colors.Negative}`}},(0,qe.mp)({direction:e.direction})]),"label:DivCloseContainer;"),Ui=(0,Oe.default)("div",{target:"edpgb5h4"})((({theme:{colors:e,direction:t}})=>[{display:"flex",alignItems:"center",justifyContent:"space-around",width:"100%",height:"42px",borderBottom:`0.5px solid ${e.LineSecondary}`,marginBottom:"1px"},(0,qe.mp)({direction:t})]),"label:DivTabs;"),Mi=(0,Oe.default)("div",{target:"edpgb5h5"})((({theme:e,isActive:t})=>[(0,qe.zy)({theme:e,fontFamily:"TikTokFont",fontWeight:"medium",typography:"P2"}),{position:"relative",lineHeight:"24px",display:"flex",height:"44px",padding:"10px 24px",cursor:"pointer",columnGap:"5px",borderBottom:t?`2px solid ${e.colors.TextPrimary}`:"none",color:t?e.colors.TextPrimary:e.colors.TextTertiary}]),"label:DivTabItem;"),Bi=(0,Oe.default)("div",{target:"edpgb5h6"})({display:"flex",flexDirection:"column",height:"561px",width:"100%",alignItems:"center",paddingTop:"140px"},"label:DivEmptyListContainer;"),Ai=(0,Oe.default)("div",{target:"edpgb5h7"})((({theme:e})=>[(0,qe.zy)({theme:e,typography:"P3",color:"TextPrimary",fontWeight:"bold"}),{textAlign:"center",lineHeight:"36px",fontSize:24,paddingTop:24}]),"label:DivTitle;"),Oi=(0,Oe.default)("div",{target:"edpgb5h8"})((({theme:e})=>[(0,qe.zy)({theme:e,typography:"P2",color:"TextSecondary",fontWeight:"normal"}),{fontSize:16,lineHeight:"24px",textAlign:"center",paddingTop:"8px"}]),"label:DivDesc;");var qi=i(29528);const Ri=(0,Oe.default)("div",{target:"eorzdsw0"})({height:"569px",width:"100%",padding:0,marginBottom:"20px",listStyleType:"none",overflowY:"auto","::-webkit-scrollbar":{display:"none"}},"label:DivUserListContainer;"),zi=(0,Oe.default)("div",{target:"eorzdsw1"})({width:"100%",display:"flex",justifyContent:"center"},"label:DivLoadingWrapper;"),Ni=(0,Oe.default)("div",{target:"eorzdsw2"})((({theme:e})=>[(0,qe.zy)({theme:e,fontWeight:"medium",color:"TextTertiary"}),{lineHeight:"18.2px",paddingInlineStart:"40px",marginTop:"24px",display:"flex",flexDirection:"row",alignItems:"center"}]),"label:DivSuggestedAccountTitleContainer;"),Wi=(0,Oe.default)(qi.A,{target:"eorzdsw3"})((({theme:e})=>[(0,qe.zy)({theme:e,color:"TextQuaternary"}),{marginLeft:"4px",width:"12px",height:"12px"}]),"label:IconExclamationMark;");var Hi=i(51664),Vi=i(85041),$i=i(29098);const Ki=(0,Oe.default)("div",{target:"es616eb0"})({padding:"16px 40px",display:"flex",flexDirection:"column",width:"100%"},"label:DivUserContainer;"),Gi=(0,Oe.default)("div",{target:"es616eb1"})({display:"flex",flexDirection:"row",width:"100%",justifyContent:"space-between",alignItems:"center"},"label:DivUserItem;"),Zi=(0,Oe.default)(Vi.E,{target:"es616eb3"})({position:"relative",display:"flex",flexDirection:"row",":hover":{textDecoration:"none"}},"label:StyledUserInfoLink;"),Ji=(0,Oe.default)("div",{target:"es616eb4"})((({theme:{direction:e}})=>(0,qe.mp)({direction:e,marginStart:12,marginEnd:12})),"label:DivUserInfo;"),Qi=(0,Oe.default)("div",{target:"es616eb5"})({display:"flex",alignItems:"center"},"label:DivNicknameContainer;"),Xi=(0,Oe.default)("span",{target:"es616eb6"})((({theme:e})=>[(0,qe.zy)({theme:e,fontFamily:"TikTokFont",typography:"P1",fontWeight:"bold"}),{maxWidth:220},qe.PR]),"label:SpanNickname;"),en=(0,Oe.default)($i.A,{target:"es616eb7"})((({theme:{direction:e}})=>[{flexShrink:0},(0,qe.mp)({direction:e,marginStart:4})]),"label:StyledVerifiedBadgeColor;"),tn=(0,Oe.default)("p",{target:"es616eb8"})((({theme:e})=>[(0,qe.zy)({theme:e,fontFamily:"TikTokFont",typography:"P3",color:"TextTertiary"}),{maxWidth:240,marginTop:2},qe.PR]),"label:PUniqueId;"),nn=(0,Oe.default)("div",{target:"es616eb9"})((()=>({display:"flex",flexDirection:"row",alignItems:"center"})),"label:DivCTAContainer;");var on=i(92846),an=i(34393),rn=i(6865),ln=i(34012),sn=i(67963),dn=i(25754);const cn=(0,Oe.default)("div",{target:"eq8nsxf0"})((({hide:e})=>[{display:e?"none":"1"}]),"label:DivMessageButtonContainer;"),un=(0,Oe.default)(j.y,{target:"eq8nsxf1"})((({theme:e})=>[(0,qe.zy)({theme:e,fontFamily:"TikTokFont",fontWeight:"semiBold"}),{fontSize:"16px",flex:1,minWidth:"113px",lineHeight:"36px",borderStyle:"none",borderRadius:"8px",backgroundColor:e.colors.BGInput,":hover":{backgroundColor:e.colors.BGInput2}}]),"label:StyledMessageButtonV2;"),pn=(0,r.memo)((function({uniqueId:e,uid:t,style:i={},buttonText:o,enterMethod:a}){var l;const s=(0,T.s)(),{user:d,language:c="en"}=null!==(l=(0,P.W)((()=>["user","language"]),[]))&&void 0!==l?l:{},u=(0,r.useRef)(null),p=!!d&&e===d.uniqueId,h=(0,r.useCallback)((()=>dn.w.handleEnterChatList(void 0,a)),[a]),{path:g,target:m}=(0,ln._Y)(c);return(0,n.Y)(n.FK,{children:!p&&(0,n.Y)(cn,{ref:u,children:(0,n.Y)(sn.N_,{forceSSR:!1,to:`${g}&u=${t}`,target:m,onClick:h,style:{textDecoration:"none"},children:(0,n.Y)(un,{size:"small",buttonTheme:"default",style:i,"data-e2e":"message-button",children:s(o||"webdm_message_button")})})})})})),hn=(0,r.memo)((function(e){var t;const{uniqueId:i,activeType:o}=e,{user:a}=null!==(t=(0,P.W)((()=>["user"]),[]))&&void 0!==t?t:{},l=!!a&&i===a.uniqueId,s=(0,f.nW)((e=>{const t=e.users[i];if(!t)return null;const{verified:n,avatarThumb:o,nickname:a,roomId:r,id:l,relation:s,secUid:d}=t;return{verified:n,avatarThumb:o,nickname:a,roomId:r,id:l,uniqueId:i,relation:s,secUid:d}}),h.bN),{verified:d,nickname:c,avatarThumb:u,relation:p,secUid:g,id:m}=(0,Y.L$)(s),_="profile_popup",v=(0,Hi.AL)({user:s,enterMethod:_}),b=(0,r.useCallback)((e=>{(0,Le.dG)(e)}),[]);return(0,n.Y)(Ki,{children:(0,n.FD)(Gi,{children:[(0,n.FD)(Zi,{uniqueId:i,secUid:g,teaParams:v,onClick:b,children:[(0,n.Y)(on.e,{size:48,src:u}),(0,n.FD)(Ji,{children:[(0,n.FD)(Qi,{children:[(0,n.Y)(Xi,{children:c}),d&&(0,n.Y)(en,{width:14,height:14,style:{verticalAlign:"middle",marginLeft:4}})]}),(0,n.Y)(tn,{children:i})]})]}),(0,n.FD)(nn,{children:[l&&(0,n.Y)(Vi.E,{uniqueId:i,secUid:g,teaParams:v,onClick:b,children:(0,n.Y)(an.A,{width:16,height:16})}),!l&&("friend"===o?(0,n.Y)(pn,{uniqueId:i,uid:m,style:{lineHeight:"24px"},enterMethod:_}):(0,n.Y)(rn.W,{relation:p,uniqueId:i,nickname:c,style:{lineHeight:"24px"},buttonText:"profile_page_message_btn",hideMutualIcon:!0}))]})]})})}));var gn=i(10745),mn=i(84827),fn=i(88091),_n=i(48720),vn=i(56111);const bn=(0,r.memo)((function(e){const{list:t,loading:i,hasMore:o,isProfile:a,activeType:l,secUid:s,onOpenSuggestedAccountPersonalizeModal:d,onCloseFollowModal:u}=e,p=(0,r.useRef)(null),h=(0,vn.Nl)(),g=(0,ye.OB)(!0),m=(0,T.s)(),f=(0,r.useCallback)((()=>{s&&o&&!i&&("others_following"===l?h.getTargetFollowingList({secUid:s}):"others_follower"===l?h.getTargetFollowerList({secUid:s}):"friend"===l?h.getFriendsList({}):"suggested_follow"===l&&h.getSuggestedList({isNonPersonalized:!g}))}),[h,l,s,o,i,g]);(0,gn.O9)({elemRef:p,onHitBottom:f,bottomThreshold:200,throttle:200});const _=(0,c.Ad)()&&"suggested_follow"===l;(0,r.useEffect)((()=>{_&&_n.$.handleShowSuggestedAccountInfo()}),[_]);const v=(0,r.useCallback)((()=>{u(),d()}),[]);return(0,n.FD)(Ri,{ref:p,children:[_&&(0,n.FD)(Ni,{children:[(0,n.Y)(fn.Fm,{children:m("sug_accounts")}),(0,n.Y)(Wi,{onClick:v})]}),t.map((e=>e?(0,n.Y)("li",{children:(0,n.Y)(hn,{uniqueId:e,isPersonalFollowerTab:a&&"others_follower"===l,activeType:l})},e):null)),i&&o&&t.length>1?(0,n.Y)(zi,{children:(0,n.Y)(mn.R,{})}):null]})})),yn={others_follower:{privateTitle:"profile_page_followerList_private_header",privateDesc:"profile_page_followerList_private_body",emptyTitle:"profile_page_profile_follower_tab",emptyDesc:"profile_page_profile_follower_view_desc"},others_following:{privateTitle:"profile_page_followingList_private_header",privateDesc:"profile_page_followingList_private_body",emptyTitle:"profile_page_profile_following_tab",emptyDesc:"profile_page_profile_following_view_desc"},follower:{privateTitle:"",privateDesc:"",emptyTitle:"profile_page_profile_follower_tab",emptyDesc:"profile_page_profile_follower_desc"},following:{privateTitle:"",privateDesc:"",emptyTitle:"profile_page_profile_following_tab",emptyDesc:"profile_page_profile_following_desc"},suggest:{privateTitle:"",privateDesc:"",emptyTitle:"",emptyDesc:""},suggested_follow:{privateTitle:"",privateDesc:"",emptyTitle:"profile_page_suggested_tab",emptyDesc:""},friend:{privateTitle:"",privateDesc:"",emptyTitle:"",emptyDesc:"profile_page_profile_friends_desc"}},xn=(e,t)=>{"others_following"===e?Be.f.sendEvent("click_following",{to_user_id:t}):"others_follower"===e?Be.f.sendEvent("click_followers",{to_user_id:t}):"suggested_follow"===e?Be.f.sendEvent("click_suggested",{to_user_id:t}):"friend"===e&&Be.f.sendEvent("click_friends",{to_user_id:t})},Cn=(0,r.memo)((({visible:e=!1,onCloseModal:t,user:i,stats:o,isProfile:a,entranceType:l="others_following",onOpenSuggestedAccountPersonalizeModal:s})=>{var d,u,p,g;const m=(0,T.s)(),{colors:f}=(0,k.u)(),{uniqueId:_,secUid:v,id:b}=i,[y,x]=(0,r.useState)(l),[C,w]=(0,vn.Gd)((e=>({others_follower:e.others_follower,others_following:e.others_following,friend:e.friend,suggested_follow:e.suggested_follow})),h.bN),{loading:I,list:S}=C.others_follower,{loading:D,list:P}=C.others_following,{loading:F,list:L}=C.friend,{loading:j,list:E}=C.suggested_follow,U=(0,ye.OB)(!0);(0,r.useEffect)((()=>{v&&("others_following"===y&&!P.length&&D&&w.getTargetFollowingList({secUid:v}),"others_follower"===y&&!S.length&&I&&w.getTargetFollowerList({secUid:v}),"friend"===y&&!L.length&&F&&w.getFriendsList({}),"suggested_follow"===y&&!E.length&&j&&w.getSuggestedList({isNonPersonalized:!U}))}),[v,y,w,S.length,I,P.length,D,L.length,F,E.length,j,U]);const M=(0,r.useCallback)((e=>{27===e.keyCode&&(e.stopPropagation(),e.preventDefault(),t())}),[t]),B=(0,r.useCallback)((e=>()=>{xn(e,b),x(e)}),[b]),A=C[y].loading,O=10222===C[y].statusCode,q=(0,c.Ad)()||U;return(0,n.Y)(Ti.t,{isMobile:!1,componentName:"user-follow-modal",children:(0,n.Y)(Ze.i,{compact:!0,style:{background:f.BGInput},isOpen:e,closeOnBackdropClick:!0,closeOnEsc:!0,onClose:t,children:(0,n.FD)(Fi,{role:"dialog","data-e2e":"follow-info-popup",children:[(0,n.FD)(Li,{children:[(0,n.Y)(ji,{children:_}),(0,n.Y)(Ei,{"aria-label":m("Close_button"),role:"button",tabIndex:0,onKeyDown:M,onClick:t,"data-e2e":"follow-popup-close",children:(0,n.Y)(Yi.g,{size:32,color:f.TextSecondary})})]}),(0,n.FD)(Ui,{children:[(0,n.FD)(Mi,{isActive:"others_following"===y,onClick:B("others_following"),children:[(0,n.Y)("div",{children:m("profile_page_profile_following_tab")}),(0,n.Y)("strong",{title:m("profile_page_profile_following_tab"),children:o?(0,Y.D1)(o.followingCount):"--"})]}),(0,n.FD)(Mi,{isActive:"others_follower"===y,onClick:B("others_follower"),children:[(0,n.Y)("div",{children:m("profile_page_profile_follower_tab")}),(0,n.Y)("strong",{title:m("profile_page_profile_follower_tab"),children:o?(0,Y.D1)(o.followerCount):"--"})]}),a&&(0,n.FD)(Mi,{isActive:"friend"===y,onClick:B("friend"),children:[(0,n.Y)("div",{children:m("profile_page_friends_tab")}),(0,n.Y)("strong",{title:m("profile_page_friends_tab"),children:o?(0,Y.D1)(o.friendCount):"--"})]}),q&&(0,n.Y)(Mi,{isActive:"suggested_follow"===y,onClick:B("suggested_follow"),children:m("profile_page_suggested_tab")})]}),0===C[y].list.length&&A&&(0,n.Y)(Bi,{children:(0,n.Y)(mn.R,{})}),!A&&0===C[y].list.length&&(O?(0,n.FD)(Bi,{children:[(0,n.Y)(Di.d,{size:72,color:"TextQuaternary"}),(0,n.Y)(Ai,{children:m(null===(d=yn[y])||void 0===d?void 0:d.privateTitle)}),(0,n.Y)(Oi,{children:m(null===(u=yn[y])||void 0===u?void 0:u.privateDesc,{nickname:_})})]}):(0,n.FD)(Bi,{children:[(0,n.Y)(Pi.b,{size:72,color:"TextQuaternary"}),(0,n.Y)(Ai,{children:m(null===(p=yn[y])||void 0===p?void 0:p.emptyTitle)}),(0,n.Y)(Oi,{children:m(null===(g=yn[y])||void 0===g?void 0:g.emptyDesc,{nickname:_})})]})),(0,n.Y)(bn,{list:C[y].list,loading:C[y].loading,hasMore:C[y].hasMore,isProfile:!0,activeType:y,secUid:null!=v?v:"",onOpenSuggestedAccountPersonalizeModal:s,onCloseFollowModal:t})]})})})}));var wn=i(99260),kn=i(17784),In=i(7751),Sn=i(56152),Tn=i(96689),Yn=i(45445),Dn=i(38597),Pn=i(95197),Fn=i(3885);const Ln=(0,r.memo)((function({user:e,style:t={}}){var i,o;const a=(0,T.s)(),{user:l,language:s="en"}=null!==(i=(0,P.W)((()=>["user","language"]),[]))&&void 0!==i?i:{},d=(0,r.useRef)(null),c=(0,r.useRef)(null),{relation:u,uniqueId:p}=e,h=!!l&&p===l.uniqueId,g=(0,Tn.K)({query:{enter_method:"click_follow"}}),{handleFollow:m,text:f,isFollowing:_,relation:v}=(0,fe.Tu)({uniqueId:null!==(o=null==e?void 0:e.uniqueId)&&void 0!==o?o:"",onNeedLogin:g}),[b,y]=(0,r.useState)(!1),x=3===v,C=4===v,w=_&&!(null==l?void 0:l.hasIMPermission),k=C||x||w,I=(0,r.useCallback)((()=>dn.w.handleEnterChatList()),[]);(0,r.useEffect)((()=>{C&&Dn.h.handleBlockShow(!C)}),[C]);const S=(0,r.useCallback)((()=>{y(!0)}),[]),Y=(0,r.useCallback)((()=>{y(!1)}),[]),D=(0,r.useCallback)((e=>{C?S():m(e)}),[C,S,m]),{path:F,target:L}=(0,ln._Y)(s);return(0,n.FD)(n.FK,{children:[(0,n.FD)(Fn.XT,{style:t,children:[!h&&(0,n.Y)(kn.Ay,{timeout:300,in:!_||!(null==l?void 0:l.hasIMPermission),nodeRef:d,children:i=>(0,n.Y)(Fn.QD,{ref:d,status:i,style:t,children:(0,n.FD)(Fn.rO,{size:"medium",buttonTheme:k?"default":"primary",hide:_&&(null==l?void 0:l.hasIMPermission),"data-e2e":"follow-button",onClick:D,style:t,"aria-label":`${f} ${null==e?void 0:e.nickname}`,children:[2===u?(0,n.Y)(Fn.Yn,{}):null,f]})})}),!h&&(null==l?void 0:l.hasIMPermission)&&(0,n.Y)(kn.Ay,{timeout:300,in:_,nodeRef:c,children:t=>(0,n.FD)(Fn.iH,{hide:!_,status:t,ref:c,children:[(0,n.Y)(sn.N_,{forceSSR:!1,to:`${F}&u=${null==e?void 0:e.id}`,target:L,onClick:I,style:{textDecoration:"none"},children:(0,n.Y)(Fn.xI,{size:"medium",buttonTheme:"line",children:a("webdm_message_button")})}),(0,n.Y)(Pn.m,{overlay:a("user_action_unfollow"),placement:"bottom",children:(0,n.Y)(Fn.tR,{onClick:m,children:2===u?(0,n.Y)(In.A,{width:20,height:20}):(0,n.Y)(Sn.A,{width:20,height:20})})})]})})]}),(0,n.Y)(Yn.j,{visible:b,uniqueId:p,onClose:Y})]})}));var jn=i(79279),En=i(924),Un=i(31147);const Mn=(0,Oe.default)("div",{target:"eht0fek0"})((({theme:e})=>(0,qe.zy)({theme:e,fontFamily:"TikTokDisplayFont",fontWeight:"semiBold",typography:"P2"})),{display:"flex",alignItems:"flex-end",flexWrap:"wrap",marginTop:"5px"},"label:DivShareLinks;"),Bn=(0,Oe.default)("span",{target:"eht0fek1"})((({theme:{colors:e}})=>({display:"inline-block",border:`.5px solid ${e.LineSecondary}`,height:"16px",margin:"0 12px"})),"label:SpanShareLinksSpliter;"),An=(0,Oe.default)("span",{target:"eht0fek2"})((({theme:{direction:e}})=>(0,qe.mp)({direction:e,paddingStart:2})),{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},"label:SpanLink;"),On=({theme:e,red:t})=>[(0,qe.zy)({theme:e,fontFamily:"TikTokDisplayFont",fontWeight:"semiBold",lineHeight:"18px",typography:"P2",color:t?"Primary":"TextPrimary",isLink:!0}),{display:"flex",alignItems:"flex-end",fontStyle:"normal",height:"22px",maxWidth:"256px"}],qn=(0,Oe.default)("p",{target:"eht0fek3"})(On,"label:PShareError;"),Rn=(0,Oe.default)("a",{target:"eht0fek4"})(On,"label:ABioLink;"),zn=(0,r.memo)((function({user:e}){var t,i;const o=(0,T.s)(),{user:a}=null!==(t=(0,P.W)((()=>["user","language"]),[]))&&void 0!==t?t:{},{bioLink:l={},commerceUserInfo:s={},uniqueId:d}=e,c=!!a&&d===a.uniqueId,{shouldShowDownloadLink:u,shouldShowBioLink:p,secDownloadLink:h,secBioLink:g,showDownloadLink:m}=function({isProfile:e,user:t}){var i,n,o;const{language:a="en"}=null!==(i=(0,P.W)((()=>["language"]),[]))&&void 0!==i?i:{},r=(0,y.N)(),{secret:l,relation:s,bioLink:d,commerceUserInfo:c}=t,u=[],p=[];let h=!1,g=!1,m=null==d?void 0:d.link;function f(e){return r?e:`https://www.tiktok.com/link/v2?aid=1988&lang=${a}&scene=bio_url&target=${encodeURIComponent(e)}`}(null==d?void 0:d.link)&&(h=!0,m=f(d.link),l&&(h=!1,e&&(h=!0),1===s&&(h=!0)),5===s&&(h=!1),9===d.risk&&(h=!1,e&&(h=!0)));const _=null===(n=null==c?void 0:c.downLoadLink)||void 0===n?void 0:n.ios,v=null===(o=null==c?void 0:c.downLoadLink)||void 0===o?void 0:o.android;return(null==c?void 0:c.commerceUser)&&(_||v)&&(g=!0,v&&(p.push(v),u.push(f(v))),_&&(p.push(_),u.push(f(_)))),{shouldShowDownloadLink:g,shouldShowBioLink:h,secDownloadLink:u,secBioLink:m,showDownloadLink:p}}({isProfile:c,user:e});function f(e){return e.split(/[\s\n\r\t]+/)[0].replace(/^https?:\/\//,"")}const _=(0,r.useMemo)((()=>{var e;return(0,n.Y)(Mn,{children:(0,n.FD)(Rn,{target:"_blank",rel:"noindex nofollow noreferrer noopener",red:!0,href:h[0],children:[(0,n.Y)(jn.A,{width:18,height:18,style:{flexShrink:0}}),(0,n.Y)(An,{children:f(null!==(e=m[0])&&void 0!==e?e:"")})]})})}),[m,h]);return p?(0,n.FD)(Mn,{children:[9!==(null==l?void 0:l.risk)?(0,n.FD)(Rn,{red:null==s?void 0:s.commerceUser,target:"_blank",rel:"noindex nofollow noreferrer noopener",href:null!=g?g:"","data-e2e":"user-link",children:[(0,n.Y)(En.A,{fill:(null==s?void 0:s.commerceUser)?"#fe2c55":"currentColor",width:18,height:18,style:{flexShrink:0}}),(0,n.Y)(An,{children:f(null!==(i=null==l?void 0:l.link)&&void 0!==i?i:"")})]}):(0,n.FD)(qn,{red:!0,children:[(0,n.Y)(Un.A,{width:18,height:18,fill:"#ff4c3a",style:{flexShrink:0}}),(0,n.Y)(An,{children:o("profile_self_link_unavailable")})]}),u&&(0,n.FD)(n.FK,{children:[(0,n.Y)(Bn,{}),_]})]}):u?_:null}));var Nn=i(11328),Wn=i(98819);const Hn=(0,Oe.default)("div",{target:"e1gnmlil0"})((({useFlex:e,isShorterCreatorHeader:t,alignBaseline:i})=>[e&&{display:"flex",alignItems:"center",flexDirection:"row",gap:"12px"},t&&{gap:"4px"},i&&{alignItems:"baseline"}]),"label:DivUserTextWrapper;"),Vn=(0,Oe.default)("div",{target:"e1gnmlil1"})((({useFlex:e})=>[e&&{display:"flex",alignItems:"start",flexDirection:"column",width:"100%"}]),"label:DivUserIdentifierWrapper;");var $n=i(43291);const Kn=(0,Oe.default)("h3",{target:"e1457k4r0"})((({hasNewHeader:e})=>[{display:"flex",flexDirection:"row",alignItems:"center",marginTop:e?"16px":"22px",color:"rgba(18, 18, 18, .75)"},e&&[{flexWrap:"wrap"},(0,qe.jJ)({max:Wn.f.Small,style:{justifyContent:"center"}})]]),"label:H3CountInfos;"),Gn=(0,Oe.default)("div",{target:"e1457k4r1"})((({theme:e,theme:{direction:t},isUIRearrange:i,showPointerCursor:n})=>[(0,qe.zy)({theme:e,fontFamily:i?"TikTokFont":"TikTokDisplayFont",fontWeight:i?"bold":"semiBold",typography:i?"P2":"P1",color:"TextPrimary"}),{display:"flex",direction:"ltr",alignItems:"baseline",cursor:n?"pointer":"default",":not(:last-child)":[(0,qe.mp)({direction:t,marginEnd:20})]}]),"label:DivNumber;"),Zn=(0,Oe.default)("span",{target:"e1457k4r2"})((({theme:e,allowTextUnderline:t})=>[(0,qe.zy)({theme:e,fontFamily:"TikTokFont",fontWeight:"normal",typography:"P2",color:"TextSecondary"}),{fontSize:"16px",lineHeight:"20px",display:"inline-block",marginLeft:"6px",":hover":{textDecoration:t?"underline":"none"}}]),"label:SpanUnit;"),Jn=(0,Oe.default)("h2",{target:"e1457k4r3"})((({isUIRearrange:e,theme:t,theme:{direction:i}})=>[(0,qe.mp)({direction:i,textAlign:"start"}),(0,qe.zy)({theme:t,fontFamily:"TikTokFont",fontWeight:"normal",typography:"P2",color:"TextPrimary"}),{whiteSpace:"pre-line",marginTop:e?"16px":"10px",maxWidth:"600px"}]),"label:H2ShareDesc;"),Qn=(0,Oe.default)(ke.Ct,{target:"e1457k4r4"})({marginBottom:"25px"},"label:StyledSkeletonContainer;"),Xn=(0,Oe.default)(Nn.EA.Avatar,{target:"e1457k4r5"})((({theme:e})=>(0,ke.fo)(e)),"label:StyledSkeletonAvatar;"),eo=(0,Oe.default)("span",{target:"e1457k4r6"})((({theme:e,theme:{direction:t},isShorterCreatorHeader:i})=>[(0,qe.mp)({direction:t,marginStart:"8px"}),(0,qe.zy)({theme:e,fontFamily:"TikTokFont",fontWeight:"normal",typography:"P2",color:"TextTertiary"}),{overflow:"hidden",textOverflow:"ellipsis"},i&&{fontSize:"16px"}]),"label:SpanBAInfo;"),to=(0,Oe.default)("h1",{target:"e1457k4r8"})(ke.g2,{wordBreak:"break-word",marginBottom:0},"label:H1ShareTitle;"),io=(0,Oe.default)("div",{target:"e1457k4r13"})((()=>[{marginTop:"13.5px"}]),"label:DivLiveLinksWrapper;"),no=(0,Oe.default)(w.L0,{target:"e1457k4r14"})((()=>[{maxWidth:"100%",paddingRight:0,paddingLeft:0,minHeight:"140px",display:"flex",alignItems:"center",gap:"28px"},(0,qe.jJ)({max:Wn.f.Small,style:{flexDirection:"column",gap:"20px"}}),{[`${to}`]:{fontSize:"24px",lineHeight:"30px"}}]),"label:CreatorPageHeader;"),oo=(0,Oe.default)(ke.il,{target:"e1457k4r15"})((({isHeaderButtonLower:e})=>[{margin:0,gap:e?"8px":"12px"},{[`> ${$n.Dx}`]:{marginTop:0,marginBottom:0}},(0,qe.jJ)({max:Wn.f.Small,style:{alignItems:"center",[`${Vn}`]:{alignItems:"center",[`${Hn}`]:{justifyContent:"center"}}}})]),"label:CreatorPageHeaderShareContainer;"),ao=(0,Oe.default)("div",{target:"e1457k4r16"})((({isShorterCreatorHeader:e,isHeaderButtonLower:t})=>[{display:"flex",flexDirection:"column",gap:e?"8px":"12px"},e&&{"*":{fontSize:"14px !important;",lineHeight:"130% !important"}},t&&{marginBottom:"8px"},{[`> ${Kn}, ${Jn}, ${Mn}, ${io}`]:{marginTop:0,marginBottom:0}},(0,qe.jJ)({max:Wn.f.Small,style:{alignItems:"center"}})]),"label:CreatorPageHeaderTextContainer;"),ro=(0,Oe.default)("div",{target:"e1a7aieu0"})({minHeight:"255px",maxWidth:"700px"},"label:DivModalContainer;"),lo=(0,Oe.default)("div",{target:"e1a7aieu1"})((({theme:{colors:e}})=>[{padding:"24px",lineHeight:"36px",display:"flex",justifyContent:"space-between",alignItems:"center",borderBottom:`0.5px solid ${e.LineSecondary}`}]),"label:DivHeaderContainer;"),so=(0,Oe.default)("h1",{target:"e1a7aieu2"})((({theme:e})=>[(0,qe.zy)({theme:e,fontWeight:"bold",fontFamily:"TikTokFont"}),{fontSize:"24px",color:e.colors.TextPrimary,width:"100%"}]),"label:H1Header;"),co=(0,Oe.default)("div",{target:"e1a7aieu3"})((({theme:e})=>[{width:"32px",height:"32px",cursor:"pointer","&:focus-visible":{outline:`2px solid ${e.colors.Negative}`}},(0,qe.mp)({direction:e.direction})]),"label:DivCloseContainer;"),uo=(0,Oe.default)("div",{target:"e1a7aieu4"})((({theme:e})=>[(0,qe.zy)({theme:e,fontWeight:"normal",fontFamily:"TikTokFont",color:"TextSecondary"}),{padding:"24px",whiteSpace:"pre-wrap"}]),"label:DivContentContainer;"),po=(0,Oe.default)("div",{target:"e1a7aieu5"})((({theme:{colors:e}})=>({padding:"24px",width:"100%",borderTop:`0.5px solid ${e.LinePrimary2}`,display:"flex",justifyContent:"flex-end"})),"label:DivModalFooter;"),ho=(0,Oe.default)("span",{target:"e1a7aieu6"})((({theme:e})=>[(0,qe.zy)({theme:e,color:"Primary"}),{cursor:"pointer",":hover":{textDecoration:"underline"}}]),"label:SpanManagePersonalizedFeeds;"),go=(0,Oe.default)(sn.N_,{target:"e1a7aieu7"})((({theme:e})=>[(0,qe.zy)({theme:e,color:"Primary"})]),"label:LinkPrivacy;");var mo=i(16680),fo=i(20986),_o=i(58542),vo=i(38975);function bo(){return(0,n.FD)(ke.Ov,{children:[(0,n.Y)(ke.TD,{}),(0,n.Y)(ke.pI,{})]})}const yo=(0,r.memo)((function({detailInfo:e,isNarrow:t}){const{user:i,statusCode:o}=e,{uniqueId:a,stateControlledMedia:r,nickname:l,secret:s}=(0,Y.L$)(i),{isInProductHoldout:d}=(0,c.Vv)(),u=!d,{isShorterCreatorHeader:p}=(0,c.A8)();if((0,be.CC)(o))return(0,n.Y)(Vn,{useFlex:!0,children:(0,n.Y)(Hn,{useFlex:!0,isShorterCreatorHeader:p,children:(0,n.Y)(Hn,{useFlex:!0,alignBaseline:p,isShorterCreatorHeader:p,children:(0,n.Y)(to,{verified:!1,private:!1,"data-e2e":"user-title",children:a})})})});if(!i)return(0,n.Y)(bo,{});const{verified:h,commerceUserInfo:g={}}=i,{category:m,categoryButton:f=!1}=g;return u?(0,n.FD)(Vn,{useFlex:!0,children:[(0,n.FD)(Hn,{useFlex:!0,isShorterCreatorHeader:p,children:[(0,n.FD)(Hn,{useFlex:!0,alignBaseline:p,isShorterCreatorHeader:p,children:[(0,n.Y)(to,{verified:h,private:s,"data-e2e":"user-title",children:a}),h&&(0,n.Y)($i.A,{width:p?14:20,height:p?14:20,"data-e2e":"user-bluev"}),s&&(0,n.Y)(_o.BbK,{size:p?"14px":"20px"})]}),!(p&&t)&&(0,n.Y)(ke.Qs,{isShorterCreatorHeader:p,"data-e2e":"user-subtitle",children:l}),!(p&&t)&&f&&m&&(0,n.Y)(eo,{isShorterCreatorHeader:p,children:m})]}),p&&t&&(0,n.FD)(Hn,{useFlex:!0,isShorterCreatorHeader:p,children:[(0,n.Y)(ke.Qs,{isShorterCreatorHeader:p,"data-e2e":"user-subtitle",children:l}),f&&m&&(0,n.Y)(eo,{isShorterCreatorHeader:p,children:m})]}),(0,n.Y)(vo.w,{style:{marginTop:"8px"},stateControlledMedia:r,labelType:0,isUserPage:!0})]}):(0,n.FD)(Vn,{children:[(0,n.FD)(Hn,{children:[(0,n.FD)(to,{verified:h,private:s,"data-e2e":"user-title",children:[a," ",h&&(0,n.Y)($i.A,{width:20,height:20,"data-e2e":"user-bluev"})," ",s&&(0,n.Y)(fo.A,{width:20,height:20})]}),(0,n.FD)(ke.Qs,{"data-e2e":"user-subtitle",children:[l,f&&m&&(0,n.Y)(eo,{children:m})]})]}),(0,n.Y)(vo.w,{style:{marginTop:"8px"},stateControlledMedia:r,labelType:0,isUserPage:!0})]})}));var xo=i(67982);const Co=(0,r.memo)((function({user:e}){var t;const i=(0,T.s)(),{user:o}=null!==(t=(0,P.W)((()=>["user"]),[]))&&void 0!==t?t:{},a=(0,r.useRef)(null),{uniqueId:l}=e,s=(0,Tn.K)({query:{enter_method:"click_follow"}}),{handleFollow:d,text:c,isFollowing:u,relation:p}=(0,fe.Tu)({uniqueId:l,onNeedLogin:s}),[h,g]=(0,r.useState)(!1),m=3===p,f=4===p,_=u&&!(null==o?void 0:o.hasIMPermission),v=f||m||_||u;(0,r.useEffect)((()=>{f&&Dn.h.handleBlockShow(!f)}),[f]);const b=(0,r.useCallback)((()=>{g(!0)}),[]),y=(0,r.useCallback)((()=>{g(!1)}),[]),x=(0,r.useCallback)((e=>{f?b():d(e)}),[f,b,d]);return(0,n.FD)(n.FK,{children:[(0,n.Y)(_o.N0Y,{content:i("user_action_unfollow"),visible:!!v&&void 0,placement:"bottom",variant:"secondary",style:{width:"fit-content"},size:"small",children:(0,n.Y)(_o.I05,{shape:"default",ref:a,label:c,variant:v?"secondary":"primary",leadingIcon:v?(0,n.Y)(_o.fUE,{}):void 0,onClick:x,"aria-label":`${c} ${e.nickname}`,"data-e2e":"follow-button"})}),(0,n.Y)(Yn.j,{visible:h,uniqueId:l,onClose:y})]})}));var wo=i(7089),ko=i(53737),Io=i(50970),So=i(71281),To=i(82715);const Yo=(0,r.memo)((function({uid:e}){var t;const i=(0,T.s)(),o=(0,P.W)((()=>["user"]),[]),a=Boolean(null==o?void 0:o.user),{language:s="en"}=null!==(t=(0,P.W)((()=>["language"]),[]))&&void 0!==t?t:{},d=(0,r.useRef)(null),{path:c,target:u}=(0,ln._Y)(s),p=(0,Tn.K)({query:{enter_method:"click_message"}}),g=(e=>{var t;const{pathname:i}=(0,l.zy)(),n=(0,l.W6)(),{language:o,abTestVersion:a}=(0,S.P)(Io.L,{selector:({appContext:e})=>({language:null==e?void 0:e.language,abTestVersion:null==e?void 0:e.abTestVersion}),dependencies:[]}),{path:s,target:d}=(0,ln._Y)(o),c=i.startsWith("/message"),[{businessPermission:u,businessAccountInfoResponse:p},g]=(0,wo.hG)((e=>({businessPermission:e.businessPermission,businessAccountInfoResponse:e.businessAccountInfoResponse})),h.bN),m=(0,ko.VB)((e=>e.messageCount),h.bN),f="v2"===(null!==(t=(0,So.qt)(a,"web_dm_icon_click_check"))&&void 0!==t?t:"v1");(0,r.useEffect)((()=>{g.getBusinessPermissionList()}),[g]),(0,r.useEffect)((()=>{u.comment&&u.message&&g.getBusinessAccountInfoResponse()}),[u,g]);const _=(0,r.useCallback)((t=>{var o;const a=e?`${s}&u=${e}`:s;if(t.preventDefault(),u.message&&(null===(o=p.data)||void 0===o?void 0:o.can_use_bc))p.data.has_bc&&(Be.f.event("webtt_bc_dm_open"),(()=>{var e;const t=i===To.OZ.messages,n=null===(e=p.data)||void 0===e?void 0:e.redirect_url;n&&(t?location.href=n:window.open(n))})());else if("_blank"===d)window.open(a,"_blank");else{if(f&&c)return;n.push(a)}dn.w.handleEnterChatList(m)}),[m,p,u,c,f,d,e]);return _})(e),m=(0,r.useCallback)((e=>{a?g(e):(p(),(0,Le.wo)(e))}),[a,g,p]);return(0,n.Y)(sn.N_,{forceSSR:!1,to:a?`${c}&u=${e}`:"",target:u,onClick:m,style:{textDecoration:"none"},ref:d,children:(0,n.Y)(_o.I05,{label:i("profile_page_message_btn"),variant:"secondary","data-e2e":"message-button"})})}));var Do=i(38145),Po=i(12826);const Fo=(0,r.memo)((function({report:e,isFollowing:t,itemListKey:i,uniqueId:o}){const a=(0,T.s)(),[l,s]=(0,r.useState)(!1),d=(0,r.useRef)(null),c=(0,r.useCallback)((e=>s((t=>null!=e?e:!t))),[]),u=(0,r.useCallback)((e=>{var t;13===e.keyCode||32===e.keyCode?(e.stopPropagation(),e.preventDefault(),c()):27===e.keyCode&&l&&(c(!1),null===(t=d.current)||void 0===t||t.focus())}),[c,l]);return e?(0,n.Y)(Po.E,{itemListKey:i,isFollowing:t,uniqueId:o,report:e,usePopup:!0,popupShowing:l,margin:-5,TuxContainer:({children:e})=>(0,n.Y)(_o.Xwo,{trigger:(0,n.Y)($n.iS,{role:"button",label:"",variant:"secondary",leadingIcon:(0,n.Y)(_o.sLX,{}),onClick:()=>c(),onKeyDown:u,"data-e2e":`${i}-more`,"aria-label":a("creatorCenter_content_actions"),ref:d,tabIndex:0}),placement:"bottom",open:l,children:e}),hideMessage:!0}):null}));var Lo;!function(e){e.VerifyTip="1",e.ProfileUpdateTip="2"}(Lo||(Lo={}));const jo=(0,r.memo)((function({user:e}){var t,i,o;const[a,l]=(0,r.useState)(!1),{uniqueIdModifyTime:s,nickNameModifyTime:d}=e,[c,u]=(0,r.useState)({changeable:!0,nextTimeStr:""}),[p,h]=(0,r.useState)({changeable:!0,nextTimeStr:""}),{language:g}=null!==(t=(0,P.W)((()=>["language"]),[]))&&void 0!==t?t:{},{config:m}=null!==(i=(0,Ye.U)((()=>["config"]),[]))&&void 0!==i?i:{},f=null!==(o=null==m?void 0:m.nickNameControlDay)&&void 0!==o?o:"7",_=null!=g?g:"en",[{newUniqueInfo:v},b]=(0,I.S)(Xe.it),y=(0,De.U)({pathname:(0,Ce.fJR)({uniqueId:v.uniqueId}),search:{}}),x=(0,T.s)(),[C,w]=(0,r.useState)(""),k=(0,Pe.Us)(),S=(0,Se.Nj)(Ee.r);(0,r.useEffect)((()=>{k.appContext&&S.setContext(k.appContext)}),[k.appContext,S]),(0,r.useEffect)((()=>{if(s){const{changeable:e,nextTime:t}=wi(Number(s),30),i=(0,Fe.SV)(Number(t),_,"MMM D, YYYY");u({changeable:e,nextTimeStr:i})}}),[_,s]),(0,r.useEffect)((()=>{if(d){const{changeable:e,nextTime:t}=wi(Number(d),Number(f)),i=(0,Fe.SV)(Number(t),_,"MMM D, YYYY");h((t=>Object.assign(Object.assign({},t),{changeable:e,nextTimeStr:i})))}}),[_,d,f]),(0,r.useEffect)((()=>{!(0,Le._S)(je.vt)&&(Ue.s.handleShowProfileTooltip({enter_from:"personal_homepage"}),(0,Le.AP)(je.vt,"1"))}),[]),(0,r.useEffect)((()=>{const e=(0,Le.Hd)(je.Iw);e&&(w(e),l(!0),(0,Le.X)(je.Iw))}),[]);const Y=(0,r.useCallback)((()=>{Ue.s.handleClickEditProfile({enter_from:"personal_homepage"}),w("personal_homepage"),l(!0)}),[]),D=(0,r.useCallback)((()=>{l(!1)}),[]),F=(0,r.useCallback)((e=>{(0,Le.J2)(je.BP,e?"1":"2"),b.SetSaveCode(Xe.jp),l(!1),setTimeout((()=>{window.location.href=y}),3e3)}),[y,b]);return(0,n.FD)(n.FK,{children:[(0,n.Y)($n.$7,{label:x("editprofile_editprofile"),leadingIcon:(0,n.Y)(_o.OH6,{}),"data-e2e":"edit-profile-entrance",onClick:Y}),(0,n.Y)(mi,{editProfileFrom:C,uniqueIdChangeInfo:c,nameChangeInfo:p,onUpdated:F,onCloseModal:D,visible:a,user:e,nickNameControlDay:f})]})}));var Eo=i(82535);const Uo=(0,r.memo)((function(){const e=(0,r.useCallback)((()=>{Eo.q.handleEnterSet({enter_method:"top_bar"})}),[]),t=(0,r.useCallback)((t=>{13===t.keyCode&&e()}),[e]);return(0,n.Y)(sn.N_,{forceSSR:!1,to:To.OZ.setting,onClick:e,onKeyDown:t,style:{textDecoration:"none"},children:(0,n.Y)($n.iS,{label:"",variant:"secondary",leadingIcon:(0,n.Y)(_o.CKq,{}),onClick:e,onKeyDown:t,"data-e2e":"settings-entrance"})})})),Mo=()=>{const e=(0,T.s)();return(0,r.useEffect)((()=>{Be.f.sendEvent("Promote_entrance_show",{enter_from:"personal_page_profile"})}),[]),(0,n.Y)($n.$7,{variant:"secondary",label:e("Promote_web_entrance_profile"),leadingIcon:(0,n.Y)(_o.xTL,{}),"data-e2e":"promote-post-entrance",onClick:()=>{Be.f.sendEvent("Promote_entrance_click",{enter_from:"personal_page_profile"}),window.location.href="/promote/web/main?enter_from=personal_page_profile"}})};var Bo,Ao;!function(e){e.FOLLOW="follow",e.MESSAGE="message",e.SHARE="share",e.MORE="more",e.EDIT="edit",e.SETTINGS="settings",e.PROMOTE="promote"}(Bo||(Bo={})),function(e){e.TEXT="text",e.ICON="icon",e.TWO_STATE="twoState"}(Ao||(Ao={}));const Oo=["follow","message","share","more"],qo=["edit","promote","settings","share"],Ro=(0,r.memo)((function({buttonList:e,detailInfo:t,report:i}){const{uniqueId:o,secUid:a,id:r,secret:l,profileEmbedPermission:s,isUnderAge18:d,isEmbedBanned:c}=(0,Y.L$)(t.user),u=(0,wn.b3)({uniqueId:o,secUid:a}),p=(0,_e.CE)(o),{isFollowing:h}=(0,fe.Tu)({uniqueId:o}),g=Boolean(l)||3===s||d,m=2===s||c,f=(0,xe.I)(`https://www.tiktok.com${(0,xo.fJ)({uniqueId:o,secUid:a})}`,{sender_device:"pc"});return u&&e.some((e=>!qo.includes(e)))||!u&&e.some((e=>!Oo.includes(e)))?null:(0,n.Y)($n.Dx,{children:e.map((e=>{if(!t.user)return null;switch(e){case"message":return(0,n.Y)(Yo,{uid:r},e);case"share":return(0,n.Y)(Do.A,{embedCode:p,embedType:1,isEmbedBanned:m,isEmbedDisabled:g,uniqueId:o,uid:r,shareUrl:f},e);case"more":return(0,n.Y)(Fo,{report:i,isFollowing:h,uniqueId:o,itemListKey:"user"},e);case"edit":return(0,n.Y)(jo,{user:t.user},e);case"settings":return(0,n.Y)(Uo,{},e);case"promote":return(0,n.Y)(Mo,{},e);case"follow":return(0,n.Y)(Co,{user:t.user},e);default:return null}}))})})),zo=(0,Oe.default)("div",{target:"e7tayh90"})((({isNarrow:e})=>[{display:"flex",flexDirection:"row",maxWidth:e?"min(600px, calc(100vw - 130px))":"min(600px, calc(100vw - 340px))",gap:"8px"}]),"label:DivBioContainer;"),No=(0,Oe.default)("div",{target:"e7tayh91"})((()=>[{flexShrink:"1",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden"}]),"label:DivBioText;"),Wo=(0,Oe.default)("div",{target:"e7tayh92"})((({enabled:e})=>[{flexShrink:"2",fontWeight:"500",cursor:"pointer",userSelect:"none"},!e&&{pointerEvents:"none",opacity:0}]),"label:DivBioMore;"),Ho=(0,Oe.default)("div",{target:"e7tayh93"})({padding:"16px"},"label:DivBioMorePopoverContainer;"),Vo=(0,r.memo)((({text:e,isNarrow:t})=>{const i=(0,T.s)(),o=e.trim().split(/\r?\n/),a=o.length>1,l=a?(e=>{let t=0;for(let i=e.length-1;i>=0&&"."===e[i]&&(t++,!(t>=3));i--);return e+".".repeat(3-t)})(o[0]):o[0],[s,d]=(0,r.useState)(!1),c=(0,r.useRef)(null),u=(0,r.useCallback)((()=>{var e;d(Boolean(a||(null===(e=c.current)||void 0===e?void 0:e.clientWidth)&&c.current.scrollWidth&&c.current.clientWidth(u(),window.addEventListener("resize",u),()=>{window.removeEventListener("resize",u)})),[u]),(0,n.FD)(zo,{isNarrow:t,children:[(0,n.Y)(No,{ref:c,children:l}),(0,n.Y)(_o.Xwo,{placement:"bottom",trigger:(0,n.Y)(Wo,{enabled:s,children:i("pc_web_more_btn")}),children:(0,n.Y)(Ho,{children:(0,n.Y)(ao,{style:{marginBottom:0},isShorterCreatorHeader:!0,children:(0,n.FD)(Jn,{children:[" ",e]})})})})]})}));var $o=i(15189);function Ko(){return(0,n.Y)(w.L0,{hideActions:!0,children:(0,n.FD)(Qn,{children:[(0,n.Y)(Xn,{}),(0,n.FD)(ke.Ov,{children:[(0,n.Y)(ke.TD,{}),(0,n.Y)(ke.pI,{})]})]})})}const Go=(0,r.memo)((function({detailInfo:e}){var t;const i=(0,T.s)(),{user:o,stats:a,statusCode:l}=e,{language:s="en",user:d}=(0,Y.L$)((0,P.W)((()=>["language","user"]),[])),{uniqueId:u,secUid:p,nickname:h,relation:g,privateAccount:m,secret:_}=(0,Y.L$)(o),{isInProductHoldout:v}=(0,c.Vv)(),b=!v,{isShorterCreatorHeader:y,isOneLineBio:x,isHeaderButtonLower:C}=(0,c.A8)(),{isFollowing:I}=(0,fe.Tu)({uniqueId:u}),S=(0,wn.b3)({uniqueId:u,secUid:p}),D=(0,mo.b1)(),F=(0,f.eI)(),[L,E]=(0,r.useState)(!1),[U,M]=(0,r.useState)("others_following"),B=(0,_e.CE)(u),{isRTL:A}=(0,ve.m)(),O=(0,wn.tg)(),q=4===g||5===g||(null!=m?m:_)&&!(S||1===g||2===g),R=null==d?void 0:d.ftcUser,z=Boolean(d),N=!!(null==o?void 0:o.HasPromoteEntry),W=!z||(null==d?void 0:d.hasIMPermission),H=(0,be.CC)(l),V=S?["edit",...N?["promote"]:[],"settings","share"]:["follow",...W?["message"]:[],"share","more"],$=(0,r.useMemo)((()=>{var e;return S?null:{report_type:"user",object_id:null!==(e=null==o?void 0:o.id)&&void 0!==e?e:"",owner_id:null==o?void 0:o.id,secUid:p,nickname:h,lang:s}}),[s,S,null==o?void 0:o.id,p,h]),K=(0,r.useMemo)((()=>"undefined"!=typeof window&&window.innerWidth<=768?150:212),[]);(0,r.useEffect)((()=>{E(!1)}),[u]),(0,r.useEffect)((()=>{a&&!a.needFix||!u||F.getUserDetail({uniqueId:u,secUid:p,language:s})}),[F,a,u,p,s]),(0,r.useEffect)((()=>{void 0===(null==o?void 0:o.uniqueIdModifyTime)&&u&&F.getUserDetail({uniqueId:u,secUid:p,language:s})}),[F,u,p,s,null==o?void 0:o.uniqueIdModifyTime]);const G=(0,r.useCallback)((e=>t=>{var i;z?(t.preventDefault(),q||(xn(e?"others_following":"others_follower",null!==(i=null==o?void 0:o.id)&&void 0!==i?i:""),M(e?"others_following":"others_follower"),E(!0))):D.openModal({query:{enter_method:e?"click_following":"click_followers"}})}),[z,D,q,null==o?void 0:o.id]),Z=(0,r.useCallback)((()=>{E(!1)}),[]),{handleOpenModal:J,PersonalizedModal:Q}=(0,ye.D0)({isFeed:!0}),{handleOpenModal:X,SuggestedAccountPersonalizeModal:ee}=(({onOpenPersonalizedModal:e})=>{const t=(0,T.s)(),{colors:i}=(0,k.u)(),o=(0,fn.eb)({closeOnBackdropClick:!0,closeOnEsc:!0,onCloseComplete:e=>{e&&_n.$.handleCloseManageFeedsHalfSheet()}}),a=(0,r.useCallback)((()=>{o.open(),_n.$.handleShowManageFeedsHalfSheet()}),[o]),l=(0,r.useCallback)((()=>{o.close("closeButton")}),[o]);return{SuggestedAccountPersonalizeModal:(0,n.Y)(Ti.t,{isMobile:!1,componentName:"suggested-account-personalize-modal",children:(0,n.FD)(fn.nO,Object.assign(Object.assign({width:"Compact",height:"Compact"},o),{closeOnBackdropClick:!0,closeOnEsc:!0,children:[(0,n.FD)(ro,{role:"dialog","data-e2e":"follow-info-popup",children:[(0,n.FD)(lo,{children:[(0,n.Y)(so,{children:t("sug_accounts")}),(0,n.Y)(co,{"aria-label":t("Close_button"),role:"button",tabIndex:0,onClick:l,children:(0,n.Y)(Yi.g,{size:32,color:i.TextSecondary})})]}),(()=>{const a=t("nonpersonalizedFeeds_profile_suggestedAccounts_info_body",{},"When personalized feeds are turned on, accounts are suggested based on people you may know, including connections of people you follow. You can change what’s suggested to you in %1$s. \n\nYour account may also be suggested to people you may know. Change your discoverability anytime in your %2$s settings."),r=a.indexOf("%1$s"),l=a.indexOf("%2$s"),s=a.substring(0,r),d=a.substring(r+4,l),c=a.substring(l+4)+" ";return(0,n.FD)(uo,{children:[s,(()=>{const i=t("nonpersonalizedFeeds_profile_suggestedAccounts_info_bodyManagePersonFeedsVariable",{},"Manage personalized feed");return(0,n.Y)(ho,{onClick:()=>{e(),_n.$.handleClickInManageFeedsHalfSheet(),o.close()},children:i})})(),d,(()=>{const e=t("nonpersonalizedFeeds_profile_suggestedAccounts_info_bodyPrivacyVariable",{},"Privacy");return(0,n.Y)(go,{to:"/setting",style:{color:i.Primary},onClick:()=>{_n.$.handleClickInManageFeedsHalfSheet()},children:e})})(),c,(0,n.Y)("a",{href:"https://support.tiktok.com/en/account-and-privacy/account-privacy-settings/suggested-accounts",target:"_blank",rel:"noreferrer",style:{color:i.Primary},onClick:()=>{_n.$.handleClickInManageFeedsHalfSheet()},children:t("nonpersonalizedFeeds_modal_allScenarios_body_learnMore_articleLink",{},"Learn more")})]})})()]}),(0,n.Y)(po,{children:(0,n.Y)(j.y,{buttonTheme:"primary",size:"medium",onClick:l,children:t("nonpersonalizedFeeds_turnOn_modal_toggle_CTA")})})]}))}),handleOpenModal:a,handleCloseModal:l}})({onOpenPersonalizedModal:J}),[te,ie]=(0,r.useState)(!1),ne=(0,r.useCallback)((()=>{ie(window.innerWidth<=768)}),[ie]);(0,r.useEffect)((()=>{if(y)return ne(),window.addEventListener("resize",ne),()=>{window.removeEventListener("resize",ne)}}),[ne,y]);const oe=(0,n.FD)(Kn,{hasNewHeader:b,children:[(0,n.FD)(Gn,{showPointerCursor:!q,onClick:G(!0),children:[(0,n.Y)("strong",{title:i("Following"),"data-e2e":"following-count",children:a?(0,Y.D1)(a.followingCount):"--"}),(0,n.Y)(Zn,{"data-e2e":"following",allowTextUnderline:!q,children:i("Following")})]}),(0,n.FD)(Gn,{showPointerCursor:!q,onClick:G(!1),children:[(0,n.Y)("strong",{title:i("Followers"),"data-e2e":"followers-count",children:a?(0,Y.D1)(a.followerCount):"--"}),(0,n.Y)(Zn,{"data-e2e":"followers",allowTextUnderline:!q,children:i("Followers")})]}),(0,n.FD)(Gn,{children:[(0,n.Y)("strong",{title:i("Likes"),"data-e2e":"likes-count",children:a?(0,Y.D1)(Number(a.heart)||a.heartCount):"--"}),(0,n.Y)(Zn,{"data-e2e":"likes",children:i("Likes")})]})]});if(H)return(0,n.FD)(no,{children:[(0,n.Y)($o.E,{size:96}),(0,n.FD)(oo,{isHeaderButtonLower:C,children:[(0,n.Y)(yo,{detailInfo:Object.assign(Object.assign({},e),{user:Object.assign(Object.assign({},o),{uniqueId:null!==(t=null==O?void 0:O.uniqueId)&&void 0!==t?t:""})}),isNarrow:te}),(0,n.Y)(ao,{isShorterCreatorHeader:!0,isHeaderButtonLower:C,children:oe})]})]});if(!o)return(0,n.Y)(Ko,{});const{signature:ae,isUnderAge18:re,id:le,isEmbedBanned:se=!1,profileEmbedPermission:de,eventList:ce}=(0,Y.L$)(o),ue=ae||i("No bio yet."),pe=(0,xe.I)(`https://www.tiktok.com${(0,Ce.fJR)({uniqueId:u,secUid:p})}`,{sender_device:"pc"}),he=Boolean(_)||3===de||re,ge=2===de||se,me=(null==ce?void 0:ce.length)?ce.map((e=>({eventId:e.id,eventStartTime:Number(e.start_time),authorId:le}))):void 0;return y?(0,n.FD)(no,{embedType:1,embedCode:B,hideActions:!0,isProfile:S,isFollowing:I,isEmbedDisabled:he,isEmbedBanned:ge,uniqueId:u,itemListKey:"user",report:$,shareUrl:pe,uid:le,children:[(0,n.Y)(Ie.H,{user:o,isFTC:R,e2eTag:"user-avatar",size:te?160:180,quality:"Larger"}),(0,n.FD)(oo,{isHeaderButtonLower:C,children:[(0,n.Y)(yo,{detailInfo:e,isNarrow:te}),!C&&(0,n.Y)(Ro,{buttonList:V,detailInfo:e,report:$}),(0,n.FD)(ao,{isShorterCreatorHeader:!0,isHeaderButtonLower:C,children:[oe,(0,n.Y)(Jn,{"data-e2e":"user-bio",children:x?(0,n.Y)(Vo,{text:ue,isNarrow:te}):ue}),(0,n.Y)(zn,{user:o}),me?(0,n.Y)(io,{children:(0,n.Y)(we._,{displayMultiEvents:!0,eventList:me})}):null]}),C&&(0,n.Y)(Ro,{buttonList:V,detailInfo:e,report:$})]}),L&&!R&&(0,n.Y)(Cn,{visible:L,onCloseModal:Z,user:o,isProfile:S,stats:a,entranceType:U,onOpenSuggestedAccountPersonalizeModal:X}),ee,Q]}):b?(0,n.FD)(no,{embedType:1,embedCode:B,hideActions:!0,isProfile:S,isFollowing:I,isEmbedDisabled:he,isEmbedBanned:ge,uniqueId:u,itemListKey:"user",report:$,shareUrl:pe,uid:le,children:[(0,n.Y)(Ie.H,{user:o,isFTC:R,e2eTag:"user-avatar",size:K,quality:"Larger"}),(0,n.FD)(oo,{children:[(0,n.Y)(yo,{detailInfo:e}),(0,n.Y)(Ro,{buttonList:V,detailInfo:e,report:$}),(0,n.FD)(ao,{children:[oe,(0,n.Y)(Jn,{"data-e2e":"user-bio",children:ue}),(0,n.Y)(zn,{user:o}),me?(0,n.Y)(io,{children:(0,n.Y)(we._,{displayMultiEvents:!0,eventList:me})}):null]})]}),L&&!R&&(0,n.Y)(Cn,{visible:L,onCloseModal:Z,user:o,isProfile:S,stats:a,entranceType:U,onOpenSuggestedAccountPersonalizeModal:X}),ee,Q]}):(0,n.FD)(w.L0,{embedType:1,embedCode:B,hideActions:S,isProfile:S,isFollowing:I,isEmbedDisabled:he,isEmbedBanned:ge,uniqueId:u,itemListKey:"user",report:$,shareUrl:pe,uid:le,style:{maxWidth:"624px",paddingRight:A?0:"92px",paddingLeft:A?"92px":0,minHeight:"140px",display:"flex",flexDirection:"column"},children:[(0,n.FD)(ke.b_,{children:[(0,n.Y)(Ie.H,{user:o,isFTC:R,e2eTag:"user-avatar"}),(0,n.FD)(ke.il,{children:[(0,n.Y)(yo,{detailInfo:e}),!S&&(0,n.Y)(Ln,{user:o}),S&&!R&&(0,n.Y)(Si,{user:o})]})]}),oe,(0,n.Y)(Jn,{"data-e2e":"user-bio",children:ue}),(0,n.Y)(zn,{user:o}),me?(0,n.Y)(io,{children:(0,n.Y)(we._,{displayMultiEvents:!0,eventList:me})}):null,L&&!R&&(0,n.Y)(Cn,{visible:L,onCloseModal:Z,user:o,isProfile:S,stats:a,entranceType:U,onOpenSuggestedAccountPersonalizeModal:X}),ee,Q]})}));var Zo=i(21331),Jo=i(3552),Qo=i(88149),Xo=i(82783),ea=i(24979),ta=i(13969),ia=i(22006),na=i(96754),oa=i(15343),aa=i(6986),ra=i(24154);var la=i(58351),sa=i(99765),da=i(92032),ca=i(10753),ua=i(23594),pa=i(92951),ha=i(79981),ga=i(95481),ma=i(10554),fa=i(94204),_a=i(20103);const va=(0,Oe.default)("div",{target:"ejxl5ua0"})((({theme:e})=>({width:"100%",display:"flex",alignItems:"center",padding:"12px 0",paddingInlineEnd:"24px",boxSizing:"border-box",borderRadius:"8px",cursor:"pointer",userSelect:"none",":hover":{background:e.colors.BGView}})),"label:DivPlaylistCardContainer;"),ba=(0,Oe.default)("p",{target:"ejxl5ua1"})((({theme:e})=>[(0,qe.zy)({theme:e,fontFamily:"TikTokFont",fontWeight:"semiBold",typography:"P2",color:"TextSecondary"}),{minWidth:"36px",justifyContent:"center",marginInlineEnd:"12px",textAlign:"center",alignItems:"center",fontSize:"16px",lineHeight:"20px"}]),"label:PIndex;"),ya=(0,Oe.default)("img",{target:"ejxl5ua2"})({width:"80px",height:"80px",objectFit:"cover",flexShrink:0,borderRadius:"2px"},"label:ImgVideoCover;"),xa=(0,Oe.default)("div",{target:"ejxl5ua3"})({width:"80px",height:"80px",flexShrink:0,display:"flex",justifyContent:"center",alignItems:"center",borderRadius:"2px"},"label:DivCoverContainer;"),Ca=(0,Oe.default)("div",{target:"ejxl5ua4"})({display:"flex",flexDirection:"column",justifyContent:"space-between",marginInlineStart:"20px",flexGrow:1,height:"80px",padding:"10px 0",boxSizing:"border-box"},"label:DivPlaylistInfoContainer;"),wa=(0,Oe.default)("p",{target:"ejxl5ua5"})((({theme:e})=>[(0,qe.zy)({theme:e,fontFamily:"TikTokFont",fontWeight:"bold",typography:"P3",color:"TextPrimary"}),(0,qe.m4)(1),{wordBreak:"break-word",fontSize:"16px",lineHeight:"24px"}]),"label:PTitle;"),ka=(0,Oe.default)("p",{target:"ejxl5ua6"})((({theme:e})=>[(0,qe.zy)({theme:e,fontFamily:"TikTokFont",fontWeight:"normal",typography:"P4",color:"TextTertiaryAlt"}),{fontSize:"14px",lineHeight:"22px"}]),"label:PDesc;"),Ia=(0,Oe.default)("div",{target:"ejxl5ua7"})((({theme:e})=>({width:"36px",height:"28px",display:"flex",justifyContent:"center",alignItems:"center","*":{fill:e.colors.TextSecondary}})),"label:DivIconWrapper;"),Sa=(0,r.memo)((({id:e,index:t})=>{const i=(0,T.s)(),{name:o="",cover:a,videoCount:r}=(0,Y.L$)((0,ue.Se)((t=>t[e]),h.bN)),l=i("playlist_webapp_profileview_playlists_numbervid",{num:r,number:(0,Y.D1)(r)}),s=(0,_a.o0)(o);return(0,n.FD)(va,{children:[(0,n.Y)(ba,{children:t<9?`0${t+1}`:t+1}),a?(0,n.Y)(ya,{src:a}):(0,n.Y)(xa,{children:(0,n.Y)(ma.r,{size:40})}),(0,n.FD)(Ca,{children:[(0,n.FD)(wa,{children:[s,o]}),(0,n.Y)(ka,{children:l})]}),(0,n.Y)(Ia,{children:(0,n.Y)(fa.D,{size:28})})]})})),Ta=(0,Oe.default)("div",{target:"eo04fh20"})((()=>[{width:"100%",display:"flex",flexDirection:"column"}]),"label:DivPlaylistContainer;"),Ya=(0,Oe.default)("p",{target:"eo04fh21"})((({theme:e})=>[(0,qe.zy)({theme:e,fontFamily:"TikTokFont",fontWeight:"semiBold",typography:"P3",color:"TextPrimary"}),{fontSize:"16px",lineHeight:"20px",margin:"24px 0 16px"}]),"label:PPlaylistTitle;"),Da=(0,Oe.default)("div",{target:"eo04fh22"})({width:"100%",height:"94px",overflowX:"visible",position:"relative"},"label:DivListContainer;"),Pa=(0,Oe.default)("div",{target:"eo04fh23"})({width:"100%",height:"94px",overflowX:"auto",overflowY:"hidden",display:"flex",paddingBottom:"6px",position:"relative",scrollbarHeight:"none","::-webkit-scrollbar":{height:0}},"label:DivListInnerContainer;"),Fa=(0,Oe.default)("div",{target:"eo04fh24"})((({theme:{colors:e,direction:t,isDark:i}})=>[{position:"absolute",width:"32px",height:"32px",borderRadius:"32px",display:"flex",justifyContent:"center",alignItems:"center",border:`0.5px solid ${e.LinePrimary}`,top:"50%",transform:`translateY(-50%) rotateZ(${"rtl"===t?"180deg":0})`,background:i?e.BGInput2:e.BGPrimary,cursor:"pointer"},(0,qe.mp)({direction:t,start:"-16px"})]),"label:DivSwitchLeft;"),La="94px",ja=(0,Oe.default)("div",{target:"eo04fh25"})((({theme:{colors:e,direction:t}})=>[{background:"rtl"===t?`linear-gradient(0.25turn, ${e.BGPrimary}, 50%, rgba(255,0,0,0))`:`linear-gradient(0.25turn, rgba(255,0,0,0), 50%, ${e.BGPrimary})`,position:"absolute",width:"86px",height:`${La}`,transform:"translateY(-100%)",pointerEvents:"none"},(0,qe.mp)({direction:t,end:"0px"})]),"label:DivStyledShadow;"),Ea=(0,Oe.default)(Fa,{target:"eo04fh26"})((({theme:{direction:e}})=>(0,qe.mp)({direction:e,start:"unset",end:"-16px"})),"label:StyledSwitchRight;"),Ua={width:"calc(33% - 4px)",height:`${La}`},Ma=(0,Oe.default)(Nn.sH,{target:"eo04fh27"})(Object.assign(Object.assign({},Ua),{marginInlineEnd:"16px",flexShrink:0,borderRadius:"4px","@media screen and (max-width: 1072px)":{minWidth:"230px"}}),"label:StyledSkeleton;"),Ba=(0,Oe.default)(sn.N_,{target:"eo04fh28"})((({theme:{isDark:e,colors:t},$hideMarginEnd:i=!1})=>Object.assign(Object.assign({},Ua),{padding:"12px",boxSizing:"border-box",marginInlineEnd:i?0:"16px",display:"flex",alignItems:"center",flexShrink:0,borderRadius:"4px",cursor:"pointer",background:e?t.BGInput2:t.BGView,"@media screen and (max-width: 1072px)":{minWidth:"230px"}})),"label:StyledLink;"),Aa=(0,Oe.default)("div",{target:"eo04fh29"})({width:"100%",height:"100%",display:"flex",alignItems:"center",flexShrink:0,borderRadius:"4px",cursor:"pointer"},"label:DivPlaylistCardContainer;"),Oa=(0,Oe.default)("div",{target:"eo04fh210"})((({theme:{colors:e},needBorder:t})=>({width:"72px",height:"72px",borderRadius:"2px",marginInlineEnd:"12px",display:"flex",justifyContent:"center",alignItems:"center",overflow:"hidden",flexShrink:0,border:t?`1px solid ${e.LineSecondary}`:"none"})),"label:DivPlaylistCardCover;"),qa=(0,Oe.default)("img",{target:"eo04fh211"})({width:"72px",height:"72px",borderRadius:"2px",objectFit:"cover"},"label:ImgCover;"),Ra=(0,Oe.default)("div",{target:"eo04fh212"})({display:"flex",flexDirection:"column",height:"100%",padding:"4px 0",boxSizing:"border-box",justifyContent:"space-between"},"label:DivPlaylistInfoContainer;"),za=(0,Oe.default)("p",{target:"eo04fh213"})((({theme:e})=>[(0,qe.zy)({theme:e,fontFamily:"TikTokFont",fontWeight:"bold",typography:"P3",color:"TextPrimary"}),(0,qe.m4)(1),{wordBreak:"break-word",fontSize:"16px",lineHeight:"24px"}]),"label:PPlaylistName;"),Na=(0,Oe.default)("p",{target:"eo04fh214"})((({theme:e})=>[(0,qe.zy)({theme:e,fontFamily:"TikTokFont",fontWeight:"normal",typography:"P4",color:"TextTertiaryAlt"}),{fontSize:"14px",lineHeight:"22px"}]),"label:PDesc;"),Wa=(0,Oe.default)("div",{target:"eo04fh215"})((({paddingBottom:e="0px",theme:{colors:t}})=>({width:"692px",height:"calc(100vh - 288px)",maxHeight:"736px",display:"flex",flexDirection:"column",alignItems:"center",paddingBottom:e,background:t.BGTertiary,borderRadius:"8px"})),"label:DivModalContainer;"),Ha=(0,Oe.default)("div",{target:"eo04fh216"})((({theme:e})=>[(0,qe.zy)({theme:e,fontFamily:"TikTokFont",fontWeight:"bold",typography:"P0",color:"TextPrimary"}),{display:"flex",justifyContent:"center",alignItems:"center",height:"80px",borderBottom:`0.5px solid ${e.colors.LinePrimary2}`,width:"100%",flexShrink:0}]),"label:DivModalTitle;"),Va=(0,Oe.default)("div",{target:"eo04fh217"})({display:"flex",flexDirection:"column",alignItems:"center",width:"100%",height:"100%",padding:"8px 16px",boxSizing:"border-box",overflowY:"auto"},"label:DivModalContentContainer;"),$a=(0,Oe.default)("div",{target:"es7r6k70"})((({theme:e,translateY:t,showPlaylistCards:i})=>[(0,qe.mp)({direction:e.direction,end:i?"12px":"200px"}),{position:"absolute",display:"flex",alignItems:"center",justifyContent:"flex-end",top:"10px",transform:`translateY(${t})`,zIndex:"0"}]),"label:DivPlaylistManageContainer;"),Ka=(0,Oe.default)("div",{target:"es7r6k71"})((({theme:e})=>[(0,qe.zy)({theme:e,fontFamily:"TikTokFont",fontWeight:"semiBold",typography:"P3",color:"TextSecondary"}),{display:"flex",alignItems:"center",marginInlineStart:"16px",cursor:"pointer",fontSize:"16px",lineHeight:"24px"}]),"label:DivManageItem;"),Ga=(0,Oe.default)(Ka,{target:"es7r6k72"})((({theme:e})=>({color:e.colors.Primary})),"label:StyledDivManageItem;"),Za=(0,Oe.default)("div",{target:"es7r6k73"})({width:"20px",height:"20px",marginInlineEnd:"2px",display:"flex",justifyContent:"center",alignItems:"center"},"label:DivPlusContainer;"),Ja=(0,Oe.default)(Za,{target:"es7r6k74"})({transform:"rotateZ(90deg)",marginInlineEnd:"unset",marginTop:"2px"},"label:StyledReorderContainer;");const Qa=(0,r.memo)((({showPlaylistCards:e=!1})=>{const t=(0,T.s)(),{isDark:i}=(0,k.u)(),[{playlist:o,changeOrderLoading:a,loading:l},s]=(0,ce.kn)((e=>{var t;return{playlist:null!==(t=e.playList)&&void 0!==t?t:[],changeOrderLoading:e.changeOrderLoading,loading:e.loading}}),h.bN),d=(0,pe.M_)(),[c,u]=(0,r.useState)(!1),[p,g]=(0,r.useState)(o);(0,r.useEffect)((()=>{g(o)}),[o,c]);const[m,f]=(0,r.useState)(-1),_=(0,r.useCallback)((()=>{u(!1)}),[]),v=(0,r.useCallback)((()=>{d.setProfileState("create_playlist"),L.c.handleCreatePlaylist()}),[d]),b=(0,r.useCallback)((()=>{u(!0),L.c.handleClickChangePlaylistOrder()}),[]),y=(0,r.useCallback)((()=>{return e=void 0,i=void 0,o=function*(){m<=0||0!==(yield s.changePlaylistOrder({playlist:p,endIndex:m,successCallback:_}))&&ne.F.open({content:t("playlist_webapp_toast_error_tryagain"),duration:3,widthType:"half"})},new((n=void 0)||(n=Promise))((function(t,a){function r(e){try{s(o.next(e))}catch(e){a(e)}}function l(e){try{s(o.throw(e))}catch(e){a(e)}}function s(e){var i;e.done?t(e.value):(i=e.value,i instanceof n?i:new n((function(e){e(i)}))).then(r,l)}s((o=o.apply(e,i||[])).next())}));var e,i,n,o}),[s,m,_,p,t]),x=(0,r.useCallback)((e=>{if(!e.destination)return;const t=(0,q.Y)(p,e.source.index,e.destination.index);g(t),f(Math.max(m,e.source.index,e.destination.index))}),[m,p]),C=(0,r.useCallback)((({id:e,index:t})=>(0,n.Y)(Sa,{id:e,index:t},e)),[]),w=e&&o.length>0?"64px":"0px";return 0===o.length&&l?null:(0,n.FD)($a,{translateY:w,showPlaylistCards:e,children:[o.length>=2&&(0,n.FD)(Ka,{onClick:b,children:[(0,n.Y)(Ja,{children:(0,n.Y)(pa.a,{size:16})}),t("playlist_webapp_profileview_btn_changeorder")]}),(0,n.FD)(Ga,{onClick:v,children:[(0,n.Y)(Za,{children:(0,n.Y)(ha.m,{size:16})}),t("playlist_webapp_profile_entry_create")]}),(0,n.Y)(ga.aF,{visible:c,closeStyle:3,onClose:_,zIndex:3e3,children:(0,n.FD)(Wa,{paddingBottom:"92px",children:[(0,n.Y)(Ha,{children:t("playlist_webapp_changeorder_header")}),(0,n.Y)(Va,{children:(0,n.Y)(q.q,{onDragEnd:x,list:p,renderItem:C})}),(0,n.Y)(U.dJ,{onClick:y,children:(0,n.Y)(j.y,{style:E.i9,buttonTheme:"primary",disabled:m<=0,loading:a,loadingFill:i?"#fff":void 0,children:t("playlist_webapp_upload_nameplaylist_btn")})})]})})]})}));var Xa=i(65404),er=i(63849),tr=i(79881);const ir=e=>{var t,i;return null!==(i=null===(t=null==e?void 0:e.current)||void 0===t?void 0:t.scrollLeft)&&void 0!==i?i:0},nr=e=>{var t,i;return null!==(i=null===(t=null==e?void 0:e.current)||void 0===t?void 0:t.clientWidth)&&void 0!==i?i:0},or=(e,t,i)=>{if(i<=0)return;const n=(t-e.scrollLeft)/i*10;setTimeout((function(){e.scrollTo({left:e.scrollLeft+n,behavior:"instant"}),e.scrollLeft!==t&&or(e,t,i-10)}),10)};var ar=i(89435);const rr=(0,r.memo)((0,r.forwardRef)((({id:e,onClickPlaylistCard:t,hideMarginEnd:i},o)=>{const a=(0,T.s)(),{name:l="",cover:s="",videoCount:d=0,creator:c}=(0,Y.L$)((0,ue.Se)((t=>t[e]),h.bN)),u=a("playlist_webapp_profileview_playlists_numbervid",{num:d,number:(0,Y.D1)(d)}),{uniqueId:p}=(0,Y.L$)(c),g=(0,r.useMemo)((()=>p&&e?To.$T.videoPlaylist({uniqueId:p,content:l,id:e}):""),[p,l,e]),m=(0,r.useCallback)((e=>e.preventDefault()),[]),f=(0,_a.o0)(l);return(0,n.Y)(Ba,{forceSSR:!1,to:g,onClick:m,style:{textDecoration:"none"},ref:o,$hideMarginEnd:i,children:(0,n.FD)(Aa,{onClick:t({id:e,name:l,uniqueId:p}),children:[(0,n.Y)(Oa,{needBorder:!s,children:s?(0,n.Y)(qa,{src:s}):(0,n.Y)(ar.y,{size:28,color:"TextQuaternary"})}),(0,n.FD)(Ra,{children:[(0,n.FD)(za,{children:[f,l]}),(0,n.Y)(Na,{children:u})]})]},e)})}))),lr=(0,r.memo)((()=>(0,n.FD)(n.FK,{children:[(0,n.Y)(Ma,{}),(0,n.Y)(Ma,{}),(0,n.Y)(Ma,{}),(0,n.Y)(Ma,{}),(0,n.Y)(Ma,{})]}))),sr=(0,r.memo)((({isSelf:e,relation:t})=>{const i=(0,T.s)(),o=(0,l.W6)(),{playlist:a=[],loading:s}=(0,ce.aD)((e=>({playlist:e.playList,loading:e.loading})),h.bN),[d,c]=(0,r.useState)(""),[g,m]=(0,r.useState)(""),{language:_="en"}=(0,Y.L$)((0,P.W)((()=>["language"]),[])),{rootRef:v}=(({mixId:e})=>{const[t,i]=(0,I.S)(D.O,{selector:t=>{var i;return null!==(i=t[e])&&void 0!==i?i:{}},dependencies:[e]}),n=(0,er.V6)(),{loading:o=!1,hasMore:a=!0}=(0,Y.L$)(t),{language:l}=(0,Y.L$)((0,P.W)((()=>["language"]),[])),s=(0,r.useCallback)((()=>{!o&&a&&e&&(n.fetchPlaylistItemList({mixId:e}),i.getPlaylistVideoList({mixId:e,language:l,isPlayList:!0}))}),[a,i,l,o,e,n]);(0,tr.Wj)(e,s);const d=(0,r.useRef)(null);return(0,gn.O9)({onHitBottom:s,elemRef:d}),{rootRef:d}})({mixId:d}),[b,y]=(0,I.S)(D.O,{selector:e=>{var t;return null!==(t=e[d])&&void 0!==t?t:{}},dependencies:[d]}),x=(0,er.V6)(),{videoCount:C}=(0,Y.L$)((0,ue.Se)((e=>e[d]),h.bN)),{loading:w=!1,hasMore:k=!0,list:S=[]}=(0,Y.L$)(b),[F,j]=(0,r.useState)(!1),E=(0,r.useCallback)((({id:t,name:i,uniqueId:n})=>()=>{if(L.c.handleClickPlaylistEntrance({playlist_id:t}),e){const e=t&&n&&i?To.$T.videoPlaylist({id:t,uniqueId:n,content:i}):"";e&&o.push(e)}else j(!0),c(t),m(i)}),[o,e]),U=(0,r.useCallback)((()=>{j(!1)}),[]),{showBrowserMode:M,isBrowserModeShowing:B}=(0,r.useContext)(p.g),[A,{setItemListKey:O}]=(0,u.BI)((e=>e.itemListKey)),q=(0,r.useRef)(A);(0,r.useEffect)((()=>{!q.current&&A&&(q.current=A)}),[A]),(0,r.useEffect)((()=>{B||O(q.current)}),[B,O]);const z=(0,r.useMemo)((()=>({playlist_id:d,popup_type:"playlist"})),[d]),N=(0,r.useCallback)((e=>()=>{O(d),M({index:e,id:d,teaParams:z,playProgress:0,reportTeaParams:z})}),[d,O,M,z]),W=(0,r.useMemo)((()=>B?{display:"none"}:void 0),[B]),{listCardRef:H,listRef:V,showSwitchLeft:$,hideSwitchRight:K,handleClickSwitchLeft:G,handleClickSwitchRight:Z,handleScroll:J}=(()=>{const e=(0,r.useRef)(null),t=(0,r.useRef)(null),{isRTL:i}=(0,ve.m)(),[{playlist:n,hasMore:o},a]=(0,ce.kn)((e=>{var t;return{playlist:null!==(t=e.playList)&&void 0!==t?t:[],hasMore:e.hasMore}}),h.bN),l=n.length,[s,d]=(0,r.useState)(!1),[c,u]=(0,r.useState)(!1),p=nr(e),g=e=>(p+16)*e,m=g(3),_=i?-1*m:m,{secUid:v="",uniqueId:b=""}=(0,pe.R0)((e=>({secUid:e.secUid,uniqueId:e.uniqueId})),h.bN),{id:y}=(0,Y.L$)((0,f.nW)((e=>{var t;return null===(t=e.users)||void 0===t?void 0:t[b]}),h.bN)),x=(0,r.useCallback)((n=>{if((0,Le.Gu)(n),!t.current||!e.current)return;const o=ir(t),a=i?Math.min(o-_,0):Math.max(o-_,0);or(t.current,a,200)}),[i,_]),C=(0,r.useCallback)((i=>{if((0,Le.Gu)(i),!t.current||!e.current)return;const n=ir(t);or(t.current,n+_,200)}),[_]),w=l*p+16*(l-1),k=(0,ci.d7)((()=>{Be.f.sendEvent("scroll_playlist")}),[],400),I=(0,ci._g)((()=>{var e;if(!t.current)return;const i=Math.abs(ir(t)),n=(null===(e=null==t?void 0:t.current)||void 0===e?void 0:e.scrollWidth)-i-nr(t);w-i<=g(4)&&a.getVideoPlaylistData({secUid:v,uid:y}),u(!o&&n<5),d(0!==i),k()}),[l,p,k],200);return{listRef:t,listCardRef:e,showSwitchLeft:s,hideSwitchRight:c,handleClickSwitchLeft:x,handleClickSwitchRight:C,handleScroll:I}})();return(0,r.useEffect)((()=>{!w&&0===S.length&&k&&d&&(x.fetchPlaylistItemList({mixId:d}),y.getPlaylistVideoList({mixId:d,language:_}))}),[k,y,_,S.length,d,w,t,x]),(0,n.FD)(Ta,{children:[(s||a.length>0)&&(0,n.FD)(n.FK,{children:[(0,n.Y)(Ya,{children:i("playlist_webapp_profileview_playlists")}),(0,n.FD)(Da,{children:[(0,n.FD)(Pa,{ref:V,onScroll:J,children:[a.map(((e,t)=>(0,n.Y)(rr,{id:e,onClickPlaylistCard:E,ref:0===t?H:void 0,hideMarginEnd:t===a.length-1},e))),s&&(0,n.Y)(lr,{})]}),$&&(0,n.Y)(Fa,{onClick:G,children:(0,n.Y)(Xa.p,{size:16})}),a.length>3&&!K&&(0,n.FD)(n.FK,{children:[(0,n.Y)(ja,{}),(0,n.Y)(Ea,{onClick:Z,children:(0,n.Y)(an.a,{size:16})})]})]}),(0,n.Y)(Ya,{children:i("Videos")})]}),(0,n.Y)(ga.aF,{visible:F,containerStyle:W,maskCloseable:!0,onClose:U,zIndex:3e3,closeStyle:3,children:(0,n.FD)(Wa,{children:[(0,n.FD)(Ha,{children:[g," (",C,")"]}),(0,n.FD)(Va,{ref:v,children:[S.map(((e,t)=>(0,n.Y)(R.$E,{id:e,index:t,onClickVideoItem:N(t),extraTeaParams:z},e))),w&&(0,n.Y)(mn.R,{size:48})]})]})})]})})),dr=(0,i(47236).Ay)({resolved:{},chunkName:()=>"favorites",isReady(e){const t=this.resolve(e);return!0===this.resolved[t]&&!i.m[t]},importAsync:()=>Promise.all([i.e(9443),i.e(4062)]).then(i.bind(i,57379)),requireAsync(e){const t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then((e=>(this.resolved[t]=!0,e)))},requireSync(e){const t=this.resolve(e);return i(t)},resolve:()=>57379}),cr=(0,Oe.default)("div",{target:"e1jjp0pq0"})((()=>[{position:"relative",top:"0px",zIndex:"0",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"start",width:"100%",height:"44px"},(0,qe.jJ)({max:Wn.f.Small,style:{justifyContent:"space-evenly"}})]),"label:DivVideoFeedTab;"),ur=({theme:e,theme:{colors:t},active:i})=>{let n="#73747b";return i?n=t.Primary2:e.isDark&&(n=t.TextTertiary),[(0,qe.zy)({theme:e,fontFamily:"TikTokDisplayFont",fontWeight:"semiBold",typography:"P1"}),{position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,height:"44px",padding:"0 32px",cursor:"pointer",textAlign:"center",color:n,gap:"4px","& > svg":{height:"20px",width:"20px"}}]},pr=(0,Oe.default)("p",{target:"e1jjp0pq1"})(ur,"label:PPost;"),hr=(0,Oe.default)("p",{target:"e1jjp0pq2"})(ur,"label:PRepost;"),gr=(0,Oe.default)("p",{target:"e1jjp0pq3"})(ur,"label:PFavorite;"),mr=(0,Oe.default)("p",{target:"e1jjp0pq4"})(ur,"label:PLike;"),fr=(0,Oe.default)("span",{target:"e1jjp0pq5"})((({theme:{direction:e}})=>(0,qe.mp)({direction:e,marginStart:6})),"label:SpanLiked;"),_r=(0,Oe.default)("div",{target:"e1jjp0pq6"})((({theme:{colors:e}})=>[{position:"absolute",height:"2px",background:e.TextPrimary,bottom:"0",transition:"transform .3s",insetInlineStart:0}]),"label:DivBottomLine;"),vr={padding:"2px",marginTop:"2px",marginBottom:"8px"},br=(0,Oe.default)("div",{target:"e1jjp0pq7"})((({theme:{colors:e},hasPlaylist:t,backgroundColor:i=e.BGPrimary})=>[{position:"relative",display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%",minHeight:"46px",marginBottom:t?void 0:"24px",backgroundColor:i,"::after":{position:"absolute",bottom:0,left:0,content:'""',width:"100%",height:"1px",backgroundColor:e.ShadowPrimary,transform:"scaleY(50%)"}},(0,qe.jJ)({max:Wn.f.Small,style:{flexDirection:"column",gap:"1rem",justifyContent:"center"}})]),"label:DivFeedTabWrapper;");var yr=i(15277);const xr=(0,r.memo)((function({detailInfo:e}){var t;const i=(0,T.s)(),{isRTL:o}=(0,ve.m)(),{isRepostTabEnabled:a}=(0,c.hn)(),{isCollectionEnabled:s}=(0,c.Ge)(),{isInNavPhase3:d}=(0,c.Oj)(),{isPostSortRightThreeOptionsEnabled:p}=(0,c.s0)(),[{hasRepostVideo:g,hasMoreRepostVideo:m},f]=(0,la.zu)((e=>({hasMoreRepostVideo:e.hasMore,hasRepostVideo:e.list.length>0})),h.bN),v=(0,na.x6)((e=>{var t,i;return(null!==(i=null===(t=e.collectionList)||void 0===t?void 0:t.length)&&void 0!==i?i:0)>0})),{user:b,statusCode:y}=(0,Y.L$)(e),{relation:x,secUid:C="",openFavorite:k,profileTab:I,canExpPlaylist:S=!1,privateAccount:D=!1}=(0,Y.L$)(b),{uniqueId:P}=(0,l.g)(),{showPlayListTab:F=!1}=(0,Y.L$)(I),L=(0,wn.b3)({secUid:C,uniqueId:P}),{state:{isJumpToFavorite:j=!1}={}}=(0,l.zy)(),[E,U]=(0,_.eW)(),M=(0,r.useRef)(null),B=(0,r.useRef)(null),A=(0,r.useRef)(null),O=(0,r.useRef)(null),q=(0,r.useRef)(P),R=(0,r.useRef)(j),[z,N]=(0,r.useState)({left:0,width:0}),W=(0,sa.cI)(),H=(0,Se.Nj)(oa.AU),V=(0,da.Ag)(),[{selectedTab:$},K]=(0,pe.dF)((e=>({selectedTab:e.selectedTab})),h.bN),G=(0,r.useMemo)((()=>({"user-post":M,"user-repost":B,favorites:A,"user-liked":O})),[]),[Z,J]=(0,r.useState)(0),Q={author_id:Number(null!==(t=null==b?void 0:b.id)&&void 0!==t?t:0),page_name:L?"personal_homepage":"others_homepage",sort_option:"latest"},X=(0,be.CC)(y);(0,r.useEffect)((()=>{J(0)}),[C]),(0,r.useEffect)((()=>{Z<1&&C&&a&&!g&&m&&!X&&(J((e=>e+1)),f.getItemList({secUid:C}))}),[C,Z,a,g,m,X]);const ee=(0,r.useCallback)((()=>{var e,t;K.setSelectedTab("user-post"),N({left:0,width:null!==(t=null===(e=M.current)||void 0===e?void 0:e.offsetWidth)&&void 0!==t?t:0}),W.setLoading(!1)}),[K,W]);(0,r.useEffect)((()=>{q.current!==P&&(q.current=P,ee())}),[K,W,P]),(0,ua.X)(ee,[ee]);const te=(0,u.YZ)();(0,r.useEffect)((()=>{te.setItemListKey($)}),[te,$]),(0,r.useEffect)((()=>{var e,t;N({left:0,width:null!==(t=null===(e=M.current)||void 0===e?void 0:e.offsetWidth)&&void 0!==t?t:0})}),[]);const ie=(0,r.useCallback)((e=>{const{offsetWidth:t}=(0,Y.L$)(e.parentNode),{offsetLeft:i,offsetWidth:n}=e;return o?i+n-t:i}),[o]),ne=(0,r.useCallback)((e=>t=>{if($===e)return;"favorites"!==e||R.current||aa.W.handleEnterFavourite("click_favourite_tab"),"user-liked"===e&&ra.z.handleEnterLike("click_like_tab"),V.setLoading($,!1),te.setItemListKey(e);const i=t.currentTarget,n=ie(i),o=i.offsetWidth;N({left:n,width:o}),K.setSelectedTab(e),H.handleUserChangeVideoOrPlayMode()}),[$,V,te,ie,K,H]),oe=(0,r.useCallback)((e=>t=>{13!==t.keyCode&&32!==t.keyCode||ne(e)(t)}),[ne]),ae=(0,r.useCallback)((e=>{const t=ie(e.currentTarget),i=e.currentTarget.offsetWidth;N({left:t,width:i})}),[ie]),re=(0,r.useCallback)((()=>{var e,t;const i=G[$].current;if(i){const n=ie(i);N({left:n,width:null!==(t=null===(e=G[$].current)||void 0===e?void 0:e.offsetWidth)&&void 0!==t?t:0})}}),[ie,$,G]),le=(0,r.useCallback)((e=>{var t;U.setUserPostSortType(e),0===e?Q.sort_option="latest":1===e?Q.sort_option="popular":2===e&&(Q.sort_option="oldest"),t=Q,Be.f.sendEvent("click_sort_option",t)}),[Q]);(0,r.useEffect)((()=>{R.current=j}),[j]),(0,r.useEffect)((()=>{if(R.current){ne("favorites")({currentTarget:G.favorites.current}),R.current=!1;const e=Object.assign(Object.assign({},window.history.state),{state:Object.assign(Object.assign({},window.history.state.state),{isJumpToFavorite:!1})});window.history.replaceState(e,document.title)}}),[ne,G,j]);const se=4===x,de=(0,r.useMemo)((()=>!(D&&!L)&&F&&!se&&"user-post"===$),[D,L,F,se,$]),ce=L&&S,ue=a&&g,he=L||s&&v;(0,r.useEffect)((()=>{if(ue||he){const e=G[$].current,t=ie(e),i=e.offsetWidth;N({left:t,width:i})}}),[ue,he,G,$,ie]);const ge=(0,r.useMemo)((()=>X?(0,n.Y)(w.aS,{statusCode:y}):(0,n.FD)(n.FK,{children:["user-post"===$&&(0,n.FD)(n.FK,{children:[ce&&(0,n.Y)(Qa,{showPlaylistCards:de}),de&&(0,n.Y)(sr,{isSelf:L,relation:x})]}),"favorites"===$&&s?(0,n.Y)(dr,{detailInfo:e}):(0,n.Y)(yr.z,{detailInfo:e,listKey:$})]})),[X,$,ce,de,s,e,L,x]);return(0,n.FD)(w.zk,{style:{minWidth:"0"},children:[(0,n.FD)(br,{hasPlaylist:de,backgroundColor:d?_o.Tj4.UIPageFlat1:void 0,children:[(0,n.FD)(cr,{onMouseLeave:re,children:[(0,n.FD)(pr,{"aria-selected":"user-post"===$,role:"tab",active:"user-post"===$,ref:M,"data-e2e":"videos-tab",onMouseEnter:ae,onClickCapture:ne("user-post"),onKeyDown:oe("user-post"),tabIndex:0,children:[s&&(0,n.Y)(Zo.C,{}),(0,n.Y)("span",{children:i("Videos")})]}),(0,n.FD)(hr,{"aria-selected":"user-repost"===$,role:"tab",active:"user-repost"===$,ref:B,"data-e2e":"repost-tab",onMouseEnter:ae,onClickCapture:ne("user-repost"),onKeyDown:oe("user-repost"),tabIndex:0,style:{display:ue?void 0:"none"},children:[s&&(0,n.Y)(Jo.z,{}),(0,n.Y)("span",{children:i("pcWeb_repostTab")})]}),(0,n.Y)(gr,{"aria-selected":"favorites"===$,role:"tab",active:"favorites"===$,onMouseEnter:ae,onClickCapture:ne("favorites"),style:{display:he?void 0:"none"},ref:A,onKeyDown:oe("favorites"),tabIndex:0,children:s?(0,n.FD)(n.FK,{children:[L?(0,n.Y)(Qo.o,{}):(0,n.Y)(Xo.M,{}),(0,n.Y)("span",{children:i("sortbyvv_profile_tab_text_favorites")})]}):(0,n.FD)(n.FK,{children:[(0,n.Y)(ia.A,{}),(0,n.Y)(fr,{children:i("sortbyvv_profile_tab_text_favorites")})]})}),(0,n.Y)(mr,{"aria-selected":"user-liked"===$,role:"tab",active:"user-liked"===$,ref:O,"data-e2e":"liked-tab",onMouseEnter:ae,onClickCapture:ne("user-liked"),onKeyDown:oe("user-liked"),tabIndex:0,children:s?(0,n.FD)(n.FK,{children:[k?(0,n.Y)(ea.K,{}):(0,n.Y)(ta.w,{}),(0,n.Y)("span",{children:i("liked")})]}):(0,n.FD)(n.FK,{children:[!k&&(0,n.Y)(ia.A,{}),(0,n.Y)(fr,{children:i("liked")})]})}),(0,n.Y)(_r,{style:{transform:`translateX(${z.left}px)`,width:z.width}})]}),"user-post"===$&&p&&(0,n.Y)(_o.DUM,{compact:!0,size:"xs",shape:"rectangle",style:vr,value:E,onChange:le,items:[{value:0,title:i("ttep_homepage_nav_header_latest")},{value:1,title:i("nonpersonalizedFeeds_LIVEfeed_navP_menuLink")},...p?[{value:2,title:i("sortVideos_menu_oldest")}]:[]]}),"favorites"===$&&s&&L&&(0,n.Y)(ca.B,{isOnTabBar:!0})]}),ge]})})),Cr=(0,Oe.default)("div",{target:"e1ej9wgb0"})({flex:"1 1 auto",overflow:"hidden"},"label:UserContainer;");var wr=i(81054),kr=i(6990),Ir=i(20024);const Sr=(0,wr.Ay)({resolved:{},chunkName:()=>"user-side-effect",isReady(e){const t=this.resolve(e);return!0===this.resolved[t]&&!i.m[t]},importAsync:()=>i.e(6328).then(i.bind(i,77008)),requireAsync(e){const t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then((e=>(this.resolved[t]=!0,e)))},requireSync(e){const t=this.resolve(e);return i(t)},resolve:()=>77008},Object.assign({},kr.KE)),Tr=[0,10222,209001,209002,209003,209004,209005,209006],Yr=a()(s.F,(0,C.JP)("user-post"),(0,d.c)("others_homepage"))((function({containerID:e,tabIndex:t}){var i;const{enableSideNavPreloadAndCache:o}=(0,c.oJ)(),a=(0,u.JD)((e=>e.jumpSamePageTime)),{justWatchedVideoId:s,justWatchedAuthorUniqueId:d}=(0,wn.xr)(),{isBrowserModeShowing:k}=(0,r.useContext)(p.g),{browserList:I}=(0,g.Vg)(),{uniqueId:S}=(0,m.Gr)(),T=(0,y.N)(),{uniqueId:Y}=(0,l.g)(),D=Y.toLowerCase(),P=(0,wn.b3)({uniqueId:D,secUid:Y}),F=(0,r.useMemo)((()=>P?"personal_homepage":"others_homepage"),[P]);(0,x.xw)(F,a);const{user:L}=null!==(i=(0,b.x)())&&void 0!==i?i:{},[{uniqueId:j,statusCode:E=0,profileState:U},M]=(0,pe.dF)((e=>{var t;return{uniqueId:e.uniqueId,statusCode:null!==(t=e.statusCode)&&void 0!==t?t:0,profileState:e.profileState}}),h.bN),B=(0,f.nW)((e=>{var t;const i=e.users[null!=j?j:""],n=e.stats[null!=j?j:""];return"number"==typeof(null===(t=null==i?void 0:i.extraInfo)||void 0===t?void 0:t.statusCode)&&n?{statusCode:E,user:i,stats:n}:{statusCode:E}}),h.bN),A=(0,wn.tg)();(0,wn.Nj)(),(0,r.useEffect)((()=>{(!o||!P||!S||0===I.length)&&M.resetUserPage()}),[o,P,S,I.length,M]),(0,v.o)((()=>M.getUserInfo(Object.assign(Object.assign(Object.assign({},A),s&&d===(null==A?void 0:A.uniqueId)&&{locateItemID:s}),{needAudienceControl:(null==L?void 0:L.uniqueId)!==(null==A?void 0:A.uniqueId)}))),[M,A]);const O=(0,_.I4)((e=>e.items),h.bN);return Ir.Rg("item-cover-use-stable-url-hook",{items:O}),Ir.Rg("user-page-crawling-limitation-strategy-5",{userStats:null==B?void 0:B.stats,itemList:O}),"create_playlist"===U||"create_playlist_ready"===U?(0,n.Y)(ge,{}):(0,n.Y)(n.FK,{children:(0,n.FD)(Cr,{style:{height:k?"100vh":void 0},children:[(0,n.Y)(Sr,{userData:B}),(0,n.Y)(w.EA,{"data-e2e":"user-page",id:e,tabIndex:t,disableResponsiveV2:!0,isGepHidden:!T,children:(0,n.Y)(C.cM,{id:null!=j?j:"",detailInfo:B,successStatusCodeList:Tr,List:xr,Header:Go,Error:me.yo})})]})})})),Dr=Yr},15277:(e,t,i)=>{i.d(t,{z:()=>ge});var n=i(2787),o=i(40099),a=i(88920),r=i(60484),l=i(48615),s=i(79881),d=i(12055),c=i(61595),u=i(54073),p=i(64738);const h=e=>{const[{roomInfo:t},i]=(0,p.useAtom)(c.r),[n]=(0,p.useAtom)(c.K),a=(0,o.useMemo)((()=>n.isLive&&!n.isError),[n]);(0,o.useEffect)((()=>{a&&i({owner_user_id:null==e?void 0:e.id,scene:"webapp_profile_preview"})}),[a]);const r=(0,o.useMemo)((()=>{var e,i;const n=null===(i=null===(e=null==t?void 0:t.stream_url)||void 0===e?void 0:e.live_core_sdk_data)||void 0===i?void 0:i.pull_data;if(!n)return null;const o=u.WL.getAvailableStream(n,{targetQuality:"sd",direction:"up"});return null==o?void 0:o.url.mainFLV}),[t]),l=null==t?void 0:t.user_count,s=4===(null==e?void 0:e.relation),d=(0,o.useMemo)((()=>!(!a||!r||s)),[a,r,s]),h=(0,o.useMemo)((()=>{var e,i;const n=null===(i=null===(e=null==t?void 0:t.stream_url)||void 0===e?void 0:e.live_core_sdk_data)||void 0===i?void 0:i.pull_data;if(n)return u.WL.getStreamSecretKey(n)}),[t]);return{showPreviewPlayer:d,streamUrl:r,userCount:l,isBlockedUser:s,drmSecretKey:h}};var g=i(55453),m=i(25206),f=i(32744),_=i(93751),v=i(91210),b=i(92032),y=i(44630),x=i(32125),C=i(92866),w=i(24834),k=i(66551),I=i(60193),S=i(70119),T=i(99260),Y=i(62186),D=i(75431),P=i(72153);const F=D.i7` 0% { opacity: 0; } 100% { opacity: 1; } `,L=(0,Y.default)("div",{target:"e139luw90"})({width:"100%",height:"100%",position:"relative",opacity:0,animation:`${F} .5s cubic-bezier(0.95, 0.05, 0.795, 0.035) forwards`},"label:DivLiveItem;"),j=(0,Y.default)("div",{target:"e139luw91"})((({theme:e})=>({width:"100%",fontSize:"16px",fontStyle:"normal",fontWeight:400,lineHeight:"130%",color:e.colors.TextPrimary,marginTop:4,padding:"2px 4px 0px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"})),"label:DivLiveTitle;"),E=(0,Y.default)("div",{target:"e139luw92"})((({theme:{direction:e}})=>[{position:"absolute",zIndex:20,top:8},(0,P.mp)({direction:e,end:8})]),"label:DivLiveBadgeWrapper;"),U=(0,Y.default)("span",{target:"e139luw93"})((({theme:e})=>[(0,P.zy)({theme:e,typography:"P3",fontWeight:"medium",color:"ConstTextInverse"}),{display:"inline-block",height:20,background:"linear-gradient(131deg, #FF1764 0%, #ED3495 94.15%)",lineHeight:"16px",padding:"2px 5px",borderRadius:"4px"}]),"label:SpanLiveBadge;");var M=i(25616),B=i(23692),A=i(51664),O=i(31344),q=i(35656),R=i(7162),z=i(28913),N=i(914),W=i(8301),H=i(84642),V=i(73227),$=i(24643),K=i(15022),G=i(44960),Z=i(19310);const J=(0,o.forwardRef)(((e,t)=>{const{defaultVolume:i,defaultMuted:n,onVolumeChange:a,onMutedChange:r,showVolumeIcon:l}=e,s=(0,o.useRef)(null),{xgplayer:d,mutedPlay:c,handlePlayerDestroy:u}=(0,K.F)(Object.assign(Object.assign({},e),{playerContainerRef:s}));return(0,o.useImperativeHandle)(t,(()=>({destroy:()=>{u()},retry:()=>{var e;null===(e=d.current)||void 0===e||e.retry()}}))),(0,$.jsx)(Z.S1,{ref:s,children:(0,$.jsx)(Z.jw,{children:(0,$.jsx)(G.b,{xgplayer:d,visible:l,defaultVolume:i,defaultMuted:n,mutedPlay:c,onVolumeChange:a,onMutedChange:r})})})}));var Q=i(96101);const X=(0,Y.default)("div",{target:"e1kupnb0"})((({theme:e})=>[{width:"100%",height:"100%",background:e.colors.ConstBGInverse,position:"relative",borderRadius:4,overflow:"hidden"}]),"label:DivLiveWrapper;"),ee=(0,Y.default)("div",{target:"e1kupnb1"})((()=>[{width:"100%",height:370,position:"absolute",transform:"translateY(-50%)",top:"50%",right:0,zIndex:1}]),"label:DivLiveCutter;"),te=(0,Y.default)("div",{target:"e1kupnb2"})({width:"100%",height:"100%",position:"absolute",zIndex:3,pointerEvents:"none",top:0,left:0},"label:DivFeedPlayerMultiGuestPanelWrapper;");var ie,ne=i(9782),oe=i(93608);!function(e){e.Duration="livesdk_live_window_duration_v2"}(ie||(ie={}));const ae=e=>{const{url:t,drmSecretKey:i,roomId:a,liveLinkTeaParams:r,onPlay:l}=e,[s,d]=(0,p.useAtom)(c.K),u=(0,o.useRef)(),h=(0,o.useRef)(!1),g=(0,o.useRef)(!1),[m,f]=(0,o.useState)(!0),[_]=(0,p.useAtom)(R.J),{handleMultiGuestPanelShow:v}=(0,z.P)({roomId:a,active:!0}),b=(0,o.useRef)(0),y=(0,o.useMemo)((()=>({enter_from_merge:r.enter_from_merge,enter_method:r.enter_method,follow_status:r.follow_status,anchor_id:r.anchor_id,room_id:r.room_id,action_type:r.action_type,previous_page:oe.f.commonParams.previous_page})),[r]),x=(0,o.useCallback)((()=>{var e;if(!h.current)return null===(e=u.current)||void 0===e||e.retry(),void(h.current=!0);ne.mx.handleLivePreviewFail(Object.assign({},y)),d(Object.assign(Object.assign({},s),{isError:!0}))}),[y,d,s]),C=(0,o.useCallback)((()=>{console.log("handlePlay====="),l(),f(!0),b.current=Date.now(),g.current=!1}),[l]),w=(0,o.useCallback)((()=>{var e,t;b.current>0&&!g.current&&(e=Object.assign(Object.assign({},y),{duration:Date.now()-b.current}),(null==(t={sendBeacon:!0})?void 0:t.sendBeacon)?oe.f.beconEvent("livesdk_live_window_duration_v2",e):oe.f.event("livesdk_live_window_duration_v2",e))}),[b,y]),k=(0,o.useCallback)((()=>{console.log("handlePause====="),f(!1),w()}),[f,w]);(0,o.useEffect)((()=>{const e=()=>{w(),g.current=!0},t=()=>{"visible"===document.visibilityState&&f(!0)};return window.addEventListener("beforeunload",e),document.addEventListener("visibilitychange",t),()=>{window.removeEventListener("beforeunload",e),document.removeEventListener("visibilitychange",t)}}),[]),(0,o.useEffect)((()=>()=>{w(),g.current=!0}),[]);const{handleMultiGuestSeiParsedCallback:I,multiGuestMaskPanelProps:S}=(0,N.$)({hideUserCoin:!0,handleMultiGuestShow:v,linkedUsers:_.linkedUsers}),{handleMultiGuestSeiParsed:T}=(0,W.n)({handleMultiGuestSeiParsedCallback:I,url:t,handleMultiGuestSeiParsedReport:()=>{}}),Y=(0,o.useCallback)(((e,t,i)=>{e&&t&&i&&T(e,t,i)}),[T]),D=(0,H.C)({handleParentPlayError:x}),{handlePlayError:P,handleStreamEnd:F}=(0,V.Z)({active:!0,handleParentPlayError:x,roomId:a,playerRef:u,noPreCheck:!0});return(0,n.Y)(X,{children:(0,n.FD)(ee,{children:[(0,n.Y)(J,Object.assign({ref:u,visible:!0,defaultVolume:0,showVolumeIcon:!1,defaultMuted:!0,playing:m,autoInit:!0,autoplay:!0,autoMutedPlay:!0,url:t,drmSecretKey:i,onPlay:C,onPause:k,onPlayError:P,onStreamEnd:F,onSeiParsed:Y},D)),(0,n.Y)(te,{children:(0,n.Y)(Q.y,Object.assign(Object.assign({},S),{canShowUserInfo:!1}))})]})})};var re=i(63185),le=i(80635);const se=(0,o.memo)((e=>{const{userData:t}=e,i=(0,M.s)(),{isInProductHoldout:r}=(0,a.Vv)(),l=!r,s=null==t?void 0:t.user,{showPreviewPlayer:d,streamUrl:c,drmSecretKey:u}=h(s),{recordingInitTime:p,sendFirstFrameDuration:g}=(0,B.T)(),m=(0,A.AL)({user:s,enterMethod:"video_live_cell"}),f=(0,o.useMemo)((()=>({enter_from_merge:m.enter_from_merge,enter_method:m.enter_method})),[m]),_=(0,o.useCallback)((()=>{g()}),[g]),v=(0,o.useCallback)((()=>{ne.mx.handleRecLivePlay({enter_from_merge:m.enter_from_merge,enter_method:m.enter_method,follow_status:m.follow_status,anchor_id:m.anchor_id,room_id:m.room_id,action_type:m.action_type,previous_page:oe.f.commonParams.previous_page})}),[m]);return(0,o.useEffect)((()=>{d&&(ne.mx.handleLiveShow({enter_from_merge:m.enter_from_merge,enter_method:m.enter_method,follow_status:m.follow_status,anchor_id:m.anchor_id,room_id:m.room_id,action_type:m.action_type,previous_page:oe.f.commonParams.previous_page}),p())}),[d]),(0,n.Y)(n.FK,{children:d&&c?(0,n.FD)(re.iP,{style:{overflow:"hidden"},children:[(0,n.Y)(le.w,{copyrightMuted:!1,ratio:O.f.compact.ratio,children:(0,n.Y)(q.B,{uniqueId:(null==s?void 0:s.uniqueId)||"",secUid:null==s?void 0:s.secUid,teaParams:m,extraQuery:f,onClick:v,children:(0,n.FD)(L,{children:[(0,n.Y)(E,{children:(0,n.Y)(U,{children:i("LIVE")})}),(0,n.Y)(ae,{url:c,drmSecretKey:u,roomId:null==s?void 0:s.roomId,liveLinkTeaParams:m,onPlay:_})]})})}),l?null:(0,n.Y)("div",{style:{position:"relative",display:"flex"},children:(0,n.Y)(j,{children:i("webLIVE_personalPage_LIVEbanner_title",{username:null==s?void 0:s.uniqueId})})})]}):null})}));var de=i(65444),ce=i(20024),ue=i(30349);const pe=(0,o.memo)((function({detailInfo:e,listInfo:t,listKey:i}){const{list:d,loading:c,hasMore:u,hasLocateItem:p}=t,{user:h}=e,g=(0,ue.N)(),m=(0,T.b3)({uniqueId:null==h?void 0:h.uniqueId,secUid:null==h?void 0:h.secUid}),f=(0,_.yR)(),b=(0,v.Vg)(),{count:y}=(0,T.R8)(),{enableSideNavPreloadAndCache:x}=(0,a.oJ)(),C=x&&m&&"user-post"===i&&0===f&&0!==b.browserList.length,w=(0,T.Sw)({user:h,listKey:i,count:y,useCachedVideoList:C}),{isGoogleBot:I}=(0,r.L$)((0,l.U)((()=>["isGoogleBot"]),[])),S=(0,o.useCallback)((()=>{!c&&u&&0!==d.length&&w()}),[u,w,c,d.length]);(0,s.Wj)(i,S);const Y=(0,o.useMemo)((()=>{let e;switch(i){case"favorites":e="favourite_video";break;case"user-liked":e="liked_video";break;case"user-repost":e="reposted_video";break;default:e="personal_video"}return{tab_name:e}}),[i]),D=(0,o.useMemo)((()=>"user-post"===i?[{position:0,renderNode:()=>{var t,i;return(0,n.Y)(se,{userData:e},null!==(i=null===(t=e.user)||void 0===t?void 0:t.id)&&void 0!==i?i:"0")}}]:[]),[i,e]),P=ce.Rg("generic-exposure-card-hook",{isHidden:g,customContainerStyle:{width:"100%",gridColumn:"1 / -1"}});return(0,n.Y)(k.Z,{pageType:1,itemList:d,itemListKey:i,loading:c,onHitBottom:S,ssrLimit:16,ssrLimitDisable:I,teaParams:Y,renderMap:D,hasLocateItem:p,children:!u&&(null==P?void 0:P.genericExposureCard)})}));function he(){return(0,n.Y)(C.C,{cardWidth:"196px",cardHeight:"260px",radius:"2px",gap:"2px",isUser:!0})}const ge=(0,o.memo)((function({detailInfo:e,listKey:t}){const{user:i}=e,r=(0,T.b3)({uniqueId:null==i?void 0:i.uniqueId,secUid:null==i?void 0:i.secUid}),l=(0,b.jf)((e=>(0,y.yI)(t)?e[t]:d.q),x.bN),s=(0,_.yR)(),c=(0,v.Vg)(),{justWatchedVideoId:u,justWatchedAuthorUniqueId:p}=(0,T.xr)(),{count:C}=(0,T.R8)(),{enableSideNavPreloadAndCache:k}=(0,a.oJ)(),Y=k&&r&&"user-post"===t&&0===s&&0!==c.browserList.length,{hasMore:D,list:P,statusCode:F,preloadList:L}=Y?c:l,j=(0,T.Sw)(Object.assign(Object.assign({user:i,listKey:t},u&&p===(null==i?void 0:i.uniqueId)&&{locateItemID:u}),{count:C})),E=(0,I.V)({user:i,listKey:t}),{showPreviewPlayer:U}=h(i);(0,a.uT)()?(0,g.x)(null!=L?L:[]):(0,m.$D)(null!=L?L:[]),(0,o.useEffect)((()=>{!E&&0===F&&0===P.length&&D&&(null==i?void 0:i.secUid)&&j()}),[D,P.length,j,E,F,null==i?void 0:i.secUid]);const{delayUntilFirstItem:M,delayUntilAnyItem:B}=(0,a.W3)();if((0,o.useEffect)((()=>{(M||B)&&(E||0===F&&0===P.length&&!D&&(null==i?void 0:i.secUid))&&de.aY.updateUserProfileLoadEvent()}),[D,P.length,E,F,null==i?void 0:i.secUid]),E){const{title:e,desc:t,icon:i,isLikePrivate:o}=E;let a="",r="";return o&&(a="like-title",r="like-desc"),(0,n.Y)(f.W,{isFullScreen:!0,title:e,desc:t,iconElem:i,e2eTitle:a,e2eDesc:r,ignoreErrorReport:!0})}return(0,n.Y)(w.s6,{Error:S.s5,Empty:S.lD,List:pe,Skeleton:he,detailInfo:e,listInfo:Y?c:l,listKey:t,hasLivePreview:U})}))},36488:(e,t,i)=>{i.d(t,{R:()=>Y,F:()=>D});var n=i(24643),o=i(46682),a=i(40099),r=i(47172),l=i(10828),s=i(56013),d=i(50789),c=i(82715),u=i(91857),p=i(28086),h=i(64738),g=i(32125),m=i(26930),f=i(58632),_=i(71111),v=i(39785),b=i(56070);const y=(0,v.M)({csr:e=>(0,f.__awaiter)(void 0,void 0,void 0,(function*(){const{url:t}=e;return yield b.h.get("/api/seo/redirection/",{query:{url:t}})}))}),x={needRedirect:!1},C=(0,p.z)({initState:x,rehydrationDataKey:"shared.seo.pageRedirect",fetchAction:(e,t)=>(0,f.__awaiter)(void 0,void 0,void 0,(function*(){const{url:e}=t;let i;try{i=yield y(t)}catch(t){return{needRedirect:!1,loadedURL:e}}const{redirectURL:n}=i;return{pageRedirectURL:n,loadedURL:e,needRedirect:void 0!==n}}))}),w=(0,g.pj)(C),k=(0,_.atom)(null,((e,t)=>{t(w,x)}));var I=i(39589);const S=Object.assign(Object.assign({},c.OZ),u.Ob),T=e=>Object.values(S).some((t=>null!==(0,r.matchPath)(e,{path:t})));function Y(e,t){return function(i){const[{atomState:o},s]=(0,p.I)(C),{pageRedirectURL:d,loadedURL:c,needRedirect:u}=o,g=(0,h.useSetAtom)(k),f=(0,r.useHistory)(),_=(0,r.useLocation)(),v=`${l.C}${decodeURIComponent(_.pathname)}`,b=_.search;return(0,m.o)((()=>[s({url:v}),()=>{g()}]),[v]),(0,a.useEffect)((()=>{if(d){const e=new URL(d);decodeURIComponent(e.pathname)!==decodeURIComponent(_.pathname)&&(T(e.pathname)?f.push(`${e.pathname}${b||""}`):window.location.href=d)}}),[d,f,_.pathname,b]),c!==v||u?(0,n.jsx)(n.Fragment,{children:t}):(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(e,Object.assign({},i))})}}function D(e){return function(t){const{pathname:i}=(0,r.useLocation)(),c=`${l.C}${i}`,[{abtest:u},p]=(0,o.S)(d.p),[h,f]=(0,s.ZC)((e=>e.abtest),{equalityFn:g.bN});return(0,m.o)((()=>f.setAbtest(c)),[p,c]),(0,a.useEffect)((()=>{h&&!u&&p.setAbTest(h)}),[h,u]),u?(0,n.jsx)(I.K.Provider,{value:u,children:(0,n.jsx)(e,Object.assign({},t))}):null}}},54129:(e,t,i)=>{i.d(t,{s:()=>a});var n,o=i(93608);!function(e){e.SaveProfile="save_profile",e.ClickEditProfile="click_edit_profile",e.EditProfileNotifyShow="edit_profile_notify_show",e.CancelEditProfile="cancel_edit_profile",e.CancelEditProfileShow="cancel_edit_profile_show"}(n||(n={}));const a={handleSaveReport:e=>{o.f.event("save_profile",e)},handleClickEditProfile:e=>{o.f.event("click_edit_profile",e)},handleShowProfileTooltip:e=>{o.f.event("edit_profile_notify_show",e)},handleCancelEditProfile:e=>{o.f.event("cancel_edit_profile",e)},handleCloseProfileTooltip:e=>{o.f.event("cancel_edit_profile_show",e)}}}}]);