1 line
13 KiB
JavaScript
1 line
13 KiB
JavaScript
module.exports=[1851,(a,b,c)=>{"use strict";b.exports=a.r(2827).vendored.contexts.AppRouterContext},21813,(a,b,c)=>{"use strict";b.exports=a.r(2827).vendored["react-ssr"].ReactServerDOMTurbopackClient},97399,a=>{"use strict";function b(){return{url:"https://pocketbase.hackrobot.cn"}}function c(){return{apiUrl:function(){let a=process.env.PAYMENT_API_INTERNAL_URL?.trim();if(a)return a.replace(/\/$/,"");let b=process.env.PAYMENT_API_URL||"http://127.0.0.1:8007";return/^(https?:\/\/)?(127\.0\.0\.1|localhost)(:\d+)?(\/|$)/i.test(b)?"https://api.hackrobot.cn":b}(),provider:process.env.PAYMENT_PROVIDER||"zpay",zpaySubmitUrl:process.env.ZPAY_SUBMIT_URL||"https://zpayz.cn/submit.php",defaultAmount:Number(process.env.PAYMENT_DEFAULT_AMOUNT)||18800,nomadvipPayPath:"/nomadvip/payh5"}}process.env.PAYJSAPI_PORT,a.s(["getPaymentConfig",()=>c,"getPocketBaseConfig",()=>b])},13049,80048,a=>{"use strict";function b(){return!("u"<typeof navigator)&&/MicroMessenger/i.test(navigator.userAgent)?"wechat":!("u"<typeof navigator)&&/AppleWebKit.*Mobile|Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)?"h5":"pc"}function c(a){return"wechat"===a?"wechat":"pc"===a?"pc":"h5"}a.s(["getDeviceFromEnv",()=>c,"getPayEnv",()=>b],80048);var d=a.i(97399);let e="nomadvip_anon_uid",f="nomadvip_pay_order";function g(a,b){}function h(a){if("u"<typeof document||!/^user\d+$/.test(a))return;let b="https:"===window.location.protocol?"; Secure":"";document.cookie=`${e}=${encodeURIComponent(a)}; Path=/; Max-Age=2592000; SameSite=Lax${b}`}function i(){let a=function(){let a=null;if(a&&/^user\d+$/.test(a))return a;let b=null;if(b&&/^user\d+$/.test(b))return b;let c=function(a){if("u"<typeof document)return null;let b=document.cookie.match(RegExp(`(?:^|; )${a}=([^;]*)`));return b?decodeURIComponent(b[1]):null}(e);return c&&/^user\d+$/.test(c)?(g("memosAccount",c),c):null}();if(a)return g("userId",a),h(a),a;let b=null;if(b?.startsWith("{")&&b.includes("data"))try{let a=JSON.parse(b);a?.data&&(b=a.data,g("userId",b))}catch{b=null}return b||g("userId",b=`user${Date.now()}`),b}async function j(){let a=i();if(a&&!a.startsWith("user"))return a;try{let a=await fetch("/api/auth/me",{credentials:"include",cache:"no-store"}),b=await a.json();if(b?.user?.id)return g("userId",b.user.id),b.user.id}catch{}return a}async function k(a,b){let c=await fetch("/api/pay",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...a,device:"h5",provider:"zpay",html:"0"})}),d=await c.json().catch(()=>({}));if(!d?.ok)return alert(d?.error||"支付发起失败"),null;let e=!!d?.redirect_url,h=!!d?.params&&!!d?.payUrl;if(!e&&!h)return alert(d?.error||"支付发起失败"),null;let i=d?.order_id?.trim()||null;if(i){let a;(a=i.trim())&&(!function(a){if("u"<typeof document)return;let b=a.trim();if(!b)return;let c="https:"===window.location.protocol?"; Secure":"";document.cookie=`${f}=${encodeURIComponent(`${b}|${Date.now()}`)}; Path=/; Max-Age=900; SameSite=Lax${c}`}(a),g(f,`${a}|${Date.now()}`)),b?.(i)}if(d?.redirect_url)return window.location.href=d.redirect_url,i;let j=document.createElement("form");for(let[a,b]of(j.method="POST",j.action=d.payUrl,j.target="_self",j.style.display="none",Object.entries(d.params))){if(null==b)continue;let c=document.createElement("input");c.type="hidden",c.name=a,c.value=String(b),j.appendChild(c)}return document.body.appendChild(j),j.submit(),document.body.removeChild(j),i}async function l(a){var e;let f="u">typeof navigator&&/MicroMessenger/i.test(navigator.userAgent)?i():await j();/^user\d+$/.test(f)&&(g("memosAccount",f),g("userId",f),h(f));let l=`${window.location.origin}/paid`,m=c(b()),n={user_id:f,return_url:l,total_fee:(0,d.getPaymentConfig)().defaultAmount??8800,type:"vip",channel:"wxpay"};if("wechat"===m){let a;(a=document.createElement("form")).method="POST",a.action="/api/pay",a.target="_self",a.style.display="none",[["user_id",n.user_id],["return_url",n.return_url],["total_fee",String(n.total_fee)],["type",n.type],["channel",n.channel],["device","wechat"],["provider","xorpay"],["html","1"]].forEach(([b,c])=>{let d=document.createElement("input");d.type="hidden",d.name=b,d.value=c,a.appendChild(d)}),document.body.appendChild(a),a.submit()}else if("h5"===m)await k(n,a);else{let a;e={...n,device:m},(a=document.createElement("form")).method="POST",a.action="/api/pay",a.target="_self",a.style.display="none",[["user_id",e.user_id],["return_url",e.return_url],["total_fee",String(e.total_fee)],["type",e.type],["channel",e.channel],["device",e.device],["provider","zpay"],["html","1"]].forEach(([b,c])=>{let d=document.createElement("input");d.type="hidden",d.name=b,d.value=c,a.appendChild(d)}),document.body.appendChild(a),a.submit()}}a.s(["triggerPay",()=>l],13049)},91536,a=>{a.v({bigNumber:"vip-module__C0jyLa__bigNumber",bigNumberLabel:"vip-module__C0jyLa__bigNumberLabel",btnLarge:"vip-module__C0jyLa__btnLarge",btnPrimary:"vip-module__C0jyLa__btnPrimary",btnSecondary:"vip-module__C0jyLa__btnSecondary",card:"vip-module__C0jyLa__card",freeBadge:"vip-module__C0jyLa__freeBadge",header:"vip-module__C0jyLa__header",heroSection:"vip-module__C0jyLa__heroSection",loading:"vip-module__C0jyLa__loading",loadingSpinner:"vip-module__C0jyLa__loadingSpinner",loginCard:"vip-module__C0jyLa__loginCard",loginCardLabel:"vip-module__C0jyLa__loginCardLabel",loginCardLink:"vip-module__C0jyLa__loginCardLink",loginCardRow:"vip-module__C0jyLa__loginCardRow",loginCardTitle:"vip-module__C0jyLa__loginCardTitle",loginCardValue:"vip-module__C0jyLa__loginCardValue",loginLink:"vip-module__C0jyLa__loginLink",logo:"vip-module__C0jyLa__logo",main:"vip-module__C0jyLa__main",nav:"vip-module__C0jyLa__nav",root:"vip-module__C0jyLa__root",section:"vip-module__C0jyLa__section",sectionDesc:"vip-module__C0jyLa__sectionDesc",sectionTitle:"vip-module__C0jyLa__sectionTitle",spin:"vip-module__C0jyLa__spin",statsGrid:"vip-module__C0jyLa__statsGrid",statsGrid4:"vip-module__C0jyLa__statsGrid4",statsSection:"vip-module__C0jyLa__statsSection",topicCard:"vip-module__C0jyLa__topicCard",topicCardInner:"vip-module__C0jyLa__topicCardInner",topicDesc:"vip-module__C0jyLa__topicDesc",topicGrid:"vip-module__C0jyLa__topicGrid",topicIcon:"vip-module__C0jyLa__topicIcon",topicLock:"vip-module__C0jyLa__topicLock",topicTitle:"vip-module__C0jyLa__topicTitle",topicsSection:"vip-module__C0jyLa__topicsSection",userBadge:"vip-module__C0jyLa__userBadge",vipTag:"vip-module__C0jyLa__vipTag"})},57178,a=>{"use strict";var b=a.i(81629),c=a.i(4911);let d=()=>(0,b.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,b.jsx)("circle",{cx:"12",cy:"12",r:"4"}),(0,b.jsx)("path",{d:"M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41"})]}),e=()=>(0,b.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,b.jsx)("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})});function f(){let{resolvedTheme:a,setTheme:f}=(0,c.useTheme)();return(0,b.jsx)("button",{type:"button",onClick:()=>{f("dark"===a?"light":"dark")},className:"flex items-center justify-center rounded-full p-2 text-[var(--muted-foreground)] transition hover:bg-[var(--muted)] hover:text-[var(--foreground)]","aria-label":"dark"===a?"切换至日间模式":"切换至夜间模式",title:"dark"===a?"日间":"夜间",children:"dark"===a?(0,b.jsx)(d,{}):(0,b.jsx)(e,{})})}a.s(["ThemeToggle",()=>f])},65205,a=>{"use strict";a.s(["AUDIENCE_CONFIG",0,{title:"这门课适合谁?",subtitle:"向往低成本自建,想用开源硬件实现无人直播的人",items:[{emoji:"💻",title:"无人直播创业者",desc:"想用低成本硬件搭建 TikTok/Youtube 直播矩阵"},{emoji:"⚙️",title:"技术极客",desc:"想自建云手机、Redroid、ARM 开发板玩转自动化"},{emoji:"📱",title:"出海副业者",desc:"想摆脱云手机平台高额月费,自建开箱即用"},{emoji:"🌴",title:"工作室搭建者",desc:"想低成本打造无人值守 24 小时赚美金"}]},"BENEFITS_CONFIG",0,{title:"学完你将获得",subtitle:"5大核心能力,助你自建云手机工作室",items:[{num:"1",title:"云手机自建方案",desc:"Redroid、AOSP 安卓、ARM 开发板,从零搭建云手机"},{num:"2",title:"无人直播技术栈",desc:"ffmpeg、SRS、油猴脚本,实现 24 小时自动化推流"},{num:"3",title:"软路由与网络",desc:"科学上网、静态住宅 IP,出海必备基础设施"},{num:"4",title:"硬件选型与成本",desc:"开发板、采集卡、配件,一套成本不过千"},{num:"5",title:"VIP 社群支持",desc:"加入异度星球,获取部署教程与即时答疑"}]},"CURRICULUM_CONFIG",0,{title:"实战课程",subtitle:"从入门到进阶,完整搭建云手机工作室",modules:[{emoji:"🚀",title:"基础篇 · 云手机入门",lessons:[{name:"01 什么是云手机?自建 vs 商业平台",duration:"08:32"},{name:"02 低成本工作室硬件选型",duration:"12:15"}]},{emoji:"⚙️",title:"技术篇 · Redroid 与 AOSP",lessons:[{name:"03 Docker 虚拟化安卓 - Redroid",duration:"15:20"},{name:"04 ARM 开发板 AOSP 系统",duration:"18:00"},{name:"05 相机与推流配置",duration:"14:30"}]},{emoji:"📺",title:"直播篇 · 无人推流",lessons:[{name:"06 ffmpeg 拉流转推",duration:"16:00"},{name:"07 SRS 直播服务器",duration:"12:45"},{name:"08 油猴脚本自动化",duration:"11:20"},{name:"09 TikTok/Youtube 实战",duration:"20:00"}]},{emoji:"🌐",title:"网络篇 · 出海基础",lessons:[{name:"10 软路由与科学上网",duration:"13:00"},{name:"11 静态住宅 IP 配置",duration:"10:30"}]},{emoji:"🏆",title:"进阶篇 · 产品化",lessons:[{name:"12 HDMI 辅助板方案",duration:"15:00"},{name:"13 多设备群控与远控",duration:"12:00"}]}]},"DOWNLOAD_CONFIG",0,{enabled:!0,url:"https://pan.baidu.com/s/example",title:"课程资料下载",buttonText:"前往网盘下载"},"HERO_CONFIG",0,{title:"云手机实战课",subtitle:"低成本工作室搭建指南 · TikTok/Youtube 无人直播,开启 24 小时赚美金",stats:[{value:"13",label:"节实战课程"},{value:"170+",label:"分钟视频"},{value:"1",label:"位资深导师"}]},"SITE_CONFIG",0,{brand:"🌍 云手机",ctaUrl:"/",footer:"🌍 云手机 · 低成本工作室搭建指南"}])},96094,12969,19492,a=>{"use strict";var b=a.i(97399);function c(){return(0,b.getPocketBaseConfig)().url}async function d(a,b){let d=c(),e=await fetch(`${d}/api/collections/users/auth-with-password`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({identity:a,password:b})});if(!e.ok){let a=await e.json();throw Error(a?.message||"登录失败")}let f=await e.json();if(!f?.token)throw Error("登录响应异常");return{token:f.token,record:f.record}}async function e(a,b,e){let f=c(),g=await fetch(`${f}/api/collections/users/records`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:a,password:b,passwordConfirm:e})});if(!g.ok)throw Error(function(a){let b=a?.data;if(b&&"object"==typeof b&&Object.keys(b).length>0){let a=Object.values(b)[0];if(a?.message){let b=a.code;return"validation_not_unique"===b?"该邮箱已被注册,请直接登录":"validation_required"===b?"请填写必填项":(b?.startsWith("validation_"),a.message)}}return a?.message==="Failed to create record."?"注册失败,该邮箱可能已被使用,请尝试直接登录":a?.message||"注册失败"}(await g.json().catch(()=>({}))));return d(a,b)}function f(a,b){}async function g(){}function h(){return null}function i(){return null}a.s(["PB_STORAGE_KEYS",0,{token:"pb_token",user:"pb_user"}],12969),a.s(["getStoredToken",()=>i,"getStoredUserEmail",()=>h,"pbLogin",()=>d,"pbLogout",()=>g,"pbRegister",()=>e,"pbSaveAuth",()=>f],19492),a.s([],96094)},50044,a=>{"use strict";var b=a.i(84365);let c="nomadvip_pay_order";function d(a){if("u"<typeof document)return null;let b=document.cookie.match(RegExp(`(?:^|; )${a}=([^;]*)`));return b?decodeURIComponent(b[1]):null}function e(){"u">typeof document&&(document.cookie=`${c}=; path=/; max-age=0`)}function f(a){if(!a?.trim())return[null,!1];let b=a.split("|"),c=b[0]?.trim()||a.trim(),d=b[1]?parseInt(b[1],10):NaN;return c?Number.isNaN(d)||Date.now()-d>9e5?[c,!1]:[c,!0]:[null,!1]}function g(a,g,h){let[i,j]=(0,b.useState)(!1),k=(0,b.useRef)(a),l=(0,b.useRef)(g);return k.current=a,l.current=g,(0,b.useEffect)(()=>{let a,b=void 0!==h?h?.trim()||null:(()=>{let[a,b]=f(d(c));if(b)return a;let[e,g]=f(null);return g?e:null})();if(!b){void 0===h&&(d(c)||0)&&e();return}j(!0);let g=0,i=!1,m=!1,n=()=>{i=!0,a&&window.clearTimeout(a)},o=async()=>{if(!i){if(m)return void p();if((g+=1)>30){n(),e(),j(!1),l.current?.();return}m=!0;try{let a=await fetch(`/api/pay/status?order_id=${encodeURIComponent(b)}`,{cache:"no-store"}),c=await a.json().catch(()=>({}));if(c?.ok&&c?.paid){n(),e(),j(!1),k.current(b);return}}catch{}finally{m=!1}p()}},p=()=>{i||(a=window.setTimeout(o,1200))},q=()=>{("u"<typeof document||"hidden"!==document.visibilityState)&&o()};return document.addEventListener("visibilitychange",q),window.addEventListener("pageshow",q),window.addEventListener("focus",q),o(),()=>{document.removeEventListener("visibilitychange",q),window.removeEventListener("pageshow",q),window.removeEventListener("focus",q),n()}},[h]),i}a.s(["usePayStatusPoll",()=>g])},20551,a=>{a.v(b=>Promise.all(["server/chunks/ssr/app_lib_pocketbase_index_ts_b5d26013._.js"].map(b=>a.l(b))).then(()=>b(90416)))}]; |