@ttmg/cli 0.2.9 → 0.3.0-beta.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.
@@ -64,4 +64,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
64
64
  * @license MIT
65
65
  */var GD="popstate";function ere(s={}){function e(n,r){let{pathname:a,search:i,hash:o}=n.location;return LC("",{pathname:a,search:i,hash:o},r.state&&r.state.usr||null,r.state&&r.state.key||"default")}function t(n,r){return typeof r=="string"?r:bu(r)}return nre(e,t,null,s)}function fn(s,e){if(s===!1||s===null||typeof s>"u")throw new Error(e)}function ua(s,e){if(!s){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function tre(){return Math.random().toString(36).substring(2,10)}function YD(s,e){return{usr:s.state,key:s.key,idx:e}}function LC(s,e,t=null,n){return{pathname:typeof s=="string"?s:s.pathname,search:"",hash:"",...typeof e=="string"?Wl(e):e,state:t,key:e&&e.key||n||tre()}}function bu({pathname:s="/",search:e="",hash:t=""}){return e&&e!=="?"&&(s+=e.charAt(0)==="?"?e:"?"+e),t&&t!=="#"&&(s+=t.charAt(0)==="#"?t:"#"+t),s}function Wl(s){let e={};if(s){let t=s.indexOf("#");t>=0&&(e.hash=s.substring(t),s=s.substring(0,t));let n=s.indexOf("?");n>=0&&(e.search=s.substring(n),s=s.substring(0,n)),s&&(e.pathname=s)}return e}function nre(s,e,t,n={}){let{window:r=document.defaultView,v5Compat:a=!1}=n,i=r.history,o="POP",c=null,h=f();h==null&&(h=0,i.replaceState({...i.state,idx:h},""));function f(){return(i.state||{idx:null}).idx}function p(){o="POP";let S=f(),w=S==null?null:S-h;h=S,c&&c({action:o,location:C.location,delta:w})}function y(S,w){o="PUSH";let x=LC(C.location,S,w);h=f()+1;let O=YD(x,h),T=C.createHref(x);try{i.pushState(O,"",T)}catch(D){if(D instanceof DOMException&&D.name==="DataCloneError")throw D;r.location.assign(T)}a&&c&&c({action:o,location:C.location,delta:1})}function b(S,w){o="REPLACE";let x=LC(C.location,S,w);h=f();let O=YD(x,h),T=C.createHref(x);i.replaceState(O,"",T),a&&c&&c({action:o,location:C.location,delta:0})}function E(S){return rre(S)}let C={get action(){return o},get location(){return s(r,i)},listen(S){if(c)throw new Error("A history only accepts one active listener");return r.addEventListener(GD,p),c=S,()=>{r.removeEventListener(GD,p),c=null}},createHref(S){return e(r,S)},createURL:E,encodeLocation(S){let w=E(S);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:y,replace:b,go(S){return i.go(S)}};return C}function rre(s,e=!1){let t="http://localhost";typeof window<"u"&&(t=window.location.origin!=="null"?window.location.origin:window.location.href),fn(t,"No window.location.(origin|href) available to create URL");let n=typeof s=="string"?s:bu(s);return n=n.replace(/ $/,"%20"),!e&&n.startsWith("//")&&(n=t+n),new URL(n,t)}function nA(s,e,t="/"){return sre(s,e,t,!1)}function sre(s,e,t,n){let r=typeof e=="string"?Wl(e):e,a=Na(r.pathname||"/",t);if(a==null)return null;let i=rA(s);are(i);let o=null;for(let c=0;o==null&&c<i.length;++c){let h=mre(a);o=pre(i[c],h,n)}return o}function rA(s,e=[],t=[],n="",r=!1){let a=(i,o,c=r,h)=>{let f={relativePath:h===void 0?i.path||"":h,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};if(f.relativePath.startsWith("/")){if(!f.relativePath.startsWith(n)&&c)return;fn(f.relativePath.startsWith(n),`Absolute route path "${f.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),f.relativePath=f.relativePath.slice(n.length)}let p=xa([n,f.relativePath]),y=t.concat(f);i.children&&i.children.length>0&&(fn(i.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${p}".`),rA(i.children,e,y,p,c)),!(i.path==null&&!i.index)&&e.push({path:p,score:hre(p,i.index),routesMeta:y})};return s.forEach((i,o)=>{if(i.path===""||!i.path?.includes("?"))a(i,o);else for(let c of sA(i.path))a(i,o,!0,c)}),e}function sA(s){let e=s.split("/");if(e.length===0)return[];let[t,...n]=e,r=t.endsWith("?"),a=t.replace(/\?$/,"");if(n.length===0)return r?[a,""]:[a];let i=sA(n.join("/")),o=[];return o.push(...i.map(c=>c===""?a:[a,c].join("/"))),r&&o.push(...i),o.map(c=>s.startsWith("/")&&c===""?"/":c)}function are(s){s.sort((e,t)=>e.score!==t.score?t.score-e.score:fre(e.routesMeta.map(n=>n.childrenIndex),t.routesMeta.map(n=>n.childrenIndex)))}var ire=/^:[\w-]+$/,ore=3,lre=2,cre=1,ure=10,dre=-2,ZD=s=>s==="*";function hre(s,e){let t=s.split("/"),n=t.length;return t.some(ZD)&&(n+=dre),e&&(n+=lre),t.filter(r=>!ZD(r)).reduce((r,a)=>r+(ire.test(a)?ore:a===""?cre:ure),n)}function fre(s,e){return s.length===e.length&&s.slice(0,-1).every((n,r)=>n===e[r])?s[s.length-1]-e[e.length-1]:0}function pre(s,e,t=!1){let{routesMeta:n}=s,r={},a="/",i=[];for(let o=0;o<n.length;++o){let c=n[o],h=o===n.length-1,f=a==="/"?e:e.slice(a.length)||"/",p=ep({path:c.relativePath,caseSensitive:c.caseSensitive,end:h},f),y=c.route;if(!p&&h&&t&&!n[n.length-1].route.index&&(p=ep({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},f)),!p)return null;Object.assign(r,p.params),i.push({params:r,pathname:xa([a,p.pathname]),pathnameBase:Cre(xa([a,p.pathnameBase])),route:y}),p.pathnameBase!=="/"&&(a=xa([a,p.pathnameBase]))}return i}function ep(s,e){typeof s=="string"&&(s={path:s,caseSensitive:!1,end:!0});let[t,n]=gre(s.path,s.caseSensitive,s.end),r=e.match(t);if(!r)return null;let a=r[0],i=a.replace(/(.)\/+$/,"$1"),o=r.slice(1);return{params:n.reduce((h,{paramName:f,isOptional:p},y)=>{if(f==="*"){let E=o[y]||"";i=a.slice(0,a.length-E.length).replace(/(.)\/+$/,"$1")}const b=o[y];return p&&!b?h[f]=void 0:h[f]=(b||"").replace(/%2F/g,"/"),h},{}),pathname:a,pathnameBase:i,pattern:s}}function gre(s,e=!1,t=!0){ua(s==="*"||!s.endsWith("*")||s.endsWith("/*"),`Route path "${s}" will be treated as if it were "${s.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${s.replace(/\*$/,"/*")}".`);let n=[],r="^"+s.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,o,c)=>(n.push({paramName:o,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return s.endsWith("*")?(n.push({paramName:"*"}),r+=s==="*"||s==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):t?r+="\\/*$":s!==""&&s!=="/"&&(r+="(?:(?=\\/|$))"),[new RegExp(r,e?void 0:"i"),n]}function mre(s){try{return s.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return ua(!1,`The URL path "${s}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${e}).`),s}}function Na(s,e){if(e==="/")return s;if(!s.toLowerCase().startsWith(e.toLowerCase()))return null;let t=e.endsWith("/")?e.length-1:e.length,n=s.charAt(t);return n&&n!=="/"?null:s.slice(t)||"/"}function yre(s,e="/"){let{pathname:t,search:n="",hash:r=""}=typeof s=="string"?Wl(s):s;return{pathname:t?t.startsWith("/")?t:vre(t,e):e,search:Sre(n),hash:wre(r)}}function vre(s,e){let t=e.replace(/\/+$/,"").split("/");return s.split("/").forEach(r=>{r===".."?t.length>1&&t.pop():r!=="."&&t.push(r)}),t.length>1?t.join("/"):"/"}function X0(s,e,t,n){return`Cannot include a '${s}' character in a manually specified \`to.${e}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${t}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function bre(s){return s.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function aA(s){let e=bre(s);return e.map((t,n)=>n===e.length-1?t.pathname:t.pathnameBase)}function iA(s,e,t,n=!1){let r;typeof s=="string"?r=Wl(s):(r={...s},fn(!r.pathname||!r.pathname.includes("?"),X0("?","pathname","search",r)),fn(!r.pathname||!r.pathname.includes("#"),X0("#","pathname","hash",r)),fn(!r.search||!r.search.includes("#"),X0("#","search","hash",r)));let a=s===""||r.pathname==="",i=a?"/":r.pathname,o;if(i==null)o=t;else{let p=e.length-1;if(!n&&i.startsWith("..")){let y=i.split("/");for(;y[0]==="..";)y.shift(),p-=1;r.pathname=y.join("/")}o=p>=0?e[p]:"/"}let c=yre(r,o),h=i&&i!=="/"&&i.endsWith("/"),f=(a||i===".")&&t.endsWith("/");return!c.pathname.endsWith("/")&&(h||f)&&(c.pathname+="/"),c}var xa=s=>s.join("/").replace(/\/\/+/g,"/"),Cre=s=>s.replace(/\/+$/,"").replace(/^\/*/,"/"),Sre=s=>!s||s==="?"?"":s.startsWith("?")?s:"?"+s,wre=s=>!s||s==="#"?"":s.startsWith("#")?s:"#"+s;function Ere(s){return s!=null&&typeof s.status=="number"&&typeof s.statusText=="string"&&typeof s.internal=="boolean"&&"data"in s}var oA=["POST","PUT","PATCH","DELETE"];new Set(oA);var _re=["GET",...oA];new Set(_re);var Gl=P.createContext(null);Gl.displayName="DataRouter";var Up=P.createContext(null);Up.displayName="DataRouterState";P.createContext(!1);var lA=P.createContext({isTransitioning:!1});lA.displayName="ViewTransition";var Ore=P.createContext(new Map);Ore.displayName="Fetchers";var xre=P.createContext(null);xre.displayName="Await";var fa=P.createContext(null);fa.displayName="Navigation";var Xu=P.createContext(null);Xu.displayName="Location";var Ma=P.createContext({outlet:null,matches:[],isDataRoute:!1});Ma.displayName="Route";var Dw=P.createContext(null);Dw.displayName="RouteError";function Tre(s,{relative:e}={}){fn(Qu(),"useHref() may be used only in the context of a <Router> component.");let{basename:t,navigator:n}=P.useContext(fa),{hash:r,pathname:a,search:i}=Ju(s,{relative:e}),o=a;return t!=="/"&&(o=a==="/"?t:xa([t,a])),n.createHref({pathname:o,search:i,hash:r})}function Qu(){return P.useContext(Xu)!=null}function wo(){return fn(Qu(),"useLocation() may be used only in the context of a <Router> component."),P.useContext(Xu).location}var cA="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function uA(s){P.useContext(fa).static||P.useLayoutEffect(s)}function zp(){let{isDataRoute:s}=P.useContext(Ma);return s?Vre():Pre()}function Pre(){fn(Qu(),"useNavigate() may be used only in the context of a <Router> component.");let s=P.useContext(Gl),{basename:e,navigator:t}=P.useContext(fa),{matches:n}=P.useContext(Ma),{pathname:r}=wo(),a=JSON.stringify(aA(n)),i=P.useRef(!1);return uA(()=>{i.current=!0}),P.useCallback((c,h={})=>{if(ua(i.current,cA),!i.current)return;if(typeof c=="number"){t.go(c);return}let f=iA(c,JSON.parse(a),r,h.relative==="path");s==null&&e!=="/"&&(f.pathname=f.pathname==="/"?e:xa([e,f.pathname])),(h.replace?t.replace:t.push)(f,h.state,h)},[e,t,a,r,s])}P.createContext(null);function Ju(s,{relative:e}={}){let{matches:t}=P.useContext(Ma),{pathname:n}=wo(),r=JSON.stringify(aA(t));return P.useMemo(()=>iA(s,JSON.parse(r),n,e==="path"),[s,r,n,e])}function Ire(s,e){return dA(s,e)}function dA(s,e,t,n,r){fn(Qu(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=P.useContext(fa),{matches:i}=P.useContext(Ma),o=i[i.length-1],c=o?o.params:{},h=o?o.pathname:"/",f=o?o.pathnameBase:"/",p=o&&o.route;{let x=p&&p.path||"";hA(h,!p||x.endsWith("*")||x.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${h}" (under <Route path="${x}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
66
66
 
67
- Please change the parent <Route path="${x}"> to <Route path="${x==="/"?"*":`${x}/*`}">.`)}let y=wo(),b;if(e){let x=typeof e=="string"?Wl(e):e;fn(f==="/"||x.pathname?.startsWith(f),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${f}" but pathname "${x.pathname}" was given in the \`location\` prop.`),b=x}else b=y;let E=b.pathname||"/",C=E;if(f!=="/"){let x=f.replace(/^\//,"").split("/");C="/"+E.replace(/^\//,"").split("/").slice(x.length).join("/")}let S=nA(s,{pathname:C});ua(p||S!=null,`No routes matched location "${b.pathname}${b.search}${b.hash}" `),ua(S==null||S[S.length-1].route.element!==void 0||S[S.length-1].route.Component!==void 0||S[S.length-1].route.lazy!==void 0,`Matched leaf route at location "${b.pathname}${b.search}${b.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let w=Are(S&&S.map(x=>Object.assign({},x,{params:Object.assign({},c,x.params),pathname:xa([f,a.encodeLocation?a.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?f:xa([f,a.encodeLocation?a.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),i,t,n,r);return e&&w?P.createElement(Xu.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...b},navigationType:"POP"}},w):w}function Dre(){let s=jre(),e=Ere(s)?`${s.status} ${s.statusText}`:s instanceof Error?s.message:JSON.stringify(s),t=s instanceof Error?s.stack:null,n="rgba(200,200,200, 0.5)",r={padding:"0.5rem",backgroundColor:n},a={padding:"2px 4px",backgroundColor:n},i=null;return console.error("Error handled by React Router default ErrorBoundary:",s),i=P.createElement(P.Fragment,null,P.createElement("p",null,"💿 Hey developer 👋"),P.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",P.createElement("code",{style:a},"ErrorBoundary")," or"," ",P.createElement("code",{style:a},"errorElement")," prop on your route.")),P.createElement(P.Fragment,null,P.createElement("h2",null,"Unexpected Application Error!"),P.createElement("h3",{style:{fontStyle:"italic"}},e),t?P.createElement("pre",{style:r},t):null,i)}var Rre=P.createElement(Dre,null),kre=class extends P.Component{constructor(s){super(s),this.state={location:s.location,revalidation:s.revalidation,error:s.error}}static getDerivedStateFromError(s){return{error:s}}static getDerivedStateFromProps(s,e){return e.location!==s.location||e.revalidation!=="idle"&&s.revalidation==="idle"?{error:s.error,location:s.location,revalidation:s.revalidation}:{error:s.error!==void 0?s.error:e.error,location:e.location,revalidation:s.revalidation||e.revalidation}}componentDidCatch(s,e){this.props.unstable_onError?this.props.unstable_onError(s,e):console.error("React Router caught the following error during render",s)}render(){return this.state.error!==void 0?P.createElement(Ma.Provider,{value:this.props.routeContext},P.createElement(Dw.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Nre({routeContext:s,match:e,children:t}){let n=P.useContext(Gl);return n&&n.static&&n.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=e.route.id),P.createElement(Ma.Provider,{value:s},t)}function Are(s,e=[],t=null,n=null,r=null){if(s==null){if(!t)return null;if(t.errors)s=t.matches;else if(e.length===0&&!t.initialized&&t.matches.length>0)s=t.matches;else return null}let a=s,i=t?.errors;if(i!=null){let h=a.findIndex(f=>f.route.id&&i?.[f.route.id]!==void 0);fn(h>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),a=a.slice(0,Math.min(a.length,h+1))}let o=!1,c=-1;if(t)for(let h=0;h<a.length;h++){let f=a[h];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(c=h),f.route.id){let{loaderData:p,errors:y}=t,b=f.route.loader&&!p.hasOwnProperty(f.route.id)&&(!y||y[f.route.id]===void 0);if(f.route.lazy||b){o=!0,c>=0?a=a.slice(0,c+1):a=[a[0]];break}}}return a.reduceRight((h,f,p)=>{let y,b=!1,E=null,C=null;t&&(y=i&&f.route.id?i[f.route.id]:void 0,E=f.route.errorElement||Rre,o&&(c<0&&p===0?(hA("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),b=!0,C=null):c===p&&(b=!0,C=f.route.hydrateFallbackElement||null)));let S=e.concat(a.slice(0,p+1)),w=()=>{let x;return y?x=E:b?x=C:f.route.Component?x=P.createElement(f.route.Component,null):f.route.element?x=f.route.element:x=h,P.createElement(Nre,{match:f,routeContext:{outlet:h,matches:S,isDataRoute:t!=null},children:x})};return t&&(f.route.ErrorBoundary||f.route.errorElement||p===0)?P.createElement(kre,{location:t.location,revalidation:t.revalidation,component:E,error:y,children:w(),routeContext:{outlet:null,matches:S,isDataRoute:!0},unstable_onError:n}):w()},null)}function Rw(s){return`${s} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Mre(s){let e=P.useContext(Gl);return fn(e,Rw(s)),e}function Fre(s){let e=P.useContext(Up);return fn(e,Rw(s)),e}function Lre(s){let e=P.useContext(Ma);return fn(e,Rw(s)),e}function kw(s){let e=Lre(s),t=e.matches[e.matches.length-1];return fn(t.route.id,`${s} can only be used on routes that contain a unique "id"`),t.route.id}function $re(){return kw("useRouteId")}function jre(){let s=P.useContext(Dw),e=Fre("useRouteError"),t=kw("useRouteError");return s!==void 0?s:e.errors?.[t]}function Vre(){let{router:s}=Mre("useNavigate"),e=kw("useNavigate"),t=P.useRef(!1);return uA(()=>{t.current=!0}),P.useCallback(async(r,a={})=>{ua(t.current,cA),t.current&&(typeof r=="number"?s.navigate(r):await s.navigate(r,{fromRouteId:e,...a}))},[s,e])}var XD={};function hA(s,e,t){!e&&!XD[s]&&(XD[s]=!0,ua(!1,t))}P.memo(Bre);function Bre({routes:s,future:e,state:t,unstable_onError:n}){return dA(s,void 0,t,n,e)}function il(s){fn(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Hre({basename:s="/",children:e=null,location:t,navigationType:n="POP",navigator:r,static:a=!1}){fn(!Qu(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let i=s.replace(/^\/*/,"/"),o=P.useMemo(()=>({basename:i,navigator:r,static:a,future:{}}),[i,r,a]);typeof t=="string"&&(t=Wl(t));let{pathname:c="/",search:h="",hash:f="",state:p=null,key:y="default"}=t,b=P.useMemo(()=>{let E=Na(c,i);return E==null?null:{location:{pathname:E,search:h,hash:f,state:p,key:y},navigationType:n}},[i,c,h,f,p,y,n]);return ua(b!=null,`<Router basename="${i}"> is not able to match the URL "${c}${h}${f}" because it does not start with the basename, so the <Router> won't render anything.`),b==null?null:P.createElement(fa.Provider,{value:o},P.createElement(Xu.Provider,{children:e,value:b}))}function Ure({children:s,location:e}){return Ire($C(s),e)}function $C(s,e=[]){let t=[];return P.Children.forEach(s,(n,r)=>{if(!P.isValidElement(n))return;let a=[...e,r];if(n.type===P.Fragment){t.push.apply(t,$C(n.props.children,a));return}fn(n.type===il,`[${typeof n.type=="string"?n.type:n.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),fn(!n.props.index||!n.props.children,"An index route cannot have child routes.");let i={id:n.props.id||a.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,hydrateFallbackElement:n.props.hydrateFallbackElement,HydrateFallback:n.props.HydrateFallback,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.hasErrorBoundary===!0||n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(i.children=$C(n.props.children,a)),t.push(i)}),t}var Rf="get",kf="application/x-www-form-urlencoded";function Kp(s){return s!=null&&typeof s.tagName=="string"}function zre(s){return Kp(s)&&s.tagName.toLowerCase()==="button"}function Kre(s){return Kp(s)&&s.tagName.toLowerCase()==="form"}function qre(s){return Kp(s)&&s.tagName.toLowerCase()==="input"}function Wre(s){return!!(s.metaKey||s.altKey||s.ctrlKey||s.shiftKey)}function Gre(s,e){return s.button===0&&(!e||e==="_self")&&!Wre(s)}var mf=null;function Yre(){if(mf===null)try{new FormData(document.createElement("form"),0),mf=!1}catch{mf=!0}return mf}var Zre=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Q0(s){return s!=null&&!Zre.has(s)?(ua(!1,`"${s}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${kf}"`),null):s}function Xre(s,e){let t,n,r,a,i;if(Kre(s)){let o=s.getAttribute("action");n=o?Na(o,e):null,t=s.getAttribute("method")||Rf,r=Q0(s.getAttribute("enctype"))||kf,a=new FormData(s)}else if(zre(s)||qre(s)&&(s.type==="submit"||s.type==="image")){let o=s.form;if(o==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let c=s.getAttribute("formaction")||o.getAttribute("action");if(n=c?Na(c,e):null,t=s.getAttribute("formmethod")||o.getAttribute("method")||Rf,r=Q0(s.getAttribute("formenctype"))||Q0(o.getAttribute("enctype"))||kf,a=new FormData(o,s),!Yre()){let{name:h,type:f,value:p}=s;if(f==="image"){let y=h?`${h}.`:"";a.append(`${y}x`,"0"),a.append(`${y}y`,"0")}else h&&a.append(h,p)}}else{if(Kp(s))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');t=Rf,n=null,r=kf,i=s}return a&&r==="text/plain"&&(i=a,a=void 0),{action:n,method:t.toLowerCase(),encType:r,formData:a,body:i}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Nw(s,e){if(s===!1||s===null||typeof s>"u")throw new Error(e)}function Qre(s,e,t){let n=typeof s=="string"?new URL(s,typeof window>"u"?"server://singlefetch/":window.location.origin):s;return n.pathname==="/"?n.pathname=`_root.${t}`:e&&Na(n.pathname,e)==="/"?n.pathname=`${e.replace(/\/$/,"")}/_root.${t}`:n.pathname=`${n.pathname.replace(/\/$/,"")}.${t}`,n}async function Jre(s,e){if(s.id in e)return e[s.id];try{let t=await import(s.module);return e[s.id]=t,t}catch(t){return console.error(`Error loading route module \`${s.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function ese(s){return s==null?!1:s.href==null?s.rel==="preload"&&typeof s.imageSrcSet=="string"&&typeof s.imageSizes=="string":typeof s.rel=="string"&&typeof s.href=="string"}async function tse(s,e,t){let n=await Promise.all(s.map(async r=>{let a=e.routes[r.route.id];if(a){let i=await Jre(a,t);return i.links?i.links():[]}return[]}));return ase(n.flat(1).filter(ese).filter(r=>r.rel==="stylesheet"||r.rel==="preload").map(r=>r.rel==="stylesheet"?{...r,rel:"prefetch",as:"style"}:{...r,rel:"prefetch"}))}function QD(s,e,t,n,r,a){let i=(c,h)=>t[h]?c.route.id!==t[h].route.id:!0,o=(c,h)=>t[h].pathname!==c.pathname||t[h].route.path?.endsWith("*")&&t[h].params["*"]!==c.params["*"];return a==="assets"?e.filter((c,h)=>i(c,h)||o(c,h)):a==="data"?e.filter((c,h)=>{let f=n.routes[c.route.id];if(!f||!f.hasLoader)return!1;if(i(c,h)||o(c,h))return!0;if(c.route.shouldRevalidate){let p=c.route.shouldRevalidate({currentUrl:new URL(r.pathname+r.search+r.hash,window.origin),currentParams:t[0]?.params||{},nextUrl:new URL(s,window.origin),nextParams:c.params,defaultShouldRevalidate:!0});if(typeof p=="boolean")return p}return!0}):[]}function nse(s,e,{includeHydrateFallback:t}={}){return rse(s.map(n=>{let r=e.routes[n.route.id];if(!r)return[];let a=[r.module];return r.clientActionModule&&(a=a.concat(r.clientActionModule)),r.clientLoaderModule&&(a=a.concat(r.clientLoaderModule)),t&&r.hydrateFallbackModule&&(a=a.concat(r.hydrateFallbackModule)),r.imports&&(a=a.concat(r.imports)),a}).flat(1))}function rse(s){return[...new Set(s)]}function sse(s){let e={},t=Object.keys(s).sort();for(let n of t)e[n]=s[n];return e}function ase(s,e){let t=new Set;return new Set(e),s.reduce((n,r)=>{let a=JSON.stringify(sse(r));return t.has(a)||(t.add(a),n.push({key:a,link:r})),n},[])}function fA(){let s=P.useContext(Gl);return Nw(s,"You must render this element inside a <DataRouterContext.Provider> element"),s}function ise(){let s=P.useContext(Up);return Nw(s,"You must render this element inside a <DataRouterStateContext.Provider> element"),s}var Aw=P.createContext(void 0);Aw.displayName="FrameworkContext";function pA(){let s=P.useContext(Aw);return Nw(s,"You must render this element inside a <HydratedRouter> element"),s}function ose(s,e){let t=P.useContext(Aw),[n,r]=P.useState(!1),[a,i]=P.useState(!1),{onFocus:o,onBlur:c,onMouseEnter:h,onMouseLeave:f,onTouchStart:p}=e,y=P.useRef(null);P.useEffect(()=>{if(s==="render"&&i(!0),s==="viewport"){let C=w=>{w.forEach(x=>{i(x.isIntersecting)})},S=new IntersectionObserver(C,{threshold:.5});return y.current&&S.observe(y.current),()=>{S.disconnect()}}},[s]),P.useEffect(()=>{if(n){let C=setTimeout(()=>{i(!0)},100);return()=>{clearTimeout(C)}}},[n]);let b=()=>{r(!0)},E=()=>{r(!1),i(!1)};return t?s!=="intent"?[a,y,{}]:[a,y,{onFocus:zc(o,b),onBlur:zc(c,E),onMouseEnter:zc(h,b),onMouseLeave:zc(f,E),onTouchStart:zc(p,b)}]:[!1,y,{}]}function zc(s,e){return t=>{s&&s(t),t.defaultPrevented||e(t)}}function lse({page:s,...e}){let{router:t}=fA(),n=P.useMemo(()=>nA(t.routes,s,t.basename),[t.routes,s,t.basename]);return n?P.createElement(use,{page:s,matches:n,...e}):null}function cse(s){let{manifest:e,routeModules:t}=pA(),[n,r]=P.useState([]);return P.useEffect(()=>{let a=!1;return tse(s,e,t).then(i=>{a||r(i)}),()=>{a=!0}},[s,e,t]),n}function use({page:s,matches:e,...t}){let n=wo(),{manifest:r,routeModules:a}=pA(),{basename:i}=fA(),{loaderData:o,matches:c}=ise(),h=P.useMemo(()=>QD(s,e,c,r,n,"data"),[s,e,c,r,n]),f=P.useMemo(()=>QD(s,e,c,r,n,"assets"),[s,e,c,r,n]),p=P.useMemo(()=>{if(s===n.pathname+n.search+n.hash)return[];let E=new Set,C=!1;if(e.forEach(w=>{let x=r.routes[w.route.id];!x||!x.hasLoader||(!h.some(O=>O.route.id===w.route.id)&&w.route.id in o&&a[w.route.id]?.shouldRevalidate||x.hasClientLoader?C=!0:E.add(w.route.id))}),E.size===0)return[];let S=Qre(s,i,"data");return C&&E.size>0&&S.searchParams.set("_routes",e.filter(w=>E.has(w.route.id)).map(w=>w.route.id).join(",")),[S.pathname+S.search]},[i,o,n,r,h,e,s,a]),y=P.useMemo(()=>nse(f,r),[f,r]),b=cse(f);return P.createElement(P.Fragment,null,p.map(E=>P.createElement("link",{key:E,rel:"prefetch",as:"fetch",href:E,...t})),y.map(E=>P.createElement("link",{key:E,rel:"modulepreload",href:E,...t})),b.map(({key:E,link:C})=>P.createElement("link",{key:E,nonce:t.nonce,...C})))}function dse(...s){return e=>{s.forEach(t=>{typeof t=="function"?t(e):t!=null&&(t.current=e)})}}var gA=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{gA&&(window.__reactRouterVersion="7.8.2")}catch{}function hse({basename:s,children:e,window:t}){let n=P.useRef();n.current==null&&(n.current=ere({window:t,v5Compat:!0}));let r=n.current,[a,i]=P.useState({action:r.action,location:r.location}),o=P.useCallback(c=>{P.startTransition(()=>i(c))},[i]);return P.useLayoutEffect(()=>r.listen(o),[r,o]),P.createElement(Hre,{basename:s,children:e,location:a.location,navigationType:a.action,navigator:r})}var mA=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,yA=P.forwardRef(function({onClick:e,discover:t="render",prefetch:n="none",relative:r,reloadDocument:a,replace:i,state:o,target:c,to:h,preventScrollReset:f,viewTransition:p,...y},b){let{basename:E}=P.useContext(fa),C=typeof h=="string"&&mA.test(h),S,w=!1;if(typeof h=="string"&&C&&(S=h,gA))try{let F=new URL(window.location.href),j=h.startsWith("//")?new URL(F.protocol+h):new URL(h),V=Na(j.pathname,E);j.origin===F.origin&&V!=null?h=V+j.search+j.hash:w=!0}catch{ua(!1,`<Link to="${h}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let x=Tre(h,{relative:r}),[O,T,D]=ose(n,y),R=mse(h,{replace:i,state:o,target:c,preventScrollReset:f,relative:r,viewTransition:p});function k(F){e&&e(F),F.defaultPrevented||R(F)}let M=P.createElement("a",{...y,...D,href:S||x,onClick:w||a?e:k,ref:dse(b,T),target:c,"data-discover":!C&&t==="render"?"true":void 0});return O&&!C?P.createElement(P.Fragment,null,M,P.createElement(lse,{page:x})):M});yA.displayName="Link";var fse=P.forwardRef(function({"aria-current":e="page",caseSensitive:t=!1,className:n="",end:r=!1,style:a,to:i,viewTransition:o,children:c,...h},f){let p=Ju(i,{relative:h.relative}),y=wo(),b=P.useContext(Up),{navigator:E,basename:C}=P.useContext(fa),S=b!=null&&Sse(p)&&o===!0,w=E.encodeLocation?E.encodeLocation(p).pathname:p.pathname,x=y.pathname,O=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;t||(x=x.toLowerCase(),O=O?O.toLowerCase():null,w=w.toLowerCase()),O&&C&&(O=Na(O,C)||O);const T=w!=="/"&&w.endsWith("/")?w.length-1:w.length;let D=x===w||!r&&x.startsWith(w)&&x.charAt(T)==="/",R=O!=null&&(O===w||!r&&O.startsWith(w)&&O.charAt(w.length)==="/"),k={isActive:D,isPending:R,isTransitioning:S},M=D?e:void 0,F;typeof n=="function"?F=n(k):F=[n,D?"active":null,R?"pending":null,S?"transitioning":null].filter(Boolean).join(" ");let j=typeof a=="function"?a(k):a;return P.createElement(yA,{...h,"aria-current":M,className:F,ref:f,style:j,to:i,viewTransition:o},typeof c=="function"?c(k):c)});fse.displayName="NavLink";var pse=P.forwardRef(({discover:s="render",fetcherKey:e,navigate:t,reloadDocument:n,replace:r,state:a,method:i=Rf,action:o,onSubmit:c,relative:h,preventScrollReset:f,viewTransition:p,...y},b)=>{let E=bse(),C=Cse(o,{relative:h}),S=i.toLowerCase()==="get"?"get":"post",w=typeof o=="string"&&mA.test(o),x=O=>{if(c&&c(O),O.defaultPrevented)return;O.preventDefault();let T=O.nativeEvent.submitter,D=T?.getAttribute("formmethod")||i;E(T||O.currentTarget,{fetcherKey:e,method:D,navigate:t,replace:r,state:a,relative:h,preventScrollReset:f,viewTransition:p})};return P.createElement("form",{ref:b,method:S,action:C,onSubmit:n?c:x,...y,"data-discover":!w&&s==="render"?"true":void 0})});pse.displayName="Form";function gse(s){return`${s} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function vA(s){let e=P.useContext(Gl);return fn(e,gse(s)),e}function mse(s,{target:e,replace:t,state:n,preventScrollReset:r,relative:a,viewTransition:i}={}){let o=zp(),c=wo(),h=Ju(s,{relative:a});return P.useCallback(f=>{if(Gre(f,e)){f.preventDefault();let p=t!==void 0?t:bu(c)===bu(h);o(s,{replace:p,state:n,preventScrollReset:r,relative:a,viewTransition:i})}},[c,o,h,t,n,e,s,r,a,i])}var yse=0,vse=()=>`__${String(++yse)}__`;function bse(){let{router:s}=vA("useSubmit"),{basename:e}=P.useContext(fa),t=$re();return P.useCallback(async(n,r={})=>{let{action:a,method:i,encType:o,formData:c,body:h}=Xre(n,e);if(r.navigate===!1){let f=r.fetcherKey||vse();await s.fetch(f,t,r.action||a,{preventScrollReset:r.preventScrollReset,formData:c,body:h,formMethod:r.method||i,formEncType:r.encType||o,flushSync:r.flushSync})}else await s.navigate(r.action||a,{preventScrollReset:r.preventScrollReset,formData:c,body:h,formMethod:r.method||i,formEncType:r.encType||o,replace:r.replace,state:r.state,fromRouteId:t,flushSync:r.flushSync,viewTransition:r.viewTransition})},[s,e,t])}function Cse(s,{relative:e}={}){let{basename:t}=P.useContext(fa),n=P.useContext(Ma);fn(n,"useFormAction must be used inside a RouteContext");let[r]=n.matches.slice(-1),a={...Ju(s||".",{relative:e})},i=wo();if(s==null){a.search=i.search;let o=new URLSearchParams(a.search),c=o.getAll("index");if(c.some(f=>f==="")){o.delete("index"),c.filter(p=>p).forEach(p=>o.append("index",p));let f=o.toString();a.search=f?`?${f}`:""}}return(!s||s===".")&&r.route.index&&(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index"),t!=="/"&&(a.pathname=a.pathname==="/"?t:xa([t,a.pathname])),bu(a)}function Sse(s,{relative:e}={}){let t=P.useContext(lA);fn(t!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=vA("useViewTransitionState"),r=Ju(s,{relative:e});if(!t.isTransitioning)return!1;let a=Na(t.currentLocation.pathname,n)||t.currentLocation.pathname,i=Na(t.nextLocation.pathname,n)||t.nextLocation.pathname;return ep(r.pathname,i)!=null||ep(r.pathname,a)!=null}const wse=document.getElementById(Iw),JD=wse.contentWindow;class Ese{ws;connectTimeoutTimer;isTimeout=!1;init(e){this.connectTimeoutTimer&&(clearTimeout(this.connectTimeoutTimer),this.connectTimeoutTimer=void 0),this.ws&&(this.ws.close(),this.ws=void 0),this.isTimeout=!1;const t=`ws://${e.clientHost}:${e.clientWsPort||e.clientHttpPort-1}`;console.info(`⌛️ ${H("startConnectClientWS",{wsURL:t})}`);const n=new WebSocket(t);this.connectTimeoutTimer=setTimeout(()=>{n.readyState!==WebSocket.OPEN&&(this.isTimeout=!0,n.close(),console.error(`${H("clientConnectTimeout")||"客户端连接超时"}`),Ct.emit("connectionChange",{node:Ue.get("isNodeWSConnected"),client:!1,from:"client"}),WD())},5e3),n.onclose=()=>{this.connectTimeoutTimer&&(clearTimeout(this.connectTimeoutTimer),this.connectTimeoutTimer=void 0),this.isTimeout||(console.error(`${H("clientServerDisconnected")}`),Ct.emit("connectionChange",{node:Ue.get("isNodeWSConnected"),client:!1}),WD())},n.onerror=()=>{if(this.connectTimeoutTimer&&(clearTimeout(this.connectTimeoutTimer),this.connectTimeoutTimer=void 0),!this.isTimeout){const r=H("clientServerStartError");Ct.emit("connectionChange",{node:Ue.get("isNodeWSConnected"),client:!1}),console.error(r)}},this.ws=n,n.onopen=()=>{this.connectTimeoutTimer&&(clearTimeout(this.connectTimeoutTimer),this.connectTimeoutTimer=void 0),this.isTimeout||(console.log(`✅ ${H("clientConnectedSuccess")}`),Ct.emit("connectionChange",{node:Ue.get("isNodeWSConnected"),client:!0,from:"client"}),n.send(JSON.stringify({stage:"connecting",status:"success",message:"Browser connected to Client Server Successfully"})))},n.onmessage=function(r){try{const a=JSON.parse(r.data);switch(a?.method){case"subscribeHandler":JD.__DEV__?.subscribeHandler?.(a?.payload?.event,a?.payload?.data);break;case"invokeHandler":JD.__DEV__?.invokeHandler?.(a?.payload?.callbackId,a?.payload?.data);break;default:break}}catch(a){console.error(a)}}}send(e){this.ws?.readyState&&(e.from="browser",this.ws?.send(JSON.stringify(e)))}close(){this.connectTimeoutTimer&&(clearTimeout(this.connectTimeoutTimer),this.connectTimeoutTimer=void 0),this.ws?.close(),this.ws=void 0}}const ed=new Ese,_se={start:{msgKey:"uploadGameStart"},success:{msgKey:"uploadGameSuccess",handle:s=>{const{packages:e,clientKey:t}=s||{};Ue.setMultiple({packages:e,clientKey:t,isResourcesReady:!0}),Ct.emit("setupStatusChange",{isScriptsReady:Ue.get("isScriptsReady"),isResourcesReady:!0})}},process:{msgKey:"uploadProcess"},error:{msgKey:"uploadError",handle:s=>{const{msg:e}=s||{};Ue.set("isResourcesReady",!1),Ct.emit("setupStatusChange",{isScriptsReady:Ue.get("isScriptsReady"),isResourcesReady:!1,isResourcesFailed:!0})}},restart:{msgKey:"uploadGameRestart"}};function Ose(s){const{status:e,payload:t}=s,n=_se[e];if(!n){console.warn(`Unknown upload status: ${e}`);return}const r=H(n.msgKey);Ct.emit("uploadGame",{status:e,msg:r,progress:t?.progress}),n.handle&&n.handle(t)}class xse{ws;init(){const e=Ue.get("nodeWsPort");return console.info(`⌛️ ${H("nodeServerStartConnect")}`),this.ws=new WebSocket(`ws://localhost:${e}`),this.ws.onclose=()=>{console.error(`❌ ${H("nodeServerDisconnect")}`),Ct.emit("connectionChange",{node:!1,client:Ue.get("isClientWSConnected")})},this.ws.onerror=()=>{const t=H("nodeServerStartError");console.error(t)},this.ws.onopen=()=>{console.log(`✅ ${H("nodeServerConnectedSuccess")}`),Ct.emit("connectionChange",{node:!0,client:Ue.get("isClientWSConnected")}),this.ws?.send(JSON.stringify({event:"connected",method:"connected",from:"browser"}))},this.ws.onmessage=t=>{if(t.data){const n=JSON.parse(t.data);switch(n.method){case"uploadStatus":{Ose(n);break}case"compilationStatus":{Ct.emit("compilationStatus",n.payload);break}case"resourceChange":{oa.info("Node WS resourceChange",n?.payload),Ct.emit("resourceChange",{});break}case"scanQRCodeSuccess":{const{clientWsPort:a,clientHost:i,clientHttpPort:o}=n.payload;Ue.setMultiple({clientHost:i,clientWsPort:a,clientHttpPort:o}),ed.init({clientWsPort:a,clientHost:i,clientHttpPort:o}),Ct.emit("scanQRCode",{status:"success"});break}case"scanQRCodeFailed":{const{msg:a}=n.payload;Ct.emit("scanQRCode",{status:"failed",msg:a});break}case"scanQRCodeStart":{Ct.emit("scanQRCode",{status:"start"});break}}}},!0}send(e){e.from="browser",this.ws?.send(JSON.stringify(e))}close(){this.ws?.close(),this.ws=void 0}}const Cu=new xse,Tse=["krypton.js","ttmg-core.js"];async function eR(s){try{const e=eA();console.log(`⌛️ ${H("startDebug")}`),console.log(`⌛️ ${H("initClientEnv")}`);const t=await Xr({url:`${e}/game/cwd`,method:"POST",data:{command:"start"}});if(console.log("cwd result",t),console.log(`✅ ${H("initClientEnvSuccess")}`),ed.send({method:"setDebugSettings",payload:s.debugSetting}),s.debugMode==="clientPreview"||s.debugMode==="clientDebug")Ue.set("isScriptsReady",!0),Cu.send({method:"startUpload"});else{console.log(`⌛️ ${H("startInitJSDevEnv")}`);const r=document.getElementById(Iw).contentWindow;r.__DEV__={isEnable:!0,server:e},console.log(`✅ ${H("initJSDevEnvSuccess")}`);const a=await Pse(r,Tse,e),i=Object.values(a).some(o=>!o);Ue.set("isScriptsReady",Object.values(a).every(o=>o)),Ct.emit("setupStatusChange",{isScriptsReady:Ue.get("isScriptsReady"),isResourcesReady:Ue.get("isResourcesReady"),isScriptsFailed:i}),i||(console.log(`✅ ${H("setDevScriptsSuccess")}`),Cu.send({method:"startUpload"}))}}catch(e){console.log(`❌ ${H("setDevEnvFailed")}`,e?.message??e)}}async function Pse(s,e,t){const n={};for(const r of e)try{console.log(`⏳ ${H("startLoadDevScripts")}: ${r}`);const a=await fetch(`${t}/game/scripts/${r}`);if(!a.ok){console.error(`${H("loadDevScriptsFailed")}: ${r}`),n[r]=!1;continue}const i=await a.text();if(!i){console.error(`${H("loadDevScriptsEmpty")}: ${r}`),n[r]=!1;continue}console.log(`✅ ${H("loadDevScriptsSuccess")}: ${r}`);const o=s.document.createElement("script");o.id=r,o.type="text/javascript",o.text=i,s.document.body.appendChild(o),n[r]=!0,console.log(`✅ ${H("loadDevScriptsInitSuccess")}: ${r}`)}catch(a){console.error(`${H("loadDevScriptsFailed")}: ${r}`,a),n[r]=!1}return n}function Ise(){const s=()=>typeof document<"u"?document.hidden:!1,[e,t]=P.useState(s);return P.useEffect(()=>{const n=()=>{t(document.hidden),ed.send({method:"sendPageVisibility",payload:{isHidden:document.hidden}})};return document.addEventListener("visibilitychange",n),()=>{document.removeEventListener("visibilitychange",n)}},[]),e}const Dse=m.memo(()=>{const{setMessage:s,hideLoading:e,state:{gameDetail:t,debugSetting:n,isConnected:r,selectedLaunchOption:a,debugMode:i}}=Qr();Ise();const[o,c]=P.useState(""),h=E=>{if(!E.client||!E.node){Ue.set("hasSetup",!1);return}if(Ue.get("hasSetup"))return;Ue.set("hasSetup",!0),(async()=>{e(),s({type:"success",desc:H("setupDevEnv")}),await eR({debugSetting:n,debugMode:i})})()},f=P.useCallback(({status:E,msg:C,progress:S})=>{switch(E){case"start":const w=`⌛️ ${H("uploadStart")}`;s({type:"info",desc:w}),console.log(w);break;case"success":s({type:"success",desc:H("uploadSuccess")}),console.log(`✅ ${H("uploadSuccess")}`);break;case"error":const x=`${H("uploadError")}: ${C}`;s({type:"danger",desc:x}),console.log(x);break;case"restart":break;case"process":const O=`${H("uploadProcess")} ${(S*100).toFixed(0)}%`;s({type:"info",desc:O});break}},[]),p=P.useCallback(({isScriptsReady:E,isResourcesReady:C,isScriptsFailed:S,isResourcesFailed:w})=>{E&&C?(oa.info("scripts and resources are ready, send meta"),Wne(t),s({type:"success",desc:H(i==="clientPreview"?"clientPreviewEnvSetupSuccess":"debugEnvSetupSuccess")})):S?s({type:"danger",desc:H("scriptsSetupFailed")}):w&&s({type:"danger",desc:H("resourcesSetupFailed")})},[t,a,i]),y=()=>{if(!r)return;const E=ia.warning({position:"top",duration:1e4,title:H("gameResourceUpdated"),id:o,onClose:()=>{c("")},content:A.jsxs(A.Fragment,{children:[A.jsx("p",{children:H("gameResourceChange")}),A.jsxs("div",{className:"banner-footer",children:[A.jsx(Xe,{type:"tertiary",onClick:()=>{ia.close(E)},children:H("notUpload")}),A.jsx(Xe,{style:{marginLeft:12},type:"warning",onClick:()=>{oa.info("upload"),oa.info("upload iframe onload, 开始重新初始化"),eR({debugSetting:n,debugMode:i}),ia.close(E)},children:H("uploadToClient")})]})]})});c(E)},b=P.useCallback(({status:E,errorMsg:C})=>{E==="start"?(s({type:"info",title:H("gameResourceCompilingTitle"),desc:H("gameResourceCompiling")}),console.warn(`⚠️ ${H("gameResourceCompiling")}`)):E==="end"&&(C?(s({type:"danger",desc:C}),console.error(`❌ ${C}`)):(s({type:"success",title:H("gameResourceCompileSuccessTitle"),desc:H("gameResourceCompileSuccess")}),console.log(`✅ ${H("gameResourceCompileSuccess")}`)))},[]);return P.useEffect(()=>(Ct.on("connectionChange",h),Ct.on("compilationStatus",b),Ct.on("resourceChange",y),Ct.on("uploadGame",f),Ct.on("setupStatusChange",p),()=>{Ct.off("compilationStatus",b),Ct.off("resourceChange",y),Ct.off("setupStatusChange",p),Ct.off("uploadGame",f),Ct.off("connectionChange",h)}),[h,b,y,p,f]),null});var sl={},J0,tR;function bA(){return tR||(tR=1,J0={L:1,M:0,Q:3,H:2}),J0}var eC,nR;function CA(){return nR||(nR=1,eC={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8}),eC}var tC,rR;function Rse(){if(rR)return tC;rR=1;var s=CA();function e(t){this.mode=s.MODE_8BIT_BYTE,this.data=t}return e.prototype={getLength:function(t){return this.data.length},write:function(t){for(var n=0;n<this.data.length;n++)t.put(this.data.charCodeAt(n),8)}},tC=e,tC}var nC,sR;function kse(){if(sR)return nC;sR=1;var s=bA();function e(t,n){this.totalCount=t,this.dataCount=n}return e.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],e.getRSBlocks=function(t,n){var r=e.getRsBlockTable(t,n);if(r==null)throw new Error("bad rs block @ typeNumber:"+t+"/errorCorrectLevel:"+n);for(var a=r.length/3,i=new Array,o=0;o<a;o++)for(var c=r[o*3+0],h=r[o*3+1],f=r[o*3+2],p=0;p<c;p++)i.push(new e(h,f));return i},e.getRsBlockTable=function(t,n){switch(n){case s.L:return e.RS_BLOCK_TABLE[(t-1)*4+0];case s.M:return e.RS_BLOCK_TABLE[(t-1)*4+1];case s.Q:return e.RS_BLOCK_TABLE[(t-1)*4+2];case s.H:return e.RS_BLOCK_TABLE[(t-1)*4+3];default:return}},nC=e,nC}var rC,aR;function Nse(){if(aR)return rC;aR=1;function s(){this.buffer=new Array,this.length=0}return s.prototype={get:function(e){var t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)==1},put:function(e,t){for(var n=0;n<t;n++)this.putBit((e>>>t-n-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},rC=s,rC}var sC,iR;function SA(){if(iR)return sC;iR=1;for(var s={glog:function(t){if(t<1)throw new Error("glog("+t+")");return s.LOG_TABLE[t]},gexp:function(t){for(;t<0;)t+=255;for(;t>=256;)t-=255;return s.EXP_TABLE[t]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},e=0;e<8;e++)s.EXP_TABLE[e]=1<<e;for(var e=8;e<256;e++)s.EXP_TABLE[e]=s.EXP_TABLE[e-4]^s.EXP_TABLE[e-5]^s.EXP_TABLE[e-6]^s.EXP_TABLE[e-8];for(var e=0;e<255;e++)s.LOG_TABLE[s.EXP_TABLE[e]]=e;return sC=s,sC}var aC,oR;function wA(){if(oR)return aC;oR=1;var s=SA();function e(t,n){if(t.length==null)throw new Error(t.length+"/"+n);for(var r=0;r<t.length&&t[r]==0;)r++;this.num=new Array(t.length-r+n);for(var a=0;a<t.length-r;a++)this.num[a]=t[a+r]}return e.prototype={get:function(t){return this.num[t]},getLength:function(){return this.num.length},multiply:function(t){for(var n=new Array(this.getLength()+t.getLength()-1),r=0;r<this.getLength();r++)for(var a=0;a<t.getLength();a++)n[r+a]^=s.gexp(s.glog(this.get(r))+s.glog(t.get(a)));return new e(n,0)},mod:function(t){if(this.getLength()-t.getLength()<0)return this;for(var n=s.glog(this.get(0))-s.glog(t.get(0)),r=new Array(this.getLength()),a=0;a<this.getLength();a++)r[a]=this.get(a);for(var a=0;a<t.getLength();a++)r[a]^=s.gexp(s.glog(t.get(a))+n);return new e(r,0).mod(t)}},aC=e,aC}var iC,lR;function Ase(){if(lR)return iC;lR=1;var s=CA(),e=wA(),t=SA(),n={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},r={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(a){for(var i=a<<10;r.getBCHDigit(i)-r.getBCHDigit(r.G15)>=0;)i^=r.G15<<r.getBCHDigit(i)-r.getBCHDigit(r.G15);return(a<<10|i)^r.G15_MASK},getBCHTypeNumber:function(a){for(var i=a<<12;r.getBCHDigit(i)-r.getBCHDigit(r.G18)>=0;)i^=r.G18<<r.getBCHDigit(i)-r.getBCHDigit(r.G18);return a<<12|i},getBCHDigit:function(a){for(var i=0;a!=0;)i++,a>>>=1;return i},getPatternPosition:function(a){return r.PATTERN_POSITION_TABLE[a-1]},getMask:function(a,i,o){switch(a){case n.PATTERN000:return(i+o)%2==0;case n.PATTERN001:return i%2==0;case n.PATTERN010:return o%3==0;case n.PATTERN011:return(i+o)%3==0;case n.PATTERN100:return(Math.floor(i/2)+Math.floor(o/3))%2==0;case n.PATTERN101:return i*o%2+i*o%3==0;case n.PATTERN110:return(i*o%2+i*o%3)%2==0;case n.PATTERN111:return(i*o%3+(i+o)%2)%2==0;default:throw new Error("bad maskPattern:"+a)}},getErrorCorrectPolynomial:function(a){for(var i=new e([1],0),o=0;o<a;o++)i=i.multiply(new e([1,t.gexp(o)],0));return i},getLengthInBits:function(a,i){if(1<=i&&i<10)switch(a){case s.MODE_NUMBER:return 10;case s.MODE_ALPHA_NUM:return 9;case s.MODE_8BIT_BYTE:return 8;case s.MODE_KANJI:return 8;default:throw new Error("mode:"+a)}else if(i<27)switch(a){case s.MODE_NUMBER:return 12;case s.MODE_ALPHA_NUM:return 11;case s.MODE_8BIT_BYTE:return 16;case s.MODE_KANJI:return 10;default:throw new Error("mode:"+a)}else if(i<41)switch(a){case s.MODE_NUMBER:return 14;case s.MODE_ALPHA_NUM:return 13;case s.MODE_8BIT_BYTE:return 16;case s.MODE_KANJI:return 12;default:throw new Error("mode:"+a)}else throw new Error("type:"+i)},getLostPoint:function(a){for(var i=a.getModuleCount(),o=0,c=0;c<i;c++)for(var h=0;h<i;h++){for(var f=0,p=a.isDark(c,h),y=-1;y<=1;y++)if(!(c+y<0||i<=c+y))for(var b=-1;b<=1;b++)h+b<0||i<=h+b||y==0&&b==0||p==a.isDark(c+y,h+b)&&f++;f>5&&(o+=3+f-5)}for(var c=0;c<i-1;c++)for(var h=0;h<i-1;h++){var E=0;a.isDark(c,h)&&E++,a.isDark(c+1,h)&&E++,a.isDark(c,h+1)&&E++,a.isDark(c+1,h+1)&&E++,(E==0||E==4)&&(o+=3)}for(var c=0;c<i;c++)for(var h=0;h<i-6;h++)a.isDark(c,h)&&!a.isDark(c,h+1)&&a.isDark(c,h+2)&&a.isDark(c,h+3)&&a.isDark(c,h+4)&&!a.isDark(c,h+5)&&a.isDark(c,h+6)&&(o+=40);for(var h=0;h<i;h++)for(var c=0;c<i-6;c++)a.isDark(c,h)&&!a.isDark(c+1,h)&&a.isDark(c+2,h)&&a.isDark(c+3,h)&&a.isDark(c+4,h)&&!a.isDark(c+5,h)&&a.isDark(c+6,h)&&(o+=40);for(var C=0,h=0;h<i;h++)for(var c=0;c<i;c++)a.isDark(c,h)&&C++;var S=Math.abs(100*C/i/i-50)/5;return o+=S*10,o}};return iC=r,iC}var oC,cR;function Mse(){if(cR)return oC;cR=1;var s=Rse(),e=kse(),t=Nse(),n=Ase(),r=wA();function a(o,c){this.typeNumber=o,this.errorCorrectLevel=c,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var i=a.prototype;return i.addData=function(o){var c=new s(o);this.dataList.push(c),this.dataCache=null},i.isDark=function(o,c){if(o<0||this.moduleCount<=o||c<0||this.moduleCount<=c)throw new Error(o+","+c);return this.modules[o][c]},i.getModuleCount=function(){return this.moduleCount},i.make=function(){if(this.typeNumber<1){var o=1;for(o=1;o<40;o++){for(var c=e.getRSBlocks(o,this.errorCorrectLevel),h=new t,f=0,p=0;p<c.length;p++)f+=c[p].dataCount;for(var p=0;p<this.dataList.length;p++){var y=this.dataList[p];h.put(y.mode,4),h.put(y.getLength(),n.getLengthInBits(y.mode,o)),y.write(h)}if(h.getLengthInBits()<=f*8)break}this.typeNumber=o}this.makeImpl(!1,this.getBestMaskPattern())},i.makeImpl=function(o,c){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var h=0;h<this.moduleCount;h++){this.modules[h]=new Array(this.moduleCount);for(var f=0;f<this.moduleCount;f++)this.modules[h][f]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(o,c),this.typeNumber>=7&&this.setupTypeNumber(o),this.dataCache==null&&(this.dataCache=a.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,c)},i.setupPositionProbePattern=function(o,c){for(var h=-1;h<=7;h++)if(!(o+h<=-1||this.moduleCount<=o+h))for(var f=-1;f<=7;f++)c+f<=-1||this.moduleCount<=c+f||(0<=h&&h<=6&&(f==0||f==6)||0<=f&&f<=6&&(h==0||h==6)||2<=h&&h<=4&&2<=f&&f<=4?this.modules[o+h][c+f]=!0:this.modules[o+h][c+f]=!1)},i.getBestMaskPattern=function(){for(var o=0,c=0,h=0;h<8;h++){this.makeImpl(!0,h);var f=n.getLostPoint(this);(h==0||o>f)&&(o=f,c=h)}return c},i.createMovieClip=function(o,c,h){var f=o.createEmptyMovieClip(c,h),p=1;this.make();for(var y=0;y<this.modules.length;y++)for(var b=y*p,E=0;E<this.modules[y].length;E++){var C=E*p,S=this.modules[y][E];S&&(f.beginFill(0,100),f.moveTo(C,b),f.lineTo(C+p,b),f.lineTo(C+p,b+p),f.lineTo(C,b+p),f.endFill())}return f},i.setupTimingPattern=function(){for(var o=8;o<this.moduleCount-8;o++)this.modules[o][6]==null&&(this.modules[o][6]=o%2==0);for(var c=8;c<this.moduleCount-8;c++)this.modules[6][c]==null&&(this.modules[6][c]=c%2==0)},i.setupPositionAdjustPattern=function(){for(var o=n.getPatternPosition(this.typeNumber),c=0;c<o.length;c++)for(var h=0;h<o.length;h++){var f=o[c],p=o[h];if(this.modules[f][p]==null)for(var y=-2;y<=2;y++)for(var b=-2;b<=2;b++)y==-2||y==2||b==-2||b==2||y==0&&b==0?this.modules[f+y][p+b]=!0:this.modules[f+y][p+b]=!1}},i.setupTypeNumber=function(o){for(var c=n.getBCHTypeNumber(this.typeNumber),h=0;h<18;h++){var f=!o&&(c>>h&1)==1;this.modules[Math.floor(h/3)][h%3+this.moduleCount-8-3]=f}for(var h=0;h<18;h++){var f=!o&&(c>>h&1)==1;this.modules[h%3+this.moduleCount-8-3][Math.floor(h/3)]=f}},i.setupTypeInfo=function(o,c){for(var h=this.errorCorrectLevel<<3|c,f=n.getBCHTypeInfo(h),p=0;p<15;p++){var y=!o&&(f>>p&1)==1;p<6?this.modules[p][8]=y:p<8?this.modules[p+1][8]=y:this.modules[this.moduleCount-15+p][8]=y}for(var p=0;p<15;p++){var y=!o&&(f>>p&1)==1;p<8?this.modules[8][this.moduleCount-p-1]=y:p<9?this.modules[8][15-p-1+1]=y:this.modules[8][15-p-1]=y}this.modules[this.moduleCount-8][8]=!o},i.mapData=function(o,c){for(var h=-1,f=this.moduleCount-1,p=7,y=0,b=this.moduleCount-1;b>0;b-=2)for(b==6&&b--;;){for(var E=0;E<2;E++)if(this.modules[f][b-E]==null){var C=!1;y<o.length&&(C=(o[y]>>>p&1)==1);var S=n.getMask(c,f,b-E);S&&(C=!C),this.modules[f][b-E]=C,p--,p==-1&&(y++,p=7)}if(f+=h,f<0||this.moduleCount<=f){f-=h,h=-h;break}}},a.PAD0=236,a.PAD1=17,a.createData=function(o,c,h){for(var f=e.getRSBlocks(o,c),p=new t,y=0;y<h.length;y++){var b=h[y];p.put(b.mode,4),p.put(b.getLength(),n.getLengthInBits(b.mode,o)),b.write(p)}for(var E=0,y=0;y<f.length;y++)E+=f[y].dataCount;if(p.getLengthInBits()>E*8)throw new Error("code length overflow. ("+p.getLengthInBits()+">"+E*8+")");for(p.getLengthInBits()+4<=E*8&&p.put(0,4);p.getLengthInBits()%8!=0;)p.putBit(!1);for(;!(p.getLengthInBits()>=E*8||(p.put(a.PAD0,8),p.getLengthInBits()>=E*8));)p.put(a.PAD1,8);return a.createBytes(p,f)},a.createBytes=function(o,c){for(var h=0,f=0,p=0,y=new Array(c.length),b=new Array(c.length),E=0;E<c.length;E++){var C=c[E].dataCount,S=c[E].totalCount-C;f=Math.max(f,C),p=Math.max(p,S),y[E]=new Array(C);for(var w=0;w<y[E].length;w++)y[E][w]=255&o.buffer[w+h];h+=C;var x=n.getErrorCorrectPolynomial(S),O=new r(y[E],x.getLength()-1),T=O.mod(x);b[E]=new Array(x.getLength()-1);for(var w=0;w<b[E].length;w++){var D=w+T.getLength()-b[E].length;b[E][w]=D>=0?T.get(D):0}}for(var R=0,w=0;w<c.length;w++)R+=c[w].totalCount;for(var k=new Array(R),M=0,w=0;w<f;w++)for(var E=0;E<c.length;E++)w<y[E].length&&(k[M++]=y[E][w]);for(var w=0;w<p;w++)for(var E=0;E<c.length;E++)w<b[E].length&&(k[M++]=b[E][w]);return k},oC=a,oC}var yf={},uR;function Fse(){if(uR)return yf;uR=1,Object.defineProperty(yf,"__esModule",{value:!0});var s=Object.assign||function(h){for(var f=1;f<arguments.length;f++){var p=arguments[f];for(var y in p)Object.prototype.hasOwnProperty.call(p,y)&&(h[y]=p[y])}return h},e=zC(),t=a(e),n=Su(),r=a(n);function a(h){return h&&h.__esModule?h:{default:h}}function i(h,f){var p={};for(var y in h)f.indexOf(y)>=0||Object.prototype.hasOwnProperty.call(h,y)&&(p[y]=h[y]);return p}var o={bgColor:t.default.oneOfType([t.default.object,t.default.string]).isRequired,bgD:t.default.string.isRequired,fgColor:t.default.oneOfType([t.default.object,t.default.string]).isRequired,fgD:t.default.string.isRequired,size:t.default.number.isRequired,title:t.default.string,viewBoxSize:t.default.number.isRequired,xmlns:t.default.string},c=(0,n.forwardRef)(function(h,f){var p=h.bgColor,y=h.bgD,b=h.fgD,E=h.fgColor,C=h.size,S=h.title,w=h.viewBoxSize,x=h.xmlns,O=x===void 0?"http://www.w3.org/2000/svg":x,T=i(h,["bgColor","bgD","fgD","fgColor","size","title","viewBoxSize","xmlns"]);return r.default.createElement("svg",s({},T,{height:C,ref:f,viewBox:"0 0 "+w+" "+w,width:C,xmlns:O}),S?r.default.createElement("title",null,S):null,r.default.createElement("path",{d:y,fill:p}),r.default.createElement("path",{d:b,fill:E}))});return c.displayName="QRCodeSvg",c.propTypes=o,yf.default=c,yf}var dR;function Lse(){if(dR)return sl;dR=1,Object.defineProperty(sl,"__esModule",{value:!0}),sl.QRCode=void 0;var s=Object.assign||function(C){for(var S=1;S<arguments.length;S++){var w=arguments[S];for(var x in w)Object.prototype.hasOwnProperty.call(w,x)&&(C[x]=w[x])}return C},e=zC(),t=p(e),n=bA(),r=p(n),a=Mse(),i=p(a),o=Su(),c=p(o),h=Fse(),f=p(h);function p(C){return C&&C.__esModule?C:{default:C}}function y(C,S){var w={};for(var x in C)S.indexOf(x)>=0||Object.prototype.hasOwnProperty.call(C,x)&&(w[x]=C[x]);return w}var b={bgColor:t.default.oneOfType([t.default.object,t.default.string]),fgColor:t.default.oneOfType([t.default.object,t.default.string]),level:t.default.string,size:t.default.number,value:t.default.string.isRequired},E=(0,o.forwardRef)(function(C,S){var w=C.bgColor,x=w===void 0?"#FFFFFF":w,O=C.fgColor,T=O===void 0?"#000000":O,D=C.level,R=D===void 0?"L":D,k=C.size,M=k===void 0?256:k,F=C.value,j=y(C,["bgColor","fgColor","level","size","value"]),V=new i.default(-1,r.default[R]);V.addData(F),V.make();var q=V.modules;return c.default.createElement(f.default,s({},j,{bgColor:x,bgD:q.map(function(W,J){return W.map(function(ne,te){return ne?"":"M "+te+" "+J+" l 1 0 0 1 -1 0 Z"}).join(" ")}).join(" "),fgColor:T,fgD:q.map(function(W,J){return W.map(function(ne,te){return ne?"M "+te+" "+J+" l 1 0 0 1 -1 0 Z":""}).join(" ")}).join(" "),ref:S,size:M,viewBoxSize:q.length}))});return sl.QRCode=E,E.displayName="QRCode",E.propTypes=b,sl.default=E,sl}var $se=Lse();const jC=Me($se),jse=s=>{const e=zp(),{isConnected:t}=s,{state:{schema:n,launchOptions:r,selectedLaunchOption:a,debugMode:i},setShowManualBindIP:o,setSelectedLaunchOption:c,setDebugMode:h}=Qr(),[f,p]=P.useState(!1),y=S=>{S.status==="success"&&p(!1),S.status==="failed"&&p(!1),S.status==="start"&&p(!0)},b=S=>{h(S),localStorage.setItem("debugMode",S)},E=P.useMemo(()=>{if(a){const{scene:S,pkgName:w,queries:x}=a;let T=`${n}&debugMode=${i}&_tiktok_minis_params=${encodeURIComponent(JSON.stringify({enter_from:S,ttmg_init_module:w}))}`;if(x){const D=zne(x);D&&Object.keys(D).forEach(R=>{T+=`&${R}=${encodeURIComponent(D[R])}`})}return T}return n},[n,a,i]);P.useEffect(()=>(Ct.on("scanQRCode",y),()=>{Ct.off("scanQRCode",y)}),[]);const C=S=>{if(S==="created")c({...Df,name:""}),e("/launch_mode");else{const w=r.find(x=>x.id===S);w&&c(w)}};return t?A.jsx("div",{className:"qr-code-container-connected",children:A.jsxs("div",{className:"qr-code-connected-content",children:[A.jsx(jC,{size:150,value:n}),A.jsxs("div",{className:"qr-code-connected-info",children:[A.jsx("div",{className:"qr-code-connected-desc-title",children:H("scanQRCodeChange")}),A.jsx("div",{className:"qr-code-connected-desc",children:H("scanQRCodeDesc")})]})]})}):A.jsxs("div",{className:"qr-code-container-disconnected",children:[A.jsx("div",{className:"qr-code-select-container",children:A.jsx($s,{value:a?.id,onChange:C,placeholder:H("selectLaunchMode"),style:{minWidth:"140px"},optionList:r.map(S=>({label:S.name,value:S.id}))})}),A.jsxs("div",{className:"qr-code-content",children:[A.jsxs("div",{className:"qr-code-schema",children:[A.jsx(jC,{value:E}),A.jsxs(OS,{style:{marginTop:"12px"},children:[A.jsx(Xe,{theme:i==="browserDebug"?"solid":"outline",type:"tertiary",size:"small",onClick:()=>b("browserDebug"),children:H("browserDebugMode")}),A.jsx(Xe,{onClick:()=>b("clientPreview"),theme:i==="clientPreview"?"solid":"outline",type:"tertiary",size:"small",children:H("clientPreviewMode")})]}),f&&A.jsxs("div",{className:"qr-code-spin",children:[A.jsx(br,{size:"large"}),A.jsx("div",{className:"qr-code-text",children:H("scanning")})]})]}),A.jsx("div",{className:"qr-code-title",children:H("scanQRCode")}),A.jsx("div",{className:"qr-code-desc",children:H("scanQRCodeDesc")}),A.jsxs("div",{className:"qr-code-no-response",onClick:()=>o(!0),children:[H("scanQrcodeNoResponse"),A.jsx(bn,{content:()=>A.jsxs("div",{children:[H("manualBindIPInfo1"),A.jsx("br",{}),H("manualBindIPInfo2")]}),children:A.jsx(Fl,{style:{marginLeft:"4px"}})})]})]})]})},Vse=()=>{const{state:{debugSetting:s,isConnected:e},setDebugSetting:t}=Qr(),n=r=>{t(r),e&&ed.send({method:"setDebugSettings",payload:r})};return A.jsx("div",{className:"debug-setting-card",children:A.jsxs(bp,{style:{width:"100%"},children:[A.jsxs(gi,{style:{marginBottom:12,display:"flex",alignItems:"center"},children:[A.jsx(ke.Text,{style:{fontWeight:"bold",fontSize:16,paddingRight:4},children:H("debugSetting")}),A.jsx(bn,{content:()=>A.jsxs("div",{style:{width:"100%",fontSize:"12px"},children:["1. ",H("debugSettingDomainCheckDesc"),A.jsx("br",{}),"2. ",H("debugSettingAdMockDesc"),A.jsx("br",{}),"3. ",H("debugSettingIAPMockDesc")]}),children:A.jsx(Fl,{})})]}),A.jsxs(gi,{className:"debug-setting-row",children:[A.jsxs("div",{className:"debug-setting-item",children:[A.jsx(bl,{style:{marginRight:"8px"},checked:s.enableDomainCheck,onChange:r=>{n({...s,enableDomainCheck:r})}}),A.jsx(ke.Text,{children:H("debugSettingDomainCheck")})]}),A.jsxs("div",{className:"debug-setting-item",children:[A.jsx(bl,{checked:s.enableAdMock,style:{marginRight:"8px"},onChange:r=>{n({...s,enableAdMock:r})}}),A.jsx(ke.Text,{children:H("debugSettingAdMock")})]})]}),A.jsx(gi,{className:"debug-setting-row",children:A.jsxs("div",{className:"debug-setting-item",children:[A.jsx(bl,{checked:s.enableIAPMock,style:{marginRight:"8px"},onChange:r=>{n({...s,enableIAPMock:r})}}),A.jsx(ke.Text,{children:H("debugSettingIAPMock")})]})})]})})},Bse=()=>{const{state:{showManualBindIP:s},setShowManualBindIP:e}=Qr(),t=r=>{const{ip:a,port:i,wsPort:o}=r;Ue.setMultiple({clientHost:a,clientWsPort:o,clientHttpPort:i}),Cu.send({method:"manualConnect",payload:{clientHost:a,clientWsPort:o,clientHttpPort:i}}),ed.init({clientWsPort:o,clientHost:a,clientHttpPort:i}),localStorage.setItem("clientHost",a),localStorage.setItem("clientWsPort",o),localStorage.setItem("clientHttpPort",i),e(!1)},n={ip:Ue.get("clientHost")||localStorage.getItem("clientHost")||"",port:Ue.get("clientHttpPort")||localStorage.getItem("clientHttpPort")||"",wsPort:Ue.get("clientWsPort")||localStorage.getItem("clientWsPort")||""};return A.jsxs(Cr,{title:H("manualBindClientDebugServiceTitle"),visible:s,showCancel:!1,onCancel:()=>e(!1),showOk:!1,footer:null,children:[A.jsx(_i,{bordered:!1,icon:null,closeIcon:null,fullMode:!1,style:{margin:"12px 0"},description:A.jsxs(A.Fragment,{children:[A.jsx("div",{style:{marginBottom:"8px"},children:H("debug.guide.manualBindIPDesc1")}),A.jsx("div",{style:{marginBottom:"8px"},children:H("debug.guide.manualBindIPDesc2")}),A.jsx("div",{style:{marginBottom:"8px"},children:H("debug.guide.manualBindIPDesc3")})]}),type:"warning"}),A.jsxs(He,{onSubmit:t,initValues:n,style:{marginBottom:"24px"},children:[A.jsx(He.Input,{name:"ip",label:"IP",field:"ip",required:!0,rules:[{required:!0,message:H("debug.guide.manualBindIPInvalid")}]}),A.jsx(He.Input,{name:"port",label:"Port 1 ",field:"port",rules:[{required:!0,message:H("invalidPort")}]}),A.jsx(He.Input,{style:{marginBottom:"12px"},name:"wsPort",label:"Port 2",field:"wsPort",rules:[{required:!0,message:H("invalidPort")}]}),A.jsx(Xe,{type:"primary",htmlType:"submit",style:{marginRight:"8px"},children:H("confirm")}),A.jsx(Xe,{onClick:()=>e(!1),children:H("cancel")})]})]})},Hse=()=>{const{state:{isConnected:s,message:e}}=P.useContext(Pw);return A.jsxs("div",{className:"home-container",children:[A.jsx(_i,{fullMode:!1,icon:null,closeIcon:null,type:e?.type,title:e?.title,description:e?.desc}),A.jsx(jse,{isConnected:s}),A.jsx(Vse,{}),A.jsx(Dse,{}),A.jsx(Bse,{})]})},Use=s=>{const{open:e,onClose:t}=s,[n,r]=P.useState(!0),[a,i]=P.useState(!1),[o,c]=P.useState(!1),[h,f]=P.useState(!1),p=[{label:"是否开启域名校验",description:"开启后,客户端将校验所有请求的域名是否合法,建议开发环境关闭以便调试。",checked:n,onChange:r},{label:"是否开启 IAA Mock",description:"启用后,广告相关接口将返回模拟数据,方便开发和测试广告逻辑。",checked:a,onChange:i},{label:"是否开启 IAP Mock",description:"启用后,内购相关流程将使用模拟支付,避免真实扣费。",checked:o,onChange:c}];return A.jsx("div",{children:A.jsx(Co,{vertical:!0,align:"start",spacing:"loose",children:p.map((y,b)=>A.jsxs("div",{children:[A.jsx(zf,{checked:y.checked,onChange:E=>y.onChange(E.target.checked),children:y.label}),A.jsx(ke.Text,{type:"tertiary",style:{display:"block",marginTop:4},children:y.description})]},b))})})},zse=[{label:H("scene_scan_qrcode"),value:"scan_qrcode"},{label:H("scene_search"),value:"search"},{label:H("scene_anchor"),value:"anchor"},{label:H("scene_center"),value:"center"},{label:H("scene_ad"),value:"ads"},{label:H("scene_shortcut"),value:"desktop_shortcut"},{label:H("scene_sharing"),value:"dm_sharing"},{label:H("scene_link"),value:"minis_link"}],Kse=()=>{const s=zp(),{state:{launchOptions:e,selectedLaunchOption:t,packages:n},setLaunchOptions:r,deleteLaunchOptions:a,setSelectedLaunchOption:i}=Qr(),o=P.useRef(null),c=t||su,[h,f]=P.useState(c),[p,y]=P.useState(c.id),b=n.map(O=>{if(O.type==="main")return{label:H("gameMainPackage"),value:O.name};if(O.type==="independent")return{label:`${H("independentPackage")}: ${O.name}`,value:O.name}}).filter(Boolean),E=P.useCallback(O=>{const T={...h,...O};T.pkgType==="main"&&T.independentPkg!==void 0&&(T.independentPkg=void 0,o.current&&o.current.setValues({independentPkg:void 0})),f(T)},[h]),C=P.useCallback(()=>{if(!o.current)return;const O=o.current.getValues();O.pkgType==="main"&&(O.independentPkg=void 0);const T=e.findIndex(R=>R.id===O.id&&R.id!=="created"&&R.id!=="normal");let D;T!==-1?(D=[...e],D[T]=O):(O.id=Date.now().toString(),D=[...e.slice(0,-1),O,...e.slice(-1)]),r(D),f(O),i(O),s("/")},[e]),S=P.useCallback(O=>{const T=e.find(D=>D.id===O);if(T){y(O);const D={...T};O==="created"&&(D.name=""),f(D),o.current?.setValues(D)}},[e,p]),w=P.useCallback(()=>{if(p===void 0){cW.warning("请先选择一个要删除的启动模式!");return}const O=e.find(D=>D.id===p),T=e.filter(D=>D.id!==p);r(T),y(void 0),S(void 0),a(O.name)},[p,e,S,c]),x=P.useCallback(()=>{f(c),o.current?.setValues(c),s("/")},[c]);return A.jsxs("div",{children:[A.jsx(_i,{style:{marginBottom:32},fullMode:!1,icon:null,closeIcon:null,description:H("launchModeDesc"),type:"info"}),A.jsxs(He,{initValues:h,onValueChange:E,getFormApi:O=>o.current=O,style:{padding:20,border:"1px solid #eee",borderRadius:8},onSubmit:C,children:[A.jsx(He.Select,{placeholder:H("selectLaunchMode"),rules:[{required:!0,message:H("selectLaunchMode")}],field:"id",label:H("selectLaunchMode"),optionList:e.map(O=>({label:O.name,value:O.id})),onChange:S,style:{width:"100%"},value:p}),A.jsx(He.Input,{required:!0,placeholder:H("launchModeName"),field:"name",label:H("launchModeName"),rules:[{required:!0,message:H("notEmpty")}],style:{width:"100%"},trigger:"blur"}),A.jsx(He.Select,{field:"pkgName",label:H("selectLaunchPkg"),placeholder:H("selectLaunchPkg"),rules:[{required:!0,message:H("notEmpty")}],optionList:b,style:{width:"100%"}}),A.jsx(He.Select,{field:"scene",label:H("selectScene"),rules:[{required:!0,message:H("notEmpty")}],placeholder:H("selectScene"),optionList:zse,style:{width:"100%"},filter:!0}),A.jsx(He.Input,{field:"queries",label:H("launchQueries"),placeholder:H("launchQueriesDesc"),trigger:"blur",rules:[{validator:(O,T)=>{const{isValid:D,message:R}=Kne(T);return D?Promise.resolve():Promise.reject(R)}}],style:{width:"100%"}}),A.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",alignItems:"center",marginTop:20},children:[p.id!=="created"||p.id!=="normal"&&A.jsx(Tl,{title:H("deleteLaunchModeConfirm",{name:p.name}),onConfirm:w,position:"bottomRight",children:A.jsx(Xe,{type:"danger",style:{marginRight:12},children:H("delete")})}),A.jsx(Xe,{style:{marginRight:12},onClick:x,children:H("cancel")}),A.jsx(Xe,{htmlType:"submit",type:"primary",children:H("saveAndUse")})]})]})]})},qse=({packages:s})=>A.jsx("div",{children:s.map(({name:e,size:t},n)=>{const r=(t/1024/1024).toFixed(2)+"MB",a=t<=4*1024*1024;return A.jsxs("div",{style:{display:"flex",alignItems:"center",padding:"2px 8px",borderRadius:6,backgroundColor:a?"#E8F5E9":"#FCE4EC",marginBottom:n===s.length-1?0:8,width:"fit-content"},children:[A.jsxs(ke.Text,{style:{fontWeight:600,fontSize:14},children:[e,":"]}),A.jsx(ke.Text,{style:{color:a?"#4CAF50":"#F44336",fontWeight:600},children:r}),A.jsx(ke.Text,{type:"tertiary",style:{marginLeft:8},children:a?H("notExceedIndependentPkgSizeLimit",{limit:"4MB"}):H("exceedIndependentPkgSizeLimit",{limit:"4MB"})})]},e)})}),Wse=({size:s,limit:e})=>{const t=(s/1024/1024).toFixed(2)+"MB",n=s<=e*1024*1024,r=n?H("notExceedSizeLimit",{limit:e+"MB"}):H("exceedSizeLimit",{limit:e+"MB"});return A.jsxs("div",{style:{display:"flex",alignItems:"center",width:"fit-content",padding:"2px 8px",borderRadius:6,backgroundColor:n?"#E8F5E9":"#FCE4EC"},children:[A.jsx(ke.Text,{style:{fontWeight:600,color:n?"#4CAF50":"#F44336"},children:t}),A.jsx(ke.Text,{type:"tertiary",style:{marginLeft:8},children:r})]})},Gse=({packages:s,limit:e})=>{const t=s.find(i=>i.type==="main")?.size,n=(t/1024/1024).toFixed(2)+"MB",r=t<=e*1024*1024,a=r?H("notExceedMainPkgSizeLimit",{limit:e+"MB"}):H("exceedMainPkgSizeLimit",{limit:e+"MB"});return A.jsxs("div",{style:{display:"flex",alignItems:"center",padding:"2px 8px",width:"fit-content",borderRadius:6,backgroundColor:r?"#E8F5E9":"#FCE4EC"},children:[A.jsx(ke.Text,{style:{fontWeight:600,color:r?"#4CAF50":"#F44336"},children:n}),A.jsx(ke.Text,{type:"tertiary",style:{marginLeft:8},children:a})]})},Yse=({domains:s=[]})=>s?.length?A.jsx(Co,{style:{flexWrap:"wrap"},children:s.map(e=>A.jsx(Cn,{children:e},e))}):A.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[A.jsx(ke.Text,{style:{fontSize:14},children:"⚠️"}),A.jsx(ke.Text,{style:{color:"red",marginLeft:8,fontSize:14},children:H("trustDomainEmptyTip")})]}),Zse=({termsOfServiceLink:s})=>s?A.jsx(Cn,{children:s}):A.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[A.jsx(ke.Text,{children:"⚠️"}),A.jsx(ke.Text,{style:{color:"red",marginLeft:8},children:H("termsOfServiceEmptyTip")})]}),Xse=({privacyPolicyLink:s})=>s?A.jsx(Cn,{children:s}):A.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[A.jsx(ke.Text,{children:"⚠️"}),A.jsx(ke.Text,{style:{color:"red",marginLeft:8},children:H("privacyPolicyEmptyTip")})]}),Qse=()=>A.jsx(_i,{style:{marginBottom:32},fullMode:!1,icon:null,closeIcon:null,description:A.jsxs("div",{children:[A.jsx(ke,{style:{marginBottom:8},children:H("projectInfoDesc")}),A.jsx(ke,{children:H("projectInfoDescTip")})]}),type:"info"}),Jse=({logo:s,placeholder:e})=>{const[t,n]=P.useState(!1);return A.jsxs("div",{style:{width:100,height:100,borderRadius:4,overflow:"hidden",position:"relative",background:"#f0f0f0",display:"flex",alignItems:"center",justifyContent:"center"},children:[!t&&(e||A.jsx("div",{style:{width:"100%",height:"100%",background:"#e0e0e0",display:"flex",alignItems:"center",justifyContent:"center",color:"#aaa",fontSize:14}})),A.jsx("img",{src:s,alt:"logo",style:{width:"100%",height:"100%",borderRadius:4,objectFit:"cover",position:"absolute",top:0,left:0,opacity:t?1:0,transition:"opacity 0.3s"},onLoad:()=>n(!0)})]})},eae=({description:s})=>s?A.jsx(ke.Text,{style:{fontSize:14},children:s}):A.jsx(ke.Text,{type:"warning",style:{fontSize:14},children:H("gameDescEmptyTip")});var tae=Object.defineProperty,hR=Object.getOwnPropertySymbols,nae=Object.prototype.hasOwnProperty,rae=Object.prototype.propertyIsEnumerable,fR=(s,e,t)=>e in s?tae(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,sae=(s,e)=>{for(var t in e||(e={}))nae.call(e,t)&&fR(s,t,e[t]);if(hR)for(var t of hR(e))rae.call(e,t)&&fR(s,t,e[t]);return s};function aae(s){return P.createElement("svg",sae({width:200,height:200,viewBox:"0 0 200 200",fill:"none",xmlns:"http://www.w3.org/2000/svg",focusable:!1,"aria-hidden":!0},s),P.createElement("rect",{width:200,height:200,fill:"transparent"}),P.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"}),P.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"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.createElement("g",{clipPath:"url(#clip_failure_96_39_65)"},P.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)"})),P.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"}),P.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"}),P.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"}),P.createElement("mask",{id:"mask_failure_130_526","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:98,y:44,width:36,height:27},P.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"})),P.createElement("g",{mask:"url(#mask_failure_130_526)"},P.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"}),P.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"}),P.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"}),P.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"}),P.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"}),P.createElement("mask",{id:"path-18-inside-1",fill:"white"},P.createElement("ellipse",{rx:2.97818,ry:2.97818,transform:"matrix(0.727696 0.6859 -0.685903 0.727693 128.435 60.0508)"})),P.createElement("ellipse",{rx:2.97818,ry:2.97818,transform:"matrix(0.727696 0.6859 -0.685903 0.727693 128.435 60.0508)",fill:"white"}),P.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)"})),P.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"}),P.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"}),P.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:""}),P.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:""}),P.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"}),P.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__"}),P.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"}),P.createElement("path",{d:"M126.02 142.7c-3.1-2.99-4.99-7.5-4.16-12.35",stroke:"#515151"}),P.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"}),P.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"}),P.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"}),P.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"}),P.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"}),P.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"}),P.createElement("defs",null,P.createElement("clipPath",{id:"clip_failure_96_39_65"},P.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 iae=aae,oae=Object.defineProperty,pR=Object.getOwnPropertySymbols,lae=Object.prototype.hasOwnProperty,cae=Object.prototype.propertyIsEnumerable,gR=(s,e,t)=>e in s?oae(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,uae=(s,e)=>{for(var t in e||(e={}))lae.call(e,t)&&gR(s,t,e[t]);if(pR)for(var t of pR(e))cae.call(e,t)&&gR(s,t,e[t]);return s};function dae(s){return P.createElement("svg",uae({width:200,height:200,viewBox:"0 0 200 200",fill:"none",xmlns:"http://www.w3.org/2000/svg",focusable:!1,"aria-hidden":!0},s),P.createElement("rect",{width:200,height:200,fill:"transparent"}),P.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M64.09 64.86V8.56L5.76 78.94h44.26v20.3h14.07v-20.3h8.82V64.86h-8.82Zm110.18 0V8.56L124.1 69.08c.7-3.74 1.07-7.7 1.07-11.76 0-11-2.7-21.1-7.25-28.55-4.5-7.4-11.13-12.63-19-12.63-7.88 0-14.5 5.23-19.01 12.63-4.54 7.45-7.25 17.55-7.25 28.55s2.7 21.1 7.25 28.55c4.5 7.4 11.13 12.62 19 12.62 7.88 0 14.5-5.23 19.01-12.62a44.09 44.09 0 0 0 3.4-6.93h38.86v20.3h14.08v-20.3h8.81V64.86h-8.81Zm-138.57 0L50.02 47.6v17.26H35.7Zm124.5 0h-14.32L160.2 47.6v17.26Zm-49.1-7.54c0 8.84-2.2 16.32-5.19 21.22-3.08 5.08-5.87 5.87-6.98 5.87-1.12 0-3.9-.8-7-5.87-2.98-4.9-5.19-12.38-5.19-21.22 0-8.85 2.21-16.33 5.2-21.23 3.09-5.07 5.87-5.87 6.98-5.87 1.12 0 3.9.8 7 5.87 2.98 4.9 5.19 12.38 5.19 21.23Z",fill:"var(--semi-color-primary-light-default)"}),P.createElement("path",{d:"M178.34 186.57c-1.85 2.2-6.66 1.02-8.13.24a2.46 2.46 0 0 1-.34-.22c-1.94.22-14.94-.5-15.12-.46-6.12 1.43-14.06 1.03-15.2 1-1.36-.05-4.53-1.33-5.75-5.08-1.2-3.67 0-7.12 2.16-13.37l.13-.38-1.43 2.83c-7.37 14.43-11.05 19.7-17.43 20.14-6.38.45-34.34-.09-41.09-.78-6.75-.7-9.42-1.68-9.35-2.83.05-.92 2.98-2.2 4.44-2.72-5.88-1.57-20.16-5.97-30.18-10.98-12.52-6.26-25.14-15.8-21.91-28.92 3.22-13.13 15.76-16.8 25.59-17.38 2.75-.16 5.14-.1 7.16.07 3.76.33 6.21 1.06 7.2 1.53-1.12-6.37-3.33-19.34-3.33-20.21 0-1.1-3.02-10.67-3.64-14.35-.1-.55-1.11-5.6 3.64-5.02 4.75.57 12.4 18.2 15.88 28.7a401.55 401.55 0 0 0 11.15-9.87c.84-1.02 9.36-9.75 14.87-13.84a60.09 60.09 0 0 1 33-11.76c16.29-.81 34.49 2.36 40.9 11.91 6.4 9.55 6.1 34.44 6.44 48.71.35 14.27.84 27.64 2.11 29.76 1.27 2.12 6.45 5.02 9.77 7.14 3.33 2.11 4.45 3.9 4.36 4.2-.1.3-.4.58-2.24 1.08.34.47.12 1.38-2.12 1.6-4.7.48-8.64-.74-11.54-.74Z",fill:"white"}),P.createElement("path",{d:"M192 185.71c-1.6-2.3-9.7-5.34-15.04-5.75-5.34-.41-6.45.53-7.4 1.85-1 1.37-1.05 3.72.3 4.78m22.14-.88c.34.47.12 1.38-2.12 1.6-4.7.48-8.64-.74-11.54-.74-1.85 2.2-6.66 1.02-8.13.24a2.46 2.46 0 0 1-.34-.22m22.13-.88c1.84-.5 2.15-.78 2.24-1.08.09-.3-1.03-2.09-4.36-4.2-3.32-2.12-8.5-5.02-9.77-7.14-1.27-2.12-1.76-15.49-2.1-29.76-.36-14.27-.06-39.16-6.46-48.7-6.4-9.56-24.6-12.73-40.89-11.92a60.09 60.09 0 0 0-33 11.76c-5.5 4.09-14.03 12.82-14.87 13.84-.37.46-5.43 4.9-11.15 9.87-3.49-10.5-11.13-28.13-15.88-28.7-4.75-.58-3.73 4.47-3.64 5.02.62 3.68 3.64 13.26 3.64 14.35 0 .87 2.21 13.84 3.32 20.2-.98-.46-3.43-1.2-7.19-1.52m19.34 57.21c-5.88-1.57-20.16-5.97-30.18-10.98-12.52-6.26-25.14-15.8-21.91-28.92 3.22-13.13 15.76-16.8 25.59-17.38 2.75-.16 5.14-.1 7.16.07m19.34 57.21c-1.46.52-4.39 1.8-4.44 2.72-.07 1.15 2.6 2.14 9.35 2.83 6.75.7 34.71 1.23 41.09.78 6.38-.44 10.06-5.71 17.43-20.14l1.43-2.83m-64.86 16.64c5.89-2.49 12.35-6.32 16.49-10.11 5.07-4.65 9.55-13.46 9.96-14.28l.82-1.56m43.43 4.15c-.47-3-1.21-7.33.37-14.67 1.47-6.81 6.6-15.3 6.65-11.03.05 4-6.05 17.35-12.86 30.86m0 0c-2.25 6.5-3.51 10-2.3 13.75 1.23 3.75 4.4 5.03 5.76 5.07 1.14.04 9.08.44 15.2-.99m0 0a19.5 19.5 0 0 0 3.27-1.03c6.09-2.63 10.92-8.55 13.53-24.26 2.62-15.71 1.5-42.36-10.29-50.78-11.78-8.41-21.32-6.07-34.03 5.8-5.34 4.98-11.86 14.52-17.42 23.52m44.94 46.75c.18-.04 13.19.68 15.12.46m-60.06-47.2c-.8-3.66-1.44-7.16-1.94-10.43m1.94 10.42c-1.24 2-2.43 3.98-3.55 5.87m.32-30.9c0 3.75.41 8.8 1.3 14.61m0 0c-2.32 2.46-7.78 7.15-13.67 11.55m-42.32-12.78s1.24 7.12 3.87 11.42a29.93 29.93 0 0 0 6.61 7.8m36.13 12.04c-6.87-3.1-17.87-6.8-22.51-8.27m22.51 8.27a394.7 394.7 0 0 1 7.76-13.74M76 150.72c.39-.06.78-.14 1.17-.23 3.97-.93 10.76-5.29 17.05-9.98m-18.22 10.2c-4.7.8-9.36-.34-13.62-3.76m0 0c-3.29-.85-11.28-2.39-12.86-2.41m56.75.71c-2.32-.94-9-3.55-12.05-4.74",stroke:"#515151"}),P.createElement("path",{d:"m77.74 73.31 23.73 43.2-1.7 2.5-22.73 9.55-24.58-44.48 21.9-10.77h3.38Z",fill:"#E6E8EA"}),P.createElement("path",{d:"M74.35 73.31h3.4l23.72 43.2-1.7 2.5m-25.42-45.7-21.9 10.77 24.59 44.48L99.78 119m-25.43-45.7 25.43 45.7",stroke:"#515151"}),P.createElement("path",{d:"M83.9 116.95c.96 1.97-4.91 4.57-8.32 6.18-1.33.63-2.1.98-2.7 1.2.9 3.3 1.24 8.14-4.48 9.82-5.73 1.69-15.07-1.02-18-9.6-2.95-8.6.01-19.97 9.05-27.04 5.67-4.42 15.01-5.77 19.42-4.05 2.15.82 1.38 2.71-.56 4.44a58.1 58.1 0 0 1-4.53 3.58c.4-.01.8-.02 1.23 0 4.13.06 7.26 1.11 7.42 3.14.07.94-.8 2.13-1.95 3.45-.62.71-1.28 1.34-1.95 1.88 2.8-.22 5.94 1.05 2.9 4.2-.41.43-.85.83-1.29 1.2 1.73.02 3.24.56 3.75 1.6Z",fill:"white"}),P.createElement("path",{d:"M69.73 125.1c1.65-.34 2.2-.4 3.14-.76m0 0c.6-.23 1.38-.58 2.7-1.21 3.42-1.6 9.3-4.21 8.32-6.17-.86-1.76-4.53-2.09-7.33-.97-2.84 1.13-3.58 2.24-3.46 2.56.12.31 4.75-.69 8.34-4.4 3.4-3.54-.96-4.7-3.9-4.06-2.26.5-6.4 2.06-6.16 2.85.16.5 5.33-.54 9.1-4.87 1.14-1.32 2.02-2.51 1.95-3.45-.16-2.03-3.3-3.08-7.42-3.15-8.83-.16-11.56 4.78-11.16 5.1 1.1.92 9.36-4.15 14.46-8.67 1.94-1.73 2.71-3.62.56-4.44-4.4-1.72-13.75-.37-19.42 4.05-9.04 7.07-12 18.44-9.06 27.03 2.94 8.6 12.28 11.3 18 9.61 5.73-1.68 5.4-6.53 4.48-9.81Z",stroke:"#515151"}),P.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M106.48 120.15c-.2 1.56-.53 3.98-1.2 6.51-.68 2.53-1.71 5.16-3.3 7.14l.2.19 5.67-4.97-1.1-8.87h-.27Zm31.09 45.32-.25-.1-11.3 21.27h11.92l-.43-.26c-3.5-2.07-4.07-5.79-3.46-9.77.52-3.4 1.9-6.95 3-9.77l.52-1.37Zm-85.81-37.9-.24.13a55.3 55.3 0 0 0 1.65 6.39l.01.04.05.03c1.63.84 4.4 1.85 7.45 2.14 3.05.3 6.39-.12 9.1-2.15l-.12-.24c-3.14 1.2-11.14 1.63-17.9-6.33Z",fill:"#515151"}),P.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m133.54 82.83.02-.16h-.16c-1.82.1-5.84.39-9.87.96-2.02.28-4.04.64-5.79 1.08-1.74.43-3.23.95-4.18 1.58l-.06.04v.07c-.04 1.8.13 3.69.65 5.35a7.28 7.28 0 0 0 2.8 4.05c2.81 1.86 6.69 1.62 9.98-.58 3.3-2.2 6.04-6.37 6.61-12.4Z",fill:"#515151"}),P.createElement("path",{d:"M126.66 84.73a9.79 9.79 0 0 1-9.7 9.87 9.79 9.79 0 0 1-9.7-9.87 9.79 9.79 0 0 1 9.7-9.87c5.35 0 9.7 4.41 9.7 9.87Z",fill:"white",stroke:"#515151"}),P.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M109.41 70.6c.66.25 1.25.47 1.9.26.52-.18.83-.7 1.18-1.3.75-1.27 1.73-2.93 5.56-2.56 3.86.38 4.6 2.17 5.1 3.43.21.5.38.9.69 1.12.48.32.84.33 1.26.35.55.02 1.2.05 2.37.75 1.41.85 2.49 5.65.23 9.93l.26.43c-.45 2.15-3.05 4.37-3.05 4.14 0-3.04 0-4.75-2.92-7.43-4.26 1.6-10.89 1.13-13.94.14-4-1.28-5.98-6.81-2.53-9 1.72-1.1 2.88-.65 3.9-.26Z",fill:"#515151"}),P.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M116.7 81.6a.41.41 0 1 0-.74.4c.2.39.47.74.9.95.41.2.93.25 1.58.17a.41.41 0 1 0-.1-.82c-.58.07-.9.01-1.12-.09-.2-.1-.36-.28-.53-.6Zm-6.57 4.22a1.07 1.07 0 0 0 1-1.13 1.06 1.06 0 0 0-1.1-1.02c-.59.03-1.03.54-1 1.13.02.6.52 1.05 1.1 1.02Zm6.82.73a1.07 1.07 0 0 0 1-1.13 1.06 1.06 0 0 0-1.1-1.01c-.58.02-1.03.53-1 1.12.03.6.52 1.05 1.1 1.02Z",fill:"#515151"}),P.createElement("ellipse",{cx:127.42,cy:86.0081,rx:2.47934,ry:2.47934,fill:"white",stroke:"#515151"}),P.createElement("circle",{r:4.67102,transform:"matrix(0.707106 0.707108 -0.707106 0.707108 75.0508 75.7794)",fill:"var(--semi-color-primary)",stroke:"var(--semi-color-primary)",strokeWidth:3}),P.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M77.9 72.97a1.1 1.1 0 0 0-1.57 0l-1.26 1.27-1.31-1.3a1.1 1.1 0 1 0-1.57 1.56l1.31 1.3-1.3 1.31a1.1 1.1 0 0 0 1.56 1.57l1.3-1.3 1.27 1.26a1.1 1.1 0 1 0 1.57-1.57l-1.26-1.26 1.26-1.27a1.1 1.1 0 0 0 0-1.57Z",fill:"white"}),P.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M99.41 49.11a32.26 32.26 0 0 0-19-9.84 2.14 2.14 0 0 0-2.42 2.02c-.07 1.2.82 2.2 1.97 2.37a27.86 27.86 0 0 1 16.13 8.36c.83.87 2.24.99 3.17.15.88-.79.99-2.17.15-3.06Zm-35.8-8.52a32.5 32.5 0 0 0-18.74 15.73 2.14 2.14 0 0 0 1.01 2.93c1.11.52 2.4.02 2.96-1.02a28.08 28.08 0 0 1 15.96-13.4 2.28 2.28 0 0 0 1.53-2.72 2.14 2.14 0 0 0-2.72-1.52Zm27.75 15.78c-3.02-3.14-7-5.38-11.53-6.22a2.11 2.11 0 0 0-2.47 2 2.33 2.33 0 0 0 1.9 2.38c3.41.69 6.43 2.37 8.75 4.72.85.85 2.26 1 3.2.15.87-.78 1-2.15.15-3.03Zm-24.64-4.65a21.63 21.63 0 0 0-11.66 9.8 2.1 2.1 0 0 0 .99 2.94c1.12.52 2.4.01 2.98-1 2-3.45 5.17-6.11 8.91-7.5 1.1-.4 1.81-1.56 1.5-2.75a2.1 2.1 0 0 0-2.72-1.5Zm16.63 11.95a10.69 10.69 0 0 0-4-2.47c-1.35-.47-2.56.62-2.63 1.9-.07 1.14.73 2.04 1.65 2.44.56.25 1.07.56 1.52.94.89.74 2.33 1 3.32.11.82-.74 1-2.07.14-2.92Zm-14.28-.76c-1.82.83-3.39 2.16-4.5 3.83-.73 1.08-.16 2.42.9 2.92 1.14.53 2.38-.02 3.05-.88a6.35 6.35 0 0 1 1.93-1.63c.95-.52 1.68-1.63 1.37-2.83-.3-1.15-1.54-1.95-2.75-1.4Z",fill:"var(--semi-color-primary)"}))}var hae=dae;const fae=({errorMsg:s})=>A.jsxs("div",{className:"error-display",children:[A.jsx(iae,{}),A.jsx("div",{className:"error-display-content",children:A.jsx(ke.Text,{style:{fontSize:14},children:s})})]}),pae=()=>{const{state:{gameDetail:s},setGameDetail:e}=Qr(),[t,n]=P.useState(!0),[r,a]=P.useState(!1),[i,o]=P.useState(""),c=({errorCode:f,errorMsg:p,clientKey:y})=>{n(!1),a(!0),f===404?o(H("getDevGameDetailNotFound",{clientKey:y})):f===403?o(H("gameDetailNoPermission",{clientKey:y})):f===401&&o(H("gameDetailNotLogin",{clientKey:y}))};P.useEffect(()=>{s?.has_error&&(a(!0),c({errorCode:s.error_code,errorMsg:s.error_msg,clientKey:s.client_key})),Xr({url:"/game/detail",method:"GET"}).then(f=>{if(f?.error)n(!1),c(f.error);else{const{data:p}=f;e(p),n(!1)}})},[]);const h=P.useMemo(()=>{if(!s||s?.has_error)return[];const{name:f,client_key:p,size:y,description:b,request_allowed_domains:E}=s,C=s.packages.filter(w=>w.type==="independent");return[{key:H("gameName"),value:()=>A.jsx(ke.Text,{style:{fontWeight:"bold"},children:f})},{key:H("gameIcon"),value:()=>A.jsx(Jse,{logo:s.display_icon_url})},{key:H("gameID"),value:()=>A.jsx(ke.Text,{children:p})},{key:H("gameDesc"),value:()=>A.jsx(eae,{description:b})},{key:H("gameSize"),value:()=>A.jsx(Wse,{size:y,limit:30})},{key:H("gameMainPackageSize"),value:()=>A.jsx(Gse,{packages:s.packages,limit:4})},{key:H("gameIndependentPackageSize"),hidden:C.length===0,value:()=>A.jsx(qse,{packages:C})},{key:H("gameTrustDomains"),value:()=>A.jsx(Yse,{domains:E})},{key:H("gameServiceAgreement"),value:()=>A.jsx(Zse,{termsOfServiceLink:s.terms_of_service_link})},{key:H("gamePrivacyPolicy"),value:()=>A.jsx(Xse,{privacyPolicyLink:s.privacy_policy_link})}].filter(w=>!w.hidden)},[s]);return t&&!s?A.jsx("div",{className:"game-detail-loading-container",children:A.jsx(br,{size:"large"})}):r?A.jsx(fae,{errorMsg:i}):h.length===0?null:A.jsxs("div",{className:"game-detail-container",children:[A.jsx(Qse,{}),A.jsx(Uu,{data:h,align:"left",size:"small"})]})},gae=()=>A.jsxs("div",{children:[A.jsx("strong",{className:"check-code-banner-section-title",children:H("pkgSizeCheckDesc")}),A.jsx("div",{className:"check-code-banner-section-desc",style:{marginBottom:4},children:A.jsx("div",{children:H("pkgSizeCheckDescTip",{projectSize:"30MB",mainPackageSize:"4MB",independentPackageSize:"4MB"})})}),A.jsx("strong",{className:"check-code-banner-section-title",children:H("mandatoryApiCheck")}),A.jsx("div",{className:"check-code-banner-section-desc",children:H("mandatoryApiCheckDesc")}),A.jsx("strong",{className:"check-code-banner-section-title",children:H("configFileCheck")}),A.jsx("div",{className:"check-code-banner-section-desc",children:A.jsxs("div",{children:[A.jsx("code",{children:"game.json"}),":",H("gameJsonCheckDesc")]})})]}),mae=()=>A.jsx(_i,{style:{marginBottom:32},fullMode:!1,icon:null,closeIcon:null,description:A.jsx(gae,{}),type:"info"}),yae=s=>{const{result:e}=s,t=e.every(a=>a?.passed),[n,r]=P.useState(!1);return A.jsxs("div",{className:"check-result-group",children:[t?A.jsxs("div",{className:"check-result-title",children:[A.jsx(Aa,{style:{color:"#4CAF50",marginRight:4,fontSize:20}}),A.jsx(ke.Text,{style:{color:"#4CAF50",fontSize:20},children:H("checkConfigPassed")})]}):A.jsxs("div",{className:"check-result-title",children:[A.jsx(Bs,{style:{color:"#F44336",marginRight:4}}),A.jsx(ke.Text,{style:{color:"#F44336",fontSize:20},children:H("checkConfigFailed")})]}),A.jsxs("div",{style:{paddingBottom:24,position:"relative"},children:[A.jsx(Ls,{style:{marginBottom:12},collapseHeight:150,isOpen:n,children:e.map((a,i)=>A.jsxs("div",{className:"check-result-item",children:[A.jsx(Cn,{color:a?.passed?"green":"red",style:{marginRight:8,flexShrink:0},children:a?.file}),A.jsx(ke.Text,{style:{fontSize:14,color:a?.passed?"rgba(0, 0, 0, 0.65)":"red"},children:a?.msg})]},i))}),n?A.jsx(ke.Text,{style:{color:"grey",cursor:"pointer",fontSize:14,width:"100%",display:"block",alignItems:"center",justifyContent:"center",textAlign:"center"},onClick:()=>r(!1),children:H("closeCheckDetail")}):A.jsx(ke.Text,{style:{color:"grey"},className:"show-more-text-btn",onClick:()=>r(!0),children:H("expandCheckDetail")})]})]})},vae={project:H("gameProject"),main_package:H("gameMainPackage"),independent_package:H("independentPackage")},bae=s=>{const{result:e}=s,t=e.every(n=>n?.passed);return A.jsxs("div",{className:"check-result-group",children:[t?A.jsxs("div",{className:"check-result-title",children:[A.jsx(Aa,{style:{color:"#4CAF50",marginRight:4,fontSize:20}}),A.jsx(ke.Text,{style:{color:"#4CAF50",fontSize:20},children:H("checkPkgSizePassed")})]}):A.jsxs("div",{className:"check-result-title",children:[A.jsx(Bs,{style:{color:"#F44336",marginRight:4,fontSize:20}}),A.jsx(ke.Text,{style:{color:"#F44336",fontSize:20},children:H("checkPkgSizeFailed")})]}),e.map((n,r)=>A.jsxs("div",{className:"check-result-item",children:[A.jsxs(Cn,{color:n?.passed?"green":"red",style:{marginRight:8},children:[vae[n.dimension],n.dimension==="independent_package"?`: ${n.name}`:""]}),A.jsx(ke.Text,{style:{fontSize:14,color:n?.passed?"rgba(0, 0, 0, 0.65)":"red"},children:n?.msg})]},r))]})},Cae=s=>{const{result:e}=s,t=e.every(a=>a?.passed),[n,r]=P.useState(!1);return A.jsxs("div",{className:"check-result-group",children:[t?A.jsxs("div",{className:"check-result-title",children:[A.jsx(Aa,{style:{color:"#4CAF50",marginRight:4,fontSize:20}}),A.jsx(ke.Text,{style:{color:"#4CAF50",fontSize:20},children:H("checkApiSuccess")})]}):A.jsxs("div",{className:"check-result-title",children:[A.jsx(Bs,{style:{color:"#F44336",marginRight:4}}),A.jsx(ke.Text,{style:{color:"#F44336",fontSize:20},children:H("checkApiFailed")})]}),A.jsxs("div",{style:{position:"relative"},children:[A.jsx(Ls,{style:{marginBottom:12},collapseHeight:150,isOpen:n,children:e.map((a,i)=>A.jsxs("div",{className:"check-result-item",children:[A.jsx(Cn,{color:a?.passed?"green":"red",style:{marginRight:8,flexShrink:0},children:a?.name}),A.jsxs(ke.Text,{style:{fontSize:14,color:a?.passed?"rgba(0, 0, 0, 0.65)":"red"},children:[H(a?.name),a?.passed?H("integrated"):H("notIntegrated")]})]},i))}),n?A.jsx(ke.Text,{style:{color:"grey",cursor:"pointer",fontSize:14,width:"100%",display:"block",alignItems:"center",justifyContent:"center",textAlign:"center"},onClick:()=>r(!1),children:H("closeCheckDetail")}):A.jsx(ke.Text,{style:{color:"grey"},className:"show-more-text-btn",onClick:()=>r(!0),children:H("expandCheckDetail")})]})]})},Sae=()=>{const[s,e]=P.useState([]),[t,n]=P.useState(!1);P.useEffect(()=>{Xr({url:"/game/check",method:"GET"}).then(o=>{e(o?.data||[])}).catch(()=>{n(!0)})},[]);const r=s.filter(o=>o?.type==="config"),a=s.filter(o=>o?.type==="size"),i=s.filter(o=>o?.type==="api");return A.jsxs("div",{style:{height:"100%",overflow:"auto"},children:[A.jsx(mae,{}),A.jsx(bae,{result:a}),A.jsx(Cae,{result:i}),A.jsx(yae,{result:r})]})},wae=({size:s=24,color:e="#000",style:t,className:n})=>A.jsx("div",{style:{display:"flex",alignItems:"center",position:"relative"},children:A.jsxs("svg",{fill:"currentColor",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",width:s,height:s,children:[A.jsx("path",{d:"M37.86 17.82c.14.24.14.67.14 1.53v9.5c0 1.14 0 1.72-.2 2.26-.16.49-.43.96-.77 1.34-.37.44-.87.73-1.86 1.3l-7.84 4.53c-.74.43-1.11.64-1.4.64a.66.66 0 0 1-.58-.34c-.14-.24-.14-.67-.14-1.53v-9.5c0-1.14 0-1.71.2-2.26.16-.48.43-.95.76-1.34.38-.44.88-.73 1.87-1.3l7.84-4.52c.74-.43 1.11-.65 1.4-.64.25 0 .45.12.58.33Z"}),A.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m27.54 1.99 7 3.93 6.89 4a7.23 7.23 0 0 1 3.59 6.2l.06 7.88-.06 7.88a7.23 7.23 0 0 1-3.6 6.2l-6.88 4-7 3.93a7.23 7.23 0 0 1-7.08 0l-7-3.93-6.9-4a7.23 7.23 0 0 1-3.58-6.2L2.9 24l.07-7.88a7.23 7.23 0 0 1 3.59-6.2l6.89-4 7-3.93a7.23 7.23 0 0 1 7.08 0Zm-2.07 3.67 6.98 3.92 6.86 3.99a3.01 3.01 0 0 1 1.5 2.58l.06 7.85-.07 7.85c0 1.06-.57 2.04-1.5 2.58l-6.85 4-6.98 3.9c-.91.52-2.03.52-2.95 0l-6.97-3.9-6.86-4a3.01 3.01 0 0 1-1.5-2.58L7.13 24l.06-7.85c.01-1.06.58-2.04 1.5-2.58l6.86-4 6.97-3.9a3.01 3.01 0 0 1 2.95 0Z"})]})}),Eae=()=>A.jsxs("div",{className:"logo-container",children:[A.jsx(wae,{size:32}),A.jsx("div",{className:"logo-title",children:H("title")})]}),_ae=()=>{const{state:{user:s}}=Qr(),[e,t]=P.useState(!1),[n,r]=P.useState(!1),[a,i]=P.useState(""),[o,c]=P.useState(""),h=P.useRef(null),f={"ttmg-game-desc":encodeURIComponent(a||"--")},p=()=>{r(!1),c(""),i("")},y=()=>{t(!1),p(),h.current?.formApi?.reset?.()},b=()=>{s?.email&&t(!0)},E=S=>{const w=S;if(w?.code===0)ia.success({title:H("uploadPlatformSuccess"),content:A.jsxs(A.Fragment,{children:[A.jsx("div",{children:H("uploadPlatformDesc")}),A.jsx("div",{style:{marginTop:12,display:"flex",justifyContent:"flex-end"},children:A.jsx(ke.Text,{link:!0,onClick:()=>{window.open(w?.data?.detail,"_blank")},children:H("viewOnPlatform")})})]}),duration:10}),t(!1),p();else{const x=w?.error?.StatusMessage||w?.detail||H("uploadPlatformFailed");c(x),r(!1)}},C=S=>{const w=S?.error?.StatusMessage||S?.response?.detail||S?.message||H("uploadPlatformFailed");c(w),r(!1)};return A.jsxs(A.Fragment,{children:[A.jsx(In,{content:()=>s?.email?null:A.jsx("div",{className:"uploader-login-tip",children:H("loginToUpload")}),children:A.jsxs("div",{className:$("resource-uploader",{"resource-uploader-disabled":!s?.email}),onClick:b,children:[A.jsx(gC,{size:"default"}),A.jsx("div",{className:"uploader-text",children:H("upload")})]})}),A.jsx(Cr,{footer:null,visible:e,onCancel:y,title:H("uploadToPlatform"),children:A.jsxs("div",{className:"uploader-modal-content",children:[n&&A.jsx("div",{className:"upload-loading-container",children:A.jsx("div",{className:"loading-spin",children:A.jsx(br,{size:"large"})})}),o&&A.jsx(ke.Text,{style:{color:"red",marginBottom:12,marginTop:12},children:o}),A.jsxs(He,{ref:h,onChange:({values:S})=>{i(S?.gameDescription||"--"),c("")},children:[A.jsx(He.TextArea,{label:H("gameAssetDescription"),placeholder:H("gameAssetDescription"),field:"gameDescription"}),A.jsx(He.Slot,{children:A.jsx(Gu,{accept:".zip",action:"/game/upload",showClear:!1,headers:f,beforeUpload:S=>(r(!0),!0),onSuccess:S=>{E(S)},onError:S=>{C(S)},children:A.jsxs("div",{className:"uploader-button-container",children:[A.jsx(gC,{className:"uploader-button-icon"}),A.jsx("div",{className:"uploader-button-text",children:H("uploadGamePackageTip")})]})})}),A.jsx("div",{style:{display:"flex",justifyContent:"flex-end",paddingBottom:16,marginTop:12}})]})]})})]})},Oae=()=>{const{state:{isConnected:s},setIsConnected:e,setMessage:t}=Qr(),n=({client:r,node:a})=>{oa.info("connectionChange",r,a),Ue.get("isNodeWSConnected")===a&&(r||t({type:"danger",desc:H("clientServerStartError")})),Ue.get("isClientWSConnected")===r&&(a||t({type:"danger",desc:H("nodeServerStartError")})),Ue.get("isClientWSConnected")&&!r&&(Ue.setMultiple({isClientWSConnected:!1,isResourcesReady:!1,isScriptsReady:!1}),t({type:"danger",desc:H("clientDisconnected")})),Ue.get("isNodeWSConnected")&&!a&&(Ue.setMultiple({isNodeWSConnected:!1,isResourcesReady:!1,isScriptsReady:!1}),t({type:"danger",title:H("serverDisconnected"),desc:H("nodeDisconnected")})),!Ue.get("isClientWSConnected")&&r&&(Ue.set("isClientWSConnected",!0),t({type:"success",desc:H("clientConnectedSuccess")})),!Ue.get("isNodeWSConnected")&&a&&(Ue.set("isNodeWSConnected",!0),t({type:"success",desc:H("nodeServerConnectedSuccess")})),e(r&&a)};return P.useEffect(()=>(Ct.on("connectionChange",n),()=>{Ct.off("connectionChange",n)}),[e]),A.jsx(Cn,{style:{margin:"0 4px"},color:s?"light-green":"grey",size:"large",shape:"circle",type:"ghost",children:H(s?"deviceConnected":"deviceDisconnected")})},xae="/api/passport/web/email/login",Tae={aid:"2471",account_sdk_source:"web",sdk_version:"2.1.1"};xae+""+new URLSearchParams(Tae);const Pae=()=>{const{state:{user:s}}=Qr();return s?.email?A.jsx(In,{position:"bottom",content:A.jsx("div",{className:"login-user-popover",children:s.email}),children:A.jsx(bi,{color:"amber",style:{flexShrink:0},alt:s?.email,size:"small",children:s?.email?.split("@")[0][0]})}):A.jsx(In,{position:"bottom",trigger:"hover",content:A.jsx("div",{className:"not-login-status-popover",children:H("notLoginTip")}),children:A.jsx(bi,{color:"grey",style:{flexShrink:0},size:"small",children:H("notLogin")})})},Iae=[{node:"item",name:H("quickStart"),link:"https://bytedance.sg.larkoffice.com/docx/MarqdNvQLoihvjxN4rFllgjBgwb"},{node:"item",name:H("jsApiList"),link:"https://bytedance.larkoffice.com/wiki/GQscwDOQSiPxyjkbzyfckh2pnDg"},{node:"item",name:H("faq"),link:"https://bytedance.larkoffice.com/wiki/O6aWwFhDBiEglwkcnJ4ccJpdnmb"}],Dae=()=>A.jsx(Fn,{trigger:"hover",position:"bottomRight",render:A.jsx(A.Fragment,{children:Iae.map(s=>A.jsx(Fn.Item,{onClick:()=>{window.open(s.link)},children:s.name},s.name))}),children:A.jsxs("div",{className:"access-docs",children:[A.jsx(ke.Text,{className:"access-docs-text",type:"primary",children:H("docs")}),A.jsx(ao,{className:"access-docs-icon"})]})}),pl={Idle:0,WasmPreparing:1,WasmPrepared:2,WasmSplitIssued:3,WasmSplitting:4,WasmSplitDone:5,WasmReadyToPrepare:6,WasmSplitPreparing:7,WasmPreparedSuccess:8,WasmCollecting:9,WasmUploadFail:-1,WasmDownloadFail:-2,WasmFileNotExist:-3,WasmSplitFail:-4,WasmSplitUpdateDBFail:-5,WasmSplitPrepareFail:-6,WasmPrepareFailed:-1};function Rae(){return Xr({url:"/game/wasm-split-options",method:"GET"})}function kae(s){const{codePath:e,codeMd5:t,clientKey:n,desc:r}=s;return Xr({url:"/game/wasm-prepare",method:"POST",data:{codePath:e,clientKey:n,codeMd5:t,desc:r}})}function Nae({codeMd5:s,clientKey:e}){return Xr({url:"/game/wasm-prepare-result",method:"POST",data:{codeMd5:s,clientKey:e}})}function Aae(s,e){const t=e?.intervalMs,n=e?.maxAttempts,r=e?.signal||new AbortController().signal;let a=0;return new Promise((i,o)=>{if(r?.aborted){o(new DOMException("Polling aborted","AbortError"));return}const c=()=>{clearTimeout(h),o(new DOMException("Polling aborted","AbortError"))};r?.addEventListener("abort",c,{once:!0});let h;const f=async()=>{a+=1;try{const p=await Nae(s),{status:y}=p.data;if(y===pl.WasmPreparing||y===pl.WasmReadyToPrepare){if(a>=n){o(new Error(`Polling timeout after ${n} attempts`));return}h=window.setTimeout(f,t);return}i(p)}catch(p){if(a>=n){o(p);return}h=window.setTimeout(f,t)}};f()})}function Mae({downloadUrl:s,codePath:e}){return Xr({url:"/game/wasm-prepare-download",method:"POST",data:{downloadUrl:s,codePath:e}})}function Fae(s){const{codeMd5:e,clientKey:t}=s;return Xr({url:"/game/wasm-split",method:"POST",data:{codeMd5:e,clientKey:t}})}function Lae({codeMd5:s,clientKey:e}){return Xr({url:"/game/wasm-split-result",method:"POST",data:{codeMd5:s,clientKey:e}})}function $ae(s,e){const t=e?.intervalMs,n=e?.maxAttempts,r=e?.signal||new AbortController().signal;let a=0;return new Promise((i,o)=>{if(r?.aborted){o(new DOMException("Polling aborted","AbortError"));return}const c=()=>{clearTimeout(h),o(new DOMException("Polling aborted","AbortError"))};r?.addEventListener("abort",c,{once:!0});let h;const f=async()=>{a+=1;try{const p=await Lae(s),{status:y}=p.data;if(y==="processing"){if(a>=n){o(new Error(`Polling timeout after ${n} attempts`));return}h=window.setTimeout(f,t);return}i(p)}catch(p){if(a>=n){o(p);return}h=window.setTimeout(f,t)}};f()})}function jae({downloadUrl:s,codePath:e}){return Xr({url:"/game/wasm-split-download",method:"POST",data:{downloadUrl:s,codePath:e}})}const Vae=({onNext:s})=>{const[e,t]=P.useState([{value:"no_split",label:"不使用增量分包",desc:"不使用增量分包"}]);return P.useEffect(()=>{Rae().then(n=>{n.data?.options,t([{value:"no_split",label:"不使用增量分包",desc:"不使用增量分包"}])})},[]),A.jsxs(He,{initValues:{templateId:"no_split"},style:{width:"100%",padding:"12px 0px 24px 0px"},onSubmit:s,children:[A.jsx(He.Input,{rules:[{required:!0,message:"请输入版本描述"}],label:"版本描述",placeholder:"请输入版本描述",field:"desc"}),A.jsx(He.Select,{placeholder:"请选择增量分包",loading:e.length===0,rules:[{required:!0,message:"请选择增量分包"}],style:{width:"100%"},label:"增量分包",field:"templateId",renderSelectedItem:({desc:n})=>n,optionList:e}),A.jsx(Xe,{style:{marginTop:24},theme:"solid",type:"primary",htmlType:"submit",children:"启用代码分包"})]})},Ys={init:"init",processing:pl.WasmPreparing,processingReady:pl.WasmReadyToPrepare,success:pl.WasmPreparedSuccess,failed:pl.WasmPrepareFailed,downloading:"downloading",downloadFailed:"downloadFailed"},mR=new AbortController,Bae=({codePath:s,codeMd5:e,clientKey:t,desc:n,onCancel:r,onNext:a})=>{const[i,o]=P.useState(!1),[c,h]=P.useState({code:0,data:{status:Ys.init}}),f=()=>{mR.abort(),r()},p=()=>{h({code:0,data:{status:Ys.init}}),kae({codePath:s,codeMd5:e,clientKey:t,desc:n}).then(E=>{E.code===0||E?.error?.code===10024||E?.error?.code===10028?(console.log(E,"prepareWasmCode"),h({...E,data:{...E?.data,status:Ys.processing}}),y()):(o(!1),h({...c,error:E?.error||{code:-1,message:"Internal server error, please try again later..."},data:{...c?.data}}))})},y=()=>{Aae({codeMd5:e,clientKey:t},{intervalMs:500,maxAttempts:100,signal:mR.signal}).then(E=>{E.code===0?(console.log(E,"pollWasmPrepareResult"),h(E),o(!1)):(o(!1),h({...c,data:{...c?.data}}))})},b=()=>{h({...c,data:{...c?.data,status:"downloading"}}),Mae({codePath:s,downloadUrl:c?.data?.package?.downloadUrl||""}).then(E=>{E.code===0?(h({...c,data:{...c?.data,status:"downloadSuccess"}}),a({taskId:c?.data?.taskId||""})):h({...c,data:{...c?.data,status:"downloadFailed"}})})};return P.useEffect(()=>{p()},[s,n,e,t]),A.jsxs("div",{className:"wasm-modal-content-base",children:[c?.data?.status===Ys.init&&A.jsx("div",{className:"wasm-prepare-init-content",children:"发起分包预处理中"}),(c?.data?.status===Ys.processing||c?.data?.status===Ys.processingReady)&&A.jsxs("div",{className:"wasm-prepare-processing-content",children:["分包处理中,可能要几分钟时间...",A.jsx("br",{}),"期间请不要修改本地游戏包体,否则会造成分包失败!",A.jsx("div",{className:"wasm-prepare-processing-cancel",children:A.jsx(Xe,{onClick:()=>{f()},children:"取消"})})]}),c?.data?.status===Ys.success&&A.jsxs("div",{className:"wasm-prepare-success-content",children:["分包处理成功!",A.jsx("br",{}),A.jsx("div",{className:"wasm-prepare-success-download",children:A.jsx(Xe,{onClick:()=>{b()},children:"下载分包代码"})})]}),c?.data?.status<=Ys.failed&&A.jsxs("div",{className:"wasm-prepare-failed-content",children:["分包处理失败!",A.jsx("br",{}),A.jsx("div",{className:"wasm-prepare-failed-error",children:c?.error?.message||""}),A.jsx("div",{className:"wasm-prepare-failed-retry",children:A.jsx(Xe,{onClick:()=>p(),children:"重试"})})]}),c?.data?.status===Ys.downloading&&A.jsxs("div",{className:"wasm-prepare-downloading-content",children:["分包代码下载中,可能要几分钟时间...",A.jsx("br",{}),"期间请不要修改本地游戏包体,否则会造成分包失败!"]}),c?.data?.status===Ys.downloadFailed&&A.jsxs("div",{className:"wasm-prepare-download-failed-content",children:["分包代码下载失败!",A.jsx("br",{}),A.jsx("div",{className:"wasm-prepare-download-failed-retry",children:A.jsx(Xe,{onClick:()=>b(),children:"重试"})})]})]})},Hae=({onCancel:s,onNext:e,taskId:t,codeMd5:n,clientKey:r})=>{const{state:{schema:a}}=Qr();return A.jsxs("div",{className:"wasm-modal-content-base",children:[A.jsx("div",{className:"collect-qrcode-title",children:"扫描二维码开始收集"}),A.jsx("div",{className:"collect-qrcode-container",children:A.jsx(jC,{value:a})}),A.jsx("div",{className:"collect-qrcode-desc",children:"当前本地项目已经支持 wasm 分包,请用 TikTok 客户端扫描二维码,开始收集函数,请支持完成加载环节、游戏教学等前期内容。"}),A.jsx("div",{className:"collect-qrcode-button-container",children:A.jsx(Xe,{onClick:e,children:"收集完成,开始分包"})})]})},Uae=({onCancel:s,taskId:e,codeMd5:t,codePath:n,clientKey:r})=>{const a=new AbortController,[i,o]=P.useState("processing"),[c,h]=P.useState(""),f=()=>{a.abort(),s()},p=()=>{o("downloading"),jae({downloadUrl:c,codePath:n}).then(E=>{E.code===0?o("downloaded"):o("downloadfailed")})},y=()=>{o("processing"),o("processing"),Fae({codeMd5:t,clientKey:r}).then(E=>{E.code===0&&$ae({taskId:E.data.taskId,codeMd5:t,clientKey:r},{intervalMs:1e3,maxAttempts:100,signal:a.signal}).then(C=>{C.code===0&&C.data.status==="success"?(o("success"),h(C.data.downloadUrl)):o("failed")})}).catch(()=>{o("failed")})};P.useEffect(()=>{y()},[]);let b=null;switch(i){case"processing":b=A.jsxs("div",{className:"wasm-split-processing",children:[A.jsx("div",{className:"wasm-split-processing-content",children:"分包处理中,可能需要一些时间,请在分包处理完成后点击下载分包。"}),A.jsx("div",{className:"wasm-split-processing-cancel",children:A.jsx(Xe,{type:"tertiary",onClick:()=>f(),children:"取消分包"})})]});break;case"success":b=A.jsxs("div",{className:"wasm-split-success",children:[A.jsx("div",{className:"wasm-split-success-content",children:"分包处理成功,点击下载分包。"}),A.jsx("div",{className:"wasm-split-success-download",children:A.jsx(Xe,{type:"primary",onClick:()=>p(),children:"下载分包"})})]});break;case"failed":b=A.jsxs("div",{className:"wasm-split-failed",children:[A.jsx("div",{className:"wasm-split-failed-content",children:"分包处理失败,请点击重试。"}),A.jsx("div",{className:"wasm-split-failed-retry",children:A.jsx(Xe,{type:"primary",onClick:()=>y(),children:"重试分包"})})]});break;case"downloading":b=A.jsx("div",{className:"wasm-split-downloading",children:"下载中..."});break;case"downloaded":b=A.jsx("div",{className:"wasm-split-downloaded",children:"下载成功"});break;case"downloadfailed":b=A.jsx("div",{className:"wasm-split-downloadfailed",children:"下载失败"});break;default:b=null}return A.jsx("div",{className:"wasm-modal-content-base",children:b})},Kc={start:{number:0,title:"开始分包"},prepare:{number:1,title:"分包预处理"},collect:{number:2,title:"函数收集"},split:{number:3,title:"代码分包"}},zae=({codePath:s,clientKey:e,codeMd5:t})=>{const[n,r]=P.useState(!1),[a,i]=P.useState(""),[o,c]=P.useState(""),[h,f]=P.useState("start"),p=!!s;return A.jsxs(A.Fragment,{children:[A.jsx(bn,{trigger:p?"custom":"hover",visible:!p,content:"需要保证项目中存在 wasmcode/[hash].webgl.wasm.code.unityweb.wasm.br 文件",children:A.jsxs("div",{className:$("wasm-code-split",{"wasm-code-split-disabled":!p}),onClick:()=>{if(p)r(!n);else return},children:[A.jsx(b7,{size:"default"}),A.jsx("span",{className:"wasm-code-split-text",children:"Wasm 分包"})]})}),A.jsxs(Cr,{visible:n,footer:null,style:{width:"90%"},onCancel:()=>r(!1),onOk:()=>r(!1),title:"Wasm 分包",children:[A.jsxs(ci,{type:"basic",current:Kc[h].number,style:{marginTop:24},children:[A.jsx(ci.Step,{title:Kc.start.title}),A.jsx(ci.Step,{title:Kc.prepare.title}),A.jsx(ci.Step,{title:Kc.collect.title}),A.jsx(ci.Step,{title:Kc.split.title})]}),h==="start"&&A.jsx(Vae,{onNext:y=>{c(y.desc),f("prepare")}}),h==="prepare"&&A.jsx(Bae,{codeMd5:t,codePath:s,clientKey:e,desc:o,onCancel:()=>{r(!1),f("start")},onNext:({taskId:y})=>{i(y),f("collect")}}),h==="collect"&&A.jsx(Hae,{taskId:a,codeMd5:t,clientKey:e,onCancel:()=>{r(!1),f("start")},onNext:()=>{f("split")}}),h==="split"&&A.jsx(Uae,{taskId:a,codeMd5:t,clientKey:e,onCancel:()=>{r(!1),f("start")}})]})]})},Kae=()=>{const{state:{devToolVersion:s,engine:e,packages:t,gameDetail:n}}=Qr();console.log("gameEngine",e);const r=t?.find(o=>o.name==="wasmcode"),a=r?.root,i=r?.md5;return A.jsxs("div",{className:"header-wrapper",children:[A.jsxs("div",{className:"header-content",children:[A.jsxs("div",{className:"header-content-left",children:[A.jsx(Eae,{}),s&&A.jsx(Cn,{style:{margin:8,flexShrink:0},color:"light-blue",size:"large",shape:"circle",type:"ghost",children:s}),A.jsx(Oae,{})]}),A.jsx("div",{className:"header-content-right",children:A.jsxs(Co,{spacing:12,children:[A.jsx(Dae,{}),A.jsx(_ae,{}),e==="unity"&&A.jsx(zae,{codePath:a,codeMd5:i,clientKey:n?.client_key}),A.jsx(Pae,{})]})})]}),A.jsx(Xz,{})]})},qae=()=>(P.useEffect(()=>(Cu.init(),()=>{Cu.close()}),[]),null);function Wae(){return A.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:A.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 Gae=()=>A.jsx(Ml,{svg:A.jsx(Wae,{})});function Yae(){return A.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[A.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"}),A.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"}),A.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 Zae=()=>A.jsx(Ml,{svg:A.jsx(Yae,{})});function Xae(){return A.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[A.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 7.16667C7.33518 7.16667 8.45466 6.24312 8.75446 5H14.6667C14.8508 5 15 4.85076 15 4.66667V4C15 3.81591 14.8508 3.66667 14.6667 3.66667H8.75446C8.45466 2.42355 7.33518 1.5 6 1.5C4.66482 1.5 3.54534 2.42355 3.24554 3.66667H1.33333C1.14924 3.66667 1 3.81591 1 4V4.66667C1 4.85076 1.14924 5 1.33333 5H3.24554C3.54534 6.24312 4.66482 7.16667 6 7.16667ZM7.5 4.33333C7.5 5.16176 6.82843 5.83333 6 5.83333C5.17157 5.83333 4.5 5.16176 4.5 4.33333C4.5 3.50491 5.17157 2.83333 6 2.83333C6.82843 2.83333 7.5 3.50491 7.5 4.33333Z",fill:"black",fillOpacity:"0.65"}),A.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 14.5C11.3352 14.5 12.4547 13.5765 12.7545 12.3333H14.6667C14.8508 12.3333 15 12.1841 15 12V11.3333C15 11.1492 14.8508 11 14.6667 11H12.7545C12.4547 9.75688 11.3352 8.83333 10 8.83333C8.66482 8.83333 7.54534 9.75688 7.24554 11H1.33333C1.14924 11 1 11.1492 1 11.3333V12C1 12.1841 1.14924 12.3333 1.33333 12.3333H7.24554C7.54534 13.5765 8.66482 14.5 10 14.5ZM11.5 11.6667C11.5 12.4951 10.8284 13.1667 10 13.1667C9.17157 13.1667 8.5 12.4951 8.5 11.6667C8.5 10.8382 9.17157 10.1667 10 10.1667C10.8284 10.1667 11.5 10.8382 11.5 11.6667Z",fill:"black",fillOpacity:"0.65"})]})}const Qae=()=>A.jsx(Ml,{svg:A.jsx(Xae,{})});function Jae(){return A.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[A.jsx("path",{d:"M5.66666 2.66659C5.85076 2.66659 6 2.51735 6 2.33325V1.66659C6 1.48249 5.85076 1.33325 5.66666 1.33325H5.59999C4.10652 1.33325 3.35979 1.33325 2.78935 1.6239C2.28759 1.87956 1.87964 2.28751 1.62398 2.78928C1.33333 3.35971 1.33333 4.10645 1.33333 5.59992V5.66658C1.33333 5.85068 1.48257 5.99992 1.66666 5.99992H2.33333C2.51742 5.99992 2.66666 5.85068 2.66666 5.66658V5.59992C2.66666 4.83118 2.6677 4.33482 2.69856 3.95703C2.72816 3.59482 2.7784 3.46052 2.81199 3.3946C2.93982 3.14372 3.14379 2.93974 3.39467 2.81191C3.4606 2.77832 3.59489 2.72808 3.95711 2.69849C4.33489 2.66762 4.83126 2.66659 5.59999 2.66659H5.66666Z",fill:"black",fillOpacity:"0.65"}),A.jsx("path",{d:"M14.6667 5.66658C14.6667 5.85068 14.5174 5.99992 14.3333 5.99992H13.6667C13.4826 5.99992 13.3333 5.85068 13.3333 5.66658V5.59992C13.3333 4.83118 13.3323 4.33482 13.3014 3.95703C13.2718 3.59482 13.2216 3.46052 13.188 3.3946C13.0602 3.14372 12.8562 2.93974 12.6053 2.81191C12.5394 2.77832 12.4051 2.72808 12.0429 2.69849C11.6651 2.66762 11.1687 2.66659 10.4 2.66659H10.3333C10.1492 2.66659 10 2.51735 10 2.33325V1.66659C10 1.48249 10.1492 1.33325 10.3333 1.33325H10.4C11.8935 1.33325 12.6402 1.33325 13.2106 1.6239C13.7124 1.87956 14.1203 2.28751 14.376 2.78928C14.6667 3.35971 14.6667 4.10645 14.6667 5.59992V5.66658Z",fill:"black",fillOpacity:"0.65"}),A.jsx("path",{d:"M1.66666 9.99992C1.48257 9.99992 1.33333 10.1492 1.33333 10.3333V10.3999C1.33333 11.8934 1.33333 12.6401 1.62398 13.2106C1.87964 13.7123 2.28759 14.1203 2.78935 14.3759C3.35979 14.6666 4.10652 14.6666 5.59999 14.6666H5.66666C5.85076 14.6666 6 14.5173 6 14.3333V13.6666C6 13.4825 5.85076 13.3333 5.66666 13.3333H5.59999C4.83126 13.3333 4.33489 13.3322 3.95711 13.3013C3.59489 13.2718 3.4606 13.2215 3.39467 13.1879C3.14379 13.0601 2.93982 12.8561 2.81199 12.6052C2.7784 12.5393 2.72816 12.405 2.69856 12.0428C2.6677 11.665 2.66666 11.1687 2.66666 10.3999V10.3333C2.66666 10.1492 2.51742 9.99992 2.33333 9.99992H1.66666Z",fill:"black",fillOpacity:"0.65"}),A.jsx("path",{d:"M10.3333 13.3333C10.1492 13.3333 10 13.4825 10 13.6666V14.3333C10 14.5173 10.1492 14.6666 10.3333 14.6666H10.4C11.8935 14.6666 12.6402 14.6666 13.2106 14.3759C13.7124 14.1203 14.1203 13.7123 14.376 13.2106C14.6667 12.6401 14.6667 11.8934 14.6667 10.3999V10.3333C14.6667 10.1492 14.5174 9.99992 14.3333 9.99992H13.6667C13.4826 9.99992 13.3333 10.1492 13.3333 10.3333V10.3999C13.3333 11.1687 13.3323 11.665 13.3014 12.0428C13.2718 12.405 13.2216 12.5393 13.188 12.6052C13.0602 12.8561 12.8562 13.0601 12.6053 13.1879C12.5394 13.2215 12.4051 13.2718 12.0429 13.3013C11.6651 13.3322 11.1687 13.3333 10.4 13.3333H10.3333Z",fill:"black",fillOpacity:"0.65"}),A.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.17159 10.1144C8.64463 10.4634 8.01272 10.6667 7.33333 10.6667C5.49238 10.6667 3.99999 9.17428 3.99999 7.33333C3.99999 5.49238 5.49238 4 7.33333 4C9.17428 4 10.6667 5.49238 10.6667 7.33333C10.6667 8.01272 10.4634 8.64464 10.1144 9.17159L11.7357 10.7929C11.8659 10.9231 11.8659 11.1341 11.7357 11.2643L11.2643 11.7357C11.1341 11.8659 10.9231 11.8659 10.7929 11.7357L9.17159 10.1144ZM9.33333 7.33333C9.33333 8.4379 8.4379 9.33333 7.33333 9.33333C6.22876 9.33333 5.33333 8.4379 5.33333 7.33333C5.33333 6.22876 6.22876 5.33333 7.33333 5.33333C8.4379 5.33333 9.33333 6.22876 9.33333 7.33333Z",fill:"black",fillOpacity:"0.65"})]})}const eie=()=>A.jsx(Ml,{svg:A.jsx(Jae,{})}),lC=[{text:H("scanQRCode2Debug"),itemKey:"scan_qrcode",icon:A.jsx(Gae,{}),path:"/"},{itemKey:"launch_mode",text:H("launchMode"),icon:A.jsx(Qae,{}),path:"/launch_mode"},{itemKey:"precheck_code",text:H("codePreCheck"),icon:A.jsx(eie,{}),path:"/precheck_code"},{itemKey:"project_info",text:H("projectInfo"),icon:A.jsx(Zae,{}),path:"/project_detail"}],tie=()=>{const s=zp(),[e,t]=P.useState("scan_qrcode"),n=r=>{const a=lC.find(i=>i.itemKey===r.itemKey);s(a.path),t(a.itemKey)};return P.useEffect(()=>{const r=window.location.pathname,a=lC.find(i=>i.path===r);a&&t(a.itemKey)},[s]),A.jsx(ka,{limitIndent:!1,bodyStyle:{height:"100vh",paddingLeft:"12px"},items:lC,selectedKeys:[e],onSelect:n})},nie=()=>{const{state:{loading:s}}=Qr();return s.visible?A.jsx("div",{className:"loading-container",children:A.jsxs("div",{className:"loading-content",children:[A.jsx(br,{size:"large"}),A.jsx("div",{className:"loading-text",children:s.text})]})}):null};function rie(){const{state:{feature:s,loading:e,error:t},setSchema:n,showLoading:r,hideLoading:a,setError:i,setUser:o,setPackages:c,setGameDetail:h,setDevToolVersion:f,setEngine:p}=Qr(),[y,b]=P.useState(!1),[E,C]=P.useState("");P.useEffect(()=>{Zne()},[]);const S=()=>{Xr({url:"/game/detail",method:"GET"}).then(w=>{if(w.error){a();const{errorCode:x,errorMsg:O}=w.error;h({client_key:w.error.clientKey,has_error:!0,error_msg:O,error_code:x}),x===404&&i({text:H("getDevGameDetailNotFound",{clientKey:w.error.clientKey})});return}else i({text:""}),h(w.data),a()})};return P.useEffect(()=>{r(),Xr({url:"/game/config",method:"GET"}).then(w=>{if(w.error)a(),i({visible:!0,text:H("getDevGameConfigFailed")+`: ${w.error.errorMsg}`}),b(!0),C(H("getDevGameConfigFailed")),console.log(`❌ ${H("getDevGameConfigFailed")}: ${w.error.errorMsg}`);else{console.log(`✅ ${H("getDevGameConfigSuccess")}`);const{schema:x,nodeWsPort:O,user:T,packages:D,devToolVersion:R,clientKey:k,engine:M}=w.data;n(x),Ue.setMultiple({nodeWsPort:O,email:T?.email,clientKey:k}),o(T),f(R),c(D),p(M),a()}}),S()},[]),P.useEffect(()=>(Ct.on("resourceChange",S),()=>{Ct.off("resourceChange",S)}),[]),e.visible?A.jsx(nie,{}):y?A.jsxs("div",{className:"server-error-container",children:[A.jsx(hae,{}),A.jsx("div",{className:"server-error-text",children:E})]}):A.jsxs(hse,{children:[t.text&&A.jsx(_i,{description:t.text,type:"danger"}),A.jsx(qae,{}),A.jsxs("div",{className:"main-layout",children:[A.jsx(Kae,{}),A.jsxs("div",{className:"content-wrapper",children:[s.sidebar.enable&&A.jsx(tie,{}),A.jsx("div",{className:"routes-container",children:A.jsxs(Ure,{children:[A.jsx(il,{path:"/",element:A.jsx(Hse,{})}),A.jsx(il,{path:"/project_detail",element:A.jsx(pae,{})}),A.jsx(il,{path:"/debug_setting",element:A.jsx(Use,{})}),A.jsx(il,{path:"/launch_mode",element:A.jsx(Kse,{})}),A.jsx(il,{path:"/precheck_code",element:A.jsx(Sae,{})})]})})]})]})]})}bM.createRoot(document.getElementById("root")).render(A.jsx(jS,{children:A.jsx(Jne,{children:A.jsx(rie,{})})}));
67
+ Please change the parent <Route path="${x}"> to <Route path="${x==="/"?"*":`${x}/*`}">.`)}let y=wo(),b;if(e){let x=typeof e=="string"?Wl(e):e;fn(f==="/"||x.pathname?.startsWith(f),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${f}" but pathname "${x.pathname}" was given in the \`location\` prop.`),b=x}else b=y;let E=b.pathname||"/",C=E;if(f!=="/"){let x=f.replace(/^\//,"").split("/");C="/"+E.replace(/^\//,"").split("/").slice(x.length).join("/")}let S=nA(s,{pathname:C});ua(p||S!=null,`No routes matched location "${b.pathname}${b.search}${b.hash}" `),ua(S==null||S[S.length-1].route.element!==void 0||S[S.length-1].route.Component!==void 0||S[S.length-1].route.lazy!==void 0,`Matched leaf route at location "${b.pathname}${b.search}${b.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let w=Are(S&&S.map(x=>Object.assign({},x,{params:Object.assign({},c,x.params),pathname:xa([f,a.encodeLocation?a.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?f:xa([f,a.encodeLocation?a.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),i,t,n,r);return e&&w?P.createElement(Xu.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...b},navigationType:"POP"}},w):w}function Dre(){let s=jre(),e=Ere(s)?`${s.status} ${s.statusText}`:s instanceof Error?s.message:JSON.stringify(s),t=s instanceof Error?s.stack:null,n="rgba(200,200,200, 0.5)",r={padding:"0.5rem",backgroundColor:n},a={padding:"2px 4px",backgroundColor:n},i=null;return console.error("Error handled by React Router default ErrorBoundary:",s),i=P.createElement(P.Fragment,null,P.createElement("p",null,"💿 Hey developer 👋"),P.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",P.createElement("code",{style:a},"ErrorBoundary")," or"," ",P.createElement("code",{style:a},"errorElement")," prop on your route.")),P.createElement(P.Fragment,null,P.createElement("h2",null,"Unexpected Application Error!"),P.createElement("h3",{style:{fontStyle:"italic"}},e),t?P.createElement("pre",{style:r},t):null,i)}var Rre=P.createElement(Dre,null),kre=class extends P.Component{constructor(s){super(s),this.state={location:s.location,revalidation:s.revalidation,error:s.error}}static getDerivedStateFromError(s){return{error:s}}static getDerivedStateFromProps(s,e){return e.location!==s.location||e.revalidation!=="idle"&&s.revalidation==="idle"?{error:s.error,location:s.location,revalidation:s.revalidation}:{error:s.error!==void 0?s.error:e.error,location:e.location,revalidation:s.revalidation||e.revalidation}}componentDidCatch(s,e){this.props.unstable_onError?this.props.unstable_onError(s,e):console.error("React Router caught the following error during render",s)}render(){return this.state.error!==void 0?P.createElement(Ma.Provider,{value:this.props.routeContext},P.createElement(Dw.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Nre({routeContext:s,match:e,children:t}){let n=P.useContext(Gl);return n&&n.static&&n.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=e.route.id),P.createElement(Ma.Provider,{value:s},t)}function Are(s,e=[],t=null,n=null,r=null){if(s==null){if(!t)return null;if(t.errors)s=t.matches;else if(e.length===0&&!t.initialized&&t.matches.length>0)s=t.matches;else return null}let a=s,i=t?.errors;if(i!=null){let h=a.findIndex(f=>f.route.id&&i?.[f.route.id]!==void 0);fn(h>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),a=a.slice(0,Math.min(a.length,h+1))}let o=!1,c=-1;if(t)for(let h=0;h<a.length;h++){let f=a[h];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(c=h),f.route.id){let{loaderData:p,errors:y}=t,b=f.route.loader&&!p.hasOwnProperty(f.route.id)&&(!y||y[f.route.id]===void 0);if(f.route.lazy||b){o=!0,c>=0?a=a.slice(0,c+1):a=[a[0]];break}}}return a.reduceRight((h,f,p)=>{let y,b=!1,E=null,C=null;t&&(y=i&&f.route.id?i[f.route.id]:void 0,E=f.route.errorElement||Rre,o&&(c<0&&p===0?(hA("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),b=!0,C=null):c===p&&(b=!0,C=f.route.hydrateFallbackElement||null)));let S=e.concat(a.slice(0,p+1)),w=()=>{let x;return y?x=E:b?x=C:f.route.Component?x=P.createElement(f.route.Component,null):f.route.element?x=f.route.element:x=h,P.createElement(Nre,{match:f,routeContext:{outlet:h,matches:S,isDataRoute:t!=null},children:x})};return t&&(f.route.ErrorBoundary||f.route.errorElement||p===0)?P.createElement(kre,{location:t.location,revalidation:t.revalidation,component:E,error:y,children:w(),routeContext:{outlet:null,matches:S,isDataRoute:!0},unstable_onError:n}):w()},null)}function Rw(s){return`${s} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Mre(s){let e=P.useContext(Gl);return fn(e,Rw(s)),e}function Fre(s){let e=P.useContext(Up);return fn(e,Rw(s)),e}function Lre(s){let e=P.useContext(Ma);return fn(e,Rw(s)),e}function kw(s){let e=Lre(s),t=e.matches[e.matches.length-1];return fn(t.route.id,`${s} can only be used on routes that contain a unique "id"`),t.route.id}function $re(){return kw("useRouteId")}function jre(){let s=P.useContext(Dw),e=Fre("useRouteError"),t=kw("useRouteError");return s!==void 0?s:e.errors?.[t]}function Vre(){let{router:s}=Mre("useNavigate"),e=kw("useNavigate"),t=P.useRef(!1);return uA(()=>{t.current=!0}),P.useCallback(async(r,a={})=>{ua(t.current,cA),t.current&&(typeof r=="number"?s.navigate(r):await s.navigate(r,{fromRouteId:e,...a}))},[s,e])}var XD={};function hA(s,e,t){!e&&!XD[s]&&(XD[s]=!0,ua(!1,t))}P.memo(Bre);function Bre({routes:s,future:e,state:t,unstable_onError:n}){return dA(s,void 0,t,n,e)}function il(s){fn(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Hre({basename:s="/",children:e=null,location:t,navigationType:n="POP",navigator:r,static:a=!1}){fn(!Qu(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let i=s.replace(/^\/*/,"/"),o=P.useMemo(()=>({basename:i,navigator:r,static:a,future:{}}),[i,r,a]);typeof t=="string"&&(t=Wl(t));let{pathname:c="/",search:h="",hash:f="",state:p=null,key:y="default"}=t,b=P.useMemo(()=>{let E=Na(c,i);return E==null?null:{location:{pathname:E,search:h,hash:f,state:p,key:y},navigationType:n}},[i,c,h,f,p,y,n]);return ua(b!=null,`<Router basename="${i}"> is not able to match the URL "${c}${h}${f}" because it does not start with the basename, so the <Router> won't render anything.`),b==null?null:P.createElement(fa.Provider,{value:o},P.createElement(Xu.Provider,{children:e,value:b}))}function Ure({children:s,location:e}){return Ire($C(s),e)}function $C(s,e=[]){let t=[];return P.Children.forEach(s,(n,r)=>{if(!P.isValidElement(n))return;let a=[...e,r];if(n.type===P.Fragment){t.push.apply(t,$C(n.props.children,a));return}fn(n.type===il,`[${typeof n.type=="string"?n.type:n.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),fn(!n.props.index||!n.props.children,"An index route cannot have child routes.");let i={id:n.props.id||a.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,hydrateFallbackElement:n.props.hydrateFallbackElement,HydrateFallback:n.props.HydrateFallback,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.hasErrorBoundary===!0||n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(i.children=$C(n.props.children,a)),t.push(i)}),t}var Rf="get",kf="application/x-www-form-urlencoded";function Kp(s){return s!=null&&typeof s.tagName=="string"}function zre(s){return Kp(s)&&s.tagName.toLowerCase()==="button"}function Kre(s){return Kp(s)&&s.tagName.toLowerCase()==="form"}function qre(s){return Kp(s)&&s.tagName.toLowerCase()==="input"}function Wre(s){return!!(s.metaKey||s.altKey||s.ctrlKey||s.shiftKey)}function Gre(s,e){return s.button===0&&(!e||e==="_self")&&!Wre(s)}var mf=null;function Yre(){if(mf===null)try{new FormData(document.createElement("form"),0),mf=!1}catch{mf=!0}return mf}var Zre=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Q0(s){return s!=null&&!Zre.has(s)?(ua(!1,`"${s}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${kf}"`),null):s}function Xre(s,e){let t,n,r,a,i;if(Kre(s)){let o=s.getAttribute("action");n=o?Na(o,e):null,t=s.getAttribute("method")||Rf,r=Q0(s.getAttribute("enctype"))||kf,a=new FormData(s)}else if(zre(s)||qre(s)&&(s.type==="submit"||s.type==="image")){let o=s.form;if(o==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let c=s.getAttribute("formaction")||o.getAttribute("action");if(n=c?Na(c,e):null,t=s.getAttribute("formmethod")||o.getAttribute("method")||Rf,r=Q0(s.getAttribute("formenctype"))||Q0(o.getAttribute("enctype"))||kf,a=new FormData(o,s),!Yre()){let{name:h,type:f,value:p}=s;if(f==="image"){let y=h?`${h}.`:"";a.append(`${y}x`,"0"),a.append(`${y}y`,"0")}else h&&a.append(h,p)}}else{if(Kp(s))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');t=Rf,n=null,r=kf,i=s}return a&&r==="text/plain"&&(i=a,a=void 0),{action:n,method:t.toLowerCase(),encType:r,formData:a,body:i}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Nw(s,e){if(s===!1||s===null||typeof s>"u")throw new Error(e)}function Qre(s,e,t){let n=typeof s=="string"?new URL(s,typeof window>"u"?"server://singlefetch/":window.location.origin):s;return n.pathname==="/"?n.pathname=`_root.${t}`:e&&Na(n.pathname,e)==="/"?n.pathname=`${e.replace(/\/$/,"")}/_root.${t}`:n.pathname=`${n.pathname.replace(/\/$/,"")}.${t}`,n}async function Jre(s,e){if(s.id in e)return e[s.id];try{let t=await import(s.module);return e[s.id]=t,t}catch(t){return console.error(`Error loading route module \`${s.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function ese(s){return s==null?!1:s.href==null?s.rel==="preload"&&typeof s.imageSrcSet=="string"&&typeof s.imageSizes=="string":typeof s.rel=="string"&&typeof s.href=="string"}async function tse(s,e,t){let n=await Promise.all(s.map(async r=>{let a=e.routes[r.route.id];if(a){let i=await Jre(a,t);return i.links?i.links():[]}return[]}));return ase(n.flat(1).filter(ese).filter(r=>r.rel==="stylesheet"||r.rel==="preload").map(r=>r.rel==="stylesheet"?{...r,rel:"prefetch",as:"style"}:{...r,rel:"prefetch"}))}function QD(s,e,t,n,r,a){let i=(c,h)=>t[h]?c.route.id!==t[h].route.id:!0,o=(c,h)=>t[h].pathname!==c.pathname||t[h].route.path?.endsWith("*")&&t[h].params["*"]!==c.params["*"];return a==="assets"?e.filter((c,h)=>i(c,h)||o(c,h)):a==="data"?e.filter((c,h)=>{let f=n.routes[c.route.id];if(!f||!f.hasLoader)return!1;if(i(c,h)||o(c,h))return!0;if(c.route.shouldRevalidate){let p=c.route.shouldRevalidate({currentUrl:new URL(r.pathname+r.search+r.hash,window.origin),currentParams:t[0]?.params||{},nextUrl:new URL(s,window.origin),nextParams:c.params,defaultShouldRevalidate:!0});if(typeof p=="boolean")return p}return!0}):[]}function nse(s,e,{includeHydrateFallback:t}={}){return rse(s.map(n=>{let r=e.routes[n.route.id];if(!r)return[];let a=[r.module];return r.clientActionModule&&(a=a.concat(r.clientActionModule)),r.clientLoaderModule&&(a=a.concat(r.clientLoaderModule)),t&&r.hydrateFallbackModule&&(a=a.concat(r.hydrateFallbackModule)),r.imports&&(a=a.concat(r.imports)),a}).flat(1))}function rse(s){return[...new Set(s)]}function sse(s){let e={},t=Object.keys(s).sort();for(let n of t)e[n]=s[n];return e}function ase(s,e){let t=new Set;return new Set(e),s.reduce((n,r)=>{let a=JSON.stringify(sse(r));return t.has(a)||(t.add(a),n.push({key:a,link:r})),n},[])}function fA(){let s=P.useContext(Gl);return Nw(s,"You must render this element inside a <DataRouterContext.Provider> element"),s}function ise(){let s=P.useContext(Up);return Nw(s,"You must render this element inside a <DataRouterStateContext.Provider> element"),s}var Aw=P.createContext(void 0);Aw.displayName="FrameworkContext";function pA(){let s=P.useContext(Aw);return Nw(s,"You must render this element inside a <HydratedRouter> element"),s}function ose(s,e){let t=P.useContext(Aw),[n,r]=P.useState(!1),[a,i]=P.useState(!1),{onFocus:o,onBlur:c,onMouseEnter:h,onMouseLeave:f,onTouchStart:p}=e,y=P.useRef(null);P.useEffect(()=>{if(s==="render"&&i(!0),s==="viewport"){let C=w=>{w.forEach(x=>{i(x.isIntersecting)})},S=new IntersectionObserver(C,{threshold:.5});return y.current&&S.observe(y.current),()=>{S.disconnect()}}},[s]),P.useEffect(()=>{if(n){let C=setTimeout(()=>{i(!0)},100);return()=>{clearTimeout(C)}}},[n]);let b=()=>{r(!0)},E=()=>{r(!1),i(!1)};return t?s!=="intent"?[a,y,{}]:[a,y,{onFocus:zc(o,b),onBlur:zc(c,E),onMouseEnter:zc(h,b),onMouseLeave:zc(f,E),onTouchStart:zc(p,b)}]:[!1,y,{}]}function zc(s,e){return t=>{s&&s(t),t.defaultPrevented||e(t)}}function lse({page:s,...e}){let{router:t}=fA(),n=P.useMemo(()=>nA(t.routes,s,t.basename),[t.routes,s,t.basename]);return n?P.createElement(use,{page:s,matches:n,...e}):null}function cse(s){let{manifest:e,routeModules:t}=pA(),[n,r]=P.useState([]);return P.useEffect(()=>{let a=!1;return tse(s,e,t).then(i=>{a||r(i)}),()=>{a=!0}},[s,e,t]),n}function use({page:s,matches:e,...t}){let n=wo(),{manifest:r,routeModules:a}=pA(),{basename:i}=fA(),{loaderData:o,matches:c}=ise(),h=P.useMemo(()=>QD(s,e,c,r,n,"data"),[s,e,c,r,n]),f=P.useMemo(()=>QD(s,e,c,r,n,"assets"),[s,e,c,r,n]),p=P.useMemo(()=>{if(s===n.pathname+n.search+n.hash)return[];let E=new Set,C=!1;if(e.forEach(w=>{let x=r.routes[w.route.id];!x||!x.hasLoader||(!h.some(O=>O.route.id===w.route.id)&&w.route.id in o&&a[w.route.id]?.shouldRevalidate||x.hasClientLoader?C=!0:E.add(w.route.id))}),E.size===0)return[];let S=Qre(s,i,"data");return C&&E.size>0&&S.searchParams.set("_routes",e.filter(w=>E.has(w.route.id)).map(w=>w.route.id).join(",")),[S.pathname+S.search]},[i,o,n,r,h,e,s,a]),y=P.useMemo(()=>nse(f,r),[f,r]),b=cse(f);return P.createElement(P.Fragment,null,p.map(E=>P.createElement("link",{key:E,rel:"prefetch",as:"fetch",href:E,...t})),y.map(E=>P.createElement("link",{key:E,rel:"modulepreload",href:E,...t})),b.map(({key:E,link:C})=>P.createElement("link",{key:E,nonce:t.nonce,...C})))}function dse(...s){return e=>{s.forEach(t=>{typeof t=="function"?t(e):t!=null&&(t.current=e)})}}var gA=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{gA&&(window.__reactRouterVersion="7.8.2")}catch{}function hse({basename:s,children:e,window:t}){let n=P.useRef();n.current==null&&(n.current=ere({window:t,v5Compat:!0}));let r=n.current,[a,i]=P.useState({action:r.action,location:r.location}),o=P.useCallback(c=>{P.startTransition(()=>i(c))},[i]);return P.useLayoutEffect(()=>r.listen(o),[r,o]),P.createElement(Hre,{basename:s,children:e,location:a.location,navigationType:a.action,navigator:r})}var mA=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,yA=P.forwardRef(function({onClick:e,discover:t="render",prefetch:n="none",relative:r,reloadDocument:a,replace:i,state:o,target:c,to:h,preventScrollReset:f,viewTransition:p,...y},b){let{basename:E}=P.useContext(fa),C=typeof h=="string"&&mA.test(h),S,w=!1;if(typeof h=="string"&&C&&(S=h,gA))try{let F=new URL(window.location.href),j=h.startsWith("//")?new URL(F.protocol+h):new URL(h),V=Na(j.pathname,E);j.origin===F.origin&&V!=null?h=V+j.search+j.hash:w=!0}catch{ua(!1,`<Link to="${h}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let x=Tre(h,{relative:r}),[O,T,D]=ose(n,y),R=mse(h,{replace:i,state:o,target:c,preventScrollReset:f,relative:r,viewTransition:p});function k(F){e&&e(F),F.defaultPrevented||R(F)}let M=P.createElement("a",{...y,...D,href:S||x,onClick:w||a?e:k,ref:dse(b,T),target:c,"data-discover":!C&&t==="render"?"true":void 0});return O&&!C?P.createElement(P.Fragment,null,M,P.createElement(lse,{page:x})):M});yA.displayName="Link";var fse=P.forwardRef(function({"aria-current":e="page",caseSensitive:t=!1,className:n="",end:r=!1,style:a,to:i,viewTransition:o,children:c,...h},f){let p=Ju(i,{relative:h.relative}),y=wo(),b=P.useContext(Up),{navigator:E,basename:C}=P.useContext(fa),S=b!=null&&Sse(p)&&o===!0,w=E.encodeLocation?E.encodeLocation(p).pathname:p.pathname,x=y.pathname,O=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;t||(x=x.toLowerCase(),O=O?O.toLowerCase():null,w=w.toLowerCase()),O&&C&&(O=Na(O,C)||O);const T=w!=="/"&&w.endsWith("/")?w.length-1:w.length;let D=x===w||!r&&x.startsWith(w)&&x.charAt(T)==="/",R=O!=null&&(O===w||!r&&O.startsWith(w)&&O.charAt(w.length)==="/"),k={isActive:D,isPending:R,isTransitioning:S},M=D?e:void 0,F;typeof n=="function"?F=n(k):F=[n,D?"active":null,R?"pending":null,S?"transitioning":null].filter(Boolean).join(" ");let j=typeof a=="function"?a(k):a;return P.createElement(yA,{...h,"aria-current":M,className:F,ref:f,style:j,to:i,viewTransition:o},typeof c=="function"?c(k):c)});fse.displayName="NavLink";var pse=P.forwardRef(({discover:s="render",fetcherKey:e,navigate:t,reloadDocument:n,replace:r,state:a,method:i=Rf,action:o,onSubmit:c,relative:h,preventScrollReset:f,viewTransition:p,...y},b)=>{let E=bse(),C=Cse(o,{relative:h}),S=i.toLowerCase()==="get"?"get":"post",w=typeof o=="string"&&mA.test(o),x=O=>{if(c&&c(O),O.defaultPrevented)return;O.preventDefault();let T=O.nativeEvent.submitter,D=T?.getAttribute("formmethod")||i;E(T||O.currentTarget,{fetcherKey:e,method:D,navigate:t,replace:r,state:a,relative:h,preventScrollReset:f,viewTransition:p})};return P.createElement("form",{ref:b,method:S,action:C,onSubmit:n?c:x,...y,"data-discover":!w&&s==="render"?"true":void 0})});pse.displayName="Form";function gse(s){return`${s} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function vA(s){let e=P.useContext(Gl);return fn(e,gse(s)),e}function mse(s,{target:e,replace:t,state:n,preventScrollReset:r,relative:a,viewTransition:i}={}){let o=zp(),c=wo(),h=Ju(s,{relative:a});return P.useCallback(f=>{if(Gre(f,e)){f.preventDefault();let p=t!==void 0?t:bu(c)===bu(h);o(s,{replace:p,state:n,preventScrollReset:r,relative:a,viewTransition:i})}},[c,o,h,t,n,e,s,r,a,i])}var yse=0,vse=()=>`__${String(++yse)}__`;function bse(){let{router:s}=vA("useSubmit"),{basename:e}=P.useContext(fa),t=$re();return P.useCallback(async(n,r={})=>{let{action:a,method:i,encType:o,formData:c,body:h}=Xre(n,e);if(r.navigate===!1){let f=r.fetcherKey||vse();await s.fetch(f,t,r.action||a,{preventScrollReset:r.preventScrollReset,formData:c,body:h,formMethod:r.method||i,formEncType:r.encType||o,flushSync:r.flushSync})}else await s.navigate(r.action||a,{preventScrollReset:r.preventScrollReset,formData:c,body:h,formMethod:r.method||i,formEncType:r.encType||o,replace:r.replace,state:r.state,fromRouteId:t,flushSync:r.flushSync,viewTransition:r.viewTransition})},[s,e,t])}function Cse(s,{relative:e}={}){let{basename:t}=P.useContext(fa),n=P.useContext(Ma);fn(n,"useFormAction must be used inside a RouteContext");let[r]=n.matches.slice(-1),a={...Ju(s||".",{relative:e})},i=wo();if(s==null){a.search=i.search;let o=new URLSearchParams(a.search),c=o.getAll("index");if(c.some(f=>f==="")){o.delete("index"),c.filter(p=>p).forEach(p=>o.append("index",p));let f=o.toString();a.search=f?`?${f}`:""}}return(!s||s===".")&&r.route.index&&(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index"),t!=="/"&&(a.pathname=a.pathname==="/"?t:xa([t,a.pathname])),bu(a)}function Sse(s,{relative:e}={}){let t=P.useContext(lA);fn(t!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=vA("useViewTransitionState"),r=Ju(s,{relative:e});if(!t.isTransitioning)return!1;let a=Na(t.currentLocation.pathname,n)||t.currentLocation.pathname,i=Na(t.nextLocation.pathname,n)||t.nextLocation.pathname;return ep(r.pathname,i)!=null||ep(r.pathname,a)!=null}const wse=document.getElementById(Iw),JD=wse.contentWindow;class Ese{ws;connectTimeoutTimer;isTimeout=!1;init(e){this.connectTimeoutTimer&&(clearTimeout(this.connectTimeoutTimer),this.connectTimeoutTimer=void 0),this.ws&&(this.ws.close(),this.ws=void 0),this.isTimeout=!1;const t=`ws://${e.clientHost}:${e.clientWsPort||e.clientHttpPort-1}`;console.info(`⌛️ ${H("startConnectClientWS",{wsURL:t})}`);const n=new WebSocket(t);this.connectTimeoutTimer=setTimeout(()=>{n.readyState!==WebSocket.OPEN&&(this.isTimeout=!0,n.close(),console.error(`${H("clientConnectTimeout")||"客户端连接超时"}`),Ct.emit("connectionChange",{node:Ue.get("isNodeWSConnected"),client:!1,from:"client"}),WD())},5e3),n.onclose=()=>{this.connectTimeoutTimer&&(clearTimeout(this.connectTimeoutTimer),this.connectTimeoutTimer=void 0),this.isTimeout||(console.error(`${H("clientServerDisconnected")}`),Ct.emit("connectionChange",{node:Ue.get("isNodeWSConnected"),client:!1}),WD())},n.onerror=()=>{if(this.connectTimeoutTimer&&(clearTimeout(this.connectTimeoutTimer),this.connectTimeoutTimer=void 0),!this.isTimeout){const r=H("clientServerStartError");Ct.emit("connectionChange",{node:Ue.get("isNodeWSConnected"),client:!1}),console.error(r)}},this.ws=n,n.onopen=()=>{this.connectTimeoutTimer&&(clearTimeout(this.connectTimeoutTimer),this.connectTimeoutTimer=void 0),this.isTimeout||(console.log(`✅ ${H("clientConnectedSuccess")}`),Ct.emit("connectionChange",{node:Ue.get("isNodeWSConnected"),client:!0,from:"client"}),n.send(JSON.stringify({stage:"connecting",status:"success",message:"Browser connected to Client Server Successfully"})))},n.onmessage=function(r){try{const a=JSON.parse(r.data);switch(a?.method){case"subscribeHandler":JD.__DEV__?.subscribeHandler?.(a?.payload?.event,a?.payload?.data);break;case"invokeHandler":JD.__DEV__?.invokeHandler?.(a?.payload?.callbackId,a?.payload?.data);break;default:break}}catch(a){console.error(a)}}}send(e){this.ws?.readyState&&(e.from="browser",this.ws?.send(JSON.stringify(e)))}close(){this.connectTimeoutTimer&&(clearTimeout(this.connectTimeoutTimer),this.connectTimeoutTimer=void 0),this.ws?.close(),this.ws=void 0}}const ed=new Ese,_se={start:{msgKey:"uploadGameStart"},success:{msgKey:"uploadGameSuccess",handle:s=>{const{packages:e,clientKey:t}=s||{};Ue.setMultiple({packages:e,clientKey:t,isResourcesReady:!0}),Ct.emit("setupStatusChange",{isScriptsReady:Ue.get("isScriptsReady"),isResourcesReady:!0})}},process:{msgKey:"uploadProcess"},error:{msgKey:"uploadError",handle:s=>{const{msg:e}=s||{};Ue.set("isResourcesReady",!1),Ct.emit("setupStatusChange",{isScriptsReady:Ue.get("isScriptsReady"),isResourcesReady:!1,isResourcesFailed:!0})}},restart:{msgKey:"uploadGameRestart"}};function Ose(s){const{status:e,payload:t}=s,n=_se[e];if(!n){console.warn(`Unknown upload status: ${e}`);return}const r=H(n.msgKey);Ct.emit("uploadGame",{status:e,msg:r,progress:t?.progress}),n.handle&&n.handle(t)}class xse{ws;init(){const e=Ue.get("nodeWsPort");return console.info(`⌛️ ${H("nodeServerStartConnect")}`),this.ws=new WebSocket(`ws://localhost:${e}`),this.ws.onclose=()=>{console.error(`❌ ${H("nodeServerDisconnect")}`),Ct.emit("connectionChange",{node:!1,client:Ue.get("isClientWSConnected")})},this.ws.onerror=()=>{const t=H("nodeServerStartError");console.error(t)},this.ws.onopen=()=>{console.log(`✅ ${H("nodeServerConnectedSuccess")}`),Ct.emit("connectionChange",{node:!0,client:Ue.get("isClientWSConnected")}),this.ws?.send(JSON.stringify({event:"connected",method:"connected",from:"browser"}))},this.ws.onmessage=t=>{if(t.data){const n=JSON.parse(t.data);switch(n.method){case"uploadStatus":{Ose(n);break}case"compilationStatus":{Ct.emit("compilationStatus",n.payload);break}case"resourceChange":{oa.info("Node WS resourceChange",n?.payload),Ct.emit("resourceChange",{});break}case"scanQRCodeSuccess":{const{clientWsPort:a,clientHost:i,clientHttpPort:o}=n.payload;Ue.setMultiple({clientHost:i,clientWsPort:a,clientHttpPort:o}),ed.init({clientWsPort:a,clientHost:i,clientHttpPort:o}),Ct.emit("scanQRCode",{status:"success"});break}case"scanQRCodeFailed":{const{msg:a}=n.payload;Ct.emit("scanQRCode",{status:"failed",msg:a});break}case"scanQRCodeStart":{Ct.emit("scanQRCode",{status:"start"});break}}}},!0}send(e){e.from="browser",this.ws?.send(JSON.stringify(e))}close(){this.ws?.close(),this.ws=void 0}}const Cu=new xse,Tse=["krypton.js","ttmg-core.js"];async function eR(s){try{const e=eA();console.log(`⌛️ ${H("startDebug")}`),console.log(`⌛️ ${H("initClientEnv")}`);const t=await Xr({url:`${e}/game/cwd`,method:"POST",data:{command:"start"}});if(console.log("cwd result",t),console.log(`✅ ${H("initClientEnvSuccess")}`),ed.send({method:"setDebugSettings",payload:s.debugSetting}),s.debugMode==="clientPreview"||s.debugMode==="clientDebug")Ue.set("isScriptsReady",!0),Cu.send({method:"startUpload"});else{console.log(`⌛️ ${H("startInitJSDevEnv")}`);const r=document.getElementById(Iw).contentWindow;r.__DEV__={isEnable:!0,server:e},console.log(`✅ ${H("initJSDevEnvSuccess")}`);const a=await Pse(r,Tse,e),i=Object.values(a).some(o=>!o);Ue.set("isScriptsReady",Object.values(a).every(o=>o)),Ct.emit("setupStatusChange",{isScriptsReady:Ue.get("isScriptsReady"),isResourcesReady:Ue.get("isResourcesReady"),isScriptsFailed:i}),i||(console.log(`✅ ${H("setDevScriptsSuccess")}`),Cu.send({method:"startUpload"}))}}catch(e){console.log(`❌ ${H("setDevEnvFailed")}`,e?.message??e)}}async function Pse(s,e,t){const n={};for(const r of e)try{console.log(`⏳ ${H("startLoadDevScripts")}: ${r}`);const a=await fetch(`${t}/game/scripts/${r}`);if(!a.ok){console.error(`${H("loadDevScriptsFailed")}: ${r}`),n[r]=!1;continue}const i=await a.text();if(!i){console.error(`${H("loadDevScriptsEmpty")}: ${r}`),n[r]=!1;continue}console.log(`✅ ${H("loadDevScriptsSuccess")}: ${r}`);const o=s.document.createElement("script");o.id=r,o.type="text/javascript",o.text=i,s.document.body.appendChild(o),n[r]=!0,console.log(`✅ ${H("loadDevScriptsInitSuccess")}: ${r}`)}catch(a){console.error(`${H("loadDevScriptsFailed")}: ${r}`,a),n[r]=!1}return n}function Ise(){const s=()=>typeof document<"u"?document.hidden:!1,[e,t]=P.useState(s);return P.useEffect(()=>{const n=()=>{t(document.hidden),ed.send({method:"sendPageVisibility",payload:{isHidden:document.hidden}})};return document.addEventListener("visibilitychange",n),()=>{document.removeEventListener("visibilitychange",n)}},[]),e}const Dse=m.memo(()=>{const{setMessage:s,hideLoading:e,state:{gameDetail:t,debugSetting:n,isConnected:r,selectedLaunchOption:a,debugMode:i}}=Qr();Ise();const[o,c]=P.useState(""),h=E=>{if(!E.client||!E.node){Ue.set("hasSetup",!1);return}if(Ue.get("hasSetup"))return;Ue.set("hasSetup",!0),(async()=>{e(),s({type:"success",desc:H("setupDevEnv")}),await eR({debugSetting:n,debugMode:i})})()},f=P.useCallback(({status:E,msg:C,progress:S})=>{switch(E){case"start":const w=`⌛️ ${H("uploadStart")}`;s({type:"info",desc:w}),console.log(w);break;case"success":s({type:"success",desc:H("uploadSuccess")}),console.log(`✅ ${H("uploadSuccess")}`);break;case"error":const x=`${H("uploadError")}: ${C}`;s({type:"danger",desc:x}),console.log(x);break;case"restart":break;case"process":const O=`${H("uploadProcess")} ${(S*100).toFixed(0)}%`;s({type:"info",desc:O});break}},[]),p=P.useCallback(({isScriptsReady:E,isResourcesReady:C,isScriptsFailed:S,isResourcesFailed:w})=>{E&&C?(oa.info("scripts and resources are ready, send meta"),Wne(t),s({type:"success",desc:H(i==="clientPreview"?"clientPreviewEnvSetupSuccess":"debugEnvSetupSuccess")})):S?s({type:"danger",desc:H("scriptsSetupFailed")}):w&&s({type:"danger",desc:H("resourcesSetupFailed")})},[t,a,i]),y=()=>{if(!r)return;const E=ia.warning({position:"top",duration:1e4,title:H("gameResourceUpdated"),id:o,onClose:()=>{c("")},content:A.jsxs(A.Fragment,{children:[A.jsx("p",{children:H("gameResourceChange")}),A.jsxs("div",{className:"banner-footer",children:[A.jsx(Xe,{type:"tertiary",onClick:()=>{ia.close(E)},children:H("notUpload")}),A.jsx(Xe,{style:{marginLeft:12},type:"warning",onClick:()=>{oa.info("upload"),oa.info("upload iframe onload, 开始重新初始化"),eR({debugSetting:n,debugMode:i}),ia.close(E)},children:H("uploadToClient")})]})]})});c(E)},b=P.useCallback(({status:E,errorMsg:C})=>{E==="start"?(s({type:"info",title:H("gameResourceCompilingTitle"),desc:H("gameResourceCompiling")}),console.warn(`⚠️ ${H("gameResourceCompiling")}`)):E==="end"&&(C?(s({type:"danger",desc:C}),console.error(`❌ ${C}`)):(s({type:"success",title:H("gameResourceCompileSuccessTitle"),desc:H("gameResourceCompileSuccess")}),console.log(`✅ ${H("gameResourceCompileSuccess")}`)))},[]);return P.useEffect(()=>(Ct.on("connectionChange",h),Ct.on("compilationStatus",b),Ct.on("resourceChange",y),Ct.on("uploadGame",f),Ct.on("setupStatusChange",p),()=>{Ct.off("compilationStatus",b),Ct.off("resourceChange",y),Ct.off("setupStatusChange",p),Ct.off("uploadGame",f),Ct.off("connectionChange",h)}),[h,b,y,p,f]),null});var sl={},J0,tR;function bA(){return tR||(tR=1,J0={L:1,M:0,Q:3,H:2}),J0}var eC,nR;function CA(){return nR||(nR=1,eC={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8}),eC}var tC,rR;function Rse(){if(rR)return tC;rR=1;var s=CA();function e(t){this.mode=s.MODE_8BIT_BYTE,this.data=t}return e.prototype={getLength:function(t){return this.data.length},write:function(t){for(var n=0;n<this.data.length;n++)t.put(this.data.charCodeAt(n),8)}},tC=e,tC}var nC,sR;function kse(){if(sR)return nC;sR=1;var s=bA();function e(t,n){this.totalCount=t,this.dataCount=n}return e.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],e.getRSBlocks=function(t,n){var r=e.getRsBlockTable(t,n);if(r==null)throw new Error("bad rs block @ typeNumber:"+t+"/errorCorrectLevel:"+n);for(var a=r.length/3,i=new Array,o=0;o<a;o++)for(var c=r[o*3+0],h=r[o*3+1],f=r[o*3+2],p=0;p<c;p++)i.push(new e(h,f));return i},e.getRsBlockTable=function(t,n){switch(n){case s.L:return e.RS_BLOCK_TABLE[(t-1)*4+0];case s.M:return e.RS_BLOCK_TABLE[(t-1)*4+1];case s.Q:return e.RS_BLOCK_TABLE[(t-1)*4+2];case s.H:return e.RS_BLOCK_TABLE[(t-1)*4+3];default:return}},nC=e,nC}var rC,aR;function Nse(){if(aR)return rC;aR=1;function s(){this.buffer=new Array,this.length=0}return s.prototype={get:function(e){var t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)==1},put:function(e,t){for(var n=0;n<t;n++)this.putBit((e>>>t-n-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},rC=s,rC}var sC,iR;function SA(){if(iR)return sC;iR=1;for(var s={glog:function(t){if(t<1)throw new Error("glog("+t+")");return s.LOG_TABLE[t]},gexp:function(t){for(;t<0;)t+=255;for(;t>=256;)t-=255;return s.EXP_TABLE[t]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},e=0;e<8;e++)s.EXP_TABLE[e]=1<<e;for(var e=8;e<256;e++)s.EXP_TABLE[e]=s.EXP_TABLE[e-4]^s.EXP_TABLE[e-5]^s.EXP_TABLE[e-6]^s.EXP_TABLE[e-8];for(var e=0;e<255;e++)s.LOG_TABLE[s.EXP_TABLE[e]]=e;return sC=s,sC}var aC,oR;function wA(){if(oR)return aC;oR=1;var s=SA();function e(t,n){if(t.length==null)throw new Error(t.length+"/"+n);for(var r=0;r<t.length&&t[r]==0;)r++;this.num=new Array(t.length-r+n);for(var a=0;a<t.length-r;a++)this.num[a]=t[a+r]}return e.prototype={get:function(t){return this.num[t]},getLength:function(){return this.num.length},multiply:function(t){for(var n=new Array(this.getLength()+t.getLength()-1),r=0;r<this.getLength();r++)for(var a=0;a<t.getLength();a++)n[r+a]^=s.gexp(s.glog(this.get(r))+s.glog(t.get(a)));return new e(n,0)},mod:function(t){if(this.getLength()-t.getLength()<0)return this;for(var n=s.glog(this.get(0))-s.glog(t.get(0)),r=new Array(this.getLength()),a=0;a<this.getLength();a++)r[a]=this.get(a);for(var a=0;a<t.getLength();a++)r[a]^=s.gexp(s.glog(t.get(a))+n);return new e(r,0).mod(t)}},aC=e,aC}var iC,lR;function Ase(){if(lR)return iC;lR=1;var s=CA(),e=wA(),t=SA(),n={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},r={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(a){for(var i=a<<10;r.getBCHDigit(i)-r.getBCHDigit(r.G15)>=0;)i^=r.G15<<r.getBCHDigit(i)-r.getBCHDigit(r.G15);return(a<<10|i)^r.G15_MASK},getBCHTypeNumber:function(a){for(var i=a<<12;r.getBCHDigit(i)-r.getBCHDigit(r.G18)>=0;)i^=r.G18<<r.getBCHDigit(i)-r.getBCHDigit(r.G18);return a<<12|i},getBCHDigit:function(a){for(var i=0;a!=0;)i++,a>>>=1;return i},getPatternPosition:function(a){return r.PATTERN_POSITION_TABLE[a-1]},getMask:function(a,i,o){switch(a){case n.PATTERN000:return(i+o)%2==0;case n.PATTERN001:return i%2==0;case n.PATTERN010:return o%3==0;case n.PATTERN011:return(i+o)%3==0;case n.PATTERN100:return(Math.floor(i/2)+Math.floor(o/3))%2==0;case n.PATTERN101:return i*o%2+i*o%3==0;case n.PATTERN110:return(i*o%2+i*o%3)%2==0;case n.PATTERN111:return(i*o%3+(i+o)%2)%2==0;default:throw new Error("bad maskPattern:"+a)}},getErrorCorrectPolynomial:function(a){for(var i=new e([1],0),o=0;o<a;o++)i=i.multiply(new e([1,t.gexp(o)],0));return i},getLengthInBits:function(a,i){if(1<=i&&i<10)switch(a){case s.MODE_NUMBER:return 10;case s.MODE_ALPHA_NUM:return 9;case s.MODE_8BIT_BYTE:return 8;case s.MODE_KANJI:return 8;default:throw new Error("mode:"+a)}else if(i<27)switch(a){case s.MODE_NUMBER:return 12;case s.MODE_ALPHA_NUM:return 11;case s.MODE_8BIT_BYTE:return 16;case s.MODE_KANJI:return 10;default:throw new Error("mode:"+a)}else if(i<41)switch(a){case s.MODE_NUMBER:return 14;case s.MODE_ALPHA_NUM:return 13;case s.MODE_8BIT_BYTE:return 16;case s.MODE_KANJI:return 12;default:throw new Error("mode:"+a)}else throw new Error("type:"+i)},getLostPoint:function(a){for(var i=a.getModuleCount(),o=0,c=0;c<i;c++)for(var h=0;h<i;h++){for(var f=0,p=a.isDark(c,h),y=-1;y<=1;y++)if(!(c+y<0||i<=c+y))for(var b=-1;b<=1;b++)h+b<0||i<=h+b||y==0&&b==0||p==a.isDark(c+y,h+b)&&f++;f>5&&(o+=3+f-5)}for(var c=0;c<i-1;c++)for(var h=0;h<i-1;h++){var E=0;a.isDark(c,h)&&E++,a.isDark(c+1,h)&&E++,a.isDark(c,h+1)&&E++,a.isDark(c+1,h+1)&&E++,(E==0||E==4)&&(o+=3)}for(var c=0;c<i;c++)for(var h=0;h<i-6;h++)a.isDark(c,h)&&!a.isDark(c,h+1)&&a.isDark(c,h+2)&&a.isDark(c,h+3)&&a.isDark(c,h+4)&&!a.isDark(c,h+5)&&a.isDark(c,h+6)&&(o+=40);for(var h=0;h<i;h++)for(var c=0;c<i-6;c++)a.isDark(c,h)&&!a.isDark(c+1,h)&&a.isDark(c+2,h)&&a.isDark(c+3,h)&&a.isDark(c+4,h)&&!a.isDark(c+5,h)&&a.isDark(c+6,h)&&(o+=40);for(var C=0,h=0;h<i;h++)for(var c=0;c<i;c++)a.isDark(c,h)&&C++;var S=Math.abs(100*C/i/i-50)/5;return o+=S*10,o}};return iC=r,iC}var oC,cR;function Mse(){if(cR)return oC;cR=1;var s=Rse(),e=kse(),t=Nse(),n=Ase(),r=wA();function a(o,c){this.typeNumber=o,this.errorCorrectLevel=c,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var i=a.prototype;return i.addData=function(o){var c=new s(o);this.dataList.push(c),this.dataCache=null},i.isDark=function(o,c){if(o<0||this.moduleCount<=o||c<0||this.moduleCount<=c)throw new Error(o+","+c);return this.modules[o][c]},i.getModuleCount=function(){return this.moduleCount},i.make=function(){if(this.typeNumber<1){var o=1;for(o=1;o<40;o++){for(var c=e.getRSBlocks(o,this.errorCorrectLevel),h=new t,f=0,p=0;p<c.length;p++)f+=c[p].dataCount;for(var p=0;p<this.dataList.length;p++){var y=this.dataList[p];h.put(y.mode,4),h.put(y.getLength(),n.getLengthInBits(y.mode,o)),y.write(h)}if(h.getLengthInBits()<=f*8)break}this.typeNumber=o}this.makeImpl(!1,this.getBestMaskPattern())},i.makeImpl=function(o,c){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var h=0;h<this.moduleCount;h++){this.modules[h]=new Array(this.moduleCount);for(var f=0;f<this.moduleCount;f++)this.modules[h][f]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(o,c),this.typeNumber>=7&&this.setupTypeNumber(o),this.dataCache==null&&(this.dataCache=a.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,c)},i.setupPositionProbePattern=function(o,c){for(var h=-1;h<=7;h++)if(!(o+h<=-1||this.moduleCount<=o+h))for(var f=-1;f<=7;f++)c+f<=-1||this.moduleCount<=c+f||(0<=h&&h<=6&&(f==0||f==6)||0<=f&&f<=6&&(h==0||h==6)||2<=h&&h<=4&&2<=f&&f<=4?this.modules[o+h][c+f]=!0:this.modules[o+h][c+f]=!1)},i.getBestMaskPattern=function(){for(var o=0,c=0,h=0;h<8;h++){this.makeImpl(!0,h);var f=n.getLostPoint(this);(h==0||o>f)&&(o=f,c=h)}return c},i.createMovieClip=function(o,c,h){var f=o.createEmptyMovieClip(c,h),p=1;this.make();for(var y=0;y<this.modules.length;y++)for(var b=y*p,E=0;E<this.modules[y].length;E++){var C=E*p,S=this.modules[y][E];S&&(f.beginFill(0,100),f.moveTo(C,b),f.lineTo(C+p,b),f.lineTo(C+p,b+p),f.lineTo(C,b+p),f.endFill())}return f},i.setupTimingPattern=function(){for(var o=8;o<this.moduleCount-8;o++)this.modules[o][6]==null&&(this.modules[o][6]=o%2==0);for(var c=8;c<this.moduleCount-8;c++)this.modules[6][c]==null&&(this.modules[6][c]=c%2==0)},i.setupPositionAdjustPattern=function(){for(var o=n.getPatternPosition(this.typeNumber),c=0;c<o.length;c++)for(var h=0;h<o.length;h++){var f=o[c],p=o[h];if(this.modules[f][p]==null)for(var y=-2;y<=2;y++)for(var b=-2;b<=2;b++)y==-2||y==2||b==-2||b==2||y==0&&b==0?this.modules[f+y][p+b]=!0:this.modules[f+y][p+b]=!1}},i.setupTypeNumber=function(o){for(var c=n.getBCHTypeNumber(this.typeNumber),h=0;h<18;h++){var f=!o&&(c>>h&1)==1;this.modules[Math.floor(h/3)][h%3+this.moduleCount-8-3]=f}for(var h=0;h<18;h++){var f=!o&&(c>>h&1)==1;this.modules[h%3+this.moduleCount-8-3][Math.floor(h/3)]=f}},i.setupTypeInfo=function(o,c){for(var h=this.errorCorrectLevel<<3|c,f=n.getBCHTypeInfo(h),p=0;p<15;p++){var y=!o&&(f>>p&1)==1;p<6?this.modules[p][8]=y:p<8?this.modules[p+1][8]=y:this.modules[this.moduleCount-15+p][8]=y}for(var p=0;p<15;p++){var y=!o&&(f>>p&1)==1;p<8?this.modules[8][this.moduleCount-p-1]=y:p<9?this.modules[8][15-p-1+1]=y:this.modules[8][15-p-1]=y}this.modules[this.moduleCount-8][8]=!o},i.mapData=function(o,c){for(var h=-1,f=this.moduleCount-1,p=7,y=0,b=this.moduleCount-1;b>0;b-=2)for(b==6&&b--;;){for(var E=0;E<2;E++)if(this.modules[f][b-E]==null){var C=!1;y<o.length&&(C=(o[y]>>>p&1)==1);var S=n.getMask(c,f,b-E);S&&(C=!C),this.modules[f][b-E]=C,p--,p==-1&&(y++,p=7)}if(f+=h,f<0||this.moduleCount<=f){f-=h,h=-h;break}}},a.PAD0=236,a.PAD1=17,a.createData=function(o,c,h){for(var f=e.getRSBlocks(o,c),p=new t,y=0;y<h.length;y++){var b=h[y];p.put(b.mode,4),p.put(b.getLength(),n.getLengthInBits(b.mode,o)),b.write(p)}for(var E=0,y=0;y<f.length;y++)E+=f[y].dataCount;if(p.getLengthInBits()>E*8)throw new Error("code length overflow. ("+p.getLengthInBits()+">"+E*8+")");for(p.getLengthInBits()+4<=E*8&&p.put(0,4);p.getLengthInBits()%8!=0;)p.putBit(!1);for(;!(p.getLengthInBits()>=E*8||(p.put(a.PAD0,8),p.getLengthInBits()>=E*8));)p.put(a.PAD1,8);return a.createBytes(p,f)},a.createBytes=function(o,c){for(var h=0,f=0,p=0,y=new Array(c.length),b=new Array(c.length),E=0;E<c.length;E++){var C=c[E].dataCount,S=c[E].totalCount-C;f=Math.max(f,C),p=Math.max(p,S),y[E]=new Array(C);for(var w=0;w<y[E].length;w++)y[E][w]=255&o.buffer[w+h];h+=C;var x=n.getErrorCorrectPolynomial(S),O=new r(y[E],x.getLength()-1),T=O.mod(x);b[E]=new Array(x.getLength()-1);for(var w=0;w<b[E].length;w++){var D=w+T.getLength()-b[E].length;b[E][w]=D>=0?T.get(D):0}}for(var R=0,w=0;w<c.length;w++)R+=c[w].totalCount;for(var k=new Array(R),M=0,w=0;w<f;w++)for(var E=0;E<c.length;E++)w<y[E].length&&(k[M++]=y[E][w]);for(var w=0;w<p;w++)for(var E=0;E<c.length;E++)w<b[E].length&&(k[M++]=b[E][w]);return k},oC=a,oC}var yf={},uR;function Fse(){if(uR)return yf;uR=1,Object.defineProperty(yf,"__esModule",{value:!0});var s=Object.assign||function(h){for(var f=1;f<arguments.length;f++){var p=arguments[f];for(var y in p)Object.prototype.hasOwnProperty.call(p,y)&&(h[y]=p[y])}return h},e=zC(),t=a(e),n=Su(),r=a(n);function a(h){return h&&h.__esModule?h:{default:h}}function i(h,f){var p={};for(var y in h)f.indexOf(y)>=0||Object.prototype.hasOwnProperty.call(h,y)&&(p[y]=h[y]);return p}var o={bgColor:t.default.oneOfType([t.default.object,t.default.string]).isRequired,bgD:t.default.string.isRequired,fgColor:t.default.oneOfType([t.default.object,t.default.string]).isRequired,fgD:t.default.string.isRequired,size:t.default.number.isRequired,title:t.default.string,viewBoxSize:t.default.number.isRequired,xmlns:t.default.string},c=(0,n.forwardRef)(function(h,f){var p=h.bgColor,y=h.bgD,b=h.fgD,E=h.fgColor,C=h.size,S=h.title,w=h.viewBoxSize,x=h.xmlns,O=x===void 0?"http://www.w3.org/2000/svg":x,T=i(h,["bgColor","bgD","fgD","fgColor","size","title","viewBoxSize","xmlns"]);return r.default.createElement("svg",s({},T,{height:C,ref:f,viewBox:"0 0 "+w+" "+w,width:C,xmlns:O}),S?r.default.createElement("title",null,S):null,r.default.createElement("path",{d:y,fill:p}),r.default.createElement("path",{d:b,fill:E}))});return c.displayName="QRCodeSvg",c.propTypes=o,yf.default=c,yf}var dR;function Lse(){if(dR)return sl;dR=1,Object.defineProperty(sl,"__esModule",{value:!0}),sl.QRCode=void 0;var s=Object.assign||function(C){for(var S=1;S<arguments.length;S++){var w=arguments[S];for(var x in w)Object.prototype.hasOwnProperty.call(w,x)&&(C[x]=w[x])}return C},e=zC(),t=p(e),n=bA(),r=p(n),a=Mse(),i=p(a),o=Su(),c=p(o),h=Fse(),f=p(h);function p(C){return C&&C.__esModule?C:{default:C}}function y(C,S){var w={};for(var x in C)S.indexOf(x)>=0||Object.prototype.hasOwnProperty.call(C,x)&&(w[x]=C[x]);return w}var b={bgColor:t.default.oneOfType([t.default.object,t.default.string]),fgColor:t.default.oneOfType([t.default.object,t.default.string]),level:t.default.string,size:t.default.number,value:t.default.string.isRequired},E=(0,o.forwardRef)(function(C,S){var w=C.bgColor,x=w===void 0?"#FFFFFF":w,O=C.fgColor,T=O===void 0?"#000000":O,D=C.level,R=D===void 0?"L":D,k=C.size,M=k===void 0?256:k,F=C.value,j=y(C,["bgColor","fgColor","level","size","value"]),V=new i.default(-1,r.default[R]);V.addData(F),V.make();var q=V.modules;return c.default.createElement(f.default,s({},j,{bgColor:x,bgD:q.map(function(W,J){return W.map(function(ne,te){return ne?"":"M "+te+" "+J+" l 1 0 0 1 -1 0 Z"}).join(" ")}).join(" "),fgColor:T,fgD:q.map(function(W,J){return W.map(function(ne,te){return ne?"M "+te+" "+J+" l 1 0 0 1 -1 0 Z":""}).join(" ")}).join(" "),ref:S,size:M,viewBoxSize:q.length}))});return sl.QRCode=E,E.displayName="QRCode",E.propTypes=b,sl.default=E,sl}var $se=Lse();const jC=Me($se),jse=s=>{const e=zp(),{isConnected:t}=s,{state:{schema:n,launchOptions:r,selectedLaunchOption:a,debugMode:i},setShowManualBindIP:o,setSelectedLaunchOption:c,setDebugMode:h}=Qr(),[f,p]=P.useState(!1),y=S=>{S.status==="success"&&p(!1),S.status==="failed"&&p(!1),S.status==="start"&&p(!0)},b=S=>{h(S),localStorage.setItem("debugMode",S)},E=P.useMemo(()=>{if(a){const{scene:S,pkgName:w,queries:x}=a;let T=`${n}&debugMode=${i}&_tiktok_minis_params=${encodeURIComponent(JSON.stringify({enter_from:S,ttmg_init_module:w}))}`;if(x){const D=zne(x);D&&Object.keys(D).forEach(R=>{T+=`&${R}=${encodeURIComponent(D[R])}`})}return T}return n},[n,a,i]);P.useEffect(()=>(Ct.on("scanQRCode",y),()=>{Ct.off("scanQRCode",y)}),[]);const C=S=>{if(S==="created")c({...Df,name:""}),e("/launch_mode");else{const w=r.find(x=>x.id===S);w&&c(w)}};return t?A.jsx("div",{className:"qr-code-container-connected",children:A.jsxs("div",{className:"qr-code-connected-content",children:[A.jsx(jC,{size:150,value:n}),A.jsxs("div",{className:"qr-code-connected-info",children:[A.jsx("div",{className:"qr-code-connected-desc-title",children:H("scanQRCodeChange")}),A.jsx("div",{className:"qr-code-connected-desc",children:H("scanQRCodeDesc")})]})]})}):A.jsxs("div",{className:"qr-code-container-disconnected",children:[A.jsx("div",{className:"qr-code-select-container",children:A.jsx($s,{value:a?.id,onChange:C,placeholder:H("selectLaunchMode"),style:{minWidth:"140px"},optionList:r.map(S=>({label:S.name,value:S.id}))})}),A.jsxs("div",{className:"qr-code-content",children:[A.jsxs("div",{className:"qr-code-schema",children:[A.jsx(jC,{value:E}),A.jsxs(OS,{style:{marginTop:"12px"},children:[A.jsx(Xe,{theme:i==="browserDebug"?"solid":"outline",type:"tertiary",size:"small",onClick:()=>b("browserDebug"),children:H("browserDebugMode")}),A.jsx(Xe,{onClick:()=>b("clientPreview"),theme:i==="clientPreview"?"solid":"outline",type:"tertiary",size:"small",children:H("clientPreviewMode")})]}),f&&A.jsxs("div",{className:"qr-code-spin",children:[A.jsx(br,{size:"large"}),A.jsx("div",{className:"qr-code-text",children:H("scanning")})]})]}),A.jsx("div",{className:"qr-code-title",children:H("scanQRCode")}),A.jsx("div",{className:"qr-code-desc",children:H("scanQRCodeDesc")}),A.jsxs("div",{className:"qr-code-no-response",onClick:()=>o(!0),children:[H("scanQrcodeNoResponse"),A.jsx(bn,{content:()=>A.jsxs("div",{children:[H("manualBindIPInfo1"),A.jsx("br",{}),H("manualBindIPInfo2")]}),children:A.jsx(Fl,{style:{marginLeft:"4px"}})})]})]})]})},Vse=()=>{const{state:{debugSetting:s,isConnected:e},setDebugSetting:t}=Qr(),n=r=>{t(r),e&&ed.send({method:"setDebugSettings",payload:r})};return A.jsx("div",{className:"debug-setting-card",children:A.jsxs(bp,{style:{width:"100%"},children:[A.jsxs(gi,{style:{marginBottom:12,display:"flex",alignItems:"center"},children:[A.jsx(ke.Text,{style:{fontWeight:"bold",fontSize:16,paddingRight:4},children:H("debugSetting")}),A.jsx(bn,{content:()=>A.jsxs("div",{style:{width:"100%",fontSize:"12px"},children:["1. ",H("debugSettingDomainCheckDesc"),A.jsx("br",{}),"2. ",H("debugSettingAdMockDesc"),A.jsx("br",{}),"3. ",H("debugSettingIAPMockDesc")]}),children:A.jsx(Fl,{})})]}),A.jsxs(gi,{className:"debug-setting-row",children:[A.jsxs("div",{className:"debug-setting-item",children:[A.jsx(bl,{style:{marginRight:"8px"},checked:s.enableDomainCheck,onChange:r=>{n({...s,enableDomainCheck:r})}}),A.jsx(ke.Text,{children:H("debugSettingDomainCheck")})]}),A.jsxs("div",{className:"debug-setting-item",children:[A.jsx(bl,{checked:s.enableAdMock,style:{marginRight:"8px"},onChange:r=>{n({...s,enableAdMock:r})}}),A.jsx(ke.Text,{children:H("debugSettingAdMock")})]})]}),A.jsx(gi,{className:"debug-setting-row",children:A.jsxs("div",{className:"debug-setting-item",children:[A.jsx(bl,{checked:s.enableIAPMock,style:{marginRight:"8px"},onChange:r=>{n({...s,enableIAPMock:r})}}),A.jsx(ke.Text,{children:H("debugSettingIAPMock")})]})})]})})},Bse=()=>{const{state:{showManualBindIP:s},setShowManualBindIP:e}=Qr(),t=r=>{const{ip:a,port:i,wsPort:o}=r;Ue.setMultiple({clientHost:a,clientWsPort:o,clientHttpPort:i}),Cu.send({method:"manualConnect",payload:{clientHost:a,clientWsPort:o,clientHttpPort:i}}),ed.init({clientWsPort:o,clientHost:a,clientHttpPort:i}),localStorage.setItem("clientHost",a),localStorage.setItem("clientWsPort",o),localStorage.setItem("clientHttpPort",i),e(!1)},n={ip:Ue.get("clientHost")||localStorage.getItem("clientHost")||"",port:Ue.get("clientHttpPort")||localStorage.getItem("clientHttpPort")||"",wsPort:Ue.get("clientWsPort")||localStorage.getItem("clientWsPort")||""};return A.jsxs(Cr,{title:H("manualBindClientDebugServiceTitle"),visible:s,showCancel:!1,onCancel:()=>e(!1),showOk:!1,footer:null,children:[A.jsx(_i,{bordered:!1,icon:null,closeIcon:null,fullMode:!1,style:{margin:"12px 0"},description:A.jsxs(A.Fragment,{children:[A.jsx("div",{style:{marginBottom:"8px"},children:H("debug.guide.manualBindIPDesc1")}),A.jsx("div",{style:{marginBottom:"8px"},children:H("debug.guide.manualBindIPDesc2")}),A.jsx("div",{style:{marginBottom:"8px"},children:H("debug.guide.manualBindIPDesc3")})]}),type:"warning"}),A.jsxs(He,{onSubmit:t,initValues:n,style:{marginBottom:"24px"},children:[A.jsx(He.Input,{name:"ip",label:"IP",field:"ip",required:!0,rules:[{required:!0,message:H("debug.guide.manualBindIPInvalid")}]}),A.jsx(He.Input,{name:"port",label:"Port 1 ",field:"port",rules:[{required:!0,message:H("invalidPort")}]}),A.jsx(He.Input,{style:{marginBottom:"12px"},name:"wsPort",label:"Port 2",field:"wsPort",rules:[{required:!0,message:H("invalidPort")}]}),A.jsx(Xe,{type:"primary",htmlType:"submit",style:{marginRight:"8px"},children:H("confirm")}),A.jsx(Xe,{onClick:()=>e(!1),children:H("cancel")})]})]})},Hse=()=>{const{state:{isConnected:s,message:e}}=P.useContext(Pw);return A.jsxs("div",{className:"home-container",children:[A.jsx(_i,{fullMode:!1,icon:null,closeIcon:null,type:e?.type,title:e?.title,description:e?.desc}),A.jsx(jse,{isConnected:s}),A.jsx(Vse,{}),A.jsx(Dse,{}),A.jsx(Bse,{})]})},Use=s=>{const{open:e,onClose:t}=s,[n,r]=P.useState(!0),[a,i]=P.useState(!1),[o,c]=P.useState(!1),[h,f]=P.useState(!1),p=[{label:"是否开启域名校验",description:"开启后,客户端将校验所有请求的域名是否合法,建议开发环境关闭以便调试。",checked:n,onChange:r},{label:"是否开启 IAA Mock",description:"启用后,广告相关接口将返回模拟数据,方便开发和测试广告逻辑。",checked:a,onChange:i},{label:"是否开启 IAP Mock",description:"启用后,内购相关流程将使用模拟支付,避免真实扣费。",checked:o,onChange:c}];return A.jsx("div",{children:A.jsx(Co,{vertical:!0,align:"start",spacing:"loose",children:p.map((y,b)=>A.jsxs("div",{children:[A.jsx(zf,{checked:y.checked,onChange:E=>y.onChange(E.target.checked),children:y.label}),A.jsx(ke.Text,{type:"tertiary",style:{display:"block",marginTop:4},children:y.description})]},b))})})},zse=[{label:H("scene_scan_qrcode"),value:"scan_qrcode"},{label:H("scene_search"),value:"search"},{label:H("scene_anchor"),value:"anchor"},{label:H("scene_center"),value:"center"},{label:H("scene_ad"),value:"ads"},{label:H("scene_shortcut"),value:"desktop_shortcut"},{label:H("scene_sharing"),value:"dm_sharing"},{label:H("scene_link"),value:"minis_link"}],Kse=()=>{const s=zp(),{state:{launchOptions:e,selectedLaunchOption:t,packages:n},setLaunchOptions:r,deleteLaunchOptions:a,setSelectedLaunchOption:i}=Qr(),o=P.useRef(null),c=t||su,[h,f]=P.useState(c),[p,y]=P.useState(c.id),b=n.map(O=>{if(O.type==="main")return{label:H("gameMainPackage"),value:O.name};if(O.type==="independent")return{label:`${H("independentPackage")}: ${O.name}`,value:O.name}}).filter(Boolean),E=P.useCallback(O=>{const T={...h,...O};T.pkgType==="main"&&T.independentPkg!==void 0&&(T.independentPkg=void 0,o.current&&o.current.setValues({independentPkg:void 0})),f(T)},[h]),C=P.useCallback(()=>{if(!o.current)return;const O=o.current.getValues();O.pkgType==="main"&&(O.independentPkg=void 0);const T=e.findIndex(R=>R.id===O.id&&R.id!=="created"&&R.id!=="normal");let D;T!==-1?(D=[...e],D[T]=O):(O.id=Date.now().toString(),D=[...e.slice(0,-1),O,...e.slice(-1)]),r(D),f(O),i(O),s("/")},[e]),S=P.useCallback(O=>{const T=e.find(D=>D.id===O);if(T){y(O);const D={...T};O==="created"&&(D.name=""),f(D),o.current?.setValues(D)}},[e,p]),w=P.useCallback(()=>{if(p===void 0){cW.warning("请先选择一个要删除的启动模式!");return}const O=e.find(D=>D.id===p),T=e.filter(D=>D.id!==p);r(T),y(void 0),S(void 0),a(O.name)},[p,e,S,c]),x=P.useCallback(()=>{f(c),o.current?.setValues(c),s("/")},[c]);return A.jsxs("div",{children:[A.jsx(_i,{style:{marginBottom:32},fullMode:!1,icon:null,closeIcon:null,description:H("launchModeDesc"),type:"info"}),A.jsxs(He,{initValues:h,onValueChange:E,getFormApi:O=>o.current=O,style:{padding:20,border:"1px solid #eee",borderRadius:8},onSubmit:C,children:[A.jsx(He.Select,{placeholder:H("selectLaunchMode"),rules:[{required:!0,message:H("selectLaunchMode")}],field:"id",label:H("selectLaunchMode"),optionList:e.map(O=>({label:O.name,value:O.id})),onChange:S,style:{width:"100%"},value:p}),A.jsx(He.Input,{required:!0,placeholder:H("launchModeName"),field:"name",label:H("launchModeName"),rules:[{required:!0,message:H("notEmpty")}],style:{width:"100%"},trigger:"blur"}),A.jsx(He.Select,{field:"pkgName",label:H("selectLaunchPkg"),placeholder:H("selectLaunchPkg"),rules:[{required:!0,message:H("notEmpty")}],optionList:b,style:{width:"100%"}}),A.jsx(He.Select,{field:"scene",label:H("selectScene"),rules:[{required:!0,message:H("notEmpty")}],placeholder:H("selectScene"),optionList:zse,style:{width:"100%"},filter:!0}),A.jsx(He.Input,{field:"queries",label:H("launchQueries"),placeholder:H("launchQueriesDesc"),trigger:"blur",rules:[{validator:(O,T)=>{const{isValid:D,message:R}=Kne(T);return D?Promise.resolve():Promise.reject(R)}}],style:{width:"100%"}}),A.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",alignItems:"center",marginTop:20},children:[p.id!=="created"||p.id!=="normal"&&A.jsx(Tl,{title:H("deleteLaunchModeConfirm",{name:p.name}),onConfirm:w,position:"bottomRight",children:A.jsx(Xe,{type:"danger",style:{marginRight:12},children:H("delete")})}),A.jsx(Xe,{style:{marginRight:12},onClick:x,children:H("cancel")}),A.jsx(Xe,{htmlType:"submit",type:"primary",children:H("saveAndUse")})]})]})]})},qse=({packages:s})=>A.jsx("div",{children:s.map(({name:e,size:t},n)=>{const r=(t/1024/1024).toFixed(2)+"MB",a=t<=4*1024*1024;return A.jsxs("div",{style:{display:"flex",alignItems:"center",padding:"2px 8px",borderRadius:6,backgroundColor:a?"#E8F5E9":"#FCE4EC",marginBottom:n===s.length-1?0:8,width:"fit-content"},children:[A.jsxs(ke.Text,{style:{fontWeight:600,fontSize:14},children:[e,":"]}),A.jsx(ke.Text,{style:{color:a?"#4CAF50":"#F44336",fontWeight:600},children:r}),A.jsx(ke.Text,{type:"tertiary",style:{marginLeft:8},children:a?H("notExceedIndependentPkgSizeLimit",{limit:"4MB"}):H("exceedIndependentPkgSizeLimit",{limit:"4MB"})})]},e)})}),Wse=({size:s,limit:e})=>{const t=(s/1024/1024).toFixed(2)+"MB",n=s<=e*1024*1024,r=n?H("notExceedSizeLimit",{limit:e+"MB"}):H("exceedSizeLimit",{limit:e+"MB"});return A.jsxs("div",{style:{display:"flex",alignItems:"center",width:"fit-content",padding:"2px 8px",borderRadius:6,backgroundColor:n?"#E8F5E9":"#FCE4EC"},children:[A.jsx(ke.Text,{style:{fontWeight:600,color:n?"#4CAF50":"#F44336"},children:t}),A.jsx(ke.Text,{type:"tertiary",style:{marginLeft:8},children:r})]})},Gse=({packages:s,limit:e})=>{const t=s.find(i=>i.type==="main")?.size,n=(t/1024/1024).toFixed(2)+"MB",r=t<=e*1024*1024,a=r?H("notExceedMainPkgSizeLimit",{limit:e+"MB"}):H("exceedMainPkgSizeLimit",{limit:e+"MB"});return A.jsxs("div",{style:{display:"flex",alignItems:"center",padding:"2px 8px",width:"fit-content",borderRadius:6,backgroundColor:r?"#E8F5E9":"#FCE4EC"},children:[A.jsx(ke.Text,{style:{fontWeight:600,color:r?"#4CAF50":"#F44336"},children:n}),A.jsx(ke.Text,{type:"tertiary",style:{marginLeft:8},children:a})]})},Yse=({domains:s=[]})=>s?.length?A.jsx(Co,{style:{flexWrap:"wrap"},children:s.map(e=>A.jsx(Cn,{children:e},e))}):A.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[A.jsx(ke.Text,{style:{fontSize:14},children:"⚠️"}),A.jsx(ke.Text,{style:{color:"red",marginLeft:8,fontSize:14},children:H("trustDomainEmptyTip")})]}),Zse=({termsOfServiceLink:s})=>s?A.jsx(Cn,{children:s}):A.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[A.jsx(ke.Text,{children:"⚠️"}),A.jsx(ke.Text,{style:{color:"red",marginLeft:8},children:H("termsOfServiceEmptyTip")})]}),Xse=({privacyPolicyLink:s})=>s?A.jsx(Cn,{children:s}):A.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[A.jsx(ke.Text,{children:"⚠️"}),A.jsx(ke.Text,{style:{color:"red",marginLeft:8},children:H("privacyPolicyEmptyTip")})]}),Qse=()=>A.jsx(_i,{style:{marginBottom:32},fullMode:!1,icon:null,closeIcon:null,description:A.jsxs("div",{children:[A.jsx(ke,{style:{marginBottom:8},children:H("projectInfoDesc")}),A.jsx(ke,{children:H("projectInfoDescTip")})]}),type:"info"}),Jse=({logo:s,placeholder:e})=>{const[t,n]=P.useState(!1);return A.jsxs("div",{style:{width:100,height:100,borderRadius:4,overflow:"hidden",position:"relative",background:"#f0f0f0",display:"flex",alignItems:"center",justifyContent:"center"},children:[!t&&(e||A.jsx("div",{style:{width:"100%",height:"100%",background:"#e0e0e0",display:"flex",alignItems:"center",justifyContent:"center",color:"#aaa",fontSize:14}})),A.jsx("img",{src:s,alt:"logo",style:{width:"100%",height:"100%",borderRadius:4,objectFit:"cover",position:"absolute",top:0,left:0,opacity:t?1:0,transition:"opacity 0.3s"},onLoad:()=>n(!0)})]})},eae=({description:s})=>s?A.jsx(ke.Text,{style:{fontSize:14},children:s}):A.jsx(ke.Text,{type:"warning",style:{fontSize:14},children:H("gameDescEmptyTip")});var tae=Object.defineProperty,hR=Object.getOwnPropertySymbols,nae=Object.prototype.hasOwnProperty,rae=Object.prototype.propertyIsEnumerable,fR=(s,e,t)=>e in s?tae(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,sae=(s,e)=>{for(var t in e||(e={}))nae.call(e,t)&&fR(s,t,e[t]);if(hR)for(var t of hR(e))rae.call(e,t)&&fR(s,t,e[t]);return s};function aae(s){return P.createElement("svg",sae({width:200,height:200,viewBox:"0 0 200 200",fill:"none",xmlns:"http://www.w3.org/2000/svg",focusable:!1,"aria-hidden":!0},s),P.createElement("rect",{width:200,height:200,fill:"transparent"}),P.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"}),P.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"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.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)"}),P.createElement("g",{clipPath:"url(#clip_failure_96_39_65)"},P.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)"})),P.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"}),P.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"}),P.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"}),P.createElement("mask",{id:"mask_failure_130_526","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:98,y:44,width:36,height:27},P.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"})),P.createElement("g",{mask:"url(#mask_failure_130_526)"},P.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"}),P.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"}),P.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"}),P.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"}),P.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"}),P.createElement("mask",{id:"path-18-inside-1",fill:"white"},P.createElement("ellipse",{rx:2.97818,ry:2.97818,transform:"matrix(0.727696 0.6859 -0.685903 0.727693 128.435 60.0508)"})),P.createElement("ellipse",{rx:2.97818,ry:2.97818,transform:"matrix(0.727696 0.6859 -0.685903 0.727693 128.435 60.0508)",fill:"white"}),P.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)"})),P.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"}),P.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"}),P.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:""}),P.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:""}),P.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"}),P.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__"}),P.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"}),P.createElement("path",{d:"M126.02 142.7c-3.1-2.99-4.99-7.5-4.16-12.35",stroke:"#515151"}),P.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"}),P.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"}),P.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"}),P.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"}),P.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"}),P.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"}),P.createElement("defs",null,P.createElement("clipPath",{id:"clip_failure_96_39_65"},P.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 iae=aae,oae=Object.defineProperty,pR=Object.getOwnPropertySymbols,lae=Object.prototype.hasOwnProperty,cae=Object.prototype.propertyIsEnumerable,gR=(s,e,t)=>e in s?oae(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,uae=(s,e)=>{for(var t in e||(e={}))lae.call(e,t)&&gR(s,t,e[t]);if(pR)for(var t of pR(e))cae.call(e,t)&&gR(s,t,e[t]);return s};function dae(s){return P.createElement("svg",uae({width:200,height:200,viewBox:"0 0 200 200",fill:"none",xmlns:"http://www.w3.org/2000/svg",focusable:!1,"aria-hidden":!0},s),P.createElement("rect",{width:200,height:200,fill:"transparent"}),P.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M64.09 64.86V8.56L5.76 78.94h44.26v20.3h14.07v-20.3h8.82V64.86h-8.82Zm110.18 0V8.56L124.1 69.08c.7-3.74 1.07-7.7 1.07-11.76 0-11-2.7-21.1-7.25-28.55-4.5-7.4-11.13-12.63-19-12.63-7.88 0-14.5 5.23-19.01 12.63-4.54 7.45-7.25 17.55-7.25 28.55s2.7 21.1 7.25 28.55c4.5 7.4 11.13 12.62 19 12.62 7.88 0 14.5-5.23 19.01-12.62a44.09 44.09 0 0 0 3.4-6.93h38.86v20.3h14.08v-20.3h8.81V64.86h-8.81Zm-138.57 0L50.02 47.6v17.26H35.7Zm124.5 0h-14.32L160.2 47.6v17.26Zm-49.1-7.54c0 8.84-2.2 16.32-5.19 21.22-3.08 5.08-5.87 5.87-6.98 5.87-1.12 0-3.9-.8-7-5.87-2.98-4.9-5.19-12.38-5.19-21.22 0-8.85 2.21-16.33 5.2-21.23 3.09-5.07 5.87-5.87 6.98-5.87 1.12 0 3.9.8 7 5.87 2.98 4.9 5.19 12.38 5.19 21.23Z",fill:"var(--semi-color-primary-light-default)"}),P.createElement("path",{d:"M178.34 186.57c-1.85 2.2-6.66 1.02-8.13.24a2.46 2.46 0 0 1-.34-.22c-1.94.22-14.94-.5-15.12-.46-6.12 1.43-14.06 1.03-15.2 1-1.36-.05-4.53-1.33-5.75-5.08-1.2-3.67 0-7.12 2.16-13.37l.13-.38-1.43 2.83c-7.37 14.43-11.05 19.7-17.43 20.14-6.38.45-34.34-.09-41.09-.78-6.75-.7-9.42-1.68-9.35-2.83.05-.92 2.98-2.2 4.44-2.72-5.88-1.57-20.16-5.97-30.18-10.98-12.52-6.26-25.14-15.8-21.91-28.92 3.22-13.13 15.76-16.8 25.59-17.38 2.75-.16 5.14-.1 7.16.07 3.76.33 6.21 1.06 7.2 1.53-1.12-6.37-3.33-19.34-3.33-20.21 0-1.1-3.02-10.67-3.64-14.35-.1-.55-1.11-5.6 3.64-5.02 4.75.57 12.4 18.2 15.88 28.7a401.55 401.55 0 0 0 11.15-9.87c.84-1.02 9.36-9.75 14.87-13.84a60.09 60.09 0 0 1 33-11.76c16.29-.81 34.49 2.36 40.9 11.91 6.4 9.55 6.1 34.44 6.44 48.71.35 14.27.84 27.64 2.11 29.76 1.27 2.12 6.45 5.02 9.77 7.14 3.33 2.11 4.45 3.9 4.36 4.2-.1.3-.4.58-2.24 1.08.34.47.12 1.38-2.12 1.6-4.7.48-8.64-.74-11.54-.74Z",fill:"white"}),P.createElement("path",{d:"M192 185.71c-1.6-2.3-9.7-5.34-15.04-5.75-5.34-.41-6.45.53-7.4 1.85-1 1.37-1.05 3.72.3 4.78m22.14-.88c.34.47.12 1.38-2.12 1.6-4.7.48-8.64-.74-11.54-.74-1.85 2.2-6.66 1.02-8.13.24a2.46 2.46 0 0 1-.34-.22m22.13-.88c1.84-.5 2.15-.78 2.24-1.08.09-.3-1.03-2.09-4.36-4.2-3.32-2.12-8.5-5.02-9.77-7.14-1.27-2.12-1.76-15.49-2.1-29.76-.36-14.27-.06-39.16-6.46-48.7-6.4-9.56-24.6-12.73-40.89-11.92a60.09 60.09 0 0 0-33 11.76c-5.5 4.09-14.03 12.82-14.87 13.84-.37.46-5.43 4.9-11.15 9.87-3.49-10.5-11.13-28.13-15.88-28.7-4.75-.58-3.73 4.47-3.64 5.02.62 3.68 3.64 13.26 3.64 14.35 0 .87 2.21 13.84 3.32 20.2-.98-.46-3.43-1.2-7.19-1.52m19.34 57.21c-5.88-1.57-20.16-5.97-30.18-10.98-12.52-6.26-25.14-15.8-21.91-28.92 3.22-13.13 15.76-16.8 25.59-17.38 2.75-.16 5.14-.1 7.16.07m19.34 57.21c-1.46.52-4.39 1.8-4.44 2.72-.07 1.15 2.6 2.14 9.35 2.83 6.75.7 34.71 1.23 41.09.78 6.38-.44 10.06-5.71 17.43-20.14l1.43-2.83m-64.86 16.64c5.89-2.49 12.35-6.32 16.49-10.11 5.07-4.65 9.55-13.46 9.96-14.28l.82-1.56m43.43 4.15c-.47-3-1.21-7.33.37-14.67 1.47-6.81 6.6-15.3 6.65-11.03.05 4-6.05 17.35-12.86 30.86m0 0c-2.25 6.5-3.51 10-2.3 13.75 1.23 3.75 4.4 5.03 5.76 5.07 1.14.04 9.08.44 15.2-.99m0 0a19.5 19.5 0 0 0 3.27-1.03c6.09-2.63 10.92-8.55 13.53-24.26 2.62-15.71 1.5-42.36-10.29-50.78-11.78-8.41-21.32-6.07-34.03 5.8-5.34 4.98-11.86 14.52-17.42 23.52m44.94 46.75c.18-.04 13.19.68 15.12.46m-60.06-47.2c-.8-3.66-1.44-7.16-1.94-10.43m1.94 10.42c-1.24 2-2.43 3.98-3.55 5.87m.32-30.9c0 3.75.41 8.8 1.3 14.61m0 0c-2.32 2.46-7.78 7.15-13.67 11.55m-42.32-12.78s1.24 7.12 3.87 11.42a29.93 29.93 0 0 0 6.61 7.8m36.13 12.04c-6.87-3.1-17.87-6.8-22.51-8.27m22.51 8.27a394.7 394.7 0 0 1 7.76-13.74M76 150.72c.39-.06.78-.14 1.17-.23 3.97-.93 10.76-5.29 17.05-9.98m-18.22 10.2c-4.7.8-9.36-.34-13.62-3.76m0 0c-3.29-.85-11.28-2.39-12.86-2.41m56.75.71c-2.32-.94-9-3.55-12.05-4.74",stroke:"#515151"}),P.createElement("path",{d:"m77.74 73.31 23.73 43.2-1.7 2.5-22.73 9.55-24.58-44.48 21.9-10.77h3.38Z",fill:"#E6E8EA"}),P.createElement("path",{d:"M74.35 73.31h3.4l23.72 43.2-1.7 2.5m-25.42-45.7-21.9 10.77 24.59 44.48L99.78 119m-25.43-45.7 25.43 45.7",stroke:"#515151"}),P.createElement("path",{d:"M83.9 116.95c.96 1.97-4.91 4.57-8.32 6.18-1.33.63-2.1.98-2.7 1.2.9 3.3 1.24 8.14-4.48 9.82-5.73 1.69-15.07-1.02-18-9.6-2.95-8.6.01-19.97 9.05-27.04 5.67-4.42 15.01-5.77 19.42-4.05 2.15.82 1.38 2.71-.56 4.44a58.1 58.1 0 0 1-4.53 3.58c.4-.01.8-.02 1.23 0 4.13.06 7.26 1.11 7.42 3.14.07.94-.8 2.13-1.95 3.45-.62.71-1.28 1.34-1.95 1.88 2.8-.22 5.94 1.05 2.9 4.2-.41.43-.85.83-1.29 1.2 1.73.02 3.24.56 3.75 1.6Z",fill:"white"}),P.createElement("path",{d:"M69.73 125.1c1.65-.34 2.2-.4 3.14-.76m0 0c.6-.23 1.38-.58 2.7-1.21 3.42-1.6 9.3-4.21 8.32-6.17-.86-1.76-4.53-2.09-7.33-.97-2.84 1.13-3.58 2.24-3.46 2.56.12.31 4.75-.69 8.34-4.4 3.4-3.54-.96-4.7-3.9-4.06-2.26.5-6.4 2.06-6.16 2.85.16.5 5.33-.54 9.1-4.87 1.14-1.32 2.02-2.51 1.95-3.45-.16-2.03-3.3-3.08-7.42-3.15-8.83-.16-11.56 4.78-11.16 5.1 1.1.92 9.36-4.15 14.46-8.67 1.94-1.73 2.71-3.62.56-4.44-4.4-1.72-13.75-.37-19.42 4.05-9.04 7.07-12 18.44-9.06 27.03 2.94 8.6 12.28 11.3 18 9.61 5.73-1.68 5.4-6.53 4.48-9.81Z",stroke:"#515151"}),P.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M106.48 120.15c-.2 1.56-.53 3.98-1.2 6.51-.68 2.53-1.71 5.16-3.3 7.14l.2.19 5.67-4.97-1.1-8.87h-.27Zm31.09 45.32-.25-.1-11.3 21.27h11.92l-.43-.26c-3.5-2.07-4.07-5.79-3.46-9.77.52-3.4 1.9-6.95 3-9.77l.52-1.37Zm-85.81-37.9-.24.13a55.3 55.3 0 0 0 1.65 6.39l.01.04.05.03c1.63.84 4.4 1.85 7.45 2.14 3.05.3 6.39-.12 9.1-2.15l-.12-.24c-3.14 1.2-11.14 1.63-17.9-6.33Z",fill:"#515151"}),P.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m133.54 82.83.02-.16h-.16c-1.82.1-5.84.39-9.87.96-2.02.28-4.04.64-5.79 1.08-1.74.43-3.23.95-4.18 1.58l-.06.04v.07c-.04 1.8.13 3.69.65 5.35a7.28 7.28 0 0 0 2.8 4.05c2.81 1.86 6.69 1.62 9.98-.58 3.3-2.2 6.04-6.37 6.61-12.4Z",fill:"#515151"}),P.createElement("path",{d:"M126.66 84.73a9.79 9.79 0 0 1-9.7 9.87 9.79 9.79 0 0 1-9.7-9.87 9.79 9.79 0 0 1 9.7-9.87c5.35 0 9.7 4.41 9.7 9.87Z",fill:"white",stroke:"#515151"}),P.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M109.41 70.6c.66.25 1.25.47 1.9.26.52-.18.83-.7 1.18-1.3.75-1.27 1.73-2.93 5.56-2.56 3.86.38 4.6 2.17 5.1 3.43.21.5.38.9.69 1.12.48.32.84.33 1.26.35.55.02 1.2.05 2.37.75 1.41.85 2.49 5.65.23 9.93l.26.43c-.45 2.15-3.05 4.37-3.05 4.14 0-3.04 0-4.75-2.92-7.43-4.26 1.6-10.89 1.13-13.94.14-4-1.28-5.98-6.81-2.53-9 1.72-1.1 2.88-.65 3.9-.26Z",fill:"#515151"}),P.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M116.7 81.6a.41.41 0 1 0-.74.4c.2.39.47.74.9.95.41.2.93.25 1.58.17a.41.41 0 1 0-.1-.82c-.58.07-.9.01-1.12-.09-.2-.1-.36-.28-.53-.6Zm-6.57 4.22a1.07 1.07 0 0 0 1-1.13 1.06 1.06 0 0 0-1.1-1.02c-.59.03-1.03.54-1 1.13.02.6.52 1.05 1.1 1.02Zm6.82.73a1.07 1.07 0 0 0 1-1.13 1.06 1.06 0 0 0-1.1-1.01c-.58.02-1.03.53-1 1.12.03.6.52 1.05 1.1 1.02Z",fill:"#515151"}),P.createElement("ellipse",{cx:127.42,cy:86.0081,rx:2.47934,ry:2.47934,fill:"white",stroke:"#515151"}),P.createElement("circle",{r:4.67102,transform:"matrix(0.707106 0.707108 -0.707106 0.707108 75.0508 75.7794)",fill:"var(--semi-color-primary)",stroke:"var(--semi-color-primary)",strokeWidth:3}),P.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M77.9 72.97a1.1 1.1 0 0 0-1.57 0l-1.26 1.27-1.31-1.3a1.1 1.1 0 1 0-1.57 1.56l1.31 1.3-1.3 1.31a1.1 1.1 0 0 0 1.56 1.57l1.3-1.3 1.27 1.26a1.1 1.1 0 1 0 1.57-1.57l-1.26-1.26 1.26-1.27a1.1 1.1 0 0 0 0-1.57Z",fill:"white"}),P.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M99.41 49.11a32.26 32.26 0 0 0-19-9.84 2.14 2.14 0 0 0-2.42 2.02c-.07 1.2.82 2.2 1.97 2.37a27.86 27.86 0 0 1 16.13 8.36c.83.87 2.24.99 3.17.15.88-.79.99-2.17.15-3.06Zm-35.8-8.52a32.5 32.5 0 0 0-18.74 15.73 2.14 2.14 0 0 0 1.01 2.93c1.11.52 2.4.02 2.96-1.02a28.08 28.08 0 0 1 15.96-13.4 2.28 2.28 0 0 0 1.53-2.72 2.14 2.14 0 0 0-2.72-1.52Zm27.75 15.78c-3.02-3.14-7-5.38-11.53-6.22a2.11 2.11 0 0 0-2.47 2 2.33 2.33 0 0 0 1.9 2.38c3.41.69 6.43 2.37 8.75 4.72.85.85 2.26 1 3.2.15.87-.78 1-2.15.15-3.03Zm-24.64-4.65a21.63 21.63 0 0 0-11.66 9.8 2.1 2.1 0 0 0 .99 2.94c1.12.52 2.4.01 2.98-1 2-3.45 5.17-6.11 8.91-7.5 1.1-.4 1.81-1.56 1.5-2.75a2.1 2.1 0 0 0-2.72-1.5Zm16.63 11.95a10.69 10.69 0 0 0-4-2.47c-1.35-.47-2.56.62-2.63 1.9-.07 1.14.73 2.04 1.65 2.44.56.25 1.07.56 1.52.94.89.74 2.33 1 3.32.11.82-.74 1-2.07.14-2.92Zm-14.28-.76c-1.82.83-3.39 2.16-4.5 3.83-.73 1.08-.16 2.42.9 2.92 1.14.53 2.38-.02 3.05-.88a6.35 6.35 0 0 1 1.93-1.63c.95-.52 1.68-1.63 1.37-2.83-.3-1.15-1.54-1.95-2.75-1.4Z",fill:"var(--semi-color-primary)"}))}var hae=dae;const fae=({errorMsg:s})=>A.jsxs("div",{className:"error-display",children:[A.jsx(iae,{}),A.jsx("div",{className:"error-display-content",children:A.jsx(ke.Text,{style:{fontSize:14},children:s})})]}),pae=()=>{const{state:{gameDetail:s},setGameDetail:e}=Qr(),[t,n]=P.useState(!0),[r,a]=P.useState(!1),[i,o]=P.useState(""),c=({errorCode:f,errorMsg:p,clientKey:y})=>{n(!1),a(!0),f===404?o(H("getDevGameDetailNotFound",{clientKey:y})):f===403?o(H("gameDetailNoPermission",{clientKey:y})):f===401&&o(H("gameDetailNotLogin",{clientKey:y}))};P.useEffect(()=>{s?.has_error&&(a(!0),c({errorCode:s.error_code,errorMsg:s.error_msg,clientKey:s.client_key})),Xr({url:"/game/detail",method:"GET"}).then(f=>{if(f?.error)n(!1),c(f.error);else{const{data:p}=f;e(p),n(!1)}})},[]);const h=P.useMemo(()=>{if(!s||s?.has_error)return[];const{name:f,client_key:p,size:y,description:b,request_allowed_domains:E}=s,C=s.packages.filter(w=>w.type==="independent");return[{key:H("gameName"),value:()=>A.jsx(ke.Text,{style:{fontWeight:"bold"},children:f})},{key:H("gameIcon"),value:()=>A.jsx(Jse,{logo:s.display_icon_url})},{key:H("gameID"),value:()=>A.jsx(ke.Text,{children:p})},{key:H("gameDesc"),value:()=>A.jsx(eae,{description:b})},{key:H("gameSize"),value:()=>A.jsx(Wse,{size:y,limit:30})},{key:H("gameMainPackageSize"),value:()=>A.jsx(Gse,{packages:s.packages,limit:4})},{key:H("gameIndependentPackageSize"),hidden:C.length===0,value:()=>A.jsx(qse,{packages:C})},{key:H("gameTrustDomains"),value:()=>A.jsx(Yse,{domains:E})},{key:H("gameServiceAgreement"),value:()=>A.jsx(Zse,{termsOfServiceLink:s.terms_of_service_link})},{key:H("gamePrivacyPolicy"),value:()=>A.jsx(Xse,{privacyPolicyLink:s.privacy_policy_link})}].filter(w=>!w.hidden)},[s]);return t&&!s?A.jsx("div",{className:"game-detail-loading-container",children:A.jsx(br,{size:"large"})}):r?A.jsx(fae,{errorMsg:i}):h.length===0?null:A.jsxs("div",{className:"game-detail-container",children:[A.jsx(Qse,{}),A.jsx(Uu,{data:h,align:"left",size:"small"})]})},gae=()=>A.jsxs("div",{children:[A.jsx("strong",{className:"check-code-banner-section-title",children:H("pkgSizeCheckDesc")}),A.jsx("div",{className:"check-code-banner-section-desc",style:{marginBottom:4},children:A.jsx("div",{children:H("pkgSizeCheckDescTip",{projectSize:"30MB",mainPackageSize:"4MB",independentPackageSize:"4MB"})})}),A.jsx("strong",{className:"check-code-banner-section-title",children:H("mandatoryApiCheck")}),A.jsx("div",{className:"check-code-banner-section-desc",children:H("mandatoryApiCheckDesc")}),A.jsx("strong",{className:"check-code-banner-section-title",children:H("configFileCheck")}),A.jsx("div",{className:"check-code-banner-section-desc",children:A.jsxs("div",{children:[A.jsx("code",{children:"game.json"}),":",H("gameJsonCheckDesc")]})})]}),mae=()=>A.jsx(_i,{style:{marginBottom:32},fullMode:!1,icon:null,closeIcon:null,description:A.jsx(gae,{}),type:"info"}),yae=s=>{const{result:e}=s,t=e.every(a=>a?.passed),[n,r]=P.useState(!1);return A.jsxs("div",{className:"check-result-group",children:[t?A.jsxs("div",{className:"check-result-title",children:[A.jsx(Aa,{style:{color:"#4CAF50",marginRight:4,fontSize:20}}),A.jsx(ke.Text,{style:{color:"#4CAF50",fontSize:20},children:H("checkConfigPassed")})]}):A.jsxs("div",{className:"check-result-title",children:[A.jsx(Bs,{style:{color:"#F44336",marginRight:4}}),A.jsx(ke.Text,{style:{color:"#F44336",fontSize:20},children:H("checkConfigFailed")})]}),A.jsxs("div",{style:{paddingBottom:24,position:"relative"},children:[A.jsx(Ls,{style:{marginBottom:12},collapseHeight:150,isOpen:n,children:e.map((a,i)=>A.jsxs("div",{className:"check-result-item",children:[A.jsx(Cn,{color:a?.passed?"green":"red",style:{marginRight:8,flexShrink:0},children:a?.file}),A.jsx(ke.Text,{style:{fontSize:14,color:a?.passed?"rgba(0, 0, 0, 0.65)":"red"},children:a?.msg})]},i))}),n?A.jsx(ke.Text,{style:{color:"grey",cursor:"pointer",fontSize:14,width:"100%",display:"block",alignItems:"center",justifyContent:"center",textAlign:"center"},onClick:()=>r(!1),children:H("closeCheckDetail")}):A.jsx(ke.Text,{style:{color:"grey"},className:"show-more-text-btn",onClick:()=>r(!0),children:H("expandCheckDetail")})]})]})},vae={project:H("gameProject"),main_package:H("gameMainPackage"),independent_package:H("independentPackage")},bae=s=>{const{result:e}=s,t=e.every(n=>n?.passed);return A.jsxs("div",{className:"check-result-group",children:[t?A.jsxs("div",{className:"check-result-title",children:[A.jsx(Aa,{style:{color:"#4CAF50",marginRight:4,fontSize:20}}),A.jsx(ke.Text,{style:{color:"#4CAF50",fontSize:20},children:H("checkPkgSizePassed")})]}):A.jsxs("div",{className:"check-result-title",children:[A.jsx(Bs,{style:{color:"#F44336",marginRight:4,fontSize:20}}),A.jsx(ke.Text,{style:{color:"#F44336",fontSize:20},children:H("checkPkgSizeFailed")})]}),e.map((n,r)=>A.jsxs("div",{className:"check-result-item",children:[A.jsxs(Cn,{color:n?.passed?"green":"red",style:{marginRight:8},children:[vae[n.dimension],n.dimension==="independent_package"?`: ${n.name}`:""]}),A.jsx(ke.Text,{style:{fontSize:14,color:n?.passed?"rgba(0, 0, 0, 0.65)":"red"},children:n?.msg})]},r))]})},Cae=s=>{const{result:e}=s,t=e.every(a=>a?.passed),[n,r]=P.useState(!1);return A.jsxs("div",{className:"check-result-group",children:[t?A.jsxs("div",{className:"check-result-title",children:[A.jsx(Aa,{style:{color:"#4CAF50",marginRight:4,fontSize:20}}),A.jsx(ke.Text,{style:{color:"#4CAF50",fontSize:20},children:H("checkApiSuccess")})]}):A.jsxs("div",{className:"check-result-title",children:[A.jsx(Bs,{style:{color:"#F44336",marginRight:4}}),A.jsx(ke.Text,{style:{color:"#F44336",fontSize:20},children:H("checkApiFailed")})]}),A.jsxs("div",{style:{position:"relative"},children:[A.jsx(Ls,{style:{marginBottom:12},collapseHeight:150,isOpen:n,children:e.map((a,i)=>A.jsxs("div",{className:"check-result-item",children:[A.jsx(Cn,{color:a?.passed?"green":"red",style:{marginRight:8,flexShrink:0},children:a?.name}),A.jsxs(ke.Text,{style:{fontSize:14,color:a?.passed?"rgba(0, 0, 0, 0.65)":"red"},children:[H(a?.name),a?.passed?H("integrated"):H("notIntegrated")]})]},i))}),n?A.jsx(ke.Text,{style:{color:"grey",cursor:"pointer",fontSize:14,width:"100%",display:"block",alignItems:"center",justifyContent:"center",textAlign:"center"},onClick:()=>r(!1),children:H("closeCheckDetail")}):A.jsx(ke.Text,{style:{color:"grey"},className:"show-more-text-btn",onClick:()=>r(!0),children:H("expandCheckDetail")})]})]})},Sae=()=>{const[s,e]=P.useState([]),[t,n]=P.useState(!1);P.useEffect(()=>{Xr({url:"/game/check",method:"GET"}).then(o=>{e(o?.data||[])}).catch(()=>{n(!0)})},[]);const r=s.filter(o=>o?.type==="config"),a=s.filter(o=>o?.type==="size"),i=s.filter(o=>o?.type==="api");return A.jsxs("div",{style:{height:"100%",overflow:"auto"},children:[A.jsx(mae,{}),A.jsx(bae,{result:a}),A.jsx(Cae,{result:i}),A.jsx(yae,{result:r})]})},wae=({size:s=24,color:e="#000",style:t,className:n})=>A.jsx("div",{style:{display:"flex",alignItems:"center",position:"relative"},children:A.jsxs("svg",{fill:"currentColor",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",width:s,height:s,children:[A.jsx("path",{d:"M37.86 17.82c.14.24.14.67.14 1.53v9.5c0 1.14 0 1.72-.2 2.26-.16.49-.43.96-.77 1.34-.37.44-.87.73-1.86 1.3l-7.84 4.53c-.74.43-1.11.64-1.4.64a.66.66 0 0 1-.58-.34c-.14-.24-.14-.67-.14-1.53v-9.5c0-1.14 0-1.71.2-2.26.16-.48.43-.95.76-1.34.38-.44.88-.73 1.87-1.3l7.84-4.52c.74-.43 1.11-.65 1.4-.64.25 0 .45.12.58.33Z"}),A.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m27.54 1.99 7 3.93 6.89 4a7.23 7.23 0 0 1 3.59 6.2l.06 7.88-.06 7.88a7.23 7.23 0 0 1-3.6 6.2l-6.88 4-7 3.93a7.23 7.23 0 0 1-7.08 0l-7-3.93-6.9-4a7.23 7.23 0 0 1-3.58-6.2L2.9 24l.07-7.88a7.23 7.23 0 0 1 3.59-6.2l6.89-4 7-3.93a7.23 7.23 0 0 1 7.08 0Zm-2.07 3.67 6.98 3.92 6.86 3.99a3.01 3.01 0 0 1 1.5 2.58l.06 7.85-.07 7.85c0 1.06-.57 2.04-1.5 2.58l-6.85 4-6.98 3.9c-.91.52-2.03.52-2.95 0l-6.97-3.9-6.86-4a3.01 3.01 0 0 1-1.5-2.58L7.13 24l.06-7.85c.01-1.06.58-2.04 1.5-2.58l6.86-4 6.97-3.9a3.01 3.01 0 0 1 2.95 0Z"})]})}),Eae=()=>A.jsxs("div",{className:"logo-container",children:[A.jsx(wae,{size:32}),A.jsx("div",{className:"logo-title",children:H("title")})]}),_ae=()=>{const{state:{user:s}}=Qr(),[e,t]=P.useState(!1),[n,r]=P.useState(!1),[a,i]=P.useState(""),[o,c]=P.useState(""),h=P.useRef(null),f={"ttmg-game-desc":encodeURIComponent(a||"--")},p=()=>{r(!1),c(""),i("")},y=()=>{t(!1),p(),h.current?.formApi?.reset?.()},b=()=>{s?.email&&t(!0)},E=S=>{const w=S;if(w?.code===0)ia.success({title:H("uploadPlatformSuccess"),content:A.jsxs(A.Fragment,{children:[A.jsx("div",{children:H("uploadPlatformDesc")}),A.jsx("div",{style:{marginTop:12,display:"flex",justifyContent:"flex-end"},children:A.jsx(ke.Text,{link:!0,onClick:()=>{window.open(w?.data?.detail,"_blank")},children:H("viewOnPlatform")})})]}),duration:10}),t(!1),p();else{const x=w?.error?.StatusMessage||w?.detail||H("uploadPlatformFailed");c(x),r(!1)}},C=S=>{const w=S?.error?.StatusMessage||S?.response?.detail||S?.message||H("uploadPlatformFailed");c(w),r(!1)};return A.jsxs(A.Fragment,{children:[A.jsx(In,{content:()=>s?.email?null:A.jsx("div",{className:"uploader-login-tip",children:H("loginToUpload")}),children:A.jsxs("div",{className:$("resource-uploader",{"resource-uploader-disabled":!s?.email}),onClick:b,children:[A.jsx(gC,{size:"default"}),A.jsx("div",{className:"uploader-text",children:H("upload")})]})}),A.jsx(Cr,{footer:null,visible:e,onCancel:y,title:H("uploadToPlatform"),children:A.jsxs("div",{className:"uploader-modal-content",children:[n&&A.jsx("div",{className:"upload-loading-container",children:A.jsx("div",{className:"loading-spin",children:A.jsx(br,{size:"large"})})}),o&&A.jsx(ke.Text,{style:{color:"red",marginBottom:12,marginTop:12},children:o}),A.jsxs(He,{ref:h,onChange:({values:S})=>{i(S?.gameDescription||"--"),c("")},children:[A.jsx(He.TextArea,{label:H("gameAssetDescription"),placeholder:H("gameAssetDescription"),field:"gameDescription"}),A.jsx(He.Slot,{children:A.jsx(Gu,{accept:".zip",action:"/game/upload",showClear:!1,headers:f,beforeUpload:S=>(r(!0),!0),onSuccess:S=>{E(S)},onError:S=>{C(S)},children:A.jsxs("div",{className:"uploader-button-container",children:[A.jsx(gC,{className:"uploader-button-icon"}),A.jsx("div",{className:"uploader-button-text",children:H("uploadGamePackageTip")})]})})}),A.jsx("div",{style:{display:"flex",justifyContent:"flex-end",paddingBottom:16,marginTop:12}})]})]})})]})},Oae=()=>{const{state:{isConnected:s},setIsConnected:e,setMessage:t}=Qr(),n=({client:r,node:a})=>{oa.info("connectionChange",r,a),Ue.get("isNodeWSConnected")===a&&(r||t({type:"danger",desc:H("clientServerStartError")})),Ue.get("isClientWSConnected")===r&&(a||t({type:"danger",desc:H("nodeServerStartError")})),Ue.get("isClientWSConnected")&&!r&&(Ue.setMultiple({isClientWSConnected:!1,isResourcesReady:!1,isScriptsReady:!1}),t({type:"danger",desc:H("clientDisconnected")})),Ue.get("isNodeWSConnected")&&!a&&(Ue.setMultiple({isNodeWSConnected:!1,isResourcesReady:!1,isScriptsReady:!1}),t({type:"danger",title:H("serverDisconnected"),desc:H("nodeDisconnected")})),!Ue.get("isClientWSConnected")&&r&&(Ue.set("isClientWSConnected",!0),t({type:"success",desc:H("clientConnectedSuccess")})),!Ue.get("isNodeWSConnected")&&a&&(Ue.set("isNodeWSConnected",!0),t({type:"success",desc:H("nodeServerConnectedSuccess")})),e(r&&a)};return P.useEffect(()=>(Ct.on("connectionChange",n),()=>{Ct.off("connectionChange",n)}),[e]),A.jsx(Cn,{style:{margin:"0 4px"},color:s?"light-green":"grey",size:"large",shape:"circle",type:"ghost",children:H(s?"deviceConnected":"deviceDisconnected")})},xae="/api/passport/web/email/login",Tae={aid:"2471",account_sdk_source:"web",sdk_version:"2.1.1"};xae+""+new URLSearchParams(Tae);const Pae=()=>{const{state:{user:s}}=Qr();return s?.email?A.jsx(In,{position:"bottom",content:A.jsx("div",{className:"login-user-popover",children:s.email}),children:A.jsx(bi,{color:"amber",style:{flexShrink:0},alt:s?.email,size:"small",children:s?.email?.split("@")[0][0]})}):A.jsx(In,{position:"bottom",trigger:"hover",content:A.jsx("div",{className:"not-login-status-popover",children:H("notLoginTip")}),children:A.jsx(bi,{color:"grey",style:{flexShrink:0},size:"small",children:H("notLogin")})})},Iae=[{node:"item",name:H("quickStart"),link:"https://bytedance.sg.larkoffice.com/docx/MarqdNvQLoihvjxN4rFllgjBgwb"},{node:"item",name:H("jsApiList"),link:"https://bytedance.larkoffice.com/wiki/GQscwDOQSiPxyjkbzyfckh2pnDg"},{node:"item",name:H("faq"),link:"https://bytedance.larkoffice.com/wiki/O6aWwFhDBiEglwkcnJ4ccJpdnmb"}],Dae=()=>A.jsx(Fn,{trigger:"hover",position:"bottomRight",render:A.jsx(A.Fragment,{children:Iae.map(s=>A.jsx(Fn.Item,{onClick:()=>{window.open(s.link)},children:s.name},s.name))}),children:A.jsxs("div",{className:"access-docs",children:[A.jsx(ke.Text,{className:"access-docs-text",type:"primary",children:H("docs")}),A.jsx(ao,{className:"access-docs-icon"})]})}),pl={Idle:0,WasmPreparing:1,WasmPrepared:2,WasmSplitIssued:3,WasmSplitting:4,WasmSplitDone:5,WasmReadyToPrepare:6,WasmSplitPreparing:7,WasmPreparedSuccess:8,WasmCollecting:9,WasmUploadFail:-1,WasmDownloadFail:-2,WasmFileNotExist:-3,WasmSplitFail:-4,WasmSplitUpdateDBFail:-5,WasmSplitPrepareFail:-6,WasmPrepareFailed:-1};function Rae(){return Xr({url:"/game/wasm-split-options",method:"GET"})}function kae(s){const{codePath:e,codeMd5:t,clientKey:n,desc:r}=s;return Xr({url:"/game/wasm-prepare",method:"POST",data:{codePath:e,clientKey:n,codeMd5:t,desc:r}})}function Nae({codeMd5:s,clientKey:e}){return Xr({url:"/game/wasm-prepare-result",method:"POST",data:{codeMd5:s,clientKey:e}})}function Aae(s,e){const t=e?.intervalMs,n=e?.maxAttempts,r=e?.signal||new AbortController().signal;let a=0;return new Promise((i,o)=>{if(r?.aborted){o(new DOMException("Polling aborted","AbortError"));return}const c=()=>{clearTimeout(h),o(new DOMException("Polling aborted","AbortError"))};r?.addEventListener("abort",c,{once:!0});let h;const f=async()=>{a+=1;try{const p=await Nae(s),{status:y}=p.data;if(y===pl.WasmPreparing||y===pl.WasmReadyToPrepare){if(a>=n){o(new Error(`Polling timeout after ${n} attempts`));return}h=window.setTimeout(f,t);return}i(p)}catch(p){if(a>=n){o(p);return}h=window.setTimeout(f,t)}};f()})}function Mae({downloadUrl:s,codePath:e}){return Xr({url:"/game/wasm-prepare-download",method:"POST",data:{downloadUrl:s,codePath:e}})}function Fae(s){const{codeMd5:e,clientKey:t}=s;return Xr({url:"/game/wasm-split",method:"POST",data:{codeMd5:e,clientKey:t}})}function Lae({codeMd5:s,clientKey:e}){return Xr({url:"/game/wasm-split-result",method:"POST",data:{codeMd5:s,clientKey:e}})}function $ae(s,e){const t=e?.intervalMs,n=e?.maxAttempts,r=e?.signal||new AbortController().signal;let a=0;return new Promise((i,o)=>{if(r?.aborted){o(new DOMException("Polling aborted","AbortError"));return}const c=()=>{clearTimeout(h),o(new DOMException("Polling aborted","AbortError"))};r?.addEventListener("abort",c,{once:!0});let h;const f=async()=>{a+=1;try{const p=await Lae(s),{status:y}=p.data;if(y==="processing"){if(a>=n){o(new Error(`Polling timeout after ${n} attempts`));return}h=window.setTimeout(f,t);return}i(p)}catch(p){if(a>=n){o(p);return}h=window.setTimeout(f,t)}};f()})}function jae({downloadUrl:s,codePath:e}){return Xr({url:"/game/wasm-split-download",method:"POST",data:{downloadUrl:s,codePath:e}})}const Vae=({onNext:s})=>{const[e,t]=P.useState([{value:"no_split",label:"不使用增量分包",desc:"不使用增量分包"}]);return P.useEffect(()=>{Rae().then(n=>{n.data?.options,t([{value:"no_split",label:"不使用增量分包",desc:"不使用增量分包"}])})},[]),A.jsxs(He,{initValues:{templateId:"no_split"},style:{width:"100%",padding:"12px 0px 24px 0px"},onSubmit:s,children:[A.jsx(He.Input,{rules:[{required:!0,message:"请输入版本描述"}],label:"版本描述",placeholder:"请输入版本描述",field:"desc"}),A.jsx(He.Select,{placeholder:"请选择增量分包",loading:e.length===0,rules:[{required:!0,message:"请选择增量分包"}],style:{width:"100%"},label:"增量分包",field:"templateId",renderSelectedItem:({desc:n})=>n,optionList:e}),A.jsx(Xe,{style:{marginTop:24},theme:"solid",type:"primary",htmlType:"submit",children:"启用代码分包"})]})},Ys={init:"init",processing:pl.WasmPreparing,processingReady:pl.WasmReadyToPrepare,success:pl.WasmPreparedSuccess,failed:pl.WasmPrepareFailed,downloading:"downloading",downloadFailed:"downloadFailed"},mR=new AbortController,Bae=({codePath:s,codeMd5:e,clientKey:t,desc:n,onCancel:r,onNext:a})=>{const[i,o]=P.useState(!1),[c,h]=P.useState({code:0,data:{status:Ys.init}}),f=()=>{mR.abort(),r()},p=()=>{h({code:0,data:{status:Ys.init}}),kae({codePath:s,codeMd5:e,clientKey:t,desc:n}).then(E=>{E.code===0||E?.error?.code===10024||E?.error?.code===10028?(console.log(E,"prepareWasmCode"),h({...E,data:{...E?.data,status:Ys.processing}}),y()):(o(!1),h({...c,error:E?.error||{code:-1,message:"Internal server error, please try again later..."},data:{...c?.data}}))})},y=()=>{Aae({codeMd5:e,clientKey:t},{intervalMs:500,maxAttempts:100,signal:mR.signal}).then(E=>{E.code===0?(console.log(E,"pollWasmPrepareResult"),h(E),o(!1)):(o(!1),h({...c,data:{...c?.data}}))})},b=()=>{h({...c,data:{...c?.data,status:"downloading"}}),Mae({codePath:s,downloadUrl:c?.data?.package?.downloadUrl||""}).then(E=>{E.code===0?(h({...c,data:{...c?.data,status:"downloadSuccess"}}),a({taskId:c?.data?.taskId||""})):h({...c,data:{...c?.data,status:"downloadFailed"}})})};return P.useEffect(()=>{p()},[s,n,e,t]),A.jsxs("div",{className:"wasm-modal-content-base",children:[c?.data?.status===Ys.init&&A.jsx("div",{className:"wasm-prepare-init-content",children:"发起分包预处理中"}),(c?.data?.status===Ys.processing||c?.data?.status===Ys.processingReady)&&A.jsxs("div",{className:"wasm-prepare-processing-content",children:["分包处理中,可能要几分钟时间...",A.jsx("br",{}),"期间请不要修改本地游戏包体,否则会造成分包失败!",A.jsx("div",{className:"wasm-prepare-processing-cancel",children:A.jsx(Xe,{onClick:()=>{f()},children:"取消"})})]}),c?.data?.status===Ys.success&&A.jsxs("div",{className:"wasm-prepare-success-content",children:["分包处理成功!",A.jsx("br",{}),A.jsx("div",{className:"wasm-prepare-success-download",children:A.jsx(Xe,{onClick:()=>{b()},children:"下载分包代码"})})]}),c?.data?.status<=Ys.failed&&A.jsxs("div",{className:"wasm-prepare-failed-content",children:["分包处理失败!",A.jsx("br",{}),A.jsx("div",{className:"wasm-prepare-failed-error",children:c?.error?.message||""}),A.jsx("div",{className:"wasm-prepare-failed-retry",children:A.jsx(Xe,{onClick:()=>p(),children:"重试"})})]}),c?.data?.status===Ys.downloading&&A.jsxs("div",{className:"wasm-prepare-downloading-content",children:["分包代码下载中,可能要几分钟时间...",A.jsx("br",{}),"期间请不要修改本地游戏包体,否则会造成分包失败!"]}),c?.data?.status===Ys.downloadFailed&&A.jsxs("div",{className:"wasm-prepare-download-failed-content",children:["分包代码下载失败!",A.jsx("br",{}),A.jsx("div",{className:"wasm-prepare-download-failed-retry",children:A.jsx(Xe,{onClick:()=>b(),children:"重试"})})]})]})},Hae=({onCancel:s,onNext:e,taskId:t,codeMd5:n,clientKey:r})=>{const{state:{schema:a}}=Qr();return A.jsxs("div",{className:"wasm-modal-content-base",children:[A.jsx("div",{className:"collect-qrcode-title",children:"扫描二维码开始收集"}),A.jsx("div",{className:"collect-qrcode-container",children:A.jsx(jC,{value:a})}),A.jsx("div",{className:"collect-qrcode-desc",children:"当前本地项目已经支持 wasm 分包,请用 TikTok 客户端扫描二维码,开始收集函数,请支持完成加载环节、游戏教学等前期内容。"}),A.jsx("div",{className:"collect-qrcode-button-container",children:A.jsx(Xe,{onClick:e,children:"收集完成,开始分包"})})]})},Uae=({onCancel:s,taskId:e,codeMd5:t,codePath:n,clientKey:r})=>{const a=new AbortController,[i,o]=P.useState("processing"),[c,h]=P.useState(""),f=()=>{a.abort(),s()},p=()=>{o("downloading"),jae({downloadUrl:c,codePath:n}).then(E=>{E.code===0?o("downloaded"):o("downloadfailed")})},y=()=>{o("processing"),o("processing"),Fae({codeMd5:t,clientKey:r}).then(E=>{E.code===0&&$ae({taskId:E.data.taskId,codeMd5:t,clientKey:r},{intervalMs:1e3,maxAttempts:100,signal:a.signal}).then(C=>{C.code===0&&C.data.status==="success"?(o("success"),h(C.data.downloadUrl)):o("failed")})}).catch(()=>{o("failed")})};P.useEffect(()=>{y()},[]);let b=null;switch(i){case"processing":b=A.jsxs("div",{className:"wasm-split-processing",children:[A.jsx("div",{className:"wasm-split-processing-content",children:"分包处理中,可能需要一些时间,请在分包处理完成后点击下载分包。"}),A.jsx("div",{className:"wasm-split-processing-cancel",children:A.jsx(Xe,{type:"tertiary",onClick:()=>f(),children:"取消分包"})})]});break;case"success":b=A.jsxs("div",{className:"wasm-split-success",children:[A.jsx("div",{className:"wasm-split-success-content",children:"分包处理成功,点击下载分包。"}),A.jsx("div",{className:"wasm-split-success-download",children:A.jsx(Xe,{type:"primary",onClick:()=>p(),children:"下载分包"})})]});break;case"failed":b=A.jsxs("div",{className:"wasm-split-failed",children:[A.jsx("div",{className:"wasm-split-failed-content",children:"分包处理失败,请点击重试。"}),A.jsx("div",{className:"wasm-split-failed-retry",children:A.jsx(Xe,{type:"primary",onClick:()=>y(),children:"重试分包"})})]});break;case"downloading":b=A.jsx("div",{className:"wasm-split-downloading",children:"下载中..."});break;case"downloaded":b=A.jsx("div",{className:"wasm-split-downloaded",children:"下载成功"});break;case"downloadfailed":b=A.jsx("div",{className:"wasm-split-downloadfailed",children:"下载失败"});break;default:b=null}return A.jsx("div",{className:"wasm-modal-content-base",children:b})},Kc={start:{number:0,title:"开始分包"},prepare:{number:1,title:"分包预处理"},collect:{number:2,title:"函数收集"},split:{number:3,title:"代码分包"}},zae=({codePath:s,clientKey:e,codeMd5:t})=>{const[n,r]=P.useState(!1),[a,i]=P.useState(""),[o,c]=P.useState(""),[h,f]=P.useState("start"),p=!!s;return A.jsxs(A.Fragment,{children:[A.jsx(bn,{trigger:p?"custom":"hover",visible:!p,content:"需要保证项目中存在 wasmcode/[hash].webgl.wasm.code.unityweb. 文件",children:A.jsxs("div",{className:$("wasm-code-split",{"wasm-code-split-disabled":!p}),onClick:()=>{if(p)r(!n);else return},children:[A.jsx(b7,{size:"default"}),A.jsx("span",{className:"wasm-code-split-text",children:"Wasm 分包"})]})}),A.jsxs(Cr,{visible:n,footer:null,style:{width:"90%"},onCancel:()=>r(!1),onOk:()=>r(!1),title:"Wasm 分包",children:[A.jsxs(ci,{type:"basic",current:Kc[h].number,style:{marginTop:24},children:[A.jsx(ci.Step,{title:Kc.start.title}),A.jsx(ci.Step,{title:Kc.prepare.title}),A.jsx(ci.Step,{title:Kc.collect.title}),A.jsx(ci.Step,{title:Kc.split.title})]}),h==="start"&&A.jsx(Vae,{onNext:y=>{c(y.desc),f("prepare")}}),h==="prepare"&&A.jsx(Bae,{codeMd5:t,codePath:s,clientKey:e,desc:o,onCancel:()=>{r(!1),f("start")},onNext:({taskId:y})=>{i(y),f("collect")}}),h==="collect"&&A.jsx(Hae,{taskId:a,codeMd5:t,clientKey:e,onCancel:()=>{r(!1),f("start")},onNext:()=>{f("split")}}),h==="split"&&A.jsx(Uae,{taskId:a,codeMd5:t,clientKey:e,onCancel:()=>{r(!1),f("start")}})]})]})},Kae=()=>{const{state:{devToolVersion:s,engine:e,packages:t,gameDetail:n}}=Qr();console.log("gameEngine",e);const r=t?.find(o=>o.name==="wasmcode"),a=r?.root,i=r?.md5;return A.jsxs("div",{className:"header-wrapper",children:[A.jsxs("div",{className:"header-content",children:[A.jsxs("div",{className:"header-content-left",children:[A.jsx(Eae,{}),s&&A.jsx(Cn,{style:{margin:8,flexShrink:0},color:"light-blue",size:"large",shape:"circle",type:"ghost",children:s}),A.jsx(Oae,{})]}),A.jsx("div",{className:"header-content-right",children:A.jsxs(Co,{spacing:12,children:[A.jsx(Dae,{}),A.jsx(_ae,{}),e==="unity"&&A.jsx(zae,{codePath:a,codeMd5:i,clientKey:n?.client_key}),A.jsx(Pae,{})]})})]}),A.jsx(Xz,{})]})},qae=()=>(P.useEffect(()=>(Cu.init(),()=>{Cu.close()}),[]),null);function Wae(){return A.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:A.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 Gae=()=>A.jsx(Ml,{svg:A.jsx(Wae,{})});function Yae(){return A.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[A.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"}),A.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"}),A.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 Zae=()=>A.jsx(Ml,{svg:A.jsx(Yae,{})});function Xae(){return A.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[A.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 7.16667C7.33518 7.16667 8.45466 6.24312 8.75446 5H14.6667C14.8508 5 15 4.85076 15 4.66667V4C15 3.81591 14.8508 3.66667 14.6667 3.66667H8.75446C8.45466 2.42355 7.33518 1.5 6 1.5C4.66482 1.5 3.54534 2.42355 3.24554 3.66667H1.33333C1.14924 3.66667 1 3.81591 1 4V4.66667C1 4.85076 1.14924 5 1.33333 5H3.24554C3.54534 6.24312 4.66482 7.16667 6 7.16667ZM7.5 4.33333C7.5 5.16176 6.82843 5.83333 6 5.83333C5.17157 5.83333 4.5 5.16176 4.5 4.33333C4.5 3.50491 5.17157 2.83333 6 2.83333C6.82843 2.83333 7.5 3.50491 7.5 4.33333Z",fill:"black",fillOpacity:"0.65"}),A.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 14.5C11.3352 14.5 12.4547 13.5765 12.7545 12.3333H14.6667C14.8508 12.3333 15 12.1841 15 12V11.3333C15 11.1492 14.8508 11 14.6667 11H12.7545C12.4547 9.75688 11.3352 8.83333 10 8.83333C8.66482 8.83333 7.54534 9.75688 7.24554 11H1.33333C1.14924 11 1 11.1492 1 11.3333V12C1 12.1841 1.14924 12.3333 1.33333 12.3333H7.24554C7.54534 13.5765 8.66482 14.5 10 14.5ZM11.5 11.6667C11.5 12.4951 10.8284 13.1667 10 13.1667C9.17157 13.1667 8.5 12.4951 8.5 11.6667C8.5 10.8382 9.17157 10.1667 10 10.1667C10.8284 10.1667 11.5 10.8382 11.5 11.6667Z",fill:"black",fillOpacity:"0.65"})]})}const Qae=()=>A.jsx(Ml,{svg:A.jsx(Xae,{})});function Jae(){return A.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[A.jsx("path",{d:"M5.66666 2.66659C5.85076 2.66659 6 2.51735 6 2.33325V1.66659C6 1.48249 5.85076 1.33325 5.66666 1.33325H5.59999C4.10652 1.33325 3.35979 1.33325 2.78935 1.6239C2.28759 1.87956 1.87964 2.28751 1.62398 2.78928C1.33333 3.35971 1.33333 4.10645 1.33333 5.59992V5.66658C1.33333 5.85068 1.48257 5.99992 1.66666 5.99992H2.33333C2.51742 5.99992 2.66666 5.85068 2.66666 5.66658V5.59992C2.66666 4.83118 2.6677 4.33482 2.69856 3.95703C2.72816 3.59482 2.7784 3.46052 2.81199 3.3946C2.93982 3.14372 3.14379 2.93974 3.39467 2.81191C3.4606 2.77832 3.59489 2.72808 3.95711 2.69849C4.33489 2.66762 4.83126 2.66659 5.59999 2.66659H5.66666Z",fill:"black",fillOpacity:"0.65"}),A.jsx("path",{d:"M14.6667 5.66658C14.6667 5.85068 14.5174 5.99992 14.3333 5.99992H13.6667C13.4826 5.99992 13.3333 5.85068 13.3333 5.66658V5.59992C13.3333 4.83118 13.3323 4.33482 13.3014 3.95703C13.2718 3.59482 13.2216 3.46052 13.188 3.3946C13.0602 3.14372 12.8562 2.93974 12.6053 2.81191C12.5394 2.77832 12.4051 2.72808 12.0429 2.69849C11.6651 2.66762 11.1687 2.66659 10.4 2.66659H10.3333C10.1492 2.66659 10 2.51735 10 2.33325V1.66659C10 1.48249 10.1492 1.33325 10.3333 1.33325H10.4C11.8935 1.33325 12.6402 1.33325 13.2106 1.6239C13.7124 1.87956 14.1203 2.28751 14.376 2.78928C14.6667 3.35971 14.6667 4.10645 14.6667 5.59992V5.66658Z",fill:"black",fillOpacity:"0.65"}),A.jsx("path",{d:"M1.66666 9.99992C1.48257 9.99992 1.33333 10.1492 1.33333 10.3333V10.3999C1.33333 11.8934 1.33333 12.6401 1.62398 13.2106C1.87964 13.7123 2.28759 14.1203 2.78935 14.3759C3.35979 14.6666 4.10652 14.6666 5.59999 14.6666H5.66666C5.85076 14.6666 6 14.5173 6 14.3333V13.6666C6 13.4825 5.85076 13.3333 5.66666 13.3333H5.59999C4.83126 13.3333 4.33489 13.3322 3.95711 13.3013C3.59489 13.2718 3.4606 13.2215 3.39467 13.1879C3.14379 13.0601 2.93982 12.8561 2.81199 12.6052C2.7784 12.5393 2.72816 12.405 2.69856 12.0428C2.6677 11.665 2.66666 11.1687 2.66666 10.3999V10.3333C2.66666 10.1492 2.51742 9.99992 2.33333 9.99992H1.66666Z",fill:"black",fillOpacity:"0.65"}),A.jsx("path",{d:"M10.3333 13.3333C10.1492 13.3333 10 13.4825 10 13.6666V14.3333C10 14.5173 10.1492 14.6666 10.3333 14.6666H10.4C11.8935 14.6666 12.6402 14.6666 13.2106 14.3759C13.7124 14.1203 14.1203 13.7123 14.376 13.2106C14.6667 12.6401 14.6667 11.8934 14.6667 10.3999V10.3333C14.6667 10.1492 14.5174 9.99992 14.3333 9.99992H13.6667C13.4826 9.99992 13.3333 10.1492 13.3333 10.3333V10.3999C13.3333 11.1687 13.3323 11.665 13.3014 12.0428C13.2718 12.405 13.2216 12.5393 13.188 12.6052C13.0602 12.8561 12.8562 13.0601 12.6053 13.1879C12.5394 13.2215 12.4051 13.2718 12.0429 13.3013C11.6651 13.3322 11.1687 13.3333 10.4 13.3333H10.3333Z",fill:"black",fillOpacity:"0.65"}),A.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.17159 10.1144C8.64463 10.4634 8.01272 10.6667 7.33333 10.6667C5.49238 10.6667 3.99999 9.17428 3.99999 7.33333C3.99999 5.49238 5.49238 4 7.33333 4C9.17428 4 10.6667 5.49238 10.6667 7.33333C10.6667 8.01272 10.4634 8.64464 10.1144 9.17159L11.7357 10.7929C11.8659 10.9231 11.8659 11.1341 11.7357 11.2643L11.2643 11.7357C11.1341 11.8659 10.9231 11.8659 10.7929 11.7357L9.17159 10.1144ZM9.33333 7.33333C9.33333 8.4379 8.4379 9.33333 7.33333 9.33333C6.22876 9.33333 5.33333 8.4379 5.33333 7.33333C5.33333 6.22876 6.22876 5.33333 7.33333 5.33333C8.4379 5.33333 9.33333 6.22876 9.33333 7.33333Z",fill:"black",fillOpacity:"0.65"})]})}const eie=()=>A.jsx(Ml,{svg:A.jsx(Jae,{})}),lC=[{text:H("scanQRCode2Debug"),itemKey:"scan_qrcode",icon:A.jsx(Gae,{}),path:"/"},{itemKey:"launch_mode",text:H("launchMode"),icon:A.jsx(Qae,{}),path:"/launch_mode"},{itemKey:"precheck_code",text:H("codePreCheck"),icon:A.jsx(eie,{}),path:"/precheck_code"},{itemKey:"project_info",text:H("projectInfo"),icon:A.jsx(Zae,{}),path:"/project_detail"}],tie=()=>{const s=zp(),[e,t]=P.useState("scan_qrcode"),n=r=>{const a=lC.find(i=>i.itemKey===r.itemKey);s(a.path),t(a.itemKey)};return P.useEffect(()=>{const r=window.location.pathname,a=lC.find(i=>i.path===r);a&&t(a.itemKey)},[s]),A.jsx(ka,{limitIndent:!1,bodyStyle:{height:"100vh",paddingLeft:"12px"},items:lC,selectedKeys:[e],onSelect:n})},nie=()=>{const{state:{loading:s}}=Qr();return s.visible?A.jsx("div",{className:"loading-container",children:A.jsxs("div",{className:"loading-content",children:[A.jsx(br,{size:"large"}),A.jsx("div",{className:"loading-text",children:s.text})]})}):null};function rie(){const{state:{feature:s,loading:e,error:t},setSchema:n,showLoading:r,hideLoading:a,setError:i,setUser:o,setPackages:c,setGameDetail:h,setDevToolVersion:f,setEngine:p}=Qr(),[y,b]=P.useState(!1),[E,C]=P.useState("");P.useEffect(()=>{Zne()},[]);const S=()=>{Xr({url:"/game/detail",method:"GET"}).then(w=>{if(w.error){a();const{errorCode:x,errorMsg:O}=w.error;h({client_key:w.error.clientKey,has_error:!0,error_msg:O,error_code:x}),x===404&&i({text:H("getDevGameDetailNotFound",{clientKey:w.error.clientKey})});return}else i({text:""}),h(w.data),a()})};return P.useEffect(()=>{r(),Xr({url:"/game/config",method:"GET"}).then(w=>{if(w.error)a(),i({visible:!0,text:H("getDevGameConfigFailed")+`: ${w.error.errorMsg}`}),b(!0),C(H("getDevGameConfigFailed")),console.log(`❌ ${H("getDevGameConfigFailed")}: ${w.error.errorMsg}`);else{console.log(`✅ ${H("getDevGameConfigSuccess")}`);const{schema:x,nodeWsPort:O,user:T,packages:D,devToolVersion:R,clientKey:k,engine:M}=w.data;n(x),Ue.setMultiple({nodeWsPort:O,email:T?.email,clientKey:k}),o(T),f(R),c(D),p(M),a()}}),S()},[]),P.useEffect(()=>(Ct.on("resourceChange",S),()=>{Ct.off("resourceChange",S)}),[]),e.visible?A.jsx(nie,{}):y?A.jsxs("div",{className:"server-error-container",children:[A.jsx(hae,{}),A.jsx("div",{className:"server-error-text",children:E})]}):A.jsxs(hse,{children:[t.text&&A.jsx(_i,{description:t.text,type:"danger"}),A.jsx(qae,{}),A.jsxs("div",{className:"main-layout",children:[A.jsx(Kae,{}),A.jsxs("div",{className:"content-wrapper",children:[s.sidebar.enable&&A.jsx(tie,{}),A.jsx("div",{className:"routes-container",children:A.jsxs(Ure,{children:[A.jsx(il,{path:"/",element:A.jsx(Hse,{})}),A.jsx(il,{path:"/project_detail",element:A.jsx(pae,{})}),A.jsx(il,{path:"/debug_setting",element:A.jsx(Use,{})}),A.jsx(il,{path:"/launch_mode",element:A.jsx(Kse,{})}),A.jsx(il,{path:"/precheck_code",element:A.jsx(Sae,{})})]})})]})]})]})}bM.createRoot(document.getElementById("root")).render(A.jsx(jS,{children:A.jsx(Jne,{children:A.jsx(rie,{})})}));