@ttmg/cli 0.3.8 → 0.3.9-beta.wasm.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/dist/index.js +1921 -1201
  2. package/dist/index.js.map +1 -1
  3. package/dist/package.json +7 -2
  4. package/dist/public/assets/Detail-CqXvsvPM.js +1 -0
  5. package/dist/public/assets/Detail-CqXvsvPM.js.br +0 -0
  6. package/dist/public/assets/MonetizationMode-2bp9UZWM.js +1 -0
  7. package/dist/public/assets/MonetizationModeSummary-DBtIQq9Z.js +1 -0
  8. package/dist/public/assets/{baseForm-DqyLTNAx.js → baseForm-BFkpAlns.js} +4 -4
  9. package/dist/public/assets/baseForm-BFkpAlns.js.br +0 -0
  10. package/dist/public/assets/index-B6ZeUJlM.js +1 -0
  11. package/dist/public/assets/index-BFePHKNX.js +1 -0
  12. package/dist/public/assets/index-BFePHKNX.js.br +0 -0
  13. package/dist/public/assets/index-BJQfbNPd.js +1 -0
  14. package/dist/public/assets/index-BPzYPKPA.js +1 -0
  15. package/dist/public/assets/index-BRFS2ZhY.css +1 -0
  16. package/dist/public/assets/index-BRFS2ZhY.css.br +0 -0
  17. package/dist/public/assets/index-BUDAPXlB.js +1 -0
  18. package/dist/public/assets/index-BYgShzrj.js +1 -0
  19. package/dist/public/assets/index-Ba1XAQLw.js +1 -0
  20. package/dist/public/assets/index-BpefkOoB.js +1 -0
  21. package/dist/public/assets/index-BvxhyFWU.js +14 -0
  22. package/dist/public/assets/index-BvxhyFWU.js.br +0 -0
  23. package/dist/public/assets/index-BwbPFgZF.css +1 -0
  24. package/dist/public/assets/index-CL2qDQto.js +1 -0
  25. package/dist/public/assets/index-CMUKwrEm.js +1 -0
  26. package/dist/public/assets/index-CRAXXzpR.js +1 -0
  27. package/dist/public/assets/index-CRAXXzpR.js.br +0 -0
  28. package/dist/public/assets/{index-D2LsTDVa.css → index-CgAbOvxk.css} +1 -1
  29. package/dist/public/assets/index-CgAbOvxk.css.br +0 -0
  30. package/dist/public/assets/index-DY13Lo-E.js +1 -0
  31. package/dist/public/assets/index-DY13Lo-E.js.br +0 -0
  32. package/dist/public/assets/index-DqFmR7Qk.css +1 -0
  33. package/dist/public/assets/index-FFfimhRp.js +1 -0
  34. package/dist/public/assets/index-FFfimhRp.js.br +0 -0
  35. package/dist/public/assets/index-OLBa9viz.js +1 -0
  36. package/dist/public/assets/index-OsVhWD4K.js +1 -0
  37. package/dist/public/assets/index-f0PBkQd9.js +1 -0
  38. package/dist/public/assets/index-lKrpiZfQ.js +1 -0
  39. package/dist/public/assets/index-lKrpiZfQ.js.br +0 -0
  40. package/dist/public/assets/times-C1GmugF6.js +1 -0
  41. package/dist/public/index.html +10 -3
  42. package/dist/scripts/dev-debug.js +191 -0
  43. package/package.json +7 -2
  44. package/dist/public/assets/Detail-DuoflIDB.js +0 -1
  45. package/dist/public/assets/Detail-DuoflIDB.js.br +0 -0
  46. package/dist/public/assets/MonetizationMode-C6-xgErM.js +0 -1
  47. package/dist/public/assets/MonetizationModeSummary-v1a9_YaN.js +0 -1
  48. package/dist/public/assets/baseForm-DqyLTNAx.js.br +0 -0
  49. package/dist/public/assets/index-BmcEpXdh.js +0 -1
  50. package/dist/public/assets/index-BmcEpXdh.js.br +0 -0
  51. package/dist/public/assets/index-Bpba_DWs.js +0 -1
  52. package/dist/public/assets/index-CPJp_0l2.js +0 -1
  53. package/dist/public/assets/index-ClpFHzCy.js +0 -1
  54. package/dist/public/assets/index-Crf11eTs.js +0 -1
  55. package/dist/public/assets/index-Crf11eTs.js.br +0 -0
  56. package/dist/public/assets/index-CwihbwhD.js +0 -1
  57. package/dist/public/assets/index-D2LsTDVa.css.br +0 -0
  58. package/dist/public/assets/index-DJTcocTh.js +0 -1
  59. package/dist/public/assets/index-DO22Abni.js +0 -1
  60. package/dist/public/assets/index-DPSts5Re.css +0 -1
  61. package/dist/public/assets/index-DPSts5Re.css.br +0 -0
  62. package/dist/public/assets/index-DWw-gYwj.js +0 -1
  63. package/dist/public/assets/index-DWw-gYwj.js.br +0 -0
  64. package/dist/public/assets/index-Dc800O6M.js +0 -1
  65. package/dist/public/assets/index-De7XyxJU.js +0 -1
  66. package/dist/public/assets/index-Pfoc2Cwl.js +0 -14
  67. package/dist/public/assets/index-Pfoc2Cwl.js.br +0 -0
  68. package/dist/public/assets/index-SOEihm3l.js +0 -1
  69. package/dist/public/assets/index-dSgab9d_.js +0 -1
  70. package/dist/public/assets/index-dSgab9d_.js.br +0 -0
  71. package/dist/public/assets/index-iUN2bzlN.js +0 -1
  72. package/dist/public/assets/index-yXoFuCJJ.js +0 -1
  73. package/dist/public/assets/index-yXoFuCJJ.js.br +0 -0
  74. package/dist/public/assets/times-BsA3kTAU.js +0 -1
@@ -0,0 +1 @@
1
+ import{j as e,B as V,i as a,r as n,x as U,T as r,y as E,a as A,u as Ee,c as Me,z as Be,g as $e,b as w,e as L,A as q,D as Oe,E as Ke,Q as qe,d as P}from"./index-BvxhyFWU.js";import{F as xe}from"./baseForm-BFkpAlns.js";import{C as je}from"./times-C1GmugF6.js";import"./index-CRAXXzpR.js";const Ve="https://bytedance.larkoffice.com/wiki/LkihwQCMfiBpr3khwNuceCBkn3e";function He(p){return String(p).replace(/^\s*\d+\s*[\.、]\s*/,"")}const Qe=({engine:p})=>e.jsx("div",{children:[{show:!0,titleKey:"pkgSizeCheckDesc",desc:e.jsxs("div",{children:[e.jsx("span",{children:p==="unity"?a("unityPkgSizeCheckDescTip",{projectSize:"60MB"}):a("commonPkgSizeCheckDescTip",{projectSize:"30MB",mainPackageSize:"4MB",independentPackageSize:"4MB"})}),e.jsx("a",{className:"check-code-banner-doc-link",href:Ve,target:"_blank",rel:"noreferrer",children:a("uploadGame.packageSizeDoc")})]})},{show:p!=="unity",titleKey:"mandatoryApiCheck",desc:a("mandatoryApiCheckDesc")},{show:!0,titleKey:"configFileCheck",desc:e.jsxs("div",{children:[e.jsx("code",{children:"game.json"}),":",a("gameJsonCheckDesc")]})}].filter(d=>d.show).map((d,h,t)=>e.jsxs("div",{style:{marginBottom:h===t.length-1?0:8},children:[e.jsx("strong",{className:"check-code-banner-section-title",children:`${h+1}. ${He(a(d.titleKey))}`}),e.jsx("div",{className:"check-code-banner-section-desc",children:d.desc})]},d.titleKey))}),Je=({engine:p})=>e.jsx(V,{style:{marginBottom:32},fullMode:!1,icon:null,closeIcon:null,description:e.jsx(Qe,{engine:p}),type:"info"}),Ze=p=>{const{result:d}=p,h=d.every(o=>o?.passed),[t,c]=n.useState(!1);return e.jsxs("div",{className:"check-result-group",children:[h?e.jsxs("div",{className:"check-result-title",children:[e.jsx(U,{style:{color:"#4CAF50",marginRight:4,fontSize:20}}),e.jsx(r.Text,{style:{color:"#4CAF50",fontSize:20},children:a("checkConfigPassed")})]}):e.jsxs("div",{className:"check-result-title",children:[e.jsx(E,{style:{color:"#F44336",marginRight:4}}),e.jsx(r.Text,{style:{color:"#F44336",fontSize:20},children:a("checkConfigFailed")})]}),e.jsxs("div",{style:{paddingBottom:24,position:"relative"},children:[e.jsx(je,{style:{marginBottom:12},collapseHeight:150,isOpen:t,children:d.map((o,f)=>e.jsxs("div",{className:"check-result-item",children:[e.jsx(A,{color:o?.passed?"green":"red",style:{marginRight:8,flexShrink:0},children:o?.file}),e.jsx(r.Text,{style:{fontSize:14,color:o?.passed?"rgba(0, 0, 0, 0.65)":"red"},children:o?.msg}),o?.detail?.link?e.jsx("a",{href:o.detail.link,target:"_blank",rel:"noreferrer",style:{marginLeft:8,fontSize:12,color:"#1765ff"},children:o.detail.text||a("viewDoc")}):null]},f))}),t?e.jsx(r.Text,{style:{color:"grey",cursor:"pointer",fontSize:14,width:"100%",display:"block",alignItems:"center",justifyContent:"center",textAlign:"center"},onClick:()=>c(!1),children:a("closeCheckDetail")}):e.jsx(r.Text,{style:{color:"grey"},className:"show-more-text-btn",onClick:()=>c(!0),children:a("expandCheckDetail")})]})]})},We={project:a("gameProject"),main_package:a("gameMainPackage"),independent_package:a("independentPackage")},Xe=p=>{const{result:d}=p,h=d.every(t=>t?.passed);return e.jsxs("div",{className:"check-result-group",children:[h?e.jsxs("div",{className:"check-result-title",children:[e.jsx(U,{style:{color:"#4CAF50",marginRight:4,fontSize:20}}),e.jsx(r.Text,{style:{color:"#4CAF50",fontSize:20},children:a("checkPkgSizePassed")})]}):e.jsxs("div",{className:"check-result-title",children:[e.jsx(E,{style:{color:"#F44336",marginRight:4,fontSize:20}}),e.jsx(r.Text,{style:{color:"#F44336",fontSize:20},children:a("checkPkgSizeFailed")})]}),d.map((t,c)=>e.jsxs("div",{className:"check-result-item",children:[e.jsxs(A,{color:t?.passed?"green":"red",style:{marginRight:8},children:[We[t.dimension],t.dimension==="independent_package"?`: ${t.name}`:""]}),e.jsx(r.Text,{style:{fontSize:14,color:t?.passed?"rgba(0, 0, 0, 0.65)":"red"},children:t?.msg}),t?.detail?.link?e.jsx("a",{href:t.detail.link,target:"_blank",rel:"noreferrer",style:{marginLeft:8,fontSize:12,color:"#1765ff"},children:t.detail.text||a("viewDoc")}):null]},c))]})},Ye=p=>{const{result:d}=p;if(!Array.isArray(d)||d.length===0)return null;const h=d.every(o=>o?.passed),[t,c]=n.useState(!1);return e.jsxs("div",{className:"check-result-group",children:[h?e.jsxs("div",{className:"check-result-title",children:[e.jsx(U,{style:{color:"#4CAF50",marginRight:4,fontSize:20}}),e.jsx(r.Text,{style:{color:"#4CAF50",fontSize:20},children:a("checkApiSuccess")})]}):e.jsxs("div",{className:"check-result-title",children:[e.jsx(E,{style:{color:"#F44336",marginRight:4}}),e.jsx(r.Text,{style:{color:"#F44336",fontSize:20},children:a("checkApiFailed")})]}),e.jsxs("div",{style:{position:"relative"},children:[e.jsx(je,{style:{marginBottom:12},collapseHeight:150,isOpen:t,children:d.map((o,f)=>e.jsxs("div",{className:"check-result-item",children:[e.jsx(A,{color:o?.passed?"green":"red",style:{marginRight:8,flexShrink:0},children:o?.name}),e.jsxs(r.Text,{style:{fontSize:14,color:o?.passed?"rgba(0, 0, 0, 0.65)":"red"},children:[a(o?.name),o?.passed?a("integrated"):a("notIntegrated")]}),o?.detail?.link?e.jsx("a",{href:o.detail.link,target:"_blank",rel:"noreferrer",style:{marginLeft:8,fontSize:12,color:"#1765ff"},children:o.detail.text||a("viewDoc")}):null]},f))}),t?e.jsx(r.Text,{style:{color:"grey",cursor:"pointer",fontSize:14,width:"100%",display:"block",alignItems:"center",justifyContent:"center",textAlign:"center"},onClick:()=>c(!1),children:a("closeCheckDetail")}):e.jsx(r.Text,{style:{color:"grey"},className:"show-more-text-btn",onClick:()=>c(!0),children:a("expandCheckDetail")})]})]})},es=p=>{const{result:d}=p;if(!Array.isArray(d)||d.length===0)return null;const h=d.every(t=>t?.passed);return e.jsxs("div",{className:"check-result-group",children:[h?e.jsxs("div",{className:"check-result-title",children:[e.jsx(U,{style:{color:"#4CAF50",marginRight:4,fontSize:20}}),e.jsx(r.Text,{style:{color:"#4CAF50",fontSize:20},children:a("checkPerformancePassed")})]}):e.jsxs("div",{className:"check-result-title",children:[e.jsx(E,{style:{color:"#F44336",marginRight:4,fontSize:20}}),e.jsx(r.Text,{style:{color:"#F44336",fontSize:20},children:a("checkPerformanceFailed")})]}),d.map((t,c)=>e.jsxs("div",{className:"check-result-item",children:[e.jsx(A,{color:t?.passed?"green":"red",style:{marginRight:8,flexShrink:0},children:a("performanceCheck")}),e.jsx(r.Text,{style:{fontSize:14,color:t?.passed?"rgba(0, 0, 0, 0.65)":"red"},children:t?.msg}),t?.detail?.link?e.jsx("a",{href:t.detail.link,target:"_blank",rel:"noreferrer",style:{marginLeft:8,fontSize:12,color:"#1765ff"},children:t.detail.text||a("viewDoc")}):null]},c))]})},os=()=>{const p=Ee(),d=3e3,h=600*1e3,[t,c]=n.useState("idle"),[o,f]=n.useState(""),[fe,M]=n.useState(""),[T,B]=n.useState([]),[y,G]=n.useState(""),[ye,H]=n.useState({}),[Q,_]=n.useState(!1),[J,R]=n.useState(""),[ve,z]=n.useState(!1),[ke,Se]=n.useState(""),[b,Ne]=n.useState([]),[C,Z]=n.useState(!1),[S,W]=n.useState(!0),[v,we]=n.useState(!1),[X,Y]=n.useState(""),[ee,se]=n.useState(!1),[$,x]=n.useState(""),ae=n.useRef(null),{state:{engine:Te,user:re,gameDetail:le}}=Me(),k=Be(re),F=$e({errorCode:le?.has_error?le.error_code:void 0,user:re})==="noPermission",O=s=>new Promise(l=>setTimeout(l,s)),Ge=s=>s?String(s.status??s.cdn_deploy_status??s.live_status??"").toLowerCase():"",te=s=>s?String(s.status??s.cdn_deploy_status??s.live_status??""):"",D=s=>{if(Number(s?.cdn_deploy_status)===2)return"ready";const l=Ge(s);return l?["ready","success","succeeded","available"].includes(l)?"ready":l.includes("fail")||l.includes("error")||l.includes("reject")?"failed":"pending":"pending"},ie=s=>s==="preview"?4:s==="review"?3:s==="live"?2:1,be=s=>{if(!s)return[];const l=[...(s.preview_assets||[]).map(i=>({...i,source:"preview",state:D(i)})),...(s.in_review_assets||[]).map(i=>({...i,source:"review",state:D(i)})),...(s.live_assets||[]).map(i=>({...i,source:"live",state:D(i)})),...(s.assets||[]).map(i=>({...i,source:"other",state:D(i)}))].sort((i,m)=>{const j=Number(m.uploaded_at||0)-Number(i.uploaded_at||0);return j!==0?j:ie(m.source)-ie(i.source)}),u=new Map;return l.forEach(i=>{const m=String(i.asset_id||"");m&&!u.has(m)&&u.set(m,i)}),Array.from(u.values())},Ce=s=>s==="ready"?a("uploadGame.record.state.ready"):s==="failed"?a("uploadGame.record.state.failed"):a("uploadGame.record.state.pending"),De=s=>s==="preview"?a("uploadGame.record.source.preview"):s==="review"?a("uploadGame.record.source.review"):s==="live"?a("uploadGame.record.source.live"):a("uploadGame.record.source.other"),oe=s=>s?new Date(s*1e3).toLocaleString():a("uploadGame.record.metaUnknown"),Pe=s=>{if(!s)return a("uploadGame.record.metaUnknown");const l=s/1024/1024;return`${l>=10?l.toFixed(0):l.toFixed(1)} MB`},de=s=>{if(s.version)return`v${s.version}`;const l=String(s.asset_id||"");return l?`${l.slice(0,6)}...${l.slice(-4)}`:a("uploadGame.record.metaUnknown")},Ae=s=>`${de(s)} · ${Ce(s.state)} · ${oe(s.uploaded_at)}`,_e=s=>s?[s.preview_assets||[],s.in_review_assets||[],s.live_assets||[],s.assets||[]].flat().filter(Boolean):[],ne=async()=>{if(!k||F){B([]),G(""),R(""),_(!1);return}_(!0),R("");try{const s=await P({method:"POST",url:"/game/assets"});if(s?.code!==0||!s?.data)throw new Error(a("uploadGame.record.loadFailed"));const l=be(s.data);B(l);const u=(y&&l.some(i=>String(i.asset_id)===String(y))?y:"")||"";G(String(u||""))}catch(s){R(s instanceof Error?s.message:a("uploadGame.record.loadFailed"))}finally{_(!1)}},Re=async(s,l)=>{for(;Date.now()<l;){const u=await P({method:"POST",url:"/game/assets",data:{assetId:s,includePending:!0}}),m=_e(u?.data).find(j=>String(j.asset_id)===String(s))||null;if(m){const j=te(m);j&&M(j);const he=D(m);if(he==="ready")return{ok:!0,asset:m};if(he==="failed")return{ok:!1,asset:m}}await O(d)}return{ok:!1,asset:null}},ce=async(s,l)=>{for(;Date.now()<l;){const u=await P({method:"POST",url:"/game/asset/preview-url",data:{assetId:s}});if(u?.code===0&&u?.data?.preview_url)return u.data.preview_url;await O(d)}return""},ze=()=>{W(!0),Z(!1),P({url:"/game/check",method:"GET"}).then(s=>{Ne(s?.data||[])}).catch(()=>{Z(!0)}).finally(()=>{W(!1)})};n.useEffect(()=>{ze()},[]),n.useEffect(()=>{if(!k||F){B([]),G(""),R(""),_(!1);return}ne()},[k,F]);const ue=b.filter(s=>s?.type==="config"),pe=b.filter(s=>s?.type==="size"),me=b.filter(s=>s?.type==="api"),ge=b.filter(s=>s?.type==="performance"),K=b.some(s=>!s?.passed),Fe=[{key:"performance",title:a("uploadGame.group.performance"),items:ge},{key:"size",title:a("uploadGame.group.size"),items:pe},{key:"api",title:a("uploadGame.group.api"),items:me},{key:"config",title:a("uploadGame.group.config"),items:ue}].filter(s=>s.items.length>0).flatMap(s=>s.items.filter(l=>!l?.passed).map(l=>({groupTitle:s.title,message:l?.msg||a("uploadGame.unknownIssue"),link:l?.detail?.link,linkText:l?.detail?.text}))),Ie=s=>t==="uploading"?s===0?"current":"pending":t==="checkingAsset"?s===0?"done":s===1?"current":"pending":t==="resolvingPreview"?s<=1?"done":s===2?"current":"pending":"pending",Le=[a("uploadGame.progress.step1"),a("uploadGame.progress.step2"),a("uploadGame.progress.step3")],N=()=>{we(s=>!s)},g=T.find(s=>String(s.asset_id)===String(y))||null,I=y&&ye[String(y)]||"";n.useEffect(()=>{if(!g||g.state!=="ready"){z(!1);return}const s=String(g.asset_id);if(I){z(!1);return}let l=!1;return(async()=>{z(!0);const i=await ce(s,Date.now()+h);l||(i&&H(m=>({...m,[s]:i})),z(!1))})(),()=>{l=!0}},[g,I]);const Ue=()=>{if(!X.trim()){x(a("needDesc"));return}se(!0),c("uploading"),x(""),f(""),M(""),P({method:"POST",url:"/game/upload",headers:{"ttmg-game-desc":encodeURIComponent(X||"--")}}).then(async s=>{if(s?.code===0){await O(500),f(s?.data?.detail||"");const l=s?.data?.asset_id?String(s.data.asset_id):"",u=Date.now()+h;if(!l){c("failure"),x(a("uploadGame.failure.missingAssetId"));return}c("checkingAsset");const i=await Re(l,u);if(!i.ok){c("failure"),x(i.asset?a("uploadGame.failure.assetStatus",{status:te(i.asset)||"-"}):a("uploadGame.failure.assetTimeout"));return}c("resolvingPreview");const m=await ce(l,u);if(!m){c("failure"),x(a("uploadGame.failure.previewTimeout"));return}H(j=>({...j,[l]:m})),Se(l),G(""),Y(""),ae.current?.formApi?.reset?.(),await ne(),c("idle")}else c("idle"),x(s?.error?.StatusMessage||s?.detail||a("uploadPlatformFailed"))}).catch(s=>{c("idle"),x(s?.error?.StatusMessage||s?.response?.detail||s?.message||a("uploadPlatformFailed"))}).finally(()=>{se(!1)})};if(F){const s=["projectInfo.error.permission.stepCheckAccount","projectInfo.error.permission.stepApply","projectInfo.error.permission.stepRestart"];return e.jsx("div",{className:"upload-game-page",children:e.jsxs("section",{className:"upload-game-guard",children:[e.jsxs("div",{className:"upload-game-guard-banner",children:[e.jsx(r.Text,{strong:!0,children:a("projectInfo.error.permission.title")}),e.jsx(r.Text,{children:a("projectInfo.error.permission.desc")})]}),e.jsxs("div",{className:"upload-game-guard-card",children:[e.jsxs("div",{className:"upload-game-guard-head",children:[e.jsx(r.Text,{strong:!0,children:a("projectInfo.error.stepTitle")}),e.jsx(r.Text,{className:"upload-game-form-head-desc",children:a("projectInfo.error.helpPermissionDesc")})]}),e.jsx("div",{className:"upload-game-guard-steps",children:s.map((l,u)=>e.jsxs("div",{className:"upload-game-guard-step",children:[e.jsx("span",{className:"upload-game-guard-step-index",children:u+1}),e.jsx(r.Text,{children:a(l)})]},l))}),e.jsx("div",{className:"upload-game-guard-actions",children:e.jsx(w,{theme:"light",onClick:()=>p("/basic_debug_guide"),children:a("basicDebugGuide.entryAction")})})]})]})})}return e.jsxs("div",{className:"upload-game-page",children:[e.jsx("section",{className:"upload-game-guide-card",children:e.jsxs("div",{className:"upload-game-guide",children:[e.jsxs("div",{className:"upload-game-guide-copy",children:[e.jsx(r.Text,{strong:!0,children:a("uploadGame.guide.title")}),e.jsx(r.Paragraph,{className:"upload-game-guide-desc",children:a("uploadGame.guide.desc")})]}),e.jsx("div",{className:"upload-game-guide-steps",children:[{title:a("uploadGame.guide.precheck.title"),desc:a("uploadGame.guide.precheck.desc")},{title:a("uploadGame.guide.version.title"),desc:a("uploadGame.guide.version.desc")},{title:a("uploadGame.guide.preview.title"),desc:a("uploadGame.guide.preview.desc")}].map((s,l)=>e.jsxs("div",{className:"upload-game-guide-step",children:[e.jsx("span",{className:"upload-game-guide-step-index",children:l+1}),e.jsxs("div",{className:"upload-game-guide-step-copy",children:[e.jsx(r.Text,{strong:!0,children:s.title}),e.jsx(r.Text,{type:"tertiary",children:s.desc})]})]},s.title))})]})}),e.jsxs("section",{className:"upload-game-hero",children:[S?e.jsxs("div",{className:"upload-game-summary-panel upload-game-summary-panel-neutral",children:[e.jsxs("div",{className:"upload-game-summary-copy",children:[e.jsx(r.Text,{strong:!0,children:a("uploadGame.summary.checkingTitle")}),e.jsx(r.Text,{style:{color:"rgba(0, 0, 0, 0.45)"},children:a("uploadGame.summary.checkingDesc")})]}),e.jsx(L,{size:"small"})]}):null,!S&&C?e.jsxs("div",{className:"upload-game-summary-panel upload-game-summary-panel-warn",children:[e.jsxs("div",{className:"upload-game-summary-copy",children:[e.jsx(r.Text,{strong:!0,children:a("uploadGame.summary.failedTitle")}),e.jsx(r.Text,{style:{color:"rgba(0, 0, 0, 0.45)"},children:a("uploadGame.checkFetchFailed")})]}),e.jsxs("span",{className:"upload-game-summary-action",role:"button",tabIndex:0,onClick:N,onKeyDown:s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),N())},children:[e.jsx(q,{style:{transform:v?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"}}),e.jsx(r.Text,{children:a(v?"uploadGame.hideDetails":"uploadGame.showDetails")})]})]}):null,k?null:e.jsxs("div",{className:"upload-game-inline-notice",children:[e.jsx("div",{className:"upload-game-inline-notice-icon",children:e.jsx(Oe,{})}),e.jsxs("div",{className:"upload-game-inline-notice-copy",children:[e.jsx(r.Text,{strong:!0,children:a("uploadGame.loginNoticeTitle")}),e.jsx(r.Text,{children:a("loginToUpload")}),e.jsx("div",{className:"upload-game-inline-notice-action",children:e.jsx(w,{theme:"light",onClick:()=>p("/basic_debug_guide"),children:a("basicDebugGuide.entryAction")})})]})]}),!S&&!C&&K?e.jsxs("div",{className:"upload-game-summary-panel upload-game-summary-panel-warn",children:[e.jsxs("div",{className:"upload-game-summary-copy",children:[e.jsx(r.Text,{strong:!0,children:a("uploadGame.issueTitle")}),e.jsx(r.Text,{style:{color:"rgba(0, 0, 0, 0.45)"},children:a("uploadGame.issueDesc")})]}),e.jsxs("span",{className:"upload-game-summary-action",role:"button",tabIndex:0,onClick:N,onKeyDown:s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),N())},children:[e.jsx(q,{style:{transform:v?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"}}),e.jsx(r.Text,{children:a(v?"uploadGame.hideDetails":"uploadGame.showDetails")})]})]}):null,!S&&!C&&!K?e.jsxs("div",{className:"upload-game-summary-panel upload-game-summary-panel-ok",children:[e.jsxs("div",{className:"upload-game-summary-copy",children:[e.jsx(r.Text,{strong:!0,children:a("uploadGame.readyTitle")}),e.jsx(r.Text,{style:{color:"rgba(0, 0, 0, 0.45)"},children:a("uploadGame.readyDesc")})]}),e.jsxs("span",{className:"upload-game-summary-action",role:"button",tabIndex:0,onClick:N,onKeyDown:s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),N())},children:[e.jsx(q,{style:{transform:v?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"}}),e.jsx(r.Text,{children:a(v?"uploadGame.hideDetails":"uploadGame.showDetails")})]})]}):null,v?e.jsxs("div",{className:"upload-game-inline-detail",children:[e.jsx(r.Paragraph,{className:"upload-game-inline-detail-desc",children:a("uploadGame.detailDesc")}),e.jsx("div",{className:"upload-game-check-body",children:S?e.jsx("div",{className:"upload-game-loading",children:e.jsx(L,{})}):e.jsxs(e.Fragment,{children:[e.jsx(Je,{engine:Te}),e.jsx(es,{result:ge}),e.jsx(Xe,{result:pe}),e.jsx(Ye,{result:me}),e.jsx(Ze,{result:ue})]})})]}):null,C?e.jsx(V,{type:"warning",description:a("uploadGame.checkFetchFailed"),style:{marginTop:16}}):null,!S&&!C&&K?e.jsx("div",{className:"upload-game-issue-list",children:Fe.slice(0,4).map((s,l)=>e.jsxs("div",{className:"upload-game-issue-item",children:[e.jsx(A,{color:"red",children:s.groupTitle}),e.jsx(r.Text,{className:"upload-game-issue-text",children:s.message}),s.link?e.jsx("a",{href:s.link,target:"_blank",rel:"noreferrer",children:s.linkText||a("viewDoc")}):null]},`${s.groupTitle}-${l}`))}):null,e.jsxs("div",{className:"upload-game-form-wrapper upload-game-form-wrapper-main",children:[t==="idle"?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"upload-game-form-head",children:[e.jsx(r.Text,{strong:!0,children:a("gameAssetDescription")}),e.jsx(r.Text,{className:"upload-game-form-head-desc",children:a("uploadGame.uploadDescHint")})]}),e.jsx(xe,{ref:ae,onChange:({values:s})=>{Y(s?.gameDescription||""),x("")},children:e.jsx(xe.TextArea,{noLabel:!0,placeholder:a("gameAssetDescription"),field:"gameDescription",disabled:!k})}),$&&e.jsx(r.Text,{type:"danger",style:{display:"block",marginBottom:8},children:$}),e.jsx(w,{theme:"solid",type:"primary",disabled:!k||ee,loading:ee,onClick:Ue,style:{width:"100%",height:40},children:a("uploadToPlatform")})]}):null,t==="uploading"||t==="checkingAsset"||t==="resolvingPreview"?e.jsxs("div",{className:"upload-game-progress-card",children:[e.jsxs("div",{className:"upload-game-progress-head",children:[e.jsxs("div",{className:"upload-game-progress-badge",children:[e.jsx("span",{className:"upload-game-progress-badge-dot"}),e.jsx(r.Text,{children:t==="uploading"?a("uploadGame.progress.badgeUploading"):t==="checkingAsset"?a("uploadGame.progress.badgeChecking"):a("uploadGame.progress.badgePreview")})]}),e.jsx("div",{className:"upload-game-progress-bar"})]}),e.jsxs("div",{className:"upload-game-progress-copy",children:[e.jsx(r.Title,{heading:5,children:t==="uploading"?a("uploadGame.progress.title"):t==="checkingAsset"?a("uploadGame.progress.assetTitle"):a("uploadGame.progress.previewTitle")}),e.jsx(r.Paragraph,{className:"upload-game-form-head-desc",children:t==="uploading"?a("uploadGame.progress.desc"):t==="checkingAsset"?a("uploadGame.progress.assetDesc",{status:fe||a("uploadGame.progress.statusPending")}):a("uploadGame.progress.previewDesc")}),e.jsx("div",{className:"upload-game-progress-steps",children:Le.map((s,l)=>{const u=Ie(l);return e.jsxs("div",{className:`upload-game-progress-step upload-game-progress-step-${u}`,children:[e.jsx("span",{className:"upload-game-progress-step-dot",children:l+1}),e.jsx("span",{className:"upload-game-progress-step-label",children:s})]},s)})})]})]}):null,t==="failure"?e.jsxs("div",{className:"upload-game-failure-card",children:[e.jsx(r.Title,{heading:5,children:a("uploadGame.failure.title")}),e.jsx(r.Paragraph,{className:"upload-game-form-head-desc",children:$||a("uploadPlatformFailed")}),e.jsxs("div",{className:"upload-game-success-actions",children:[o?e.jsx(w,{theme:"light",onClick:()=>window.open(o,"_blank"),children:a("viewOnPlatform")}):null,e.jsx(w,{theme:"solid",type:"primary",onClick:()=>{c("idle"),x(""),f(""),M("")},children:a("uploadGame.failure.retry")})]})]}):null]}),k?e.jsxs("div",{className:"upload-game-records",children:[e.jsx("div",{className:"upload-game-records-head",children:e.jsxs("div",{className:"upload-game-records-copy",children:[e.jsx(r.Text,{children:a("uploadGame.record.title")}),e.jsx(r.Text,{className:"upload-game-form-head-desc",children:a("uploadGame.record.desc")})]})}),J?e.jsx(V,{type:"warning",description:J,style:{marginTop:12}}):null,Q&&!T.length?e.jsxs("div",{className:"upload-game-records-empty",children:[e.jsx(L,{size:"small"}),e.jsx(r.Text,{children:a("uploadGame.record.loading")})]}):null,!Q&&!T.length?e.jsx("div",{className:"upload-game-records-empty",children:e.jsx(r.Text,{children:a("uploadGame.record.empty")})}):null,T.length?e.jsxs("div",{className:"upload-game-records-layout",children:[e.jsx("div",{className:"upload-game-records-toolbar",children:e.jsx(Ke,{value:y,className:"upload-game-record-select",placeholder:a("uploadGame.record.selectPlaceholder"),allowClear:!0,optionList:T.slice(0,12).map(s=>({value:String(s.asset_id),label:Ae(s)})),onChange:s=>G(String(s||""))})}),g?e.jsxs("div",{className:"upload-game-record-detail",children:[e.jsx("div",{className:"upload-game-record-detail-head",children:e.jsx("div",{className:"upload-game-record-detail-copy",children:e.jsx(r.Text,{strong:!0,children:a("uploadGame.record.detailTitle",{version:de(g)})})})}),e.jsxs("div",{className:"upload-game-record-detail-body",children:[e.jsxs("div",{className:"upload-game-record-detail-main",children:[e.jsxs("div",{className:"upload-game-record-detail-meta",children:[e.jsxs("div",{className:"upload-game-record-detail-row",children:[e.jsx(r.Text,{type:"tertiary",children:a("uploadGame.record.metaUploadedAt")}),e.jsx(r.Text,{children:oe(g.uploaded_at)})]}),e.jsxs("div",{className:"upload-game-record-detail-row",children:[e.jsx(r.Text,{type:"tertiary",children:a("uploadGame.record.metaAssetId")}),e.jsx(r.Text,{children:g.asset_id||a("uploadGame.record.metaUnknown")})]}),e.jsxs("div",{className:"upload-game-record-detail-row",children:[e.jsx(r.Text,{type:"tertiary",children:a("uploadGame.record.metaSource")}),e.jsx(r.Text,{children:De(g.source)})]}),e.jsxs("div",{className:"upload-game-record-detail-row",children:[e.jsx(r.Text,{type:"tertiary",children:a("uploadGame.record.metaSize")}),e.jsx(r.Text,{children:Pe(g.size)})]})]}),e.jsxs("div",{className:"upload-game-record-detail-note",children:[e.jsx(r.Text,{type:"tertiary",children:a("gameAssetDescription")}),e.jsx(r.Paragraph,{children:g.desc||a("uploadGame.record.noDesc")})]})]}),e.jsx("div",{className:"upload-game-record-preview",children:g.state==="ready"?I?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"upload-game-record-qr-box",children:e.jsx(qe,{value:I,size:132})}),e.jsx(r.Text,{className:"upload-game-success-qr-caption",children:a("uploadGame.record.previewHint")})]}):e.jsx("div",{className:"upload-game-record-qr-box upload-game-record-qr-box-muted",children:ve?e.jsxs("div",{className:"upload-game-record-preview-loading",children:[e.jsx(L,{size:"small"}),e.jsx(r.Text,{children:a("uploadGame.record.previewLoading")})]}):e.jsx(r.Text,{type:"tertiary",children:a("uploadGame.record.previewUnavailable")})}):e.jsx("div",{className:"upload-game-record-qr-box upload-game-record-qr-box-muted",children:e.jsx(r.Text,{type:"tertiary",children:g.state==="failed"?a("uploadGame.record.failedDesc"):a("uploadGame.record.pendingDesc")})})})]}),String(g.asset_id)===String(ke)&&o?e.jsx("div",{className:"upload-game-success-actions",children:e.jsx(w,{theme:"light",onClick:()=>window.open(o,"_blank"),children:a("viewOnPlatform")})}):null]}):null]}):null]}):null]})]})};export{os as CheckCode};
@@ -0,0 +1 @@
1
+ .lang-switcher{display:inline-flex;align-items:center;gap:6px;padding:4px 12px;border-radius:999px;background:var(--tt-overlay-soft);border:1px solid var(--tt-border-strong);color:var(--tt-text);cursor:pointer;-webkit-user-select:none;user-select:none}.lang-switcher-icon{font-size:14px;color:inherit}.lang-switcher-text{font-size:12px;font-weight:700;letter-spacing:.3px;line-height:1;color:inherit!important}.lang-switcher-item{display:flex!important;align-items:center;justify-content:space-between;gap:16px;min-width:148px}.lang-switcher-item-active{background:#25f4ee1f!important;color:var(--tt-cyan)!important;font-weight:600}.lang-switcher-item-active:hover{background:#25f4ee2e!important}.lang-switcher-item-label{flex:1 1 auto}.lang-switcher-item-check{color:var(--tt-cyan);font-size:14px;flex:0 0 auto}
@@ -0,0 +1 @@
1
+ import{K as Te,r as F,h as we,k as ne,_ as W,O as R,U as Ce,R as l,m as oe,V as ye,W as Ne,n as v,X as Ae,q as o,t as E,Y as De,A as ie,b as ae,Z as le,L as Le,s as Pe,j as h,$ as ee,u as je,a0 as Me,i as J}from"./index-BvxhyFWU.js";import{_ as Oe,I as re,C as He}from"./times-C1GmugF6.js";import{D as te}from"./index-B6ZeUJlM.js";function Re(u){return F.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},u),F.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5 2h14a3 3 0 0 1 3 3v14a3 3 0 0 1-3 3H5a3 3 0 0 1-3-3V5a3 3 0 0 1 3-3Zm1 2a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1V5a1 1 0 0 0-1-1H6Z",fill:"currentColor"}))}const ke=Te(Re,"sidebar"),ce="horizontal",de="vertical",K={PREFIX:`${we}-navigation`},p={MODE:[de,ce],MODE_VERTICAL:de,MODE_HORIZONTAL:ce,ICON_POS_LEFT:"left",ICON_POS_RIGHT:"right",TOGGLE_ICON_LEFT:"left",TOGGLE_ICON_RIGHT:"right"},V={DEFAULT_SUBNAV_MAX_HEIGHT:999,DEFAULT_TOOLTIP_SHOW_DELAY:0,DEFAULT_TOOLTIP_HIDE_DELAY:100,DEFAULT_SUBNAV_OPEN_DELAY:0,DEFAULT_SUBNAV_CLOSE_DELAY:100},pe={open:"chevron_up",closed:"chevron_down"};let Ve=class se{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};(t==null||typeof t!="object")&&(t={text:t,itemKey:t,maxHeight:V.DEFAULT_SUBNAV_MAX_HEIGHT,link:null,items:null,icon:"",indent:!1});for(const e of Object.keys(t))this[e]=t[e];t.items&&Array.isArray(t.items)&&t.items.length?(this.items=t.items.map(e=>new se(e)),"toggleIcon"in t?this.toggleIcon=se.isValidToggleIcon(t.toggleIcon)?Object.assign({},t.toggleIcon):Object.assign({},pe):this.toggleIcon=Object.assign({},pe)):this.items=null}static isValidToggleIcon(t){return!!(t&&typeof t=="object"&&typeof t.open=="string"&&t.open.length&&typeof t.closed=="string"&&t.closed.length)}};class $ extends ne{constructor(t){super(Object.assign({},t))}static getZeroParentKeys(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const e=[];for(var n=arguments.length,s=new Array(n>1?n-1:0),a=1;a<n;a++)s[a-1]=arguments[a];if(s.length){for(const i of s)if(Array.isArray(t[i])&&t[i].length){const r=t[i][0];R(r)||e.push(r)}}return e}static buildItemKeysMap(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"itemKey";var a;if(Array.isArray(t)&&t.length)for(const i of t)if(Array.isArray(i))$.buildItemKeysMap(i,e,[...n],s);else{let r;if(i&&typeof i=="object"&&(r=i[s]||i.props&&i.props[s]),r){e[r]=[...n];const c=(a=i.props)===null||a===void 0?void 0:a.children;if(Array.isArray(i.items)&&i.items.length)$.buildItemKeysMap(i.items,e,[...n,r],s);else if(c){const d=Array.isArray(c)?c:[c];$.buildItemKeysMap(d,e,[...n,r],s)}}}return e}init(t){const{defaultSelectedKeys:e,selectedKeys:n}=this.getProps();let s=n||e||[];const{itemKeysMap:a,willOpenKeys:i,formattedItems:r}=this.getCalcState(),c=this.selectLevelZeroParentKeys(a,s);if(s=s.concat(c),t==="constructor")return{selectedKeys:s,itemKeysMap:a,openKeys:i,items:r};this._adapter.updateSelectedKeys(s,!1),this._adapter.setItemKeysMap(a),this._adapter.updateOpenKeys(i),this._adapter.updateItems(r),this._adapter.setItemsChanged(!0)}getCalcState(){const{itemKeysMap:t,formattedItems:e}=this.getFormattedItems(),n=this.getWillOpenKeys(t);return{itemKeysMap:t,willOpenKeys:n,formattedItems:e}}getFormattedItems(){const{items:t,children:e}=this.getProps(),n=this.formatItems(t),s=Array.isArray(t)&&t.length?n:e;return{itemKeysMap:$.buildItemKeysMap(s),formattedItems:n}}getWillOpenKeys(t){const{defaultOpenKeys:e,openKeys:n,defaultSelectedKeys:s,selectedKeys:a,mode:i}=this.getProps(),{openKeys:r=[]}=this.getStates();let c=n||e||[];if(!(Array.isArray(e)||Array.isArray(n))&&i===p.MODE_VERTICAL&&(Array.isArray(s)||Array.isArray(a))){const d=Array.isArray(a)?a:s;c=r.concat(this.getShouldOpenKeys(t,d)),c=Array.from(new Set(c))}return[...c]}getShouldOpenKeys(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];const n=new Set;return Array.isArray(e)&&e.length&&e.forEach(s=>{if(s){const a=W(t,s);Array.isArray(a)&&a.forEach(i=>n.add(i))}}),[...n]}destroy(){}selectLevelZeroParentKeys(t,e){const n=R(t)?this.getState("itemKeysMap"):t,s=[];if(e.length){for(const a of e)if(Array.isArray(n[a])&&n[a].length){const i=n[a][0];R(i)||s.push(i)}}return s.length?s:[]}formatItems(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];const e=[];for(const n of t)e.push(new Ve(n));return e}handleSelect(t){this._adapter.notifySelect(t)}judgeIfOpen(t,e){let n=!1;const s=Array.isArray(t)?t:t&&[t];if(s&&Array.isArray(e)&&e.length){for(const a of e)if(n=s.includes(a.itemKey)||this.judgeIfOpen(s,a.items),n)break}return n}handleCollapseChange(){const t=!this.getState("isCollapsed");this._isControlledComponent("isCollapsed")||this._adapter.setIsCollapsed(t),this._adapter.notifyCollapseChange(t)}handleItemsChange(t){this._adapter.setItemsChanged(t)}}const ue=function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];const e=new Set(t);for(var n=arguments.length,s=new Array(n>1?n-1:0),a=1;a<n;a++)s[a-1]=arguments[a];return s.forEach(i=>i&&e.add(i)),Array.from(e)},he=function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];const e=new Set(t);for(var n=arguments.length,s=new Array(n>1?n-1:0),a=1;a<n;a++)s[a-1]=arguments[a];return s.forEach(i=>i&&e.delete(i)),Array.from(e)};class $e extends ne{constructor(t){super(Object.assign({},t))}init(){this._timer=null}destroy(){this.clearDelayTimer()}clearDelayTimer(){this._timer&&(clearTimeout(this._timer),this._timer=null)}isValidKey(t){return t!=null&&(typeof t=="number"||typeof t=="string")}handleDropdownVisibleChange(t){const e=this.getProp("itemKey"),n=this._adapter.getOpenKeysIsControlled(),s=this._adapter.getCanUpdateOpenKeys(),a=this._adapter.getOpenKeys(),i=t?ue(a,e):he(a,e);this.clearDelayTimer(),n||s&&this._adapter.updateOpen(t),this._adapter.notifyGlobalOpenChange({itemKey:e,openKeys:i,isOpen:t})}handleClick(t,e){const{itemKey:n,disabled:s}=this.getProps();if(s)return;const a=e&&e.contains(t.target);let i=!!this._adapter.getIsOpen();a?i=!i:i=!1;const r=i?ue(this._adapter.getOpenKeys(),n):he(this._adapter.getOpenKeys(),n),c={itemKey:n,openKeys:r,isOpen:i,domEvent:t},d=this._adapter.getOpenKeysIsControlled(),m=this._adapter.getCanUpdateOpenKeys();!d&&m&&this._adapter.updateOpen(i),this._adapter.notifyGlobalOpenChange(c),this._adapter.notifyGlobalOnClick(c)}handleKeyPress(t,e){Ce(t)&&this.handleClick(t,e)}}class Fe extends ne{constructor(t){super(Object.assign({},t))}init(){this._timer=null,this._mounted=!0}destroy(){this._mounted=!1}isValidKey(t){return t!=null&&(typeof t=="string"||typeof t=="number")}handleClick(t){const{isSubNav:e,itemKey:n,text:s,disabled:a}=this.getProps();if(a)return;!e&&this.isValidKey(n)&&!this._adapter.getSelectedKeysIsControlled()&&!this._adapter.getSelected()&&this._adapter.updateSelected(!0);const i=[n];if(!e){if(!this._adapter.getSelected()){const r=[this._adapter.cloneDeep(this.getProps())];this._adapter.notifyGlobalOnSelect({itemKey:n,selectedKeys:i,selectedItems:r,domEvent:t})}this._adapter.notifyGlobalOnClick({itemKey:n,text:s,domEvent:t})}this._adapter.notifyClick({itemKey:n,text:s,domEvent:t})}handleKeyPress(t){if(Ce(t)){const{link:e,linkOptions:n}=this.getProps(),s=W(n,"target","_self");this.handleClick(t),typeof e=="string"&&(s==="_blank"?window.open(e):window.location.href=e)}}}const G=l.createContext({isCollapsed:!1,selectedKeys:[],openKeys:[]}),y=`${K.PREFIX}-item`;class U extends oe{constructor(t){super(t),this.setItemRef=e=>{this.props.forwardRef&&this.props.forwardRef(e)},this.wrapTooltip=e=>{const{text:n,tooltipHideDelay:s,tooltipShowDelay:a}=this.props,i=s??this.context.tooltipHideDelay,r=a??this.context.tooltipShowDelay;return l.createElement(ye,{content:n,wrapWhenSpecial:!1,position:"right",trigger:"hover",mouseEnterDelay:r,mouseLeaveDelay:i},e)},this.handleClick=e=>this.foundation.handleClick(e),this.handleKeyPress=e=>this.foundation.handleKeyPress(e),this.state={tooltipShow:!1},this.foundation=new Fe(this.adapter)}_invokeContextFunc(t){if(t&&this.context&&typeof this.context[t]=="function"){for(var e=arguments.length,n=new Array(e>1?e-1:0),s=1;s<e;s++)n[s-1]=arguments[s];return this.context[t](...n)}return null}get adapter(){var t=this;return Object.assign(Object.assign({},super.adapter),{cloneDeep:Ne,updateTooltipShow:e=>this.setState({tooltipShow:e}),updateSelected:e=>this._invokeContextFunc("updateSelectedKeys",[this.props.itemKey]),updateGlobalSelectedKeys:e=>this._invokeContextFunc("updateSelectedKeys",[...e]),getSelectedKeys:()=>this.context&&this.context.selectedKeys,getSelectedKeysIsControlled:()=>this.context&&this.context.selectedKeysIsControlled,notifyGlobalOnSelect:function(){for(var e=arguments.length,n=new Array(e),s=0;s<e;s++)n[s]=arguments[s];return t._invokeContextFunc("onSelect",...n)},notifyGlobalOnClick:function(){for(var e=arguments.length,n=new Array(e),s=0;s<e;s++)n[s]=arguments[s];return t._invokeContextFunc("onClick",...n)},notifyClick:function(){return t.props.onClick(...arguments)},notifyMouseEnter:function(){return t.props.onMouseEnter(...arguments)},notifyMouseLeave:function(){return t.props.onMouseLeave(...arguments)},getIsCollapsed:()=>this.props.isCollapsed||!!(this.context&&this.context.isCollapsed)||!1,getSelected:()=>!!(this.context&&this.context.selectedKeys&&this.context.selectedKeys.includes(this.props.itemKey)),getIsOpen:()=>!!(this.context&&this.context.openKeys&&this.context.openKeys.includes(this.props.itemKey))})}renderIcon(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;if(this.props.isSubNav||!t&&this.context.mode===p.MODE_HORIZONTAL)return null;let a="large";e===p.ICON_POS_RIGHT&&(a="default");const i=v(`${y}-icon`,{[`${y}-icon-toggle-${this.context.toggleIconPosition}`]:n,[`${y}-icon-info`]:!n});return l.createElement("i",{className:i,key:s},Ae(t)?l.cloneElement(t,{size:t.props.size||a}):t)}render(){var t;const{text:e,icon:n,toggleIcon:s,className:a,isSubNav:i,style:r,indent:c,onMouseEnter:d,onMouseLeave:m,link:f,linkOptions:S,disabled:b,level:C=0,tabIndex:M}=this.props,{mode:O,isInSubNav:g,prefixCls:I,limitIndent:B}=this.context,_=this.adapter.getIsCollapsed(),A=this.adapter.getSelected();let x=null;const Y=(t=this.props)===null||t===void 0?void 0:t.children;if(!R(Y))x=Y;else{let L=null;if(O===p.MODE_VERTICAL&&!B&&!_){const T=n&&!c?C:C-1;L=Oe(T,Z=>this.renderIcon(null,p.ICON_POS_RIGHT,!1,Z))}x=l.createElement(l.Fragment,null,L,this.context.toggleIconPosition===p.TOGGLE_ICON_LEFT&&this.renderIcon(s,p.ICON_POS_RIGHT,!0,"key-toggle-pos-right"),n||c||g?this.renderIcon(n,p.ICON_POS_LEFT,!1,"key-position-left"):null,R(e)?"":l.createElement("span",{className:`${K.PREFIX}-item-text`},e),this.context.toggleIconPosition===p.TOGGLE_ICON_RIGHT&&this.renderIcon(s,p.ICON_POS_RIGHT,!0,"key-toggle-pos-right"))}typeof f=="string"&&(x=l.createElement("a",Object.assign({className:`${I}-item-link`,href:f,tabIndex:-1},S),x));let D="";if(g&&(_||O===p.MODE_HORIZONTAL)){const L=v({[y]:!0,[`${y}-sub`]:i,[`${y}-selected`]:A,[`${y}-collapsed`]:_,[`${y}-disabled`]:b});D=l.createElement(te.Item,{selected:A,active:A,forwardRef:this.setItemRef,className:L,onClick:this.handleClick,onMouseEnter:d,onMouseLeave:m,disabled:b,onKeyDown:this.handleKeyPress},x)}else{const L=v(`${a||`${y}-normal`}`,{[y]:!0,[`${y}-sub`]:i,[`${y}-selected`]:A&&!i,[`${y}-collapsed`]:_,[`${y}-disabled`]:b,[`${y}-has-link`]:typeof f=="string"}),T={"aria-disabled":b};if(i){const Z=this.adapter.getIsOpen();T["aria-expanded"]=Z}D=l.createElement("li",Object.assign({role:i?null:"menuitem",tabIndex:i?-1:M},T,{style:r,ref:this.setItemRef,className:L,onClick:this.handleClick,onMouseEnter:d,onMouseLeave:m,onKeyPress:this.handleKeyPress},this.getDataAttr(this.props)),x)}return(_&&!g&&!i||_&&i&&b)&&(D=this.wrapTooltip(D)),typeof this.context.renderWrapper=="function"?this.context.renderWrapper({itemElement:D,isSubNav:i,isInSubNav:g,props:this.props}):D}}U.contextType=G;U.propTypes={text:o.oneOfType([o.string,o.node]),itemKey:o.oneOfType([o.string,o.number]),onClick:o.func,onMouseEnter:o.func,onMouseLeave:o.func,icon:o.oneOfType([o.node]),className:o.string,toggleIcon:o.string,style:o.object,forwardRef:o.func,indent:o.oneOfType([o.bool,o.number]),isCollapsed:o.bool,isSubNav:o.bool,link:o.string,linkOptions:o.object,disabled:o.bool,tabIndex:o.number};U.defaultProps={isSubNav:!1,indent:!1,forwardRef:E,isCollapsed:!1,onClick:E,onMouseEnter:E,onMouseLeave:E,disabled:!1,tabIndex:0};class z extends oe{constructor(t){super(t),this.setItemRef=e=>{e&&e.current?this.itemRef=e:this.itemRef={current:e}},this.setTitleRef=e=>{e&&e.current?this.titleRef=e:this.titleRef={current:e}},this.handleClick=e=>{this.foundation.handleClick(e&&e.nativeEvent,this.titleRef&&this.titleRef.current)},this.handleKeyPress=e=>{this.foundation.handleKeyPress(e&&e.nativeEvent,this.titleRef&&this.titleRef.current)},this.handleDropdownVisible=e=>this.foundation.handleDropdownVisibleChange(e),this.state={isHovered:!1},this.adapter.setCache("firstMounted",!0),this.titleRef=l.createRef(),this.itemRef=l.createRef(),this.foundation=new $e(this.adapter)}_invokeContextFunc(t){if(t&&this.context&&typeof this.context[t]=="function"){for(var e=arguments.length,n=new Array(e>1?e-1:0),s=1;s<e;s++)n[s-1]=arguments[s];return this.context[t](...n)}return null}get adapter(){var t=this;return Object.assign(Object.assign({},super.adapter),{updateIsHovered:e=>this.setState({isHovered:e}),getOpenKeys:()=>this.context&&this.context.openKeys,getOpenKeysIsControlled:()=>this.context&&this.context.openKeysIsControlled,getCanUpdateOpenKeys:()=>this.context&&this.context.canUpdateOpenKeys,updateOpen:e=>this._invokeContextFunc(e?"addOpenKeys":"removeOpenKeys",this.props.itemKey),notifyGlobalOpenChange:function(){for(var e=arguments.length,n=new Array(e),s=0;s<e;s++)n[s]=arguments[s];return t._invokeContextFunc("onOpenChange",...n)},notifyGlobalOnSelect:function(){for(var e=arguments.length,n=new Array(e),s=0;s<e;s++)n[s]=arguments[s];return t._invokeContextFunc("onSelect",...n)},notifyGlobalOnClick:function(){for(var e=arguments.length,n=new Array(e),s=0;s<e;s++)n[s]=arguments[s];return t._invokeContextFunc("onClick",...n)},getIsSelected:e=>!!(!R(e)&&W(this.context,"selectedKeys",[]).includes(String(e))),getIsOpen:()=>{const{itemKey:e}=this.props;return!!(this.context&&this.context.openKeys&&this.context.openKeys.includes(this.props.itemKey))}})}renderIcon(t,e,n){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;const{prefixCls:i}=this.context;let r="large";e===p.ICON_POS_RIGHT&&(r="default");const c=v(`${i}-item-icon`,{[`${i}-item-icon-toggle-${this.context.toggleIconPosition}`]:s,[`${i}-item-icon-info`]:!s}),d=this.adapter.getIsOpen(),m=l.isValidElement(t)?n?l.createElement(De,{animationState:d?"enter":"leave",startClassName:`${K.PREFIX}-icon-rotate-${d?"180":"0"}`},f=>{let{animationClassName:S}=f;return l.cloneElement(t,{size:r,className:S})}):l.cloneElement(t,{size:r}):null;return l.createElement("i",{key:a,className:c},m)}renderTitleDiv(){const{text:t,icon:e,itemKey:n,indent:s,disabled:a,level:i,expandIcon:r}=this.props,{mode:c,isInSubNav:d,isCollapsed:m,prefixCls:f,subNavMotion:S,limitIndent:b}=this.context,C=this.adapter.getIsOpen(),M=v(`${f}-sub-title`,{[`${f}-sub-title-selected`]:this.adapter.getIsSelected(n),[`${f}-sub-title-disabled`]:a});let O=!1,g="";m?d?g=l.createElement(re,null):g=null:c===p.MODE_HORIZONTAL?d?g=l.createElement(re,{"aria-hidden":!0}):g=r||l.createElement(ie,{"aria-hidden":!0}):(S&&(O=!0),g=r||l.createElement(ie,{"aria-hidden":!0}));let I=null;if(c===p.MODE_VERTICAL&&!b&&!m){const A=e&&!s?i:i-1;I=Oe(A,x=>this.renderIcon(null,p.ICON_POS_RIGHT,!1,!1,x))}const B=!m&&d&&c===p.MODE_HORIZONTAL||m&&d;return l.createElement("div",{role:"menuitem",tabIndex:B?-1:0,ref:this.setTitleRef,className:M,onClick:this.handleClick,onKeyPress:this.handleKeyPress,"aria-expanded":C?"true":"false"},l.createElement("div",{className:`${f}-item-inner`},I,this.context.toggleIconPosition===p.TOGGLE_ICON_LEFT&&this.renderIcon(g,p.ICON_POS_RIGHT,O,!0,"key-toggle-position-left"),e||s||d&&c!==p.MODE_HORIZONTAL?this.renderIcon(e,p.ICON_POS_LEFT,!1,!1,"key-inSubNav-position-left"):null,l.createElement("span",{className:`${f}-item-text`},t),this.context.toggleIconPosition===p.TOGGLE_ICON_RIGHT&&this.renderIcon(g,p.ICON_POS_RIGHT,O,!0,"key-toggle-position-right")))}renderSubUl(){const{children:t,maxHeight:e}=this.props,{isCollapsed:n,mode:s,subNavMotion:a,prefixCls:i}=this.context,r=this.adapter.getIsOpen(),c=s===p.MODE_HORIZONTAL,d=v(`${i}-sub`,{[`${i}-sub-open`]:r,[`${i}-sub-popover`]:n||c});return c?null:a?l.createElement(He,{motion:a,isOpen:r,keepDOM:!1,fade:!0},n?null:l.createElement("ul",{className:d},t)):r&&!n?l.createElement("ul",{className:d},t):null}wrapDropdown(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";const{children:n,dropdownStyle:s,disabled:a,subDropdownProps:i,dropdownProps:r}=this.props,{mode:c,isInSubNav:d,isCollapsed:m,subNavCloseDelay:f,subNavOpenDelay:S,prefixCls:b,getPopupContainer:C}=this.context,M=this.adapter.getIsOpen(),O=this.adapter.getOpenKeysIsControlled(),g=v({[`${b}-popover`]:m}),I={trigger:"hover",style:s};return O&&(I.trigger="custom",I.visible=M),C&&(I.getPopupContainer=C),(m||c===p.MODE_HORIZONTAL)&&(e=a?e:l.createElement(te,Object.assign({className:g,render:l.createElement(te.Menu,null,n),position:c===p.MODE_HORIZONTAL&&!d?"bottomLeft":"rightTop",mouseEnterDelay:S,mouseLeaveDelay:f,onVisibleChange:this.handleDropdownVisible},r||i,I),e)),e}render(){const{itemKey:t,style:e,onMouseEnter:n,onMouseLeave:s,disabled:a,text:i}=this.props,{mode:r,isCollapsed:c,prefixCls:d}=this.context;let m=this.renderTitleDiv();const f=this.renderSubUl();return(c||r===p.MODE_HORIZONTAL)&&(m=this.wrapDropdown(m)),l.createElement(U,{style:e,isSubNav:!0,itemKey:t,forwardRef:this.setItemRef,isCollapsed:c,className:`${d}-sub-wrap`,onMouseEnter:n,onMouseLeave:s,disabled:a,text:i},l.createElement(G.Provider,{value:Object.assign(Object.assign({},this.context),{isInSubNav:!0})},m,f))}}z.contextType=G;z.propTypes={itemKey:o.oneOfType([o.string,o.number]),text:o.oneOfType([o.string,o.node]),isOpen:o.bool,isCollapsed:o.bool,indent:o.oneOfType([o.bool,o.number]),children:o.node,style:o.object,icon:o.node,maxHeight:o.number,onMouseEnter:o.func,onMouseLeave:o.func,disabled:o.bool,level:o.number};z.defaultProps={level:0,indent:!1,isCollapsed:!1,isOpen:!1,maxHeight:V.DEFAULT_SUBNAV_MAX_HEIGHT,disabled:!1};function Ge(u){let{prefixCls:t,locale:e,collapseText:n,isCollapsed:s,onClick:a=E}=u;const i=()=>{typeof a=="function"&&a(!s)},r={icon:l.createElement(ke,null),type:"tertiary",theme:"borderless",onClick:i};let c=s?e?.expandText:e?.collapseText;return typeof n=="function"&&(c=n(s)),l.createElement("div",{className:`${t}-collapse-btn`},s?l.createElement(ye,{content:c,position:"right"},l.createElement(ae,Object.assign({},r))):l.createElement(ae,Object.assign({},r),c))}class P extends F.PureComponent{constructor(){super(...arguments),this.renderCollapseButton=()=>{const{collapseButton:t,collapseText:e}=this.props;if(l.isValidElement(t))return t;const{onCollapseChange:n,prefixCls:s,locale:a,isCollapsed:i}=this.context;return l.createElement(Ge,{prefixCls:s,isCollapsed:i,locale:a,onClick:n,collapseText:e})}}render(){const{style:t,className:e,collapseButton:n,onClick:s}=this.props;let{children:a}=this.props;const{isCollapsed:i,mode:r}=this.context;!l.isValidElement(a)&&n&&r!==p.MODE_HORIZONTAL&&(a=this.renderCollapseButton());const c=v(e,`${K.PREFIX}-footer`,{[`${K.PREFIX}-footer-collapsed`]:i});return l.createElement("div",{className:c,style:t,onClick:s},a)}}P.contextType=G;P.propTypes={children:o.node,style:o.object,className:o.string,collapseButton:o.oneOfType([o.node,o.bool]),collapseText:o.func,onClick:o.func};P.defaultProps={collapseButton:!1,onClick:E};P.elementType="NavFooter";class j extends F.PureComponent{renderLogo(t){return l.isValidElement(t)?t:null}render(){const{children:t,style:e,className:n,logo:s,text:a,link:i,linkOptions:r,prefixCls:c}=this.props,{isCollapsed:d}=this.context,m=v(n,`${K.PREFIX}-header`,{[`${K.PREFIX}-header-collapsed`]:d});let f=l.createElement(l.Fragment,null,s?l.createElement("i",{className:`${K.PREFIX}-header-logo`},this.renderLogo(s)):null,!R(a)&&!d?l.createElement("span",{className:`${K.PREFIX}-header-text`},a):null,t);return typeof i=="string"&&(f=l.createElement("a",Object.assign({className:`${c}-header-link`,href:i},r),f)),l.createElement("div",{className:m,style:e},f)}}j.contextType=G;j.propTypes={prefixCls:o.string,logo:o.oneOfType([o.string,o.object,o.node]),text:o.oneOfType([o.string,o.node]),children:o.node,style:o.object,className:o.string,link:o.string,linkOptions:o.object};j.defaultProps={prefixCls:K.PREFIX};j.elementType="NavHeader";var Ue=function(u,t){var e={};for(var n in u)Object.prototype.hasOwnProperty.call(u,n)&&t.indexOf(n)<0&&(e[n]=u[n]);if(u!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(u);s<n.length;s++)t.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(u,n[s])&&(e[n[s]]=u[n[s]]);return e};function me(u,t){return function(){const n=new Set(u.state[t]);for(var s=arguments.length,a=new Array(s),i=0;i<s;i++)a[i]=arguments[i];a.forEach(r=>r&&n.add(r)),u.setState({[t]:Array.from(n)})}}function fe(u,t){return function(){const n=new Set(u.state[t]);for(var s=arguments.length,a=new Array(s),i=0;i<s;i++)a[i]=arguments[i];a.forEach(r=>r&&n.delete(r)),u.setState({[t]:Array.from(n)})}}const{hasOwnProperty:Be}=Object.prototype;class N extends oe{constructor(t){super(t),this.onCollapseChange=()=>{this.foundation.handleCollapseChange()},this.foundation=new $(this.adapter),this.itemsChanged=!0;const{isCollapsed:e,defaultIsCollapsed:n,items:s,children:a}=t,i={isCollapsed:!!(this.isControlled("isCollapsed")?e:n),openKeys:[],items:[],itemKeysMap:{},selectedKeys:[]};if(this.state=Object.assign({},i),s&&s.length||a){const r=this.foundation.init("constructor");this.state=Object.assign(Object.assign({},i),r)}}static getDerivedStateFromProps(t,e){const n={};return Be.call(t,"isCollapsed")&&t.isCollapsed!==e.isCollapsed&&(n.isCollapsed=t.isCollapsed),n}componentDidMount(){}componentDidUpdate(t){if(t.items!==this.props.items||t.children!==this.props.children)this.foundation.init();else{if(this.foundation.handleItemsChange(!1),this.props.selectedKeys&&!le(t.selectedKeys,this.props.selectedKeys)){this.adapter.updateSelectedKeys(this.props.selectedKeys);const e=this.foundation.getWillOpenKeys(this.state.itemKeysMap);this.adapter.updateOpenKeys(e)}this.props.openKeys&&!le(t.openKeys,this.props.openKeys)&&this.adapter.updateOpenKeys(this.props.openKeys)}}get adapter(){var t=this;return Object.assign(Object.assign({},super.adapter),{notifySelect:function(){return t.props.onSelect(...arguments)},notifyOpenChange:function(){return t.props.onOpenChange(...arguments)},setIsCollapsed:e=>this.setState({isCollapsed:e}),notifyCollapseChange:function(){return t.props.onCollapseChange(...arguments)},updateItems:e=>this.setState({items:[...e]}),setItemKeysMap:e=>this.setState({itemKeysMap:Object.assign({},e)}),addSelectedKeys:me(this,"selectedKeys"),removeSelectedKeys:fe(this,"selectedKeys"),updateSelectedKeys:function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,s=e;if(n){const a=t.foundation.selectLevelZeroParentKeys(null,e);s=Array.from(new Set(e.concat(a)))}t.setState({selectedKeys:s})},updateOpenKeys:e=>this.setState({openKeys:[...e]}),addOpenKeys:me(this,"openKeys"),removeOpenKeys:fe(this,"openKeys"),setItemsChanged:e=>{this.itemsChanged=e}})}renderItems(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;const{expandIcon:n,subDropdownProps:s}=this.props;return l.createElement(l.Fragment,null,t.map((i,r)=>Array.isArray(i.items)&&i.items.length?l.createElement(z,Object.assign({key:i.itemKey||String(e)+r},i,{level:e,expandIcon:n,subDropdownProps:s}),this.renderItems(i.items,e+1)):l.createElement(U,Object.assign({key:i.itemKey||String(e)+r},i,{level:e}))))}render(){const t=this.props,{children:e,mode:n,onOpenChange:s,onSelect:a,onClick:i,style:r,className:c,subNavCloseDelay:d,subNavOpenDelay:m,subNavMotion:f,tooltipShowDelay:S,tooltipHideDelay:b,prefixCls:C,bodyStyle:M,footer:O,header:g,toggleIconPosition:I,limitIndent:B,renderWrapper:_,getPopupContainer:A}=t,x=Ue(t,["children","mode","onOpenChange","onSelect","onClick","style","className","subNavCloseDelay","subNavOpenDelay","subNavMotion","tooltipShowDelay","tooltipHideDelay","prefixCls","bodyStyle","footer","header","toggleIconPosition","limitIndent","renderWrapper","getPopupContainer"]),{selectedKeys:Y,openKeys:D,items:L,isCollapsed:T}=this.state,{updateOpenKeys:Z,addOpenKeys:be,removeOpenKeys:Ie,updateSelectedKeys:ve,addSelectedKeys:Ke,removeSelectedKeys:xe}=this.adapter,Ee=Object.assign({},r);let w=F.Children.toArray(e);const q=[],Q=[];if(l.isValidElement(O)?q.push(l.createElement(P,{key:0},O)):O&&typeof O=="object"&&q.push(l.createElement(P,Object.assign({key:0},O))),l.isValidElement(g)?Q.push(l.createElement(j,{key:0},g)):g&&typeof g=="object"&&Q.push(l.createElement(j,Object.assign({key:0},g))),Array.isArray(w)&&w.length){w=[...w];let X=w.length;for(let H=0;H<X;H++){const k=w[H];k.type===P||W(k,"type.elementType")==="NavFooter"?(q.push(k),w.splice(H,1),H--,X--):(k.type===j||W(k,"type.elementType")==="NavHeader")&&(Q.push(k),w.splice(H,1),H--,X--)}}const Se=v(C,c,{[`${C}-collapsed`]:T,[`${C}-horizontal`]:n==="horizontal",[`${C}-vertical`]:n==="vertical"}),_e=v(`${C}-header-list-outer`,{[`${C}-header-list-outer-collapsed`]:T});return this.itemsChanged&&this.adapter.setCache("itemElems",this.renderItems(L)),l.createElement(Le,{componentName:"Navigation"},X=>l.createElement(G.Provider,{value:{subNavCloseDelay:d,subNavOpenDelay:m,subNavMotion:f,tooltipShowDelay:S,tooltipHideDelay:b,openKeys:D,openKeysIsControlled:this.isControlled("openKeys")&&n==="vertical"&&!T,canUpdateOpenKeys:!0,selectedKeys:Y,selectedKeysIsControlled:this.isControlled("selectedKeys"),isCollapsed:T,onCollapseChange:this.onCollapseChange,mode:n,onSelect:a,onOpenChange:s,updateOpenKeys:Z,addOpenKeys:be,removeOpenKeys:Ie,updateSelectedKeys:ve,addSelectedKeys:Ke,removeSelectedKeys:xe,onClick:i,locale:X,prefixCls:C,toggleIconPosition:I,limitIndent:B,renderWrapper:_,getPopupContainer:A}},l.createElement("div",Object.assign({className:Se,style:Ee},this.getDataAttr(x)),l.createElement("div",{className:`${C}-inner`},l.createElement("div",{className:_e},Q,l.createElement("div",{style:M,className:`${C}-list-wrapper`},l.createElement("ul",{role:"menu","aria-orientation":n,className:`${C}-list`},this.adapter.getCache("itemElems"),w))),q))))}}N.Sub=z;N.Item=U;N.Header=j;N.Footer=P;N.propTypes={collapseIcon:o.node,defaultOpenKeys:o.arrayOf(o.oneOfType([o.string,o.number])),openKeys:o.arrayOf(o.oneOfType([o.string,o.number])),defaultSelectedKeys:o.arrayOf(o.oneOfType([o.string,o.number])),expandIcon:o.node,selectedKeys:o.arrayOf(o.oneOfType([o.string,o.number])),mode:o.oneOf([...p.MODE]),onSelect:o.func,onClick:o.func,onOpenChange:o.func,items:o.array,isCollapsed:o.bool,defaultIsCollapsed:o.bool,onCollapseChange:o.func,multiple:o.bool,onDeselect:o.func,subNavMotion:o.oneOfType([o.bool,o.object,o.func]),subNavCloseDelay:o.number,subNavOpenDelay:o.number,tooltipShowDelay:o.number,tooltipHideDelay:o.number,children:o.node,style:o.object,bodyStyle:o.object,className:o.string,toggleIconPosition:o.string,prefixCls:o.string,header:o.oneOfType([o.node,o.object]),footer:o.oneOfType([o.node,o.object]),limitIndent:o.bool,getPopupContainer:o.func};N.__SemiComponentName__="Navigation";N.defaultProps=Pe(N.__SemiComponentName__,{subNavCloseDelay:V.DEFAULT_SUBNAV_CLOSE_DELAY,subNavOpenDelay:V.DEFAULT_SUBNAV_OPEN_DELAY,tooltipHideDelay:V.DEFAULT_TOOLTIP_HIDE_DELAY,tooltipShowDelay:V.DEFAULT_TOOLTIP_SHOW_DELAY,onCollapseChange:E,onSelect:E,onClick:E,onOpenChange:E,toggleIconPosition:"right",limitIndent:!0,prefixCls:K.PREFIX,subNavMotion:!0,mode:p.MODE_VERTICAL});function Ze(){return h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:h.jsx("path",{d:"M8.48092 0.748384C8.16727 0.653859 7.83272 0.653859 7.51907 0.748384C7.30423 0.813133 7.13028 0.92386 6.97716 1.04125C6.83512 1.15015 6.67675 1.2924 6.50211 1.44927L2.21784 5.29713C2.00105 5.49145 1.80997 5.66273 1.66845 5.87532C1.54419 6.062 1.4522 6.26826 1.39635 6.48545C1.33275 6.73279 1.333 6.9894 1.33329 7.28054L1.33333 12.4241C1.33331 12.6835 1.3333 12.9169 1.34917 13.1111C1.36616 13.3191 1.40462 13.5401 1.51499 13.7567C1.67477 14.0703 1.92974 14.3253 2.24335 14.485C2.45995 14.5954 2.68093 14.6339 2.88891 14.6509C3.08312 14.6667 3.31653 14.6667 3.57591 14.6667H12.4241C12.6835 14.6667 12.9169 14.6667 13.1111 14.6509C13.3191 14.6339 13.54 14.5954 13.7566 14.485C14.0703 14.3253 14.3252 14.0703 14.485 13.7567C14.5954 13.5401 14.6338 13.3191 14.6508 13.1111C14.6667 12.9169 14.6667 12.6835 14.6667 12.4241L14.6667 7.28053C14.667 6.9894 14.6672 6.73279 14.6036 6.48545C14.5478 6.26826 14.4558 6.062 14.3315 5.87532C14.19 5.66273 13.9989 5.49145 13.7822 5.29713L9.49788 1.44927C9.32325 1.2924 9.16488 1.15015 9.02284 1.04125C8.86971 0.923861 8.69577 0.813133 8.48092 0.748384ZM7.90381 2.025C7.96654 2.0061 8.03345 2.0061 8.09618 2.025C8.09682 2.02519 8.10364 2.0272 8.11997 2.0364C8.13837 2.04678 8.16717 2.06534 8.21161 2.0994C8.30743 2.17287 8.42696 2.27959 8.62365 2.45625L12.8467 6.24917C13.1328 6.50615 13.1858 6.56032 13.2216 6.61414C13.263 6.67637 13.2937 6.74512 13.3123 6.81752C13.3284 6.88014 13.3333 6.95575 13.3333 7.34034V12.4C13.3333 12.6911 13.3328 12.8692 13.3219 13.0025C13.3168 13.0646 13.3105 13.1022 13.3051 13.125C13.3025 13.1359 13.3004 13.1426 13.2991 13.1462C13.2979 13.1496 13.2971 13.1511 13.297 13.1514C13.265 13.2141 13.214 13.2651 13.1513 13.297C13.1511 13.2972 13.1496 13.2979 13.1461 13.2991C13.1425 13.3004 13.1359 13.3026 13.125 13.3051C13.1022 13.3105 13.0646 13.3169 13.0025 13.322C12.8692 13.3328 12.691 13.3334 12.4 13.3334H8.66667V8.50008C8.66667 8.31599 8.51743 8.16675 8.33333 8.16675H7.66667C7.48257 8.16675 7.33333 8.31599 7.33333 8.50008V13.3334H3.6C3.30897 13.3334 3.13079 13.3328 2.99749 13.322C2.93539 13.3169 2.89781 13.3105 2.875 13.3051C2.86414 13.3026 2.85747 13.3004 2.85386 13.2991C2.85039 13.2979 2.84894 13.2972 2.84867 13.297C2.78595 13.2651 2.73495 13.2141 2.70299 13.1514C2.70291 13.1512 2.70256 13.1505 2.70199 13.1491C2.70168 13.1483 2.70131 13.1474 2.70088 13.1462C2.69959 13.1426 2.69745 13.1359 2.69489 13.125C2.68952 13.1022 2.68315 13.0646 2.67807 13.0025C2.66718 12.8692 2.66666 12.6911 2.66666 12.4V7.34034C2.66666 6.95575 2.67157 6.88014 2.68767 6.81752C2.70629 6.74512 2.73695 6.67637 2.77837 6.61414C2.8142 6.56032 2.86717 6.50615 3.1533 6.24917L7.37634 2.45625C7.57304 2.27959 7.69256 2.17287 7.78839 2.0994C7.83282 2.06534 7.86162 2.04678 7.88003 2.0364C7.89635 2.0272 7.90317 2.02519 7.90381 2.025Z",fill:"black",fillOpacity:"0.65"})})}const Xe=()=>h.jsx(ee,{svg:h.jsx(Ze,{})});function We(){return h.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[h.jsx("path",{d:"M5.33333 7.66675C5.14924 7.66675 5 7.51751 5 7.33341V6.66675C5 6.48265 5.14924 6.33341 5.33333 6.33341H10.6667C10.8508 6.33341 11 6.48265 11 6.66675V7.33341C11 7.51751 10.8508 7.66675 10.6667 7.66675H5.33333Z",fill:"black",fillOpacity:"0.65"}),h.jsx("path",{d:"M5.33333 10.6667C5.14924 10.6667 5 10.5175 5 10.3334V9.66675C5 9.48265 5.14924 9.33341 5.33333 9.33341H8.33333C8.51743 9.33341 8.66667 9.48265 8.66667 9.66675V10.3334C8.66667 10.5175 8.51743 10.6667 8.33333 10.6667H5.33333Z",fill:"black",fillOpacity:"0.65"}),h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.33333 0.666748C5.14924 0.666748 5 0.815986 5 1.00008V2.00013C4.01165 2.0009 3.49359 2.01346 3.09202 2.21807C2.71569 2.40982 2.40973 2.71578 2.21799 3.0921C2 3.51992 2 4.07998 2 5.20008V12.1334C2 13.2535 2 13.8136 2.21799 14.2414C2.40973 14.6177 2.71569 14.9237 3.09202 15.1154C3.51984 15.3334 4.0799 15.3334 5.2 15.3334H10.8C11.9201 15.3334 12.4802 15.3334 12.908 15.1154C13.2843 14.9237 13.5903 14.6177 13.782 14.2414C14 13.8136 14 13.2535 14 12.1334V5.20008C14 4.07998 14 3.51992 13.782 3.0921C13.5903 2.71578 13.2843 2.40982 12.908 2.21807C12.5064 2.01346 11.9883 2.0009 11 2.00013V1.00008C11 0.815986 10.8508 0.666748 10.6667 0.666748H10C9.81591 0.666748 9.66667 0.815986 9.66667 1.00008V2.00008H6.33333V1.00008C6.33333 0.815986 6.1841 0.666748 6 0.666748H5.33333ZM3.99498 3.35623C4.22961 3.33707 4.53372 3.33396 5 3.33349V4.00008C5 4.18418 5.14924 4.33341 5.33333 4.33341H6C6.1841 4.33341 6.33333 4.18418 6.33333 4.00008V3.33341H9.66667V4.00008C9.66667 4.18418 9.81591 4.33341 10 4.33341H10.6667C10.8508 4.33341 11 4.18418 11 4.00008V3.33349C11.4663 3.33396 11.7704 3.33707 12.005 3.35623C12.1292 3.36638 12.2044 3.37913 12.25 3.38988C12.2717 3.39499 12.2851 3.39927 12.2923 3.40185C12.2992 3.40432 12.3027 3.40608 12.3027 3.40608C12.4281 3.46999 12.5301 3.57198 12.594 3.69742C12.594 3.69742 12.5958 3.70087 12.5982 3.7078C12.6008 3.71502 12.6051 3.72837 12.6102 3.75008C12.621 3.79572 12.6337 3.87086 12.6438 3.99506C12.6656 4.26168 12.6667 4.61803 12.6667 5.20008V12.1334C12.6667 12.7155 12.6656 13.0718 12.6438 13.3384C12.6337 13.4626 12.621 13.5378 12.6102 13.5834C12.6051 13.6051 12.6008 13.6185 12.5982 13.6257C12.5969 13.6295 12.5958 13.632 12.5951 13.6337C12.5945 13.6351 12.594 13.6361 12.594 13.6361C12.5301 13.7615 12.4281 13.8635 12.3027 13.9274C12.3027 13.9274 12.2992 13.9292 12.2923 13.9316C12.2851 13.9342 12.2717 13.9385 12.25 13.9436C12.2044 13.9544 12.1292 13.9671 12.005 13.9773C11.7384 13.999 11.3821 14.0001 10.8 14.0001H5.2C4.61795 14.0001 4.26159 13.999 3.99498 13.9773C3.87078 13.9671 3.79563 13.9544 3.75 13.9436C3.72829 13.9385 3.71494 13.9342 3.70772 13.9316C3.70078 13.9292 3.69734 13.9274 3.69734 13.9274C3.5719 13.8635 3.46991 13.7615 3.406 13.6361C3.406 13.6361 3.40424 13.6326 3.40177 13.6257C3.39919 13.6185 3.39491 13.6051 3.38979 13.5834C3.37905 13.5378 3.3663 13.4626 3.35615 13.3384C3.33437 13.0718 3.33333 12.7155 3.33333 12.1334V5.20008C3.33333 4.61803 3.33437 4.26168 3.35615 3.99506C3.3663 3.87086 3.37905 3.79572 3.38979 3.75008C3.39491 3.72837 3.39919 3.71502 3.40177 3.7078C3.40424 3.70087 3.406 3.69742 3.406 3.69742C3.46991 3.57198 3.5719 3.46999 3.69734 3.40608C3.69734 3.40608 3.70078 3.40432 3.70772 3.40185C3.71494 3.39927 3.72829 3.39499 3.75 3.38988C3.79563 3.37913 3.87078 3.36638 3.99498 3.35623Z",fill:"black",fillOpacity:"0.65"})]})}const ze=()=>h.jsx(ee,{svg:h.jsx(We,{})});function Ye(){return h.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.00001 1.33325C4.31811 1.33325 1.33334 4.31802 1.33334 7.99992C1.33334 11.6818 4.31811 14.6666 8.00001 14.6666C11.6819 14.6666 14.6667 11.6818 14.6667 7.99992C14.6667 4.31802 11.6819 1.33325 8.00001 1.33325ZM2.66668 7.99992C2.66668 5.0544 5.05449 2.66659 8.00001 2.66659C10.9455 2.66659 13.3333 5.0544 13.3333 7.99992C13.3333 10.9454 10.9455 13.3333 8.00001 13.3333C5.05449 13.3333 2.66668 10.9454 2.66668 7.99992Z",fill:"black",fillOpacity:"0.65"}),h.jsx("path",{d:"M10.5774 5.42256C10.7058 5.551 10.7248 5.75177 10.6226 5.90174L8.94059 8.36882C8.77293 8.61474 8.64922 8.79611 8.50084 8.93411C8.33623 9.08721 8.13565 9.19632 7.91765 9.25117C7.7212 9.3006 7.50169 9.30058 7.20415 9.30054H5.33334C5.14925 9.30054 5.00001 9.15131 5.00001 8.96721V8.30054C5.00001 8.11645 5.14925 7.96721 5.33334 7.96721H7.12446C7.34737 7.96721 7.42005 7.96547 7.47857 7.95074C7.54397 7.93428 7.60415 7.90155 7.65353 7.85563C7.69773 7.81451 7.7387 7.75445 7.86425 7.57046L9.62255 4.99293C9.74585 4.81211 9.99247 4.78872 10.1457 4.94185L10.5774 5.42256Z",fill:"black",fillOpacity:"0.65"}),h.jsx("path",{d:"M8.7713 6.17157C8.98705 5.95582 9.3368 5.95582 9.55255 6.17157L10.4956 7.11462C10.7113 7.33037 10.7113 7.68012 10.4956 7.89587L9.55255 8.83891C9.3368 9.05466 8.98705 9.05466 8.7713 8.83891L7.82825 7.89587C7.6125 7.68012 7.6125 7.33037 7.82825 7.11462L8.7713 6.17157Z",fill:"black",fillOpacity:"0.65"})]})}const qe=()=>h.jsx(ee,{svg:h.jsx(Ye,{})});function Qe(){return h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:h.jsx("path",{d:"M6.67719 3.25174C4.45075 2.48478 2.06357 4.24855 2.06345 6.61273C1.2164 7.25921 0.666626 8.28994 0.666626 9.45161C0.666626 11.4113 2.23008 13 4.15869 13H11.4897C11.5315 13 11.5725 12.9963 11.6123 12.9891C13.6928 12.8354 15.3333 11.0723 15.3333 8.91935C15.3333 7.50456 14.6244 6.25874 13.5506 5.52743C13.2846 3.53512 11.6047 2 9.57139 2C8.43412 2 7.40708 2.481 6.67719 3.25174ZM6.24293 4.51237L7.05483 4.79205L7.6453 4.16855C8.13654 3.64981 8.81905 3.33333 9.57139 3.33333C10.9112 3.33333 12.048 4.34848 12.229 5.70388L12.3078 6.29421L12.8001 6.62946C13.5202 7.11991 14 7.95877 14 8.91935C14 10.3867 12.8856 11.5581 11.5141 11.6594L11.4451 11.6645L11.4331 11.6667H8.66663V7.94281L9.95952 9.2357C10.0897 9.36588 10.3007 9.36588 10.4309 9.2357L10.9023 8.7643C11.0325 8.63412 11.0325 8.42307 10.9023 8.29289L8.47136 5.86193C8.21101 5.60158 7.7889 5.60158 7.52855 5.86193L5.09759 8.29289C4.96742 8.42307 4.96741 8.63412 5.09759 8.7643L5.56899 9.2357C5.69917 9.36588 5.91022 9.36588 6.0404 9.2357L7.33329 7.94281V11.6667H4.15869C2.98649 11.6667 1.99996 10.6951 1.99996 9.45161C1.99996 8.71875 2.34528 8.07493 2.87239 7.67263L3.39675 7.27243L3.39678 6.61279C3.39686 5.12619 4.91793 4.05594 6.24293 4.51237Z",fill:"black",fillOpacity:"0.65"})})}const Je=()=>h.jsx(ee,{svg:h.jsx(Qe,{})}),ge=[{text:J("scanQRCode2Debug"),itemKey:"scan_qrcode",icon:h.jsx(Xe,{}),path:"/"},{itemKey:"project_overview",text:J("projectInfo"),icon:h.jsx(ze,{}),path:"/project_overview"},{itemKey:"integration_assistant",text:J("integrationAssistant"),icon:h.jsx(qe,{}),path:"/integration_assistant"},{itemKey:"upload_publish",text:J("codePreCheck"),icon:h.jsx(Je,{}),path:"/upload_publish"}],nt=()=>{const u=je(),t=Me(),e=s=>{const a=ge.find(i=>i.itemKey===s.itemKey);a&&u(a.path)},n=F.useMemo(()=>{const s=t.pathname;return s==="/"||["/basic_debug_guide","/network_diagnostics","/manual_connect","/launch_mode","/debug_setting"].includes(s)?"scan_qrcode":s.startsWith("/integration_assistant")?"integration_assistant":s==="/project_overview"||s==="/project_detail"?"project_overview":s==="/upload_publish"||s==="/version_upload"||s==="/precheck_code"?"upload_publish":""},[t.pathname]);return h.jsx(N,{limitIndent:!1,bodyStyle:{height:"100vh",padding:"0 12px",width:"100%",boxSizing:"border-box"},items:ge,selectedKeys:[n],onSelect:e})};export{nt as Sidebar};
@@ -0,0 +1 @@
1
+ import{u as o,j as s,T as t,i}from"./index-BvxhyFWU.js";import{m as r,M as c,C as l,o as d}from"./MonetizationModeSummary-DBtIQq9Z.js";import"./index-tOg_vZEc.js";const p=()=>{const e=o(),n=a=>i(a);return s.jsx("div",{className:"integration-assistant-page",children:s.jsxs("div",{className:"integration-assistant-map-layout",children:[s.jsx("section",{className:"integration-assistant-map-intro",children:s.jsxs("div",{className:"integration-assistant-map-intro-copy",children:[s.jsx(t.Title,{heading:2,className:"integration-assistant-title",children:i("ia.overview.title")}),s.jsx(t.Paragraph,{className:"integration-assistant-subtitle",children:i("ia.overview.desc")})]})}),s.jsxs("section",{className:"integration-assistant-mode-section integration-assistant-map-tile",children:[s.jsxs("div",{className:"integration-assistant-mode-head",children:[s.jsx(t.Title,{heading:4,className:"integration-assistant-map-section-title",children:i("ia.monetization.title")}),s.jsx(t.Paragraph,{className:"integration-assistant-section-desc",children:i("ia.monetization.desc")})]}),s.jsx("div",{className:"integration-assistant-mode-grid",children:r.map(a=>s.jsxs("button",{type:"button",className:`integration-assistant-mode-card integration-assistant-mode-card-${a.key}`,onClick:()=>e(`/integration_assistant/mode/${a.key}`),children:[s.jsx("div",{className:"integration-assistant-mode-card-title-row",children:s.jsx(t.Title,{heading:5,className:"integration-assistant-mode-card-title",children:n(a.titleKey)})}),s.jsx(c,{mode:a,compact:!0})]},a.key))})]}),s.jsxs("section",{className:"integration-assistant-overview-card integration-assistant-map-tile",children:[s.jsx("div",{className:"integration-assistant-key-intro",children:s.jsxs("div",{className:"integration-assistant-map-section-head-main",children:[s.jsx(t.Title,{heading:4,className:"integration-assistant-map-section-title",children:i("ia.overview.groups.title")}),s.jsx(t.Paragraph,{className:"integration-assistant-section-desc",children:i("ia.overview.groups.desc")})]})}),s.jsx(l,{sections:d.map(a=>({...a,sectionClassName:`integration-assistant-map-section integration-assistant-fixed-section ${a.sectionClassName}`}))})]})]})})};export{p as IntegrationAssistant};
@@ -0,0 +1 @@
1
+ import{c as b,z as k,r as t,j as e,P as D,i as a,n as y,af as F,e as A,T as m,d as E,ag as I}from"./index-BvxhyFWU.js";import{I as x,F as g}from"./baseForm-BFkpAlns.js";import"./times-C1GmugF6.js";import"./index-CRAXXzpR.js";const B=()=>{const{state:{user:f}}=b(),r=k(f),[h,i]=t.useState(!1),[j,l]=t.useState(!1),[v,c]=t.useState(""),[d,n]=t.useState(""),p=t.useRef(null),u=()=>{l(!1),n(""),c("")},C=()=>{i(!1),u(),p.current?.formApi?.reset?.()},S=()=>{r&&i(!0)},N=s=>{const o=s;if(o?.code===0)I.success({title:a("uploadPlatformSuccess"),content:e.jsxs(e.Fragment,{children:[e.jsx("div",{children:a("uploadPlatformDesc")}),e.jsx("div",{style:{marginTop:12,display:"flex",justifyContent:"flex-end"},children:e.jsx(m.Text,{link:!0,onClick:()=>{window.open(o?.data?.detail,"_blank")},children:a("viewOnPlatform")})})]}),duration:10}),i(!1),u();else{const U=o?.error?.StatusMessage||o?.detail||a("uploadPlatformFailed");n(U),l(!1)}},T=s=>{const o=s?.error?.StatusMessage||s?.response?.detail||s?.message||a("uploadPlatformFailed");n(o),l(!1)},P=()=>{l(!0),E({method:"POST",url:"/game/upload",headers:{"ttmg-game-desc":encodeURIComponent(v||"--")}}).then(s=>{N(s)}).catch(s=>{T(s)})};return e.jsxs(e.Fragment,{children:[e.jsx(D,{content:()=>r?null:e.jsx("div",{className:"uploader-login-tip",children:a("loginToUpload")}),children:e.jsxs("div",{className:y("resource-uploader",{"resource-uploader-disabled":!r}),onClick:S,children:[e.jsx(x,{size:"default"}),e.jsx("div",{className:"uploader-text",children:a("upload")})]})}),e.jsx(F,{footer:null,visible:h,onCancel:C,title:a("uploadToPlatform"),children:e.jsxs("div",{className:"uploader-modal-content",children:[j&&e.jsx("div",{className:"upload-loading-container",children:e.jsx("div",{className:"loading-spin",children:e.jsx(A,{size:"large"})})}),d&&e.jsx(m.Text,{style:{color:"red",marginBottom:12,marginTop:12},children:d}),e.jsxs(g,{ref:p,onChange:({values:s})=>{c(s?.gameDescription||"--"),n("")},children:[e.jsx(g.TextArea,{label:a("gameAssetDescription"),placeholder:a("gameAssetDescription"),field:"gameDescription"}),e.jsxs("div",{className:"uploader-button-container",onClick:P,children:[e.jsx(x,{className:"uploader-button-icon"}),e.jsx("div",{className:"uploader-button-text",children:a("uploadGamePackageTip")})]})]})]})})]})};export{B as GameUploader};
@@ -0,0 +1 @@
1
+ import{u as t,r as a,j as e,b as c,i as o,H as r,M as i}from"./index-BvxhyFWU.js";const d=()=>{const n=t();return a.useEffect(()=>{const s=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=s}},[]),e.jsxs("div",{className:"manual-connect-container",children:[e.jsx("div",{className:"manual-connect-back",children:e.jsx(c,{className:"devtool-page-back",theme:"borderless",onClick:()=>n("/network_diagnostics"),children:o("back")})}),e.jsx(r,{title:o("netDiagManualBindEntry"),children:e.jsx(i,{onClose:()=>n("/network_diagnostics"),onSuccess:()=>n("/network_diagnostics")})})]})};export{d as ManualConnect};
@@ -0,0 +1 @@
1
+ import{r as a,j as e,T as l,i,S as R,a as S,u as C,B as z,b as M,c as L,d as F,e as B,g as O,f as A}from"./index-BvxhyFWU.js";var G=Object.defineProperty,Z=Object.getOwnPropertySymbols,U=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable,w=(r,t,s)=>t in r?G(r,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):r[t]=s,V=(r,t)=>{for(var s in t||(t={}))U.call(t,s)&&w(r,s,t[s]);if(Z)for(var s of Z(t))W.call(t,s)&&w(r,s,t[s]);return r};function H(r){return a.createElement("svg",V({width:200,height:200,viewBox:"0 0 200 200",fill:"none",xmlns:"http://www.w3.org/2000/svg",focusable:!1,"aria-hidden":!0},r),a.createElement("rect",{width:200,height:200,fill:"transparent"}),a.createElement("path",{d:"M74.7 78.6c20.78-6.32 57.55-12.26 71.81-9.86 4.21.7 8.12 1.98 11.36 3.42-.51-1.69-.95-3.5-1.38-5.3l-.04-.18c-1.03-4.27-2.05-8.44-3.95-10.55-4.8-5.32.67-10.12.67-10.12l.93-10.53c13.02 4.82 21.65 14.92 27 25.08 4.57 8.67 6.75 17.37 7.25 22.89 1.06 12-8.18 18.86-19.2 18.86-9.74 0-18.36-1.64-24.81-3.1.64 2.18 5.44 19.18 7.53 32.66l-46.15.58-7.58-14.68-4.66-12.26c-19.46 7.46-50.77 19.02-64.9 18.44-10.35-.42-15.68-15.68-17.44-28.7a71.55 71.55 0 0 1-.67-9.4c0-5.64.3-12.18 2.22-17.89.74-2.21 1.73-4.3 3.04-6.17a18.1 18.1 0 0 1 4.6-4.59c0 4-1.02 13.54 2.8 14.12 5.06.78 10.4-9.08 13.85-7.06 3.87 2.27-1.65 16.34-1.33 17.2.27.7.53 1.4.76 2.07a48.99 48.99 0 0 1 2.25 8.55C46.59 87.56 60 83.06 74.69 78.6Z",fill:"white"}),a.createElement("path",{d:"M181.1 60.56c4.57 8.67 6.75 17.37 7.25 22.89 1.06 12-8.18 18.86-19.2 18.86-9.74 0-18.36-1.64-24.81-3.1m36.77-38.65c-5.36-10.16-13.99-20.26-27-25.08l-.94 10.53s-5.46 4.8-.67 10.12c1.9 2.11 2.92 6.28 3.95 10.55m24.66-6.12c-6-.37-18.32.8-24.66 6.12m0 0c1.57 6.53 3.15 13.3 7.91 13.3 7.2 0-3.6-8.84-17.85-11.24-14.25-2.4-51.03 3.54-71.82 9.86-20.78 6.32-39.04 12.71-42.77 19.1-3.63 6.23 13.24 10.92 4.49-14.17m0 0c-.23-.67-.49-1.36-.76-2.08-.32-.85 5.2-14.92 1.33-17.19-3.45-2.02-8.8 7.84-13.85 7.06-3.82-.58-2.8-10.12-2.8-14.12a18.1 18.1 0 0 0-4.6 4.6M36.4 83.52c-7.27 1.58-21.92 8.1-25.27 11.73m0 0a71.55 71.55 0 0 1-.67-9.41c0-5.64.3-12.18 2.22-17.89m-1.55 27.3c1.76 13 7.09 28.27 17.45 28.7 14.12.57 45.43-10.99 64.89-18.45l4.66 12.26 7.58 14.68 46.15-.58c-2.09-13.48-6.89-30.48-7.53-32.67M15.73 61.8c-.98 3-1.08 5.5.19 7.8m-.2-7.8a24.08 24.08 0 0 0-3.03 6.16m0 0a5.43 5.43 0 0 0 1.25 4.22m130.4 27.02c-.9-3.08-3.12-9.95-4.76-12.76",stroke:"#515151"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m156.89 15.66-2.04 27.96 2.57 28.1c-7.51-3.07-13.32-4.34-27.25-3.36-11.94.83-31.75 3.95-46.23 7.62-16.66 4.27-37.81 11.64-45.21 15.9-.77-4.64-2.92-10.15-2.92-10.15-.07-.7 2.63-8.32 2.73-13.06.08-3.08-.91-4.45-2.33-4.75a3.47 3.47 0 0 0-2.05.35c-.63.32-.86.48-1.38.84-1.34.98-2.38 2.02-3.95 3.34a17.14 17.14 0 0 1-3.04 2.17 4.6 4.6 0 0 1-2.89.63c-.63-.1-1.21-.47-1.71-1.58l-.07-.89c-.5-5.79-2.7-20.12-2.7-34.91 0-7.74 1.61-10.04 2.7-11.59l.13-.18c3.85-5.53 13.67-6.75 23.12-6.96 2.5-.14 5.2-.2 8.1-.17l.11.15H53.15l-.52.07 18.32 25.49-3.62 14.08 10.2 15.98-2.84-16.49 10-11.99-3.5-27.7s8.78-.5 19.47-1.77c10.69-1.28 18.47-1.9 29.42-1.83 1.64.01 3.4.1 5.23.22 9.64.65 18.55 2.56 21.46 4.4l.13.09h-.01Z",fill:"var(--semi-color-primary-light-default)"}),a.createElement("path",{d:"M143 27.91a1.38 1.38 0 0 1 1.77-.85c.5.18.98.41 1.44.71a1.38 1.38 0 0 1-1.53 2.31c-.26-.17-.53-.3-.82-.4a1.38 1.38 0 0 1-.85-1.77Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M140.65 28.12c.21.74-.21 1.5-.95 1.72-.36.1-.73.22-1.11.36a1.38 1.38 0 1 1-.95-2.6c.43-.16.87-.3 1.3-.43.74-.2 1.5.22 1.71.95Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M134.74 30.4c.37.67.14 1.51-.53 1.89l-1.07.62a1.38 1.38 0 1 1-1.41-2.38l1.12-.65a1.38 1.38 0 0 1 1.89.52Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M97.86 31.43h.76a1.38 1.38 0 1 1-.06 2.77h-.52a6.7 6.7 0 0 0-.57.1 1.38 1.38 0 0 1-.64-2.68c.33-.08.64-.14.94-.18l.09-.01Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M147.78 31.75c.73-.23 1.5.19 1.72.92.13.43.25.88.35 1.35a1.38 1.38 0 0 1-2.7.58c-.1-.4-.19-.78-.3-1.13-.22-.73.2-1.5.93-1.72Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M102.27 33.13c.19-.75.94-1.2 1.68-1.01.45.11.89.23 1.3.37a1.38 1.38 0 0 1-.84 2.63c-.36-.11-.73-.22-1.13-.32a1.38 1.38 0 0 1-1-1.67Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M129.3 33.68c.42.64.25 1.5-.4 1.92l-.52.34-.53.36a1.38 1.38 0 0 1-1.53-2.31l.32-.21.21-.14.3-.2.23-.15c.64-.42 1.5-.25 1.92.39Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M108.25 35.22c.36-.67 1.2-.92 1.88-.55a246.5 246.5 0 0 1 1.11.61 1.38 1.38 0 0 1-1.33 2.43l-.5-.28h-.01l-.6-.34a1.38 1.38 0 0 1-.55-1.87Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M92.83 35.77c.76-.01 1.4.6 1.4 1.36.01.16.03.34.07.55a1.38 1.38 0 1 1-2.7.58 5.62 5.62 0 0 1-.13-1.08c-.01-.76.6-1.4 1.36-1.4Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M124 37.2c.31.7 0 1.51-.7 1.82a6.07 6.07 0 0 1-1.44.45 1.38 1.38 0 1 1-.67-2.68l.58-.16c.1-.03.24-.07.42-.15.7-.3 1.51.02 1.82.72Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M113.9 38.14c.15-.75.89-1.22 1.63-1.06.35.07.72.13 1.1.16a1.38 1.38 0 0 1-.26 2.76c-.49-.05-.96-.12-1.41-.22a1.38 1.38 0 0 1-1.07-1.64Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M148.98 37.95c.76-.01 1.4.6 1.4 1.36a38.45 38.45 0 0 1 0 1.42 1.38 1.38 0 0 1-2.77-.08 24.28 24.28 0 0 0 0-1.3c0-.76.6-1.39 1.37-1.4Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M148.6 44.88c.75.16 1.22.9 1.06 1.65-.1.47-.22.94-.34 1.41a1.38 1.38 0 1 1-2.68-.7c.12-.43.22-.87.31-1.3.17-.75.9-1.22 1.65-1.06Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M146.69 51.6c.7.31 1 1.13.7 1.83-.2.44-.41.88-.63 1.31a1.38 1.38 0 0 1-2.48-1.24c.2-.4.4-.8.58-1.2.31-.7 1.13-1.01 1.83-.7Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M41.67 55.45c.07.77-.5 1.44-1.25 1.5-.43.04-.86.1-1.26.19a1.38 1.38 0 1 1-.54-2.72c.5-.1 1.02-.17 1.55-.22.76-.07 1.43.5 1.5 1.25Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M44.58 55.78c.22-.73 1-1.15 1.72-.93l.74.23a1.38 1.38 0 1 1-.9 2.62l-.62-.2a1.38 1.38 0 0 1-.94-1.72Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M91.9 56.9c.05.76-.52 1.42-1.29 1.47-.44.02-.89.06-1.32.11a1.38 1.38 0 0 1-.31-2.75c.48-.05.96-.1 1.45-.13.77-.05 1.42.53 1.47 1.3Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M94.72 56.95c.07-.76.74-1.33 1.5-1.26l1.43.14a1.38 1.38 0 0 1-.32 2.75c-.45-.05-.9-.1-1.35-.13a1.38 1.38 0 0 1-1.26-1.5Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M101.64 57.83c.16-.75.9-1.22 1.64-1.07l1.39.31a1.38 1.38 0 1 1-.62 2.7l-1.34-.3a1.38 1.38 0 0 1-1.07-1.64Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M34.85 57.26c.48.6.39 1.46-.2 1.94-.33.27-.63.55-.9.84a1.38 1.38 0 0 1-2.03-1.89c.36-.39.76-.75 1.18-1.1.6-.48 1.46-.39 1.95.2Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M85 57.9c.29.71-.06 1.51-.78 1.8a15.8 15.8 0 0 0-1.26.54 1.38 1.38 0 1 1-1.15-2.52 71.64 71.64 0 0 1 1.4-.6c.71-.28 1.52.07 1.8.78Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M143.4 57.76c.61.47.72 1.34.26 1.95-.3.39-.62.77-.94 1.14a1.38 1.38 0 0 1-2.09-1.81 24 24 0 0 0 .84-1.03c.47-.6 1.33-.71 1.94-.25Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M108.43 59.46c.22-.74.99-1.15 1.72-.93l1.35.41a1.38 1.38 0 1 1-.82 2.64l-1.32-.4a1.38 1.38 0 0 1-.93-1.72Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M115.08 61.58a1.38 1.38 0 0 1 1.77-.82l1.32.48a1.38 1.38 0 0 1-.97 2.6c-.43-.17-.87-.33-1.3-.48a1.38 1.38 0 0 1-.82-1.78Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M138.67 62.89c.42.64.25 1.5-.4 1.92-.41.27-.85.54-1.29.78a1.38 1.38 0 0 1-1.32-2.43c.37-.2.73-.43 1.1-.66.63-.42 1.49-.25 1.91.39Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M30.5 62.78c.77.07 1.33.74 1.26 1.5l-.03.59.01.75-1.6 1.4a1.38 1.38 0 0 1-1.16-1.32l-.02-.83c0-.28.02-.56.04-.84.07-.76.75-1.32 1.5-1.25Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M121.6 64.07c.3-.7 1.1-1.04 1.8-.75a146.8 146.8 0 0 1 1.26.52 1.38 1.38 0 1 1-.97 2.59 19.62 19.62 0 0 1-1.35-.55c-.7-.3-1.04-1.1-.74-1.81Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M72.11 64.94c.48.6.4 1.47-.2 1.95-.38.3-.74.62-1.09.92A1.38 1.38 0 1 1 69 65.73c.37-.33.76-.66 1.17-.99.59-.48 1.46-.39 1.94.2Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M132.4 65.92c.09.76-.46 1.44-1.22 1.53-.5.05-1.02.08-1.53.09a1.38 1.38 0 1 1-.02-2.77c.42 0 .84-.03 1.25-.07.76-.09 1.44.46 1.53 1.22Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M66.66 69.9c.57.52.6 1.4.09 1.96l-.73.8-.02.02-.16.18-.08.09a1.38 1.38 0 0 1-2.05-1.86l.25-.28.75-.82c.51-.56 1.39-.6 1.95-.09Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M61.6 75.28c.45.61.31 1.48-.3 1.93-.44.31-.88.61-1.36.89a1.38 1.38 0 1 1-1.4-2.4c.4-.22.77-.46 1.12-.72a1.38 1.38 0 0 1 1.94.3Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M37.67 75.97c.42.19.86.37 1.35.53a1.38 1.38 0 0 1-.89 2.62c-.56-.19-1.1-.4-1.6-.63l.72-2.63c.14.01.28.05.42.11Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M55.05 78.57c.12.75-.4 1.46-1.15 1.58-.5.08-1 .15-1.54.2a1.38 1.38 0 1 1-.28-2.75c.49-.05.95-.11 1.39-.18.75-.12 1.46.4 1.58 1.15Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M43.4 78.87c.06-.76.73-1.33 1.49-1.27a38.43 38.43 0 0 0 1.5.1 1.38 1.38 0 1 1-.12 2.76 62.94 62.94 0 0 1-1.6-.1 1.38 1.38 0 0 1-1.27-1.49Z",fill:"var(--semi-color-primary)"}),a.createElement("g",{clipPath:"url(#clip_failure_96_39_65)"},a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M30.9 46.87a13.45 13.45 0 0 1 9.37-16.53 13.46 13.46 0 0 1 16.52 9.39c2.64 9.56-4.76 29.27-5.14 29.9a.75.75 0 0 1-.99.27c-.64-.34-17.11-13.47-19.76-23.03Zm14.36 1.54a6.1 6.1 0 0 1-3.25-11.75 6.1 6.1 0 0 1 3.25 11.75Z",fill:"var(--semi-color-primary)"})),a.createElement("path",{d:"M102.31 100.69c-2.8 1.55-5.63 2.85-9.36 4.58l1.48 3.92c2.14-.96 6.16-6.03 7.88-8.5Z",fill:"#515151"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M121 63.04c8.85 2.1 12.43-6.5 13.12-8.77.68-2.27-5.6-11.86-8-11.2l-.42.12-.23.06c-3.1.82-11.15 2.94-12.35 8-1.3 5.46 2.4 10.49 7.88 11.79Z",fill:"#515151"}),a.createElement("path",{d:"M134.5 64.73c-.43.47-1.2.74-2.33.73a12.7 12.7 0 0 1-4.06-.86 31.25 31.25 0 0 1-9.94-6.22c-3.25-2.97-5.97-5.8-7.59-8.42-1.61-2.61-2.05-4.88-.98-6.84a3.7 3.7 0 0 1 2.11-1.86 4.53 4.53 0 0 1 2.9.15c2.16.76 4.57 2.83 6.48 6.02 3.4 5.63 6.89 8.23 9.7 10.33.49.35.95.7 1.38 1.03a7.29 7.29 0 0 1 2.61 3.48c.34 1.1.16 1.97-.28 2.46Z",fill:"white",stroke:"#515151"}),a.createElement("mask",{id:"mask_failure_130_526","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:98,y:44,width:36,height:27},a.createElement("path",{d:"M130.53 62.1c-.5-3.3-9.52-14.75-16.08-15.03l-12.68 4.52 6.47 14.16 17.25 3.07c1.84-1.14 5.43-4.07 5.04-6.72Z",fill:"#C4C4C4"})),a.createElement("g",{mask:"url(#mask_failure_130_526)"},a.createElement("path",{d:"M127.2 63.62a9.74 9.74 0 0 1-13.76.5 9.74 9.74 0 0 1-.32-13.77 9.74 9.74 0 0 1 13.77-.5 9.74 9.74 0 0 1 .32 13.77Z",fill:"white",stroke:"#515151"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m116.79 47.35-.02.37c2.86.5 8.57 2.59 8.58 6.87 0 5.36-7.44 9.34-14.47 3.46-.34-.28-.66-.53-.95-.74a10.09 10.09 0 0 0 3.17 7.17 10.24 10.24 0 0 0 14.47-.52 10.24 10.24 0 0 0-.34-14.47 10.16 10.16 0 0 0-10.44-2.14Z",fill:"#515151"}),a.createElement("path",{d:"M119.34 55a.79.79 0 1 0-1.1-1.12.79.79 0 0 0 1.1 1.12Z",fill:"#515151"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M119.98 50.72c.21-.09.45.01.54.22a7.87 7.87 0 0 0 1.84 2.65.41.41 0 1 1-.55.62 8.67 8.67 0 0 1-2.05-2.95.41.41 0 0 1 .22-.54Z",fill:"#515151"}),a.createElement("path",{d:"M114.85 52.4a.79.79 0 1 0-1.1-1.1.79.79 0 0 0 1.1 1.1Z",fill:"#515151"}),a.createElement("mask",{id:"path-18-inside-1",fill:"white"},a.createElement("ellipse",{rx:2.97818,ry:2.97818,transform:"matrix(0.727696 0.6859 -0.685903 0.727693 128.435 60.0508)"})),a.createElement("ellipse",{rx:2.97818,ry:2.97818,transform:"matrix(0.727696 0.6859 -0.685903 0.727693 128.435 60.0508)",fill:"white"}),a.createElement("path",{d:"m128.42 60.04.01-.01a.03.03 0 0 1 .02 0l-4.12 4.37a5.98 5.98 0 0 0 8.45-.25l-4.36-4.11Zm.03 0v.02l-4.37-4.11a5.98 5.98 0 0 0 .25 8.45l4.12-4.37Zm0 .03h-.01a.03.03 0 0 1-.02 0l4.12-4.37a5.98 5.98 0 0 0-8.46.25l4.37 4.12Zm-.03 0v-.03l4.37 4.11a5.98 5.98 0 0 0-.25-8.45l-4.12 4.37Z",fill:"#515151",mask:"url(#path-18-inside-1)"})),a.createElement("path",{d:"M145.63 40.19c1.37-2.75 12.75 2.35 16.14 6.78 3.38 4.43 1.48 10.74-1.9 9.68-6.69-2.12-7.56-6.7-7.94-9.48-1.2-1.85-7.67-4.24-6.3-6.98Z",fill:"white",stroke:"#515151"}),a.createElement("path",{d:"m158.95 41.56 6.64 2.52 1.66 12.47-8.3 1.98-3.47-12.03 3.47-4.94Z",fill:"white"}),a.createElement("path",{d:"M167.3 151.94c5.19 1.66 23.35 35.57 19.05 35.57-13.86 0-34.5.53-71.42.53-15.63 0-17.9-5.16-11.79-22.08a353.23 353.23 0 0 1 6.14-15.76l32.5 1.26c-.43 1.53-.91 3.07-1.38 4.4a26.82 26.82 0 0 1 8.73-1.47c5.27 0 7.04 1.4 11.77 0 2.13-.62 4.8-2.97 6.4-2.45Z",fill:"white",className:""}),a.createElement("path",{d:"M140.4 155.87c.47-1.34.95-2.88 1.38-4.4l-32.5-1.27a353.23 353.23 0 0 0-6.14 15.76c-6.1 16.92-3.84 22.08 11.79 22.08 36.93 0 57.56-.53 71.42-.53 4.3 0-13.86-33.91-19.06-35.57-1.6-.52-4.26 1.83-6.4 2.45-4.72 1.4-6.5 0-11.76 0-3.08 0-6.06.55-8.72 1.48Zm0 0a26.67 26.67 0 0 1-4.44 8.38c-1.7 2.22-3.99 4.43-5.43 4.33-1.44-.1-1.42-3.18 0-5.66 1.97-3.44 6.45-5.87 9.88-7.05Z",stroke:"#1C1F23",className:""}),a.createElement("path",{d:"M149.25 131.7s3.36 19.46-12.34 21.04c-11.53 1.15-40.77-4.55-53.76-7.79 4.72 12.82 9.61 39.86 7 42.16-3.33 2.93-47.55 1.76-55.96 0-8.42-1.75 13.82-11.46 15.45-14.66 2.99-5.84-5.48-21.18-5.75-45.45-.27-24.27 18.18-24.86 34.47-21.64 13.02 2.57 41.63 18.33 52.56 26.86l18.33-.52Z",fill:"white",stroke:"#515151"}),a.createElement("path",{d:"M141.5 153.87c-3.11 2.55-27.72 5-35.58 3.53l2.75-6.8c20.23 2.85 28.08 3.34 33.46 1.16l-.63 2.11Z",fill:"#515151",className:"__web-inspector-hide-shortcut__"}),a.createElement("path",{d:"M141.5 153.87c-3.11 2.55-27.72 5-35.58 3.53l2.75-6.8c20.23 2.85 28.08 3.34 33.46 1.16l-.63 2.11Z",fill:"#515151"}),a.createElement("path",{d:"M126.02 142.7c-3.1-2.99-4.99-7.5-4.16-12.35",stroke:"#515151"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M130.6 95.65c-9.03-10.98-18.97-19.74-25.5-24.56l1.63-2.22c6.7 4.95 16.81 13.86 26 25.02 9.18 11.16 17.54 24.67 20.59 38.83l-2.7.59c-2.91-13.56-10.97-26.67-20.02-37.66Z",fill:"#515151"}),a.createElement("path",{d:"m149.12 107.09-16.36 13.2 22.27 17.8 8.87-19.19c-.14-3.93-2.34-5.34-5.83-4.66l-3.12-2.5c.08-3.5-2.18-5.64-5.83-4.65Z",fill:"#E6E8EA"}),a.createElement("path",{d:"m148.24 128.62 9.45-14.34-2.91-2.33-10.94 13.07 4.4 3.6Z",stroke:"#515151"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M143.67 127.98a6.93 6.93 0 1 1-10.82-8.65 6.93 6.93 0 0 1 10.82 8.65Zm12.28 9.82a6.93 6.93 0 1 1-10.82-8.66 6.93 6.93 0 0 1 10.82 8.66Z",fill:"#515151"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m133.43 123.46 9.21-1.8.32 1.61-9.2 1.81-.33-1.62Z",fill:"white"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m145.5 133.11 9.21-1.8.32 1.62-9.2 1.8-.33-1.62Z",fill:"white"}),a.createElement("defs",null,a.createElement("clipPath",{id:"clip_failure_96_39_65"},a.createElement("rect",{width:44.4004,height:44.4627,transform:"matrix(0.963965 -0.266028 0.266198 0.963918 18.4214 34.6221)",fill:"white"}))))}var q=H;const K=({packages:r})=>e.jsx("div",{children:r.map(({name:t,size:s},c)=>{const n=(s/1024/1024).toFixed(2)+"MB",d=s<=4*1024*1024;return e.jsxs("div",{style:{display:"flex",alignItems:"center",padding:"2px 8px",borderRadius:6,backgroundColor:d?"#E8F5E9":"#FCE4EC",marginBottom:c===r.length-1?0:8,width:"fit-content"},children:[e.jsxs(l.Text,{style:{fontWeight:600,fontSize:14},children:[t,":"]}),e.jsx(l.Text,{style:{color:d?"#4CAF50":"#F44336",fontWeight:600},children:n}),e.jsx(l.Text,{type:"tertiary",style:{marginLeft:8},children:d?i("notExceedIndependentPkgSizeLimit",{limit:"4MB"}):i("exceedIndependentPkgSizeLimit",{limit:"4MB"})})]},t)})}),Y=({size:r,limit:t})=>{const s=(r/1024/1024).toFixed(2)+"MB",c=r<=t*1024*1024,n=c?i("notExceedSizeLimit",{limit:t+"MB"}):i("exceedSizeLimit",{limit:t+"MB"});return e.jsxs("div",{style:{display:"flex",alignItems:"center",width:"fit-content",padding:"2px 8px",borderRadius:6,backgroundColor:c?"#E8F5E9":"#FCE4EC"},children:[e.jsx(l.Text,{style:{fontWeight:600,color:c?"#4CAF50":"#F44336"},children:s}),e.jsx(l.Text,{type:"tertiary",style:{marginLeft:8},children:n})]})},X=({packages:r,limit:t})=>{const s=r.find(m=>m.type==="main")?.size,c=(s/1024/1024).toFixed(2)+"MB",n=s<=t*1024*1024,d=n?i("notExceedMainPkgSizeLimit",{limit:t+"MB"}):i("exceedMainPkgSizeLimit",{limit:t+"MB"});return e.jsxs("div",{style:{display:"flex",alignItems:"center",padding:"2px 8px",width:"fit-content",borderRadius:6,backgroundColor:n?"#E8F5E9":"#FCE4EC"},children:[e.jsx(l.Text,{style:{fontWeight:600,color:n?"#4CAF50":"#F44336"},children:c}),e.jsx(l.Text,{type:"tertiary",style:{marginLeft:8},children:d})]})},$=({domains:r=[]})=>r?.length?e.jsx(R,{className:"trusted-domain-list",style:{flexWrap:"wrap"},children:r.map(t=>e.jsx(S,{className:"trusted-domain-tag",children:t},t))}):e.jsx("div",{className:"project-detail-warning",children:e.jsx(l.Text,{className:"project-detail-warning-text",children:i("trustDomainEmptyTip")})}),J=({termsOfServiceLink:r})=>{const t=i("termsLabel");return r?e.jsxs("div",{className:"terms-privacy-item",children:[e.jsx(l.Text,{type:"tertiary",className:"terms-privacy-label",children:t}),e.jsx("a",{className:"terms-privacy-value",href:r,title:r,target:"_blank",rel:"noreferrer",children:r})]}):e.jsxs("div",{className:"terms-privacy-item",children:[e.jsx(l.Text,{type:"tertiary",className:"terms-privacy-label",children:t}),e.jsx("div",{className:"project-detail-warning",children:e.jsx(l.Text,{className:"project-detail-warning-text",children:i("termsOfServiceEmptyTip")})})]})},Q=({privacyPolicyLink:r})=>{const t=i("privacyLabel");return r?e.jsxs("div",{className:"terms-privacy-item",children:[e.jsx(l.Text,{type:"tertiary",className:"terms-privacy-label",children:t}),e.jsx("a",{className:"terms-privacy-value",href:r,title:r,target:"_blank",rel:"noreferrer",children:r})]}):e.jsxs("div",{className:"terms-privacy-item",children:[e.jsx(l.Text,{type:"tertiary",className:"terms-privacy-label",children:t}),e.jsx("div",{className:"project-detail-warning",children:e.jsx(l.Text,{className:"project-detail-warning-text",children:i("privacyPolicyEmptyTip")})})]})},ee=({logo:r,placeholder:t})=>{if(!r?.trim())return e.jsx("div",{className:"project-detail-warning",children:e.jsx(l.Text,{className:"project-detail-warning-text",children:i("gameIconEmptyTip")})});const[s,c]=a.useState(!1);return e.jsxs("div",{style:{width:100,height:100,borderRadius:4,overflow:"hidden",position:"relative",background:"#f0f0f0",display:"flex",alignItems:"center",justifyContent:"center"},children:[!s&&(t||e.jsx("div",{style:{width:"100%",height:"100%",background:"#e0e0e0",display:"flex",alignItems:"center",justifyContent:"center",color:"#aaa",fontSize:14}})),e.jsx("img",{src:r,alt:"logo",style:{width:"100%",height:"100%",borderRadius:4,objectFit:"cover",position:"absolute",top:0,left:0,opacity:s?1:0,transition:"opacity 0.3s"},onLoad:()=>c(!0)})]})},ae=({description:r})=>r?e.jsx(l.Text,{style:{fontSize:14},children:r}):e.jsx("div",{className:"project-detail-warning",children:e.jsx(l.Text,{className:"project-detail-warning-text",children:i("gameDescEmptyTip")})}),re="https://bytedance.larkoffice.com/wiki/PeIawT4M4ia9R8kYyLMcjwHknOg",te=({errorMsg:r,errorState:t="unknown"})=>{const s=C(),c=t==="notLoggedIn"||t==="loginExpired",n=t==="noPermission",d=c?"projectInfo.error.login.title":n?"projectInfo.error.permission.title":"projectInfo.error.general.title",m=c?"projectInfo.error.login.desc":n?"projectInfo.error.permission.desc":"projectInfo.error.general.desc",v=c?["projectInfo.error.login.stepLogin","projectInfo.error.login.stepRestart","projectInfo.error.login.stepProxy"]:n?["projectInfo.error.permission.stepCheckAccount","projectInfo.error.permission.stepApply","projectInfo.error.permission.stepRestart"]:["projectInfo.error.general.stepCheck","projectInfo.error.general.stepRetry"],g=()=>{window.open(re,"_blank","noopener,noreferrer")};return e.jsxs("div",{className:"error-display",children:[e.jsx(z,{className:"error-display-banner",type:"info",closeIcon:null,description:e.jsxs("div",{className:"error-display-banner-content",children:[e.jsx(l.Text,{strong:!0,children:i(d)}),e.jsx(l.Text,{children:i(m)})]})}),e.jsxs("div",{className:"error-display-panel",children:[e.jsxs("div",{className:"error-display-hero",children:[e.jsx("div",{className:"error-display-hero-illustration",children:e.jsx(q,{})}),e.jsxs("div",{className:"error-display-hero-copy",children:[e.jsx(l.Title,{heading:4,children:i("projectInfo.error.guideTitle")}),e.jsx(l.Paragraph,{className:"error-display-main-text",children:r})]})]}),e.jsxs("div",{className:"error-display-guide-grid",children:[e.jsxs("section",{className:"error-display-guide-card",children:[e.jsx(l.Text,{strong:!0,children:i("projectInfo.error.stepTitle")}),e.jsx("div",{className:"error-display-step-list",children:v.map((f,u)=>e.jsxs("div",{className:"error-display-step-item",children:[e.jsx("span",{className:"error-display-step-index",children:u+1}),e.jsx(l.Text,{children:i(f)})]},f))}),c?e.jsxs("div",{className:"error-display-command-list",children:[e.jsxs("div",{className:"error-display-command-item",children:[e.jsx(l.Text,{type:"tertiary",children:i("projectInfo.error.commandLogin")}),e.jsx("code",{children:"ttmg login"})]}),e.jsxs("div",{className:"error-display-command-item",children:[e.jsx(l.Text,{type:"tertiary",children:i("projectInfo.error.commandRestart")}),e.jsx("code",{children:"ttmg dev"})]}),e.jsxs("div",{className:"error-display-command-item",children:[e.jsx(l.Text,{type:"tertiary",children:i("projectInfo.error.commandProxy")}),e.jsx("code",{children:"ttmg config set proxy http://127.0.0.1:7890"}),e.jsx(l.Text,{type:"tertiary",className:"error-display-command-hint",children:i("projectInfo.error.commandProxyHint")})]})]}):null]}),e.jsxs("section",{className:"error-display-guide-card",children:[e.jsx(l.Text,{strong:!0,children:i("projectInfo.error.helpTitle")}),e.jsx(l.Paragraph,{className:"error-display-help-text",children:c?i("projectInfo.error.helpLoginDesc"):n?i("projectInfo.error.helpPermissionDesc"):i("projectInfo.error.helpGeneralDesc")}),c?e.jsxs("div",{className:"error-display-actions",children:[e.jsx(M,{theme:"light",onClick:()=>s("/basic_debug_guide"),children:i("basicDebugGuide.entryAction")}),e.jsx(M,{theme:"solid",type:"primary",onClick:g,children:i("projectInfo.error.openProxyDoc")})]}):null]})]})]})]})},E=({label:r,children:t,wide:s=!1})=>e.jsxs("div",{className:`game-detail-field ${s?"game-detail-field-wide":""}`,children:[e.jsx(l.Text,{type:"tertiary",className:"game-detail-field-label",children:r}),e.jsx("div",{className:"game-detail-field-value",children:t})]}),ie=()=>{const{state:{gameDetail:r,user:t,packages:s,engine:c},setGameDetail:n}=L(),[d,m]=a.useState(!0),[v,g]=a.useState(!1),[f,u]=a.useState(""),[T,b]=a.useState("unknown"),N=({errorCode:p,errorMsg:h,clientKey:j})=>{m(!1),g(!0),b(O({errorCode:p,user:t})),u(A({errorCode:p,errorMsg:h,clientKey:j,user:t}))};a.useEffect(()=>{if(r&&!r.has_error){m(!1);return}r?.has_error&&(g(!0),N({errorCode:r.error_code,errorMsg:r.error_msg,clientKey:r.client_key})),F({url:"/game/detail",method:"GET"}).then(p=>{if(p?.error)m(!1),N(p.error);else{const{data:h}=p;n(h),m(!1)}})},[]);const o=a.useMemo(()=>{if(!r||r?.has_error)return null;const{size:p,request_allowed_domains:h}=r,j=c==="unity",y=s?.length>0?s:r.packages??[],k=y.reduce((x,D)=>x+(D?.size??0),0)||p,_=j?60:30,I=y.filter(x=>x.type==="independent"),P=y.some(x=>x.type==="main");return{isUnity:j,packageList:y,projectSize:k,projectSizeLimit:_,independentPackages:I,hasMainPackage:P,domains:h}},[c,r,s]);return d&&!r?e.jsx("div",{className:"game-detail-loading-container",children:e.jsx(B,{size:"large"})}):v?e.jsx(te,{errorMsg:f,errorState:T}):!r||!o?null:e.jsx("div",{className:"game-detail-container",children:e.jsxs("div",{className:"game-detail-page",children:[e.jsxs("section",{className:"game-detail-intro",children:[e.jsx(l.Paragraph,{className:"game-detail-page-desc",children:i("projectInfoDesc")}),e.jsx(l.Paragraph,{className:"game-detail-page-desc",children:i("projectInfoDescTip")})]}),e.jsxs("section",{className:"game-detail-panel",children:[e.jsx("div",{className:"game-detail-panel-head",children:e.jsx(l.Text,{strong:!0,children:i("projectInfo.section.basic")})}),e.jsxs("div",{className:"game-detail-basic-hero",children:[e.jsx("div",{className:"game-detail-logo-shell game-detail-logo-shell-basic",children:e.jsx(ee,{logo:r.display_icon_url||""})}),e.jsx("div",{className:"game-detail-basic-main",children:e.jsxs("div",{className:"game-detail-basic-meta",children:[e.jsxs("div",{className:"game-detail-basic-row",children:[e.jsx(l.Text,{type:"tertiary",className:"game-detail-basic-meta-label",children:i("gameName")}),e.jsx("div",{className:"game-detail-basic-meta-value",children:r.name?.trim()?e.jsx(l.Text,{strong:!0,className:"game-detail-basic-name",children:r.name}):e.jsx("div",{className:"project-detail-warning",children:e.jsx(l.Text,{className:"project-detail-warning-text",children:i("gameNameEmptyTip")})})})]}),e.jsxs("div",{className:"game-detail-basic-row",children:[e.jsx(l.Text,{type:"tertiary",className:"game-detail-basic-meta-label",children:i("gameID")}),e.jsx(l.Text,{className:"game-detail-basic-meta-value game-detail-basic-meta-value-code",children:r.client_key||"-"})]}),e.jsxs("div",{className:"game-detail-basic-row",children:[e.jsx(l.Text,{type:"tertiary",className:"game-detail-basic-meta-label",children:i("gameDesc")}),e.jsx("div",{className:"game-detail-basic-meta-value",children:e.jsx(ae,{description:r.description})})]})]})})]})]}),e.jsxs("div",{className:"game-detail-section-grid",children:[e.jsxs("section",{className:"game-detail-panel",children:[e.jsx("div",{className:"game-detail-panel-head",children:e.jsx(l.Text,{strong:!0,children:i("projectInfo.section.package")})}),e.jsxs("div",{className:"game-detail-fields-grid",children:[e.jsx(E,{label:i("gameSize"),children:e.jsx(Y,{size:o.projectSize,limit:o.projectSizeLimit})}),!o.isUnity&&o.hasMainPackage?e.jsx(E,{label:i("gameMainPackageSize"),children:e.jsx(X,{packages:o.packageList,limit:4})}):null,!o.isUnity&&o.independentPackages.length>0?e.jsx(E,{label:i("gameIndependentPackageSize"),wide:!0,children:e.jsx(K,{packages:o.independentPackages})}):null]})]}),e.jsxs("section",{className:"game-detail-panel",children:[e.jsx("div",{className:"game-detail-panel-head",children:e.jsx(l.Text,{strong:!0,children:i("projectInfo.section.platform")})}),e.jsxs("div",{className:"game-detail-platform-stack",children:[e.jsxs("div",{className:"game-detail-platform-card",children:[e.jsx("div",{className:"game-detail-platform-card-head",children:e.jsx(l.Text,{strong:!0,children:i("gameTrustDomains")})}),e.jsx($,{domains:o.domains})]}),e.jsxs("div",{className:"game-detail-platform-card",children:[e.jsx("div",{className:"game-detail-platform-card-head",children:e.jsx(l.Text,{strong:!0,children:i("gameTermsAndPrivacy")})}),e.jsxs("div",{className:"game-detail-terms-stack",children:[e.jsx(J,{termsOfServiceLink:r.terms_of_service_link}),e.jsx(Q,{privacyPolicyLink:r.privacy_policy_link})]})]})]})]})]})]})})};export{ie as ProjectDetail};
@@ -0,0 +1 @@
1
+ import{K,r as P,bQ as X,bB as G,b_ as L,b$ as A,c0 as V,bi as $,c1 as U,c2 as W,bk as Y,c3 as Z,an as N,k as Q,h as J,m as j,R as m,Z as M,n as ee,s as te,q as d,c4 as se,c5 as ie}from"./index-BvxhyFWU.js";function re(r){return P.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},r),P.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.44 19.8a1.5 1.5 0 0 1 0-2.13l5.66-5.65-5.66-5.66a1.5 1.5 0 1 1 2.12-2.12l6.72 6.72a1.5 1.5 0 0 1 0 2.12L9.56 19.8a1.5 1.5 0 0 1-2.12 0Z",fill:"currentColor"}))}const Re=K(re,"chevron_right");var b,S;function ne(){if(S)return b;S=1;var r=X(),e=1/0,s=17976931348623157e292;function i(t){if(!t)return t===0?t:0;if(t=r(t),t===e||t===-e){var a=t<0?-1:1;return a*s}return t===t?t:0}return b=i,b}var R,E;function ae(){if(E)return R;E=1;var r=ne();function e(s){var i=r(s),t=i%1;return i===i?t?i-t:i:0}return R=e,R}var v,k;function oe(){if(k)return v;k=1;var r=G(),e=L(),s=A();function i(t,a,o){for(var n=-1,h=a.length,l={};++n<h;){var p=a[n],u=r(t,p);o(u,p)&&e(l,s(p,t),u)}return l}return v=i,v}var I,D;function he(){if(D)return I;D=1;function r(e,s){return e!=null&&s in Object(e)}return I=r,I}var _,x;function ue(){if(x)return _;x=1;var r=A(),e=V(),s=$(),i=U(),t=W(),a=Y();function o(n,h,l){h=r(h,n);for(var p=-1,u=h.length,f=!1;++p<u;){var g=a(h[p]);if(!(f=n!=null&&l(n,g)))break;n=n[g]}return f||++p!=u?f:(u=n==null?0:n.length,!!u&&t(u)&&i(g,u)&&(s(n)||e(n)))}return _=o,_}var O,y;function de(){if(y)return O;y=1;var r=he(),e=ue();function s(i,t){return i!=null&&e(i,t,r)}return O=s,O}var T,w;function pe(){if(w)return T;w=1;var r=oe(),e=de();function s(i,t){return r(i,t,function(a,o){return e(i,o)})}return T=s,T}var q,B;function le(){if(B)return q;B=1;var r=pe(),e=Z(),s=e(function(i,t){return i==null?{}:r(i,t)});return q=s,q}var ce=le();const C=N(ce);class fe extends Q{constructor(e){super(Object.assign({},e)),this.updateDOMInRenderTree=s=>{this._adapter.setDOMInRenderTree(s)},this.updateDOMHeight=s=>{this._adapter.setDOMHeight(s)},this.updateVisible=s=>{this._adapter.setVisible(s)},this.updateIsTransitioning=s=>{this._adapter.setIsTransitioning(s)}}}const F={PREFIX:`${J}-collapsible`};class c extends j{constructor(e){super(e),this.domRef=m.createRef(),this.hasBeenRendered=!1,this.handleResize=s=>{const i=s[0];if(i){const t=c.getEntryInfo(i);this.foundation.updateDOMHeight(t.height),this.foundation.updateDOMInRenderTree(t.isShown)}},this.isChildrenInRenderTree=()=>this.domRef.current?this.domRef.current.offsetHeight>0:!1,this.state={domInRenderTree:!1,domHeight:0,visible:this.props.isOpen,isTransitioning:!1},this.foundation=new fe(this.adapter)}get adapter(){return Object.assign(Object.assign({},super.adapter),{setDOMInRenderTree:e=>{this.state.domInRenderTree!==e&&this.setState({domInRenderTree:e})},setDOMHeight:e=>{this.state.domHeight!==e&&this.setState({domHeight:e})},setVisible:e=>{this.state.visible!==e&&this.setState({visible:e})},setIsTransitioning:e=>{this.state.isTransitioning!==e&&this.setState({isTransitioning:e})}})}componentDidMount(){super.componentDidMount(),this.resizeObserver=new ResizeObserver(this.handleResize),this.resizeObserver.observe(this.domRef.current);const e=this.isChildrenInRenderTree();this.foundation.updateDOMInRenderTree(e),e&&this.foundation.updateDOMHeight(this.domRef.current.scrollHeight)}componentDidUpdate(e,s,i){const t=Object.keys(C(this.props,["reCalcKey","isOpen"])).filter(o=>!M(this.props[o],e[o])),a=Object.keys(C(this.state,["domInRenderTree"])).filter(o=>!M(this.state[o],s[o]));t.includes("reCalcKey")&&this.foundation.updateDOMHeight(this.domRef.current.scrollHeight),a.includes("domInRenderTree")&&this.state.domInRenderTree&&this.foundation.updateDOMHeight(this.domRef.current.scrollHeight),t.includes("isOpen")&&(this.props.isOpen||!this.props.motion)&&this.foundation.updateVisible(this.props.isOpen),this.props.motion&&e.isOpen!==this.props.isOpen&&this.foundation.updateIsTransitioning(!0)}componentWillUnmount(){super.componentWillUnmount(),this.resizeObserver.disconnect()}render(){const e=Object.assign({overflow:"hidden",height:this.props.isOpen?this.state.domHeight:this.props.collapseHeight,opacity:this.props.isOpen||!this.props.fade||this.props.collapseHeight!==0?1:0,transitionDuration:`${this.props.motion&&this.state.isTransitioning?this.props.duration:0}ms`},this.props.style),s=ee(`${F.PREFIX}-wrapper`,{[`${F.PREFIX}-transition`]:this.props.motion&&this.state.isTransitioning},this.props.className),i=this.props.keepDOM&&(this.props.lazyRender?this.hasBeenRendered:!0)||this.props.collapseHeight!==0||this.state.visible||this.props.isOpen;return i&&!this.hasBeenRendered&&(this.hasBeenRendered=!0),m.createElement("div",Object.assign({className:s,style:e,onTransitionEnd:()=>{var t,a;this.props.isOpen||this.foundation.updateVisible(!1),this.foundation.updateIsTransitioning(!1),(a=(t=this.props).onMotionEnd)===null||a===void 0||a.call(t)}},this.getDataAttr(this.props)),m.createElement("div",{"x-semi-prop":"children",ref:this.domRef,style:{overflow:"hidden"},id:this.props.id},i&&this.props.children))}}c.__SemiComponentName__="Collapsible";c.defaultProps=te(c.__SemiComponentName__,{isOpen:!1,duration:250,motion:!0,keepDOM:!1,lazyRender:!1,collapseHeight:0,fade:!1});c.getEntryInfo=r=>{let e;r.borderBoxSize?e=!(r.borderBoxSize[0].blockSize===0&&r.borderBoxSize[0].inlineSize===0):e=!(r.contentRect.height===0&&r.contentRect.width===0);let s=0;return r.borderBoxSize?s=Math.ceil(r.borderBoxSize[0].blockSize):s=r.target.clientHeight,{isShown:e,height:s}};c.propTypes={motion:d.bool,children:d.node,isOpen:d.bool,duration:d.number,keepDOM:d.bool,collapseHeight:d.number,style:d.object,className:d.string,reCalcKey:d.oneOfType([d.string,d.number])};var H,z;function ge(){if(z)return H;z=1;var r=se(),e=ie(),s=ae(),i=9007199254740991,t=4294967295,a=Math.min;function o(n,h){if(n=s(n),n<1||n>i)return[];var l=t,p=a(n,t);h=e(h),n-=t;for(var u=r(p,h);++l<n;)h(l);return u}return H=o,H}var me=ge();const ve=N(me);export{c as C,Re as I,ve as _,C as a,ue as b,de as c,ae as r};
@@ -12,10 +12,17 @@
12
12
  rel="stylesheet"
13
13
  />
14
14
  <title>TikTok Mini Games DevTool</title>
15
- <script type="module" crossorigin src="/assets/index-Pfoc2Cwl.js"></script>
16
- <link rel="stylesheet" crossorigin href="/assets/index-D2LsTDVa.css">
15
+ <script type="module" crossorigin src="/assets/index-BvxhyFWU.js"></script>
16
+ <link rel="stylesheet" crossorigin href="/assets/index-CgAbOvxk.css">
17
17
  </head>
18
- <body>
18
+ <!--
19
+ The IDE shell renders in Semi UI's default light theme. The only
20
+ surviving consumer of these attributes is the wasm code-split
21
+ (分包) UI, whose styles are scoped to `body[theme-mode='light']`
22
+ / `body[theme-variant='simple']` for a minimal light look. They
23
+ are pinned statically here (no runtime theme switcher).
24
+ -->
25
+ <body theme-mode="light" theme-variant="simple">
19
26
  <div id="root"></div>
20
27
  <iframe
21
28
  style="visibility: hidden"
@@ -0,0 +1,191 @@
1
+ /**
2
+ * ===================================================================
3
+ * dev-debug.js — 一键联调 cli + ide
4
+ * ===================================================================
5
+ *
6
+ * 用途:让你在本地同时改 CLI(CLI server / wasm split / route 等)和 IDE
7
+ * (React 组件、wasm-split Modal、API 调用)时只敲一条命令就把三件事
8
+ * 一起拉起来:
9
+ *
10
+ * 1. CLI 源码增量构建 → packages/libs/dev-tools/cli/dist
11
+ * 2. CLI dev server → http://localhost:3000,cwd = 你的 Unity 工程
12
+ * 3. IDE vite dev server → http://localhost:5173,热更
13
+ *
14
+ * IDE 的 vite.config.ts 已经把所有 /game/* 接口 proxy 到 :3000,所以
15
+ * 你只要在浏览器开 http://localhost:5173,就能用最新 IDE + 最新 CLI 联调。
16
+ *
17
+ * 用法(在 cli 目录下):
18
+ * pnpm dev:debug /absolute/path/to/your/unity-game
19
+ * # 或者
20
+ * TTMG_DEV_PROJECT=/absolute/path/to/your/unity-game pnpm dev:debug
21
+ *
22
+ * 在 monorepo 任意位置:
23
+ * pnpm -C packages/libs/dev-tools/cli dev:debug /absolute/path/to/unity-game
24
+ *
25
+ * 必填:Unity 工程目录(必须含 game.json)。CLI 大量逻辑用 process.cwd()
26
+ * 解析 wasm 路径、写 __TTMG_TEMP__、改 webgl-wasm-split.js,所以必须把
27
+ * CLI 进程的 cwd 直接指到工程根,不能在 monorepo 里跑。
28
+ *
29
+ * 设计要点:
30
+ * - 用 Node 自带的 `--watch`(≥18.11)替代 nodemon —— 监听 dist/index.js
31
+ * 变化自动重启 server 进程,零额外依赖。
32
+ * - 用 rollup 自带 `-w` 替代 ts-node-dev / tsx —— 跟 npm run build 走
33
+ * 同一条 pipeline,不会出现 "ts-node 跑得通、build 不过" 的偏差。
34
+ * - 启动顺序:先 spawn rollup -w(它会自己 first-build),轮询等待
35
+ * dist/index.js 出现,再 spawn node --watch;vite 跟 rollup 同时起。
36
+ * 这样避免了"node --watch 在 dist 还不存在时直接退出"的坑。
37
+ * - SIGINT/SIGTERM 一并下发给三个子进程,Ctrl+C 干净收尾。
38
+ *
39
+ * 设置 `TTMG_DEV_NO_OPEN=1` 给 CLI 子进程,让它不要 openUrl 到 :3000
40
+ *(那是 dist/public 里的旧 IDE,联调时我们要的是 vite 的 :5173)。
41
+ */
42
+
43
+ const { spawn } = require('child_process');
44
+ const fs = require('fs');
45
+ const path = require('path');
46
+
47
+ // __dirname = packages/libs/dev-tools/cli/scripts
48
+ const CLI_DIR = path.resolve(__dirname, '..');
49
+ const IDE_DIR = path.resolve(__dirname, '../../ide');
50
+ const CLI_DIST_ENTRY = path.join(CLI_DIR, 'dist/index.js');
51
+
52
+ function fail(msg) {
53
+ console.error(`\n❌ ${msg}\n`);
54
+ process.exit(1);
55
+ }
56
+
57
+ const projectArg = process.argv[2];
58
+ const projectEnv = process.env.TTMG_DEV_PROJECT;
59
+ const projectDir = projectArg
60
+ ? path.resolve(projectArg)
61
+ : projectEnv
62
+ ? path.resolve(projectEnv)
63
+ : null;
64
+
65
+ if (!projectDir) {
66
+ fail(
67
+ '缺少 Unity 工程目录。\n' +
68
+ ' 用法: pnpm dev:debug /absolute/path/to/your/unity-game\n' +
69
+ ' 或: TTMG_DEV_PROJECT=/absolute/path/to/unity-game pnpm dev:debug',
70
+ );
71
+ }
72
+ if (!fs.existsSync(projectDir)) {
73
+ fail(`Unity 工程目录不存在: ${projectDir}`);
74
+ }
75
+ if (!fs.existsSync(path.join(projectDir, 'game.json'))) {
76
+ fail(
77
+ `${projectDir} 看起来不是 Unity 工程根(缺少 game.json)。\n` +
78
+ ` CLI 用 process.cwd() 操作工程文件,cwd 不对会写错地方,所以这里硬性校验。`,
79
+ );
80
+ }
81
+ if (!fs.existsSync(IDE_DIR)) {
82
+ fail(
83
+ `IDE 目录不存在: ${IDE_DIR}\n` +
84
+ ` 这个脚本依赖 monorepo 同级 ide 包,单独发出去的 npm 包不会带这个目录。`,
85
+ );
86
+ }
87
+
88
+ console.log('🚀 ttmg dev-debug starting');
89
+ console.log(` ├─ CLI 源码 ${CLI_DIR}`);
90
+ console.log(` ├─ IDE 源码 ${IDE_DIR}`);
91
+ console.log(` └─ Unity 工程 ${projectDir}`);
92
+ console.log('');
93
+
94
+ const children = [];
95
+
96
+ function spawnChild(label, cmd, args, opts) {
97
+ console.log(`▶ [${label}] ${cmd} ${args.join(' ')}`);
98
+ const child = spawn(cmd, args, {
99
+ stdio: 'inherit',
100
+ shell: process.platform === 'win32', // Windows 下需要 shell 才能识别 .cmd
101
+ ...opts,
102
+ });
103
+ child._label = label;
104
+ child.on('exit', (code, signal) => {
105
+ if (signal === 'SIGINT' || signal === 'SIGTERM') return;
106
+ console.log(`✗ [${label}] exited with code=${code} signal=${signal}`);
107
+ // 任何一个子进程异常退出都把整个 dev-debug 拉下来,避免出现
108
+ // "vite 还在转、CLI 已经挂了" 这种调起来很懵的状态。
109
+ cleanup(code ?? 1);
110
+ });
111
+ children.push(child);
112
+ return child;
113
+ }
114
+
115
+ let cleanedUp = false;
116
+ function cleanup(code = 0) {
117
+ if (cleanedUp) return;
118
+ cleanedUp = true;
119
+ for (const c of children) {
120
+ if (!c.killed) {
121
+ try {
122
+ c.kill('SIGINT');
123
+ } catch {}
124
+ }
125
+ }
126
+ // 给子进程一点时间把端口让出来 / flush 日志
127
+ setTimeout(() => process.exit(code), 200);
128
+ }
129
+ process.on('SIGINT', () => cleanup(0));
130
+ process.on('SIGTERM', () => cleanup(0));
131
+
132
+ // 1) CLI rollup watch —— 第一次会 full build,之后增量。
133
+ spawnChild('cli:build', 'npx', ['rollup', '-c', '-w'], { cwd: CLI_DIR });
134
+
135
+ // 3) IDE vite —— 跟 rollup 没依赖关系,并行起。
136
+ spawnChild('ide:dev', 'pnpm', ['dev'], { cwd: IDE_DIR });
137
+
138
+ // 2) CLI dev server —— 必须等 rollup 第一次 build 完,否则 node --watch
139
+ // 会在 dist/index.js 还不存在时立即退出。轮询 dist/index.js 文件存在
140
+ // + 连续两次大小不变(=已经写完)后再启动。
141
+ const POLL_INTERVAL_MS = 200;
142
+ const READY_TIMEOUT_MS = 60_000;
143
+ const startedAt = Date.now();
144
+ let lastSize = -1;
145
+ let stableCount = 0;
146
+
147
+ const waitTimer = setInterval(() => {
148
+ if (cleanedUp) {
149
+ clearInterval(waitTimer);
150
+ return;
151
+ }
152
+ if (Date.now() - startedAt > READY_TIMEOUT_MS) {
153
+ clearInterval(waitTimer);
154
+ fail(
155
+ `等待 ${CLI_DIST_ENTRY} 超时 (${READY_TIMEOUT_MS}ms)。` +
156
+ ' rollup -w 是不是挂了?看上面的 cli:build 输出。',
157
+ );
158
+ }
159
+ let size;
160
+ try {
161
+ size = fs.statSync(CLI_DIST_ENTRY).size;
162
+ } catch {
163
+ return; // 还没生成
164
+ }
165
+ if (size === lastSize && size > 0) {
166
+ stableCount += 1;
167
+ } else {
168
+ stableCount = 0;
169
+ lastSize = size;
170
+ }
171
+ if (stableCount >= 2) {
172
+ clearInterval(waitTimer);
173
+ console.log(
174
+ `\n✓ cli dist ready (${(size / 1024).toFixed(1)}KB), starting server in ${projectDir}\n`,
175
+ );
176
+ spawnChild(
177
+ 'cli:server',
178
+ 'node',
179
+ ['--watch', CLI_DIST_ENTRY, 'dev'],
180
+ {
181
+ cwd: projectDir,
182
+ env: {
183
+ ...process.env,
184
+ // 让 CLI 跳过自己的 chrome-launcher openUrl —— 联调时 IDE 在
185
+ // vite (5173),不要再去打开 dist/public 那份旧 IDE。
186
+ TTMG_DEV_NO_OPEN: '1',
187
+ },
188
+ },
189
+ );
190
+ }
191
+ }, POLL_INTERVAL_MS);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttmg/cli",
3
- "version": "0.3.8",
3
+ "version": "0.3.9-beta.wasm.1",
4
4
  "description": "TikTok Mini Game Command Line Tool",
5
5
  "license": "ISC",
6
6
  "bin": {
@@ -9,12 +9,16 @@
9
9
  "files": [
10
10
  "dist"
11
11
  ],
12
+ "publishConfig": {
13
+ "access": "public"
14
+ },
12
15
  "scripts": {
13
16
  "prepublish": "npm run build",
14
17
  "build": "node scripts/build.js",
15
18
  "setup": "node scripts/setup.js",
16
19
  "reset:local-state": "node scripts/resetLocalState.js",
17
- "dev:link": "npm run build && npm link"
20
+ "dev:link": "npm run build && npm link",
21
+ "dev:debug": "node scripts/dev-debug.js"
18
22
  },
19
23
  "keywords": [
20
24
  "TTMG",
@@ -22,6 +26,7 @@
22
26
  ],
23
27
  "author": "zhanghongyang.mocha",
24
28
  "dependencies": {
29
+ "@anrans001/ttmg-wasmtool": "^0.3.2",
25
30
  "acorn": "^8.15.0",
26
31
  "archiver": "^7.0.1",
27
32
  "axios": "^1.11.0",
@@ -1 +0,0 @@
1
- import{aR as U,b$ as ie,bZ as Pe,aP as l,ay as a,aG as e,t as Re,o as Fe,K as c,f as I,d as w,a as O,y as Ve,S as xe,Q as Ge,N as Ne,c0 as qe,T as fe}from"./index-Pfoc2Cwl.js";import{E as Ue}from"./index-iUN2bzlN.js";import{F as E}from"./baseForm-DqyLTNAx.js";import{c as Qe}from"./index-tOg_vZEc.js";import"./times-BsA3kTAU.js";import"./index-yXoFuCJJ.js";function Ye(t={}){return U({url:"/game/direct-feed-card/list",method:"POST",data:t})}function Be(t={}){return U({url:"/game/direct-feed-card/scenarios",method:"POST",data:t})}function ze(t){return U({url:"/game/direct-feed-card/create",method:"POST",data:t})}function We(t){return U({url:"/game/direct-feed-card/asset-preview",method:"POST",data:t})}function He(t={}){return U({url:"/game/assets",method:"POST",data:t})}const Ze="fyf_promotion_direct_feed_play",je="direct-play-debug",ae="__create_direct_play_card__",se="recover_stamina_dynamic",Je=2,G=String(Je),Xe={cardName:"",cardDesc:"",cardType:G,scenario:se,subPkg:"__GAME__",params:""};function D(t,d){if(typeof t=="string"&&t.trim())return t;if(t&&typeof t=="object"){const i=t;if(i.errorMsg)return i.errorMsg;if(i.StatusMessage)return i.StatusMessage;if(i.message)return i.message}return d}function ea(t){return t?t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:`${(t/1024/1024).toFixed(2)} MB`:"-"}function aa(t){return t?new Date(t*1e3).toLocaleString():"-"}function ta(t){return t==="preview"?a("ia.directPlay.stage2.assetGroup.preview"):t==="live"?a("ia.directPlay.stage2.assetGroup.live"):a("ia.directPlay.stage2.assetGroup.review")}function sa(t){return{...t||Ne,scene:Ze}}function ia(t){return t.pkgType==="independent"?t.independentPkg||t.pkgName||a("independentPackage"):a("gameMainPackage")}function te(t){return!t||t==="__GAME__"?a("gameMainPackage"):t}function be(t){const d=String(t||"").trim();return d?d==="reward_issue_static"||d==="reward_issue_dynamic"?a("ia.directPlay.stage2.create.scenario.rewardIssue"):d==="recover_stamina_static"||d==="recover_stamina_dynamic"||d==="strength_recovery"?a("ia.directPlay.stage2.create.scenario.recoverStamina"):d==="unlock_level_static"||d==="unlock_level_dynamic"?a("ia.directPlay.stage2.create.scenario.unlockLevel"):d==="recall_scenario"?a("ia.directPlay.stage2.create.scenario.rewardIssue"):"":""}function q(t,d){if(!t)return"-";const i=be(t);return i||(d?.[t]?d[t]:t)}function ra(t){const d=String(t||"").trim();if(d.endsWith("_static"))return 1;if(d.endsWith("_dynamic"))return 2}function _e(t,d){const i=Number(d),o=t.cardType===void 0?ra(t.value):Number(t.cardType);return o===void 0||o===i}function ve(t,d){const i=new Set;return t.filter(o=>{const x=q(o.value,d);return i.has(x)?!1:(i.add(x),!0)})}function na(t){return t?Number(t.audit_status)===1?a("ia.directPlay.stage2.cardStatus.approved"):Number(t.audit_status)===0||Number(t.status)===0?a("ia.directPlay.stage2.cardStatus.pending"):"":""}function ca(t,d){const i=t?.direct_feed_card||{},o=String(t?.content_id||i.content_id||"").trim();return o?{audit_status:Number(i.audit_status??1),status:Number(i.status??1),content_id:o,card_name:String(i.card_name||d.cardName),card_desc:String(i.card_desc||d.cardDesc),card_type:Number(i.card_type??d.cardType),scenario:String(i.scenario||d.scenario),sub_pkg:String(i.sub_pkg||d.subPkg),params:String(i.params||d.params||""),priority:i.priority===void 0?void 0:Number(i.priority)}:null}function W(){return[{value:se,label:q(se)}]}const da=()=>{const t=ie(),{state:{selectedLaunchOption:d,gameDetail:i,launchOptions:o,packages:x},setLaunchOptions:k,setSelectedLaunchOption:r}=Pe(),[f,Q]=l.useState([]),[b,M]=l.useState([]),[P,$]=l.useState("select"),[j,Y]=l.useState(""),[L,re]=l.useState(""),[ne,B]=l.useState(""),[ce,de]=l.useState(""),[le,R]=l.useState(""),[oe,H]=l.useState(""),[ue,Z]=l.useState(""),[Te,ge]=l.useState(!0),[Ce,pe]=l.useState(!1),[Se,me]=l.useState(!1),[ye,J]=l.useState(G),[A,he]=l.useState(W),T=l.useRef(null),X=l.useMemo(()=>sa(d),[d]),y=l.useMemo(()=>({appId:i?.app_id,clientKey:i?.client_key,miniGameId:i?.app_id}),[i?.app_id,i?.client_key]),C=l.useMemo(()=>f.find(s=>s.content_id===j)||null,[f,j]),K=l.useMemo(()=>b.find(s=>s.asset_id===L)||null,[b,L]),S=l.useMemo(()=>A.reduce((s,n)=>(n?.value&&(s[n.value]=be(n.value)||(n.label&&n.label!==n.value?n.label:n.value)),s),{}),[A]),z=l.useMemo(()=>{const s=A.filter(u=>_e(u,ye)),n=s.length>0?s:W();return ve(n,S).map(u=>({...u,label:q(u.value,S)}))},[ye,S,A]),Ie=l.useMemo(()=>b.map(s=>({label:`${s.file_name||s.asset_id} · v${s.version||"-"}`,value:s.asset_id})),[b]),we=l.useMemo(()=>[{label:a("ia.directPlay.stage2.create.option"),value:ae},...f.map(s=>({label:`${s.card_name} · ${q(s.scenario,S)} · ${te(s.sub_pkg)}`,value:s.content_id}))],[f,S]),ke=l.useMemo(()=>[{label:a("ia.directPlay.stage2.create.cardType.fixed"),value:"1"},{label:a("ia.directPlay.stage2.create.cardType.dynamic"),value:"2"}],[]),Ee=l.useMemo(()=>{const s=new Set(["__GAME__"]);return(x||[]).forEach(n=>{n?.type==="independent"&&n.name&&s.add(n.name)}),o.forEach(n=>{n.pkgType==="independent"&&n.independentPkg&&s.add(n.independentPkg)}),Array.from(s).map(n=>({label:te(n),value:n}))},[o,x]),De=l.useMemo(()=>e.jsxs("span",{className:"integration-assistant-direct-play-label-with-info",children:[e.jsx("span",{children:a("ia.directPlay.stage2.create.cardType")}),e.jsx(Re,{position:"top",trigger:"hover",showArrow:!0,content:e.jsxs("div",{className:"integration-assistant-direct-play-info-popover",children:[e.jsx(c.Text,{children:a("ia.directPlay.stage2.create.cardType.dynamicDesc")}),e.jsx(c.Text,{children:a("ia.directPlay.stage2.create.cardType.fixedDesc")})]}),children:e.jsx("span",{className:"integration-assistant-direct-play-info-icon","aria-label":"card type info",children:e.jsx(Fe,{})})})]}),[]),Me=l.useCallback(s=>{const n=String(s||G);J(n);const u=A.filter(p=>_e(p,n)),h=u.length>0?ve(u,S):W(),m=h[0]?.value,_=T.current?.getValue?.("scenario"),N=h.some(p=>p.value===_);T.current?.setValue?.("cardType",n),m&&!N&&T.current?.setValue?.("scenario",m)},[S,A]),F=l.useCallback(async s=>{ge(!0),de("");try{const[n,u,h]=await Promise.allSettled([Ye({appId:y.appId,clientKey:y.clientKey}),He({appId:y.appId,miniGameId:y.miniGameId,clientKey:y.clientKey}),Be({appId:y.appId,clientKey:y.clientKey})]),m=n.status==="fulfilled"?n.value:null,_=u.status==="fulfilled"?u.value:null,N=h.status==="fulfilled"?h.value:null;if(n.status==="rejected"||m?.error||m?.code!==0||!m?.data)throw new Error(D(m?.error,a("ia.directPlay.stage2.loadCardsFailed")));if(u.status==="rejected"||_?.error||_?.code!==0||!_?.data)throw new Error(D(_?.error,a("ia.directPlay.stage2.loadAssetsFailed")));const p=m.data.cards||[],V=(_.data.preview_assets||[]).map(g=>({...g,group:"preview"}));Q(p),M(V),N?.code===0&&N.data?.scenarios?.length?he(N.data.scenarios):he(g=>g.length>0?g:W()),Y(g=>{if(s?.contentId&&p.some(v=>v.content_id===s.contentId))return s.contentId;if(s?.cardName){const v=p.find(ee=>ee.card_name===s.cardName);if(v?.content_id)return v.content_id}return g&&p.some(v=>v.content_id===g)?g:p[0]?.content_id||""}),re(g=>g&&V.some(v=>v.asset_id===g)?g:V[0]?.asset_id||"")}catch(n){de(D(n,a("ia.directPlay.stage2.loadResourcesFailed")))}finally{ge(!1)}},[y.appId,y.clientKey,y.miniGameId]);l.useEffect(()=>{F()},[F]),l.useEffect(()=>{const s=z[0]?.value;if(!s)return;const n=T.current?.getValue?.("scenario");z.some(h=>h.value===n)||T.current?.setValue?.("scenario",s)},[z]);const Le=l.useCallback(()=>{const s={...X,id:je,name:a("ia.directPlay.stage1.generatedModeName")},n=o.filter(m=>m.id!==je),u=n.findIndex(m=>m.id==="created"),h=u>=0?[...n.slice(0,u),s,...n.slice(u)]:[...n,s];k(h),r(s),t("/")},[o,t,k,r,X]),Ae=l.useCallback(async()=>{try{const s=await T.current?.validate(),n=String(s?.cardName||"").trim(),u=String(s?.cardDesc||"").trim(),h=String(s?.scenario||"").trim(),m=String(s?.subPkg||"__GAME__").trim()||"__GAME__",_=String(s?.params||"").trim(),N=Number(s?.cardType||0);if(!n||!u||!h||!N)return;me(!0),H(""),Z("");const p=await ze({appId:y.appId,clientKey:y.clientKey,directFeedCard:{cardName:n,cardDesc:u,cardType:N,scenario:h,subPkg:m,params:_||void 0}});if(p?.error||p?.code!==0)throw new Error(D(p?.error,a("ia.directPlay.stage2.create.failed")));const V=String(p?.data?.content_id||p?.data?.direct_feed_card?.content_id||""),g=ca(p?.data,{cardName:n,cardDesc:u,cardType:N,scenario:h,subPkg:m,params:_});await F({contentId:V,cardName:n}),g&&(Q(v=>{const ee=v.filter($e=>$e.content_id!==g.content_id);return[g,...ee]}),Y(g.content_id)),$("select"),Z(a("ia.directPlay.stage2.create.success")),R(""),B(""),T.current?.reset?.(),J(G)}catch(s){if(s?.name==="ValidateError")return;H(D(s,a("ia.directPlay.stage2.create.failed")))}finally{me(!1)}},[F,y.appId,y.clientKey]),Ke=l.useCallback(s=>{if(s===ae){$("create"),Y(""),R(""),B("");return}$("select"),Y(s||"")},[]),Oe=l.useCallback(async()=>{if(!j||!L){R(a("ia.directPlay.stage2.selectRequired"));return}pe(!0),R("");try{const s=await We({assetId:L,contentId:j});if(s?.error||s?.code!==0||!s?.data?.preview_url)throw new Error(D(s?.error,a("ia.directPlay.stage2.previewFailed")));B(s.data.preview_url)}catch(s){B(""),R(D(s,a("ia.directPlay.stage2.previewFailed")))}finally{pe(!1)}},[L,j]);return e.jsxs("div",{className:"integration-assistant-direct-play-grid",children:[e.jsxs(I,{className:"integration-assistant-direct-play-card",bordered:!0,children:[e.jsx("div",{className:"integration-assistant-section-head",children:e.jsxs("div",{children:[e.jsx(c.Title,{heading:5,children:a("ia.directPlay.stage1.title")}),e.jsx(c.Paragraph,{className:"integration-assistant-section-desc",children:a("ia.directPlay.stage1.desc")})]})}),e.jsxs("div",{className:"integration-assistant-direct-play-summary",children:[e.jsxs("div",{className:"integration-assistant-direct-play-row",children:[e.jsx(c.Text,{strong:!0,children:a("ia.directPlay.stage1.modeName")}),e.jsx(c.Text,{children:a("ia.directPlay.stage1.modeValue")})]}),e.jsxs("div",{className:"integration-assistant-direct-play-row",children:[e.jsx(c.Text,{strong:!0,children:a("ia.directPlay.stage1.scene")}),e.jsx(c.Text,{children:a("scene_fyf_promotion_direct_feed_play")})]}),e.jsxs("div",{className:"integration-assistant-direct-play-row",children:[e.jsx(c.Text,{strong:!0,children:a("ia.directPlay.stage1.package")}),e.jsx(c.Text,{children:ia(X)})]})]}),e.jsx("div",{className:"integration-assistant-actions",children:e.jsx(w,{theme:"solid",onClick:Le,children:a("ia.directPlay.stage1.createQr")})})]}),e.jsxs(I,{className:"integration-assistant-direct-play-card",bordered:!0,children:[e.jsx(O,{className:"integration-assistant-direct-play-banner integration-assistant-direct-play-banner-top",fullMode:!1,bordered:!1,closeIcon:null,type:"info",description:a("ia.directPlay.stage2.banner")}),e.jsx("div",{className:"integration-assistant-section-head",children:e.jsxs("div",{className:"integration-assistant-direct-play-stage-head",children:[e.jsx(c.Title,{heading:5,children:a("ia.directPlay.stage2.title")}),e.jsx(c.Paragraph,{className:"integration-assistant-section-desc",children:a("ia.directPlay.stage2.desc")})]})}),e.jsx(O,{className:"integration-assistant-direct-play-banner integration-assistant-direct-play-banner-inline",fullMode:!1,bordered:!1,closeIcon:null,type:"warning",description:a("ia.directPlay.versionNotice")}),ce?e.jsx(O,{className:"integration-assistant-direct-play-banner",fullMode:!1,bordered:!1,closeIcon:null,type:"danger",description:ce}):null,le?e.jsx(O,{className:"integration-assistant-direct-play-banner",fullMode:!1,bordered:!1,closeIcon:null,type:"danger",description:le}):null,oe?e.jsx(O,{className:"integration-assistant-direct-play-banner",fullMode:!1,bordered:!1,closeIcon:null,type:"danger",description:oe}):null,ue?e.jsx(O,{className:"integration-assistant-direct-play-banner",fullMode:!1,bordered:!1,closeIcon:null,type:"success",description:ue}):null,Te?e.jsx("div",{className:"integration-assistant-direct-play-loading",children:e.jsx(Ve,{size:"large"})}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"integration-assistant-direct-play-form",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"integration-assistant-direct-play-field-head",children:[e.jsx(c.Text,{strong:!0,children:a("ia.directPlay.stage2.cardSelect")}),e.jsx(w,{theme:"borderless",onClick:()=>F(),children:a("ia.directPlay.stage2.refresh")})]}),e.jsx(xe,{className:"integration-assistant-direct-play-select",value:P==="create"?ae:j||void 0,optionList:we,onChange:s=>Ke(s),placeholder:a("ia.directPlay.stage2.cardSelect")})]}),P==="select"?e.jsxs("div",{children:[e.jsx(c.Text,{strong:!0,children:a("ia.directPlay.stage2.assetSelect")}),e.jsx(xe,{className:"integration-assistant-direct-play-select",value:L||void 0,optionList:Ie,onChange:s=>re(s),placeholder:a("ia.directPlay.stage2.assetSelect")})]}):null]}),P==="create"?e.jsx("div",{className:"integration-assistant-direct-play-create-wrap",children:e.jsxs("div",{className:"integration-assistant-direct-play-panel",children:[e.jsx(c.Text,{strong:!0,children:a("ia.directPlay.stage2.create.title")}),e.jsx(c.Paragraph,{className:"integration-assistant-section-desc",children:a("ia.directPlay.stage2.create.desc")}),e.jsx(E,{className:"integration-assistant-direct-play-create-form",initValues:Xe,getFormApi:s=>{T.current=s},onValueChange:s=>{if(H(""),Z(""),s&&typeof s=="object"&&"cardType"in s){const n=String(s.cardType||G);J(n)}},children:e.jsxs("div",{className:"integration-assistant-direct-play-create-grid",children:[e.jsx(E.Input,{field:"cardName",label:a("ia.directPlay.stage2.create.cardName"),placeholder:a("ia.directPlay.stage2.create.cardNamePlaceholder"),rules:[{required:!0,message:a("notEmpty")}]}),e.jsx(E.Select,{field:"cardType",label:De,optionList:ke,onChange:Me,rules:[{required:!0,message:a("notEmpty")}]}),e.jsx(E.Input,{field:"cardDesc",label:a("ia.directPlay.stage2.create.cardDesc"),placeholder:a("ia.directPlay.stage2.create.cardDescPlaceholder"),rules:[{required:!0,message:a("notEmpty")}]}),e.jsx(E.Select,{field:"subPkg",label:a("ia.directPlay.stage2.create.subPkg"),optionList:Ee,rules:[{required:!0,message:a("notEmpty")}]}),e.jsx(E.Select,{field:"scenario",label:a("ia.directPlay.stage2.create.scenario"),optionList:z,rules:[{required:!0,message:a("notEmpty")}]}),e.jsx(E.Input,{field:"params",label:a("ia.directPlay.stage2.create.params"),placeholder:a("ia.directPlay.stage2.create.paramsPlaceholder")})]})}),e.jsx("div",{className:"integration-assistant-actions",children:e.jsx(w,{theme:"solid",type:"primary",loading:Se,onClick:Ae,children:a("ia.directPlay.stage2.create.submit")})})]})}):null,P==="select"?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"integration-assistant-direct-play-details",children:[e.jsxs("div",{className:"integration-assistant-direct-play-panel",children:[e.jsx(c.Text,{strong:!0,children:a("ia.directPlay.stage2.selectedCard")}),C?e.jsxs("ul",{className:"integration-assistant-detail-list",children:[e.jsx("li",{children:`${a("ia.directPlay.stage2.cardName")}${C.card_name}`}),e.jsx("li",{children:`${a("ia.directPlay.stage2.cardContentId")}${C.content_id||"-"}`}),e.jsx("li",{children:`${a("ia.directPlay.stage2.cardDesc")}${C.card_desc||"-"}`}),e.jsx("li",{children:`${a("ia.directPlay.stage2.cardScenario")}${q(C.scenario,S)}`}),e.jsx("li",{children:`${a("ia.directPlay.stage2.cardStatus")}${na(C)||"-"}`}),e.jsx("li",{children:`${a("ia.directPlay.stage2.cardPackage")}${te(C.sub_pkg)}`}),e.jsx("li",{children:`${a("ia.directPlay.stage2.cardQueries")}${C.params||"-"}`})]}):e.jsx(c.Paragraph,{className:"integration-assistant-section-desc",children:a("ia.directPlay.stage2.emptyCard")})]}),e.jsxs("div",{className:"integration-assistant-direct-play-panel",children:[e.jsx(c.Text,{strong:!0,children:a("ia.directPlay.stage2.selectedAsset")}),K?e.jsxs("ul",{className:"integration-assistant-detail-list",children:[e.jsx("li",{children:`${a("ia.directPlay.stage2.assetGroup")}${ta(K.group)}`}),e.jsx("li",{children:`${a("ia.directPlay.stage2.assetFile")}${K.file_name||"-"}`}),e.jsx("li",{children:`${a("ia.directPlay.stage2.assetVersion")}${K.version||"-"}`}),e.jsx("li",{children:`${a("ia.directPlay.stage2.assetSize")}${ea(K.file_size)}`}),e.jsx("li",{children:`${a("ia.directPlay.stage2.assetUploaded")}${aa(K.uploaded_at)}`})]}):e.jsx(c.Paragraph,{className:"integration-assistant-section-desc",children:a("ia.directPlay.stage2.emptyAsset")})]})]}),e.jsx("div",{className:"integration-assistant-actions",children:e.jsx(w,{theme:"solid",loading:Ce,onClick:Oe,children:a("ia.directPlay.stage2.generate")})})]}):null,P==="select"&&ne?e.jsxs("div",{className:"integration-assistant-direct-play-preview",children:[e.jsx("div",{className:"integration-assistant-direct-play-qr",children:e.jsx(Ge,{value:ne,size:180})}),e.jsx("div",{className:"integration-assistant-direct-play-preview-content",children:e.jsx(c.Text,{className:"integration-assistant-section-desc",children:a("ia.directPlay.stage2.qrDesc")})})]}):null]})]})]})},la={sidebar_revisit:{modeId:"sidebar-revisit-debug",scene:"center",sceneKey:"scene_center",titleKey:"ia.revisit.sidebar.panel.title",descKey:"ia.revisit.sidebar.panel.desc",modeValueKey:"ia.revisit.sidebar.panel.modeValue",generatedModeNameKey:"ia.revisit.sidebar.panel.generatedModeName",signalValueKey:"ia.revisit.sidebar.panel.signalValue",createQrKey:"ia.revisit.sidebar.panel.createQr"},shortcut_revisit:{modeId:"shortcut-revisit-debug",scene:"desktop_shortcut",sceneKey:"scene_shortcut",titleKey:"ia.revisit.shortcut.panel.title",descKey:"ia.revisit.shortcut.panel.desc",modeValueKey:"ia.revisit.shortcut.panel.modeValue",generatedModeNameKey:"ia.revisit.shortcut.panel.generatedModeName",signalValueKey:"ia.revisit.shortcut.panel.signalValue",createQrKey:"ia.revisit.shortcut.panel.createQr"}};function oa(t,d){return{...t||Ne,scene:d}}function ua(t){return t.pkgType==="independent"?t.independentPkg||t.pkgName||a("independentPackage"):a("gameMainPackage")}const ga=({capabilityKey:t})=>{const d=ie(),{state:{selectedLaunchOption:i,launchOptions:o},setLaunchOptions:x,setSelectedLaunchOption:k}=Pe(),r=la[t],f=l.useMemo(()=>oa(i,r.scene),[r.scene,i]),Q=l.useCallback(()=>{const b={...f,id:r.modeId,name:a(r.generatedModeNameKey)},M=o.filter(j=>j.id!==r.modeId),P=M.findIndex(j=>j.id==="created"),$=P>=0?[...M.slice(0,P),b,...M.slice(P)]:[...M,b];x($),k(b),d("/")},[r.generatedModeNameKey,r.modeId,o,d,f,x,k]);return e.jsx("div",{className:"integration-assistant-direct-play-grid",children:e.jsxs(I,{className:"integration-assistant-direct-play-card",bordered:!0,children:[e.jsx("div",{className:"integration-assistant-section-head",children:e.jsxs("div",{children:[e.jsx(c.Title,{heading:5,children:a(r.titleKey)}),e.jsx(c.Paragraph,{className:"integration-assistant-section-desc",children:a(r.descKey)})]})}),e.jsxs("div",{className:"integration-assistant-direct-play-summary",children:[e.jsxs("div",{className:"integration-assistant-direct-play-row",children:[e.jsx(c.Text,{strong:!0,children:a("ia.revisit.panel.modeName")}),e.jsx(c.Text,{children:a(r.modeValueKey)})]}),e.jsxs("div",{className:"integration-assistant-direct-play-row",children:[e.jsx(c.Text,{strong:!0,children:a("ia.revisit.panel.scene")}),e.jsx(c.Text,{children:a(r.sceneKey)})]}),e.jsxs("div",{className:"integration-assistant-direct-play-row",children:[e.jsx(c.Text,{strong:!0,children:a("ia.revisit.panel.launchParams")}),e.jsx(c.Text,{children:`scene=${r.scene}`})]}),e.jsxs("div",{className:"integration-assistant-direct-play-row",children:[e.jsx(c.Text,{strong:!0,children:a("ia.revisit.panel.package")}),e.jsx(c.Text,{children:ua(f)})]}),e.jsxs("div",{className:"integration-assistant-direct-play-row",children:[e.jsx(c.Text,{strong:!0,children:a("ia.revisit.panel.signal")}),e.jsx(c.Text,{children:a(r.signalValueKey)})]})]}),e.jsx("div",{className:"integration-assistant-actions",children:e.jsx(w,{theme:"solid",onClick:Q,children:a(r.createQrKey)})})]})})},ja=()=>{const t=ie(),{capabilityKey:d}=qe(),i=d?Qe[d]:void 0,o=r=>a(r),x=i?.actions.filter(r=>r.labelKey==="ia.action.openCapabilityDoc")||[],k=r=>{if(r.type==="external"&&r.href){window.open(r.href,r.target||"_blank","noopener,noreferrer");return}r.type==="route"&&r.path&&t(r.path)};return!i||i.hidden?e.jsx("div",{className:"integration-assistant-page integration-assistant-detail-page",children:e.jsxs(I,{bordered:!0,children:[e.jsx(Ue,{description:a("ia.detail.notFound")}),e.jsx("div",{className:"integration-assistant-detail-backalone",children:e.jsx(w,{onClick:()=>t("/integration_assistant"),children:a("ia.detail.backToMap")})})]})}):e.jsxs("div",{className:"integration-assistant-page integration-assistant-detail-page",children:[e.jsx("div",{className:"integration-assistant-detail-backalone",children:e.jsx(w,{theme:"borderless",onClick:()=>t("/integration_assistant"),children:a("ia.detail.backToMap")})}),e.jsx(I,{className:"integration-assistant-detail-hero",bordered:!1,children:e.jsxs("div",{className:"integration-assistant-detail-hero-content",children:[e.jsxs("div",{className:"integration-assistant-detail-title-row",children:[e.jsx("div",{className:"integration-assistant-map-icon","aria-hidden":"true",children:i.icon}),e.jsxs("div",{children:[e.jsx(c.Title,{heading:3,className:"integration-assistant-title",children:o(i.titleKey)}),e.jsx(c.Paragraph,{className:"integration-assistant-subtitle",children:o(i.summaryKey)})]})]}),e.jsxs("div",{className:"integration-assistant-map-meta",children:[i.sceneKey&&e.jsx(fe,{color:"blue",children:`${a("ia.sceneLabel")}${o(i.sceneKey)}`}),i.apiTags.map(r=>e.jsx("span",{children:e.jsx(fe,{children:r})},r))]}),e.jsx("div",{className:"integration-assistant-actions",children:x.map(r=>e.jsx(w,{theme:r.theme||"light",onClick:()=>k(r),children:o(r.labelKey)},`${r.type}:${r.path||r.href||r.labelKey}`))})]})}),e.jsxs("div",{className:"integration-assistant-detail-grid",children:[e.jsxs(I,{className:"integration-assistant-detail-card",bordered:!0,children:[e.jsx(c.Title,{heading:5,children:a("ia.section.prerequisites")}),e.jsx("div",{className:"integration-assistant-detail-info-list",children:i.prerequisiteKeys.map(r=>e.jsxs("div",{className:"integration-assistant-detail-info-item",children:[e.jsx("span",{className:"integration-assistant-detail-info-marker"}),e.jsx(c.Text,{className:"integration-assistant-detail-info-text",children:o(r)})]},r))})]}),e.jsxs(I,{className:"integration-assistant-detail-card",bordered:!0,children:[e.jsx(c.Title,{heading:5,children:a("ia.section.steps")}),e.jsx("div",{className:"integration-assistant-detail-step-list",children:i.stepKeys.map((r,f)=>e.jsxs("div",{className:"integration-assistant-detail-step",children:[e.jsx("span",{className:"integration-assistant-detail-step-index",children:f+1}),e.jsx(c.Text,{className:"integration-assistant-detail-step-text",children:o(r)})]},r))})]}),e.jsxs(I,{className:"integration-assistant-detail-card",bordered:!0,children:[e.jsx(c.Title,{heading:5,children:a("ia.section.tips")}),e.jsx("div",{className:"integration-assistant-detail-info-list",children:i.tipKeys.map(r=>e.jsxs("div",{className:"integration-assistant-detail-info-item",children:[e.jsx("span",{className:"integration-assistant-detail-info-marker"}),e.jsx(c.Text,{className:"integration-assistant-detail-info-text",children:o(r)})]},r))})]})]}),i.key==="direct_play_card"?e.jsx(da,{}):null,i.key==="sidebar_revisit"||i.key==="shortcut_revisit"?e.jsx(ga,{capabilityKey:i.key}):null]})};export{ja as IntegrationAssistantDetail};