1 line
159 KiB
Plaintext
1 line
159 KiB
Plaintext
"use strict";(self.webpackChunkdouyin_web=self.webpackChunkdouyin_web||[]).push([["70279"],{888400:function(e,t,n){let o;n.r(t),n.d(t,{checkIsTrust:function(){return nO},getUserInfo:function(){return nk},default:function(){return nx},VerifyWay:function(){return tP},updateUserInfo:function(){return nS},Pages:function(){return tT},logout:function(){return nA},setTrust:function(){return nI},loadInitTokenBeat:function(){return nL},EnumMessageType:function(){return ny}});var l,i,a,r=n("101199"),s=n("890710");n("588386");let c={douyin_login_account_select:"MNIjMW9I",flat_container:"C7FOdKVp",description:"rJZqZcU0",account_list_container:"aybYkFz3",not_show_register:"Zk3yD1DD",footer:"AoGBsXP6",tab_container:"AG_ByyWv",not_has_sub_title:"xLfFxk27"},u={中国:"+86",中国香港:"+852",中国澳门:"+853",中国台湾:"+886",阿尔巴尼亚:"+355",阿尔及利亚:"+213",阿富汗:"+93",阿根廷:"+54",阿拉伯联合酋长国:"+971",阿鲁巴岛:"+297",阿曼:"+968",阿塞拜疆:"+994",阿森松:"+247",埃及:"+20",埃塞俄比亚:"+251",爱尔兰:"+353",爱沙尼亚:"+372",安道尔:"+376",安哥拉:"+244",安圭拉:"+1264",安提瓜和巴布达:"+1268",奥地利:"+43",奥兰群岛:"+358",澳大利亚:"+61",巴巴多斯:"+1246",巴哈马:"+1242",巴基斯坦:"+92",巴拉圭:"+595",巴勒斯坦:"+970",巴林:"+973",巴拿马:"+507",巴西:"+55",白俄罗斯:"+375",百慕大:"+1441",保加利亚:"+359",北马里亚纳群岛:"+1670",贝宁:"+229",比利时:"+32",冰岛:"+354",波多黎各:"+1787",波黑:"+387",波兰:"+48",玻利维亚:"+591",伯利兹:"+501",博茨瓦纳:"+267",不丹:"+975",布基拉法索:"+226",布隆迪:"+257",朝鲜:"+850",赤道几内亚:"+240",丹麦:"+45",德国:"+49",多哥:"+228",多米尼加共和国:"+1809",多米尼克:"+1767",俄罗斯:"+7",厄瓜多尔:"+593",厄立特里亚:"+291",法国:"+33",法罗群岛:"+298",法属波利尼西亚:"+689",法属圭亚那:"+594",梵蒂冈:"+379",菲律宾:"+63",斐济:"+679",芬兰:"+358",佛得角:"+238",冈比亚:"+220",刚果:"+242",刚果民主共和国:"+243",哥伦比亚:"+57",哥斯达黎加:"+506",格林纳达:"+1473",格陵兰岛:"+299",格鲁吉亚:"+995",瓜德罗普:"+590",关岛:"+1671",圭亚那:"+592",海地:"+509",韩国:"+82",荷兰:"+31",荷属安的列斯:"+599",洪都拉斯:"+504",吉布提:"+253",加拿大:"+1",吉尔吉斯斯坦:"+996",几内亚:"+224",加那利群岛:"+3491",加纳:"+233",加蓬:"+241",柬埔寨:"+855",捷克:"+420",喀麦隆:"+237",卡塔尔:"+974",开曼群岛:"+1345",科摩罗:"+269",科索沃:"+883",科特迪瓦:"+225",科威特:"+965",克罗地亚:"+385",肯尼亚:"+254",拉脱维亚:"+371",莱索托:"+266",老挝:"+856",黎巴嫩:"+961",立陶宛:"+370",利比里亚:"+231",利比亚:"+218",列支敦士登:"+423",留尼旺岛:"+262",卢森堡:"+352",卢旺达:"+250",罗马尼亚:"+40",马达加斯加:"+261",马尔代夫:"+960",马耳他:"+356",马拉维:"+265",马来西亚:"+60",马里:"+223",马其顿:"+389",马绍尔群岛:"+692",马提尼克:"+596",马约特:"+262",毛里求斯:"+230",毛里塔尼亚:"+222",美国:"+1",美属萨摩亚:"+1684",美属维尔京群岛:"+1340",蒙古:"+976",蒙塞拉特岛:"+1664",蒙特內哥羅:"+382",孟加拉国:"+880",秘鲁:"+51",密克罗尼西亚联邦:"+691",缅甸:"+95",摩尔多瓦:"+373",摩洛哥:"+212",摩纳哥:"+377",莫桑比克:"+258",墨西哥:"+52",纳米比亚:"+264",南非:"+27",尼泊尔:"+977",尼加拉瓜:"+505",尼日尔:"+227",尼日利亚:"+234",挪威:"+47",帕劳:"+680",葡萄牙:"+351",千里达及托巴哥:"+1868",日本:"+81",瑞典:"+46",瑞士:"+41",圣诞岛:"+61",圣基茨和尼维斯:"+1869",圣卢西亚:"+1758",圣马力诺:"+223",圣皮埃尔和密克隆群岛:"+508",圣文森特和格林纳丁斯:"+1784",斯里兰卡:"+94",斯洛伐克:"+421",斯洛文尼亚:"+386",斯威士兰:"+268",苏丹:"+249",苏里南:"+597",索马里:"+252",塔吉克斯坦:"+992",沙特阿拉伯:"+966",塞舌尔:"+248",塞浦路斯:"+357",塞内加尔:"+221",塞拉利昂:"+232",塞尔维亚:"+381",萨尔瓦多:"+503",汤加:"+676",坦桑尼亚:"+255",泰国:"+66",特克斯和凯科斯群岛:"+1649",突尼斯:"+216",图瓦卢:"+688",土耳其:"+90",土库曼斯坦:"+993",乌兹别克斯坦:"+998",乌拉圭:"+598",乌克兰:"+380",乌干达:"+256",文莱:"+673",委内瑞拉:"+58",危地马拉:"+502",叙利亚:"+963",匈牙利:"+36",新西兰:"+64",新喀里多尼亚:"+687",新加坡:"+65",希腊:"+30",西萨摩亚:"+685",西撒哈拉:"+212",西班牙:"+34",越南:"+84",约旦:"+962",英属维尔京群岛:"+1284",英国:"+44",印度尼西亚:"+62",印度:"+91",意大利:"+39",以色列:"+972",伊朗:"+98",伊拉克:"+964",也门:"+967",亚美尼亚:"+374",牙买加:"+1876",中非:"+236",智利:"+56",直布罗陀:"+350",乍得:"+235",赞比亚:"+260"},d=["Enter","Space"],m="https://lf-ucenter-web.yhgfb-cn-static.com/obj/passport-fe/tab_bg.png",_="https://lf-ucenter-web.yhgfb-cn-static.com/obj/passport-fe/tab_bg.avif",g="https://lf-ucenter-web.yhgfb-cn-static.com/obj/passport-fe/tab_bg.webp",h="https://lf-ucenter-web.yhgfb-cn-static.com/obj/passport-fe/defaultavatar.png",p="https://lf-ucenter-web.yhgfb-cn-static.com/obj/passport-fe/loading.json",C="https://lf-ucenter-web.yhgfb-cn-static.com/obj/passport-fe/lottie-no-amd.js",f="user_info",v="user_info_passport_new",b="security-sdk/s_sdk_sign_data_key/login",E={mobileCodeLoginText:{title:"验证码登录",mobilePlaceholder:"请输入手机号",mobileLabel:"请输入手机号",codePlaceholder:"请输入验证码",codeLabel:"请输入验证码",sendCode:"获取验证码",sending:"{seconds}s后重新发送",buttonText:"登录",registerText:"登录",showVoiceCodeText:"收不到验证码?",six:"6",four:"4",defaultSendCodeText:"发送验证码失败"},accountPwdLoginText:{title:"密码登录",accountPlaceholder:"请输入手机号",accountLabel:"请输入手机号",pwdPlaceholder:"请输入密码",pwdLabel:"请输入密码",buttonText:"登录",needMobileCodeErrorText:"为保护账号安全,请使用验证码登录"},scanCodeLoginText:{title:"扫码登录",showTipText:"如何扫码",scannedDesc:"需在{device}上进行确认",scanDeviceText:"扫码设备",scanDescPrefix:"打开「抖音APP」点击左上角",scanDescSuffix:"扫一扫",loggingIn:"正在登录...",cancelLogin:"取消登录",codeExpiredDesc:"二维码失效",refreshText:"点击刷新"},emailCodeLoginText:{title:"邮箱登录",emailPlaceholder:"请输入邮箱",emailLabel:"请输入邮箱",codePlaceholder:"请输入验证码",codeLabel:"请输入验证码",sendCode:"获取验证码",sending:"{seconds}s后重新发送",buttonText:"登录",registerText:"登录",six:"6",four:"4",defaultSendCodeText:"发送验证码失败"},confirmInfoText:{confirmInfoBeforeText:"登录即代表同意",confirmInfoConnectText:"和"},sendVoiceCodeText:{firstDesc:"1.确认手机号{showMobile}是否填写正确",secondDesc:"2.检查手机短信是否被安全软件拦截",thirdDesc:"3.使用语音验证码登录",backBtnText:"我知道了",sendVoiceCodeBtnText:"获取语音验证码",title:"收不到验证码?",sentInfo:"已发送,请留意手机来电"},accountSelectText:{title:"选择账号",loginDesc:"已展示手机号 {showMobile} 所有关联账号,请选择登录",registerDesc:"没有想要登录的账号?您也可以直接",registerBtn:"注册个人账号",notActiveTag:"未激活",employeeTag:"企业机构账号",hotsoonTag:"火山账号"},extraText:{areaCodeNoMatchedResult:"无匹配数据",mobileNull:"请输入手机号",mobileFormatError:"手机号长度不正确,请输入完整信息",mobileCodeNull:"请输入验证码",mobileCodeError:"验证码只能为{X}位数字",emailNull:"邮箱不能为空",emailFormatError:"邮箱格式不正确",passwordNull:"请输入密码",passwordFormatError:"密码必须包括数字、大小写英文字母,长度8-20位",defaultError:"网络异常,请稍后重试",protocolCheckedError:"请先勾选用户协议和隐私政策",otherMethod:"其他登录方式"}};n("671195");let w={douyin_login_comp_flat_panel:"m6l1QidV",douyinLoginCompFlatPanel:"m6l1QidV",no_title:"vfc5hugL",noTitle:"vfc5hugL",header:"uotczcdY",picture:"Tage4l4l",page_content:"vLD4AnRP",pageContent:"vLD4AnRP",title:"mV5mWhEp",back:"z0jIqDbA",back_lite:"GI579pxg",backLite:"GI579pxg",close:"YoNA2Hyj",close_lite:"qKr0RhiL",closeLite:"qKr0RhiL"},y=()=>r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"36",height:"36",viewBox:"0 0 36 36",fill:"none"},r.createElement("path",{d:"M18.5207 12.1431L12.3236 17.9429C12.112 18.141 12.1126 18.4769 12.3249 18.6743L17.9021 23.8569",stroke:"#161823",strokeOpacity:"0.6",strokeWidth:"2",strokeLinecap:"round"})),N=()=>r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"37",height:"36",viewBox:"0 0 37 36",fill:"none"},r.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.7929 22.2426C12.4024 22.6331 12.4024 23.2663 12.7929 23.6568C13.1834 24.0474 13.8166 24.0474 14.2071 23.6568L18.5 19.3639L22.7929 23.6568C23.1834 24.0474 23.8166 24.0474 24.2071 23.6568C24.5976 23.2663 24.5976 22.6331 24.2071 22.2426L19.9142 17.9497L24.1066 13.7573C24.4971 13.3668 24.4971 12.7336 24.1066 12.3431C23.7161 11.9526 23.0829 11.9526 22.6924 12.3431L18.5 16.5355L14.3076 12.3431C13.9171 11.9526 13.2839 11.9526 12.8934 12.3431C12.5029 12.7336 12.5029 13.3668 12.8934 13.7573L17.0858 17.9497L12.7929 22.2426Z",fill:"#161823",fillOpacity:"0.6"})),L=e=>{let{children:t,title:n="",bgImg:o,showBack:l=!1,showClose:i=!1,onBack:a,onClose:s,className:c="",useShortUrl:u=!0}=e||{};return r.createElement("article",{id:"douyin_login_comp_flat_panel",className:`${w.douyin_login_comp_flat_panel} ${n?"":w.no_title} ${c}`},"string"==typeof o?o?r.createElement("img",{id:"douyin_login_comp_flat_panel_picture",className:w.picture,src:o}):null:r.createElement("picture",{className:w.picture},r.createElement("source",{type:"image/avif",srcSet:u?"https://lf-ucenter-web.yhgfb-cn-static.com/obj/passport-fe/flat_bg_2_small.avif":"https://lf-ucenter-web.yhgfb-cn-static.com/obj/passport-fe/flat_bg_small.avif"}),r.createElement("source",{type:"image/webp",srcSet:u?"https://lf-ucenter-web.yhgfb-cn-static.com/obj/passport-fe/flat_bg_2_small.webp":"https://lf-ucenter-web.yhgfb-cn-static.com/obj/passport-fe/flat_bg_small.webp"}),r.createElement("img",{width:"100%",src:u?"https://lf-ucenter-web.yhgfb-cn-static.com/obj/passport-fe/flat_bg_2_small.png":"https://lf-ucenter-web.yhgfb-cn-static.com/obj/passport-fe/flat_bg_small.png"})),r.createElement("div",{className:w.page_content},r.createElement("div",{className:w.header},l&&r.createElement("div",{className:`${w.back} ${u?w.back_lite:""}`,onClick:a},r.createElement(y,null)),n&&r.createElement("div",{className:w.title},n),i&&r.createElement("div",{className:`${w.close} ${u?w.close_lite:""}`,onClick:e=>null==s?void 0:s(e)},r.createElement(N,null))),r.createElement("div",{className:w.content},t)))};n("893933");let x={douyin_login_comp_tab_panel:"npDgwLo9",picture:"aF0EgGPg",page_content:"PUo6hLeW",header:"GWKbP9HM",title:"Ilj82Tkc",sub_title:"dJuM_BJa",sub_title_hide:"lD5vkW5h",back:"SizcMvPL",close:"OQ3D5mJJ",content:"VJevtAa1"},S=()=>r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"36",height:"36",viewBox:"0 0 36 36",fill:"none"},r.createElement("path",{d:"M18.5207 12.1428L12.3236 17.9427C12.112 18.1408 12.1126 18.4767 12.3249 18.674L17.9021 23.8567",stroke:"#444349",strokeWidth:"2.5",strokeLinecap:"round"})),k=()=>r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:"36",height:"36",viewBox:"0 0 36 36",fill:"none"},r.createElement("rect",{width:"36",height:"36",fill:"url(#pattern0_3645_22461)"}),r.createElement("defs",null,r.createElement("pattern",{id:"pattern0_3645_22461",patternContentUnits:"objectBoundingBox",width:"1",height:"1"},r.createElement("use",{xlinkHref:"#image0_3645_22461",transform:"scale(0.00694444)"})),r.createElement("image",{id:"image0_3645_22461",width:"144",height:"144",xlinkHref:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJAAAACQCAYAAADnRuK4AAAACXBIWXMAACxLAAAsSwGlPZapAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAPTSURBVHgB7d29ThRRGIDh7wyLWGlFQoJ7A4rBBgs7CxPs8QqwsRMra3u8Am/AYGOnnR2yGxNZxM4KsgnQURrY43y7IQgL7PzPnHPeJzFCmGLIvMz/OSsCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoCxGPLGwsNSemjJrVuxzY+SOtWZPrN0UidZ7va19aQBdxygyqyaSZRHbtlaOxcqXJq1jWl4E9PDR4xfG2ncazuWfaUgnYld/b3d3pUaLi0sPrMinq9ZRDcS83vnZ2RDHOB/QcM/Tku83LaN/6SciK3VFNCkeNdobRc9c2xNF4rgokjeTltEN14o34P14Q0rFksSj9OfG2Im/S9M4H1C8D11OtFgNESWN54yev4ljnA8o6cY5W7aqiNLGo9Is2xTu74FEUp0zVBFRlnhG4itHx7gf0PAyOJ0yI8oez/AQtimOcT6g01vyYXgFk1IZEeWJZ7j3mYnWxTHOB/Sr292L70Ws1B1RrnhMvO7TdrW35d7NRG/uROc6dOS8T5Q7npasbHfrvdGZlTcBqToiCjke5VVAqsqIQo9HeReQqiIi4hnxMiBVZkTEc87bgFQZERHPRV4HpIqMiHjGeR+QKiKiaf2aeMYEEZDKG5H+TzzjgglI5XvUkIHn8aigAlKVRRRAPCq4gFTpEQUSjwoyIFVaRAHFo4INSBUeUWDxqKADUoVFFGA8KviAVO6IAo1HtQS52YHIyV8JEoewgg5hdQ9erAsn0QWeRIcYEZfxBV/GhxYRNxJLEFJEPMooSSgR8TC1RCFE5MPQ5kTyvgzWlMGLTRNEQEW8SdiEwYtNxCutN7l0h7nOwYtNxUv117nm8QQRXcSwnqtMeLZFROcYWHhZwgejRDTC0Ob/pXyqTkRMrnAu4ysZoUfE9C4q5/s8IUfkRUBNGDEaakReTDQeTQ033D1Jq+A3CXMPXmSi8erpRONNiEdtx3uQPHesJbIvxTE+TDT+RNIq8R3mXBHZZJOmN4kPE42n2/tU8AJ85oiMbYtjnA8o1UaqcPREloiy7LXq5sMhLNlE4zUMvUkdkUk/aXrdnA9oMC3vJ26gGsdtpYrIwYnGp8Rxh/3+8ezc/FF03af2NGDQ38FB/2hubv5bvC5P42/HL/HjdTy18nbnR8e5jzpwPiB1eNDfnW3Pb5iBfuaW6InoTPxv34r5GP9Vr/U6nT9SM40oXsevw3UUuSsakr7pOJDPcjt65WI8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQJX+ATc9oF5n57RZAAAAAElFTkSuQmCC"}))),A=e=>{let{children:t,title:n="",subTitle:o,showSubTitle:l=!0,bgImg:i,showBack:a=!1,showClose:s=!1,onBack:c,onClose:u,className:d}=e||{};return r.createElement("article",{id:"douyin_login_comp_tab_panel",className:`${x.douyin_login_comp_tab_panel} ${d}`},i?r.createElement("img",{id:"douyin_login_comp_tab_panel_picture",className:x.picture,src:i}):r.createElement("picture",{className:x.picture},r.createElement("source",{type:"image/avif",srcSet:_}),r.createElement("source",{type:"image/webp",srcSet:g}),r.createElement("img",{width:"100%",src:m})),r.createElement("div",{className:x.page_content},r.createElement("div",{className:x.header},a&&r.createElement("div",{className:x.back,onClick:c},r.createElement(S,null)),r.createElement("div",{className:x.title},n),o&&r.createElement("div",{className:`${x.sub_title} ${l?"":x.sub_title_hide}`},o),s&&r.createElement("div",{className:x.close,onClick:e=>null==u?void 0:u(e)},r.createElement(k,null))),r.createElement("div",{className:x.content},t)))};n("310443");let I={douyin_login_comp_h5_panel:"zeKBX9I9",douyinLoginCompH5Panel:"zeKBX9I9",picture:"a3I3ZVv_",page_content:"PmyGuDIu",pageContent:"PmyGuDIu",header:"w1Jb8F44",title:"ZClmt3R5",back:"_lYYAmht",close:"oKiA9l9M"},O=()=>r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},r.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.40814 6.39545C6.72056 6.08303 7.22709 6.08303 7.53951 6.39545L12.0005 10.8564L16.4615 6.39545C16.7739 6.08303 17.2804 6.08303 17.5928 6.39545C17.9053 6.70787 17.9053 7.2144 17.5928 7.52682L13.1319 11.9878L17.4937 16.3497C17.8062 16.6621 17.8062 17.1686 17.4937 17.481C17.1813 17.7935 16.6748 17.7935 16.3624 17.481L12.0005 13.1192L7.63862 17.481C7.3262 17.7935 6.81967 17.7935 6.50725 17.481C6.19483 17.1686 6.19483 16.6621 6.50725 16.3497L10.8691 11.9878L6.40814 7.52682C6.09572 7.2144 6.09572 6.70787 6.40814 6.39545Z",fill:"#161823"})),T=()=>r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},r.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.1773 6.12251C14.9137 5.8589 14.4863 5.8589 14.2227 6.12251L8.8227 11.5225C8.5591 11.7861 8.5591 12.2135 8.8227 12.4771L14.2227 17.8771C14.4863 18.1407 14.9137 18.1407 15.1773 17.8771C15.4409 17.6135 15.4409 17.1861 15.1773 16.9225L10.2546 11.9998L15.1773 7.0771C15.4409 6.8135 15.4409 6.38611 15.1773 6.12251Z",fill:"#161823"})),P=e=>{let{children:t,footer:n,title:o=()=>"",bgImg:l,showBack:i=!1,showClose:a=!1,onBack:s,onClose:c,className:u}=e||{};return r.createElement("article",{id:"douyin_login_comp_h5_panel",className:`${I.douyin_login_comp_h5_panel} ${u}`},"string"==typeof l?l?r.createElement("img",{id:"douyin_login_comp_h5_panel_picture",className:I.picture,src:l}):null:r.createElement("picture",{className:I.picture},r.createElement("source",{type:"image/avif",srcSet:_}),r.createElement("source",{type:"image/webp",srcSet:g}),r.createElement("img",{width:"100%",style:{borderRadius:"12px"},src:m})),r.createElement("div",{className:I.page_content},r.createElement("div",{className:I.header},i&&r.createElement("div",{className:I.back,onClick:s},r.createElement(T,null)),r.createElement("div",{className:I.title},o),a&&r.createElement("div",{className:I.close,onClick:e=>null==c?void 0:c(e)},r.createElement(O,null))),r.createElement("div",{className:I.content},t),r.createElement("div",{className:I.footer},null==n?void 0:n())))},B=e=>{let{isH5:t=!1,loginPanelType:n="flat",...o}=e||{};return t?r.createElement(P,o):"flat"===n?r.createElement(L,o):r.createElement(A,o)};n("526317");let M={douyin_login_comp_avatar:"IDPVAg67",tag:"f3zcaSvy"},D=e=>{let{url:t=h,size:n=64,tag:o,tagStyle:l}=e;return r.createElement("div",{className:M.douyin_login_comp_avatar,style:{width:n,height:n}},r.createElement("img",{crossOrigin:"anonymous",src:t,alt:"",style:{borderRadius:n},onError:e=>{e.currentTarget.onerror=null,e.currentTarget.src=h}}),o&&r.createElement("div",{className:M.tag,style:l},o))};n("766903");let G={douyin_login_comp_tag:"cCRHmlie",douyinLoginCompTag:"cCRHmlie",content:"rV0owG1_",red:"oRoJVPza",blue:"OOCaqmIj",grey:"SVh0jKSL"},R=e=>{let{content:t,color:n}=e;return r.createElement("div",{className:G.douyin_login_comp_tag},r.createElement("div",{className:`${G.content} ${G[n]}`},t))};n("621401");let F={douyin_login_comp_btn:"r7j70rK2",douyinLoginCompBtn:"r7j70rK2",content:"M38h7w3V",primary:"BBqC6Jfj",secondary:"S6jjRZQZ",disabled:"zcAEoiw0",loading:"qOAoUpHW"},q=()=>r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"17",height:"16",viewBox:"0 0 17 16",fill:"none"},r.createElement("g",{clipPath:"url(#clip0_2722_7425)"},r.createElement("path",{d:"M15.299 3.34802L5.95048 12.6518L1.70117 8.42279",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})),r.createElement("defs",null,r.createElement("clipPath",{id:"clip0_2722_7425"},r.createElement("rect",{width:"16",height:"16",fill:"white",transform:"translate(0.5)"})))),V=e=>{let[t,n]=(0,r.useState)(null),[o,l]=(0,r.useState)(!0);return(0,r.useEffect)(()=>{(async()=>{try{let t=await fetch(e);if(!t.ok)throw Error("Network response was not ok");let o=await t.json();n(o)}catch(e){}finally{l(!1)}})()},[e]),{animationData:t,isLoading:o}},U=r.lazy(()=>n.e("8959").then(n.bind(n,175762))),H=e=>{let{content:t,onClick:n,loading:o=!1,disabled:l=!1,success:i=!1,style:a,type:s="primary"}=e,{animationData:c,isLoading:u}=V(p);return r.createElement("div",{id:"douyin_login_comp_btn_id",className:`${F.douyin_login_comp_btn} ${F.content} ${F[s]} ${l?F.disabled:""} ${o?F.loading:""}`,style:a,onClick:n},o&&U&&r.createElement(r.Suspense,{fallback:r.createElement("div",null)},!u&&c&&r.createElement(U,{autoplay:!0,loop:!0,data:c,lottieCdn:C})),i&&r.createElement(q,null),!o&&!i&&t)};n("180388");let j={douyin_login_comp_multi_account_user_card:"AsBGE7Ea",switch:"wzLuQyVG",content:"oIXs_KgS",name_content:"dKxLQ_wX",name:"oDZeJlpA",douyin_no:"rCaegOZl",tag:"eLtY36RB",douyin_login_comp_one_login_user_card:"nCw_s9DS",show_background:"RMgVo6tk",touch_device:"NaLdg1nF",right_box:"xot_SfJA",close:"aQcN45Il",web_device:"oXWCtIfv",douyin_login_comp_single_one_login_user_card:"THJX803l"};var $=n("903028");let z=()=>r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},r.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.9647 4.58149C12.2615 4.28469 12.7427 4.28469 13.0395 4.58149L17.8291 9.37109C17.9052 9.40735 17.9765 9.45697 18.0395 9.51997C18.1957 9.67619 18.2697 9.88351 18.2615 10.0881C18.2697 10.2927 18.1957 10.5001 18.0395 10.6563C17.9765 10.7193 17.9052 10.7689 17.8291 10.8052L13.0395 15.5948C12.7427 15.8916 12.2615 15.8916 11.9647 15.5948C11.6679 15.298 11.6679 14.8168 11.9647 14.52L15.6058 10.8789H3.21605C2.79632 10.8789 2.45605 10.5387 2.45605 10.1189C2.45605 9.69919 2.79632 9.35893 3.21605 9.35893H15.6674L11.9647 5.65629C11.6679 5.35949 11.6679 4.87828 11.9647 4.58149Z",fill:"var(--color-text-t1-ucenter)"})),Z=()=>r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},r.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.9498 3.86004H10.2976C10.2507 2.88011 9.44132 2.10004 8.44977 2.10004H7.54977C6.55821 2.10004 5.74886 2.88011 5.70192 3.86004H3.04977C2.75153 3.86004 2.50977 4.1018 2.50977 4.40004C2.50977 4.69827 2.75153 4.94004 3.04977 4.94004H3.45016V11.9C3.45016 13.0046 4.34559 13.9 5.45016 13.9H10.5502C11.6547 13.9 12.5502 13.0046 12.5502 11.9V4.94004H12.9498C13.248 4.94004 13.4898 4.69827 13.4898 4.40004C13.4898 4.1018 13.248 3.86004 12.9498 3.86004ZM11.5502 4.94004H4.45016V11.9C4.45016 12.4523 4.89787 12.9 5.45016 12.9H10.5502C11.1024 12.9 11.5502 12.4523 11.5502 11.9V4.94004ZM8.44977 3.10004C8.88881 3.10004 9.25011 3.4329 9.29506 3.86004L6.70447 3.86004C6.74943 3.4329 7.11072 3.10004 7.54977 3.10004H8.44977ZM7.14937 7.09999C7.14937 6.82385 6.92552 6.59999 6.64937 6.59999C6.37323 6.59999 6.14937 6.82385 6.14937 7.09999V9.79999C6.14937 10.0761 6.37323 10.3 6.64937 10.3C6.92552 10.3 7.14937 10.0761 7.14937 9.79999V7.09999ZM9.35055 6.59999C9.62669 6.59999 9.85055 6.82385 9.85055 7.09999V9.79999C9.85055 10.0761 9.62669 10.3 9.35055 10.3C9.0744 10.3 8.85055 10.0761 8.85055 9.79999V7.09999C8.85055 6.82385 9.0744 6.59999 9.35055 6.59999Z",fill:"var(--color-text-t1-ucenter)",fillOpacity:"0.6"})),J=e=>{let{avatar:t,name:n,douyin_no:o="未知",isEmployee:l=!1,isHotsoon:i=!1,isActive:a=!0,notActiveTag:s="未激活",employeeTag:c="企业机构账号",hotsoonTag:u="火山账号",onClick:d,width:m=420}=e||{};return r.createElement("div",{className:j.douyin_login_comp_multi_account_user_card,onClick:d,style:{width:m}},r.createElement(D,{url:t,size:64}),r.createElement("div",{className:j.content},r.createElement("div",{className:j.name_content},r.createElement("span",{className:j.name},n),l&&!a&&r.createElement(R,{content:s,color:"grey"})),r.createElement("div",{className:j.douyin_no},"抖音号:",o),r.createElement("div",{className:j.tag},l&&r.createElement(R,{content:c,color:"blue"}),i&&r.createElement(R,{content:u,color:"red"}))),r.createElement("div",{className:j.switch},r.createElement(z,null)))},W=e=>{let{avatar:t,name:n,lastLogin:o=!1,buttonText:l="一键登录",onClick:i,onDelete:a,showBackground:s=!0,btnDisabled:c=!1,width:u=420}=e||{};return r.createElement("div",{className:`${j.douyin_login_comp_one_login_user_card} ${s?j.show_background:""} ${(0,$.b1)()?j.touch_device:j.web_device}`,style:{width:u}},r.createElement(D,{url:t,size:72,tag:o?"上次登录":""}),r.createElement("div",{className:j.name},n),r.createElement("div",{className:j.right_box},r.createElement(H,{content:l,style:{width:88,height:32,fontSize:14,borderRadius:8},onClick:i,disabled:c}),r.createElement("div",{className:j.close,onClick:a},r.createElement(Z,null))))},K=e=>{let{avatar:t,name:n,lastLogin:o=!1,buttonText:l="一键登录",onClick:i,onDelete:a,showBackground:s=!0,btnDisabled:c=!1,width:u=252}=e||{};return r.createElement("div",{className:`${j.douyin_login_comp_single_one_login_user_card} ${s?j.show_background:""} ${(0,$.b1)()?j.touch_device:j.web_device}`,style:{width:u}},r.createElement(D,{url:t,size:40,tag:o?"上次登录":"",tagStyle:{padding:"1.28px 3.84px",fontSize:8,bottom:-2,lineHeight:"11.55px",borderRadius:4}}),r.createElement("div",{className:j.name},n),r.createElement("div",{className:j.right_box},r.createElement(H,{content:l,style:{width:58,height:24,fontSize:10,borderRadius:6},onClick:i,disabled:c}),r.createElement("div",{className:j.close,onClick:a},r.createElement(Z,null))))};function X(e){var t=r.createContext(null);return{Provider:function(n){var o=e(n.initialState);return r.createElement(t.Provider,{value:o},n.children)},useContainer:function(){var e=r.useContext(t);if(null===e)throw Error("Component must be wrapped with <Container.Provider>");return e}}}let Q=X(e=>{let{config:t,request:n}=e||{},{isH5:o=!1,loginPanelType:l="flat",next:i=location.href,defaultAreaCode:a="+86",loginType:s,isShowGoogle:c=!1,isShowApple:u=!1,emailDownGrade:d}=t||{},[m,_]=(0,r.useState)(0),[g,h]=(0,r.useState)(!1),[p,C]=(0,r.useState)([]),[f,v]=(0,r.useState)(""),[b,E]=(0,r.useState)(a||"+86"),[w,y]=(0,r.useState)(""),[N,L]=(0,r.useState)(""),[x,S]=(0,r.useState)(""),[k,A]=(0,r.useState)(""),[I,O]=(0,r.useState)(""),[T,P]=(0,r.useState)(!1),[B,M]=(0,r.useState)(!1),[D,G]=(0,r.useState)(!1),[R,F]=(0,r.useState)(!0),[q,V]=(0,r.useState)({}),[U,H]=(0,r.useState)(""),[j,$]=(0,r.useState)(""),[z,Z]=(0,r.useState)(!1),J=(0,r.useRef)(""),W=(0,r.useRef)(""),K=(0,r.useMemo)(()=>{let e=s;return(null==s?void 0:s.includes("LOGIN_EMAIL_CODE"))&&!T&&(e=d?null==e?void 0:e.map(e=>"LOGIN_EMAIL_CODE"===e?d:e):null==e?void 0:e.filter(e=>"LOGIN_EMAIL_CODE"!==e)),(null==e?void 0:e.length)||(e=o?["LOGIN_MOBILE_CODE","LOGIN_ACCOUNT_PWD"]:["LOGIN_SCAN_CODE","LOGIN_MOBILE_CODE"]),e},[s,T,d,o]);return(0,r.useEffect)(()=>{u||c||(null==s?void 0:s.includes("LOGIN_EMAIL_CODE"))?null==n||n.checkEmailAndThirdEnv().then(e=>{let{account_support_google_login:t=0,account_support_apple_login:n=0,account_support_email_login:o=0}=e||{};u&&n&&M(!0),c&&t&&G(!0),(null==s?void 0:s.includes("LOGIN_EMAIL_CODE"))&&o&&P(!0),F(!1)}).catch(()=>{F(!1)}):F(!1)},[]),{config:t,request:n,getContainer:()=>{let e={h5:"douyin_login_comp_h5_panel",single:"douyin_login_comp_single_panel",flat:"douyin_login_comp_flat_panel",tab:"douyin_login_comp_tab_panel"}[o?"h5":l]||"douyin_login_comp_flat_panel";return document.querySelector(`#${e}`)||document.body},successHd:e=>{let n={...(null==e?void 0:e.user_data)||{},...e||{}};if(null==t?void 0:t.success)return t.success(n);window.location.href=i},loginLoading:g,setLoginLoading:h,accountLists:p,setAccountLists:C,smsCodeKey:f,setSmsCodeKey:v,areaCode:b,setAreaCode:E,mobile:w,setMobile:y,code:N,setCode:L,email:k,setEmail:A,emailCode:I,setEmailCode:O,isFinalShowApple:B,isFinalShowGoogle:D,isFinalShowEmail:T,checkLoading:R,password:x,setPassword:S,selectUserInfo:q,setSelectUserInfo:V,selectMobile:U,setSelectMobile:H,verifyTicket:j,setVerifyTicket:$,isFromOneLoginDownGrade:z,setIsFromOneLoginDownGrade:Z,selectedTab:m,setSelectedTab:_,setCurLoginMethod:e=>{W.current=J.current,J.current=e},preLoginMethod:W,loginType:K}}),Y=()=>Q.useContainer(),ee=/^(\d{3})(\d{0,4})(\d{0,4})$/,et=/^([A-Za-z0-9_\-\.\+])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,10})$/,en=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"请输入手机号",o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"手机号长度不正确,请输入完整信息",l="",i=!0;return t||(i=!1,l=n),t&&"+86"===e&&11!==t.length&&(i=!1,l=o),{result:i,errorMessage:l}},eo=e=>{let{code:t,len:n=6,noCodeErrMsg:o="请输入验证码",codeLenErrMsg:l="验证码只能为{X}位数字",mobileCodeLoginText:i}=e,a=!0,r="";return t||(r=o,a=!1),t&&t.length!==n&&(r=l.replace("{X}",6===n?`${null==i?void 0:i.six}`:`${null==i?void 0:i.four}`),a=!1),{result:a,errorMessage:r}},el=e=>{let{email:t,noEmailErrMsg:n="请输入邮箱",emailFormatErrMsg:o="邮箱格式错误"}=e||{},l=!0,i="";return t||(i=n,l=!1),t&&!et.test(t)&&(i=o,l=!1),{result:l,errorMessage:i}},ei=e=>{let{code:t,len:n=6,noCodeErrMsg:o="请输入验证码",codeLenErrMsg:l="验证码只能为{X}位",emailCodeLoginText:i}=e,a=!0,r="";return t||(r=o,a=!1),t&&t.length!==n&&(r=l.replace("{X}",6===n?`${null==i?void 0:i.six}`:`${null==i?void 0:i.four}`),a=!1),{result:a,errorMessage:r}},ea=e=>{let{password:t,noPasswordErrMsg:n="请输入密码"}=e,o=!0,l="";return t||(l=n,o=!1),{result:o,errorMessage:l}},er=e=>{let t=Math.floor(e/60),n=(e%60/100).toFixed(2).slice(-2);return`${t}\u{5206}${n}\u{79D2}`},es=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"+86";if("+86"===t){let t=e.length-5,n="*".repeat(t);return`${e.substring(0,3)+n+e.substring(e.length-2)}`}let n=e.length-2,o="*".repeat(n);return`${t} ${e.substring(0,2)+o}`};n("304495");let ec={douyin_login_comp_toast:"Pb9z3wJh",content:"veJhqn8B"},eu=e=>{let{content:t,duration:n=2e3,visible:o=!1}=e,[l,i]=(0,r.useState)(o);return((0,r.useEffect)(()=>{if(i(o),o){let e=setTimeout(()=>{i(!1)},n);return()=>clearTimeout(e)}},[o,n]),l)?r.createElement("div",{className:ec.douyin_login_comp_toast},r.createElement("div",{className:ec.content},t)):null};eu.show=e=>(e=>{let{content:t,duration:n=2e3,getContainer:o}=e,l=o?o():document.body,i=document.createElement("div");null==l||l.appendChild(i);let a=()=>{s.unmountComponentAtNode(i),i.remove()};return s.render(r.createElement(eu,{content:t,duration:n,visible:!0}),i),setTimeout(a,n),{closeToast:a}})(e);let ed="2.1.9-alpha.6",em=(e,t)=>{},e_={params_for_special:"uc_login",sdk_version:ed},eg=e=>{let{sendLog:t,aid:n=6383}=e||{};em=t,e_={aid:n,...e_}},eh=(e,t)=>{if(em)try{em(e,{...e_,...t})}catch(e){}},ep=X(()=>{let{config:e}=Y(),{isH5:t=!1,loginPanelType:n="flat"}=e||{},[o,l]=(0,r.useState)(t?"H5_LANDING_PAGE":"single"===n?"SINGLE_ONE_LOGIN_PAGE":"ONE_LOGIN_PAGE"),[i,a]=(0,r.useState)(""),[s,c]=(0,r.useState)(""),[u,d]=(0,r.useState)(""),[m,_]=(0,r.useState)("LOGIN_MOBILE_CODE");return{currentPage:o,changePage:function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];a(t?"":o),l(e)},prePage:i,landingBackPage:s,setLandingBackPage:c,sendVoiceCodeCountDownID:u,setSendVoiceCodeCountDownID:d,multiAccountLoginWay:m,setMultiAccountLoginWay:_}}),eC=()=>ep.useContainer(),ef=()=>{let{config:e,accountLists:t,smsCodeKey:n,areaCode:o,mobile:l,code:i,password:a,request:s,successHd:c,getContainer:u,preLoginMethod:d}=Y(),{loginOnly:m,allTextConfig:_}=e||{},{extraText:g,accountSelectText:h}=_||{},{changePage:p,prePage:C,multiAccountLoginWay:f}=eC(),[v,b]=(0,r.useState)(!1),E=(0,r.useMemo)(()=>"LOGIN_ACCOUNT_PWD"===f,[f]),w=(0,r.useMemo)(()=>{let e=0,n=0,o=0;if(!(null==t?void 0:t.length))return{mainCnt:e,subCnt:n,bizCnt:o};for(let l=0;l<t.length;l++){let i=t[l];i.is_bind_login_mobile?e++:6===i.passport_enterprise_user_type?o++:n++}return{mainCnt:e,subCnt:n,bizCnt:o}},[t]),y=(0,r.useMemo)(()=>l.replace(/\s/g,""),[l]),N=(0,r.useMemo)(()=>`${o} ${y}`,[y,o]),L=(0,r.useMemo)(()=>es(y,o),[y,o]),x=(0,r.useMemo)(()=>{if("LOGIN_MOBILE_CODE"===f&&(null==m?void 0:m.LOGIN_MOBILE_CODE)||"LOGIN_ACCOUNT_PWD"===f&&(null==m?void 0:m.LOGIN_ACCOUNT_PWD)||!(null==t?void 0:t.length))return!1;for(let e=0;e<t.length;e++)if(t[e].is_bind_login_mobile)return!1;return!0},[m,t,f]),S=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"submit";eu.show({content:e,getContainer:u}),eh("login_panel_tips_show",{login_method:E?"phone_password":"phone_sms",is_auto_send_sms:0,tips_type:"toast",tips_stage:t,tips_title:e})};return(0,r.useEffect)(()=>{eh("login_alternative_notify",{main_cnt:w.mainCnt,sub_cnt:w.subCnt,biz_cnt:w.bizCnt})},[]),{onLogin:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0,o=(null==t?void 0:t.passport_enterprise_user_type)===6,l=null==t?void 0:t.business_account_active;if(o&&!l)return void S((null==h?void 0:h.employeeNotActive)||"当前账号未激活,请登录抖音APP激活后使用");if(v)return;b(!0);let{sec_uid:r}=t||{},u={multiAccount:!0,extra_params:{ignore_reused_mobile:1,sms_code_key:n,sms_code_key_not_mix:1}};u=E?{...u,mobile:N,password:a}:{...u,mobile:N,code:i,loginOnly:null==m?void 0:m.LOGIN_MOBILE_CODE},u=e?{...u,extra_params:{...u.extra_params,register_new_user:1}}:{...u,extra_params:{...u.extra_params,sec_uid:r}},eh("login_alternative_submit",{select_type:(null==t?void 0:t.is_bind_login_mobile)?"main":(null==t?void 0:t.passport_enterprise_user_type)===6?"business":"sub"}),(E?null==s?void 0:s.userLoginRequest:null==s?void 0:s.smsLoginRequest)(u).then(e=>{eh("uc_login_result",{status:"success",login_method:E?"phone_password":"phone_sms",is_new_user:u.loginOnly?0:(null==e?void 0:e.is_new_user)!==void 0?null==e?void 0:e.is_new_user:(null==e?void 0:e.new_user)!==void 0?null==e?void 0:e.new_user:-1,log_id:null==e?void 0:e.log_id,switch_from_method:d.current,is_submit_multi_account:1}),c(e)}).catch(e=>{eh("uc_login_result",{status:"fail",login_method:E?"phone_password":"phone_sms",error_code:(null==e?void 0:e.error_code)||-1,fail_info:(null==e?void 0:e.description)||"",log_id:null==e?void 0:e.log_id,switch_from_method:d.current,is_submit_multi_account:1}),S((null==e?void 0:e.description)||(null==g?void 0:g.defaultError),"failure")}).finally(()=>{b(!1)})},accountLists:t,maskedMobile:L,isShowRegisterEntry:x,onBack:()=>{p(C||"ONE_LOGIN_PAGE")}}},ev=()=>{var e;let{config:t}=Y(),{loginPanelType:n="flat",subTitle:o,loginBgImg:l,allTextConfig:i}=t||{},{accountSelectText:a}=i||{},{accountLists:s,onLogin:u,maskedMobile:d,isShowRegisterEntry:m,onBack:_}=ef();return r.createElement("div",{className:c.douyin_login_account_select},r.createElement(B,{loginPanelType:n,title:null==a?void 0:a.title,subTitle:o,showSubTitle:!1,bgImg:l,showBack:!0,onBack:_},r.createElement("div",{className:"flat"===n?c.flat_container:c.tab_container},r.createElement("p",{className:c.description},null==a||null==(e=a.loginDesc)?void 0:e.split("{showMobile}").map((e,t)=>r.createElement(r.Fragment,{key:t},e,0===t&&d&&r.createElement("span",null,d)))),r.createElement("div",{className:`${c.account_list_container} ${m?"":c.not_show_register} ${o?"":c.not_has_sub_title}`},s.map((e,t)=>{var o;return r.createElement(J,{key:t,avatar:(null==e?void 0:e.avatar)||"",name:(null==e?void 0:e.name)||"",douyin_no:null==e||null==(o=e.aweme_id)?void 0:o.toString(),isEmployee:(null==e?void 0:e.passport_enterprise_user_type)===6,isActive:null==e?void 0:e.business_account_active,isHotsoon:(null==e?void 0:e.app_account_group_id)===18,notActiveTag:null==a?void 0:a.notActiveTag,employeeTag:null==a?void 0:a.employeeTag,hotsoonTag:null==a?void 0:a.hotsoonTag,width:"flat"===n?420:358,onClick:()=>u(!1,e)})})),m&&r.createElement("div",{className:c.footer},null==a?void 0:a.registerDesc," ",r.createElement("span",{onClick:()=>u(!0)},null==a?void 0:a.registerBtn)))))};n("105345");let eb="lQYGSG31",eE="Prgw3giu",ew="wPRUfG5z",ey=e=>{let{Icon:t=()=>null,RealEle:n=()=>null,size:o=56}=e||{};return r.createElement("div",{className:eb,style:{width:o,height:o}},r.createElement("div",{className:eE},r.createElement(t,null)),r.createElement("div",{className:ew},r.createElement(n,null)))};n("945173");let eN={douyin_login_comp_area_code:"LghFeUBn",input_container:"RyOwPUDZ",input:"NGT8cA1w",icon_arrow:"hnHfmHGH",select_list_container:"A6DN8cNt",select_list:"_rcxELx9",select_list_item:"Y6Pgp5T0",select_list_item_active:"QDM9Sxos"},eL=e=>{let t,n,{onAreaCodeBlur:o,onTab:l,onAreaCodeChange:i,areaCodeValue:a,districtList:s=u,areaCodeNoMatchedResult:c="无匹配数据"}=e,[m,_]=(0,r.useState)(a.length),[g,h]=(0,r.useState)(!1),[p,C]=(0,r.useState)("+86"),[f,v]=(0,r.useState)(!1),b=(0,r.useRef)(null),E=(0,r.useRef)(null),w=e=>{if(!e)return void setTimeout(()=>{var t,n;(null==(n=document.activeElement)||null==(t=n.id)?void 0:t.includes("areacode_item_"))||(h(e),v(e))},0);h(e),v(e)},y=()=>{var e;null==b||null==(e=b.current)||e.focus(),g||h(!0)},N=e=>{var t,n,o,i;let a=e.key;if(e.preventDefault(),"Tab"===a)return null==l?void 0:l();let r=document.activeElement;if(r&&("ArrowDown"===a&&(null==(n=r.nextElementSibling)||null==(t=n.focus)||t.call(n)),"ArrowUp"===a&&(null==(i=r.previousElementSibling)||null==(o=i.focus)||o.call(i)),"Enter"===a)){let e=r.getAttribute("data-itemvalue");e&&x(e)}},L=e=>{w(!1)},x=e=>{h(!1),v(!1),C(e),i(e)};return(0,r.useEffect)(()=>{_(a.length)},[a]),r.createElement("div",{className:eN.douyin_login_comp_area_code},r.createElement("div",{className:eN.input_container},r.createElement("input",{type:"text",size:m,name:"web-login-area-code-input",className:eN.input,autoComplete:"off",value:a,onChange:e=>{var t;let n=(null==(t=e.target)?void 0:t.value)||"";(n=n.trim().replace(/[^\d\+]+/g,""))||(n="+"),i(n),w(!0)},onFocus:y,onClick:y,onKeyUp:e=>{if(d.includes(e.code)){var t,n;let e=null==E||null==(n=E.current)||null==(t=n.firstElementChild)?void 0:t.getAttribute("data-itemvalue");if(!e)return void w(!1);w(!1),C(e),i(e)}},onBlur:e=>{let t=Object.keys(s).filter(e=>s[e]===a);if(t.length>0){let e=s[t[0]];w(!1),C(e),i(e)}else w(!1),i(p);null==o||o()},ref:b,role:"combobox",tabIndex:0,"aria-owns":"select-ul","aria-activedescendant":"areacode_item_0","aria-label":"国家/地区",maxLength:5}),r.createElement("i",{onMouseDown:e=>{if(g)h(!0);else{var t;null==b||null==(t=b.current)||t.focus(),null==e||e.preventDefault()}},className:`${eN.icon_arrow} `})),g&&r.createElement("div",{className:eN.select_list_container},r.createElement("ul",{id:"select-ul",className:eN.select_list,ref:E},(t=[],n=Object.keys(s),(f&&(n=Object.keys(s).filter(e=>-1!==s[e].indexOf(a)||-1!==e.indexOf(a))),n.forEach((e,n)=>{let o=s[e],l=o===a;t.push(r.createElement("li",{key:e,className:`${eN.select_list_item} ${l?eN.select_list_item_active:""}`,onMouseDown:x.bind(null,o),"data-itemvalue":o,id:`areacode_item_${n}`,tabIndex:0,onKeyDown:N,onBlur:L,"aria-label":`${e}${o}`},r.createElement("span",null,e),r.createElement("span",null,o)))}),t.length>0)?t:r.createElement("li",{className:eN.select_list_item,tabIndex:0,id:"areacode_item_no_match",onKeyDown:N,onBlur:L,"aria-label":c},c)))))};n("415134");let ex={douyin_login_comp_normal_input:"C0XgMbmS",use_bg_light_color:"X5L8kib_",input_line:"utHcTMiX",password_icon_before:"VpEL4m8Q",password_icon_after:"TiXvEVEe",input:"yKcGN1NT"},eS=()=>r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},r.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.3362 7.0647C3.57666 6.92893 3.88165 7.01379 4.01742 7.25425C4.99015 8.97701 7.26773 10.2501 9.99957 10.2501C12.7314 10.2501 15.009 8.97701 15.9817 7.25425C16.1175 7.01379 16.4225 6.92893 16.6629 7.0647C16.9034 7.20047 16.9883 7.50546 16.8525 7.74592C16.8309 7.78412 16.8089 7.82208 16.7864 7.85981C16.3066 8.66332 16.2326 9.72327 16.8674 10.4109C17.0547 10.6139 17.0421 10.9302 16.8391 11.1175C16.6362 11.3048 16.3199 11.2921 16.1326 11.0892L15.7908 10.719C15.3001 10.1874 14.5202 10.097 13.8665 10.4068C13.1661 10.7386 12.6847 11.4935 12.859 12.2487L12.9872 12.8043C13.0493 13.0734 12.8815 13.3419 12.6124 13.404C12.3434 13.466 12.0749 13.2983 12.0128 13.0292L11.9275 12.6593C11.7279 11.7945 10.8871 11.2501 9.99957 11.2501C9.11249 11.2501 8.27218 11.7943 8.07271 12.6586L7.9872 13.0292C7.9251 13.2983 7.65664 13.466 7.38757 13.404C7.1185 13.3419 6.95071 13.0734 7.01281 12.8043L7.14093 12.2491C7.31522 11.4939 6.83373 10.7389 6.13324 10.407C5.47948 10.0973 4.69954 10.1877 4.20887 10.7193L3.8674 11.0892C3.6801 11.2921 3.36377 11.3048 3.16086 11.1175C2.95795 10.9302 2.9453 10.6139 3.1326 10.4109C3.76714 9.72353 3.69321 8.66396 3.21341 7.86086C3.19067 7.82279 3.16841 7.78447 3.14664 7.74592C3.01087 7.50546 3.09574 7.20047 3.3362 7.0647Z",fill:"#161823",fillOpacity:"0.34"})),ek=()=>r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},r.createElement("path",{d:"M10.2265 10.103L10.9121 7.33139C10.935 7.23877 10.8842 7.14308 10.7975 7.12386C10.6152 7.08345 10.4265 7.06223 10.2331 7.06223C8.68675 7.06223 7.43315 8.4203 7.43315 10.0956C7.43315 11.7708 8.68675 13.1289 10.2331 13.1289C11.7795 13.1289 13.0331 11.7708 13.0331 10.0956C13.0331 9.88626 13.0136 9.68191 12.9763 9.48455C12.9586 9.3906 12.8703 9.33557 12.7848 9.36039L10.2265 10.103Z",fill:"#161823",fillOpacity:"0.34"}),r.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.2332 4C13.7078 4 16.628 6.57111 17.4613 10.0529C17.468 10.0808 17.468 10.1103 17.4613 10.1382C16.628 13.62 13.7077 16.1911 10.2332 16.1911C6.75857 16.1911 3.8383 13.62 3.00501 10.1382C2.99833 10.1103 2.99833 10.0808 3.00501 10.0529C3.8383 6.57109 6.75857 4 10.2332 4ZM10.2332 14.8911C7.4137 14.8911 5.02658 12.8729 4.24063 10.0955C5.02658 7.31824 7.4137 5.3 10.2332 5.3C13.0526 5.3 15.4397 7.31825 16.2257 10.0956C15.4397 12.8729 13.0526 14.8911 10.2332 14.8911Z",fill:"#161823",fillOpacity:"0.34"})),eA=()=>r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"2",height:"14",viewBox:"0 0 2 14",fill:"none"},r.createElement("path",{d:"M1 1V13",stroke:"#161823",strokeOpacity:"0.06",strokeLinecap:"square"})),eI=e=>{let{value:t="",type:n="tel",onChange:o,onBlur:l,onFocus:i,placeholder:a="",autoComplete:s="on",inputLabel:c="",maxLength:d=50,showAreaCode:m=!1,districtList:_=u,areaCodeNoMatchedResult:g,showPasswordIcon:h="none",showPassword:p=!1,onShowPasswordChange:C,areaCodeValue:f="",onAreaCodeChange:v=()=>{},onAreaCodeBlur:b,width:E,height:w=52,useBgLightColor:y=!0}=e||{},N=(0,r.useRef)(null),[L,x]=(0,r.useState)(!1);(0,r.useEffect)(()=>{x(p)},[p]);let S=(0,r.useMemo)(()=>"none"!==h?L?"text":"password":n,[n,h,L]),k=e=>{e.stopPropagation(),null==C||C(!L)};return r.createElement("div",{id:"douyin_login_comp_normal_input_id",className:`${ex.douyin_login_comp_normal_input} ${y?ex.use_bg_light_color:""}`,style:{width:E,height:w}},m&&r.createElement(r.Fragment,null,r.createElement(eL,{areaCodeValue:f,onAreaCodeChange:v,onAreaCodeBlur:b,onTab:()=>{var e,t;null==(t=N.current)||null==(e=t.focus)||e.call(t)},districtList:_,areaCodeNoMatchedResult:g}),r.createElement("div",{className:ex.input_line},r.createElement(eA,null))),"before"===h&&r.createElement(r.Fragment,null,r.createElement("div",{className:ex.password_icon_before,onClick:k},L?r.createElement(ek,null):r.createElement(eS,null)),r.createElement("div",{className:ex.input_line},r.createElement(eA,null))),r.createElement("input",{ref:N,id:"normal-input",name:"normal-input",type:S,className:`${ex.input} ${y?ex.use_bg_light_color:""}`,value:t,placeholder:a,onChange:e=>{o((e.target.value||"").trim())},onBlur:()=>{null==l||l()},onFocus:()=>{null==i||i()},autoComplete:s,tabIndex:0,"aria-label":c,maxLength:d}),"after"===h&&r.createElement("div",{className:ex.password_icon_after,onClick:k},L?r.createElement(ek,null):r.createElement(eS,null)))};n("66425");let eO={douyin_login_comp_button_input:"qnf7kdoT",use_bg_light_color:"_Yqor1vk",input_wrapper:"HAJXeM_Z",input:"tnpNAdqe",button_text:"gKXDWaPG",disabled:"KX2Mhb6E"},eT=e=>{let{value:t="",type:n="tel",placeholder:o="",buttonText:l="",maxLength:i=50,inputLabel:a="",onChange:s,onBlur:c=()=>{},onFocus:u,onClick:m,disabled:_=!1,width:g,height:h=52,useBgLightColor:p=!0}=e||{};return r.createElement("div",{id:"douyin_login_comp_button_input_id",className:`${eO.douyin_login_comp_button_input} ${p?eO.use_bg_light_color:""}`,style:{width:g,height:h}},r.createElement("div",{className:eO.input_wrapper},r.createElement("input",{name:"button-input",id:"button-input",type:n,className:`${eO.input} ${p?eO.use_bg_light_color:""}`,placeholder:o,onChange:e=>{s((e.target.value||"").trim())},value:t,onBlur:e=>{c()},onFocus:()=>{null==u||u()},autoComplete:"off",maxLength:i,tabIndex:0,"aria-label":a})),l&&r.createElement("span",{className:`${eO.button_text} ${_?eO.disabled:""}`,onMouseDown:m,onKeyDown:e=>{d.includes(e.code)&&(null==m||m())},tabIndex:0,"aria-live":"off"},l))};n("26604");let eP={douyin_login_comp_confirm_info:"_Dm8MLLH",checkbox:"qCQ_xv8_",checked:"cZczSr2k",before_text:"U90uXfg6",confirm_item:"oJHycERU",connect_text:"f64a2kjb"},eB=e=>{let t,n,{config:o}=Y(),{allTextConfig:l,confirm:i}=o||{},{confirmInfoText:a}=l||{},{beforeText:s=null==a?void 0:a.confirmInfoBeforeText,connectText:c=null==a?void 0:a.confirmInfoConnectText,confirm:u=[{text:(null==i?void 0:i[0].text)||"用户协议",url:(null==i?void 0:i[0].url)||"https://www.douyin.com/agreements/?id=6773906068725565448",open:"_blank"},{text:(null==i?void 0:i[1].text)||"隐私政策",url:(null==i?void 0:i[1].url)||"https://www.douyin.com/agreements/?id=6773901168964798477",open:"_blank"}],needCheck:m=!1,checked:_=!1,onCheckClick:g,style:h}=e,[p,C]=(0,r.useState)(_),f=()=>{null==g||g(!p)};return(0,r.useEffect)(()=>{C(_)},[_]),r.createElement("div",{className:eP.douyin_login_comp_confirm_info,style:h,"aria-label":(t=u.map(e=>e.text),`${s}${t.join(c)}`)},m&&r.createElement("span",{className:`${eP.checkbox} ${p?eP.checked:""}`,role:"checkbox","aria-checked":p,tabIndex:0,"aria-label":"协议勾选框",onClick:f,onKeyDown:e=>{d.includes(e.code)&&f()}}),r.createElement("span",{className:eP.before_text},s),(n=[],u.forEach((e,t)=>{let{text:o="",url:l="",open:i="_blank"}=e;n.push(r.createElement("a",{target:i,key:t,href:l,className:eP.confirm_item,tabIndex:0,"aria-label":o},o)),t!==u.length-1&&n.push(r.createElement("span",{key:`${t}span`,className:eP.connect_text},c))}),n))};n("869275");let eM={douyin_login_comp_mobile_code:"Bl7zNBFy",douyinLoginCompMobileCode:"Bl7zNBFy",flat_container:"CHjD9seA",flatContainer:"CHjD9seA",mobile_input:"OpnMqKk5",mobileInput:"OpnMqKk5",bottom_text:"OplenIJn",bottomText:"OplenIJn",error_text:"HdQFpayX",errorText:"HdQFpayX",send_voice_code:"efg2uXUn",sendVoiceCode:"efg2uXUn",submit_btn:"g77P7XoZ",submitBtn:"g77P7XoZ",agreement:"WJzxGFu1",custom_footer:"aIjAZWXK",customFooter:"aIjAZWXK",tab_container:"BjbhBG5I",tabContainer:"BjbhBG5I",tab_container_with_third:"_DH0G9pX",tabContainerWithThird:"_DH0G9pX"},eD=e=>{let{config:t}=Y(),{allTextConfig:n,isShowProtocol:o=!0}=t||{},{mobileCodeLoginText:l,districtList:i,extraText:a}=n||{},{mobile:s,onMobileChange:c,onMobileBlur:u,onMobileFocus:d,areaCode:m,onAreaCodeChange:_,onAreaCodeBlur:g,code:h,onCodeChange:p,onCodeBlur:C,onCodeFocus:f,loginOnly:v=!0,sendBtnText:b=null==l?void 0:l.sendCode,sendBtnDisabled:E=!1,onSend:w,errorText:y,showVoiceCode:N=!1,onShowVoiceCode:L,submitBtnDisabled:x=!1,submitBtnLoading:S=!1,submitBtnSuccess:k=!1,onSubmit:A,loginPanelType:I="flat",CustomFooter:O,confirmInfoProps:T,footer:P,useBgLightColor:B=!0}=e||{},M=(0,r.useMemo)(()=>v?null==l?void 0:l.buttonText:null==l?void 0:l.registerText,[v]);return r.createElement("div",{className:eM.douyin_login_comp_mobile_code},r.createElement("div",{className:`${"flat"===I?eM.flat_container:eM.tab_container} ${P?eM.tab_container_with_third:""}`},r.createElement("div",{className:eM.mobile_input},r.createElement(eI,{autoComplete:"off",value:s,onChange:c,onBlur:u,onFocus:d,showAreaCode:!0,districtList:i,placeholder:null==l?void 0:l.mobilePlaceholder,areaCodeValue:m,onAreaCodeChange:_,onAreaCodeBlur:g,width:"flat"===I?253:294,areaCodeNoMatchedResult:null==a?void 0:a.areaCodeNoMatchedResult,useBgLightColor:B})),r.createElement("div",{className:eM.code_input},r.createElement(eT,{value:h,onChange:p,onBlur:C,onFocus:f,buttonText:b,disabled:E,placeholder:null==l?void 0:l.codePlaceholder,maxLength:6,width:"flat"===I?253:294,onClick:w,useBgLightColor:B})),r.createElement("div",{className:eM.bottom_text},y&&r.createElement("p",{id:"error_text_id",className:eM.error_text},y),N&&r.createElement("p",{className:eM.send_voice_code,onClick:L},null==l?void 0:l.showVoiceCodeText)),o&&"tab"===I&&r.createElement("div",{className:eM.agreement},r.createElement(eB,T||{})),r.createElement("div",{className:P?"":`${eM.submit_btn}`},r.createElement(H,{disabled:x,content:M,style:"flat"===I?{width:253,height:48}:{width:294,height:48},onClick:A,loading:S,success:k})),o&&"flat"===I&&r.createElement("div",{className:eM.agreement},r.createElement(eB,T||{})),P&&r.createElement("div",{className:eM.footer},P()),O&&r.createElement("div",{className:eM.custom_footer},r.createElement(O,null))))};n("524491");let eG={douyin_login_comp_email_code:"yo8AkRvN",douyinLoginCompEmailCode:"yo8AkRvN",flat_container:"hNbwiL3f",flatContainer:"hNbwiL3f",email_input:"iOEH6Vwi",emailInput:"iOEH6Vwi",bottom_text:"ReShOeoB",bottomText:"ReShOeoB",error_text:"rTcuwiWA",errorText:"rTcuwiWA",send_voice_code:"VJXXJxrs",sendVoiceCode:"VJXXJxrs",submit_btn:"o3qxPQtJ",submitBtn:"o3qxPQtJ",agreement:"KlRZZMFC",custom_footer:"UnwDJ5o_",customFooter:"UnwDJ5o_",tab_container:"YjdJcBey",tabContainer:"YjdJcBey",tab_container_with_third:"bkrdCjUS",tabContainerWithThird:"bkrdCjUS"},eR=e=>{let{config:t}=Y(),{allTextConfig:n,isShowProtocol:o=!0}=t||{},{emailCodeLoginText:l,districtList:i,extraText:a}=n||{},{email:s,onEmailChange:c,onEmailBlur:u,onEmailFocus:d,code:m,onCodeChange:_,onCodeBlur:g,onCodeFocus:h,loginOnly:p=!0,sendBtnText:C=null==l?void 0:l.sendCode,sendBtnDisabled:f=!1,onSend:v,errorText:b,submitBtnDisabled:E=!1,submitBtnLoading:w=!1,submitBtnSuccess:y=!1,onSubmit:N,loginPanelType:L="flat",CustomFooter:x,confirmInfoProps:S,footer:k,useBgLightColor:A=!0}=e||{},I=(0,r.useMemo)(()=>p?null==l?void 0:l.buttonText:null==l?void 0:l.registerText,[p]);return r.createElement("div",{className:eG.douyin_login_comp_email_code},r.createElement("div",{className:`${"flat"===L?eG.flat_container:eG.tab_container} ${k?eG.tab_container_with_third:""}`},r.createElement("div",{className:eG.email_input},r.createElement(eI,{type:"text",autoComplete:"off",value:s,onChange:c,onBlur:u,onFocus:d,districtList:i,placeholder:null==l?void 0:l.emailPlaceholder,width:"flat"===L?253:294,areaCodeNoMatchedResult:null==a?void 0:a.areaCodeNoMatchedResult,useBgLightColor:A})),r.createElement("div",{className:eG.code_input},r.createElement(eT,{type:"text",value:m,onChange:_,onBlur:g,onFocus:h,buttonText:C,disabled:f,placeholder:null==l?void 0:l.codePlaceholder,maxLength:6,width:"flat"===L?253:294,onClick:v,useBgLightColor:A})),r.createElement("div",{className:eG.bottom_text},b&&r.createElement("p",{id:"error_text_id",className:eG.error_text},b)),o&&"tab"===L&&r.createElement("div",{className:eG.agreement},r.createElement(eB,S||{})),r.createElement("div",{className:k?"":`${eG.submit_btn}`},r.createElement(H,{disabled:E,content:I,style:"flat"===L?{width:253,height:48}:{width:294,height:48},onClick:N,loading:w,success:y})),o&&"flat"===L&&r.createElement("div",{className:eG.agreement},r.createElement(eB,S||{})),k&&r.createElement("div",{className:eG.footer},k()),x&&r.createElement("div",{className:eG.custom_footer},r.createElement(x,null))))};n("586441");let eF={douyin_login_comp_account_pwd:"EL05ZfXk",douyinLoginCompAccountPwd:"EL05ZfXk",flat_container:"DOaCVHjs",flatContainer:"DOaCVHjs",mobile_input:"pYxSyJrd",mobileInput:"pYxSyJrd",bottom_text:"BUimmjXD",bottomText:"BUimmjXD",error_text:"RCqGdsUq",errorText:"RCqGdsUq",submit_btn:"aoUKHqSw",submitBtn:"aoUKHqSw",agreement:"VVopL4dl",custom_footer:"aj6m66Oy",customFooter:"aj6m66Oy",tab_container:"KZsZxuWE",tabContainer:"KZsZxuWE",tab_container_with_third:"eYeppPGm",tabContainerWithThird:"eYeppPGm"},eq=e=>{let{config:t}=Y(),{allTextConfig:n,isShowProtocol:o=!0}=t||{},{accountPwdLoginText:l,districtList:i,extraText:a}=n||{},{mobile:s,onMobileChange:c,onMobileBlur:u,onMobileFocus:d,areaCode:m,onAreaCodeChange:_,onAreaCodeBlur:g,password:h,onPasswordChange:p,onPasswordBlur:C,onPasswordFocus:f,errorText:v,submitBtnDisabled:b=!1,submitBtnLoading:E=!1,submitBtnSuccess:w=!1,onSubmit:y,loginPanelType:N="flat",CustomFooter:L,confirmInfoProps:x,footer:S,useBgLightColor:k=!0}=e||{},[A,I]=(0,r.useState)(!1);return r.createElement("div",{className:eF.douyin_login_comp_account_pwd},r.createElement("div",{className:`${"flat"===N?eF.flat_container:eF.tab_container} ${S?eF.tab_container_with_third:""}`},r.createElement("div",{className:eF.mobile_input},r.createElement(eI,{autoComplete:"off",value:s,onChange:c,onBlur:u,onFocus:d,showAreaCode:!0,districtList:i,placeholder:null==l?void 0:l.accountPlaceholder,areaCodeValue:m,onAreaCodeChange:_,onAreaCodeBlur:g,width:"flat"===N?253:294,inputLabel:null==l?void 0:l.accountLabel,areaCodeNoMatchedResult:null==a?void 0:a.areaCodeNoMatchedResult,useBgLightColor:k})),r.createElement("div",{className:"password_input"},r.createElement(eI,{value:h,type:"password",onChange:p,onBlur:C,onFocus:f,showPasswordIcon:"before",showPassword:A,onShowPasswordChange:e=>I(e),placeholder:null==l?void 0:l.pwdPlaceholder,maxLength:20,width:"flat"===N?253:294,inputLabel:null==l?void 0:l.pwdLabel,areaCodeNoMatchedResult:null==a?void 0:a.areaCodeNoMatchedResult,useBgLightColor:k})),r.createElement("div",{className:eF.bottom_text},v&&r.createElement("p",{id:"error_text_id",className:eF.error_text},v)),o&&"tab"===N&&r.createElement("div",{className:eF.agreement},r.createElement(eB,x||{})),r.createElement("div",{className:S?"":`${eF.submit_btn}`},r.createElement(H,{disabled:b,content:null==l?void 0:l.buttonText,style:"flat"===N?{width:253,height:48}:{width:294,height:48},onClick:y,loading:E,success:w})),o&&"flat"===N&&r.createElement("div",{className:eF.agreement},r.createElement(eB,x||{})),S&&r.createElement("div",{className:eF.footer},S()),L&&r.createElement("div",{className:eF.custom_footer},r.createElement(L,null))))},eV=r.lazy(()=>n.e("8959").then(n.bind(n,175762))),eU=()=>{let[e,t]=(0,r.useState)(!0),{animationData:n,isLoading:o}=V("https://lf-ucenter-web.yhgfb-cn-static.com/obj/passport-fe/scan-code-guide-side.json");return(0,r.useEffect)(()=>{let e=document.querySelector("#default_scan_code_guide"),n=new IntersectionObserver(e=>{let[n]=e;(null==n?void 0:n.isIntersecting)?t(!0):t(!1)},{root:document.querySelector("#animate_qrcode_container"),threshold:.8});return e&&(null==n||n.observe(e)),()=>{null==n||n.disconnect()}},[]),r.createElement("div",{id:"default_scan_code_guide"},eV&&r.createElement(r.Suspense,{fallback:r.createElement("div",null)},!o&&n&&r.createElement(eV,{autoplay:!0,loop:!0,data:n,lottieCdn:C,stop:e})))};n("140939");let eH={douyin_login_comp_scan_code:"pE9ZOPEo",douyinLoginCompScanCode:"pE9ZOPEo",flat_container:"ISm_de1v",flatContainer:"ISm_de1v",qrcode:"XI37I0dP",qrcode_img:"RhjdbXj8",qrcodeImg:"RhjdbXj8",qrcode_icon:"S07JvDdQ",qrcodeIcon:"S07JvDdQ",qrcode_expired:"l7F58uTM",qrcodeExpired:"l7F58uTM",animate_qrcode_container:"J2iCN0Aj",animateQrcodeContainer:"J2iCN0Aj",animate_btn:"zzs0DGQV",animateBtn:"zzs0DGQV",animate_guide:"YJz68tAT",animateGuide:"YJz68tAT",avatar:"YXTU7CIH",avatar_desc:"aVPNKFNC",avatarDesc:"aVPNKFNC",avatar_btn:"KaVJjmG9",avatarBtn:"KaVJjmG9",description:"qNjfzEhh",description_text:"JwjO4Ze9",descriptionText:"JwjO4Ze9",description_icon:"EPPXe434",descriptionIcon:"EPPXe434",new_flat_container:"GMa6xUrj",newFlatContainer:"GMa6xUrj",tab_container:"BNnuxEd3",tabContainer:"BNnuxEd3",single_container:"f5_3ZlYq",singleContainer:"f5_3ZlYq",other_login:"HXEjhYKm",otherLogin:"HXEjhYKm"},ej=e=>{let{className:t}=e;return r.createElement("svg",{className:t,xmlns:"http://www.w3.org/2000/svg",width:"17",height:"16",viewBox:"0 0 17 16",fill:"none"},r.createElement("circle",{cx:"8.5",cy:"8",r:"8",fill:"white"}),r.createElement("circle",{cx:"8.5",cy:"8",r:"7.5",stroke:"#161823",strokeOpacity:"0.06"}),r.createElement("path",{d:"M4.75 5.49998C4.75 5.26986 4.93655 5.08331 5.16667 5.08331H11.8333C12.0635 5.08331 12.25 5.26986 12.25 5.49998C12.25 5.7301 12.0635 5.91665 11.8333 5.91665H5.16667C4.93655 5.91665 4.75 5.7301 4.75 5.49998Z",fill:"#4f5055ff",fillOpacity:"0.75"}),r.createElement("path",{d:"M4.75 7.99998C4.75 7.76986 4.93655 7.58331 5.16667 7.58331H11.8333C12.0635 7.58331 12.25 7.76986 12.25 7.99998C12.25 8.2301 12.0635 8.41665 11.8333 8.41665H5.16667C4.93655 8.41665 4.75 8.2301 4.75 7.99998Z",fill:"#161823",fillOpacity:"0.75"}),r.createElement("path",{d:"M5.16667 10.0833C4.93655 10.0833 4.75 10.2699 4.75 10.5C4.75 10.7301 4.93655 10.9166 5.16667 10.9166H8.91667C9.14679 10.9166 9.33333 10.7301 9.33333 10.5C9.33333 10.2699 9.14679 10.0833 8.91667 10.0833H5.16667Z",fill:"#161823",fillOpacity:"0.75"}))},e$=()=>r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"40",viewBox:"0 0 40 40",fill:"none"},r.createElement("rect",{x:"0.701754",y:"0.701754",width:"38.5965",height:"38.5965",rx:"7.7193",fill:"#111111",stroke:"white",strokeWidth:"1.40351"}),r.createElement("path",{d:"M17.666 16.704V15.6544C17.3013 15.6107 16.9367 15.5815 16.5575 15.5815C12.0359 15.5815 8.3457 19.2552 8.3457 23.7889C8.3457 26.5587 9.73135 29.0224 11.8463 30.5093C10.4752 29.0369 9.64384 27.0835 9.64384 24.926C9.65842 20.4506 13.2319 16.8061 17.666 16.704Z",fill:"#00FAF0"}),r.createElement("path",{d:"M17.8561 28.6426C19.8689 28.6426 21.5171 27.039 21.5901 25.0419V7.18395H24.8573C24.7843 6.8195 24.7552 6.44048 24.7552 6.04688H20.2919V23.9048C20.219 25.902 18.5708 27.5055 16.558 27.5055C15.9308 27.5055 15.3328 27.3452 14.8223 27.0682C15.5078 28.0303 16.6163 28.6426 17.8561 28.6426Z",fill:"#00FAF0"}),r.createElement("path",{d:"M30.9669 13.2489V12.2576C29.7271 12.2576 28.5603 11.8931 27.583 11.2517C28.4582 12.243 29.6396 12.9573 30.9669 13.2489Z",fill:"#00FAF0"}),r.createElement("path",{d:"M27.5996 11.253C26.6515 10.1597 26.0681 8.74562 26.0681 7.18579H24.8721C25.193 8.87683 26.1993 10.3346 27.5996 11.253Z",fill:"#FE2C55"}),r.createElement("path",{d:"M16.5581 20.0269C14.4869 20.0269 12.8096 21.7033 12.8096 23.7734C12.8096 25.2166 13.6264 26.4557 14.8224 27.0826C14.3848 26.4703 14.1077 25.7123 14.1077 24.8959C14.1077 22.8258 15.7851 21.1494 17.8562 21.1494C18.2355 21.1494 18.6147 21.2077 18.9648 21.3243V16.776C18.6001 16.7323 18.2355 16.7031 17.8562 16.7031C17.7979 16.7031 17.725 16.7031 17.6666 16.7031V20.2018C17.3166 20.0852 16.9519 20.0269 16.5581 20.0269Z",fill:"#FE2C55"}),r.createElement("path",{d:"M30.9677 13.2483V16.7178C28.6485 16.7178 26.519 15.9744 24.7687 14.7207V23.7735C24.7687 28.2927 21.0931 31.9809 16.557 31.9809C14.8067 31.9809 13.1877 31.4269 11.8604 30.4939C13.3627 32.0975 15.4922 33.118 17.8697 33.118C22.3913 33.118 26.0815 29.4443 26.0815 24.9106V15.8577C27.8317 17.1114 29.9758 17.8549 32.2804 17.8549V13.3941C31.8282 13.3795 31.3907 13.3358 30.9677 13.2483Z",fill:"#FE2C55"}),r.createElement("path",{d:"M24.7681 23.7737V14.7209C26.5184 15.9745 28.6625 16.718 30.9671 16.718V13.2485C29.6252 12.9569 28.4583 12.2426 27.5832 11.2513C26.1829 10.3475 25.1765 8.88969 24.8702 7.18408H21.603V25.042C21.5301 27.0392 19.8819 28.6427 17.8691 28.6427C16.6147 28.6427 15.5062 28.0305 14.8352 27.0829C13.6392 26.456 12.8224 25.2023 12.8224 23.7737C12.8224 21.7037 14.4998 20.0272 16.5709 20.0272C16.9502 20.0272 17.3294 20.0855 17.6795 20.2021V16.7034C13.2454 16.8055 9.67188 20.45 9.67188 24.8962C9.67188 27.0537 10.5033 29.0218 11.8743 30.4795C13.2016 31.4125 14.8352 31.9665 16.5709 31.9665C21.0779 31.9811 24.7681 28.2929 24.7681 23.7737Z",fill:"white"})),ez=()=>r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none"},r.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.33785 3.17085C8.56565 2.94305 8.935 2.94305 9.1628 3.17085L12.5096 6.51763C12.5649 6.54507 12.6167 6.58182 12.6628 6.62789C12.7821 6.74722 12.839 6.90539 12.8333 7.06171C12.8335 7.06889 12.8337 7.0761 12.8337 7.08333C12.8337 7.16495 12.8169 7.24265 12.7866 7.31318C12.7605 7.37429 12.7234 7.43185 12.6754 7.48287C12.6671 7.49163 12.6586 7.50013 12.6499 7.50836C12.6071 7.5486 12.5598 7.58117 12.5096 7.60607L9.1628 10.9528C8.935 11.1806 8.56565 11.1806 8.33785 10.9528C8.11004 10.725 8.11004 10.3557 8.33785 10.1279L10.7991 7.66667H1.75033C1.42816 7.66667 1.16699 7.4055 1.16699 7.08333C1.16699 6.76117 1.42816 6.5 1.75033 6.5H10.842L8.33785 3.99581C8.11004 3.76801 8.11004 3.39866 8.33785 3.17085Z",fill:"var(--color-text-t1-ucenter)"})),eZ=()=>r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"87",height:"86",viewBox:"0 0 87 86",fill:"none"},r.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M43.7993 69.2779C58.3121 69.2779 70.077 57.5129 70.077 43.0001C70.077 28.4873 58.3121 16.7223 43.7993 16.7223C29.2864 16.7223 17.5215 28.4873 17.5215 43.0001C17.5215 57.5129 29.2864 69.2779 43.7993 69.2779Z",fill:"#161823",fillOpacity:"0.75"}),r.createElement("path",{d:"M59.0724 43.25C59.0724 35.3405 52.5089 29 44.5016 29C39.4341 29 34.9544 31.5335 32.3414 35.3966V32.7672C32.3414 31.8445 31.5934 31.0965 30.6707 31.0965C29.748 31.0965 29 31.8445 29 32.7672V39.581C29 40.5037 29.748 41.2517 30.6707 41.2517H37.4845C38.4072 41.2517 39.1552 40.5037 39.1552 39.581C39.1552 38.6583 38.4072 37.9103 37.4845 37.9103H34.7071C36.626 34.5975 40.2827 32.3414 44.5016 32.3414C50.7434 32.3414 55.731 37.2647 55.731 43.25C55.731 49.2353 50.7434 54.1586 44.5016 54.1586C39.5 54.1586 35.2891 50.9879 33.8264 46.6452C33.5319 45.7708 32.5842 45.3007 31.7098 45.5952C30.8354 45.8898 30.3653 46.8374 30.6598 47.7118C32.5812 53.4161 38.068 57.5 44.5016 57.5C52.5089 57.5 59.0724 51.1595 59.0724 43.25Z",fill:"white"})),eJ=()=>r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"61",height:"60",viewBox:"0 0 61 60",fill:"none"},r.createElement("path",{d:"M30.5 12C40.4411 12 48.5 20.0589 48.5 30C48.5 39.9411 40.4411 48 30.5 48C20.5589 48 12.5 39.9411 12.5 30C12.5 20.0589 20.5589 12 30.5 12Z",fill:"#161823","fill-opacity":"0.75"}),r.createElement("path",{d:"M40.5 30C40.5 24.4495 36.1349 20 30.8095 20C27.4393 20 24.46 21.7779 22.7222 24.4889V22.6437C22.7222 21.9961 22.2248 21.4712 21.6111 21.4712C20.9975 21.4712 20.5 21.9961 20.5 22.6437V27.4253C20.5 28.0728 20.9975 28.5977 21.6111 28.5977H26.1427C26.7564 28.5977 27.2538 28.0728 27.2538 27.4253C27.2538 26.7778 26.7564 26.2529 26.1427 26.2529H24.2956C25.5718 23.9281 28.0037 22.3448 30.8095 22.3448C34.9607 22.3448 38.2778 25.7998 38.2778 30C38.2778 34.2002 34.9607 37.6552 30.8095 37.6552C27.4831 37.6552 24.6826 35.4301 23.7098 32.3826C23.514 31.769 22.8837 31.4391 22.3022 31.6458C21.7206 31.8525 21.408 32.5175 21.6039 33.1311C22.8817 37.1341 26.5308 40 30.8095 40C36.1349 40 40.5 35.5505 40.5 30Z",fill:"white"})),eW=()=>r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"15",viewBox:"0 0 14 15",fill:"none"},r.createElement("path",{d:"M11.083 12.5169C11.083 13.1613 10.5607 13.6836 9.91634 13.6836L4.08301 13.6836C3.43868 13.6836 2.91634 13.1613 2.91634 12.5169L2.91634 2.60027C2.91634 1.95594 3.43868 1.4336 4.08301 1.4336L9.91634 1.4336C10.5607 1.4336 11.083 1.95594 11.083 2.60027L11.083 12.5169ZM9.91634 10.4753L9.91634 3.1836C9.91634 2.86144 9.65517 2.60027 9.33301 2.60027L4.66634 2.60027C4.34418 2.60027 4.08301 2.86144 4.08301 3.1836L4.08301 10.4753C4.08301 10.7974 4.34418 11.0586 4.66634 11.0586L9.33301 11.0586C9.65517 11.0586 9.91634 10.7974 9.91634 10.4753ZM7.89421 12.6155C8.05529 12.6155 8.18588 12.4849 8.18588 12.3238C8.18588 12.1627 8.05529 12.0321 7.89421 12.0321L6.14421 12.0321C5.98313 12.0321 5.85254 12.1627 5.85254 12.3238C5.85254 12.4849 5.98313 12.6155 6.14421 12.6155L7.89421 12.6155Z",fill:"#161823"})),eK=e=>{let{config:t}=Y(),{allTextConfig:n,scanCodeGuideContent:o,scanCodeLogo:l}=t||{},{scanCodeLoginText:i}=n||{},{qrcodeSize:a,iconSize:s,avatarSize:c,showTips:u=!0,showTipsText:d=null==i?void 0:i.showTipText,desc:m,loginPanelType:_="flat",qrcodeImg:g,expired:p=!1,onRefresh:C,cancelLogin:f,qrcodeStatus:v="new",notDisplayAvatar:b=!1,avatar:E=h,device:w=null==i?void 0:i.scanDeviceText,isShowOtherLogin:y=!1,onShowOtherLogin:N,useShortUrl:L=!0}=e||{},x=(0,r.useMemo)(()=>{var e;return m||r.createElement(r.Fragment,null,r.createElement("p",{className:eH.description_text},(e=null==i?void 0:i.scanDescPrefix)?e.split(/(「抖音APP」)/).map((e,t)=>"「抖音APP」"===e?r.createElement("span",{key:t,style:{color:"var(--color-primary-default-ucenter)"}},e):e):null),r.createElement(ej,{className:eH.description_icon}),r.createElement("p",{className:eH.description_text},null==i?void 0:i.scanDescSuffix))},[m]),S=(0,r.useMemo)(()=>!b&&!p&&("scanned"===v||"confirmed"===v),[v,b,p]),k=(0,r.useMemo)(()=>{if("scanned"===v){var e;return null==i||null==(e=i.scannedDesc)?void 0:e.replace("{device}",`${w||"扫码设备"}`)}return"confirmed"===v?null==i?void 0:i.loggingIn:""},[v,w]),A=()=>r.createElement("div",{className:eH.qrcode,style:a?{width:a,height:a}:{}},g&&r.createElement("img",{alt:"",src:g,className:eH.qrcode_img,tabIndex:0,"aria-label":"二维码"}),r.createElement("span",{className:eH.qrcode_icon,style:s?{width:s,height:s}:{}},l?l():r.createElement(e$,null)),p&&r.createElement("div",{className:eH.qrcode_expired,onClick:C},L?r.createElement(eJ,null):r.createElement(eZ,null),r.createElement("p",null,null==i?void 0:i.codeExpiredDesc),r.createElement("p",null,null==i?void 0:i.refreshText)));return r.createElement("div",{className:eH.douyin_login_comp_scan_code,id:"douyin_login_comp_scan_code"},r.createElement("div",{className:`${eH[`${_}_container`]} ${L?eH.new_flat_container:""}`},S?r.createElement("div",{className:eH.avatar,style:a?{width:a,height:a}:{}},r.createElement(D,{url:E,size:c||("flat"===_?160:"single"===_?100:140)}),r.createElement("p",{id:"douyin_login_comp_scan_code_avatar_desc_id",className:eH.avatar_desc},k),"scanned"===v&&r.createElement("div",{onClick:f,className:eH.avatar_btn},null==i?void 0:i.cancelLogin)):u?r.createElement("div",{id:"animate_qrcode_container",className:eH.animate_qrcode_container,style:a?{width:a,height:a}:{}},r.createElement("div",{className:eH.animate_btn},d,"tab"===_&&r.createElement(eW,null)),A(),r.createElement("div",{className:eH.animate_guide},o?o():r.createElement(eU,null))):A(),!S&&r.createElement("p",{className:eH.description},x),!S&&"single"===_&&y&&r.createElement("div",{className:eH.other_login,onClick:N},r.createElement("p",null,"登录其他账号"),r.createElement(ez,null))))};n("364759");let eX={douyin_login_comp_tab_item:"KN1D5bj0",douyinLoginCompTabItem:"KN1D5bj0",flat_container:"zad3EGHJ",flatContainer:"zad3EGHJ",tab_box:"UXzkscqE",tabBox:"UXzkscqE",selected:"C6OZQwMA",line:"jleLwUR5",tab_container:"bFIHbTmg",tabContainer:"bFIHbTmg",single_tab:"qXy4xfTo",singleTab:"qXy4xfTo"},eQ=e=>{let{tabLists:t,loginPanelType:n="flat",width:o,onClick:l,selectedTab:i=0}=e||{},[a,s]=(0,r.useState)(i),c=(0,r.useMemo)(()=>t[a].content,[a,t]);return r.createElement("div",{className:eX.douyin_login_comp_tab_item,style:{width:o}},r.createElement("div",{className:"flat"===n?eX.flat_container:eX.tab_container},r.createElement("div",{className:`${eX.tab_box} ${(null==t?void 0:t.length)===1?eX.single_tab:""}`},t.map((e,o)=>r.createElement(r.Fragment,{key:o},r.createElement("span",{onClick:()=>{var t;return t=e.loginType,void(null==l||l(o,t),s(o))},className:o===a?eX.selected:""},e.title),o!==t.length-1&&"flat"===n&&r.createElement("div",{className:eX.line},r.createElement(eA,null))))),r.createElement("div",{className:eX.content_box},c)))},eY={},e1=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:60,[n,o]=(0,r.useState)(t);eY[e]||(eY[e]={timer:null,seconds:t});let l=eY[e],i=()=>{clearInterval(l.timer),l.timer=null},a=()=>{l.seconds=l.seconds-1,0===l.seconds&&i(),o(l.seconds)},s=null!==l.timer,c=0===l.seconds;return(0,r.useEffect)(()=>{l.timer&&(i(),l.timer=setInterval(a,1e3))},[]),[()=>{l.timer||(l.timer=setInterval(a,1e3),l.seconds=t,a())},l.seconds,s,c,i,n,l]};var e0=n("785005"),e2=n.n(e0);let e3=X(()=>{let{config:e}=Y(),{aid:t=6383,device_id:o,isFrontier:l=!1,frontierUrl:i="wss://frontier100-normal.zijieapi.com"}=e||{},[a,s]=(0,r.useState)(null),c=(0,r.useRef)([]),u={fpID:"971",aID:"6383",appKey:"b80f8270dbb7d91cd76ed17bb19d215b",deviceID:"",url:i,debug:!0},d=async()=>{let{FWS:e}=await n.e("23678").then(n.t.bind(n,747688,23)),l=new e({...u,aID:String(t),accessKey:e2()(`${u.fpID}${u.appKey}${o}f8a69f1719916z`).toString(),deviceID:o||"",url:i});l.onopen=e=>{},l.onmessage=e=>{c.current.forEach(t=>{t(e)})},l.onerror=e=>{},s(l)};return(0,r.useEffect)(()=>{if(l)try{d()}catch(e){}return()=>{a&&a.close()}},[l]),{frontierInstance:a,addMessageHandler:e=>{c.current.push(e)},removeMessageHandler:e=>{c.current=c.current.filter(t=>t!==e)}}}),e5=()=>e3.useContainer(),e6=e=>{let t;if(e instanceof Uint8Array)t=Array.from(e);else if(Array.isArray(e))t=e;else{if("object"!=typeof e||null===e)return null;t=Object.keys(e).sort((e,t)=>Number(e)-Number(t)).map(t=>e[t])}let n=new TextDecoder("utf-8").decode(new Uint8Array(t));try{return JSON.parse(n)}catch(e){return n}},e4=e=>{let t=(0,r.useRef)(!1);return(0,r.useCallback)(function(){for(var n=arguments.length,o=Array(n),l=0;l<n;l++)o[l]=arguments[l];if(!t.current)return t.current=!0,e(...o).finally(()=>{t.current=!1})},[e])},e7=()=>{let{config:e,request:t,successHd:n,setAccountLists:o,setSmsCodeKey:l,getContainer:i,areaCode:a,setAreaCode:s,mobile:c,setMobile:u,code:d,setCode:m,preLoginMethod:_}=Y(),{isH5:g=!1,loginOnly:h,isSupportMultiAccount:p,isFrontier:C=!1,isSupportVoiceCode:f=!0,allTextConfig:v}=e||{},{mobileCodeLoginText:b,extraText:E}=v||{},{changePage:w,setSendVoiceCodeCountDownID:y,setMultiAccountLoginWay:N}=eC(),{addMessageHandler:L,removeMessageHandler:x}=e5(),[S,k]=(0,r.useState)(!1),[A,I]=(0,r.useState)(!1),[O,T]=(0,r.useState)(""),[P,B]=(0,r.useState)(""),[M,D]=(0,r.useState)(!1),[G,R]=(0,r.useState)(!1),[F,q,V,U]=e1("LOGIN_MOBILE_CODE",60),H=(0,r.useRef)(!1),j=(0,r.useRef)(!1),$=(0,r.useRef)(""),z=(0,r.useMemo)(()=>c.replace(/\s/g,""),[c]),Z=(0,r.useMemo)(()=>`${a} ${z}`,[z,a]),J=(0,r.useMemo)(()=>{var t;return null==e||null==(t=e.setConfirmCheckbox)?void 0:t.LOGIN_MOBILE_CODE},[null==e?void 0:e.setConfirmCheckbox]),W=(0,r.useMemo)(()=>{if(V)return!0;let{result:e}=en(a,z,null==E?void 0:E.mobileNull,null==E?void 0:E.mobileFormatError);return!e},[V,a,z]),K=(0,r.useMemo)(()=>{if(J&&!S)return!0;let{result:e}=en(a,z,null==E?void 0:E.mobileNull,null==E?void 0:E.mobileFormatError),{result:t}=eo({code:d,noCodeErrMsg:null==E?void 0:E.mobileCodeNull,codeLenErrMsg:null==E?void 0:E.mobileCodeError,mobileCodeLoginText:b});return!e||!t},[J,S,z,d,a]),X=(0,r.useMemo)(()=>{if(V){var e;return null==b||null==(e=b.sending)?void 0:e.replace(/\{seconds\}/g,String(q))}return null==b?void 0:b.sendCode},[V,q]),Q=(0,r.useMemo)(()=>{if(!f)return!1;let{result:e}=en(a,z,null==E?void 0:E.mobileNull,null==E?void 0:E.mobileFormatError);return!!A&&!!e},[f,a,z,A]);(0,r.useEffect)(()=>{I(!1)},[z]),(0,r.useEffect)(()=>{U&&I(!0)},[U]);let et=()=>{let{result:e,errorMessage:t}=en(a,z,null==E?void 0:E.mobileNull,null==E?void 0:E.mobileFormatError);return er(t),t&&B("mobile"),e},el=()=>{if(!et())return!1;let{result:e,errorMessage:t}=eo({code:d,noCodeErrMsg:null==E?void 0:E.mobileCodeNull,codeLenErrMsg:null==E?void 0:E.mobileCodeError,mobileCodeLoginText:b});return er(t),t&&B("code"),e},ei=e=>{if(j.current||$.current!==Z)return;let{payload:t}=e.message||{},n=e6(t);(null==n?void 0:n.message)&&er(n.message,"failure")},ea=e4(()=>W?Promise.resolve():null==t?void 0:t.sendCodeRequest({mobile:Z}).then(e=>{$.current=Z,F();let t=document.querySelector("#button-input");null==t||t.focus(),C&&window.WebSocket&&!H.current&&(L(ei),H.current=!0)}).catch(e=>{er((null==e?void 0:e.description)||`${null==b?void 0:b.defaultSendCodeText}`,"failure")})),er=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"submit";T(e),e&&eh("login_panel_tips_show",{login_method:"phone_sms",is_auto_send_sms:0,tips_type:"red_words",tips_stage:t,tips_title:e})},es=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"submit";eu.show({content:e,getContainer:i}),eh("login_panel_tips_show",{login_method:"phone_sms",is_auto_send_sms:0,tips_type:"toast",tips_stage:t,tips_title:e})};return(0,r.useEffect)(()=>()=>{C&&window.WebSocket&&x(ei)},[]),{submitBtnLoading:M,submitBtnSuccess:G,areaCode:a,mobile:c,code:d,onAreaCodeChange:e=>{s(e)},onMobileChange:e=>{let t=e.replace(/[\D]+/g,"");if("+86"===a)t.length>11&&(t=t.slice(0,11)),t=t.replace(ee,"$1 $2 $3").trim();else if(t.length>20)return;u(t)},onCodeChange:e=>{let t=e.replace(/[\D]+/g,"");t.length>6||m(t)},onMobileBlur:et,onCodeBlur:el,onMobileFocus:()=>{"mobile"===P&&(er(""),B(""))},onCodeFocus:()=>{"code"===P&&(er(""),B(""))},needCheck:J,checked:S,setChecked:k,showVoiceCode:Q,onSend:ea,sendBtnText:X,onSubmit:()=>{if(!M){if(K){if(!et()||!el())return;J&&!S&&es(`${null==E?void 0:E.protocolCheckedError}`);return}t.generateVerifyPortraitId(),eh("uc_login_submit",{login_method:"phone_sms",switch_from_method:_.current}),D(!0),null==t||t.smsLoginRequest({mobile:Z,code:d,loginOnly:null==h?void 0:h.LOGIN_MOBILE_CODE,multiAccount:null==p?void 0:p.LOGIN_MOBILE_CODE}).then(e=>{eh("uc_login_result",{status:"success",login_method:"phone_sms",is_new_user:(null==h?void 0:h.LOGIN_MOBILE_CODE)?0:(null==e?void 0:e.is_new_user)!==void 0?null==e?void 0:e.is_new_user:(null==e?void 0:e.new_user)!==void 0?null==e?void 0:e.new_user:-1,log_id:null==e?void 0:e.log_id,switch_from_method:_.current,is_submit_multi_account:0}),R(!0),n(e)}).catch(e=>{var t;if(eh("uc_login_result",{status:"fail",login_method:"phone_sms",error_code:(null==e?void 0:e.error_code)||-1,fail_info:(null==e?void 0:e.description)||"",log_id:null==e?void 0:e.log_id,switch_from_method:_.current,is_submit_multi_account:0}),(null==e||null==(t=e.sub_account)?void 0:t.length)>0&&(null==e?void 0:e.error_code)===1454){o(e.sub_account),l((null==e?void 0:e.sms_code_key)||""),w("ACCOUNT_SELECT_PAGE"),N("LOGIN_MOBILE_CODE");return}er((null==e?void 0:e.description)||(null==v?void 0:v.extraText.defaultError),"failure")}).finally(()=>{D(!1)})}},onShowVoiceCode:()=>{w(g?"H5_SEND_VOICE_CODE_PAGE":"SEND_VOICE_CODE_PAGE"),y("LOGIN_MOBILE_CODE")},error:O,sendBtnDisabled:W,submitBtnDisabled:K,setPageHidden:e=>{j.current=e}}},e9=()=>{let{config:e,request:t,successHd:n,setAccountLists:o,setSmsCodeKey:l,getContainer:i,email:a,setEmail:s,emailCode:c,setEmailCode:u,preLoginMethod:d}=Y(),{loginOnly:m,allTextConfig:_}=e||{},{emailCodeLoginText:g,extraText:h}=_||{},[p,C]=(0,r.useState)(!1),[f,v]=(0,r.useState)(""),[b,E]=(0,r.useState)(""),[w,y]=(0,r.useState)(!1),[N,L]=(0,r.useState)(!1),[x,S,k,A]=e1("LOGIN_EMAIL_CODE",60);(0,r.useRef)(!1);let I=(0,r.useRef)(!1),O=(0,r.useMemo)(()=>{var t;return null==e||null==(t=e.setConfirmCheckbox)?void 0:t.LOGIN_EMAIL_CODE},[null==e?void 0:e.setConfirmCheckbox]),T=(0,r.useMemo)(()=>{if(k)return!0;let{result:e}=el({email:a,noEmailErrMsg:null==h?void 0:h.emailNull,emailFormatErrMsg:null==h?void 0:h.emailFormatError});return!e},[k,a]),P=(0,r.useMemo)(()=>{if(O&&!p)return!0;let{result:e}=el({email:a,noEmailErrMsg:null==h?void 0:h.emailNull,emailFormatErrMsg:null==h?void 0:h.emailFormatError}),{result:t}=ei({code:c,noCodeErrMsg:null==h?void 0:h.mobileCodeNull,codeLenErrMsg:null==h?void 0:h.mobileCodeError,emailCodeLoginText:g});return!e||!t},[O,p,a,c]),B=(0,r.useMemo)(()=>{if(k){var e;return null==g||null==(e=g.sending)?void 0:e.replace(/\{seconds\}/g,String(S))}return null==g?void 0:g.sendCode},[k,S]),M=()=>{let{result:e,errorMessage:t}=el({email:a,noEmailErrMsg:null==h?void 0:h.emailNull,emailFormatErrMsg:null==h?void 0:h.emailFormatError});return R(t),t&&E("email"),e},D=()=>{if(!M())return!1;let{result:e,errorMessage:t}=ei({code:c,noCodeErrMsg:null==h?void 0:h.mobileCodeNull,codeLenErrMsg:null==h?void 0:h.mobileCodeError,emailCodeLoginText:g});return R(t),t&&E("code"),e},G=e4(()=>T?Promise.resolve():null==t?void 0:t.sendEmailCode({email:a}).then(e=>{x();let t=document.querySelector("#button-input");null==t||t.focus()}).catch(e=>{R((null==e?void 0:e.description)||`${null==g?void 0:g.defaultSendCodeText}`,"failure")})),R=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"submit";v(e),e&&eh("login_panel_tips_show",{login_method:"login_email",is_auto_send_sms:0,tips_type:"red_words",tips_stage:t,tips_title:e})},F=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"submit";eu.show({content:e,getContainer:i}),eh("login_panel_tips_show",{login_method:"login_email",is_auto_send_sms:0,tips_type:"toast",tips_stage:t,tips_title:e})};return{submitBtnLoading:w,submitBtnSuccess:N,email:a,code:c,onEmailChange:e=>{s(e)},onCodeChange:e=>{e.length>6||u(e)},onEmailBlur:M,onCodeBlur:D,onEmailFocus:()=>{"email"===b&&(R(""),E(""))},onCodeFocus:()=>{"code"===b&&(R(""),E(""))},needCheck:O,checked:p,setChecked:C,onSend:G,sendBtnText:B,onSubmit:()=>{if(!w){if(P){if(!M()||!D())return;O&&!p&&F(`${null==h?void 0:h.protocolCheckedError}`);return}t.generateVerifyPortraitId(),eh("uc_login_submit",{login_method:"login_email",switch_from_method:d.current}),y(!0),null==t||t.emailQuickLogin({email:a,code:c,loginOnly:null==m?void 0:m.LOGIN_EMAIL_CODE}).then(e=>{eh("uc_login_result",{status:"success",login_method:"login_email",is_new_user:(null==m?void 0:m.LOGIN_EMAIL_CODE)?0:(null==e?void 0:e.is_new_user)!==void 0?null==e?void 0:e.is_new_user:(null==e?void 0:e.new_user)!==void 0?null==e?void 0:e.new_user:-1,log_id:null==e?void 0:e.log_id,switch_from_method:d.current,is_submit_multi_account:0}),L(!0),n(e)}).catch(e=>{eh("uc_login_result",{status:"fail",login_method:"login_email",error_code:(null==e?void 0:e.error_code)||-1,fail_info:(null==e?void 0:e.description)||"",log_id:null==e?void 0:e.log_id,switch_from_method:d.current,is_submit_multi_account:0}),R((null==e?void 0:e.description)||(null==_?void 0:_.extraText.defaultError),"failure")}).finally(()=>{y(!1)})}},error:f,sendBtnDisabled:T,submitBtnDisabled:P,setPageHidden:e=>{I.current=e}}},e8=()=>{let{config:e,request:t,successHd:n,setAccountLists:o,setSmsCodeKey:l,getContainer:i,areaCode:a,setAreaCode:s,mobile:c,setMobile:u,password:d,setPassword:m,preLoginMethod:_}=Y(),{isSupportMultiAccount:g,loginOnly:h,allTextConfig:p}=e||{},{accountPwdLoginText:C,extraText:f}=p||{},{changePage:v,setMultiAccountLoginWay:b}=eC(),[E,w]=(0,r.useState)(""),[y,N]=(0,r.useState)(""),[L,x]=(0,r.useState)(!1),[S,k]=(0,r.useState)(!1),[A,I]=(0,r.useState)(!1),O=(0,r.useMemo)(()=>c.replace(/\s/g,""),[c]),T=(0,r.useMemo)(()=>`${a} ${O}`,[O,a]),P=(0,r.useMemo)(()=>{var t;return null==e||null==(t=e.setConfirmCheckbox)?void 0:t.LOGIN_ACCOUNT_PWD},[null==e?void 0:e.setConfirmCheckbox]),B=(0,r.useMemo)(()=>{if(P&&!L)return!0;let{result:e}=en(a,O,null==f?void 0:f.mobileNull,null==f?void 0:f.mobileFormatError),{result:t}=ea({password:d,noPasswordErrMsg:null==f?void 0:f.passwordNull});return!e||!t},[P,L,O,d,a]),M=()=>{R(""),N("")},D=()=>{let{result:e,errorMessage:t}=en(a,O,null==f?void 0:f.mobileNull,null==f?void 0:f.mobileFormatError);return R(t),t&&N("mobile"),e},G=()=>{if("notExist"===y||!D())return!1;let{result:e,errorMessage:t}=ea({password:d,noPasswordErrMsg:null==f?void 0:f.passwordNull});return R(t),t&&N("password"),e},R=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"submit";w(e),e&&eh("login_panel_tips_show",{login_method:"phone_password",is_auto_send_sms:0,tips_type:"red_words",tips_stage:t,tips_title:e})},F=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"submit";eu.show({content:e,getContainer:i}),eh("login_panel_tips_show",{login_method:"phone_password",is_auto_send_sms:0,tips_type:"toast",tips_stage:t,tips_title:e})};return{areaCode:a,mobile:c,password:d,onAreaCodeChange:e=>{s(e)},onMobileChange:e=>{("notExist"===y||"notMatch"===y)&&M();let t=e.replace(/[\D]+/g,"");if("+86"===a)t.length>11&&(t=t.slice(0,11)),t=t.replace(ee,"$1 $2 $3").trim();else if(t.length>20)return;u(t)},onPwdChange:e=>{"notMatch"===y&&M(),m(e.replace(/[\u4e00-\u9fa5]/g,""))},onMobileBlur:D,onPwdBlur:G,onMobileFocus:()=>{"mobile"===y&&M()},onPwdFocus:()=>{"password"===y&&M()},error:E,submitBtnDisabled:B,submitBtnLoading:S,submitBtnSuccess:A,needCheck:P,checked:L,setChecked:x,onSubmit:()=>{if(!S){if(B){if(!D()||!G())return;P&&!L&&F(`${null==f?void 0:f.protocolCheckedError}`);return}t.generateVerifyPortraitId(),eh("uc_login_submit",{login_method:"phone_password",switch_from_method:_.current}),k(!0),null==t||t.userLoginRequest({mobile:T,password:d,multiAccount:null==g?void 0:g.LOGIN_ACCOUNT_PWD}).then(e=>{eh("uc_login_result",{status:"success",login_method:"phone_password",is_new_user:(null==h?void 0:h.LOGIN_ACCOUNT_PWD)?0:(null==e?void 0:e.is_new_user)!==void 0?null==e?void 0:e.is_new_user:(null==e?void 0:e.new_user)!==void 0?null==e?void 0:e.new_user:-1,log_id:null==e?void 0:e.log_id,switch_from_method:_.current,is_submit_multi_account:0}),I(!0),n(e)}).catch(e=>{var t;let{error_code:n}=e||{};if(eh("uc_login_result",{status:"fail",login_method:"phone_password",error_code:n||-1,fail_info:(null==e?void 0:e.description)||"",log_id:null==e?void 0:e.log_id,switch_from_method:_.current,is_submit_multi_account:0}),(null==e||null==(t=e.sub_account)?void 0:t.length)>0&&1454===n){o(e.sub_account),l(null==e?void 0:e.sms_code_key),v("ACCOUNT_SELECT_PAGE"),b("LOGIN_ACCOUNT_PWD");return}if([1039].includes(n))return void F(`${null==C?void 0:C.needMobileCodeErrorText}`,"failure");[1467].includes(n)&&N("notExist"),[1009,1033,1034,1399].includes(n)&&N("notMatch"),R((null==e?void 0:e.description)||(null==f?void 0:f.defaultError),"failure")}).finally(()=>{k(!1)})}}}},te=()=>{let{config:e,request:t,getContainer:n,successHd:o,setLoginLoading:l,preLoginMethod:i,loginType:a}=Y(),{next:s=location.href,isFrontier:c=!1,handleScanCodeH5Img:u,useShortUrl:d=!0}=e||{},{addMessageHandler:m,removeMessageHandler:_}=e5(),[g,h]=(0,r.useState)("new"),[p,C]=(0,r.useState)(""),[f,v]=(0,r.useState)("扫码设备"),[b,E]=(0,r.useState)(""),[w,y]=(0,r.useState)(!1),N=(0,r.useRef)(!1),L=(0,r.useRef)(!1),x=(0,r.useRef)(!1),S=(0,r.useRef)(!1),k=(0,r.useRef)(1),A=(0,r.useRef)(0),I=(0,r.useRef)(""),O=(0,r.useRef)(0),T=(0,r.useRef)(0),P=(0,r.useRef)(0);(0,r.useEffect)(()=>{A.current>=60&&A.current<180&&k.current<5?k.current=3:A.current>=180&&(k.current=5)},[A.current]);let B=e=>{if(!x.current||S.current)return;let{payload:t}=e.message||{},n=e6(t);(null==n?void 0:n.protocol_type)===405&&R()},M=()=>{N.current||eh("uc_login_submit",{login_method:"qr_code",switch_from_method:i.current})},D=()=>{t.generateVerifyPortraitId(),null==t||t.getQrcodeRequest({next:s,need_short_url:d}).then(async e=>{N.current=!1;let{qrcode:t="",token:n,is_frontier:o=!1,qrcode_index_url:l=""}=e||{};I.current=n,u?E(await u(t,l)):t.includes(";base64,")?E(t):E(`data:image/png;base64,${t}`),x.current=!0,setTimeout(()=>{G()},1e3*k.current),c&&window.WebSocket&&!L.current&&o&&(k.current=5,m(B),L.current=!0)}).catch(e=>{U((null==e?void 0:e.description)||"获取二维码失败","failure"),y(!0)})},G=async()=>{try{await R()&&x.current&&!S.current&&setTimeout(()=>{G()},1e3*k.current)}catch(e){}},R=e4(()=>I.current?(A.current++,null==t?void 0:t.checkQrconnectRequest({next:s,token:I.current,is_frontier:!0,need_short_url:d}).then(async e=>{let{status:t}=e||{};switch(h(t),t){case"1":case"new":return N.current=!1,Promise.resolve(!0);case"2":case"scanned":let{avatar_url:n=""}=(null==e?void 0:e.scan_user_info)||{},{scan_device_display_name:a="扫码设备"}=(null==e?void 0:e.scan_device_info)||{};return C(n),v(a),M(),N.current=!0,Promise.resolve(!0);case"3":case"confirmed":return M(),eh("uc_login_result",{status:"success",login_method:"qr_code",is_new_user:0,switch_from_method:i.current,is_submit_multi_account:0}),l(!0),o(e),Promise.resolve(!1);case"4":case"5":case"refused":case"expired":if(P.current<5){P.current++;let{qrcode:t="",token:n,qrcode_index_url:o=""}=e||{};return u?E(await u(t,o)):t.includes(";base64,")?E(t):E(`data:image/png;base64,${t}`),I.current=n,Promise.resolve(!0)}return y(!0),N.current=!1,Promise.resolve(!1);default:return y(!0),Promise.resolve(!1)}}).catch(e=>((null==e?void 0:e.error_code)===6||(null==e?void 0:e.error_code)==="ECONNABORTED")&&O.current<3?(O.current++,Promise.resolve(!0)):(null==e?void 0:e.error_code)||!(T.current<3)?(M(),eh("uc_login_result",{status:"fail",login_method:"qr_code",error_code:(null==e?void 0:e.error_code)||-1,fail_info:(null==e?void 0:e.description)||"",log_id:null==e?void 0:e.log_id,switch_from_method:i.current,is_submit_multi_account:0}),U((null==e?void 0:e.description)||"网络异常,请稍后重试","failure"),y(!0),Promise.resolve(!1)):(T.current++,Promise.resolve(!0)))):Promise.resolve(!1)),F=()=>{h("new"),l(!1),y(!1),D()},q=e=>{x.current=e},V=()=>{"hidden"!==document.visibilityState?S.current||(x.current=!0,G()):q(!1)},U=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"submit";eu.show({content:e,getContainer:n}),eh("login_panel_tips_show",{login_method:"qr_code",is_auto_send_sms:0,tips_type:"toast",tips_stage:t,tips_title:e})};return(0,r.useEffect)(()=>{if((null==a?void 0:a[0])==="LOGIN_SCAN_CODE")return D(),document.addEventListener("visibilitychange",V),()=>{setTimeout(()=>{l(!1),q(!1),document.removeEventListener("visibilitychange",V),c&&window.WebSocket&&_(B)},1e3)}},[]),{qrcodeStatus:g,avatar:p,qrCodeImg:b,cancelLogin:()=>{null==t||t.expireQrcodeRequest({token:I.current}).catch(e=>{}),F()},expired:w,onRefresh:F,setNeedCheckQrconnect:q,setPageHidden:e=>{S.current=e},device:f}},tt=e=>new Promise((t,n)=>{let o=document.createElement("script");o.type="text/javascript",o.src=e,document.getElementsByTagName("head")[0].appendChild(o),o.readyState?o.onreadystatechange=function(){("complete"===o.readyState||"loaded"===o.readyState)&&(o.onreadystatechange=null,t(!0))}:(o.onload=function(){t(!0)},o.onerror=function(e){n(e)})}),tn=e=>{let t,n;return function(){for(var o=arguments.length,l=Array(o),i=0;i<o;i++)l[i]=arguments[i];return t?Promise.resolve(t):(!n&&(n=new Promise((o,i)=>{e(...l).then(e=>{e&&(t=e),o(e),n=void 0}).catch(e=>{i(e),n=void 0})})),n)}},to=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5;return new Promise((n,o)=>{let l=()=>{e().then(e=>{n(e)}).catch(e=>{t-- >0?l():o(e)})};l()})},tl=e=>{let{color:t="white",border:n=!0,type:o="sign-in",mode:l="logo-only",size:i=30,radius:a=0,width:s=0,height:c=0,logoSize:u="medium",handlerClick:d=()=>null}=e||{};return r.createElement("div",{onClick:d,id:"appleid-signin",className:"signin-button","data-color":t,"data-border":n,"data-type":o,"data-mode":l,"data-size":i,"data-border-radius":a,"data-width":s,"data-height":c,"data-logo-size":u})},ti=tn(async e=>{let{onLoadError:t}=e;return to(()=>tt("https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js").catch(e=>{null==t||t(e)})).then(()=>!0)}),ta=e=>{let{onFinish:t,sdkConfig:n,onLoadError:o,iconConfig:l,handlerClick:i}=e,a=e=>{var o,l,i,a;(null==(o=e.detail.authorization)?void 0:o.code)?t({status:"success",data:{code:null==e?void 0:null==(l=e.detail.authorization)?void 0:l.code,id_token:null==e?void 0:null==(i=e.detail.authorization)?void 0:i.id_token,redirect_uri:n.redirectURI,platform_app_id:n.platformAppId},raw_data:e}):t({status:"fail",error_message:null==e?void 0:null==(a=e.detail)?void 0:a.error,raw_data:e})},s=async()=>{await ti({sdkConfig:n,onLoadError:o}),window.AppleID.auth.init({clientId:n.clientId,scope:n.scope,redirectURI:n.redirectURI,state:n.state,nonce:n.nonce,usePopup:void 0===n.usePopup||n.usePopup})};return(0,r.useEffect)(()=>(s(),document.addEventListener("AppleIDSignInOnSuccess",a),document.addEventListener("AppleIDSignInOnFailure",a),()=>{document.removeEventListener("AppleIDSignInOnSuccess",a),document.removeEventListener("AppleIDSignInOnFailure",a)}),[]),r.createElement(tl,{...l,handlerClick:i})},tr=tn(async e=>to(()=>tt("https://accounts.google.com/gsi/client").catch(e=>{})).then(()=>!1)),ts=e=>{let{type:t="icon",theme:n="outline",size:o="large"}=e;return r.createElement("div",{className:"g_id_signin","data-type":t,"data-theme":n,"data-size":o})},tc=e=>{let{sdkConfig:t,onFinish:n,iconConfig:o,onLoadError:l}=e,{clientId:i,autoPrompt:a=!1,redirectURI:s,platformAppId:c}=t;return(0,r.useMemo)(()=>{window.__google_handleCredentialResponse=e=>{e.credential?n({status:"success",data:{access_token_secret:e.credential,redirect_uri:s,platform_app_id:c},raw_data:e}):n({status:"fail",raw_data:e})}},[n]),(0,r.useEffect)(()=>(tr(),()=>{window.__google_handleCredentialResponse=null}),[]),r.createElement("div",null,r.createElement("div",{id:"g_id_onload","data-client_id":i,"data-callback":"__google_handleCredentialResponse","data-auto_prompt":a}),r.createElement(ts,o))};var tu=n("252969"),td=n("695385");let tm=(e,t)=>{try{var n,o;let l=JSON.stringify(t);return null==(o=window)||null==(n=o.localStorage)||n.setItem(e,l),!0}catch(e){return!1}},t_=e=>{try{let t=window.localStorage.getItem(e);if(!t)return null;return JSON.parse(t)}catch(e){return null}},tg=()=>{try{let e=t_(v);if(e&&e.length>=0)return e;let t=t_("user_info_passport"),n=t_(f),o=t_("is_allow_trust"),l=t_(b);if(t&&1===o&&(null==t?void 0:t.uid))return t.ztData=l,tm(v,[t]),[t];if(n&&1===o)return n.ztData=l,tm(v,[n]),[n];return[]}catch(e){return[]}},th=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;tp(e);let n=t_(v)||[];n.unshift(e),n.length>t&&n.pop(),tm(v,n)},tp=e=>{let{uid:t}=e||{};if(!t)return;let n=t_(v)||[];if(!n)return;let o=n.findIndex(e=>e.uid===t);-1!==o&&(n.splice(o,1),tm(v,n))},tC=e=>{let{uid:t}=e||{};if(!t)return;let n=t_(v)||[];if(!n)return;let o=n.findIndex(e=>e.uid===t);-1!==o&&(n[o]={...n[o],...e},tm(v,n))},tf=e=>{if(!e)return!1;let t=t_(v)||[];return!!t&&-1!==t.findIndex(t=>t.uid===e)},tv=e=>{try{return JSON.parse(e)}catch(e){return{}}};function tb(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}let tE={getQrcode:"/passport/web/get_qrcode/",checkQrconnect:"/passport/web/check_qrconnect/",expireQrcode:"/passport/web/expire_qrcode/",sendCode:"/passport/web/send_code/",sendVoiceCode:"/passport/web/send_voice_code/",sendCodeLogin:"/passport/web/sms_login/",checkCode:"/passport/web/mobile/check_code/",accountPwdLogin:"/passport/web/user/login/",oneLogin:"/passport/web/one_login/",sendPush:"/passport/web/send_push/",checkPushResult:"/passport/web/check_push_result/",sendEmailCode:"/passport/web/email/send_code/",emailQuickLogin:"/passport/web/email/quick_login/",setWebRecordStatus:"/passport/user/web_record_status/set/",getUserInfo:"/passport/account/info/v2/",logout:"/passport/web/logout/",loginEnv:"/passport/login/env/",authLogin:"/passport/web/auth/login/"};class tw{constructor(e){tb(this,"accountSDK",void 0),tb(this,"webAccountSDK",void 0),tb(this,"isSupportVCD",void 0),tb(this,"next",void 0),tb(this,"aid",void 0),tb(this,"loadApiSDK",Promise.resolve()),tb(this,"generateVerifyPortraitId",tu.iO),tb(this,"commonRequest",e=>this.loadApiSDK.then(()=>{let t={};return this.isSupportVCD&&(t={...t,is_vcd:1}),e.params={aid:this.aid,...t,...e.params,is_from_iesaccountsaas:1,p_ui:ed},new Promise((t,n)=>{var o;null==(o=this.accountSDK)||o.request(e).then(e=>{t(e)}).catch(e=>{(null==e?void 0:e.is_network_error)&&(e.description="当前网络异常,请检查后重试"),n(e)})})})),tb(this,"getQrcodeRequest",e=>{let t={next:e.next,need_short_url:e.need_short_url||!1};return this.commonRequest({url:tE.getQrcode,method:"GET",params:{...t,need_logo:!1,is_new_login:"1"}})}),tb(this,"checkQrconnectRequest",e=>{let t={next:e.next,need_short_url:e.need_short_url||!1};return this.commonRequest({url:tE.checkQrconnect,method:"POST",data:{need_logo:!1,is_frontier:e.is_frontier||!1,token:e.token,is_new_login:"1",...t,...this.isSupportVCD?{vsrt:1}:{}}})}),tb(this,"expireQrcodeRequest",e=>this.commonRequest({url:tE.expireQrcode,method:"POST",data:{...e}})),tb(this,"sendCodeRequest",e=>{let t=(0,td.J4)({mobile:e.mobile,type:e.type||24},["mobile","type"]);return this.commonRequest({url:tE.sendCode,method:"POST",data:{is6Digits:1,verify_ticket:e.verify_ticket,...t}})}),tb(this,"smsLoginRequest",e=>{let t=(0,td.J4)({mobile:e.mobile,code:e.code},["mobile","code"]);return this.commonRequest({url:tE.sendCodeLogin,method:"POST",data:{safe_mobile_register_to_login:e.multiAccount,service:this.next,...t,...e.extra_params||{},...this.isSupportVCD?{vsrt:1}:{},...e.loginOnly?{login_only:!0}:{}}})}),tb(this,"sendVoiceCodeRequest",e=>{let t=(0,td.J4)({mobile:e.mobile||"",type:e.type||24},["mobile","type"]);return this.commonRequest({url:tE.sendVoiceCode,method:"POST",data:{is6Digits:1,sec_user_id:e.sec_user_id,...t}})}),tb(this,"userLoginRequest",e=>{let t=(0,td.J4)({account:e.mobile,password:e.password},["account","password"]);return this.commonRequest({url:tE.accountPwdLogin,method:"POST",data:{safe_mobile_register_to_login:e.multiAccount,need_check_base_info:!0,service:this.next,account_type:0,...t,...e.extra_params||{},...this.isSupportVCD?{vsrt:1}:{}}})}),tb(this,"oneLoginRequest",async e=>{var t;let{ticket:o,ts_sign:l}=tv((null==(t=e.ztData)?void 0:t.data)||""),i={},{SecureSDK:a}=await Promise.all([n.e("19511"),n.e("4680")]).then(n.bind(n,763218)),r=await a.getBdTicketGuardHeader({ticket:o,ts_sign:l,path:tE.oneLogin});return i=null==r?void 0:r.bdTicketGuardHeaders,this.commonRequest({url:tE.oneLogin,method:"POST",data:{sec_user_id:e.sec_user_id,service:e.service,one_login_ticket:e.one_login_ticket},headers:{...i||{}}})}),tb(this,"webRecordStatusSetRequest",e=>this.commonRequest({url:tE.setWebRecordStatus,method:"POST",data:{...e}})),tb(this,"sendVerifyCodeRequest",e=>{let t=(0,td.J4)({type:e.type||22},["type"]);return this.commonRequest({url:tE.sendCode,method:"POST",data:{is6Digits:1,verify_ticket:e.verify_ticket,...t}})}),tb(this,"checkCodeRequest",e=>{let t=(0,td.J4)({code:e.code,type:22},["type","code"]);return this.commonRequest({url:tE.checkCode,method:"POST",data:{...t,verify_ticket:e.verify_ticket}})}),tb(this,"sendPushRequest",e=>this.commonRequest({url:tE.sendPush,method:"POST",data:{is_new_login:"1",...e}})),tb(this,"checkPushResultRequest",e=>this.commonRequest({url:tE.checkPushResult,method:"POST",data:{...e}})),tb(this,"getUserInfo",()=>this.commonRequest({url:tE.getUserInfo,method:"GET"})),tb(this,"logout",e=>{let{next:t="/",need_redirect:n=1,host:o=window.location.origin}=e,l={account_sdk_source:"web",aid:this.aid,next:t,is_from_ttaccountsdk:1};if(n){window.location.href=`${o}${tE.logout}?${(0,$.IC)(l)}`;return}return this.commonRequest({url:tE.logout,data:{need_redirect:n,...l,next:encodeURIComponent(l.next)}})}),tb(this,"sendEmailCode",e=>{let t=(0,td.J4)({email:e.email,type:e.type||16},["email","type"]);return this.commonRequest({url:tE.sendEmailCode,method:"POST",data:{...t}})}),tb(this,"emailQuickLogin",e=>{let t=(0,td.J4)({email:e.email,code:e.code,login_only:e.loginOnly||!0},["email","code"]);return this.commonRequest({url:tE.emailQuickLogin,method:"POST",data:{...t}})}),tb(this,"checkEmailAndThirdEnv",()=>this.commonRequest({url:tE.loginEnv,method:"GET"}));let{aid:t=6383,accountApiConfig:o,isSupportVCD:l=!1,next:i=window.location.href,isH5:a,scanCodeLogo:r,scanCodeDesc:s,scanCodeGuideContent:c,handleScanCodeH5Img:u,loginBgImg:d,secondVerifyConfig:m}=e||{};o&&(this.loadApiSDK=Promise.all([n.e("28872"),n.e("84404")]).then(n.bind(n,852011)).then(e=>{let{WebInterfaceSdk:t}=e,n=new t({isNewVerifyUI:!a,uiManual:{scanCodeLogo:r,scanCodeDesc:s,scanCodeGuideContent:c,loginBgImg:d,handleScanCodeH5Img:u},generalParams:{is_new_login:"1",is_from_iesaccountsaas:1,p_ui:ed},...m,...o});this.accountSDK=n,this.webAccountSDK=n})),this.aid=(null==o?void 0:o.aid)||t,this.isSupportVCD=l,this.next=i}}let ty=()=>{let{request:e,successHd:t,getContainer:n}=Y(),o=function(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"submit";eu.show({content:e,getContainer:n}),eh("login_panel_tips_show",{login_method:t,is_auto_send_sms:0,tips_type:"toast",tips_stage:o,tips_title:e})},l=ta({onFinish:n=>{"success"===n.status?e.commonRequest({data:n.data,url:tE.authLogin,method:"POST"}).then(e=>{eh("uc_login_result",{status:"success",login_method:"apple",is_new_user:(null==e?void 0:e.is_new_user)!==void 0?null==e?void 0:e.is_new_user:(null==e?void 0:e.new_user)!==void 0?null==e?void 0:e.new_user:-1,log_id:null==e?void 0:e.log_id,is_submit_multi_account:0}),t(e)}).catch(e=>{eh("uc_login_result",{status:"fail",login_method:"apple",error_code:(null==e?void 0:e.error_code)||-1,fail_info:(null==e?void 0:e.description)||"",log_id:null==e?void 0:e.log_id,is_submit_multi_account:0}),o(null==e?void 0:e.description,"apple","failure")}):eh("uc_login_result",{status:"fail",login_method:"apple",error_code:-1,fail_info:n.error_message})},sdkConfig:{clientId:"com.douyinweb.siwa",scope:"name email",redirectURI:"https://www.douyin.com/ucenter_web/login/callback",platformAppId:18400},iconConfig:{color:"white",size:56,radius:50,border:!1}}),i=(0,r.useMemo)(()=>()=>r.createElement("div",{onClick:()=>{e.generateVerifyPortraitId(),eh("uc_login_submit",{login_method:"apple"})}},l),[]),a=tc({onFinish:n=>{"success"===n.status?e.commonRequest({data:n.data,url:tE.authLogin,method:"POST"}).then(e=>{eh("uc_login_result",{status:"success",login_method:"google",is_new_user:(null==e?void 0:e.is_new_user)!==void 0?null==e?void 0:e.is_new_user:(null==e?void 0:e.new_user)!==void 0?null==e?void 0:e.new_user:-1,log_id:null==e?void 0:e.log_id,is_submit_multi_account:0}),t(e)}).catch(e=>{eh("uc_login_result",{status:"fail",login_method:"google",error_code:(null==e?void 0:e.error_code)||-1,fail_info:(null==e?void 0:e.description)||"",log_id:null==e?void 0:e.log_id,is_submit_multi_account:0}),o(null==e?void 0:e.description,"google","failure")}):eh("uc_login_result",{status:"fail",login_method:"google",error_code:-1,fail_info:n.error_message})},sdkConfig:{platformAppId:18401,clientId:"283514277060-i1mao125uqe6b7illtmu6nvt4nea4tvi.apps.googleusercontent.com",redirectURI:"https://www.douyin.com/ucenter_web/login/callback/"}});return{AppleLoginBtn:i,GoogleLoginBtn:(0,r.useMemo)(()=>()=>r.createElement("div",{onClick:()=>{e.generateVerifyPortraitId(),eh("uc_login_submit",{login_method:"google"})}},a),[])}},tN=()=>r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"64",height:"64",viewBox:"0 0 64 64",fill:"none"},r.createElement("circle",{cx:"32",cy:"32",r:"32",fill:"white"}),r.createElement("path",{d:"M40.0759 32.8143C40.0619 30.47 41.1231 28.703 43.2686 27.4006C42.0683 25.6811 40.2555 24.7359 37.8619 24.5547C35.5967 24.3751 33.1187 25.8747 32.2105 25.8747C31.2513 25.8747 29.0583 24.6163 27.3318 24.6163C23.7713 24.6691 19.9873 27.4551 19.9873 33.1206C19.9873 34.7926 20.2918 36.5227 20.9043 38.3038C21.7227 40.6481 24.6707 46.3927 27.7489 46.2995C29.3575 46.2625 30.4945 45.159 32.5889 45.159C34.6199 45.159 35.6724 46.2995 37.4659 46.2995C40.5705 46.2555 43.2387 41.0335 44.0131 38.6822C39.8524 36.7198 40.0759 32.934 40.0759 32.8143ZM36.4627 22.33C38.2051 20.2603 38.0467 18.3771 37.9956 17.6995C36.4556 17.7875 34.6745 18.7484 33.6607 19.9276C32.5431 21.1913 31.8867 22.7559 32.0275 24.5195C33.6924 24.6462 35.2113 23.7908 36.4627 22.33Z",fill:"black"})),tL=()=>r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"64",height:"64",viewBox:"0 0 64 64",fill:"none"},r.createElement("circle",{cx:"32",cy:"32",r:"32",fill:"white"}),r.createElement("g",{clipPath:"url(#clip0_8335_10160)"},r.createElement("path",{d:"M23.3195 29.3181C23.8809 27.6194 24.9645 26.1414 26.4156 25.095C27.8667 24.0486 29.6112 23.4872 31.4002 23.4909C33.4282 23.4909 35.2618 24.2109 36.7018 25.3893L40.8922 21.2001C38.3386 18.9741 35.0662 17.6001 31.4002 17.6001C25.7243 17.6001 20.8379 20.8377 18.4883 25.5801L23.3195 29.3181Z",fill:"#EA4335"}),r.createElement("path",{d:"M36.2479 39.2157C34.9399 40.0593 33.2791 40.5093 31.3999 40.5093C29.618 40.5129 27.8801 39.956 26.4322 38.9173C24.9844 37.8786 23.8999 36.4108 23.3324 34.7217L18.4844 38.4021C19.6738 40.8097 21.5145 42.8355 23.7976 44.2493C26.0807 45.6631 28.7146 46.4082 31.3999 46.4C34.9195 46.4 38.2819 45.1484 40.8007 42.8001L36.2491 39.2157H36.2479Z",fill:"#34A853"}),r.createElement("path",{d:"M40.8002 42.8C43.4342 40.3424 45.1442 36.6848 45.1442 32C45.1442 31.148 45.0134 30.2324 44.8178 29.3816H31.3994V34.946H39.1226C38.7422 36.818 37.7186 38.2652 36.2486 39.2156L40.8002 42.8Z",fill:"#4A90E2"}),r.createElement("path",{d:"M23.3325 34.7217C23.0389 33.8443 22.8898 32.9252 22.8909 32.0001C22.8909 31.0617 23.0409 30.1605 23.3193 29.3181L18.4881 25.5801C17.4998 27.5753 16.9903 29.7735 17.0001 32.0001C17.0001 34.3041 17.5341 36.476 18.4845 38.402L23.3325 34.7217Z",fill:"#FBBC05"})),r.createElement("defs",null,r.createElement("clipPath",{id:"clip0_8335_10160"},r.createElement("rect",{width:"28.8",height:"28.8",fill:"white",transform:"translate(17 17.6001)"}))));n("51600");let tx={douyin_login_landing_page:"aBWY4Mqx",flat_container:"iwBdudnN",scan_qrcode_login:"ZKVC3H8u",scan_qrcode_login_content:"kPea89xD",input_login:"wtBAxcgZ",mobile_code_login_content:"A9isJygL",account_pwd_login_content:"bhtfbfS0",email_code_login_content:"J3_iAJdC",new_flat_container:"S8pxARdi",tab_container:"Qt8mCZUJ",login_cntainer:"Pdc75Fap",custom_footer_content:"V5Xfbs8b",custom_footer_content_item:"uYKVBsX4"},tS=()=>{var e,t;let n;let o,l,{config:i,loginType:a,selectedTab:s,setSelectedTab:c,setCurLoginMethod:u,preLoginMethod:d,isFinalShowApple:m,isFinalShowGoogle:_,checkLoading:g}=Y(),{loginPanelType:h="flat",title:p,subTitle:C,loginBgImg:f,CustomFooter:v,showClose:b=!1,onClose:E,allTextConfig:w,scanCodeDesc:y,isShowTips:N=!0,useShortUrl:x=!0}=i||{},{changePage:S,landingBackPage:k}=eC(),{scanCodeLoginText:I,accountPwdLoginText:O,mobileCodeLoginText:T,emailCodeLoginText:P}=w||{},[B,M]=(0,r.useState)((null==a?void 0:a[0])||"LOGIN_SCAN_CODE"),{areaCode:D,mobile:G,code:R,onAreaCodeChange:F,onMobileChange:q,onCodeChange:V,onMobileFocus:U,onCodeFocus:H,needCheck:j,checked:$,setChecked:z,onSend:Z,sendBtnText:J,onSubmit:W,showVoiceCode:K,onShowVoiceCode:X,error:Q,sendBtnDisabled:ee,submitBtnDisabled:et,submitBtnLoading:en,submitBtnSuccess:eo,setPageHidden:el}=e7(),{email:ei,code:ea,onEmailChange:er,onCodeChange:es,onEmailFocus:ec,onCodeFocus:eu,needCheck:ed,checked:em,setChecked:e_,onSend:eg,sendBtnText:ep,onSubmit:ef,error:ev,sendBtnDisabled:eb,submitBtnDisabled:eE,submitBtnLoading:ew,submitBtnSuccess:eN}=e9(),{areaCode:eL,mobile:ex,password:eS,onAreaCodeChange:ek,onMobileChange:eA,onPwdChange:eI,onMobileFocus:eO,onPwdFocus:eT,error:eP,needCheck:eB,checked:eM,setChecked:eG,onSubmit:eF,submitBtnDisabled:eV,submitBtnLoading:eU,submitBtnSuccess:eH}=e8(),{qrcodeStatus:ej,avatar:e$,qrCodeImg:ez,cancelLogin:eZ,expired:eJ,onRefresh:eW,setPageHidden:eX,device:eY}=te(),e1=(0,r.useMemo)(()=>!!k,[k]),e0=()=>{S(k||"ONE_LOGIN_PAGE")},e2=e=>{c(e)},e3=()=>{let e=[],{AppleLoginBtn:t,GoogleLoginBtn:n}=ty();return _&&e.push({Icon:tL,RealEle:n,size:64}),m&&e.push({Icon:tN,RealEle:t,size:64}),r.createElement("div",{className:tx.custom_footer_content},e.map((e,t)=>r.createElement("div",{className:tx.custom_footer_content_item,key:t},r.createElement(ey,{Icon:e.Icon,RealEle:e.RealEle,size:e.size}))))},e5={title:null==T?void 0:T.title,loginType:"LOGIN_MOBILE_CODE",content:r.createElement("div",{className:tx.mobile_code_login_content},r.createElement(eD,{loginOnly:null==i||null==(e=i.loginOnly)?void 0:e.LOGIN_MOBILE_CODE,loginPanelType:h,mobile:G,onMobileChange:q,onMobileFocus:U,areaCode:D,onAreaCodeChange:F,code:R,onCodeChange:V,onCodeFocus:H,errorText:Q,showVoiceCode:K,onShowVoiceCode:X,CustomFooter:v,onSend:Z,sendBtnText:J,onSubmit:()=>{et||"flat"!==h||eZ(),W()},sendBtnDisabled:ee,submitBtnDisabled:et,submitBtnLoading:en,submitBtnSuccess:eo,confirmInfoProps:{needCheck:j,confirm:null==i?void 0:i.confirm,checked:$,onCheckClick:e=>z(e)},footer:m||_?e3:void 0}))},e6={title:null==P?void 0:P.title,loginType:"LOGIN_EMAIL_CODE",content:r.createElement("div",{className:tx.email_code_login_content},r.createElement(eR,{loginOnly:null==i||null==(t=i.loginOnly)?void 0:t.LOGIN_EMAIL_CODE,loginPanelType:h,email:ei,onEmailChange:er,onEmailFocus:ec,code:ea,onCodeChange:es,onCodeFocus:eu,errorText:ev,CustomFooter:v,onSend:eg,sendBtnText:ep,onSubmit:()=>{ef()},sendBtnDisabled:eb,submitBtnDisabled:eE,submitBtnLoading:ew,submitBtnSuccess:eN,confirmInfoProps:{needCheck:ed,confirm:null==i?void 0:i.confirm,checked:em,onCheckClick:e=>e_(e)},footer:m||_?e3:void 0}))},e4={title:null==O?void 0:O.title,loginType:"LOGIN_ACCOUNT_PWD",content:r.createElement("div",{className:tx.account_pwd_login_content},r.createElement(eq,{loginPanelType:h,mobile:ex,onMobileChange:eA,onMobileFocus:eO,onPasswordFocus:eT,areaCode:eL,onAreaCodeChange:ek,password:eS,onPasswordChange:eI,errorText:eP,CustomFooter:v,onSubmit:()=>{eV||"flat"!==h||eZ(),eF()},submitBtnDisabled:eV,submitBtnLoading:eU,submitBtnSuccess:eH,confirmInfoProps:{needCheck:eB,confirm:null==i?void 0:i.confirm,checked:eM,onCheckClick:e=>eG(e)},footer:m||_?e3:void 0}))},tt={title:null==I?void 0:I.title,loginType:"LOGIN_SCAN_CODE",content:r.createElement("div",{className:tx.scan_qrcode_login_content},r.createElement(eK,{loginPanelType:h,qrcodeStatus:ej,cancelLogin:eZ,avatar:e$,qrcodeImg:ez,expired:eJ,onRefresh:eW,device:eY,desc:y?y():void 0,showTips:N,useShortUrl:x}))},tn=(0,r.useCallback)(()=>{if("tab"===h)switch(B){case"LOGIN_SCAN_CODE":default:return"qr_code";case"LOGIN_MOBILE_CODE":return"phone_sms";case"LOGIN_ACCOUNT_PWD":return"account_password";case"LOGIN_EMAIL_CODE":return"email_sms"}switch(s){case 0:default:return"qr_code_phone_sms";case 1:return"qr_code_account_password"}},[B,s,h]);return(0,r.useEffect)(()=>{u(tn()),eh("uc_login_notify",{login_suggest_method:tn(),url:window.location.href,switch_from_method:d.current})},[tn]),g?null:r.createElement("div",{className:tx.douyin_login_landing_page},"flat"===h?(n=[e5],(null==a?void 0:a.includes("LOGIN_ACCOUNT_PWD"))&&n.push(e4),r.createElement(L,{title:p,subTitle:C,bgImg:f,showClose:b,onClose:E,showBack:e1,onBack:e0,useShortUrl:x},r.createElement("div",{className:x?tx.new_flat_container:tx.flat_container},r.createElement("div",{className:tx.scan_qrcode_login},r.createElement(eQ,{tabLists:[tt]})),r.createElement("div",{className:tx.input_login},r.createElement(eQ,{tabLists:n,selectedTab:s,onClick:e2}))))):(o=[],l={LOGIN_SCAN_CODE:tt,LOGIN_MOBILE_CODE:e5,LOGIN_EMAIL_CODE:e6,LOGIN_ACCOUNT_PWD:e4},o=null==a?void 0:a.map(e=>l[e]).filter(Boolean),r.createElement(A,{title:p,subTitle:C,bgImg:f,showClose:b,onClose:E,showBack:e1,onBack:e0},r.createElement("div",{className:tx.tab_container},r.createElement("div",{className:tx.login_cntainer},r.createElement(eQ,{onClick:(e,t)=>{c(e),M(t),"LOGIN_SCAN_CODE"===t?(eX(!1),eW()):eX(!0),"LOGIN_MOBILE_CODE"===t?el(!1):el(!0)},selectedTab:s,tabLists:o,loginPanelType:h}))))))};n("130289");let tk={douyin_login_send_voice_code:"PpNIDTrg",flat_container:"yKZkTLPR",description:"rSFK7Sck",bottom_btn:"hcsDaU1y",tab_container:"j_j3mEt5"},tA=()=>{let{config:e,request:t,selectUserInfo:n,selectMobile:o,areaCode:l,mobile:i,getContainer:a}=Y(),{allTextConfig:s}=e||{},{sendVoiceCodeText:c}=s||{},{changePage:u,prePage:d,sendVoiceCodeCountDownID:m}=eC(),[_,g]=(0,r.useState)(!1),[h,p]=(0,r.useState)(!1),[C]=e1(m,60),f=(0,r.useMemo)(()=>"ONE_LOGIN_MOBILE_PAGE"===d?o:"+86"===l?i:`${l} ${null==i?void 0:i.replace(/\s/g,"")}`,[d,i,o]),v=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"submit";eu.show({content:e,getContainer:a}),eh("login_panel_tips_show",{login_method:"ONE_LOGIN_MOBILE_PAGE"===d?"trustdevice_one_click":"phone_sms",is_auto_send_sms:0,tips_type:"toast",tips_stage:t,tips_title:e})};return(0,r.useEffect)(()=>{eh("login_panel_tips_show",{login_method:"ONE_LOGIN_MOBILE_PAGE"===d?"trustdevice_one_click":"phone_sms",is_auto_send_sms:0,tips_type:"window",tips_stage:"submit",tips_title:"收不到验证码"})},[]),{onSend:()=>{if(_)return;eh("login_panel_tips_click",{login_method:"ONE_LOGIN_MOBILE_PAGE"===d?"trustdevice_one_click":"phone_sms",is_auto_send_sms:0,tips_type:"window",tips_stage:"submit",tips_title:"收不到验证码",click_button:"send_voice_code"}),g(!0);let e={};"ONE_LOGIN_MOBILE_PAGE"===d?e={sec_user_id:(null==n?void 0:n.uid)||""}:("LANDING_PAGE"===d||"H5_LANDING_PAGE"===d)&&(e={mobile:`${l} ${null==i?void 0:i.replace(/\s/g,"")}`}),null==t||t.sendVoiceCodeRequest({...e||{}}).then(e=>{C(),p(!0),v((null==c?void 0:c.sentInfo)||"已发送,请留意手机来电","failure"),setTimeout(()=>{u(d||"ONE_LOGIN_PAGE")},1500)}).catch(e=>{v((null==e?void 0:e.description)||"发送失败,请稍后重试","failure")}).finally(()=>{g(!1)})},btnLoading:_,btnSuccess:h,showMobile:f,onBack:()=>{u(d||"ONE_LOGIN_PAGE"),eh("login_panel_tips_click",{login_method:"ONE_LOGIN_MOBILE_PAGE"===d?"trustdevice_one_click":"phone_sms",is_auto_send_sms:0,tips_type:"window",tips_stage:"submit",tips_title:"收不到验证码",click_button:"return"})}}},tI=()=>{var e;let{config:t}=Y(),{loginPanelType:n="flat",subTitle:o,loginBgImg:l,allTextConfig:i,useShortUrl:a=!0}=t||{},{onSend:s,btnLoading:c,btnSuccess:u,showMobile:d,onBack:m}=tA(),{sendVoiceCodeText:_}=i||{};return r.createElement("div",{className:tk.douyin_login_send_voice_code},r.createElement(B,{loginPanelType:n,title:null==_?void 0:_.title,subTitle:o,showSubTitle:!1,bgImg:l,showBack:!0,onBack:m,useShortUrl:a},r.createElement("div",{className:"flat"===n?tk.flat_container:tk.tab_container},r.createElement("p",{className:tk.description},null==_||null==(e=_.firstDesc)?void 0:e.replace("{showMobile}",d)),r.createElement("p",{className:tk.description},null==_?void 0:_.secondDesc),r.createElement("p",{className:tk.description},null==_?void 0:_.thirdDesc),r.createElement("div",{className:tk.bottom_btn},r.createElement(H,{content:null==_?void 0:_.backBtnText,onClick:m,type:"secondary",style:"flat"===n?{width:206,height:44}:{width:174.5,height:36}}),r.createElement(H,{content:null==_?void 0:_.sendVoiceCodeBtnText,onClick:s,loading:c,success:u,style:"flat"===n?{width:206,height:44}:{width:174.5,height:36}})))))};n("497409");let tO={douyin_login_one_login:"lOiXZDos",douyinLoginOneLogin:"lOiXZDos",touch_device:"a8XIpjDI",touchDevice:"a8XIpjDI",flat_container:"DkmNDAvd",flatContainer:"DkmNDAvd",user_info_item:"XCZX4bnr",userInfoItem:"XCZX4bnr",user_name_box:"AdslnfSR",userNameBox:"AdslnfSR",close_icon:"UmCfIqjH",closeIcon:"UmCfIqjH",tab_container:"AR2mDbte",tabContainer:"AR2mDbte",user_name:"B_Nj1uaz",userName:"B_Nj1uaz",multi_user_info_container:"iZehc6C9",multiUserInfoContainer:"iZehc6C9",other_login:"cq1UKYpd",otherLogin:"cq1UKYpd"};var tT=((l={}).PAGE_LOGIN_MOBILE_CODE="LOGIN_MOBILE_CODE",l.PAGE_LOGIN_ACCOUNT_PWD="LOGIN_ACCOUNT_PWD",l.PAGE_LOGIN_SCAN_CODE="LOGIN_SCAN_CODE",l.PAGE_LOGIN_TRUST="LOGIN_TRUST",l.PAGE_LOGIN_PUSH="LOGIN_PUSH",l.PAGE_REGISTER_MOBILE_CODE="REGISTER_MOBILE_CODE",l.PAGE_REGISTER_EMAIL="REGISTER_EMAIL",l.PAGE_PASSWORD_RESET="PASSWORD_RESET",l.PAGE_VERIFY_MOBILE_CODE="VERIFY_MOBILE_CODE",l.PAGE_ACCOUNT_SELECT="ACCOUNT_SELECT",l);var tP=((i={}).MOBILE_SMS_VERIFY="mobile_sms_verify",i.PUSH_VERIFY="push_verify",i);let tB=()=>{let{config:e,request:t,successHd:n,getContainer:o,setSelectUserInfo:l,setSelectMobile:i,setVerifyTicket:a,preLoginMethod:s,setIsFromOneLoginDownGrade:c}=Y(),{loginType:u,next:d=location.href,isKX:m=!1,isKXMulti:_=!1,isKXPush:g=!1,loginPanelType:h="flat"}=e||{},{changePage:p,setLandingBackPage:C}=eC(),[f,v]=(0,r.useState)(!1),[b,E]=(0,r.useState)(!1),[w,y]=(0,r.useState)([]),[N,L]=(0,r.useState)(!1),[x,S]=(0,r.useState)(!1),k=(0,r.useMemo)(()=>{var t;return null==e||null==(t=e.setConfirmCheckbox)?void 0:t.ONE_LOGIN},[null==e?void 0:e.setConfirmCheckbox]),A=(0,r.useMemo)(()=>!!k&&!f,[k,f]),I=function(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0],t="LANDING_PAGE";if("single"===h&&Array.isArray(u)&&u.length>0)switch(u[0]){case"LOGIN_ACCOUNT_PWD":t="SINGLE_ACCOUNT_PWD_PAGE";break;case"LOGIN_MOBILE_CODE":t="SINGLE_MOBILE_CODE_PAGE";break;default:t="SINGLE_SCAN_CODE_PAGE"}p(t),C(e?"single"===h?"SINGLE_ONE_LOGIN_PAGE":"ONE_LOGIN_PAGE":"")},O=async()=>{if(!m){E(!1),I(!1);return}let e=tg();if(0===e.length){E(!1),I(!1);return}E(!0),_?y(e):y([e[0]])},T=(e,t)=>{P((null==e?void 0:e.description)||"该账号暂不支持快捷登录","failure"),tp(t),setTimeout(()=>{O()},1e3)},P=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"submit";eu.show({content:e,getContainer:o}),eh("login_panel_tips_show",{login_method:"trustdevice_one_click",is_auto_send_sms:0,tips_type:"toast",tips_stage:t,tips_title:e})};return(0,r.useEffect)(()=>{O()},[]),{submitBtnDisabled:A,needCheck:k,checked:f,setChecked:v,canOneLogin:b,userInfoArr:w,otherLogin:I,onSubmit:function(e){let o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!N){if(A)return void P("请阅读并勾选 用户协议 和 隐私政策");t.generateVerifyPortraitId(),eh("uc_login_submit",{login_method:"trustdevice_one_click",is_notify_multi_account:+((null==w?void 0:w.length)!==1),trust_account_num:null==w?void 0:w.length,switch_from_method:s.current,is_trustdevice_degraded:0}),L(!0),l(e),null==t||t.oneLoginRequest({sec_user_id:(null==e?void 0:e.uid)||"",service:d,one_login_ticket:null==e?void 0:e.one_login_ticket,ztData:null==e?void 0:e.ztData}).then(e=>{eh("uc_login_result",{status:"success",login_method:"trustdevice_one_click",is_push_verify_stage:0,switch_from_method:s.current,is_submit_multi_account:0,is_notify_multi_account:+((null==w?void 0:w.length)!==1)}),S(!0),n(e)}).catch(t=>{eh("uc_login_result",{status:"fail",login_method:"trustdevice_one_click",is_push_verify_stage:0,error_code:(null==t?void 0:t.error_code)||-1,fail_info:(null==t?void 0:t.description)||"",log_id:null==t?void 0:t.log_id,switch_from_method:s.current,is_submit_multi_account:0,is_notify_multi_account:+((null==w?void 0:w.length)!==1)});let{error_code:n,verify_ticket:l="",verify_ways:r=[],mobile:u}=t||{};if(o&&(2046===n||2032===n))c(!0),E(!1),I(!1);else if(2046===n&&g){var d;(null==r||null==(d=r[0])?void 0:d.verify_way)===tP.PUSH_VERIFY?(a(l),p("ONE_LOGIN_PUSH_PAGE")):T(t,e)}else 2032===n&&l?(a(l),i(u),p("ONE_LOGIN_MOBILE_PAGE")):T(t,e)}).finally(()=>{L(!1)})}},onDelete:e=>{tp(e),P("已删除该账号的登录信息"),setTimeout(()=>{O()},1e3)},btnLoading:N,btnSuccess:x}},tM=()=>{let{config:e,setCurLoginMethod:t,preLoginMethod:n}=Y(),{loginPanelType:o="flat",title:l,subTitle:i,loginBgImg:a,showClose:s=!1,onClose:c,useShortUrl:u=!0}=e||{},{submitBtnDisabled:d,needCheck:m,checked:_,setChecked:g,otherLogin:h,canOneLogin:p,userInfoArr:C,onSubmit:f,onDelete:v,btnLoading:b,btnSuccess:E}=tB(),w=(0,r.useMemo)(()=>null==C?void 0:C[0],[C]),y=(0,r.useMemo)(()=>(null==C?void 0:C.length)===1,[C]),N=e=>{f(e)};return(0,r.useEffect)(()=>{p&&(t("trustdevice_one_click"),eh("uc_login_notify",{login_suggest_method:"trustdevice_one_click",url:window.location.href,is_notify_multi_account:+!y,trust_account_num:null==C?void 0:C.length,switch_from_method:n.current,is_trustdevice_degraded:0}))},[p]),p?r.createElement("div",{className:tO.douyin_login_one_login},r.createElement(B,{title:l,subTitle:i,bgImg:a,loginPanelType:o,showClose:s,onClose:c,useShortUrl:u},r.createElement("div",{className:`${"flat"===o?tO.flat_container:tO.tab_container} ${(0,$.b1)()?tO.touch_device:tO.web_device}`},y?r.createElement(r.Fragment,null,r.createElement("div",{className:tO.user_info_item},r.createElement(D,{url:null==w?void 0:w.avatarUrl,size:"flat"===o?160:130}),r.createElement("div",{className:tO.user_name_box},r.createElement("p",{className:tO.user_name},null==w?void 0:w.nickname),r.createElement("div",{className:tO.close_icon,onClick:()=>v(w)},r.createElement(Z,null)))),r.createElement(H,{content:"一键登录",onClick:()=>N(w),loading:b,success:E,disabled:d,style:"flat"===o?{width:319,height:44,marginBottom:12}:{width:320,height:48,marginBottom:16}})):r.createElement("div",{className:tO.multi_user_info_container},C.map((e,t)=>r.createElement(W,{key:t,avatar:(null==e?void 0:e.avatarUrl)||"",name:(null==e?void 0:e.nickname)||"",lastLogin:0===t,showBackground:"flat"===o,width:"flat"===o?420:364,onClick:()=>N(e),onDelete:()=>v(e),btnDisabled:d}))),r.createElement(eB,{beforeText:"登录即同意",needCheck:m,confirm:null==e?void 0:e.confirm,checked:_,onCheckClick:e=>g(e)}),r.createElement("div",{className:tO.other_login,onClick:()=>h(!0)},r.createElement("p",null,"登录其他账号"),r.createElement(ez,null))))):null};n("593870");let tD={douyin_login_one_login_mobile:"k8JT1k7s",flat_container:"ed8IMVeQ",user_name:"E1FJ1rE_",description:"y5h4apOk",code_input:"m8aVhbue",send_voice_code:"_yyzIFom",other_login:"kuDZ1Yrj",tab_container:"s5d4umBC"},tG=()=>{let{config:e,request:t,verifyTicket:n,getContainer:o,successHd:l,selectUserInfo:i,selectMobile:a,preLoginMethod:s}=Y(),{next:c=window.location.href,isFrontier:u,isSupportVoiceCode:d=!0}=e||{},{changePage:m,setLandingBackPage:_,setSendVoiceCodeCountDownID:g}=eC(),{addMessageHandler:h,removeMessageHandler:p}=e5(),[C,f]=(0,r.useState)(""),[v,b]=(0,r.useState)(!1),[E,w,y,N]=e1(`ONE_LOGIN_MOBILE_${a}`,60),[L,x]=(0,r.useState)(!1),[S,k]=(0,r.useState)(!1),[A,I]=(0,r.useState)(!0),[O,T]=(0,r.useState)(0),P=(0,r.useRef)(!1),B=e=>{let{payload:t}=e.message||{},n=e6(t);(null==n?void 0:n.message)&&q(n.message,"failure")},M=(0,r.useMemo)(()=>y,[y]),D=(0,r.useMemo)(()=>y?`${w}s\u{540E}\u{91CD}\u{65B0}\u{53D1}\u{9001}`:"重新获取",[y,w]),G=(0,r.useMemo)(()=>{let{result:e}=eo({code:C});return!e},[C]),R=()=>{M||(A||(eh("sms_login_verify_resend_click",{click_times:O+1}),T(O+1)),null==t||t.sendVerifyCodeRequest({verify_ticket:n}).then(e=>{E();let t=document.querySelector("#button-input");null==t||t.focus(),u&&window.WebSocket&&!P.current&&(h(B),P.current=!0)}).catch(e=>{q((null==e?void 0:e.description)||"发送验证码失败","failure",+!!A)}).finally(()=>{I(!1)}))},F=e=>{q((null==e?void 0:e.description)||"该账号暂不支持快捷登录","failure"),tp(i),setTimeout(()=>{m("ONE_LOGIN_PAGE")},1500)},q=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"submit",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;eu.show({content:e,getContainer:o}),eh("login_panel_tips_show",{login_method:"trustdevice_one_click",is_auto_send_sms:n,tips_type:"toast",tips_stage:t,tips_title:e})};return(0,r.useEffect)(()=>{N&&d&&b(!0)},[N,d]),(0,r.useEffect)(()=>(R(),()=>{u&&window.WebSocket&&p(B)}),[]),{code:C,onSend:R,onCodeChange:e=>{f(e.replace(/[\D]+/g,""))},sendBtnDisabled:M,sendBtnText:D,submitBtnDisabled:G,btnLoading:L,btnSuccess:S,showVoiceCode:v,onBack:()=>{m("ONE_LOGIN_PAGE")},onShowVoiceCode:()=>{m("SEND_VOICE_CODE_PAGE"),g(`ONE_LOGIN_MOBILE_${a}`)},otherLogin:()=>{m("LANDING_PAGE"),_("ONE_LOGIN_MOBILE_PAGE")},onSubmit:()=>{G||L||(t.generateVerifyPortraitId(),eh("uc_login_submit",{login_method:"trustdevice_one_click",switch_from_method:s.current,is_trustdevice_degraded:1,degraded_login_method:"phone_sms"}),x(!0),null==t||t.checkCodeRequest({code:C,verify_ticket:n}).then(e=>{null==t||t.oneLoginRequest({service:c,sec_user_id:(null==i?void 0:i.uid)||"",ztData:null==i?void 0:i.ztData}).then(e=>{eh("uc_login_result",{status:"success",login_method:"trustdevice_one_click",is_sms_verify_stage:1,switch_from_method:s.current,is_submit_multi_account:0,is_trustdevice_degraded:1,degraded_login_method:"phone_sms"}),k(!0),l(e)}).catch(e=>{eh("uc_login_result",{status:"fail",login_method:"trustdevice_one_click",is_sms_verify_stage:1,error_code:(null==e?void 0:e.error_code)||-1,fail_info:(null==e?void 0:e.description)||"",log_id:null==e?void 0:e.log_id,switch_from_method:s.current,is_submit_multi_account:0,is_trustdevice_degraded:1,degraded_login_method:"phone_sms"}),F(e)})}).catch(e=>{q((null==e?void 0:e.description)||"服务器错误","failure")}).finally(()=>{x(!1)}))}}},tR=()=>{let{config:e,selectUserInfo:t,selectMobile:n,setCurLoginMethod:o,preLoginMethod:l}=Y(),{loginPanelType:i="flat",title:a,subTitle:s,loginBgImg:c,useShortUrl:u=!0}=e||{},{code:d,onCodeChange:m,onSend:_,sendBtnDisabled:g,sendBtnText:h,submitBtnDisabled:p,btnLoading:C,btnSuccess:f,showVoiceCode:v,onBack:b,onShowVoiceCode:E,otherLogin:w,onSubmit:y}=tG();return(0,r.useEffect)(()=>{o("trustdevice_one_click"),eh("uc_login_notify",{login_suggest_method:"trustdevice_one_click",url:window.location.href,switch_from_method:l.current,is_trustdevice_degraded:1,degraded_login_method:"phone_sms"}),eh("sms_login_verify_waits_show",{})},[]),r.createElement("div",{className:tD.douyin_login_one_login_mobile},r.createElement(B,{loginPanelType:i,title:a,subTitle:s,bgImg:c,showBack:!0,onBack:b,useShortUrl:u},r.createElement("div",{className:"flat"===i?tD.flat_container:tD.tab_container},r.createElement(D,{url:null==t?void 0:t.avatarUrl,size:"flat"===i?110:112}),r.createElement("p",{className:tD.user_name},null==t?void 0:t.nickname),r.createElement("p",{className:tD.description},"为保护你的账户安全,本次登录需进行校验,请输入当前账号绑定手机号 ",r.createElement("span",null,n)," ","收到的验证码"),r.createElement("div",{className:tD.code_input},r.createElement(eT,{value:d,onChange:m,buttonText:h,disabled:g,placeholder:"请输入验证码",maxLength:6,width:319,height:48,onClick:_}),v&&r.createElement("p",{className:tD.send_voice_code,onClick:E},"收不到验证码?")),r.createElement(H,{content:"确认登录",onClick:()=>{y()},loading:C,success:f,disabled:p,style:{width:319,height:44}}),r.createElement("div",{className:tD.other_login,onClick:w},r.createElement("p",null,"登录其他账号"),r.createElement(ez,null)))))},tF=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:60,t=(0,r.useRef)(e),[n,o]=(0,r.useState)(e),l=(0,r.useRef)(null),i=()=>{clearInterval(l.current),l.current=null};(0,r.useLayoutEffect)(()=>()=>{i()},[]);let a=null!==l.current,s=0===t.current;return[()=>{let n=()=>{t.current=t.current-1,0===t.current&&i(),o(t.current)};l.current||(l.current=setInterval(n,1e3),t.current=e,n())},t.current,a,s,i,n,l]},tq=()=>{let{config:e,request:t,verifyTicket:n,getContainer:o,successHd:l,selectUserInfo:i,preLoginMethod:a}=Y(),{device_id:s,next:c=location.href,isFrontier:u=!1}=e||{},{changePage:d,setLandingBackPage:m}=eC(),{addMessageHandler:_,removeMessageHandler:g}=e5(),[h,p,C,f,v]=tF(300),[b,E]=(0,r.useState)(!1),[w,y]=(0,r.useState)(!1),[N,L]=(0,r.useState)(""),[x,S]=(0,r.useState)(!1),k=(0,r.useRef)(!1),A=(0,r.useRef)(""),I=(0,r.useRef)(null);(0,r.useEffect)(()=>{S(C)},[C]);let O=(0,r.useMemo)(()=>x?`\u{767B}\u{5F55}\u{786E}\u{8BA4}\u{4E2D}\u{FF08}${er(p)}\u{FF09}`:"发送验证信息",[x,p]),T=e=>{let{payload:t}=e.message||{},{status:n="",allow_login:o=""}=e6(t);q(),"true"===o?(P(),R()):(P(),V("手机端未完成确认,请重新申请登录","failure"),S(!1))},P=()=>{v(),D(),u&&window.WebSocket&&g(T)},B=()=>{x||(eh("push_login_verify_resend_click",{}),null==t||t.sendPushRequest({sec_user_id:(null==i?void 0:i.uid)||"",verify_ticket:n,device_id:s}).then(e=>{let{token:t,device_names:n=[],is_frontier:o=!1}=e||{};A.current=t,L(n.join("、")),M(),h(),u&&window.WebSocket&&!k.current&&o&&(_(T),k.current=!0)}).catch(e=>{V((null==e?void 0:e.description)||"使用其他登录方式","failure")}))},M=()=>{D(),I.current=setInterval(()=>{G()},5e3)},D=()=>{I.current&&(clearInterval(I.current),I.current=null)},G=()=>{null==t||t.checkPushResultRequest({token:A.current}).then(e=>{let{status:t=""}=e||{};"allowed"===t?(q(),P(),R()):("rejected"===t||"expired"===t)&&(q(),P(),V("手机端未完成确认,请重新申请登录","failure"),S(!1))}).catch(e=>{q()})},R=()=>{b||(E(!0),null==t||t.oneLoginRequest({service:c,sec_user_id:(null==i?void 0:i.uid)||"",ztData:null==i?void 0:i.ztData}).then(e=>{eh("uc_login_result",{status:"success",login_method:"trustdevice_one_click",is_push_verify_stage:1,switch_from_method:a.current,is_submit_multi_account:0,is_trustdevice_degraded:1,degraded_login_method:"push"}),y(!0),l(e)}).catch(e=>{eh("uc_login_result",{status:"fail",login_method:"trustdevice_one_click",is_push_verify_stage:1,error_code:(null==e?void 0:e.error_code)||-1,fail_info:(null==e?void 0:e.description)||"",log_id:null==e?void 0:e.log_id,switch_from_method:a.current,is_submit_multi_account:0,is_trustdevice_degraded:1,degraded_login_method:"push"}),F(e)}).finally(()=>{E(!1)}))},F=e=>{S(!1),V((null==e?void 0:e.description)||"该账号暂不支持快捷登录","failure"),tp(i),setTimeout(()=>{d("ONE_LOGIN_PAGE")},1500)};t.generateVerifyPortraitId();let q=()=>{eh("uc_login_submit",{login_method:"trustdevice_one_click",switch_from_method:a.current,is_trustdevice_degraded:1,degraded_login_method:"push"})},V=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"submit";eu.show({content:e,getContainer:o}),eh("login_panel_tips_show",{login_method:"trustdevice_one_click",is_auto_send_sms:0,tips_type:"toast",tips_stage:t,tips_title:e})};return(0,r.useEffect)(()=>{f&&P()},[f]),(0,r.useEffect)(()=>(B(),()=>{P()}),[]),{onSend:B,sendBtnText:O,sendBtnDisabled:x,btnLoading:b,btnSuccess:w,otherLogin:()=>{d("LANDING_PAGE"),m("ONE_LOGIN_PUSH_PAGE")},device:N,onBack:()=>{d("ONE_LOGIN_PAGE")}}};n("315659");let tV={douyin_login_one_login_push:"UMTv_GCJ",flat_container:"OnFqSL9Y",user_name:"xPnRt9NV",description:"ysbrSDks",description_disabled:"i8BDb9ea",other_login:"LNxfSU6P",tab_container:"erfAC1cN"},tU=()=>{let{config:e,selectUserInfo:t,setCurLoginMethod:n,preLoginMethod:o}=Y(),{loginPanelType:l="flat",title:i,subTitle:a,loginBgImg:s,useShortUrl:c=!0}=e||{},{sendBtnText:u,btnLoading:d,btnSuccess:m,otherLogin:_,sendBtnDisabled:g,onSend:h,device:p,onBack:C}=tq();return(0,r.useEffect)(()=>{n("trustdevice_one_click"),eh("uc_login_notify",{login_suggest_method:"trustdevice_one_click",url:window.location.href,switch_from_method:o.current,is_trustdevice_degraded:1,degraded_login_method:"push"}),eh("push_login_verify_waits_show",{})},[]),r.createElement("div",{className:tV.douyin_login_one_login_push},r.createElement(B,{loginPanelType:l,title:i,subTitle:a,bgImg:s,showBack:!0,onBack:C,useShortUrl:c},r.createElement("div",{className:"flat"===l?tV.flat_container:tV.tab_container},r.createElement(D,{url:null==t?void 0:t.avatarUrl,size:"flat"===l?160:130}),r.createElement("p",{className:tV.user_name},null==t?void 0:t.nickname),g?r.createElement("p",{className:tV.description_disabled},"为保护你的账号安全,本次登录需使用你的 ",r.createElement("span",null,p)," 打开",r.createElement("span",null,"「抖音APP」"),",在页面上点击“确认登录”"):r.createElement("p",{className:tV.description},"请点击 ",r.createElement("span",null,"发送验证信息")," 后,打开手机",r.createElement("span",null,"「抖音APP」"),"或点击推送通知确认登录"),r.createElement(H,{content:u,onClick:h,loading:d,success:m,disabled:g,style:{width:319,height:44}}),r.createElement("div",{className:tV.other_login,onClick:_},r.createElement("p",null,"登录其他账号"),r.createElement(ez,null)))))};n("915669");let tH={douyin_login_comp_area_code:"JtJRklkY",input_container:"Yjj7h9xi",input:"BGgRtbFm",icon_arrow:"Vuz8FQj3",select_list_container:"sVJiKvwh",select_list:"eJFCLWKX",select_list_item:"RF3AOYXa",select_list_item_active:"XfToROja"},tj=e=>{let t,n,{onAreaCodeBlur:o,onTab:l,onAreaCodeChange:i,areaCodeValue:a,districtList:s=u,areaCodeNoMatchedResult:c="无匹配数据"}=e,[m,_]=(0,r.useState)(a.length),[g,h]=(0,r.useState)(!1),[p,C]=(0,r.useState)("+86"),[f,v]=(0,r.useState)(!1),b=(0,r.useRef)(null),E=(0,r.useRef)(null),w=e=>{if(!e)return void setTimeout(()=>{var t,n;(null==(n=document.activeElement)||null==(t=n.id)?void 0:t.includes("areacode_item_"))||(h(e),v(e))},0);h(e),v(e)},y=()=>{var e;null==b||null==(e=b.current)||e.focus(),g||h(!0)},N=e=>{var t,n,o,i;let a=e.key;if(e.preventDefault(),"Tab"===a)return null==l?void 0:l();let r=document.activeElement;if(r&&("ArrowDown"===a&&(null==(n=r.nextElementSibling)||null==(t=n.focus)||t.call(n)),"ArrowUp"===a&&(null==(i=r.previousElementSibling)||null==(o=i.focus)||o.call(i)),"Enter"===a)){let e=r.getAttribute("data-itemvalue");e&&x(e)}},L=e=>{w(!1)},x=e=>{h(!1),v(!1),C(e),i(e)};return(0,r.useEffect)(()=>{_(a.length)},[a]),r.createElement("div",{className:tH.douyin_login_comp_area_code},r.createElement("div",{className:tH.input_container},r.createElement("input",{type:"text",size:m,name:"web-login-area-code-input",className:tH.input,autoComplete:"new-password",value:a,onChange:e=>{var t;let n=(null==(t=e.target)?void 0:t.value)||"";(n=n.trim().replace(/[^\d\+]+/g,""))||(n="+"),i(n),w(!0)},onFocus:y,onClick:y,onKeyUp:e=>{if(d.includes(e.code)){var t,n;let e=null==E||null==(n=E.current)||null==(t=n.firstElementChild)?void 0:t.getAttribute("data-itemvalue");if(!e)return void w(!1);w(!1),C(e),i(e)}},onBlur:e=>{let t=Object.keys(s).filter(e=>s[e]===a);if(t.length>0){let e=s[t[0]];w(!1),C(e),i(e)}else w(!1),i(p);null==o||o()},ref:b,role:"combobox",tabIndex:0,"aria-owns":"select-ul","aria-activedescendant":"areacode_item_0","aria-label":"国家/地区",maxLength:5}),r.createElement("i",{onMouseDown:e=>{if(g)h(!0);else{var t;null==b||null==(t=b.current)||t.focus(),null==e||e.preventDefault()}},className:`${tH.icon_arrow} `})),g&&r.createElement("div",{className:tH.select_list_container},r.createElement("ul",{id:"select-ul",className:tH.select_list,ref:E},(t=[],n=Object.keys(s),(f&&(n=Object.keys(s).filter(e=>-1!==s[e].indexOf(a)||-1!==e.indexOf(a))),n.forEach((e,n)=>{let o=s[e],l=o===a;t.push(r.createElement("li",{key:e,className:`${tH.select_list_item} ${l?tH.select_list_item_active:""}`,onMouseDown:x.bind(null,o),"data-itemvalue":o,id:`areacode_item_${n}`,tabIndex:0,onKeyDown:N,onBlur:L,"aria-label":`${e}${o}`},r.createElement("span",null,e),r.createElement("span",null,o)))}),t.length>0)?t:r.createElement("li",{className:tH.select_list_item,tabIndex:0,id:"areacode_item_no_match",onKeyDown:N,onBlur:L,"aria-label":c},c)))))};n("138440");let t$={douyin_login_comp_normal_input:"nfflXlT5",input_line:"TKIo16Js",password_icon_before:"GNaC_V60",password_icon_after:"Ah7A5gYI",input:"iaDyZY02"},tz=e=>{let{value:t="",type:n="tel",onChange:o,onBlur:l,onFocus:i,placeholder:a="",autoComplete:s="on",inputLabel:c="",maxLength:d=50,showAreaCode:m=!1,districtList:_=u,areaCodeNoMatchedResult:g,showPasswordIcon:h="none",showPassword:p=!1,onShowPasswordChange:C,areaCodeValue:f="",onAreaCodeChange:v=()=>{},onAreaCodeBlur:b,width:E,height:w=42}=e||{},y=(0,r.useRef)(null),[N,L]=(0,r.useState)(!1);(0,r.useEffect)(()=>{L(p)},[p]);let x=(0,r.useMemo)(()=>"none"!==h?N?"text":"password":n,[n,h,N]),S=e=>{e.stopPropagation(),null==C||C(!N)};return r.createElement("div",{id:"douyin_login_comp_normal_input_id",className:t$.douyin_login_comp_normal_input,style:{width:E,height:w}},m&&r.createElement(r.Fragment,null,r.createElement(tj,{areaCodeValue:f,onAreaCodeChange:v,onAreaCodeBlur:b,onTab:()=>{var e,t;null==(t=y.current)||null==(e=t.focus)||e.call(t)},districtList:_,areaCodeNoMatchedResult:g}),r.createElement("div",{className:t$.input_line},r.createElement(eA,null))),"before"===h&&r.createElement(r.Fragment,null,r.createElement("div",{className:t$.password_icon_before,onClick:S},N?r.createElement(ek,null):r.createElement(eS,null)),r.createElement("div",{className:t$.input_line},r.createElement(eA,null))),r.createElement("input",{ref:y,name:"normal-input",id:"normal-input",type:x,className:t$.input,value:t,placeholder:a,onChange:e=>{o((e.target.value||"").trim())},onBlur:()=>{null==l||l()},onFocus:()=>{null==i||i()},autoComplete:s,tabIndex:0,"aria-label":c,maxLength:d}),"after"===h&&r.createElement("div",{className:t$.password_icon_after,onClick:S},N?r.createElement(ek,null):r.createElement(eS,null)))};n("787831");let tZ={douyin_login_comp_button_input:"Zt2Co595",input_wrapper:"CgLOYY9v",input:"ZhrBAdOz",button_text:"smzMMime",disabled:"ObYdUGy4"},tJ=e=>{let{value:t="",type:n="tel",placeholder:o="",buttonText:l="",maxLength:i=50,inputLabel:a="",onChange:s,onBlur:c=()=>{},onFocus:u,onClick:m,disabled:_=!1,width:g,height:h=42}=e||{};return r.createElement("div",{id:"douyin_login_comp_button_input_id",className:tZ.douyin_login_comp_button_input,style:{width:g,height:h}},r.createElement("div",{className:tZ.input_wrapper},r.createElement("input",{name:"button-input",id:"button-input",type:n,className:tZ.input,placeholder:o,onChange:e=>{s((e.target.value||"").trim())},value:t,onBlur:e=>{c()},onFocus:()=>{null==u||u()},autoComplete:"off",maxLength:i,tabIndex:0,"aria-label":a})),l&&r.createElement("span",{className:`${tZ.button_text} ${_?tZ.disabled:""}`,onMouseDown:m,onKeyDown:e=>{d.includes(e.code)&&(null==m||m())},tabIndex:0,"aria-live":"off"},l))};n("619619");let tW={douyin_login_comp_btn:"MJTcqm4z",douyinLoginCompBtn:"MJTcqm4z",content:"juTetrf0",primary:"_ZlcEcYf",secondary:"FwrXNJAz",disabled:"M2ui0yLR",loading:"ur_zliFm"},tK=r.lazy(()=>n.e("8959").then(n.bind(n,175762))),tX=e=>{let{content:t,onClick:n,loading:o=!1,disabled:l=!1,success:i=!1,style:a,type:s="primary"}=e,{animationData:c,isLoading:u}=V(p);return r.createElement("div",{id:"douyin_login_comp_btn_id",className:`${tW.douyin_login_comp_btn} ${tW.content} ${tW[s]} ${l?tW.disabled:""} ${o?tW.loading:""}`,style:a,onClick:n},o&&tK&&r.createElement(r.Suspense,{fallback:r.createElement("div",null)},!u&&c&&r.createElement(tK,{autoplay:!0,loop:!0,data:c,lottieCdn:C})),i&&r.createElement(q,null),!o&&!i&&t)};n("571508");let tQ={douyin_login_comp_confirm_info:"w3RaP2ZJ",checkbox:"BillGTxG",checked:"CAqKek7t",before_text:"UZOuCuA4",confirm_item:"JShl3NLM",connect_text:"uEzGwNnR"},tY=e=>{let t,n,{config:o}=Y(),{allTextConfig:l,confirm:i}=o||{},{confirmInfoText:a}=l||{},{beforeText:s=null==a?void 0:a.confirmInfoBeforeText,connectText:c=null==a?void 0:a.confirmInfoConnectText,confirm:u=[{text:(null==i?void 0:i[0].text)||"用户协议",url:(null==i?void 0:i[0].url)||"https://www.douyin.com/agreements/?id=6773906068725565448",open:"_blank"},{text:(null==i?void 0:i[1].text)||"隐私政策",url:(null==i?void 0:i[1].url)||"https://www.douyin.com/agreements/?id=6773901168964798477",open:"_blank"}],needCheck:m=!1,checked:_=!1,onCheckClick:g}=e,[h,p]=(0,r.useState)(_),C=()=>{null==g||g(!h)};return(0,r.useEffect)(()=>{p(_)},[_]),r.createElement("div",{className:tQ.douyin_login_comp_confirm_info,"aria-label":(t=u.map(e=>e.text),`${s}${t.join(c)}`)},m&&r.createElement("span",{className:`${tQ.checkbox} ${h?tQ.checked:""}`,role:"checkbox","aria-checked":h,tabIndex:0,"aria-label":"协议勾选框",onClick:C,onKeyDown:e=>{d.includes(e.code)&&C()}}),r.createElement("span",{className:tQ.before_text},s),(n=[],u.forEach((e,t)=>{let{text:o="",url:l="",open:i="_blank"}=e;n.push(r.createElement("a",{target:i,key:t,href:l,className:tQ.confirm_item,tabIndex:0,"aria-label":o},o)),t!==u.length-1&&n.push(r.createElement("span",{key:`${t}span`,className:tQ.connect_text},c))}),n))};n("631214");let t1={douyin_login_comp_mobile_code:"bvuTnQuU",douyinLoginCompMobileCode:"bvuTnQuU",h5_container:"qxskRS84",h5Container:"qxskRS84",mobile_input:"VqAW16iU",mobileInput:"VqAW16iU",bottom_text:"d9OPsur3",bottomText:"d9OPsur3",error_text:"uLknfSBf",errorText:"uLknfSBf",send_voice_code:"uKIOVpPI",sendVoiceCode:"uKIOVpPI",submit_btn:"CgyHxWRh",submitBtn:"CgyHxWRh",agreement:"fZGVWTf7",custom_footer:"mshnB4y9",customFooter:"mshnB4y9"},t0=e=>{let{config:t}=Y(),{allTextConfig:n,isShowProtocol:o=!0}=t||{},{mobileCodeLoginText:l,districtList:i,sendVoiceCodeText:a,extraText:s}=n||{},{mobile:c,onMobileChange:u,onMobileBlur:d,onMobileFocus:m,areaCode:_,onAreaCodeChange:g,onAreaCodeBlur:h,code:p,onCodeChange:C,onCodeBlur:f,onCodeFocus:v,loginOnly:b=!0,sendBtnText:E=null==l?void 0:l.sendCode,sendBtnDisabled:w=!1,onSend:y,errorText:N,showVoiceCode:L=!1,onShowVoiceCode:x,submitBtnDisabled:S=!1,submitBtnLoading:k=!1,submitBtnSuccess:A=!1,onSubmit:I,loginPanelType:O="flat",CustomFooter:T,confirmInfoProps:P}=e||{},B=(0,r.useMemo)(()=>b?null==l?void 0:l.buttonText:null==l?void 0:l.registerText,[b]);return r.createElement("div",{className:t1.douyin_login_comp_mobile_code},r.createElement("div",{className:t1.h5_container},r.createElement("div",{className:t1.mobile_input},r.createElement(tz,{autoComplete:"off",value:c,onChange:u,onBlur:d,onFocus:m,showAreaCode:!0,districtList:i,placeholder:null==l?void 0:l.mobilePlaceholder,areaCodeValue:_,onAreaCodeChange:g,onAreaCodeBlur:h,width:241,areaCodeNoMatchedResult:null==s?void 0:s.areaCodeNoMatchedResult})),r.createElement("div",{className:t1.code_input},r.createElement(tJ,{value:p,onChange:C,onBlur:f,onFocus:v,buttonText:E,disabled:w,placeholder:null==l?void 0:l.codePlaceholder,maxLength:6,width:241,onClick:y})),r.createElement("div",{className:t1.bottom_text},N&&r.createElement("p",{id:"error_text_id",className:t1.error_text},N),L&&r.createElement("p",{className:t1.send_voice_code,onClick:x},null==a?void 0:a.title)),r.createElement("div",{className:t1.submit_btn},r.createElement(tX,{disabled:S,content:B,style:{width:241,height:42},onClick:I,loading:k,success:A})),o&&r.createElement("div",{className:t1.agreement},r.createElement(tY,P||{})),T&&r.createElement("div",{className:t1.custom_footer},r.createElement(T,null))))};n("595980");let t2={douyin_login_comp_email_code:"pY4bCSm4",douyinLoginCompEmailCode:"pY4bCSm4",h5_container:"GzgtDjC4",h5Container:"GzgtDjC4",email_input:"xctJucVY",emailInput:"xctJucVY",bottom_text:"vO2O7hzI",bottomText:"vO2O7hzI",error_text:"o1N9PS8D",errorText:"o1N9PS8D",send_voice_code:"jwWupJiB",sendVoiceCode:"jwWupJiB",submit_btn:"fupQBsCw",submitBtn:"fupQBsCw",agreement:"TtnzAc3c",custom_footer:"_0rFzApt",customFooter:"_0rFzApt"},t3=e=>{let{config:t}=Y(),{allTextConfig:n,isShowProtocol:o=!0}=t||{},{emailCodeLoginText:l,districtList:i,extraText:a}=n||{},{email:s,onEmailChange:c,onEmailBlur:u,onEmailFocus:d,code:m,onCodeChange:_,onCodeBlur:g,onCodeFocus:h,loginOnly:p=!0,sendBtnText:C=null==l?void 0:l.sendCode,sendBtnDisabled:f=!1,onSend:v,errorText:b,submitBtnDisabled:E=!1,submitBtnLoading:w=!1,submitBtnSuccess:y=!1,onSubmit:N,CustomFooter:L,confirmInfoProps:x}=e||{},S=(0,r.useMemo)(()=>p?null==l?void 0:l.buttonText:null==l?void 0:l.registerText,[p]);return r.createElement("div",{className:t2.douyin_login_comp_email_code},r.createElement("div",{className:t2.h5_container},r.createElement("div",{className:t2.email_input},r.createElement(tz,{type:"text",autoComplete:"off",value:s,onChange:c,onBlur:u,onFocus:d,districtList:i,placeholder:null==l?void 0:l.emailPlaceholder,width:241,areaCodeNoMatchedResult:null==a?void 0:a.areaCodeNoMatchedResult})),r.createElement("div",{className:t2.code_input},r.createElement(tJ,{type:"text",value:m,onChange:_,onBlur:g,onFocus:h,buttonText:C,disabled:f,placeholder:null==l?void 0:l.codePlaceholder,maxLength:6,width:241,onClick:v})),r.createElement("div",{className:t2.bottom_text},b&&r.createElement("p",{id:"error_text_id",className:t2.error_text},b)),r.createElement("div",{className:t2.submit_btn},r.createElement(tX,{disabled:E,content:S,style:{width:241,height:42},onClick:N,loading:w,success:y})),o&&r.createElement("div",{className:t2.agreement},r.createElement(tY,x||{})),L&&r.createElement("div",{className:t2.custom_footer},r.createElement(L,null))))};n("530266");let t5={douyin_login_comp_account_pwd:"hiXjgj7l",h5_container:"fMYu3A9L",mobile_input:"dnf5Li4o",bottom_text:"OYW2GZe7",error_text:"o_oqAc8u",submit_btn:"qSXgOHhD",agreement:"ASZmHIvl",custom_footer:"LUb44O2Q"},t6=e=>{let{config:t}=Y(),{allTextConfig:n,isShowProtocol:o=!0}=t||{},{accountPwdLoginText:l,districtList:i,extraText:a}=n||{},{mobile:s,onMobileChange:c,onMobileBlur:u,onMobileFocus:d,areaCode:m,onAreaCodeChange:_,onAreaCodeBlur:g,password:h,onPasswordChange:p,onPasswordBlur:C,onPasswordFocus:f,errorText:v,submitBtnDisabled:b=!1,submitBtnLoading:E=!1,submitBtnSuccess:w=!1,onSubmit:y,loginPanelType:N="flat",CustomFooter:L,confirmInfoProps:x}=e||{},[S,k]=(0,r.useState)(!1);return r.createElement("div",{className:t5.douyin_login_comp_account_pwd},r.createElement("div",{className:t5.h5_container},r.createElement("div",{className:t5.mobile_input},r.createElement(tz,{autoComplete:"off",value:s,onChange:c,onBlur:u,onFocus:d,showAreaCode:!0,districtList:i,placeholder:null==l?void 0:l.accountPlaceholder,areaCodeValue:m,onAreaCodeChange:_,onAreaCodeBlur:g,width:241,inputLabel:null==l?void 0:l.accountLabel,areaCodeNoMatchedResult:null==a?void 0:a.areaCodeNoMatchedResult})),r.createElement("div",{className:"password_input"},r.createElement(tz,{value:h,type:"password",onChange:p,onBlur:C,onFocus:f,showPasswordIcon:"before",showPassword:S,onShowPasswordChange:e=>k(e),placeholder:null==l?void 0:l.pwdPlaceholder,maxLength:20,width:241,inputLabel:null==l?void 0:l.pwdLabel,areaCodeNoMatchedResult:null==a?void 0:a.areaCodeNoMatchedResult})),r.createElement("div",{className:t5.bottom_text},v&&r.createElement("p",{id:"error_text_id",className:t5.error_text},v)),r.createElement("div",{className:t5.submit_btn},r.createElement(tX,{disabled:b,content:null==l?void 0:l.buttonText,style:{width:241,height:42},onClick:y,loading:E,success:w})),o&&r.createElement("div",{className:t5.agreement},r.createElement(tY,x||{})),L&&r.createElement("div",{className:t5.custom_footer},r.createElement(L,null))))};n("695755");let t4="y5m3mH9L",t7="yQrr5VPz",t9="wFDNOXNc",t8=e=>{let{Icon:t=()=>null,RealEle:n=()=>null,size:o=56}=e||{};return r.createElement("div",{className:t4,style:{width:o,height:o}},r.createElement("div",{className:t7},r.createElement(t,null)),r.createElement("div",{className:t9},r.createElement(n,null)))};n("24913");let ne={douyin_login_comp_tab_item:"W8OnJIYC",douyinLoginCompTabItem:"W8OnJIYC",h5_container:"MvHnMVxi",h5Container:"MvHnMVxi",tab_box:"ZVU90Cg1",tabBox:"ZVU90Cg1",selected:"b5fZ2Lo2",line:"HMcFaqlj"},nt=e=>{let{isH5:t=!1,tabLists:n,loginPanelType:o="flat",width:l,onClick:i,selectedTab:a=0}=e||{},[s,c]=(0,r.useState)(a),u=(0,r.useMemo)(()=>n[s].content,[s,n]);return r.createElement("div",{className:ne.douyin_login_comp_tab_item,style:{width:l}},r.createElement("div",{className:ne.h5_container},r.createElement("div",{className:ne.tab_box},n.map((e,o)=>r.createElement(r.Fragment,{key:o},r.createElement("span",{onClick:()=>{var t;return t=e.loginType,void(null==i||i(o,t),c(o))},className:o===s?ne.selected:""},e.title),o!==n.length-1&&t&&r.createElement("div",{className:ne.line},r.createElement(eA,null))))),r.createElement("div",{className:ne.content_box},u)))};n("522030");let nn={douyin_login_landing_page:"E54iF9sW",h5_container:"KKAJtmWQ",input_login:"D3ZIZhrw",mobile_code_login_content:"aZjkxrYc",account_pwd_login_content:"OtstojbK",email_code_login_content:"puuVG3Rr",custom_footer_content:"lc2_mndK",custom_footer_content_item:"zbvM0cBM"},no=()=>{var e,t;let n,o,{config:l,loginType:i,selectedTab:a,setSelectedTab:s,setCurLoginMethod:c,preLoginMethod:u,isFinalShowApple:d,isFinalShowGoogle:m,checkLoading:_}=Y(),{isH5:g=!1,loginPanelType:h="flat",title:p,subTitle:C,loginBgImg:f,CustomFooter:v,showClose:b=!1,onClose:E,allTextConfig:w}=l||{},{changePage:y,prePage:N,landingBackPage:L}=eC(),{accountPwdLoginText:x,mobileCodeLoginText:S,emailCodeLoginText:k}=w||{},[A,I]=(0,r.useState)((null==i?void 0:i[0])||"LOGIN_SCAN_CODE"),{areaCode:O,mobile:T,code:B,onAreaCodeChange:M,onMobileChange:D,onCodeChange:G,onMobileFocus:R,onCodeFocus:F,needCheck:q,checked:V,setChecked:U,onSend:H,sendBtnText:j,onSubmit:$,showVoiceCode:z,onShowVoiceCode:Z,error:J,sendBtnDisabled:W,submitBtnDisabled:K,submitBtnLoading:X,submitBtnSuccess:Q,setPageHidden:ee}=e7(),{email:et,code:en,onEmailChange:eo,onCodeChange:el,onEmailFocus:ei,onCodeFocus:ea,needCheck:er,checked:es,setChecked:ec,onSend:eu,sendBtnText:ed,onSubmit:em,error:e_,sendBtnDisabled:eg,submitBtnDisabled:ep,submitBtnLoading:ef,submitBtnSuccess:ev}=e9(),{areaCode:eb,mobile:eE,password:ew,onAreaCodeChange:ey,onMobileChange:eN,onPwdChange:eL,onMobileFocus:ex,onPwdFocus:eS,error:ek,needCheck:eA,checked:eI,setChecked:eO,onSubmit:eT,submitBtnDisabled:eP,submitBtnLoading:eB,submitBtnSuccess:eM}=e8(),eD=(0,r.useMemo)(()=>!!L,[L]),eG={title:null==S?void 0:S.title,loginType:"LOGIN_MOBILE_CODE",content:r.createElement("div",{className:nn.mobile_code_login_content},r.createElement(t0,{loginOnly:null==l||null==(e=l.loginOnly)?void 0:e.LOGIN_MOBILE_CODE,loginPanelType:h,mobile:T,onMobileChange:D,onMobileFocus:R,areaCode:O,onAreaCodeChange:M,code:B,onCodeChange:G,onCodeFocus:F,errorText:J,showVoiceCode:z,onShowVoiceCode:Z,CustomFooter:v,onSend:H,sendBtnText:j,onSubmit:()=>{$()},sendBtnDisabled:W,submitBtnDisabled:K,submitBtnLoading:X,submitBtnSuccess:Q,confirmInfoProps:{needCheck:q,confirm:null==l?void 0:l.confirm,checked:V,onCheckClick:e=>U(e)}}))},eR={title:null==k?void 0:k.title,loginType:"LOGIN_EMAIL_CODE",content:r.createElement("div",{className:nn.email_code_login_content},r.createElement(t3,{loginOnly:null==l||null==(t=l.loginOnly)?void 0:t.LOGIN_EMAIL_CODE,loginPanelType:h,email:et,onEmailChange:eo,onEmailFocus:ei,code:en,onCodeChange:el,onCodeFocus:ea,errorText:e_,CustomFooter:v,onSend:eu,sendBtnText:ed,onSubmit:()=>{em()},sendBtnDisabled:eg,submitBtnDisabled:ep,submitBtnLoading:ef,submitBtnSuccess:ev,confirmInfoProps:{needCheck:er,confirm:null==l?void 0:l.confirm,checked:es,onCheckClick:e=>ec(e)}}))},eF={title:null==x?void 0:x.title,loginType:"LOGIN_ACCOUNT_PWD",content:r.createElement("div",{className:nn.account_pwd_login_content},r.createElement(t6,{loginPanelType:h,mobile:eE,onMobileChange:eN,onMobileFocus:ex,onPasswordFocus:eS,areaCode:eb,onAreaCodeChange:ey,password:ew,onPasswordChange:eL,errorText:ek,CustomFooter:v,onSubmit:()=>{eT()},submitBtnDisabled:eP,submitBtnLoading:eB,submitBtnSuccess:eM,confirmInfoProps:{needCheck:eA,confirm:null==l?void 0:l.confirm,checked:eI,onCheckClick:e=>eO(e)}}))},eq=(0,r.useCallback)(()=>{switch(A){case"LOGIN_SCAN_CODE":return"qr_code";case"LOGIN_MOBILE_CODE":default:return"phone_sms";case"LOGIN_ACCOUNT_PWD":return"account_password";case"LOGIN_EMAIL_CODE":return"email_sms"}},[A]);return(0,r.useEffect)(()=>{c(eq()),eh("uc_login_notify",{login_suggest_method:eq(),url:window.location.href,switch_from_method:u.current})},[eq]),_?null:r.createElement("div",{className:nn.douyin_login_landing_page},(n=[],o={LOGIN_MOBILE_CODE:eG,LOGIN_EMAIL_CODE:eR,LOGIN_ACCOUNT_PWD:eF},n=null==i?void 0:i.map(e=>o[e]).filter(Boolean),r.createElement(r.Fragment,null,r.createElement(P,{title:p,subTitle:C,bgImg:f,showClose:b,onClose:E,showBack:eD,onBack:()=>{y(L||"ONE_LOGIN_PAGE")},footer:d||m?()=>{let e=[],{AppleLoginBtn:t,GoogleLoginBtn:n}=ty();return m&&e.push({Icon:tL,RealEle:n,size:56}),d&&e.push({Icon:tN,RealEle:t,size:56}),r.createElement("div",{className:nn.custom_footer_content},e.map((e,t)=>r.createElement("div",{className:nn.custom_footer_content_item,key:t},r.createElement(t8,{Icon:e.Icon,RealEle:e.RealEle,size:e.size}))))}:()=>null},r.createElement("div",{className:nn.h5_container},r.createElement("div",{className:nn.input_login},r.createElement(nt,{tabLists:n,selectedTab:a,onClick:(e,t)=>{s(e),I(t)},isH5:!0})))))))};n("865525");let nl="CmioeO8G",ni="Qr6cfUnz",na="Q7rgobA2",nr="rEEf1Dlz",ns=()=>{var e;let{config:t}=Y(),{subTitle:n,loginBgImg:o,allTextConfig:l}=t||{},{onSend:i,btnLoading:a,btnSuccess:s,showMobile:c,onBack:u}=tA(),{sendVoiceCodeText:d}=l||{};return r.createElement("div",{className:nl},r.createElement(P,{title:null==d?void 0:d.title,subTitle:n,showSubTitle:!1,bgImg:o,showBack:!0,onBack:u},r.createElement("div",{className:ni},r.createElement("p",{className:na},null==d||null==(e=d.firstDesc)?void 0:e.replace("{showMobile}",c)),r.createElement("p",{className:na},null==d?void 0:d.secondDesc),r.createElement("p",{className:na},null==d?void 0:d.thirdDesc),r.createElement("div",{className:nr},r.createElement(tX,{content:null==d?void 0:d.backBtnText,onClick:u,type:"secondary",style:{width:117,height:36}}),r.createElement(tX,{content:null==d?void 0:d.sendVoiceCodeBtnText,onClick:i,loading:a,success:s,style:{width:117,height:36}})))))};n("631056");let nc={douyin_login_single_one_login:"eDieNJxh",user_info_item:"QuhSWELf",user_name_box:"QhH5GiY0",close_icon:"X65Yl0Na",user_name:"Db8zdVOU",multi_user_info_container:"WS25QujV",other_login:"USWbdnzf"},nu=()=>{let{config:e,setCurLoginMethod:t,preLoginMethod:n}=Y(),{loginPanelType:o="single",isShowOtherLogin:l=!1,onShowOtherLogin:i}=e||{},{submitBtnDisabled:a,needCheck:s,checked:c,setChecked:u,otherLogin:d,canOneLogin:m,userInfoArr:_,onSubmit:g,onDelete:h,btnLoading:p,btnSuccess:C}=tB(),f=(0,r.useMemo)(()=>null==_?void 0:_[0],[_]),v=(0,r.useMemo)(()=>(null==_?void 0:_.length)===1,[_]),b=e=>{g(e,!0)};return(0,r.useEffect)(()=>{m&&(t("trustdevice_one_click"),eh("uc_login_notify",{login_suggest_method:"trustdevice_one_click",url:window.location.href,is_notify_multi_account:+!v,trust_account_num:null==_?void 0:_.length,switch_from_method:n.current,is_trustdevice_degraded:0}))},[m]),m?r.createElement("div",{id:"douyin_login_comp_single_panel"},r.createElement("div",{className:nc.douyin_login_single_one_login},v?r.createElement(r.Fragment,null,r.createElement("div",{className:nc.user_info_item},r.createElement(D,{url:null==f?void 0:f.avatarUrl,size:70}),r.createElement("div",{className:nc.user_name_box},r.createElement("p",{className:nc.user_name},null==f?void 0:f.nickname),r.createElement("div",{className:nc.close_icon,onClick:()=>h(f)},r.createElement(Z,null)))),r.createElement(H,{content:"一键登录",onClick:()=>b(f),loading:p,success:C,disabled:a,style:{width:208,height:32,marginBottom:8,borderRadius:8,fontSize:14}})):r.createElement("div",{className:nc.multi_user_info_container},_.map((e,t)=>r.createElement(K,{key:t,avatar:(null==e?void 0:e.avatarUrl)||"",name:(null==e?void 0:e.nickname)||"",lastLogin:0===t,onClick:()=>b(e),onDelete:()=>h(e),btnDisabled:a}))),r.createElement(eB,{beforeText:"登录即同意",needCheck:s,confirm:null==e?void 0:e.confirm,checked:c,onCheckClick:e=>u(e),style:{fontSize:10,lineHeight:"14px"}}),l&&r.createElement("div",{className:nc.other_login,onClick:i},r.createElement("p",null,"登录其他账号"),r.createElement(ez,null)))):null},nd=()=>{let{config:e,isFromOneLoginDownGrade:t,setCurLoginMethod:n,preLoginMethod:o}=Y(),{isShowTips:l=!1,scanCodeDesc:i,loginPanelType:a="single",isShowOtherLogin:s=!1,onShowOtherLogin:c,useShortUrl:u=!0}=e||{},{qrcodeStatus:d,avatar:m,qrCodeImg:_,cancelLogin:g,expired:h,onRefresh:p,device:C}=te();return(0,r.useEffect)(()=>{n("qr_code"),eh("uc_login_notify",{login_suggest_method:"qr_code",url:window.location.href,switch_from_method:o.current})},[]),r.createElement("div",{id:"douyin_login_comp_single_panel"},r.createElement(eK,{loginPanelType:a,qrcodeStatus:d,cancelLogin:g,avatar:m,qrcodeImg:_,expired:h,onRefresh:p,device:C,desc:i?i(t):void 0,showTips:l,isShowOtherLogin:s,onShowOtherLogin:c,useShortUrl:u}))},nm=()=>{var e;let{config:t,isFinalShowApple:n,isFinalShowGoogle:o}=Y(),{loginPanelType:l="flat",CustomFooter:i}=t||{},{areaCode:a,mobile:s,code:c,onAreaCodeChange:u,onMobileChange:d,onCodeChange:m,onMobileFocus:_,onCodeFocus:g,needCheck:h,checked:p,setChecked:C,onSend:f,sendBtnText:v,onSubmit:b,showVoiceCode:E,onShowVoiceCode:w,error:y,sendBtnDisabled:N,submitBtnDisabled:L,submitBtnLoading:x,submitBtnSuccess:S,setPageHidden:k}=e7();return r.createElement("div",{id:"douyin_login_comp_single_panel"},r.createElement(eD,{loginOnly:null==t||null==(e=t.loginOnly)?void 0:e.LOGIN_MOBILE_CODE,loginPanelType:l,mobile:s,onMobileChange:d,onMobileFocus:_,areaCode:a,onAreaCodeChange:u,code:c,onCodeChange:m,onCodeFocus:g,errorText:y,showVoiceCode:E,onShowVoiceCode:w,CustomFooter:i,onSend:f,sendBtnText:v,onSubmit:b,sendBtnDisabled:N,submitBtnDisabled:L,submitBtnLoading:x,submitBtnSuccess:S,confirmInfoProps:{needCheck:h,confirm:null==t?void 0:t.confirm,checked:p,onCheckClick:e=>C(e)}}))},n_=()=>{let{config:e,setCurLoginMethod:t,preLoginMethod:n}=Y(),{loginPanelType:o="flat",CustomFooter:l}=e||{},{areaCode:i,mobile:a,password:s,onAreaCodeChange:c,onMobileChange:u,onPwdChange:d,onMobileFocus:m,onPwdFocus:_,error:g,needCheck:h,checked:p,setChecked:C,onSubmit:f,submitBtnDisabled:v,submitBtnLoading:b,submitBtnSuccess:E}=e8();return(0,r.useEffect)(()=>{t("account_password"),eh("uc_login_notify",{login_suggest_method:"account_password",url:window.location.href,switch_from_method:n.current})},[]),r.createElement("div",{id:"douyin_login_comp_single_panel"},r.createElement(eq,{loginPanelType:o,mobile:a,onMobileChange:u,onMobileFocus:m,onPasswordFocus:_,areaCode:i,onAreaCodeChange:c,password:s,onPasswordChange:d,errorText:g,CustomFooter:l,onSubmit:f,submitBtnDisabled:v,submitBtnLoading:b,submitBtnSuccess:E,confirmInfoProps:{needCheck:h,confirm:null==e?void 0:e.confirm,checked:p,onCheckClick:e=>C(e)}}))},ng=e=>{let{children:t,config:n,request:o}=e;return r.createElement(Q.Provider,{initialState:{config:n,request:o}},r.createElement(ep.Provider,null,r.createElement(e3.Provider,null,t)))};n("225479"),n("93458");let nh=()=>{let{currentPage:e}=eC();return r.createElement("div",{id:"douyin-login-new-id",className:"douyin_login_new_class"},(()=>{switch(e){case"LANDING_PAGE":default:return r.createElement(tS,null);case"ONE_LOGIN_PAGE":return r.createElement(tM,null);case"ONE_LOGIN_MOBILE_PAGE":return r.createElement(tR,null);case"ONE_LOGIN_PUSH_PAGE":return r.createElement(tU,null);case"ACCOUNT_SELECT_PAGE":return r.createElement(ev,null);case"SEND_VOICE_CODE_PAGE":return r.createElement(tI,null);case"H5_LANDING_PAGE":return r.createElement(no,null);case"H5_SEND_VOICE_CODE_PAGE":return r.createElement(ns,null);case"SINGLE_ONE_LOGIN_PAGE":return r.createElement(nu,null);case"SINGLE_SCAN_CODE_PAGE":return r.createElement(nd,null);case"SINGLE_MOBILE_CODE_PAGE":return r.createElement(nm,null);case"SINGLE_ACCOUNT_PWD_PAGE":return r.createElement(n_,null)}})())},np=e=>{let{config:t,request:n}=e||{};return r.createElement(ng,{config:t,request:n},r.createElement(nh,null))};var nC=n("459076");let nf=e=>{try{(0,nC.default)("init",{bid:"douyin_login_new",...e}),(0,nC.default)("start")}catch(e){}},nv=e=>{(0,nC.default)("sendEvent",e)};var nb=n("873181"),nE=n.n(nb);let nw=e=>{let t=function(e){let{textConfig:t={},districtList:n=null}=e;return{...nE()(E,t||{},{arrayMerge:(e,t)=>t}),districtList:n||u}}(e);return{...e,allTextConfig:t}};var ny=((a={}).INIT="INIT",a.INIT_ACK="INIT_ACK",a.BUSINESS="BUSINESS",a.ACK="ACK",a);function nN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}let nL=()=>Promise.all([n.e("28872"),n.e("29581")]).then(n.bind(n,408742));class nx{constructor(e){nN(this,"config",void 0),nN(this,"request",void 0),nN(this,"init",e=>{let{ele:t,theme:n="light"}=this.config;nf({device_id:this.config.device_id}),nv({name:"douyin_login_new_init_config",categories:{url:window.location.href,...this.config}}),this.setTheme(n);let l=e||t;if(!l)throw Error("[web-login-sdk]: Must provide options.ele");return s.render(r.createElement(np,{config:nw(this.config),request:this.request}),l),o=()=>{s.unmountComponentAtNode(l)}}),nN(this,"LoginContainer",()=>{var e;return this.setTheme(null==(e=this.config)?void 0:e.theme),r.createElement(np,{config:nw(this.config),request:this.request})}),nN(this,"refresh",()=>{o&&o(),this.init()}),nN(this,"showToast",(e,t,n)=>{eu.show({content:e,duration:t,getContainer:n||this.getContainer}),eh("login_panel_tips_show",{login_method:"manual",is_auto_send_sms:0,tips_type:"toast",tips_stage:"submit",tips_title:e})}),nN(this,"getContainer",()=>{let e="flat"===this.config.loginPanelType?"douyin_login_comp_flat_panel":"douyin_login_comp_tab_panel";return document.querySelector(`#${e}`)||document.body}),nN(this,"initSecureSDK",()=>{try{Promise.all([n.e("19511"),n.e("4680")]).then(n.bind(n,763218)).then(e=>{let{SecureSDK:t}=e;t.setConfig({aid:this.config.aid,scene:"login",certType:"header"}),t.setWebId(this.config.device_id||""),t.start()})}catch(e){}}),nN(this,"setTheme",function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light";try{"dark"===e?document.documentElement.setAttribute("ucenter-theme","dark"):document.documentElement.removeAttribute("ucenter-theme")}catch(e){}}),this.config=e,this.request=new tw(e),e.isKX&&this.initSecureSDK(),eg(e)}}let nS=e=>{tC(e)},nk=e=>{let{accountApiConfig:t}=e||{};return new Promise((e,n)=>{let o={};return t&&(o={accountApiConfig:t}),new tw(o).getUserInfo().then(t=>{let{sec_user_id:n="",avatar_url:o="",screen_name:l=""}=t||{};tC({uid:n,avatarUrl:o,nickname:l}),e(t)}).catch(e=>{n(e)})})},nA=e=>{let{next:t="https://www.douyin.com",need_redirect:n=1,accountApiConfig:o}=e||{},l={};return o&&(l={accountApiConfig:o}),new tw(l).logout({next:t,need_redirect:n,host:null==o?void 0:o.host})},nI=e=>{let{setParams:t,length:o=3,accountApiConfig:l}=e||{},i={};l&&(i={accountApiConfig:l});let a=new tw(i),{decision:r,skip_sdk_error_handler:s=!1}=t||{};return a.webRecordStatusSetRequest({user_web_record_status:r,skip_sdk_error_handler:s}).then(e=>{if(1===r)Promise.all([n.e("19511"),n.e("4680")]).then(n.bind(n,763218)).then(t=>{let{SecureSDK:n}=t,l=t_(f),{sec_uid:i,screen_name:a,avatar_url:r}=e||{},{respHeader:s}=e||{},c=(null==s?void 0:s["bd-ticket-guard-server-data"])||"",u=n.cryptoSDK.b642str(c);th({...l,uid:i||(null==l?void 0:l.uid),nickname:a||(null==l?void 0:l.nickname),avatarUrl:r||(null==l?void 0:l.avatarUrl),ztData:{data:u}},o),tm(b,u)});else{let{sec_uid:t}=e||{};tp({uid:t})}return Promise.resolve(e)}).catch(e=>Promise.reject(e))},nO=e=>tf(e)},903028:function(e,t,n){n.d(t,{IC:function(){return l},SH:function(){return i},b1:function(){return o}});let o=()=>"ontouchstart"in window||navigator.maxTouchPoints>0;function l(e){return Object.keys(e).map(t=>{let n=e[t];return"object"==typeof n?`${encodeURIComponent(t)}=${encodeURIComponent(JSON.stringify(n))}`:`${encodeURIComponent(t)}=${encodeURIComponent(n)}`}).join("&")}function i(e){return new Promise((t,n)=>{let o=document.createElement("script");o.src=e,o.async=!0,o.onload=()=>t("success"),o.onerror=e=>n(e),document.head.appendChild(o)})}},129182:function(e,t,n){function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,{Z:function(){return l}});class l{init(){}processPluginWithLog(e){var t=this;return function(){for(var n=arguments.length,o=Array(n),l=0;l<n;l++)o[l]=arguments[l];let i=Date.now();return e(...o).then(e=>{var n;return Promise.resolve({...e,middlewareHandlerLog:[...(null==e?void 0:e.middlewareHandlerLog)||[],{name:(null==t?void 0:null==(n=t.constructor)?void 0:n.name)||"unknown",time:Date.now()-i,endTime:Date.now(),startTime:i}]})}).catch(e=>{var n;return Promise.reject({...e,middlewareHandlerLog:[...(null==e?void 0:e.middlewareHandlerLog)||[],{name:(null==t?void 0:null==(n=t.constructor)?void 0:n.name)||"unknown",time:Date.now()-i,endTime:Date.now(),startTime:i}]})})}}constructor(e){o(this,"request",void 0),o(this,"initProps",void 0),o(this,"hasInit",void 0),o(this,"type",void 0);let{request:t,init:n,type:l}=e;this.request=t,this.hasInit=!1,this.initProps=n,this.type=l}}},695385:function(e,t,n){function o(e){let t;let n=RegExp(`(^| )${e}=([^;]*)(;|$)`);return(t=document.cookie.match(n))?unescape(t[2]):""}function l(e){return Object.keys(e).map(t=>{let n=e[t];return"object"==typeof n?`${encodeURIComponent(t)}=${encodeURIComponent(JSON.stringify(n))}`:`${encodeURIComponent(t)}=${encodeURIComponent(n)}`}).join("&")}function i(e){if(!e)return{};let t={};return e.split("&").forEach(e=>{let[n,o]=e.split("=");t[n]=o}),t}n.d(t,{HI:function(){return r},IC:function(){return l},J4:function(){return s},N4:function(){return u},O1:function(){return c},ej:function(){return o},ve:function(){return d},x5:function(){return i}});let a=e=>{let t;let n=e.toString(),o=[];for(let e=0;e<n.length;e++)0<=(t=n.charCodeAt(e))&&t<=127?o.push(t):128<=t&&t<=2047?(o.push(192|31&t>>6),o.push(128|63&t)):(2048<=t&&t<=55295||57344<=t&&t<=65535)&&(o.push(224|15&t>>12),o.push(128|63&t>>6),o.push(128|63&t));for(let e=0;e<o.length;e++)o[e]&=255;return o},r=e=>{let t=[],n=[];if(void 0===e)return"";n=a(e);for(let e=0,{length:o}=n;e<o;++e)t.push((5^n[e]).toString(16));return t.join("")},s=(e,t)=>{let n;let o=0,l=0;if("object"!=typeof e||!t||t.length<=0)return e;let i={mix_mode:o,...e};for(let e=0,{length:a}=t;e<a;++e)void 0!==(n=i[t[e]])&&(o|=1,l|=1,i[t[e]]=r(n));return i.mix_mode=o,i.fixed_mix_mode=l,i},c=e=>{let t="0123456789abcdefghijklmnopqrstuvwxyz",n="";for(let o=e;o>0;--o)n+=t[Math.floor(Math.random()*t.length)];return n},u=function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(t={...i(e),...n}).map(e=>{let n=t[e];return"object"==typeof n?`${e}=${JSON.stringify(n)}`:`${e}=${n}`}).join("&")};function d(e,t,n){let o=document.createElement("script");o.type="text/javascript",o.src=e,document.getElementsByTagName("head")[0].appendChild(o),o.readystat?o.onreadystatechange=function(){("complete"===o.readyState||"loaded"===o.readyState)&&(o.onreadystatechange=null,t&&t())}:o.onload=function(){t&&t()},n&&(o.onerror=n)}},873181:function(e){var t=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===n}(e)}(e)},n="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function o(e,t){return!1!==t.clone&&t.isMergeableObject(e)?r(Array.isArray(e)?[]:{},e,t):e}function l(e,t,n){return e.concat(t).map(function(e){return o(e,n)})}function i(e){var t;return Object.keys(e).concat((t=e,Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[]))}function a(e,t){try{return t in e}catch(e){return!1}}function r(e,n,s){(s=s||{}).arrayMerge=s.arrayMerge||l,s.isMergeableObject=s.isMergeableObject||t,s.cloneUnlessOtherwiseSpecified=o;var c,u,d,m,_=Array.isArray(n),g=Array.isArray(e);if(_!==g)return o(n,s);if(_)return s.arrayMerge(e,n,s);return c=e,u=n,m={},(d=s).isMergeableObject(c)&&i(c).forEach(function(e){m[e]=o(c[e],d)}),i(u).forEach(function(e){var t,n;if(!a(t=c,n=e)||!!(Object.hasOwnProperty.call(t,n)&&Object.propertyIsEnumerable.call(t,n)))a(c,e)&&d.isMergeableObject(u[e])?m[e]=(function(e,t){if(!t.customMerge)return r;var n=t.customMerge(e);return"function"==typeof n?n:r})(e,d)(c[e],u[e],d):m[e]=o(u[e],d)}),m}r.all=function(e,t){if(!Array.isArray(e))throw Error("first argument should be an array");return e.reduce(function(e,n){return r(e,n,t)},{})};e.exports=r},252969:function(e,t,n){n.d(t,{Cy:function(){return s},ZP:function(){return d},iO:function(){return r}});var o=n(629686),l=n(402748),i=n(129182),a=n(645302);let r=()=>{var e;if(null==(e=window)?void 0:e._verifyPortraitId)return null;window._verifyPortraitId=`${(0,a.DO)()}.login`},s=()=>{window._verifyPortraitId=""},c=()=>{var e;return(null==(e=window)?void 0:e._verifyPortraitId)||""};class u extends i.Z{init(){this.request.interceptors.request.use(e=>{let t=c();return t&&(e.headers=(0,l._)((0,o._)({},e.headers||{}),{"x-tt-passport-verify-portrait":t})),e})}constructor(e){super(e),this.init=this.init.bind(this)}}let d=u},645302:function(e,t,n){function o(e){let t=2e3,n=0;return new Promise((o,l)=>{let i=()=>{n++,e().then(e=>{o(e)}).catch(e=>{n>=3?l(e):setTimeout(()=>{t*=2,i()},t)})};i()})}n.d(t,{$D:function(){return o},DO:function(){return l},G6:function(){return i}}),n(362051),n(228983),n(759943),n(490629),n(76375),n(679308),n(683656),n(414931),n(117232);let l=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){let t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}),i=e=>Object.keys(e).sort().map(t=>`${t}=${e[t]}`).join("&")}}]); |