1import{r as e}from"./rolldown-runtime-C60lm6uB.js";import{i as t,r as n}from"./framework-BaE7mD_r.js";import r from"./image-T99ccyP5.js";import i from"./link-BwiNOcTB.js";var a=e(n(),1),o={ios:`https://download.008.icu/app.ipa`,android:{}.NEXT_PUBLIC_ANDROID_DOWNLOAD_URL||``},s=`/api/register`,c=t();function l({compact:e=!1}){return(0,c.jsxs)(`section`,{className:`download-prompt ${e?`download-prompt-compact`:``}`,children:[(0,c.jsx)(`div`,{className:`download-prompt-mark`,"aria-hidden":`true`,children:(0,c.jsx)(r,{src:`/brand/tikchat-mark.svg`,alt:``,width:44,height:44})}),(0,c.jsxs)(`div`,{className:`download-prompt-copy`,children:[(0,c.jsx)(`span`,{className:`eyebrow`,children:`CONTINUE IN THE APP`}),(0,c.jsx)(`h2`,{children:`å¨ TikChat App ä¸å®æç»å½`}),(0,c.jsx)(`p`,{children:`å®ç½ä¸ä¿åç»å½æãä¸è½½ TikChat åï¼ä½¿ç¨æ³¨åææºå·åéªè¯ç ç»å½å³å¯ã`})]}),(0,c.jsxs)(`div`,{className:`download-prompt-actions`,children:[(0,c.jsx)(`a`,{className:`download-prompt-store`,href:o.ios,"aria-label":`Download TikChat on the App Store`,children:(0,c.jsx)(r,{src:`/assets/landing/store-badges/appstore-dark.png`,alt:`App Store`,width:180,height:52})}),o.android?(0,c.jsx)(`a`,{className:`download-prompt-store`,href:o.android,"aria-label":`Get TikChat on Google Play`,children:(0,c.jsx)(r,{src:`/assets/landing/store-badges/googleplay-dark.png`,alt:`Google Play`,width:180,height:52})}):null]})]})}var u=`tikchat-affiliate-code`,d=/^1[3-9]\d{9}$/;function f(){let e=new URLSearchParams(window.location.search).get(`aff`)?.trim()||``,t=window.sessionStorage.getItem(u)?.trim()||``;return e||t}function p(){let[e,t]=(0,a.useState)(f),[n,o]=(0,a.useState)(``),[p,m]=(0,a.useState)(``),[h,g]=(0,a.useState)(!1),[_,v]=(0,a.useState)(`idle`),[y,b]=(0,a.useState)(``);(0,a.useEffect)(()=>{let e=new URLSearchParams(window.location.search).get(`aff`)?.trim()||``;e&&window.sessionStorage.setItem(u,e)},[]);async function x(t){if(t.preventDefault(),b(``),!d.test(n.trim())){b(`请è¾å
¥æ£ç¡®ç 11 使æºå·ã`);return}if(p.trim().length<2){b(`æµç§°è³å°éè¦ 2 个å符ã`);return}if(!h){b(`请å
忿塿¡æ¬¾ä¸éç§æ¿çã`);return}v(`submitting`);try{let t=await fetch(s,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({username:n.trim(),nickname:p.trim(),mobile:n.trim(),invitedByCode:e.trim()})}),r=await t.json();if(!t.ok||r.code!==0)throw Error(r.msg||r.message||`注å失败ï¼è¯·ç¨åéè¯ã`);v(`success`),window.sessionStorage.removeItem(u)}catch(e){v(`idle`),b(e instanceof Error?e.message:`注å失败ï¼è¯·ç¨åéè¯ã`)}}return _===`success`?(0,c.jsxs)(`main`,{className:`auth-page auth-page-success`,children:[(0,c.jsx)(`div`,{className:`auth-page-glow auth-page-glow-blue`,"aria-hidden":`true`}),(0,c.jsxs)(`header`,{className:`auth-header page-width`,children:[(0,c.jsxs)(i,{className:`auth-brand`,href:`/`,"aria-label":`è¿å TikChat å®ç½`,children:[(0,c.jsx)(r,{src:`/brand/tikchat-mark.svg`,alt:`TikChat`,width:48,height:48,priority:!0}),(0,c.jsx)(`span`,{children:`TikChat`})]}),(0,c.jsx)(i,{className:`auth-back-link`,href:`/`,children:`è¿åå®ç½`})]}),(0,c.jsxs)(`section`,{className:`auth-success-card page-width`,children:[(0,c.jsx)(`div`,{className:`success-icon`,"aria-hidden":`true`,children:`â`}),(0,c.jsx)(`span`,{className:`eyebrow`,children:`ACCOUNT CREATED`}),(0,c.jsx)(`h1`,{children:`注åæåï¼æ¬¢è¿å å
¥ TikChatã`}),(0,c.jsxs)(`p`,{children:[`请ä¸è½½ TikChat Appï¼ä½¿ç¨ææºå· `,(0,c.jsx)(`strong`,{children:n}),` è·åéªè¯ç å¹¶ç»å½ã`]}
1),(0,c.jsx)(l,{compact:!0}),(0,c.jsx)(i,{className:`auth-secondary-link`,href:`/`,children:`å
åå°å®ç½`})]})]}):(0,c.jsxs)(`main`,{className:`auth-page`,children:[(0,c.jsx)(`div`,{className:`auth-page-glow auth-page-glow-blue`,"aria-hidden":`true`}),(0,c.jsx)(`div`,{className:`auth-page-glow auth-page-glow-green`,"aria-hidden":`true`}),(0,c.jsxs)(`header`,{className:`auth-header page-width`,children:[(0,c.jsxs)(i,{className:`auth-brand`,href:`/`,"aria-label":`è¿å TikChat å®ç½`,children:[(0,c.jsx)(r,{src:`/brand/tikchat-mark.svg`,alt:`TikChat`,width:48,height:48,priority:!0}),(0,c.jsx)(`span`,{children:`TikChat`})]}),(0,c.jsxs)(`span`,{className:`auth-header-copy`,children:[`å·²æè´¦å·ï¼ `,(0,c.jsx)(i,{href:`/login`,children:`å»ç»å½`})]})]}),(0,c.jsxs)(`section`,{className:`register-layout page-width`,children:[(0,c.jsxs)(`div`,{className:`register-intro`,children:[(0,c.jsx)(`span`,{className:`eyebrow`,children:`JOIN THE COMMUNITY`}),(0,c.jsxs)(`h1`,{children:[`ä»ä¸æ¬¡é请å¼å§ï¼`,(0,c.jsx)(`br`,{}),`è¿æ¥æ´å¤å¯è½ã`]}),(0,c.jsx)(`p`,{children:`åå»ºä½ ç TikChat è´¦å·ï¼å å
¥ä½ æå
´è¶£ç群ç»ãé¢éä¸èå¤©å®¤ï¼æéè¦ç对è¯çå¨ä¸ä¸ªå°æ¹ã`}),(0,c.jsxs)(`div`,{className:`register-benefits`,children:[(0,c.jsxs)(`div`,{children:[(0,c.jsx)(`span`,{children:`01`}),(0,c.jsx)(`strong`,{children:`ä¸ä¸ªè´¦å·ï¼å¤ç§è¿æ¥`})]}),(0,c.jsxs)(`div`,{children:[(0,c.jsx)(`span`,{children:`02`}),(0,c.jsx)(`strong`,{children:`ææºå·ç»å½ï¼ç®åå¿«æ·`})]}),(0,c.jsxs)(`div`,{children:[(0,c.jsx)(`span`,{children:`03`}),(0,c.jsx)(`strong`,{children:`é请å
³ç³»èªå¨è®°å½`})]})]})]}),(0,c.jsxs)(`div`,{className:`register-card`,children:[(0,c.jsxs)(`div`,{className:`register-card-heading`,children:[(0,c.jsx)(`span`,{className:`eyebrow`,children:`CREATE ACCOUNT`}),(0,c.jsx)(`h2`,{children:`注å TikChat`}),(0,c.jsx)(`p`,{children:`å¡«åä¿¡æ¯ï¼å®æåä¸è½½ App ç»å½ã`})]}),(0,c.jsxs)(`form`,{className:`register-form`,onSubmit:x,noValidate:!0,children:[(0,c.jsxs)(`label`,{children:[(0,c.jsx)(`span`,{children:`ææºå·`}),(0,c.jsx)(`input`,{value:n,onChange:e=>o(e.target.value),inputMode:`numeric`,autoComplete:`tel`,placeholder:`请è¾å
¥ææºå·`,required:!0})]}),(0,c.jsxs)(`label`,{children:[(0,c.jsx)(`span`,{children:`æµç§°`}),(0,c.jsx)(`input`,{value:p,onChange:e=>m(e.target.value),autoComplete:`nickname`,placeholder:`ä½ å¸æå«äººå¦ä½ç§°å¼ä½ `,required:!0})]}),(0,c.jsxs)(`label`,{children:[(0,c.jsx)(`span`,{children:`é请ç `}),(0,c.jsx)(`input`,{suppressHydrationWarning:!0,value:e,onChange:e=>t(e.target.value.toUpperCase()),autoComplete:`off`,placeholder:`请è¾å
¥é请ç `,required:!0}),(0,c.jsx)(`small`,{children:`éè¿éè¯·é¾æ¥è®¿é®æ¶ï¼é请ç ä¼èªå¨å¸¦å
¥ï¼æ²¡æé请ç ä¹å¯ä»¥ç´æ¥æ³¨åã`})]}),(0,c.jsxs)(`label`,{className:`register-agreement`,children:[(0,c.jsx)(`input`,{type:`checkbox`,checked:h,onChange:e=>g(e.target.checked)}),(0,c.jsxs)(`span`,{children:[`æå·²é
è¯»å¹¶åæ `,(0,c.jsx)(i,{href:`/#terms`,children:`æå¡æ¡æ¬¾`}),` ä¸ `,(0,c.jsx)(i,{href:`/#privacy`,children:`éç§æ¿ç`})]})]}),y?(0,c.jsx)(`p`,{className:`form-error`,role:`alert`,children:y}):null,(0,c.jsx)(`button`,{className:`register-submit`,type:`submit`,disabled:_===`submitting`,children:_===`submitting`?`æ£å¨å建账å·â¦`:`å建账å·`})]}),(0,c.jsx)(`p`,{className:`register-footnote`,children:`注ååè¯·å¨ TikChat App ä¸ä½¿ç¨ææºå·éªè¯ç ç»å½ã`})]})]})]})}export{p as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.