@ttmg/cli 0.3.7 → 0.3.8-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.
- package/dist/index.js +1 -1
- package/dist/package.json +1 -1
- package/dist/public/assets/{Detail-BzyVtzyL.js → Detail-Dxd2t4A0.js} +1 -1
- package/dist/public/assets/Detail-Dxd2t4A0.js.br +0 -0
- package/dist/public/assets/{MonetizationMode-gxP1CQqy.js → MonetizationMode-pKKllMtz.js} +1 -1
- package/dist/public/assets/{MonetizationModeSummary-CD54_ROf.js → MonetizationModeSummary-BN-KYzAq.js} +1 -1
- package/dist/public/assets/{baseForm-d3x5z6BS.js → baseForm-B1HAELLl.js} +1 -1
- package/dist/public/assets/baseForm-B1HAELLl.js.br +0 -0
- package/dist/public/assets/{index-Cr55HKuS.js → index-5rZ6ZwFe.js} +1 -1
- package/dist/public/assets/{index-C0Izps-u.js → index-B4sfZCOE.js} +1 -1
- package/dist/public/assets/{index-CYD_pNmH.js → index-BB8QTez7.js} +1 -1
- package/dist/public/assets/{index-Ba-my-vz.js → index-BFazV-jH.js} +1 -1
- package/dist/public/assets/{index-BZOItUfZ.js → index-Bfdj_AIP.js} +1 -1
- package/dist/public/assets/index-Bfdj_AIP.js.br +0 -0
- package/dist/public/assets/{index-CLDvvBgM.js → index-C1lcAZpH.js} +1 -1
- package/dist/public/assets/{index-utYbqRWL.js → index-DGexYtq8.js} +1 -1
- package/dist/public/assets/index-DGexYtq8.js.br +0 -0
- package/dist/public/assets/{index-BBHUSsVA.js → index-DTRLs-Ar.js} +1 -1
- package/dist/public/assets/index-DTRLs-Ar.js.br +0 -0
- package/dist/public/assets/{index-07cXGo3a.js → index-Dau-IOT4.js} +3 -3
- package/dist/public/assets/index-Dau-IOT4.js.br +0 -0
- package/dist/public/assets/{index-CQR5bkkv.js → index-Dy2e8k05.js} +1 -1
- package/dist/public/assets/{index-B7M-KACw.js → index-GXycAfu7.js} +1 -1
- package/dist/public/assets/{index-Bz8ZWlHc.js → index-KbK6byI6.js} +1 -1
- package/dist/public/assets/{index-C4Lcagww.js → index-Py0Dqk-5.js} +1 -1
- package/dist/public/assets/{index-E142v_RY.js → index-Ww-u0sBX.js} +1 -1
- package/dist/public/assets/index-Ww-u0sBX.js.br +0 -0
- package/dist/public/assets/{index-BNtIdKnQ.js → index-ea1Ez8Tf.js} +1 -1
- package/dist/public/assets/{index-766JxwXs.js → index-ybL9zdkk.js} +1 -1
- package/dist/public/assets/index-ybL9zdkk.js.br +0 -0
- package/dist/public/assets/{times-BvsrZcqF.js → times-BQ9JpoA2.js} +1 -1
- package/dist/public/index.html +1 -1
- package/dist/scripts/docs/capture.js +71 -3
- package/dist/scripts/docs/render.js +334 -62
- package/package.json +1 -1
- package/dist/public/assets/Detail-BzyVtzyL.js.br +0 -0
- package/dist/public/assets/baseForm-d3x5z6BS.js.br +0 -0
- package/dist/public/assets/index-07cXGo3a.js.br +0 -0
- package/dist/public/assets/index-766JxwXs.js.br +0 -0
- package/dist/public/assets/index-BBHUSsVA.js.br +0 -0
- package/dist/public/assets/index-BZOItUfZ.js.br +0 -0
- package/dist/public/assets/index-E142v_RY.js.br +0 -0
- package/dist/public/assets/index-utYbqRWL.js.br +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as I,k as q,l as R,_ as k,m as D,n as T,R as r,b as x,I as A,o as U,L as z,p as M,P as X,C as Q,q as o,s as Z,t as j,v as G,i as s,u as H,c as J,r as y,N as w,j as m,B as K,w as W}from"./index-07cXGo3a.js";import{F as P}from"./baseForm-d3x5z6BS.js";import"./times-BvsrZcqF.js";import"./index-BZOItUfZ.js";const B={PREFIX:`${I}-popconfirm`,POPOVER:`${I}-popconfirm-popover`},Y={DEFAULT_Z_INDEX:1030};class ee extends q{init(){}destroy(){}handleCancel(e){const t=this._adapter.notifyCancel(e);R(t)?(this._adapter.updateCancelLoading(!0),t.then(n=>{this.handleVisibleChange(!1),this._adapter.updateCancelLoading(!1)},n=>{this._adapter.updateCancelLoading(!1)})):this.handleVisibleChange(!1)}handleConfirm(e){const t=this._adapter.notifyConfirm(e);R(t)?(this._adapter.updateConfirmLoading(!0),t.then(n=>{this._adapter.updateConfirmLoading(!1),this.handleVisibleChange(!1)},n=>{this._adapter.updateConfirmLoading(!1)})):this.handleVisibleChange(!1)}handleClickOutSide(e){this._adapter.notifyClickOutSide(e)}handleVisibleChange(e){this._isControlledComponent("visible")||this._adapter.setVisible(e),e?this.handleFocusOperateButton():this._adapter.focusPrevFocusElement(),this._adapter.notifyVisibleChange(e)}handleFocusOperateButton(){const{cancelButtonProps:e,okButtonProps:t}=this._adapter.getProps();k(e,"autoFocus")&&!k(e,"disabled")?this._adapter.focusCancelButton():k(t,"autoFocus")&&!k(t,"disabled")&&this._adapter.focusOkButton()}}var te=function(u,e){var t={};for(var n in u)Object.prototype.hasOwnProperty.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(u);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(u,n[i])&&(t[n[i]]=u[n[i]]);return t};class O extends D{constructor(e){super(e),this.handleCancel=t=>this.foundation.handleCancel(t&&t.nativeEvent),this.handleConfirm=t=>this.foundation.handleConfirm(t&&t.nativeEvent),this.handleVisibleChange=t=>this.foundation.handleVisibleChange(t),this.handleClickOutSide=t=>this.foundation.handleClickOutSide(t),this.stopImmediatePropagation=t=>t&&t.nativeEvent&&t.nativeEvent.stopImmediatePropagation(),this.renderConfirmPopCard=t=>{let{initialFocusRef:n}=t;const{content:i,title:g,className:p,style:f,cancelType:b,icon:h,prefixCls:l,showCloseIcon:v}=this.props,{direction:_}=this.context,S=T(l,p,{[`${l}-rtl`]:_==="rtl"}),E=g!==null&&typeof g<"u",F=!(i===null||typeof i>"u"),V=r.isValidElement(h),N=T({[`${l}-body`]:!0,[`${l}-body-withIcon`]:V});return r.createElement("div",{className:S,onClick:this.stopImmediatePropagation,style:f},r.createElement("div",{className:`${l}-inner`},r.createElement("div",{className:`${l}-header`},V?r.createElement("i",{className:`${l}-header-icon`,"x-semi-prop":"icon"},h):null,r.createElement("div",{className:`${l}-header-body`},E?r.createElement("div",{className:`${l}-header-title`,"x-semi-prop":"title"},g):null),v?r.createElement(x,{className:`${l}-btn-close`,icon:r.createElement(A,null),size:"small",theme:"borderless",type:b,onClick:this.handleCancel}):null),F?r.createElement("div",{className:N,"x-semi-prop":"content"},U(i)?i({initialFocusRef:n}):i):null,r.createElement("div",{className:`${l}-footer`,ref:this.footerRef},this.renderControls())))},this.state={cancelLoading:!1,confirmLoading:!1,visible:e.defaultVisible||!1},this.foundation=new ee(this.adapter),this.footerRef=r.createRef(),this.popoverRef=r.createRef()}static getDerivedStateFromProps(e,t){const n={},{hasOwnProperty:i}=Object.prototype;return i.call(e,"visible")&&(n.visible=e.visible),n}get adapter(){return Object.assign(Object.assign({},super.adapter),{setVisible:e=>this.setState({visible:e}),updateConfirmLoading:e=>this.setState({confirmLoading:e}),updateCancelLoading:e=>this.setState({cancelLoading:e}),notifyConfirm:e=>this.props.onConfirm(e),notifyCancel:e=>this.props.onCancel(e),notifyVisibleChange:e=>this.props.onVisibleChange(e),notifyClickOutSide:e=>this.props.onClickOutSide(e),focusCancelButton:()=>{var e,t;const n=(t=(e=this.footerRef)===null||e===void 0?void 0:e.current)===null||t===void 0?void 0:t.querySelector("[data-type=cancel]");n?.focus({preventScroll:!0})},focusOkButton:()=>{var e,t;const n=(t=(e=this.footerRef)===null||e===void 0?void 0:e.current)===null||t===void 0?void 0:t.querySelector("[data-type=ok]");n?.focus({preventScroll:!0})},focusPrevFocusElement:()=>{var e;(e=this.popoverRef.current)===null||e===void 0||e.focusTrigger()}})}renderControls(){const{okText:e,cancelText:t,okType:n,cancelType:i,cancelButtonProps:g,okButtonProps:p}=this.props,{cancelLoading:f,confirmLoading:b}=this.state;return r.createElement(z,{componentName:"Popconfirm"},(h,l)=>r.createElement(r.Fragment,null,r.createElement(x,Object.assign({"data-type":"cancel",type:i,onClick:this.handleCancel,loading:f},M(g,"autoFocus")),t||k(h,"cancel")),r.createElement(x,Object.assign({"data-type":"ok",type:n,theme:"solid",onClick:this.handleConfirm,loading:b},M(p,"autoFocus")),e||k(h,"confirm"))))}render(){const{direction:e}=this.context,t=e==="rtl"?"bottomRight":"bottomLeft",n=this.props,{className:i,prefixCls:g,disabled:p,children:f,style:b,position:h=t}=n,l=te(n,["className","prefixCls","disabled","children","style","position"]);if(p)return f;const{visible:v}=this.state,_={onVisibleChange:this.handleVisibleChange,className:B.POPOVER,onClickOutSide:this.handleClickOutSide};return this.isControlled("visible")&&(_.trigger="custom"),r.createElement(X,Object.assign({ref:this.popoverRef},l,{content:S=>{let{initialFocusRef:E}=S;return this.renderConfirmPopCard({initialFocusRef:E})},visible:v,position:h},_),f)}}O.contextType=Q;O.propTypes={motion:o.oneOfType([o.bool,o.func,o.object]),disabled:o.bool,content:o.oneOfType([o.node,o.func]),title:o.any,prefixCls:o.string,className:o.string,style:o.object,icon:o.node,okText:o.string,okType:o.string,cancelText:o.string,cancelType:o.string,onCancel:o.func,onConfirm:o.func,onClickOutSide:o.func,onVisibleChange:o.func,visible:o.bool,defaultVisible:o.bool,okButtonProps:o.object,cancelButtonProps:o.object,stopPropagation:o.oneOfType([o.bool,o.string]),showCloseIcon:o.bool,zIndex:o.number,trigger:o.string,position:o.string};O.__SemiComponentName__="Popconfirm";O.defaultProps=Z(O.__SemiComponentName__,{stopPropagation:!0,trigger:"click",onVisibleChange:j,disabled:!1,icon:r.createElement(G,{size:"extra-large"}),okType:"primary",cancelType:"tertiary",prefixCls:B.PREFIX,zIndex:Y.DEFAULT_Z_INDEX,showCloseIcon:!0,onCancel:j,onConfirm:j,onClickOutSide:j});const ne=[{label:s("scene_scan_qrcode"),value:"scan_qrcode"},{label:s("scene_search"),value:"search"},{label:s("scene_fyf_promotion_direct_feed_play"),value:"fyf_promotion_direct_feed_play"},{label:s("scene_anchor"),value:"anchor"},{label:s("scene_center"),value:"center"},{label:s("scene_ad"),value:"ads"},{label:s("scene_shortcut"),value:"desktop_shortcut"},{label:s("scene_sharing"),value:"dm_sharing"},{label:s("scene_link"),value:"minis_link"}],le=()=>{const u=H(),{state:{launchOptions:e,selectedLaunchOption:t,packages:n},setLaunchOptions:i,setSelectedLaunchOption:g}=J(),p=y.useRef(null),f=t||w,[b,h]=y.useState(f),[l,v]=y.useState(f.id),_=n.map(a=>{if(a.type==="main")return{label:s("gameMainPackage"),value:a.name};if(a.type==="independent")return{label:`${s("independentPackage")}: ${a.name}`,value:a.name}}).filter(Boolean),S=y.useCallback(a=>{const c={...b,...a};c.pkgType==="main"&&c.independentPkg!==void 0&&(c.independentPkg=void 0,p.current&&p.current.setValues({independentPkg:void 0})),h(c)},[b]),E=y.useCallback(()=>{if(!p.current)return;const a=p.current.getValues();a.pkgType==="main"&&(a.independentPkg=void 0);const c=e.findIndex(C=>C.name===a.name&&C.id!=="created"&&C.id!=="normal");let d;c!==-1?(d=[...e],d[c]=a):(a.id=Date.now().toString(),d=[...e.slice(0,-1),a,...e.slice(-1)]),i(d),h(a),g(a),u("/")},[e,u,i,g]),F=y.useCallback(a=>{const c=e.find(d=>d.id===a);if(c){v(a);const d={...c};a==="created"?d.name="":a==="normal"&&(d.name=s("normalLaunchMode")),h(d),p.current?.setValues(d)}},[e]),V=y.useCallback(()=>{const a=l;if(["normal","created"].includes(a))return;const c=e.filter(L=>L.id!==a);i(c);const d=c.find(L=>L.id==="normal")||c.find(L=>L.id==="created")||c[0]||w,C={...d,...d.id==="created"?{name:""}:{},...d.id==="normal"?{name:s("normalLaunchMode")}:{}};g(C),v(C.id),h(C),p.current?.setValues(C)},[e,l,i,g]),N=y.useCallback(()=>{h(f),p.current?.setValues(f),u("/")},[f,u]),$=e.find(a=>a.id===l);return m.jsxs("div",{children:[m.jsx(K,{style:{marginBottom:32},fullMode:!1,icon:null,closeIcon:null,description:s("launchModeDesc"),type:"info"}),m.jsxs(P,{initValues:b,onValueChange:S,getFormApi:a=>p.current=a,style:{padding:20,border:"1px solid #eee",borderRadius:8},onSubmit:E,children:[m.jsx(P.Select,{placeholder:s("selectLaunchMode"),rules:[{required:!0,message:s("selectLaunchMode")}],field:"id",label:s("selectLaunchMode"),optionList:e.map(a=>({label:a.name,value:a.id})),onChange:F,style:{width:"100%"},value:l}),m.jsx(P.Input,{required:!0,placeholder:s("launchModeName"),field:"name",label:s("launchModeName"),rules:[{required:!0,message:s("notEmpty")}],style:{width:"100%"},trigger:"blur"}),m.jsx(P.Select,{field:"pkgName",label:s("selectLaunchPkg"),placeholder:s("selectLaunchPkg"),rules:[{required:!0,message:s("notEmpty")}],optionList:_,style:{width:"100%"}}),m.jsx(P.Select,{field:"scene",label:s("selectScene"),rules:[{required:!0,message:s("notEmpty")}],placeholder:s("selectScene"),optionList:ne,style:{width:"100%"},filter:!0}),m.jsx(P.Input,{field:"queries",label:s("launchQueries"),placeholder:s("launchQueriesDesc"),trigger:"blur",rules:[{validator:(a,c)=>{const{isValid:d,message:C}=W(c);return d?Promise.resolve():Promise.reject(C)}}],style:{width:"100%"}}),m.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",alignItems:"center",marginTop:20},children:[["created","normal"].includes(l)?m.jsx(x,{style:{marginRight:12},onClick:N,children:s("cancel")}):m.jsx(O,{title:s("deleteLaunchModeConfirm",{name:$?.name??""}),onConfirm:V,position:"bottomRight",children:m.jsx(x,{type:"danger",style:{marginRight:12},children:s("delete")})}),m.jsx(x,{htmlType:"submit",type:"primary",children:s("saveAndUse")})]})]})]})};export{le as LaunchMode};
|
|
1
|
+
import{h as I,k as q,l as R,_ as k,m as D,n as T,R as r,b as x,I as A,o as U,L as z,p as M,P as X,C as Q,q as o,s as Z,t as j,v as G,i as s,u as H,c as J,r as y,N as w,j as m,B as K,w as W}from"./index-Dau-IOT4.js";import{F as P}from"./baseForm-B1HAELLl.js";import"./times-BQ9JpoA2.js";import"./index-Bfdj_AIP.js";const B={PREFIX:`${I}-popconfirm`,POPOVER:`${I}-popconfirm-popover`},Y={DEFAULT_Z_INDEX:1030};class ee extends q{init(){}destroy(){}handleCancel(e){const t=this._adapter.notifyCancel(e);R(t)?(this._adapter.updateCancelLoading(!0),t.then(n=>{this.handleVisibleChange(!1),this._adapter.updateCancelLoading(!1)},n=>{this._adapter.updateCancelLoading(!1)})):this.handleVisibleChange(!1)}handleConfirm(e){const t=this._adapter.notifyConfirm(e);R(t)?(this._adapter.updateConfirmLoading(!0),t.then(n=>{this._adapter.updateConfirmLoading(!1),this.handleVisibleChange(!1)},n=>{this._adapter.updateConfirmLoading(!1)})):this.handleVisibleChange(!1)}handleClickOutSide(e){this._adapter.notifyClickOutSide(e)}handleVisibleChange(e){this._isControlledComponent("visible")||this._adapter.setVisible(e),e?this.handleFocusOperateButton():this._adapter.focusPrevFocusElement(),this._adapter.notifyVisibleChange(e)}handleFocusOperateButton(){const{cancelButtonProps:e,okButtonProps:t}=this._adapter.getProps();k(e,"autoFocus")&&!k(e,"disabled")?this._adapter.focusCancelButton():k(t,"autoFocus")&&!k(t,"disabled")&&this._adapter.focusOkButton()}}var te=function(u,e){var t={};for(var n in u)Object.prototype.hasOwnProperty.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(u);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(u,n[i])&&(t[n[i]]=u[n[i]]);return t};class O extends D{constructor(e){super(e),this.handleCancel=t=>this.foundation.handleCancel(t&&t.nativeEvent),this.handleConfirm=t=>this.foundation.handleConfirm(t&&t.nativeEvent),this.handleVisibleChange=t=>this.foundation.handleVisibleChange(t),this.handleClickOutSide=t=>this.foundation.handleClickOutSide(t),this.stopImmediatePropagation=t=>t&&t.nativeEvent&&t.nativeEvent.stopImmediatePropagation(),this.renderConfirmPopCard=t=>{let{initialFocusRef:n}=t;const{content:i,title:g,className:p,style:f,cancelType:b,icon:h,prefixCls:l,showCloseIcon:v}=this.props,{direction:_}=this.context,S=T(l,p,{[`${l}-rtl`]:_==="rtl"}),E=g!==null&&typeof g<"u",F=!(i===null||typeof i>"u"),V=r.isValidElement(h),N=T({[`${l}-body`]:!0,[`${l}-body-withIcon`]:V});return r.createElement("div",{className:S,onClick:this.stopImmediatePropagation,style:f},r.createElement("div",{className:`${l}-inner`},r.createElement("div",{className:`${l}-header`},V?r.createElement("i",{className:`${l}-header-icon`,"x-semi-prop":"icon"},h):null,r.createElement("div",{className:`${l}-header-body`},E?r.createElement("div",{className:`${l}-header-title`,"x-semi-prop":"title"},g):null),v?r.createElement(x,{className:`${l}-btn-close`,icon:r.createElement(A,null),size:"small",theme:"borderless",type:b,onClick:this.handleCancel}):null),F?r.createElement("div",{className:N,"x-semi-prop":"content"},U(i)?i({initialFocusRef:n}):i):null,r.createElement("div",{className:`${l}-footer`,ref:this.footerRef},this.renderControls())))},this.state={cancelLoading:!1,confirmLoading:!1,visible:e.defaultVisible||!1},this.foundation=new ee(this.adapter),this.footerRef=r.createRef(),this.popoverRef=r.createRef()}static getDerivedStateFromProps(e,t){const n={},{hasOwnProperty:i}=Object.prototype;return i.call(e,"visible")&&(n.visible=e.visible),n}get adapter(){return Object.assign(Object.assign({},super.adapter),{setVisible:e=>this.setState({visible:e}),updateConfirmLoading:e=>this.setState({confirmLoading:e}),updateCancelLoading:e=>this.setState({cancelLoading:e}),notifyConfirm:e=>this.props.onConfirm(e),notifyCancel:e=>this.props.onCancel(e),notifyVisibleChange:e=>this.props.onVisibleChange(e),notifyClickOutSide:e=>this.props.onClickOutSide(e),focusCancelButton:()=>{var e,t;const n=(t=(e=this.footerRef)===null||e===void 0?void 0:e.current)===null||t===void 0?void 0:t.querySelector("[data-type=cancel]");n?.focus({preventScroll:!0})},focusOkButton:()=>{var e,t;const n=(t=(e=this.footerRef)===null||e===void 0?void 0:e.current)===null||t===void 0?void 0:t.querySelector("[data-type=ok]");n?.focus({preventScroll:!0})},focusPrevFocusElement:()=>{var e;(e=this.popoverRef.current)===null||e===void 0||e.focusTrigger()}})}renderControls(){const{okText:e,cancelText:t,okType:n,cancelType:i,cancelButtonProps:g,okButtonProps:p}=this.props,{cancelLoading:f,confirmLoading:b}=this.state;return r.createElement(z,{componentName:"Popconfirm"},(h,l)=>r.createElement(r.Fragment,null,r.createElement(x,Object.assign({"data-type":"cancel",type:i,onClick:this.handleCancel,loading:f},M(g,"autoFocus")),t||k(h,"cancel")),r.createElement(x,Object.assign({"data-type":"ok",type:n,theme:"solid",onClick:this.handleConfirm,loading:b},M(p,"autoFocus")),e||k(h,"confirm"))))}render(){const{direction:e}=this.context,t=e==="rtl"?"bottomRight":"bottomLeft",n=this.props,{className:i,prefixCls:g,disabled:p,children:f,style:b,position:h=t}=n,l=te(n,["className","prefixCls","disabled","children","style","position"]);if(p)return f;const{visible:v}=this.state,_={onVisibleChange:this.handleVisibleChange,className:B.POPOVER,onClickOutSide:this.handleClickOutSide};return this.isControlled("visible")&&(_.trigger="custom"),r.createElement(X,Object.assign({ref:this.popoverRef},l,{content:S=>{let{initialFocusRef:E}=S;return this.renderConfirmPopCard({initialFocusRef:E})},visible:v,position:h},_),f)}}O.contextType=Q;O.propTypes={motion:o.oneOfType([o.bool,o.func,o.object]),disabled:o.bool,content:o.oneOfType([o.node,o.func]),title:o.any,prefixCls:o.string,className:o.string,style:o.object,icon:o.node,okText:o.string,okType:o.string,cancelText:o.string,cancelType:o.string,onCancel:o.func,onConfirm:o.func,onClickOutSide:o.func,onVisibleChange:o.func,visible:o.bool,defaultVisible:o.bool,okButtonProps:o.object,cancelButtonProps:o.object,stopPropagation:o.oneOfType([o.bool,o.string]),showCloseIcon:o.bool,zIndex:o.number,trigger:o.string,position:o.string};O.__SemiComponentName__="Popconfirm";O.defaultProps=Z(O.__SemiComponentName__,{stopPropagation:!0,trigger:"click",onVisibleChange:j,disabled:!1,icon:r.createElement(G,{size:"extra-large"}),okType:"primary",cancelType:"tertiary",prefixCls:B.PREFIX,zIndex:Y.DEFAULT_Z_INDEX,showCloseIcon:!0,onCancel:j,onConfirm:j,onClickOutSide:j});const ne=[{label:s("scene_scan_qrcode"),value:"scan_qrcode"},{label:s("scene_search"),value:"search"},{label:s("scene_fyf_promotion_direct_feed_play"),value:"fyf_promotion_direct_feed_play"},{label:s("scene_anchor"),value:"anchor"},{label:s("scene_center"),value:"center"},{label:s("scene_ad"),value:"ads"},{label:s("scene_shortcut"),value:"desktop_shortcut"},{label:s("scene_sharing"),value:"dm_sharing"},{label:s("scene_link"),value:"minis_link"}],le=()=>{const u=H(),{state:{launchOptions:e,selectedLaunchOption:t,packages:n},setLaunchOptions:i,setSelectedLaunchOption:g}=J(),p=y.useRef(null),f=t||w,[b,h]=y.useState(f),[l,v]=y.useState(f.id),_=n.map(a=>{if(a.type==="main")return{label:s("gameMainPackage"),value:a.name};if(a.type==="independent")return{label:`${s("independentPackage")}: ${a.name}`,value:a.name}}).filter(Boolean),S=y.useCallback(a=>{const c={...b,...a};c.pkgType==="main"&&c.independentPkg!==void 0&&(c.independentPkg=void 0,p.current&&p.current.setValues({independentPkg:void 0})),h(c)},[b]),E=y.useCallback(()=>{if(!p.current)return;const a=p.current.getValues();a.pkgType==="main"&&(a.independentPkg=void 0);const c=e.findIndex(C=>C.name===a.name&&C.id!=="created"&&C.id!=="normal");let d;c!==-1?(d=[...e],d[c]=a):(a.id=Date.now().toString(),d=[...e.slice(0,-1),a,...e.slice(-1)]),i(d),h(a),g(a),u("/")},[e,u,i,g]),F=y.useCallback(a=>{const c=e.find(d=>d.id===a);if(c){v(a);const d={...c};a==="created"?d.name="":a==="normal"&&(d.name=s("normalLaunchMode")),h(d),p.current?.setValues(d)}},[e]),V=y.useCallback(()=>{const a=l;if(["normal","created"].includes(a))return;const c=e.filter(L=>L.id!==a);i(c);const d=c.find(L=>L.id==="normal")||c.find(L=>L.id==="created")||c[0]||w,C={...d,...d.id==="created"?{name:""}:{},...d.id==="normal"?{name:s("normalLaunchMode")}:{}};g(C),v(C.id),h(C),p.current?.setValues(C)},[e,l,i,g]),N=y.useCallback(()=>{h(f),p.current?.setValues(f),u("/")},[f,u]),$=e.find(a=>a.id===l);return m.jsxs("div",{children:[m.jsx(K,{style:{marginBottom:32},fullMode:!1,icon:null,closeIcon:null,description:s("launchModeDesc"),type:"info"}),m.jsxs(P,{initValues:b,onValueChange:S,getFormApi:a=>p.current=a,style:{padding:20,border:"1px solid #eee",borderRadius:8},onSubmit:E,children:[m.jsx(P.Select,{placeholder:s("selectLaunchMode"),rules:[{required:!0,message:s("selectLaunchMode")}],field:"id",label:s("selectLaunchMode"),optionList:e.map(a=>({label:a.name,value:a.id})),onChange:F,style:{width:"100%"},value:l}),m.jsx(P.Input,{required:!0,placeholder:s("launchModeName"),field:"name",label:s("launchModeName"),rules:[{required:!0,message:s("notEmpty")}],style:{width:"100%"},trigger:"blur"}),m.jsx(P.Select,{field:"pkgName",label:s("selectLaunchPkg"),placeholder:s("selectLaunchPkg"),rules:[{required:!0,message:s("notEmpty")}],optionList:_,style:{width:"100%"}}),m.jsx(P.Select,{field:"scene",label:s("selectScene"),rules:[{required:!0,message:s("notEmpty")}],placeholder:s("selectScene"),optionList:ne,style:{width:"100%"},filter:!0}),m.jsx(P.Input,{field:"queries",label:s("launchQueries"),placeholder:s("launchQueriesDesc"),trigger:"blur",rules:[{validator:(a,c)=>{const{isValid:d,message:C}=W(c);return d?Promise.resolve():Promise.reject(C)}}],style:{width:"100%"}}),m.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",alignItems:"center",marginTop:20},children:[["created","normal"].includes(l)?m.jsx(x,{style:{marginRight:12},onClick:N,children:s("cancel")}):m.jsx(O,{title:s("deleteLaunchModeConfirm",{name:$?.name??""}),onConfirm:V,position:"bottomRight",children:m.jsx(x,{type:"danger",style:{marginRight:12},children:s("delete")})}),m.jsx(x,{htmlType:"submit",type:"primary",children:s("saveAndUse")})]})]})]})};export{le as LaunchMode};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a1 as G,h as X,k as B,a2 as z,a3 as U,a4 as _,a5 as Y,a6 as q,a7 as W,a8 as Z,a9 as H,aa as J,ab as Q,R as a,m as F,n as g,q as s,ac as V,t as N,r as ee,V as te,_ as $,s as se,ad as ne}from"./index-
|
|
1
|
+
import{a1 as G,h as X,k as B,a2 as z,a3 as U,a4 as _,a5 as Y,a6 as q,a7 as W,a8 as Z,a9 as H,aa as J,ab as Q,R as a,m as F,n as g,q as s,ac as V,t as N,r as ee,V as te,_ as $,s as se,ad as ne}from"./index-Dau-IOT4.js";const w={PREFIX:`${X}-dropdown`},O={POSITION_SET:G.POSITION_SET,TRIGGER_SET:["hover","focus","click","custom","contextMenu"],DEFAULT_LEAVE_DELAY:100,ITEM_TYPE:["primary","secondary","tertiary","warning","danger"]},R={SPACING:4,NESTED_SPACING:2};class oe extends B{handleVisibleChange(e){this._adapter.setPopVisible(e),this._adapter.notifyVisibleChange(e);const{trigger:n}=this.getProps();if(e&&n==="click"){const t=this._adapter.getPopupId();this.setFocusToFirstMenuItem(t)}}getMenuItemNodes(e){const n=document.getElementById(e);return n?Array.from(n.getElementsByTagName("li")).filter(t=>t.ariaDisabled==="false"):null}setFocusToFirstMenuItem(e){const n=this.getMenuItemNodes(e);n&&z(n)}setFocusToLastMenuItem(e){const n=this.getMenuItemNodes(e);n&&U(n)}handleKeyDown(e){var n,t;const o=(t=(n=e.target)===null||n===void 0?void 0:n.attributes["data-popupid"])===null||t===void 0?void 0:t.value,{visible:r}=this._adapter.getStates();switch(e.key){case" ":case"Enter":e.target.click();break;case"ArrowDown":this.setFocusToFirstMenuItem(o),r&&_(e);break;case"ArrowUp":this.setFocusToLastMenuItem(o),r&&_(e);break}}}class re extends B{constructor(){super(...arguments),this.menuItemNodes=null,this.firstChars=[]}handleEscape(e){this._adapter.getContext("trigger")==="custom"&&(e&&Y(document.querySelectorAll("[data-popupid]"),e.id)).focus()}setFocusByFirstCharacter(e,n){const t=q(this.menuItemNodes,e,this.firstChars,n);t>=0&&W(this.menuItemNodes,this.menuItemNodes[t])}onMenuKeydown(e){const n=Z(e.target,"tooltip");this.menuItemNodes||(this.menuItemNodes=[...e.target.parentNode.getElementsByTagName("li")].filter(o=>o.ariaDisabled!=="true")),this.firstChars.length===0&&this.menuItemNodes.forEach(o=>{var r;this.firstChars.push((r=o.textContent.trim()[0])===null||r===void 0?void 0:r.toLowerCase())});const t=this.menuItemNodes.find(o=>o.tabIndex===0);switch(e.key){case" ":case"Enter":e.target.click();break;case"Escape":this.handleEscape(n);break;case"ArrowUp":Q(this.menuItemNodes,t),_(e);break;case"ArrowDown":J(this.menuItemNodes,t),_(e);break;default:H(e.key)&&this.setFocusByFirstCharacter(t,e.key);break}}}const E=a.createContext({level:0});var ae=function(i,e){var n={};for(var t in i)Object.prototype.hasOwnProperty.call(i,t)&&e.indexOf(t)<0&&(n[t]=i[t]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,t=Object.getOwnPropertySymbols(i);o<t.length;o++)e.indexOf(t[o])<0&&Object.prototype.propertyIsEnumerable.call(i,t[o])&&(n[t[o]]=i[t[o]]);return n};const ie=w.PREFIX;class M extends F{constructor(e){super(e),this.foundation=new re(this.adapter)}get adapter(){return Object.assign({},super.adapter)}render(){const e=this.props,{children:n,className:t,style:o}=e,r=ae(e,["children","className","style"]);return a.createElement("ul",Object.assign({role:"menu","aria-orientation":"vertical"},r,{className:g(`${ie}-menu`,t),style:o,onKeyDown:l=>this.foundation.onMenuKeydown(l)}),n)}}M.propTypes={children:s.node,className:s.string,style:s.object};M.contextType=E;const f=w.PREFIX;class x extends F{render(){const{children:e,disabled:n,className:t,forwardRef:o,style:r,type:l,active:u,icon:m,onKeyDown:I,showTick:v,hover:h}=this.props,{showTick:C}=this.context,d=C??v,P=g(t,{[`${f}-item`]:!0,[`${f}-item-disabled`]:n,[`${f}-item-hover`]:h,[`${f}-item-withTick`]:d,[`${f}-item-${l}`]:l,[`${f}-item-active`]:u}),y={};n||["onClick","onMouseEnter","onMouseLeave","onContextMenu"].forEach(p=>{this.context.level!==1&&p==="onClick"?y.onMouseDown=A=>{var j,D;A.button===0&&((D=(j=this.props)[p])===null||D===void 0||D.call(j,A))}:y[p]=this.props[p]});let b=null;switch(!0){case(d&&u):b=a.createElement(V,null);break;case(d&&!u):b=a.createElement(V,{style:{color:"transparent"}});break;default:b=null;break}let T=null;return m&&(T=a.createElement("div",{className:`${f}-item-icon`},m)),a.createElement("li",Object.assign({role:"menuitem",tabIndex:-1,"aria-disabled":n},y,{onKeyDown:I,ref:p=>o(p),className:P,style:r},this.getDataAttr(this.props)),b,T,e)}}x.propTypes={children:s.oneOfType([s.string,s.node]),name:s.string,disabled:s.bool,selected:s.bool,onClick:s.func,onMouseEnter:s.func,onMouseLeave:s.func,onContextMenu:s.func,className:s.string,style:s.object,forwardRef:s.func,type:s.oneOf(O.ITEM_TYPE),active:s.bool,icon:s.node};x.contextType=E;x.defaultProps={disabled:!1,divided:!1,selected:!1,onMouseEnter:N,onMouseLeave:N,forwardRef:N};x.elementType="Dropdown.Item";const le=w.PREFIX,K=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{style:e,className:n}=i;return a.createElement("div",{className:g(`${le}-divider`,n),style:e})};K.propTypes={style:s.object,className:s.string};const L=w.PREFIX;class S extends ee.PureComponent{render(){const{className:e,style:n,children:t}=this.props,{showTick:o}=this.context,r=g({[`${L}-title`]:!0,[`${L}-title-withTick`]:o},e);return a.createElement("div",{className:r,style:n},t)}}S.propTypes={children:s.node,className:s.string,style:s.object};S.contextType=E;var k=function(i,e){var n={};for(var t in i)Object.prototype.hasOwnProperty.call(i,t)&&e.indexOf(t)<0&&(n[t]=i[t]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,t=Object.getOwnPropertySymbols(i);o<t.length;o++)e.indexOf(t[o])<0&&Object.prototype.propertyIsEnumerable.call(i,t[o])&&(n[t[o]]=i[t[o]]);return n};const ce=O.POSITION_SET,ue=O.TRIGGER_SET;class c extends F{constructor(e){super(e),this.handleVisibleChange=n=>this.foundation.handleVisibleChange(n),this.state={popVisible:e.visible},this.foundation=new oe(this.adapter),this.tooltipRef=a.createRef()}get adapter(){return Object.assign(Object.assign({},super.adapter),{setPopVisible:e=>this.setState({popVisible:e}),notifyVisibleChange:e=>{var n,t;return(t=(n=this.props).onVisibleChange)===null||t===void 0?void 0:t.call(n,e)},getPopupId:()=>this.tooltipRef.current.getPopupId()})}renderContent(){const{render:e,menu:n,contentClassName:t,style:o,showTick:r,prefixCls:l,trigger:u}=this.props,m=g(l,t),{level:I=0}=this.context,v={showTick:r,level:I+1,trigger:u};let h=null;return a.isValidElement(e)?h=e:Array.isArray(n)&&(h=this.renderMenu()),a.createElement(E.Provider,{value:v},a.createElement("div",{className:m,style:o},a.createElement("div",{className:`${l}-content`,"x-semi-prop":"render"},h)))}renderMenu(){const{menu:e}=this.props,n=e.map((t,o)=>{switch(t.node){case"title":{const{name:r,node:l}=t,u=k(t,["name","node"]);return a.createElement(c.Title,Object.assign({},u,{key:l+r+o}),r)}case"item":{const{node:r,name:l}=t,u=k(t,["node","name"]);return a.createElement(c.Item,Object.assign({},u,{key:r+l+o}),l)}case"divider":return a.createElement(c.Divider,{key:t.node+o});default:return null}});return a.createElement(c.Menu,null,n)}renderPopCard(){const{render:e,contentClassName:n,style:t,showTick:o,prefixCls:r}=this.props,l=g(r,n),{level:u=0}=this.context,m={showTick:o,level:u+1};return a.createElement(E.Provider,{value:m},a.createElement("div",{className:l,style:t},a.createElement("div",{className:`${r}-content`},e)))}render(){const e=this.props,{children:n,position:t,trigger:o,onVisibleChange:r,zIndex:l,className:u,motion:m,margin:I,style:v,prefixCls:h}=e,C=k(e,["children","position","trigger","onVisibleChange","zIndex","className","motion","margin","style","prefixCls"]);let{spacing:d}=this.props;const{level:P}=this.context,{popVisible:y}=this.state,b=this.renderContent();return P>0?d=typeof d=="number"?d:R.NESTED_SPACING:(d===null||typeof d>"u")&&(d=R.SPACING),a.createElement(te,Object.assign({zIndex:l,motion:m,margin:I,content:b,className:u,prefixCls:h,spacing:d,position:t,trigger:o,onVisibleChange:this.handleVisibleChange,showArrow:!1,returnFocusOnClose:!0,ref:this.tooltipRef},C),a.isValidElement(n)?a.cloneElement(n,{className:g($(n,"props.className"),{[`${h}-showing`]:y}),"aria-haspopup":!0,"aria-expanded":y,onKeyDown:T=>{this.foundation.handleKeyDown(T);const p=$(n,"props.onKeyDown");p&&p(T)}}):n)}}c.Menu=M;c.Item=x;c.Divider=K;c.Title=S;c.contextType=E;c.propTypes={children:s.node,contentClassName:s.oneOfType([s.string,s.array]),className:s.string,getPopupContainer:s.func,margin:s.oneOfType([s.number,s.object]),mouseEnterDelay:s.number,mouseLeaveDelay:s.number,menu:s.array,motion:s.oneOfType([s.bool,s.func,s.object]),onVisibleChange:s.func,prefixCls:s.string,position:s.oneOf(ce),rePosKey:s.oneOfType([s.string,s.number]),render:s.node,spacing:s.oneOfType([s.number,s.object]),showTick:s.bool,style:s.object,trigger:s.oneOf(ue),visible:s.bool,zIndex:s.number};c.__SemiComponentName__="Dropdown";c.defaultProps=se(c.__SemiComponentName__,{onVisibleChange:N,prefixCls:w.PREFIX,zIndex:ne.DEFAULT_Z_INDEX,motion:!0,trigger:"hover",position:"bottom",mouseLeaveDelay:O.DEFAULT_LEAVE_DELAY,showTick:!1,closeOnEsc:!0,onEscKeyDown:N});export{c as D};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{K as U,r as T,bl as z,bm as H,ak as J,h as R,k as L,aD as _,U as Q,R as o,n as P,t as I,q as t,m as M,aH as j,aC as ee,Z as te}from"./index-07cXGo3a.js";function ae(u){return T.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},u),T.createElement("path",{d:"M5 12.5c0-.83.67-1.5 1.5-1.5h11a1.5 1.5 0 0 1 0 3h-11A1.5 1.5 0 0 1 5 12.5Z",fill:"currentColor"}))}const se=U(ae,"checkbox_indeterminate");function ne(u){return T.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},u),T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.41 7.3c.66.51.78 1.45.28 2.11l-6.5 8.5a1.5 1.5 0 0 1-2.37.01l-3.5-4.5a1.5 1.5 0 1 1 2.36-1.84L10 14.54l5.32-6.95a1.5 1.5 0 0 1 2.1-.28Z",fill:"currentColor"}))}const re=U(ne,"checkbox_tick");var $,w;function ie(){if(w)return $;w=1;var u=z(),e=H(),a="[object Boolean]";function s(r){return r===!0||r===!1||e(r)&&u(r)==a}return $=s,$}var oe=ie();const de=J(oe),G={PREFIX:`${R}-checkbox`,INPUT:`${R}-checkbox-input`,WRAPPER:""},le={PREFIX:`${R}-checkboxGroup`},p={DIRECTION_SET:["horizontal","vertical"],TYPE_DEFAULT:"default",TYPE_CARD:"card",TYPE_PURECARD:"pureCard",DEFAULT_DIRECTION:"vertical"};class ce extends L{constructor(e){super(Object.assign({},e)),this.clickState=!1,this.handleFocusVisible=a=>{const{target:s}=a;try{if(this.clickState){this.clickState=!1;return}s.matches(":focus-visible")&&this._adapter.setFocusVisible(!0)}catch{_(!0,"Warning: [Semi Checkbox] The current browser does not support the focus-visible")}},this.handleBlur=()=>{this.clickState=!1,this._adapter.setFocusVisible(!1)}}init(){const{children:e,extra:a,extraId:s,addonId:r}=this.getProps();e&&!r&&this._adapter.setAddonId(),a&&!s&&this._adapter.setExtraId()}notifyChange(e,a){const s=this._adapter.generateEvent(e,a);this._adapter.notifyChange(s)}handleChange(e){if(this.getProp("disabled"))return;if(e?.type==="click"&&(this.clickState=!0),this._adapter.focusCheckboxEntity(),this._adapter.getIsInGroup()){this._adapter.getGroupDisabled()||this.handleChangeInGroup(e);return}const l=!this.getState("checked");this._isControlledComponent("checked")?this.notifyChange(l,e):(this.setChecked(l),this.notifyChange(l,e))}handleChangeInGroup(e){const{value:a}=this.getProps(),l=!this._adapter.getGroupValue().includes(a),c=this._adapter.generateEvent(l,e);this._adapter.notifyChange(c),this._adapter.notifyGroupChange(c)}handleEnterPress(e){Q(e)&&this.handleChange(e)}setChecked(e){this._adapter.setNativeControlChecked(e)}destroy(){}}const N=o.createContext({});class A extends T.PureComponent{blur(){this.inputEntity.blur()}focus(){const{preventScroll:e}=this.props;this.inputEntity.focus({preventScroll:e})}render(){const{indeterminate:e,checked:a,disabled:s,prefixCls:r,name:l,isPureCardType:c,addonId:E,extraId:x,focusInner:f,onInputFocus:g,onInputBlur:m}=this.props,h=r||G.PREFIX,v=P({[`${h}-inner`]:!0,[`${h}-inner-checked`]:!!a,[`${h}-inner-pureCardType`]:c},G.WRAPPER),k=P({[`${h}-inner-display`]:!0,[`${h}-focus`]:f,[`${h}-focus-border`]:f&&!a}),C=a?o.createElement(re,null):e?o.createElement(se,null):null,i={type:"checkbox","aria-label":this.props["aria-label"],"aria-disabled":s,"aria-checked":a,"aria-labelledby":E,"aria-describedby":x||this.props["aria-describedby"],"aria-invalid":this.props["aria-invalid"],"aria-errormessage":this.props["aria-errormessage"],"aria-required":this.props["aria-required"],className:G.INPUT,onChange:I,checked:a,disabled:s,onFocus:g,onBlur:m};return l&&(i.name=l),o.createElement("span",{className:v},o.createElement("input",Object.assign({},i,{ref:b=>{this.inputEntity=b}})),o.createElement("span",{className:k},C))}}A.contextType=N;A.propTypes={"aria-describedby":t.string,"aria-errormessage":t.string,"aria-invalid":t.bool,"aria-labelledby":t.string,"aria-required":t.bool,checked:t.bool,disabled:t.bool,onChange:t.func,children:t.node,grouped:t.bool,value:t.any,isPureCardType:t.bool,addonId:t.string,extraId:t.string,focusInner:t.bool,onInputFocus:t.func,onInputBlur:t.func,preventScroll:t.bool};A.defaultProps={onChange:I};class y extends M{get adapter(){return Object.assign(Object.assign({},super.adapter),{setNativeControlChecked:e=>{this.setState({checked:e})},notifyChange:e=>{const{onChange:a}=this.props;a&&a(e)},generateEvent:(e,a)=>{const{props:s}=this;return{target:Object.assign(Object.assign({},s),{checked:e}),stopPropagation:()=>{a.stopPropagation()},preventDefault:()=>{a.preventDefault()},nativeEvent:{stopImmediatePropagation:()=>{a.nativeEvent&&typeof a.nativeEvent.stopImmediatePropagation=="function"&&a.nativeEvent.stopImmediatePropagation()}}}},getIsInGroup:()=>this.isInGroup(),getGroupValue:()=>this.context&&this.context.checkboxGroup.value||[],notifyGroupChange:e=>{this.context.checkboxGroup.onChange(e)},getGroupDisabled:()=>this.context&&this.context.checkboxGroup.disabled,setAddonId:()=>{this.setState({addonId:j({prefix:"addon"})})},setExtraId:()=>{this.setState({extraId:j({prefix:"extra"})})},setFocusVisible:e=>{this.setState({focusVisible:e})},focusCheckboxEntity:()=>{this.focus()}})}constructor(e){super(e),this.handleChange=s=>this.foundation.handleChange(s),this.handleEnterPress=s=>this.foundation.handleEnterPress(s),this.handleFocusVisible=s=>{this.foundation.handleFocusVisible(s)},this.handleBlur=s=>{this.foundation.handleBlur()};const a=!1;this.state={checked:e.checked||e.defaultChecked||a,addonId:e.addonId,extraId:e.extraId,focusVisible:!1},this.checkboxEntity=null,this.foundation=new ce(this.adapter)}componentDidUpdate(e){this.props.checked!==e.checked&&(ee(this.props.checked)?this.foundation.setChecked(!1):de(this.props.checked)&&this.foundation.setChecked(this.props.checked))}isInGroup(){return!!(this.context&&this.context.checkboxGroup&&"value"in this.props)}focus(){this.checkboxEntity&&this.checkboxEntity.focus()}blur(){this.checkboxEntity&&this.checkboxEntity.blur()}render(){const{disabled:e,style:a,prefixCls:s,className:r,indeterminate:l,children:c,onMouseEnter:E,onMouseLeave:x,extra:f,value:g,role:m,tabIndex:h,id:v,type:k}=this.props,{checked:C,addonId:i,extraId:b,focusVisible:F}=this.state,n={checked:C,disabled:e},O=this.isInGroup();if(O){if(this.context.checkboxGroup.value){const K=(this.context.checkboxGroup.value||[]).includes(g);n.checked=K}this.context.checkboxGroup.disabled&&(n.disabled=this.context.checkboxGroup.disabled||this.props.disabled);const{isCardType:D,isPureCardType:Z}=this.context.checkboxGroup;n.isCardType=D,n.isPureCardType=Z,n.name=this.context.checkboxGroup.name}else n.isPureCardType=k===p.TYPE_PURECARD,n.isCardType=k===p.TYPE_CARD||n.isPureCardType;const d=s||G.PREFIX,B=n.isCardType||n.isPureCardType,q=P(d,{[`${d}-disabled`]:n.disabled,[`${d}-indeterminate`]:l,[`${d}-checked`]:n.checked,[`${d}-unChecked`]:!n.checked,[`${d}-cardType`]:n.isCardType,[`${d}-cardType_disabled`]:n.disabled&&n.isCardType,[`${d}-cardType_enable`]:!(n.disabled&&n.isCardType),[`${d}-cardType_checked`]:n.isCardType&&n.checked&&!n.disabled,[`${d}-cardType_checked_disabled`]:n.isCardType&&n.checked&&n.disabled,[r]:!!r,[`${d}-focus`]:F&&B}),Y=P(`${d}-extra`,{[`${d}-cardType_extra_noChildren`]:n.isCardType&&!c});O&&this.context.checkboxGroup.name;const W=this.props["x-semi-children-alias"]||"children",X=()=>!c&&!f?null:o.createElement("div",{className:`${d}-content`},c?o.createElement("span",{id:i,className:`${d}-addon`,"x-semi-prop":W},c):null,f?o.createElement("div",{id:b,className:Y,"x-semi-prop":"extra"},f):null);return o.createElement("span",Object.assign({role:m,tabIndex:h,style:a,className:q,id:v,onMouseEnter:E,onMouseLeave:x,onClick:this.handleChange,onKeyPress:this.handleEnterPress,"aria-labelledby":this.props["aria-labelledby"]},this.getDataAttr(this.props)),o.createElement(A,Object.assign({},this.props,n,{addonId:c&&i,extraId:f&&b,isPureCardType:n.isPureCardType,ref:D=>{this.checkboxEntity=D},focusInner:F&&!B,onInputFocus:this.handleFocusVisible,onInputBlur:this.handleBlur})),X())}}y.contextType=N;y.propTypes={"aria-describedby":t.string,"aria-errormessage":t.string,"aria-invalid":t.bool,"aria-labelledby":t.string,"aria-required":t.bool,checked:t.bool,defaultChecked:t.bool,disabled:t.bool,indeterminate:t.bool,onChange:t.func,value:t.any,style:t.object,className:t.string,prefixCls:t.string,onMouseEnter:t.func,onMouseLeave:t.func,extra:t.node,index:t.number,"aria-label":t.string,tabIndex:t.number,preventScroll:t.bool,type:t.string};y.defaultProps={defaultChecked:!1,indeterminate:!1,onChange:I,onMouseEnter:I,onMouseLeave:I,type:"default"};y.elementType="Checkbox";class S extends L{static get checkboxGroupDefaultAdapter(){return{}}constructor(e){super(Object.assign(Object.assign({},S.checkboxGroupDefaultAdapter),e))}init(){const{defaultValue:e,value:a}=this.getProps();typeof e<"u"&&!Array.isArray(e)&&_(!0,"Warning: [Semi CheckboxGroup] defaultValue should be an Array"),typeof a<"u"&&!Array.isArray(a)&&_(!0,"Warning: [Semi CheckboxGroup] value should be an Array")}notifyChange(e){this._adapter.notifyChange(e)}handleChange(e){const a=this.getState("value");let s=[];Array.isArray(a)||(s=[a]),e.target.checked?s=[...a,e.target.value]:s=a.filter((l,c)=>l!==e.target.value),"value"in this.getProps()?this.notifyChange(s):(this._adapter.updateGroupValue(s),this.notifyChange(s))}getFormatName(){return this.getProp("name")||"default"}handlePropValueChange(e){Array.isArray(e)?this._adapter.updateGroupValue(e):(typeof e>"u"&&this._adapter.updateGroupValue([]),_(!0,"Warning: [Semi CheckboxGroup] value should be an Array"))}destroy(){}}class V extends M{get adapter(){return Object.assign(Object.assign({},super.adapter),{updateGroupValue:e=>{this.setState({value:e})},notifyChange:e=>{this.props.onChange&&this.props.onChange(e)}})}constructor(e){super(e),this.state={value:e.value||e.defaultValue},this.foundation=new S(this.adapter),this.onChange=this.onChange.bind(this)}componentDidMount(){this.foundation.init()}componentDidUpdate(e){te(e.value,this.props.value)||this.foundation.handlePropValueChange(this.props.value)}componentWillUnmount(){this.foundation.destroy()}onChange(e){this.foundation.handleChange(e)}render(){const{children:e,options:a,prefixCls:s,direction:r,className:l,id:c,style:E,type:x,disabled:f}=this.props,g=x===p.TYPE_PURECARD,m=x===p.TYPE_CARD||g,h=s||le.PREFIX,v=P({[h]:!0,[`${h}-wrapper`]:!0,[`${h}-${r}`]:r,[`${h}-${r}-cardType`]:r&&m,[`${h}-${r}-pureCardType`]:r&&g},l),k=this.state.value.slice();let C;return a?C=(a||[]).map((i,b)=>typeof i=="string"?o.createElement(y,{role:"listitem",key:b,disabled:this.props.disabled,value:i,prefixCls:s},i):o.createElement(y,{role:"listitem",key:b,disabled:i.disabled||this.props.disabled,value:i.value,prefixCls:s,extra:i.extra,className:i.className,style:i.style,onChange:i.onChange},i.label)):e&&(C=o.Children.toArray(e).map((i,b)=>o.cloneElement(i,{key:b,role:"listitem"}))),o.createElement("div",Object.assign({id:c,role:"list","aria-label":this.props["aria-label"],className:v,style:E,"aria-labelledby":this.props["aria-labelledby"],"aria-describedby":this.props["aria-describedby"]},this.getDataAttr(this.props)),o.createElement(N.Provider,{value:{checkboxGroup:{onChange:this.onChange,value:k,disabled:this.props.disabled,name:this.foundation.getFormatName(),isCardType:m,isPureCardType:g}}},C))}}V.propTypes={"aria-describedby":t.string,"aria-errormessage":t.string,"aria-invalid":t.bool,"aria-labelledby":t.string,"aria-required":t.bool,defaultValue:t.array,disabled:t.bool,name:t.string,options:t.array,value:t.array,onChange:t.func,children:t.node,prefixCls:t.string,direction:t.oneOf(p.DIRECTION_SET),className:t.string,type:t.oneOf([p.TYPE_DEFAULT,p.TYPE_CARD,p.TYPE_PURECARD]),style:t.object};V.defaultProps={disabled:!1,onChange:()=>{},type:p.TYPE_DEFAULT,defaultValue:[],direction:p.DEFAULT_DIRECTION};class he extends y{}he.Group=V;export{he as C,de as _,y as a,V as b};
|
|
1
|
+
import{K as U,r as T,bl as z,bm as H,ak as J,h as R,k as L,aD as _,U as Q,R as o,n as P,t as I,q as t,m as M,aH as j,aC as ee,Z as te}from"./index-Dau-IOT4.js";function ae(u){return T.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},u),T.createElement("path",{d:"M5 12.5c0-.83.67-1.5 1.5-1.5h11a1.5 1.5 0 0 1 0 3h-11A1.5 1.5 0 0 1 5 12.5Z",fill:"currentColor"}))}const se=U(ae,"checkbox_indeterminate");function ne(u){return T.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},u),T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.41 7.3c.66.51.78 1.45.28 2.11l-6.5 8.5a1.5 1.5 0 0 1-2.37.01l-3.5-4.5a1.5 1.5 0 1 1 2.36-1.84L10 14.54l5.32-6.95a1.5 1.5 0 0 1 2.1-.28Z",fill:"currentColor"}))}const re=U(ne,"checkbox_tick");var $,w;function ie(){if(w)return $;w=1;var u=z(),e=H(),a="[object Boolean]";function s(r){return r===!0||r===!1||e(r)&&u(r)==a}return $=s,$}var oe=ie();const de=J(oe),G={PREFIX:`${R}-checkbox`,INPUT:`${R}-checkbox-input`,WRAPPER:""},le={PREFIX:`${R}-checkboxGroup`},p={DIRECTION_SET:["horizontal","vertical"],TYPE_DEFAULT:"default",TYPE_CARD:"card",TYPE_PURECARD:"pureCard",DEFAULT_DIRECTION:"vertical"};class ce extends L{constructor(e){super(Object.assign({},e)),this.clickState=!1,this.handleFocusVisible=a=>{const{target:s}=a;try{if(this.clickState){this.clickState=!1;return}s.matches(":focus-visible")&&this._adapter.setFocusVisible(!0)}catch{_(!0,"Warning: [Semi Checkbox] The current browser does not support the focus-visible")}},this.handleBlur=()=>{this.clickState=!1,this._adapter.setFocusVisible(!1)}}init(){const{children:e,extra:a,extraId:s,addonId:r}=this.getProps();e&&!r&&this._adapter.setAddonId(),a&&!s&&this._adapter.setExtraId()}notifyChange(e,a){const s=this._adapter.generateEvent(e,a);this._adapter.notifyChange(s)}handleChange(e){if(this.getProp("disabled"))return;if(e?.type==="click"&&(this.clickState=!0),this._adapter.focusCheckboxEntity(),this._adapter.getIsInGroup()){this._adapter.getGroupDisabled()||this.handleChangeInGroup(e);return}const l=!this.getState("checked");this._isControlledComponent("checked")?this.notifyChange(l,e):(this.setChecked(l),this.notifyChange(l,e))}handleChangeInGroup(e){const{value:a}=this.getProps(),l=!this._adapter.getGroupValue().includes(a),c=this._adapter.generateEvent(l,e);this._adapter.notifyChange(c),this._adapter.notifyGroupChange(c)}handleEnterPress(e){Q(e)&&this.handleChange(e)}setChecked(e){this._adapter.setNativeControlChecked(e)}destroy(){}}const N=o.createContext({});class A extends T.PureComponent{blur(){this.inputEntity.blur()}focus(){const{preventScroll:e}=this.props;this.inputEntity.focus({preventScroll:e})}render(){const{indeterminate:e,checked:a,disabled:s,prefixCls:r,name:l,isPureCardType:c,addonId:E,extraId:x,focusInner:f,onInputFocus:g,onInputBlur:m}=this.props,h=r||G.PREFIX,v=P({[`${h}-inner`]:!0,[`${h}-inner-checked`]:!!a,[`${h}-inner-pureCardType`]:c},G.WRAPPER),k=P({[`${h}-inner-display`]:!0,[`${h}-focus`]:f,[`${h}-focus-border`]:f&&!a}),C=a?o.createElement(re,null):e?o.createElement(se,null):null,i={type:"checkbox","aria-label":this.props["aria-label"],"aria-disabled":s,"aria-checked":a,"aria-labelledby":E,"aria-describedby":x||this.props["aria-describedby"],"aria-invalid":this.props["aria-invalid"],"aria-errormessage":this.props["aria-errormessage"],"aria-required":this.props["aria-required"],className:G.INPUT,onChange:I,checked:a,disabled:s,onFocus:g,onBlur:m};return l&&(i.name=l),o.createElement("span",{className:v},o.createElement("input",Object.assign({},i,{ref:b=>{this.inputEntity=b}})),o.createElement("span",{className:k},C))}}A.contextType=N;A.propTypes={"aria-describedby":t.string,"aria-errormessage":t.string,"aria-invalid":t.bool,"aria-labelledby":t.string,"aria-required":t.bool,checked:t.bool,disabled:t.bool,onChange:t.func,children:t.node,grouped:t.bool,value:t.any,isPureCardType:t.bool,addonId:t.string,extraId:t.string,focusInner:t.bool,onInputFocus:t.func,onInputBlur:t.func,preventScroll:t.bool};A.defaultProps={onChange:I};class y extends M{get adapter(){return Object.assign(Object.assign({},super.adapter),{setNativeControlChecked:e=>{this.setState({checked:e})},notifyChange:e=>{const{onChange:a}=this.props;a&&a(e)},generateEvent:(e,a)=>{const{props:s}=this;return{target:Object.assign(Object.assign({},s),{checked:e}),stopPropagation:()=>{a.stopPropagation()},preventDefault:()=>{a.preventDefault()},nativeEvent:{stopImmediatePropagation:()=>{a.nativeEvent&&typeof a.nativeEvent.stopImmediatePropagation=="function"&&a.nativeEvent.stopImmediatePropagation()}}}},getIsInGroup:()=>this.isInGroup(),getGroupValue:()=>this.context&&this.context.checkboxGroup.value||[],notifyGroupChange:e=>{this.context.checkboxGroup.onChange(e)},getGroupDisabled:()=>this.context&&this.context.checkboxGroup.disabled,setAddonId:()=>{this.setState({addonId:j({prefix:"addon"})})},setExtraId:()=>{this.setState({extraId:j({prefix:"extra"})})},setFocusVisible:e=>{this.setState({focusVisible:e})},focusCheckboxEntity:()=>{this.focus()}})}constructor(e){super(e),this.handleChange=s=>this.foundation.handleChange(s),this.handleEnterPress=s=>this.foundation.handleEnterPress(s),this.handleFocusVisible=s=>{this.foundation.handleFocusVisible(s)},this.handleBlur=s=>{this.foundation.handleBlur()};const a=!1;this.state={checked:e.checked||e.defaultChecked||a,addonId:e.addonId,extraId:e.extraId,focusVisible:!1},this.checkboxEntity=null,this.foundation=new ce(this.adapter)}componentDidUpdate(e){this.props.checked!==e.checked&&(ee(this.props.checked)?this.foundation.setChecked(!1):de(this.props.checked)&&this.foundation.setChecked(this.props.checked))}isInGroup(){return!!(this.context&&this.context.checkboxGroup&&"value"in this.props)}focus(){this.checkboxEntity&&this.checkboxEntity.focus()}blur(){this.checkboxEntity&&this.checkboxEntity.blur()}render(){const{disabled:e,style:a,prefixCls:s,className:r,indeterminate:l,children:c,onMouseEnter:E,onMouseLeave:x,extra:f,value:g,role:m,tabIndex:h,id:v,type:k}=this.props,{checked:C,addonId:i,extraId:b,focusVisible:F}=this.state,n={checked:C,disabled:e},O=this.isInGroup();if(O){if(this.context.checkboxGroup.value){const K=(this.context.checkboxGroup.value||[]).includes(g);n.checked=K}this.context.checkboxGroup.disabled&&(n.disabled=this.context.checkboxGroup.disabled||this.props.disabled);const{isCardType:D,isPureCardType:Z}=this.context.checkboxGroup;n.isCardType=D,n.isPureCardType=Z,n.name=this.context.checkboxGroup.name}else n.isPureCardType=k===p.TYPE_PURECARD,n.isCardType=k===p.TYPE_CARD||n.isPureCardType;const d=s||G.PREFIX,B=n.isCardType||n.isPureCardType,q=P(d,{[`${d}-disabled`]:n.disabled,[`${d}-indeterminate`]:l,[`${d}-checked`]:n.checked,[`${d}-unChecked`]:!n.checked,[`${d}-cardType`]:n.isCardType,[`${d}-cardType_disabled`]:n.disabled&&n.isCardType,[`${d}-cardType_enable`]:!(n.disabled&&n.isCardType),[`${d}-cardType_checked`]:n.isCardType&&n.checked&&!n.disabled,[`${d}-cardType_checked_disabled`]:n.isCardType&&n.checked&&n.disabled,[r]:!!r,[`${d}-focus`]:F&&B}),Y=P(`${d}-extra`,{[`${d}-cardType_extra_noChildren`]:n.isCardType&&!c});O&&this.context.checkboxGroup.name;const W=this.props["x-semi-children-alias"]||"children",X=()=>!c&&!f?null:o.createElement("div",{className:`${d}-content`},c?o.createElement("span",{id:i,className:`${d}-addon`,"x-semi-prop":W},c):null,f?o.createElement("div",{id:b,className:Y,"x-semi-prop":"extra"},f):null);return o.createElement("span",Object.assign({role:m,tabIndex:h,style:a,className:q,id:v,onMouseEnter:E,onMouseLeave:x,onClick:this.handleChange,onKeyPress:this.handleEnterPress,"aria-labelledby":this.props["aria-labelledby"]},this.getDataAttr(this.props)),o.createElement(A,Object.assign({},this.props,n,{addonId:c&&i,extraId:f&&b,isPureCardType:n.isPureCardType,ref:D=>{this.checkboxEntity=D},focusInner:F&&!B,onInputFocus:this.handleFocusVisible,onInputBlur:this.handleBlur})),X())}}y.contextType=N;y.propTypes={"aria-describedby":t.string,"aria-errormessage":t.string,"aria-invalid":t.bool,"aria-labelledby":t.string,"aria-required":t.bool,checked:t.bool,defaultChecked:t.bool,disabled:t.bool,indeterminate:t.bool,onChange:t.func,value:t.any,style:t.object,className:t.string,prefixCls:t.string,onMouseEnter:t.func,onMouseLeave:t.func,extra:t.node,index:t.number,"aria-label":t.string,tabIndex:t.number,preventScroll:t.bool,type:t.string};y.defaultProps={defaultChecked:!1,indeterminate:!1,onChange:I,onMouseEnter:I,onMouseLeave:I,type:"default"};y.elementType="Checkbox";class S extends L{static get checkboxGroupDefaultAdapter(){return{}}constructor(e){super(Object.assign(Object.assign({},S.checkboxGroupDefaultAdapter),e))}init(){const{defaultValue:e,value:a}=this.getProps();typeof e<"u"&&!Array.isArray(e)&&_(!0,"Warning: [Semi CheckboxGroup] defaultValue should be an Array"),typeof a<"u"&&!Array.isArray(a)&&_(!0,"Warning: [Semi CheckboxGroup] value should be an Array")}notifyChange(e){this._adapter.notifyChange(e)}handleChange(e){const a=this.getState("value");let s=[];Array.isArray(a)||(s=[a]),e.target.checked?s=[...a,e.target.value]:s=a.filter((l,c)=>l!==e.target.value),"value"in this.getProps()?this.notifyChange(s):(this._adapter.updateGroupValue(s),this.notifyChange(s))}getFormatName(){return this.getProp("name")||"default"}handlePropValueChange(e){Array.isArray(e)?this._adapter.updateGroupValue(e):(typeof e>"u"&&this._adapter.updateGroupValue([]),_(!0,"Warning: [Semi CheckboxGroup] value should be an Array"))}destroy(){}}class V extends M{get adapter(){return Object.assign(Object.assign({},super.adapter),{updateGroupValue:e=>{this.setState({value:e})},notifyChange:e=>{this.props.onChange&&this.props.onChange(e)}})}constructor(e){super(e),this.state={value:e.value||e.defaultValue},this.foundation=new S(this.adapter),this.onChange=this.onChange.bind(this)}componentDidMount(){this.foundation.init()}componentDidUpdate(e){te(e.value,this.props.value)||this.foundation.handlePropValueChange(this.props.value)}componentWillUnmount(){this.foundation.destroy()}onChange(e){this.foundation.handleChange(e)}render(){const{children:e,options:a,prefixCls:s,direction:r,className:l,id:c,style:E,type:x,disabled:f}=this.props,g=x===p.TYPE_PURECARD,m=x===p.TYPE_CARD||g,h=s||le.PREFIX,v=P({[h]:!0,[`${h}-wrapper`]:!0,[`${h}-${r}`]:r,[`${h}-${r}-cardType`]:r&&m,[`${h}-${r}-pureCardType`]:r&&g},l),k=this.state.value.slice();let C;return a?C=(a||[]).map((i,b)=>typeof i=="string"?o.createElement(y,{role:"listitem",key:b,disabled:this.props.disabled,value:i,prefixCls:s},i):o.createElement(y,{role:"listitem",key:b,disabled:i.disabled||this.props.disabled,value:i.value,prefixCls:s,extra:i.extra,className:i.className,style:i.style,onChange:i.onChange},i.label)):e&&(C=o.Children.toArray(e).map((i,b)=>o.cloneElement(i,{key:b,role:"listitem"}))),o.createElement("div",Object.assign({id:c,role:"list","aria-label":this.props["aria-label"],className:v,style:E,"aria-labelledby":this.props["aria-labelledby"],"aria-describedby":this.props["aria-describedby"]},this.getDataAttr(this.props)),o.createElement(N.Provider,{value:{checkboxGroup:{onChange:this.onChange,value:k,disabled:this.props.disabled,name:this.foundation.getFormatName(),isCardType:m,isPureCardType:g}}},C))}}V.propTypes={"aria-describedby":t.string,"aria-errormessage":t.string,"aria-invalid":t.bool,"aria-labelledby":t.string,"aria-required":t.bool,defaultValue:t.array,disabled:t.bool,name:t.string,options:t.array,value:t.array,onChange:t.func,children:t.node,prefixCls:t.string,direction:t.oneOf(p.DIRECTION_SET),className:t.string,type:t.oneOf([p.TYPE_DEFAULT,p.TYPE_CARD,p.TYPE_PURECARD]),style:t.object};V.defaultProps={disabled:!1,onChange:()=>{},type:p.TYPE_DEFAULT,defaultValue:[],direction:p.DEFAULT_DIRECTION};class he extends y{}he.Group=V;export{he as C,de as _,y as a,V as b};
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as r,c as l,z as c,j as s,P as t,ae as i,i as o,T as n,b as d}from"./index-
|
|
1
|
+
import{u as r,c as l,z as c,j as s,P as t,ae as i,i as o,T as n,b as d}from"./index-Dau-IOT4.js";const g=()=>{const a=r(),{state:{user:e}}=l();return c(e)?s.jsx(t,{position:"bottom",content:s.jsx("div",{className:"login-user-popover",children:e?.email||e?.user_id}),children:s.jsx(i,{color:"amber",style:{flexShrink:0},alt:e?.email||e?.user_id||void 0,size:"small",children:(e?.email||e?.user_id||"?").trim()[0]?.toUpperCase()||"?"})}):s.jsx(t,{position:"bottom",trigger:"hover",content:s.jsxs("div",{className:"not-login-status-popover",children:[s.jsxs("div",{className:"not-login-status-popover-copy",children:[s.jsx(n.Text,{strong:!0,children:o("notLogin")}),s.jsx(n.Text,{children:o("notLoginTip")}),s.jsx("code",{className:"not-login-status-command",children:"ttmg login"})]}),s.jsx("div",{className:"not-login-status-popover-actions",children:s.jsx(d,{size:"small",theme:"light",onClick:()=>a("/basic_debug_guide"),children:o("basicDebugGuide.entryAction")})})]}),children:s.jsx(i,{color:"grey",style:{flexShrink:0},size:"small",children:o("notLogin")})})};export{g as LoginStatus};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e,B as V,i as a,r as n,x as U,T as r,y as E,a as A,u as Ee,c as Me,z as Be,g as $e,b as w,e as L,A as q,D as Oe,E as Ke,Q as qe,d as P}from"./index-07cXGo3a.js";import{F as xe}from"./baseForm-d3x5z6BS.js";import{C as je}from"./times-BvsrZcqF.js";import"./index-BZOItUfZ.js";const Ve="https://bytedance.larkoffice.com/wiki/LkihwQCMfiBpr3khwNuceCBkn3e";function He(p){return String(p).replace(/^\s*\d+\s*[\.、]\s*/,"")}const Qe=({engine:p})=>e.jsx("div",{children:[{show:!0,titleKey:"pkgSizeCheckDesc",desc:e.jsxs("div",{children:[e.jsx("span",{children:p==="unity"?a("unityPkgSizeCheckDescTip",{projectSize:"60MB"}):a("commonPkgSizeCheckDescTip",{projectSize:"30MB",mainPackageSize:"4MB",independentPackageSize:"4MB"})}),e.jsx("a",{className:"check-code-banner-doc-link",href:Ve,target:"_blank",rel:"noreferrer",children:a("uploadGame.packageSizeDoc")})]})},{show:p!=="unity",titleKey:"mandatoryApiCheck",desc:a("mandatoryApiCheckDesc")},{show:!0,titleKey:"configFileCheck",desc:e.jsxs("div",{children:[e.jsx("code",{children:"game.json"}),":",a("gameJsonCheckDesc")]})}].filter(d=>d.show).map((d,h,t)=>e.jsxs("div",{style:{marginBottom:h===t.length-1?0:8},children:[e.jsx("strong",{className:"check-code-banner-section-title",children:`${h+1}. ${He(a(d.titleKey))}`}),e.jsx("div",{className:"check-code-banner-section-desc",children:d.desc})]},d.titleKey))}),Je=({engine:p})=>e.jsx(V,{style:{marginBottom:32},fullMode:!1,icon:null,closeIcon:null,description:e.jsx(Qe,{engine:p}),type:"info"}),Ze=p=>{const{result:d}=p,h=d.every(o=>o?.passed),[t,c]=n.useState(!1);return e.jsxs("div",{className:"check-result-group",children:[h?e.jsxs("div",{className:"check-result-title",children:[e.jsx(U,{style:{color:"#4CAF50",marginRight:4,fontSize:20}}),e.jsx(r.Text,{style:{color:"#4CAF50",fontSize:20},children:a("checkConfigPassed")})]}):e.jsxs("div",{className:"check-result-title",children:[e.jsx(E,{style:{color:"#F44336",marginRight:4}}),e.jsx(r.Text,{style:{color:"#F44336",fontSize:20},children:a("checkConfigFailed")})]}),e.jsxs("div",{style:{paddingBottom:24,position:"relative"},children:[e.jsx(je,{style:{marginBottom:12},collapseHeight:150,isOpen:t,children:d.map((o,f)=>e.jsxs("div",{className:"check-result-item",children:[e.jsx(A,{color:o?.passed?"green":"red",style:{marginRight:8,flexShrink:0},children:o?.file}),e.jsx(r.Text,{style:{fontSize:14,color:o?.passed?"rgba(0, 0, 0, 0.65)":"red"},children:o?.msg}),o?.detail?.link?e.jsx("a",{href:o.detail.link,target:"_blank",rel:"noreferrer",style:{marginLeft:8,fontSize:12,color:"#1765ff"},children:o.detail.text||a("viewDoc")}):null]},f))}),t?e.jsx(r.Text,{style:{color:"grey",cursor:"pointer",fontSize:14,width:"100%",display:"block",alignItems:"center",justifyContent:"center",textAlign:"center"},onClick:()=>c(!1),children:a("closeCheckDetail")}):e.jsx(r.Text,{style:{color:"grey"},className:"show-more-text-btn",onClick:()=>c(!0),children:a("expandCheckDetail")})]})]})},We={project:a("gameProject"),main_package:a("gameMainPackage"),independent_package:a("independentPackage")},Xe=p=>{const{result:d}=p,h=d.every(t=>t?.passed);return e.jsxs("div",{className:"check-result-group",children:[h?e.jsxs("div",{className:"check-result-title",children:[e.jsx(U,{style:{color:"#4CAF50",marginRight:4,fontSize:20}}),e.jsx(r.Text,{style:{color:"#4CAF50",fontSize:20},children:a("checkPkgSizePassed")})]}):e.jsxs("div",{className:"check-result-title",children:[e.jsx(E,{style:{color:"#F44336",marginRight:4,fontSize:20}}),e.jsx(r.Text,{style:{color:"#F44336",fontSize:20},children:a("checkPkgSizeFailed")})]}),d.map((t,c)=>e.jsxs("div",{className:"check-result-item",children:[e.jsxs(A,{color:t?.passed?"green":"red",style:{marginRight:8},children:[We[t.dimension],t.dimension==="independent_package"?`: ${t.name}`:""]}),e.jsx(r.Text,{style:{fontSize:14,color:t?.passed?"rgba(0, 0, 0, 0.65)":"red"},children:t?.msg}),t?.detail?.link?e.jsx("a",{href:t.detail.link,target:"_blank",rel:"noreferrer",style:{marginLeft:8,fontSize:12,color:"#1765ff"},children:t.detail.text||a("viewDoc")}):null]},c))]})},Ye=p=>{const{result:d}=p;if(!Array.isArray(d)||d.length===0)return null;const h=d.every(o=>o?.passed),[t,c]=n.useState(!1);return e.jsxs("div",{className:"check-result-group",children:[h?e.jsxs("div",{className:"check-result-title",children:[e.jsx(U,{style:{color:"#4CAF50",marginRight:4,fontSize:20}}),e.jsx(r.Text,{style:{color:"#4CAF50",fontSize:20},children:a("checkApiSuccess")})]}):e.jsxs("div",{className:"check-result-title",children:[e.jsx(E,{style:{color:"#F44336",marginRight:4}}),e.jsx(r.Text,{style:{color:"#F44336",fontSize:20},children:a("checkApiFailed")})]}),e.jsxs("div",{style:{position:"relative"},children:[e.jsx(je,{style:{marginBottom:12},collapseHeight:150,isOpen:t,children:d.map((o,f)=>e.jsxs("div",{className:"check-result-item",children:[e.jsx(A,{color:o?.passed?"green":"red",style:{marginRight:8,flexShrink:0},children:o?.name}),e.jsxs(r.Text,{style:{fontSize:14,color:o?.passed?"rgba(0, 0, 0, 0.65)":"red"},children:[a(o?.name),o?.passed?a("integrated"):a("notIntegrated")]}),o?.detail?.link?e.jsx("a",{href:o.detail.link,target:"_blank",rel:"noreferrer",style:{marginLeft:8,fontSize:12,color:"#1765ff"},children:o.detail.text||a("viewDoc")}):null]},f))}),t?e.jsx(r.Text,{style:{color:"grey",cursor:"pointer",fontSize:14,width:"100%",display:"block",alignItems:"center",justifyContent:"center",textAlign:"center"},onClick:()=>c(!1),children:a("closeCheckDetail")}):e.jsx(r.Text,{style:{color:"grey"},className:"show-more-text-btn",onClick:()=>c(!0),children:a("expandCheckDetail")})]})]})},es=p=>{const{result:d}=p;if(!Array.isArray(d)||d.length===0)return null;const h=d.every(t=>t?.passed);return e.jsxs("div",{className:"check-result-group",children:[h?e.jsxs("div",{className:"check-result-title",children:[e.jsx(U,{style:{color:"#4CAF50",marginRight:4,fontSize:20}}),e.jsx(r.Text,{style:{color:"#4CAF50",fontSize:20},children:a("checkPerformancePassed")})]}):e.jsxs("div",{className:"check-result-title",children:[e.jsx(E,{style:{color:"#F44336",marginRight:4,fontSize:20}}),e.jsx(r.Text,{style:{color:"#F44336",fontSize:20},children:a("checkPerformanceFailed")})]}),d.map((t,c)=>e.jsxs("div",{className:"check-result-item",children:[e.jsx(A,{color:t?.passed?"green":"red",style:{marginRight:8,flexShrink:0},children:a("performanceCheck")}),e.jsx(r.Text,{style:{fontSize:14,color:t?.passed?"rgba(0, 0, 0, 0.65)":"red"},children:t?.msg}),t?.detail?.link?e.jsx("a",{href:t.detail.link,target:"_blank",rel:"noreferrer",style:{marginLeft:8,fontSize:12,color:"#1765ff"},children:t.detail.text||a("viewDoc")}):null]},c))]})},os=()=>{const p=Ee(),d=3e3,h=600*1e3,[t,c]=n.useState("idle"),[o,f]=n.useState(""),[fe,M]=n.useState(""),[T,B]=n.useState([]),[y,G]=n.useState(""),[ye,H]=n.useState({}),[Q,_]=n.useState(!1),[J,R]=n.useState(""),[ve,z]=n.useState(!1),[ke,Se]=n.useState(""),[b,Ne]=n.useState([]),[C,Z]=n.useState(!1),[S,W]=n.useState(!0),[v,we]=n.useState(!1),[X,Y]=n.useState(""),[ee,se]=n.useState(!1),[$,x]=n.useState(""),ae=n.useRef(null),{state:{engine:Te,user:re,gameDetail:le}}=Me(),k=Be(re),F=$e({errorCode:le?.has_error?le.error_code:void 0,user:re})==="noPermission",O=s=>new Promise(l=>setTimeout(l,s)),Ge=s=>s?String(s.status??s.cdn_deploy_status??s.live_status??"").toLowerCase():"",te=s=>s?String(s.status??s.cdn_deploy_status??s.live_status??""):"",D=s=>{if(Number(s?.cdn_deploy_status)===2)return"ready";const l=Ge(s);return l?["ready","success","succeeded","available"].includes(l)?"ready":l.includes("fail")||l.includes("error")||l.includes("reject")?"failed":"pending":"pending"},ie=s=>s==="preview"?4:s==="review"?3:s==="live"?2:1,be=s=>{if(!s)return[];const l=[...(s.preview_assets||[]).map(i=>({...i,source:"preview",state:D(i)})),...(s.in_review_assets||[]).map(i=>({...i,source:"review",state:D(i)})),...(s.live_assets||[]).map(i=>({...i,source:"live",state:D(i)})),...(s.assets||[]).map(i=>({...i,source:"other",state:D(i)}))].sort((i,m)=>{const j=Number(m.uploaded_at||0)-Number(i.uploaded_at||0);return j!==0?j:ie(m.source)-ie(i.source)}),u=new Map;return l.forEach(i=>{const m=String(i.asset_id||"");m&&!u.has(m)&&u.set(m,i)}),Array.from(u.values())},Ce=s=>s==="ready"?a("uploadGame.record.state.ready"):s==="failed"?a("uploadGame.record.state.failed"):a("uploadGame.record.state.pending"),De=s=>s==="preview"?a("uploadGame.record.source.preview"):s==="review"?a("uploadGame.record.source.review"):s==="live"?a("uploadGame.record.source.live"):a("uploadGame.record.source.other"),oe=s=>s?new Date(s*1e3).toLocaleString():a("uploadGame.record.metaUnknown"),Pe=s=>{if(!s)return a("uploadGame.record.metaUnknown");const l=s/1024/1024;return`${l>=10?l.toFixed(0):l.toFixed(1)} MB`},de=s=>{if(s.version)return`v${s.version}`;const l=String(s.asset_id||"");return l?`${l.slice(0,6)}...${l.slice(-4)}`:a("uploadGame.record.metaUnknown")},Ae=s=>`${de(s)} · ${Ce(s.state)} · ${oe(s.uploaded_at)}`,_e=s=>s?[s.preview_assets||[],s.in_review_assets||[],s.live_assets||[],s.assets||[]].flat().filter(Boolean):[],ne=async()=>{if(!k||F){B([]),G(""),R(""),_(!1);return}_(!0),R("");try{const s=await P({method:"POST",url:"/game/assets"});if(s?.code!==0||!s?.data)throw new Error(a("uploadGame.record.loadFailed"));const l=be(s.data);B(l);const u=(y&&l.some(i=>String(i.asset_id)===String(y))?y:"")||"";G(String(u||""))}catch(s){R(s instanceof Error?s.message:a("uploadGame.record.loadFailed"))}finally{_(!1)}},Re=async(s,l)=>{for(;Date.now()<l;){const u=await P({method:"POST",url:"/game/assets",data:{assetId:s,includePending:!0}}),m=_e(u?.data).find(j=>String(j.asset_id)===String(s))||null;if(m){const j=te(m);j&&M(j);const he=D(m);if(he==="ready")return{ok:!0,asset:m};if(he==="failed")return{ok:!1,asset:m}}await O(d)}return{ok:!1,asset:null}},ce=async(s,l)=>{for(;Date.now()<l;){const u=await P({method:"POST",url:"/game/asset/preview-url",data:{assetId:s}});if(u?.code===0&&u?.data?.preview_url)return u.data.preview_url;await O(d)}return""},ze=()=>{W(!0),Z(!1),P({url:"/game/check",method:"GET"}).then(s=>{Ne(s?.data||[])}).catch(()=>{Z(!0)}).finally(()=>{W(!1)})};n.useEffect(()=>{ze()},[]),n.useEffect(()=>{if(!k||F){B([]),G(""),R(""),_(!1);return}ne()},[k,F]);const ue=b.filter(s=>s?.type==="config"),pe=b.filter(s=>s?.type==="size"),me=b.filter(s=>s?.type==="api"),ge=b.filter(s=>s?.type==="performance"),K=b.some(s=>!s?.passed),Fe=[{key:"performance",title:a("uploadGame.group.performance"),items:ge},{key:"size",title:a("uploadGame.group.size"),items:pe},{key:"api",title:a("uploadGame.group.api"),items:me},{key:"config",title:a("uploadGame.group.config"),items:ue}].filter(s=>s.items.length>0).flatMap(s=>s.items.filter(l=>!l?.passed).map(l=>({groupTitle:s.title,message:l?.msg||a("uploadGame.unknownIssue"),link:l?.detail?.link,linkText:l?.detail?.text}))),Ie=s=>t==="uploading"?s===0?"current":"pending":t==="checkingAsset"?s===0?"done":s===1?"current":"pending":t==="resolvingPreview"?s<=1?"done":s===2?"current":"pending":"pending",Le=[a("uploadGame.progress.step1"),a("uploadGame.progress.step2"),a("uploadGame.progress.step3")],N=()=>{we(s=>!s)},g=T.find(s=>String(s.asset_id)===String(y))||null,I=y&&ye[String(y)]||"";n.useEffect(()=>{if(!g||g.state!=="ready"){z(!1);return}const s=String(g.asset_id);if(I){z(!1);return}let l=!1;return(async()=>{z(!0);const i=await ce(s,Date.now()+h);l||(i&&H(m=>({...m,[s]:i})),z(!1))})(),()=>{l=!0}},[g,I]);const Ue=()=>{if(!X.trim()){x(a("needDesc"));return}se(!0),c("uploading"),x(""),f(""),M(""),P({method:"POST",url:"/game/upload",headers:{"ttmg-game-desc":encodeURIComponent(X||"--")}}).then(async s=>{if(s?.code===0){await O(500),f(s?.data?.detail||"");const l=s?.data?.asset_id?String(s.data.asset_id):"",u=Date.now()+h;if(!l){c("failure"),x(a("uploadGame.failure.missingAssetId"));return}c("checkingAsset");const i=await Re(l,u);if(!i.ok){c("failure"),x(i.asset?a("uploadGame.failure.assetStatus",{status:te(i.asset)||"-"}):a("uploadGame.failure.assetTimeout"));return}c("resolvingPreview");const m=await ce(l,u);if(!m){c("failure"),x(a("uploadGame.failure.previewTimeout"));return}H(j=>({...j,[l]:m})),Se(l),G(""),Y(""),ae.current?.formApi?.reset?.(),await ne(),c("idle")}else c("idle"),x(s?.error?.StatusMessage||s?.detail||a("uploadPlatformFailed"))}).catch(s=>{c("idle"),x(s?.error?.StatusMessage||s?.response?.detail||s?.message||a("uploadPlatformFailed"))}).finally(()=>{se(!1)})};if(F){const s=["projectInfo.error.permission.stepCheckAccount","projectInfo.error.permission.stepApply","projectInfo.error.permission.stepRestart"];return e.jsx("div",{className:"upload-game-page",children:e.jsxs("section",{className:"upload-game-guard",children:[e.jsxs("div",{className:"upload-game-guard-banner",children:[e.jsx(r.Text,{strong:!0,children:a("projectInfo.error.permission.title")}),e.jsx(r.Text,{children:a("projectInfo.error.permission.desc")})]}),e.jsxs("div",{className:"upload-game-guard-card",children:[e.jsxs("div",{className:"upload-game-guard-head",children:[e.jsx(r.Text,{strong:!0,children:a("projectInfo.error.stepTitle")}),e.jsx(r.Text,{className:"upload-game-form-head-desc",children:a("projectInfo.error.helpPermissionDesc")})]}),e.jsx("div",{className:"upload-game-guard-steps",children:s.map((l,u)=>e.jsxs("div",{className:"upload-game-guard-step",children:[e.jsx("span",{className:"upload-game-guard-step-index",children:u+1}),e.jsx(r.Text,{children:a(l)})]},l))}),e.jsx("div",{className:"upload-game-guard-actions",children:e.jsx(w,{theme:"light",onClick:()=>p("/basic_debug_guide"),children:a("basicDebugGuide.entryAction")})})]})]})})}return e.jsxs("div",{className:"upload-game-page",children:[e.jsx("section",{className:"upload-game-guide-card",children:e.jsxs("div",{className:"upload-game-guide",children:[e.jsxs("div",{className:"upload-game-guide-copy",children:[e.jsx(r.Text,{strong:!0,children:a("uploadGame.guide.title")}),e.jsx(r.Paragraph,{className:"upload-game-guide-desc",children:a("uploadGame.guide.desc")})]}),e.jsx("div",{className:"upload-game-guide-steps",children:[{title:a("uploadGame.guide.precheck.title"),desc:a("uploadGame.guide.precheck.desc")},{title:a("uploadGame.guide.version.title"),desc:a("uploadGame.guide.version.desc")},{title:a("uploadGame.guide.preview.title"),desc:a("uploadGame.guide.preview.desc")}].map((s,l)=>e.jsxs("div",{className:"upload-game-guide-step",children:[e.jsx("span",{className:"upload-game-guide-step-index",children:l+1}),e.jsxs("div",{className:"upload-game-guide-step-copy",children:[e.jsx(r.Text,{strong:!0,children:s.title}),e.jsx(r.Text,{type:"tertiary",children:s.desc})]})]},s.title))})]})}),e.jsxs("section",{className:"upload-game-hero",children:[S?e.jsxs("div",{className:"upload-game-summary-panel upload-game-summary-panel-neutral",children:[e.jsxs("div",{className:"upload-game-summary-copy",children:[e.jsx(r.Text,{strong:!0,children:a("uploadGame.summary.checkingTitle")}),e.jsx(r.Text,{style:{color:"rgba(0, 0, 0, 0.45)"},children:a("uploadGame.summary.checkingDesc")})]}),e.jsx(L,{size:"small"})]}):null,!S&&C?e.jsxs("div",{className:"upload-game-summary-panel upload-game-summary-panel-warn",children:[e.jsxs("div",{className:"upload-game-summary-copy",children:[e.jsx(r.Text,{strong:!0,children:a("uploadGame.summary.failedTitle")}),e.jsx(r.Text,{style:{color:"rgba(0, 0, 0, 0.45)"},children:a("uploadGame.checkFetchFailed")})]}),e.jsxs("span",{className:"upload-game-summary-action",role:"button",tabIndex:0,onClick:N,onKeyDown:s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),N())},children:[e.jsx(q,{style:{transform:v?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"}}),e.jsx(r.Text,{children:a(v?"uploadGame.hideDetails":"uploadGame.showDetails")})]})]}):null,k?null:e.jsxs("div",{className:"upload-game-inline-notice",children:[e.jsx("div",{className:"upload-game-inline-notice-icon",children:e.jsx(Oe,{})}),e.jsxs("div",{className:"upload-game-inline-notice-copy",children:[e.jsx(r.Text,{strong:!0,children:a("uploadGame.loginNoticeTitle")}),e.jsx(r.Text,{children:a("loginToUpload")}),e.jsx("div",{className:"upload-game-inline-notice-action",children:e.jsx(w,{theme:"light",onClick:()=>p("/basic_debug_guide"),children:a("basicDebugGuide.entryAction")})})]})]}),!S&&!C&&K?e.jsxs("div",{className:"upload-game-summary-panel upload-game-summary-panel-warn",children:[e.jsxs("div",{className:"upload-game-summary-copy",children:[e.jsx(r.Text,{strong:!0,children:a("uploadGame.issueTitle")}),e.jsx(r.Text,{style:{color:"rgba(0, 0, 0, 0.45)"},children:a("uploadGame.issueDesc")})]}),e.jsxs("span",{className:"upload-game-summary-action",role:"button",tabIndex:0,onClick:N,onKeyDown:s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),N())},children:[e.jsx(q,{style:{transform:v?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"}}),e.jsx(r.Text,{children:a(v?"uploadGame.hideDetails":"uploadGame.showDetails")})]})]}):null,!S&&!C&&!K?e.jsxs("div",{className:"upload-game-summary-panel upload-game-summary-panel-ok",children:[e.jsxs("div",{className:"upload-game-summary-copy",children:[e.jsx(r.Text,{strong:!0,children:a("uploadGame.readyTitle")}),e.jsx(r.Text,{style:{color:"rgba(0, 0, 0, 0.45)"},children:a("uploadGame.readyDesc")})]}),e.jsxs("span",{className:"upload-game-summary-action",role:"button",tabIndex:0,onClick:N,onKeyDown:s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),N())},children:[e.jsx(q,{style:{transform:v?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"}}),e.jsx(r.Text,{children:a(v?"uploadGame.hideDetails":"uploadGame.showDetails")})]})]}):null,v?e.jsxs("div",{className:"upload-game-inline-detail",children:[e.jsx(r.Paragraph,{className:"upload-game-inline-detail-desc",children:a("uploadGame.detailDesc")}),e.jsx("div",{className:"upload-game-check-body",children:S?e.jsx("div",{className:"upload-game-loading",children:e.jsx(L,{})}):e.jsxs(e.Fragment,{children:[e.jsx(Je,{engine:Te}),e.jsx(es,{result:ge}),e.jsx(Xe,{result:pe}),e.jsx(Ye,{result:me}),e.jsx(Ze,{result:ue})]})})]}):null,C?e.jsx(V,{type:"warning",description:a("uploadGame.checkFetchFailed"),style:{marginTop:16}}):null,!S&&!C&&K?e.jsx("div",{className:"upload-game-issue-list",children:Fe.slice(0,4).map((s,l)=>e.jsxs("div",{className:"upload-game-issue-item",children:[e.jsx(A,{color:"red",children:s.groupTitle}),e.jsx(r.Text,{className:"upload-game-issue-text",children:s.message}),s.link?e.jsx("a",{href:s.link,target:"_blank",rel:"noreferrer",children:s.linkText||a("viewDoc")}):null]},`${s.groupTitle}-${l}`))}):null,e.jsxs("div",{className:"upload-game-form-wrapper upload-game-form-wrapper-main",children:[t==="idle"?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"upload-game-form-head",children:[e.jsx(r.Text,{strong:!0,children:a("gameAssetDescription")}),e.jsx(r.Text,{className:"upload-game-form-head-desc",children:a("uploadGame.uploadDescHint")})]}),e.jsx(xe,{ref:ae,onChange:({values:s})=>{Y(s?.gameDescription||""),x("")},children:e.jsx(xe.TextArea,{noLabel:!0,placeholder:a("gameAssetDescription"),field:"gameDescription",disabled:!k})}),$&&e.jsx(r.Text,{type:"danger",style:{display:"block",marginBottom:8},children:$}),e.jsx(w,{theme:"solid",type:"primary",disabled:!k||ee,loading:ee,onClick:Ue,style:{width:"100%",height:40},children:a("uploadToPlatform")})]}):null,t==="uploading"||t==="checkingAsset"||t==="resolvingPreview"?e.jsxs("div",{className:"upload-game-progress-card",children:[e.jsxs("div",{className:"upload-game-progress-head",children:[e.jsxs("div",{className:"upload-game-progress-badge",children:[e.jsx("span",{className:"upload-game-progress-badge-dot"}),e.jsx(r.Text,{children:t==="uploading"?a("uploadGame.progress.badgeUploading"):t==="checkingAsset"?a("uploadGame.progress.badgeChecking"):a("uploadGame.progress.badgePreview")})]}),e.jsx("div",{className:"upload-game-progress-bar"})]}),e.jsxs("div",{className:"upload-game-progress-copy",children:[e.jsx(r.Title,{heading:5,children:t==="uploading"?a("uploadGame.progress.title"):t==="checkingAsset"?a("uploadGame.progress.assetTitle"):a("uploadGame.progress.previewTitle")}),e.jsx(r.Paragraph,{className:"upload-game-form-head-desc",children:t==="uploading"?a("uploadGame.progress.desc"):t==="checkingAsset"?a("uploadGame.progress.assetDesc",{status:fe||a("uploadGame.progress.statusPending")}):a("uploadGame.progress.previewDesc")}),e.jsx("div",{className:"upload-game-progress-steps",children:Le.map((s,l)=>{const u=Ie(l);return e.jsxs("div",{className:`upload-game-progress-step upload-game-progress-step-${u}`,children:[e.jsx("span",{className:"upload-game-progress-step-dot",children:l+1}),e.jsx("span",{className:"upload-game-progress-step-label",children:s})]},s)})})]})]}):null,t==="failure"?e.jsxs("div",{className:"upload-game-failure-card",children:[e.jsx(r.Title,{heading:5,children:a("uploadGame.failure.title")}),e.jsx(r.Paragraph,{className:"upload-game-form-head-desc",children:$||a("uploadPlatformFailed")}),e.jsxs("div",{className:"upload-game-success-actions",children:[o?e.jsx(w,{theme:"light",onClick:()=>window.open(o,"_blank"),children:a("viewOnPlatform")}):null,e.jsx(w,{theme:"solid",type:"primary",onClick:()=>{c("idle"),x(""),f(""),M("")},children:a("uploadGame.failure.retry")})]})]}):null]}),k?e.jsxs("div",{className:"upload-game-records",children:[e.jsx("div",{className:"upload-game-records-head",children:e.jsxs("div",{className:"upload-game-records-copy",children:[e.jsx(r.Text,{children:a("uploadGame.record.title")}),e.jsx(r.Text,{className:"upload-game-form-head-desc",children:a("uploadGame.record.desc")})]})}),J?e.jsx(V,{type:"warning",description:J,style:{marginTop:12}}):null,Q&&!T.length?e.jsxs("div",{className:"upload-game-records-empty",children:[e.jsx(L,{size:"small"}),e.jsx(r.Text,{children:a("uploadGame.record.loading")})]}):null,!Q&&!T.length?e.jsx("div",{className:"upload-game-records-empty",children:e.jsx(r.Text,{children:a("uploadGame.record.empty")})}):null,T.length?e.jsxs("div",{className:"upload-game-records-layout",children:[e.jsx("div",{className:"upload-game-records-toolbar",children:e.jsx(Ke,{value:y,className:"upload-game-record-select",placeholder:a("uploadGame.record.selectPlaceholder"),allowClear:!0,optionList:T.slice(0,12).map(s=>({value:String(s.asset_id),label:Ae(s)})),onChange:s=>G(String(s||""))})}),g?e.jsxs("div",{className:"upload-game-record-detail",children:[e.jsx("div",{className:"upload-game-record-detail-head",children:e.jsx("div",{className:"upload-game-record-detail-copy",children:e.jsx(r.Text,{strong:!0,children:a("uploadGame.record.detailTitle",{version:de(g)})})})}),e.jsxs("div",{className:"upload-game-record-detail-body",children:[e.jsxs("div",{className:"upload-game-record-detail-main",children:[e.jsxs("div",{className:"upload-game-record-detail-meta",children:[e.jsxs("div",{className:"upload-game-record-detail-row",children:[e.jsx(r.Text,{type:"tertiary",children:a("uploadGame.record.metaUploadedAt")}),e.jsx(r.Text,{children:oe(g.uploaded_at)})]}),e.jsxs("div",{className:"upload-game-record-detail-row",children:[e.jsx(r.Text,{type:"tertiary",children:a("uploadGame.record.metaAssetId")}),e.jsx(r.Text,{children:g.asset_id||a("uploadGame.record.metaUnknown")})]}),e.jsxs("div",{className:"upload-game-record-detail-row",children:[e.jsx(r.Text,{type:"tertiary",children:a("uploadGame.record.metaSource")}),e.jsx(r.Text,{children:De(g.source)})]}),e.jsxs("div",{className:"upload-game-record-detail-row",children:[e.jsx(r.Text,{type:"tertiary",children:a("uploadGame.record.metaSize")}),e.jsx(r.Text,{children:Pe(g.size)})]})]}),e.jsxs("div",{className:"upload-game-record-detail-note",children:[e.jsx(r.Text,{type:"tertiary",children:a("gameAssetDescription")}),e.jsx(r.Paragraph,{children:g.desc||a("uploadGame.record.noDesc")})]})]}),e.jsx("div",{className:"upload-game-record-preview",children:g.state==="ready"?I?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"upload-game-record-qr-box",children:e.jsx(qe,{value:I,size:132})}),e.jsx(r.Text,{className:"upload-game-success-qr-caption",children:a("uploadGame.record.previewHint")})]}):e.jsx("div",{className:"upload-game-record-qr-box upload-game-record-qr-box-muted",children:ve?e.jsxs("div",{className:"upload-game-record-preview-loading",children:[e.jsx(L,{size:"small"}),e.jsx(r.Text,{children:a("uploadGame.record.previewLoading")})]}):e.jsx(r.Text,{type:"tertiary",children:a("uploadGame.record.previewUnavailable")})}):e.jsx("div",{className:"upload-game-record-qr-box upload-game-record-qr-box-muted",children:e.jsx(r.Text,{type:"tertiary",children:g.state==="failed"?a("uploadGame.record.failedDesc"):a("uploadGame.record.pendingDesc")})})})]}),String(g.asset_id)===String(ke)&&o?e.jsx("div",{className:"upload-game-success-actions",children:e.jsx(w,{theme:"light",onClick:()=>window.open(o,"_blank"),children:a("viewOnPlatform")})}):null]}):null]}):null]}):null]})]})};export{os as CheckCode};
|
|
1
|
+
import{j as e,B as V,i as a,r as n,x as U,T as r,y as E,a as A,u as Ee,c as Me,z as Be,g as $e,b as w,e as L,A as q,D as Oe,E as Ke,Q as qe,d as P}from"./index-Dau-IOT4.js";import{F as xe}from"./baseForm-B1HAELLl.js";import{C as je}from"./times-BQ9JpoA2.js";import"./index-Bfdj_AIP.js";const Ve="https://bytedance.larkoffice.com/wiki/LkihwQCMfiBpr3khwNuceCBkn3e";function He(p){return String(p).replace(/^\s*\d+\s*[\.、]\s*/,"")}const Qe=({engine:p})=>e.jsx("div",{children:[{show:!0,titleKey:"pkgSizeCheckDesc",desc:e.jsxs("div",{children:[e.jsx("span",{children:p==="unity"?a("unityPkgSizeCheckDescTip",{projectSize:"60MB"}):a("commonPkgSizeCheckDescTip",{projectSize:"30MB",mainPackageSize:"4MB",independentPackageSize:"4MB"})}),e.jsx("a",{className:"check-code-banner-doc-link",href:Ve,target:"_blank",rel:"noreferrer",children:a("uploadGame.packageSizeDoc")})]})},{show:p!=="unity",titleKey:"mandatoryApiCheck",desc:a("mandatoryApiCheckDesc")},{show:!0,titleKey:"configFileCheck",desc:e.jsxs("div",{children:[e.jsx("code",{children:"game.json"}),":",a("gameJsonCheckDesc")]})}].filter(d=>d.show).map((d,h,t)=>e.jsxs("div",{style:{marginBottom:h===t.length-1?0:8},children:[e.jsx("strong",{className:"check-code-banner-section-title",children:`${h+1}. ${He(a(d.titleKey))}`}),e.jsx("div",{className:"check-code-banner-section-desc",children:d.desc})]},d.titleKey))}),Je=({engine:p})=>e.jsx(V,{style:{marginBottom:32},fullMode:!1,icon:null,closeIcon:null,description:e.jsx(Qe,{engine:p}),type:"info"}),Ze=p=>{const{result:d}=p,h=d.every(o=>o?.passed),[t,c]=n.useState(!1);return e.jsxs("div",{className:"check-result-group",children:[h?e.jsxs("div",{className:"check-result-title",children:[e.jsx(U,{style:{color:"#4CAF50",marginRight:4,fontSize:20}}),e.jsx(r.Text,{style:{color:"#4CAF50",fontSize:20},children:a("checkConfigPassed")})]}):e.jsxs("div",{className:"check-result-title",children:[e.jsx(E,{style:{color:"#F44336",marginRight:4}}),e.jsx(r.Text,{style:{color:"#F44336",fontSize:20},children:a("checkConfigFailed")})]}),e.jsxs("div",{style:{paddingBottom:24,position:"relative"},children:[e.jsx(je,{style:{marginBottom:12},collapseHeight:150,isOpen:t,children:d.map((o,f)=>e.jsxs("div",{className:"check-result-item",children:[e.jsx(A,{color:o?.passed?"green":"red",style:{marginRight:8,flexShrink:0},children:o?.file}),e.jsx(r.Text,{style:{fontSize:14,color:o?.passed?"rgba(0, 0, 0, 0.65)":"red"},children:o?.msg}),o?.detail?.link?e.jsx("a",{href:o.detail.link,target:"_blank",rel:"noreferrer",style:{marginLeft:8,fontSize:12,color:"#1765ff"},children:o.detail.text||a("viewDoc")}):null]},f))}),t?e.jsx(r.Text,{style:{color:"grey",cursor:"pointer",fontSize:14,width:"100%",display:"block",alignItems:"center",justifyContent:"center",textAlign:"center"},onClick:()=>c(!1),children:a("closeCheckDetail")}):e.jsx(r.Text,{style:{color:"grey"},className:"show-more-text-btn",onClick:()=>c(!0),children:a("expandCheckDetail")})]})]})},We={project:a("gameProject"),main_package:a("gameMainPackage"),independent_package:a("independentPackage")},Xe=p=>{const{result:d}=p,h=d.every(t=>t?.passed);return e.jsxs("div",{className:"check-result-group",children:[h?e.jsxs("div",{className:"check-result-title",children:[e.jsx(U,{style:{color:"#4CAF50",marginRight:4,fontSize:20}}),e.jsx(r.Text,{style:{color:"#4CAF50",fontSize:20},children:a("checkPkgSizePassed")})]}):e.jsxs("div",{className:"check-result-title",children:[e.jsx(E,{style:{color:"#F44336",marginRight:4,fontSize:20}}),e.jsx(r.Text,{style:{color:"#F44336",fontSize:20},children:a("checkPkgSizeFailed")})]}),d.map((t,c)=>e.jsxs("div",{className:"check-result-item",children:[e.jsxs(A,{color:t?.passed?"green":"red",style:{marginRight:8},children:[We[t.dimension],t.dimension==="independent_package"?`: ${t.name}`:""]}),e.jsx(r.Text,{style:{fontSize:14,color:t?.passed?"rgba(0, 0, 0, 0.65)":"red"},children:t?.msg}),t?.detail?.link?e.jsx("a",{href:t.detail.link,target:"_blank",rel:"noreferrer",style:{marginLeft:8,fontSize:12,color:"#1765ff"},children:t.detail.text||a("viewDoc")}):null]},c))]})},Ye=p=>{const{result:d}=p;if(!Array.isArray(d)||d.length===0)return null;const h=d.every(o=>o?.passed),[t,c]=n.useState(!1);return e.jsxs("div",{className:"check-result-group",children:[h?e.jsxs("div",{className:"check-result-title",children:[e.jsx(U,{style:{color:"#4CAF50",marginRight:4,fontSize:20}}),e.jsx(r.Text,{style:{color:"#4CAF50",fontSize:20},children:a("checkApiSuccess")})]}):e.jsxs("div",{className:"check-result-title",children:[e.jsx(E,{style:{color:"#F44336",marginRight:4}}),e.jsx(r.Text,{style:{color:"#F44336",fontSize:20},children:a("checkApiFailed")})]}),e.jsxs("div",{style:{position:"relative"},children:[e.jsx(je,{style:{marginBottom:12},collapseHeight:150,isOpen:t,children:d.map((o,f)=>e.jsxs("div",{className:"check-result-item",children:[e.jsx(A,{color:o?.passed?"green":"red",style:{marginRight:8,flexShrink:0},children:o?.name}),e.jsxs(r.Text,{style:{fontSize:14,color:o?.passed?"rgba(0, 0, 0, 0.65)":"red"},children:[a(o?.name),o?.passed?a("integrated"):a("notIntegrated")]}),o?.detail?.link?e.jsx("a",{href:o.detail.link,target:"_blank",rel:"noreferrer",style:{marginLeft:8,fontSize:12,color:"#1765ff"},children:o.detail.text||a("viewDoc")}):null]},f))}),t?e.jsx(r.Text,{style:{color:"grey",cursor:"pointer",fontSize:14,width:"100%",display:"block",alignItems:"center",justifyContent:"center",textAlign:"center"},onClick:()=>c(!1),children:a("closeCheckDetail")}):e.jsx(r.Text,{style:{color:"grey"},className:"show-more-text-btn",onClick:()=>c(!0),children:a("expandCheckDetail")})]})]})},es=p=>{const{result:d}=p;if(!Array.isArray(d)||d.length===0)return null;const h=d.every(t=>t?.passed);return e.jsxs("div",{className:"check-result-group",children:[h?e.jsxs("div",{className:"check-result-title",children:[e.jsx(U,{style:{color:"#4CAF50",marginRight:4,fontSize:20}}),e.jsx(r.Text,{style:{color:"#4CAF50",fontSize:20},children:a("checkPerformancePassed")})]}):e.jsxs("div",{className:"check-result-title",children:[e.jsx(E,{style:{color:"#F44336",marginRight:4,fontSize:20}}),e.jsx(r.Text,{style:{color:"#F44336",fontSize:20},children:a("checkPerformanceFailed")})]}),d.map((t,c)=>e.jsxs("div",{className:"check-result-item",children:[e.jsx(A,{color:t?.passed?"green":"red",style:{marginRight:8,flexShrink:0},children:a("performanceCheck")}),e.jsx(r.Text,{style:{fontSize:14,color:t?.passed?"rgba(0, 0, 0, 0.65)":"red"},children:t?.msg}),t?.detail?.link?e.jsx("a",{href:t.detail.link,target:"_blank",rel:"noreferrer",style:{marginLeft:8,fontSize:12,color:"#1765ff"},children:t.detail.text||a("viewDoc")}):null]},c))]})},os=()=>{const p=Ee(),d=3e3,h=600*1e3,[t,c]=n.useState("idle"),[o,f]=n.useState(""),[fe,M]=n.useState(""),[T,B]=n.useState([]),[y,G]=n.useState(""),[ye,H]=n.useState({}),[Q,_]=n.useState(!1),[J,R]=n.useState(""),[ve,z]=n.useState(!1),[ke,Se]=n.useState(""),[b,Ne]=n.useState([]),[C,Z]=n.useState(!1),[S,W]=n.useState(!0),[v,we]=n.useState(!1),[X,Y]=n.useState(""),[ee,se]=n.useState(!1),[$,x]=n.useState(""),ae=n.useRef(null),{state:{engine:Te,user:re,gameDetail:le}}=Me(),k=Be(re),F=$e({errorCode:le?.has_error?le.error_code:void 0,user:re})==="noPermission",O=s=>new Promise(l=>setTimeout(l,s)),Ge=s=>s?String(s.status??s.cdn_deploy_status??s.live_status??"").toLowerCase():"",te=s=>s?String(s.status??s.cdn_deploy_status??s.live_status??""):"",D=s=>{if(Number(s?.cdn_deploy_status)===2)return"ready";const l=Ge(s);return l?["ready","success","succeeded","available"].includes(l)?"ready":l.includes("fail")||l.includes("error")||l.includes("reject")?"failed":"pending":"pending"},ie=s=>s==="preview"?4:s==="review"?3:s==="live"?2:1,be=s=>{if(!s)return[];const l=[...(s.preview_assets||[]).map(i=>({...i,source:"preview",state:D(i)})),...(s.in_review_assets||[]).map(i=>({...i,source:"review",state:D(i)})),...(s.live_assets||[]).map(i=>({...i,source:"live",state:D(i)})),...(s.assets||[]).map(i=>({...i,source:"other",state:D(i)}))].sort((i,m)=>{const j=Number(m.uploaded_at||0)-Number(i.uploaded_at||0);return j!==0?j:ie(m.source)-ie(i.source)}),u=new Map;return l.forEach(i=>{const m=String(i.asset_id||"");m&&!u.has(m)&&u.set(m,i)}),Array.from(u.values())},Ce=s=>s==="ready"?a("uploadGame.record.state.ready"):s==="failed"?a("uploadGame.record.state.failed"):a("uploadGame.record.state.pending"),De=s=>s==="preview"?a("uploadGame.record.source.preview"):s==="review"?a("uploadGame.record.source.review"):s==="live"?a("uploadGame.record.source.live"):a("uploadGame.record.source.other"),oe=s=>s?new Date(s*1e3).toLocaleString():a("uploadGame.record.metaUnknown"),Pe=s=>{if(!s)return a("uploadGame.record.metaUnknown");const l=s/1024/1024;return`${l>=10?l.toFixed(0):l.toFixed(1)} MB`},de=s=>{if(s.version)return`v${s.version}`;const l=String(s.asset_id||"");return l?`${l.slice(0,6)}...${l.slice(-4)}`:a("uploadGame.record.metaUnknown")},Ae=s=>`${de(s)} · ${Ce(s.state)} · ${oe(s.uploaded_at)}`,_e=s=>s?[s.preview_assets||[],s.in_review_assets||[],s.live_assets||[],s.assets||[]].flat().filter(Boolean):[],ne=async()=>{if(!k||F){B([]),G(""),R(""),_(!1);return}_(!0),R("");try{const s=await P({method:"POST",url:"/game/assets"});if(s?.code!==0||!s?.data)throw new Error(a("uploadGame.record.loadFailed"));const l=be(s.data);B(l);const u=(y&&l.some(i=>String(i.asset_id)===String(y))?y:"")||"";G(String(u||""))}catch(s){R(s instanceof Error?s.message:a("uploadGame.record.loadFailed"))}finally{_(!1)}},Re=async(s,l)=>{for(;Date.now()<l;){const u=await P({method:"POST",url:"/game/assets",data:{assetId:s,includePending:!0}}),m=_e(u?.data).find(j=>String(j.asset_id)===String(s))||null;if(m){const j=te(m);j&&M(j);const he=D(m);if(he==="ready")return{ok:!0,asset:m};if(he==="failed")return{ok:!1,asset:m}}await O(d)}return{ok:!1,asset:null}},ce=async(s,l)=>{for(;Date.now()<l;){const u=await P({method:"POST",url:"/game/asset/preview-url",data:{assetId:s}});if(u?.code===0&&u?.data?.preview_url)return u.data.preview_url;await O(d)}return""},ze=()=>{W(!0),Z(!1),P({url:"/game/check",method:"GET"}).then(s=>{Ne(s?.data||[])}).catch(()=>{Z(!0)}).finally(()=>{W(!1)})};n.useEffect(()=>{ze()},[]),n.useEffect(()=>{if(!k||F){B([]),G(""),R(""),_(!1);return}ne()},[k,F]);const ue=b.filter(s=>s?.type==="config"),pe=b.filter(s=>s?.type==="size"),me=b.filter(s=>s?.type==="api"),ge=b.filter(s=>s?.type==="performance"),K=b.some(s=>!s?.passed),Fe=[{key:"performance",title:a("uploadGame.group.performance"),items:ge},{key:"size",title:a("uploadGame.group.size"),items:pe},{key:"api",title:a("uploadGame.group.api"),items:me},{key:"config",title:a("uploadGame.group.config"),items:ue}].filter(s=>s.items.length>0).flatMap(s=>s.items.filter(l=>!l?.passed).map(l=>({groupTitle:s.title,message:l?.msg||a("uploadGame.unknownIssue"),link:l?.detail?.link,linkText:l?.detail?.text}))),Ie=s=>t==="uploading"?s===0?"current":"pending":t==="checkingAsset"?s===0?"done":s===1?"current":"pending":t==="resolvingPreview"?s<=1?"done":s===2?"current":"pending":"pending",Le=[a("uploadGame.progress.step1"),a("uploadGame.progress.step2"),a("uploadGame.progress.step3")],N=()=>{we(s=>!s)},g=T.find(s=>String(s.asset_id)===String(y))||null,I=y&&ye[String(y)]||"";n.useEffect(()=>{if(!g||g.state!=="ready"){z(!1);return}const s=String(g.asset_id);if(I){z(!1);return}let l=!1;return(async()=>{z(!0);const i=await ce(s,Date.now()+h);l||(i&&H(m=>({...m,[s]:i})),z(!1))})(),()=>{l=!0}},[g,I]);const Ue=()=>{if(!X.trim()){x(a("needDesc"));return}se(!0),c("uploading"),x(""),f(""),M(""),P({method:"POST",url:"/game/upload",headers:{"ttmg-game-desc":encodeURIComponent(X||"--")}}).then(async s=>{if(s?.code===0){await O(500),f(s?.data?.detail||"");const l=s?.data?.asset_id?String(s.data.asset_id):"",u=Date.now()+h;if(!l){c("failure"),x(a("uploadGame.failure.missingAssetId"));return}c("checkingAsset");const i=await Re(l,u);if(!i.ok){c("failure"),x(i.asset?a("uploadGame.failure.assetStatus",{status:te(i.asset)||"-"}):a("uploadGame.failure.assetTimeout"));return}c("resolvingPreview");const m=await ce(l,u);if(!m){c("failure"),x(a("uploadGame.failure.previewTimeout"));return}H(j=>({...j,[l]:m})),Se(l),G(""),Y(""),ae.current?.formApi?.reset?.(),await ne(),c("idle")}else c("idle"),x(s?.error?.StatusMessage||s?.detail||a("uploadPlatformFailed"))}).catch(s=>{c("idle"),x(s?.error?.StatusMessage||s?.response?.detail||s?.message||a("uploadPlatformFailed"))}).finally(()=>{se(!1)})};if(F){const s=["projectInfo.error.permission.stepCheckAccount","projectInfo.error.permission.stepApply","projectInfo.error.permission.stepRestart"];return e.jsx("div",{className:"upload-game-page",children:e.jsxs("section",{className:"upload-game-guard",children:[e.jsxs("div",{className:"upload-game-guard-banner",children:[e.jsx(r.Text,{strong:!0,children:a("projectInfo.error.permission.title")}),e.jsx(r.Text,{children:a("projectInfo.error.permission.desc")})]}),e.jsxs("div",{className:"upload-game-guard-card",children:[e.jsxs("div",{className:"upload-game-guard-head",children:[e.jsx(r.Text,{strong:!0,children:a("projectInfo.error.stepTitle")}),e.jsx(r.Text,{className:"upload-game-form-head-desc",children:a("projectInfo.error.helpPermissionDesc")})]}),e.jsx("div",{className:"upload-game-guard-steps",children:s.map((l,u)=>e.jsxs("div",{className:"upload-game-guard-step",children:[e.jsx("span",{className:"upload-game-guard-step-index",children:u+1}),e.jsx(r.Text,{children:a(l)})]},l))}),e.jsx("div",{className:"upload-game-guard-actions",children:e.jsx(w,{theme:"light",onClick:()=>p("/basic_debug_guide"),children:a("basicDebugGuide.entryAction")})})]})]})})}return e.jsxs("div",{className:"upload-game-page",children:[e.jsx("section",{className:"upload-game-guide-card",children:e.jsxs("div",{className:"upload-game-guide",children:[e.jsxs("div",{className:"upload-game-guide-copy",children:[e.jsx(r.Text,{strong:!0,children:a("uploadGame.guide.title")}),e.jsx(r.Paragraph,{className:"upload-game-guide-desc",children:a("uploadGame.guide.desc")})]}),e.jsx("div",{className:"upload-game-guide-steps",children:[{title:a("uploadGame.guide.precheck.title"),desc:a("uploadGame.guide.precheck.desc")},{title:a("uploadGame.guide.version.title"),desc:a("uploadGame.guide.version.desc")},{title:a("uploadGame.guide.preview.title"),desc:a("uploadGame.guide.preview.desc")}].map((s,l)=>e.jsxs("div",{className:"upload-game-guide-step",children:[e.jsx("span",{className:"upload-game-guide-step-index",children:l+1}),e.jsxs("div",{className:"upload-game-guide-step-copy",children:[e.jsx(r.Text,{strong:!0,children:s.title}),e.jsx(r.Text,{type:"tertiary",children:s.desc})]})]},s.title))})]})}),e.jsxs("section",{className:"upload-game-hero",children:[S?e.jsxs("div",{className:"upload-game-summary-panel upload-game-summary-panel-neutral",children:[e.jsxs("div",{className:"upload-game-summary-copy",children:[e.jsx(r.Text,{strong:!0,children:a("uploadGame.summary.checkingTitle")}),e.jsx(r.Text,{style:{color:"rgba(0, 0, 0, 0.45)"},children:a("uploadGame.summary.checkingDesc")})]}),e.jsx(L,{size:"small"})]}):null,!S&&C?e.jsxs("div",{className:"upload-game-summary-panel upload-game-summary-panel-warn",children:[e.jsxs("div",{className:"upload-game-summary-copy",children:[e.jsx(r.Text,{strong:!0,children:a("uploadGame.summary.failedTitle")}),e.jsx(r.Text,{style:{color:"rgba(0, 0, 0, 0.45)"},children:a("uploadGame.checkFetchFailed")})]}),e.jsxs("span",{className:"upload-game-summary-action",role:"button",tabIndex:0,onClick:N,onKeyDown:s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),N())},children:[e.jsx(q,{style:{transform:v?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"}}),e.jsx(r.Text,{children:a(v?"uploadGame.hideDetails":"uploadGame.showDetails")})]})]}):null,k?null:e.jsxs("div",{className:"upload-game-inline-notice",children:[e.jsx("div",{className:"upload-game-inline-notice-icon",children:e.jsx(Oe,{})}),e.jsxs("div",{className:"upload-game-inline-notice-copy",children:[e.jsx(r.Text,{strong:!0,children:a("uploadGame.loginNoticeTitle")}),e.jsx(r.Text,{children:a("loginToUpload")}),e.jsx("div",{className:"upload-game-inline-notice-action",children:e.jsx(w,{theme:"light",onClick:()=>p("/basic_debug_guide"),children:a("basicDebugGuide.entryAction")})})]})]}),!S&&!C&&K?e.jsxs("div",{className:"upload-game-summary-panel upload-game-summary-panel-warn",children:[e.jsxs("div",{className:"upload-game-summary-copy",children:[e.jsx(r.Text,{strong:!0,children:a("uploadGame.issueTitle")}),e.jsx(r.Text,{style:{color:"rgba(0, 0, 0, 0.45)"},children:a("uploadGame.issueDesc")})]}),e.jsxs("span",{className:"upload-game-summary-action",role:"button",tabIndex:0,onClick:N,onKeyDown:s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),N())},children:[e.jsx(q,{style:{transform:v?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"}}),e.jsx(r.Text,{children:a(v?"uploadGame.hideDetails":"uploadGame.showDetails")})]})]}):null,!S&&!C&&!K?e.jsxs("div",{className:"upload-game-summary-panel upload-game-summary-panel-ok",children:[e.jsxs("div",{className:"upload-game-summary-copy",children:[e.jsx(r.Text,{strong:!0,children:a("uploadGame.readyTitle")}),e.jsx(r.Text,{style:{color:"rgba(0, 0, 0, 0.45)"},children:a("uploadGame.readyDesc")})]}),e.jsxs("span",{className:"upload-game-summary-action",role:"button",tabIndex:0,onClick:N,onKeyDown:s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),N())},children:[e.jsx(q,{style:{transform:v?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"}}),e.jsx(r.Text,{children:a(v?"uploadGame.hideDetails":"uploadGame.showDetails")})]})]}):null,v?e.jsxs("div",{className:"upload-game-inline-detail",children:[e.jsx(r.Paragraph,{className:"upload-game-inline-detail-desc",children:a("uploadGame.detailDesc")}),e.jsx("div",{className:"upload-game-check-body",children:S?e.jsx("div",{className:"upload-game-loading",children:e.jsx(L,{})}):e.jsxs(e.Fragment,{children:[e.jsx(Je,{engine:Te}),e.jsx(es,{result:ge}),e.jsx(Xe,{result:pe}),e.jsx(Ye,{result:me}),e.jsx(Ze,{result:ue})]})})]}):null,C?e.jsx(V,{type:"warning",description:a("uploadGame.checkFetchFailed"),style:{marginTop:16}}):null,!S&&!C&&K?e.jsx("div",{className:"upload-game-issue-list",children:Fe.slice(0,4).map((s,l)=>e.jsxs("div",{className:"upload-game-issue-item",children:[e.jsx(A,{color:"red",children:s.groupTitle}),e.jsx(r.Text,{className:"upload-game-issue-text",children:s.message}),s.link?e.jsx("a",{href:s.link,target:"_blank",rel:"noreferrer",children:s.linkText||a("viewDoc")}):null]},`${s.groupTitle}-${l}`))}):null,e.jsxs("div",{className:"upload-game-form-wrapper upload-game-form-wrapper-main",children:[t==="idle"?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"upload-game-form-head",children:[e.jsx(r.Text,{strong:!0,children:a("gameAssetDescription")}),e.jsx(r.Text,{className:"upload-game-form-head-desc",children:a("uploadGame.uploadDescHint")})]}),e.jsx(xe,{ref:ae,onChange:({values:s})=>{Y(s?.gameDescription||""),x("")},children:e.jsx(xe.TextArea,{noLabel:!0,placeholder:a("gameAssetDescription"),field:"gameDescription",disabled:!k})}),$&&e.jsx(r.Text,{type:"danger",style:{display:"block",marginBottom:8},children:$}),e.jsx(w,{theme:"solid",type:"primary",disabled:!k||ee,loading:ee,onClick:Ue,style:{width:"100%",height:40},children:a("uploadToPlatform")})]}):null,t==="uploading"||t==="checkingAsset"||t==="resolvingPreview"?e.jsxs("div",{className:"upload-game-progress-card",children:[e.jsxs("div",{className:"upload-game-progress-head",children:[e.jsxs("div",{className:"upload-game-progress-badge",children:[e.jsx("span",{className:"upload-game-progress-badge-dot"}),e.jsx(r.Text,{children:t==="uploading"?a("uploadGame.progress.badgeUploading"):t==="checkingAsset"?a("uploadGame.progress.badgeChecking"):a("uploadGame.progress.badgePreview")})]}),e.jsx("div",{className:"upload-game-progress-bar"})]}),e.jsxs("div",{className:"upload-game-progress-copy",children:[e.jsx(r.Title,{heading:5,children:t==="uploading"?a("uploadGame.progress.title"):t==="checkingAsset"?a("uploadGame.progress.assetTitle"):a("uploadGame.progress.previewTitle")}),e.jsx(r.Paragraph,{className:"upload-game-form-head-desc",children:t==="uploading"?a("uploadGame.progress.desc"):t==="checkingAsset"?a("uploadGame.progress.assetDesc",{status:fe||a("uploadGame.progress.statusPending")}):a("uploadGame.progress.previewDesc")}),e.jsx("div",{className:"upload-game-progress-steps",children:Le.map((s,l)=>{const u=Ie(l);return e.jsxs("div",{className:`upload-game-progress-step upload-game-progress-step-${u}`,children:[e.jsx("span",{className:"upload-game-progress-step-dot",children:l+1}),e.jsx("span",{className:"upload-game-progress-step-label",children:s})]},s)})})]})]}):null,t==="failure"?e.jsxs("div",{className:"upload-game-failure-card",children:[e.jsx(r.Title,{heading:5,children:a("uploadGame.failure.title")}),e.jsx(r.Paragraph,{className:"upload-game-form-head-desc",children:$||a("uploadPlatformFailed")}),e.jsxs("div",{className:"upload-game-success-actions",children:[o?e.jsx(w,{theme:"light",onClick:()=>window.open(o,"_blank"),children:a("viewOnPlatform")}):null,e.jsx(w,{theme:"solid",type:"primary",onClick:()=>{c("idle"),x(""),f(""),M("")},children:a("uploadGame.failure.retry")})]})]}):null]}),k?e.jsxs("div",{className:"upload-game-records",children:[e.jsx("div",{className:"upload-game-records-head",children:e.jsxs("div",{className:"upload-game-records-copy",children:[e.jsx(r.Text,{children:a("uploadGame.record.title")}),e.jsx(r.Text,{className:"upload-game-form-head-desc",children:a("uploadGame.record.desc")})]})}),J?e.jsx(V,{type:"warning",description:J,style:{marginTop:12}}):null,Q&&!T.length?e.jsxs("div",{className:"upload-game-records-empty",children:[e.jsx(L,{size:"small"}),e.jsx(r.Text,{children:a("uploadGame.record.loading")})]}):null,!Q&&!T.length?e.jsx("div",{className:"upload-game-records-empty",children:e.jsx(r.Text,{children:a("uploadGame.record.empty")})}):null,T.length?e.jsxs("div",{className:"upload-game-records-layout",children:[e.jsx("div",{className:"upload-game-records-toolbar",children:e.jsx(Ke,{value:y,className:"upload-game-record-select",placeholder:a("uploadGame.record.selectPlaceholder"),allowClear:!0,optionList:T.slice(0,12).map(s=>({value:String(s.asset_id),label:Ae(s)})),onChange:s=>G(String(s||""))})}),g?e.jsxs("div",{className:"upload-game-record-detail",children:[e.jsx("div",{className:"upload-game-record-detail-head",children:e.jsx("div",{className:"upload-game-record-detail-copy",children:e.jsx(r.Text,{strong:!0,children:a("uploadGame.record.detailTitle",{version:de(g)})})})}),e.jsxs("div",{className:"upload-game-record-detail-body",children:[e.jsxs("div",{className:"upload-game-record-detail-main",children:[e.jsxs("div",{className:"upload-game-record-detail-meta",children:[e.jsxs("div",{className:"upload-game-record-detail-row",children:[e.jsx(r.Text,{type:"tertiary",children:a("uploadGame.record.metaUploadedAt")}),e.jsx(r.Text,{children:oe(g.uploaded_at)})]}),e.jsxs("div",{className:"upload-game-record-detail-row",children:[e.jsx(r.Text,{type:"tertiary",children:a("uploadGame.record.metaAssetId")}),e.jsx(r.Text,{children:g.asset_id||a("uploadGame.record.metaUnknown")})]}),e.jsxs("div",{className:"upload-game-record-detail-row",children:[e.jsx(r.Text,{type:"tertiary",children:a("uploadGame.record.metaSource")}),e.jsx(r.Text,{children:De(g.source)})]}),e.jsxs("div",{className:"upload-game-record-detail-row",children:[e.jsx(r.Text,{type:"tertiary",children:a("uploadGame.record.metaSize")}),e.jsx(r.Text,{children:Pe(g.size)})]})]}),e.jsxs("div",{className:"upload-game-record-detail-note",children:[e.jsx(r.Text,{type:"tertiary",children:a("gameAssetDescription")}),e.jsx(r.Paragraph,{children:g.desc||a("uploadGame.record.noDesc")})]})]}),e.jsx("div",{className:"upload-game-record-preview",children:g.state==="ready"?I?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"upload-game-record-qr-box",children:e.jsx(qe,{value:I,size:132})}),e.jsx(r.Text,{className:"upload-game-success-qr-caption",children:a("uploadGame.record.previewHint")})]}):e.jsx("div",{className:"upload-game-record-qr-box upload-game-record-qr-box-muted",children:ve?e.jsxs("div",{className:"upload-game-record-preview-loading",children:[e.jsx(L,{size:"small"}),e.jsx(r.Text,{children:a("uploadGame.record.previewLoading")})]}):e.jsx(r.Text,{type:"tertiary",children:a("uploadGame.record.previewUnavailable")})}):e.jsx("div",{className:"upload-game-record-qr-box upload-game-record-qr-box-muted",children:e.jsx(r.Text,{type:"tertiary",children:g.state==="failed"?a("uploadGame.record.failedDesc"):a("uploadGame.record.pendingDesc")})})})]}),String(g.asset_id)===String(ke)&&o?e.jsx("div",{className:"upload-game-success-actions",children:e.jsx(w,{theme:"light",onClick:()=>window.open(o,"_blank"),children:a("viewOnPlatform")})}):null]}):null]}):null]}):null]})]})};export{os as CheckCode};
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as a,j as e,T as l,i,S as R,a as S,u as C,B as z,b as M,c as L,d as F,e as B,g as O,f as A}from"./index-07cXGo3a.js";var G=Object.defineProperty,Z=Object.getOwnPropertySymbols,U=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable,w=(r,t,s)=>t in r?G(r,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):r[t]=s,V=(r,t)=>{for(var s in t||(t={}))U.call(t,s)&&w(r,s,t[s]);if(Z)for(var s of Z(t))W.call(t,s)&&w(r,s,t[s]);return r};function H(r){return a.createElement("svg",V({width:200,height:200,viewBox:"0 0 200 200",fill:"none",xmlns:"http://www.w3.org/2000/svg",focusable:!1,"aria-hidden":!0},r),a.createElement("rect",{width:200,height:200,fill:"transparent"}),a.createElement("path",{d:"M74.7 78.6c20.78-6.32 57.55-12.26 71.81-9.86 4.21.7 8.12 1.98 11.36 3.42-.51-1.69-.95-3.5-1.38-5.3l-.04-.18c-1.03-4.27-2.05-8.44-3.95-10.55-4.8-5.32.67-10.12.67-10.12l.93-10.53c13.02 4.82 21.65 14.92 27 25.08 4.57 8.67 6.75 17.37 7.25 22.89 1.06 12-8.18 18.86-19.2 18.86-9.74 0-18.36-1.64-24.81-3.1.64 2.18 5.44 19.18 7.53 32.66l-46.15.58-7.58-14.68-4.66-12.26c-19.46 7.46-50.77 19.02-64.9 18.44-10.35-.42-15.68-15.68-17.44-28.7a71.55 71.55 0 0 1-.67-9.4c0-5.64.3-12.18 2.22-17.89.74-2.21 1.73-4.3 3.04-6.17a18.1 18.1 0 0 1 4.6-4.59c0 4-1.02 13.54 2.8 14.12 5.06.78 10.4-9.08 13.85-7.06 3.87 2.27-1.65 16.34-1.33 17.2.27.7.53 1.4.76 2.07a48.99 48.99 0 0 1 2.25 8.55C46.59 87.56 60 83.06 74.69 78.6Z",fill:"white"}),a.createElement("path",{d:"M181.1 60.56c4.57 8.67 6.75 17.37 7.25 22.89 1.06 12-8.18 18.86-19.2 18.86-9.74 0-18.36-1.64-24.81-3.1m36.77-38.65c-5.36-10.16-13.99-20.26-27-25.08l-.94 10.53s-5.46 4.8-.67 10.12c1.9 2.11 2.92 6.28 3.95 10.55m24.66-6.12c-6-.37-18.32.8-24.66 6.12m0 0c1.57 6.53 3.15 13.3 7.91 13.3 7.2 0-3.6-8.84-17.85-11.24-14.25-2.4-51.03 3.54-71.82 9.86-20.78 6.32-39.04 12.71-42.77 19.1-3.63 6.23 13.24 10.92 4.49-14.17m0 0c-.23-.67-.49-1.36-.76-2.08-.32-.85 5.2-14.92 1.33-17.19-3.45-2.02-8.8 7.84-13.85 7.06-3.82-.58-2.8-10.12-2.8-14.12a18.1 18.1 0 0 0-4.6 4.6M36.4 83.52c-7.27 1.58-21.92 8.1-25.27 11.73m0 0a71.55 71.55 0 0 1-.67-9.41c0-5.64.3-12.18 2.22-17.89m-1.55 27.3c1.76 13 7.09 28.27 17.45 28.7 14.12.57 45.43-10.99 64.89-18.45l4.66 12.26 7.58 14.68 46.15-.58c-2.09-13.48-6.89-30.48-7.53-32.67M15.73 61.8c-.98 3-1.08 5.5.19 7.8m-.2-7.8a24.08 24.08 0 0 0-3.03 6.16m0 0a5.43 5.43 0 0 0 1.25 4.22m130.4 27.02c-.9-3.08-3.12-9.95-4.76-12.76",stroke:"#515151"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m156.89 15.66-2.04 27.96 2.57 28.1c-7.51-3.07-13.32-4.34-27.25-3.36-11.94.83-31.75 3.95-46.23 7.62-16.66 4.27-37.81 11.64-45.21 15.9-.77-4.64-2.92-10.15-2.92-10.15-.07-.7 2.63-8.32 2.73-13.06.08-3.08-.91-4.45-2.33-4.75a3.47 3.47 0 0 0-2.05.35c-.63.32-.86.48-1.38.84-1.34.98-2.38 2.02-3.95 3.34a17.14 17.14 0 0 1-3.04 2.17 4.6 4.6 0 0 1-2.89.63c-.63-.1-1.21-.47-1.71-1.58l-.07-.89c-.5-5.79-2.7-20.12-2.7-34.91 0-7.74 1.61-10.04 2.7-11.59l.13-.18c3.85-5.53 13.67-6.75 23.12-6.96 2.5-.14 5.2-.2 8.1-.17l.11.15H53.15l-.52.07 18.32 25.49-3.62 14.08 10.2 15.98-2.84-16.49 10-11.99-3.5-27.7s8.78-.5 19.47-1.77c10.69-1.28 18.47-1.9 29.42-1.83 1.64.01 3.4.1 5.23.22 9.64.65 18.55 2.56 21.46 4.4l.13.09h-.01Z",fill:"var(--semi-color-primary-light-default)"}),a.createElement("path",{d:"M143 27.91a1.38 1.38 0 0 1 1.77-.85c.5.18.98.41 1.44.71a1.38 1.38 0 0 1-1.53 2.31c-.26-.17-.53-.3-.82-.4a1.38 1.38 0 0 1-.85-1.77Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M140.65 28.12c.21.74-.21 1.5-.95 1.72-.36.1-.73.22-1.11.36a1.38 1.38 0 1 1-.95-2.6c.43-.16.87-.3 1.3-.43.74-.2 1.5.22 1.71.95Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M134.74 30.4c.37.67.14 1.51-.53 1.89l-1.07.62a1.38 1.38 0 1 1-1.41-2.38l1.12-.65a1.38 1.38 0 0 1 1.89.52Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M97.86 31.43h.76a1.38 1.38 0 1 1-.06 2.77h-.52a6.7 6.7 0 0 0-.57.1 1.38 1.38 0 0 1-.64-2.68c.33-.08.64-.14.94-.18l.09-.01Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M147.78 31.75c.73-.23 1.5.19 1.72.92.13.43.25.88.35 1.35a1.38 1.38 0 0 1-2.7.58c-.1-.4-.19-.78-.3-1.13-.22-.73.2-1.5.93-1.72Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M102.27 33.13c.19-.75.94-1.2 1.68-1.01.45.11.89.23 1.3.37a1.38 1.38 0 0 1-.84 2.63c-.36-.11-.73-.22-1.13-.32a1.38 1.38 0 0 1-1-1.67Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M129.3 33.68c.42.64.25 1.5-.4 1.92l-.52.34-.53.36a1.38 1.38 0 0 1-1.53-2.31l.32-.21.21-.14.3-.2.23-.15c.64-.42 1.5-.25 1.92.39Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M108.25 35.22c.36-.67 1.2-.92 1.88-.55a246.5 246.5 0 0 1 1.11.61 1.38 1.38 0 0 1-1.33 2.43l-.5-.28h-.01l-.6-.34a1.38 1.38 0 0 1-.55-1.87Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M92.83 35.77c.76-.01 1.4.6 1.4 1.36.01.16.03.34.07.55a1.38 1.38 0 1 1-2.7.58 5.62 5.62 0 0 1-.13-1.08c-.01-.76.6-1.4 1.36-1.4Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M124 37.2c.31.7 0 1.51-.7 1.82a6.07 6.07 0 0 1-1.44.45 1.38 1.38 0 1 1-.67-2.68l.58-.16c.1-.03.24-.07.42-.15.7-.3 1.51.02 1.82.72Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M113.9 38.14c.15-.75.89-1.22 1.63-1.06.35.07.72.13 1.1.16a1.38 1.38 0 0 1-.26 2.76c-.49-.05-.96-.12-1.41-.22a1.38 1.38 0 0 1-1.07-1.64Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M148.98 37.95c.76-.01 1.4.6 1.4 1.36a38.45 38.45 0 0 1 0 1.42 1.38 1.38 0 0 1-2.77-.08 24.28 24.28 0 0 0 0-1.3c0-.76.6-1.39 1.37-1.4Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M148.6 44.88c.75.16 1.22.9 1.06 1.65-.1.47-.22.94-.34 1.41a1.38 1.38 0 1 1-2.68-.7c.12-.43.22-.87.31-1.3.17-.75.9-1.22 1.65-1.06Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M146.69 51.6c.7.31 1 1.13.7 1.83-.2.44-.41.88-.63 1.31a1.38 1.38 0 0 1-2.48-1.24c.2-.4.4-.8.58-1.2.31-.7 1.13-1.01 1.83-.7Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M41.67 55.45c.07.77-.5 1.44-1.25 1.5-.43.04-.86.1-1.26.19a1.38 1.38 0 1 1-.54-2.72c.5-.1 1.02-.17 1.55-.22.76-.07 1.43.5 1.5 1.25Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M44.58 55.78c.22-.73 1-1.15 1.72-.93l.74.23a1.38 1.38 0 1 1-.9 2.62l-.62-.2a1.38 1.38 0 0 1-.94-1.72Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M91.9 56.9c.05.76-.52 1.42-1.29 1.47-.44.02-.89.06-1.32.11a1.38 1.38 0 0 1-.31-2.75c.48-.05.96-.1 1.45-.13.77-.05 1.42.53 1.47 1.3Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M94.72 56.95c.07-.76.74-1.33 1.5-1.26l1.43.14a1.38 1.38 0 0 1-.32 2.75c-.45-.05-.9-.1-1.35-.13a1.38 1.38 0 0 1-1.26-1.5Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M101.64 57.83c.16-.75.9-1.22 1.64-1.07l1.39.31a1.38 1.38 0 1 1-.62 2.7l-1.34-.3a1.38 1.38 0 0 1-1.07-1.64Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M34.85 57.26c.48.6.39 1.46-.2 1.94-.33.27-.63.55-.9.84a1.38 1.38 0 0 1-2.03-1.89c.36-.39.76-.75 1.18-1.1.6-.48 1.46-.39 1.95.2Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M85 57.9c.29.71-.06 1.51-.78 1.8a15.8 15.8 0 0 0-1.26.54 1.38 1.38 0 1 1-1.15-2.52 71.64 71.64 0 0 1 1.4-.6c.71-.28 1.52.07 1.8.78Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M143.4 57.76c.61.47.72 1.34.26 1.95-.3.39-.62.77-.94 1.14a1.38 1.38 0 0 1-2.09-1.81 24 24 0 0 0 .84-1.03c.47-.6 1.33-.71 1.94-.25Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M108.43 59.46c.22-.74.99-1.15 1.72-.93l1.35.41a1.38 1.38 0 1 1-.82 2.64l-1.32-.4a1.38 1.38 0 0 1-.93-1.72Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M115.08 61.58a1.38 1.38 0 0 1 1.77-.82l1.32.48a1.38 1.38 0 0 1-.97 2.6c-.43-.17-.87-.33-1.3-.48a1.38 1.38 0 0 1-.82-1.78Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M138.67 62.89c.42.64.25 1.5-.4 1.92-.41.27-.85.54-1.29.78a1.38 1.38 0 0 1-1.32-2.43c.37-.2.73-.43 1.1-.66.63-.42 1.49-.25 1.91.39Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M30.5 62.78c.77.07 1.33.74 1.26 1.5l-.03.59.01.75-1.6 1.4a1.38 1.38 0 0 1-1.16-1.32l-.02-.83c0-.28.02-.56.04-.84.07-.76.75-1.32 1.5-1.25Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M121.6 64.07c.3-.7 1.1-1.04 1.8-.75a146.8 146.8 0 0 1 1.26.52 1.38 1.38 0 1 1-.97 2.59 19.62 19.62 0 0 1-1.35-.55c-.7-.3-1.04-1.1-.74-1.81Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M72.11 64.94c.48.6.4 1.47-.2 1.95-.38.3-.74.62-1.09.92A1.38 1.38 0 1 1 69 65.73c.37-.33.76-.66 1.17-.99.59-.48 1.46-.39 1.94.2Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M132.4 65.92c.09.76-.46 1.44-1.22 1.53-.5.05-1.02.08-1.53.09a1.38 1.38 0 1 1-.02-2.77c.42 0 .84-.03 1.25-.07.76-.09 1.44.46 1.53 1.22Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M66.66 69.9c.57.52.6 1.4.09 1.96l-.73.8-.02.02-.16.18-.08.09a1.38 1.38 0 0 1-2.05-1.86l.25-.28.75-.82c.51-.56 1.39-.6 1.95-.09Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M61.6 75.28c.45.61.31 1.48-.3 1.93-.44.31-.88.61-1.36.89a1.38 1.38 0 1 1-1.4-2.4c.4-.22.77-.46 1.12-.72a1.38 1.38 0 0 1 1.94.3Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M37.67 75.97c.42.19.86.37 1.35.53a1.38 1.38 0 0 1-.89 2.62c-.56-.19-1.1-.4-1.6-.63l.72-2.63c.14.01.28.05.42.11Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M55.05 78.57c.12.75-.4 1.46-1.15 1.58-.5.08-1 .15-1.54.2a1.38 1.38 0 1 1-.28-2.75c.49-.05.95-.11 1.39-.18.75-.12 1.46.4 1.58 1.15Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M43.4 78.87c.06-.76.73-1.33 1.49-1.27a38.43 38.43 0 0 0 1.5.1 1.38 1.38 0 1 1-.12 2.76 62.94 62.94 0 0 1-1.6-.1 1.38 1.38 0 0 1-1.27-1.49Z",fill:"var(--semi-color-primary)"}),a.createElement("g",{clipPath:"url(#clip_failure_96_39_65)"},a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M30.9 46.87a13.45 13.45 0 0 1 9.37-16.53 13.46 13.46 0 0 1 16.52 9.39c2.64 9.56-4.76 29.27-5.14 29.9a.75.75 0 0 1-.99.27c-.64-.34-17.11-13.47-19.76-23.03Zm14.36 1.54a6.1 6.1 0 0 1-3.25-11.75 6.1 6.1 0 0 1 3.25 11.75Z",fill:"var(--semi-color-primary)"})),a.createElement("path",{d:"M102.31 100.69c-2.8 1.55-5.63 2.85-9.36 4.58l1.48 3.92c2.14-.96 6.16-6.03 7.88-8.5Z",fill:"#515151"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M121 63.04c8.85 2.1 12.43-6.5 13.12-8.77.68-2.27-5.6-11.86-8-11.2l-.42.12-.23.06c-3.1.82-11.15 2.94-12.35 8-1.3 5.46 2.4 10.49 7.88 11.79Z",fill:"#515151"}),a.createElement("path",{d:"M134.5 64.73c-.43.47-1.2.74-2.33.73a12.7 12.7 0 0 1-4.06-.86 31.25 31.25 0 0 1-9.94-6.22c-3.25-2.97-5.97-5.8-7.59-8.42-1.61-2.61-2.05-4.88-.98-6.84a3.7 3.7 0 0 1 2.11-1.86 4.53 4.53 0 0 1 2.9.15c2.16.76 4.57 2.83 6.48 6.02 3.4 5.63 6.89 8.23 9.7 10.33.49.35.95.7 1.38 1.03a7.29 7.29 0 0 1 2.61 3.48c.34 1.1.16 1.97-.28 2.46Z",fill:"white",stroke:"#515151"}),a.createElement("mask",{id:"mask_failure_130_526","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:98,y:44,width:36,height:27},a.createElement("path",{d:"M130.53 62.1c-.5-3.3-9.52-14.75-16.08-15.03l-12.68 4.52 6.47 14.16 17.25 3.07c1.84-1.14 5.43-4.07 5.04-6.72Z",fill:"#C4C4C4"})),a.createElement("g",{mask:"url(#mask_failure_130_526)"},a.createElement("path",{d:"M127.2 63.62a9.74 9.74 0 0 1-13.76.5 9.74 9.74 0 0 1-.32-13.77 9.74 9.74 0 0 1 13.77-.5 9.74 9.74 0 0 1 .32 13.77Z",fill:"white",stroke:"#515151"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m116.79 47.35-.02.37c2.86.5 8.57 2.59 8.58 6.87 0 5.36-7.44 9.34-14.47 3.46-.34-.28-.66-.53-.95-.74a10.09 10.09 0 0 0 3.17 7.17 10.24 10.24 0 0 0 14.47-.52 10.24 10.24 0 0 0-.34-14.47 10.16 10.16 0 0 0-10.44-2.14Z",fill:"#515151"}),a.createElement("path",{d:"M119.34 55a.79.79 0 1 0-1.1-1.12.79.79 0 0 0 1.1 1.12Z",fill:"#515151"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M119.98 50.72c.21-.09.45.01.54.22a7.87 7.87 0 0 0 1.84 2.65.41.41 0 1 1-.55.62 8.67 8.67 0 0 1-2.05-2.95.41.41 0 0 1 .22-.54Z",fill:"#515151"}),a.createElement("path",{d:"M114.85 52.4a.79.79 0 1 0-1.1-1.1.79.79 0 0 0 1.1 1.1Z",fill:"#515151"}),a.createElement("mask",{id:"path-18-inside-1",fill:"white"},a.createElement("ellipse",{rx:2.97818,ry:2.97818,transform:"matrix(0.727696 0.6859 -0.685903 0.727693 128.435 60.0508)"})),a.createElement("ellipse",{rx:2.97818,ry:2.97818,transform:"matrix(0.727696 0.6859 -0.685903 0.727693 128.435 60.0508)",fill:"white"}),a.createElement("path",{d:"m128.42 60.04.01-.01a.03.03 0 0 1 .02 0l-4.12 4.37a5.98 5.98 0 0 0 8.45-.25l-4.36-4.11Zm.03 0v.02l-4.37-4.11a5.98 5.98 0 0 0 .25 8.45l4.12-4.37Zm0 .03h-.01a.03.03 0 0 1-.02 0l4.12-4.37a5.98 5.98 0 0 0-8.46.25l4.37 4.12Zm-.03 0v-.03l4.37 4.11a5.98 5.98 0 0 0-.25-8.45l-4.12 4.37Z",fill:"#515151",mask:"url(#path-18-inside-1)"})),a.createElement("path",{d:"M145.63 40.19c1.37-2.75 12.75 2.35 16.14 6.78 3.38 4.43 1.48 10.74-1.9 9.68-6.69-2.12-7.56-6.7-7.94-9.48-1.2-1.85-7.67-4.24-6.3-6.98Z",fill:"white",stroke:"#515151"}),a.createElement("path",{d:"m158.95 41.56 6.64 2.52 1.66 12.47-8.3 1.98-3.47-12.03 3.47-4.94Z",fill:"white"}),a.createElement("path",{d:"M167.3 151.94c5.19 1.66 23.35 35.57 19.05 35.57-13.86 0-34.5.53-71.42.53-15.63 0-17.9-5.16-11.79-22.08a353.23 353.23 0 0 1 6.14-15.76l32.5 1.26c-.43 1.53-.91 3.07-1.38 4.4a26.82 26.82 0 0 1 8.73-1.47c5.27 0 7.04 1.4 11.77 0 2.13-.62 4.8-2.97 6.4-2.45Z",fill:"white",className:""}),a.createElement("path",{d:"M140.4 155.87c.47-1.34.95-2.88 1.38-4.4l-32.5-1.27a353.23 353.23 0 0 0-6.14 15.76c-6.1 16.92-3.84 22.08 11.79 22.08 36.93 0 57.56-.53 71.42-.53 4.3 0-13.86-33.91-19.06-35.57-1.6-.52-4.26 1.83-6.4 2.45-4.72 1.4-6.5 0-11.76 0-3.08 0-6.06.55-8.72 1.48Zm0 0a26.67 26.67 0 0 1-4.44 8.38c-1.7 2.22-3.99 4.43-5.43 4.33-1.44-.1-1.42-3.18 0-5.66 1.97-3.44 6.45-5.87 9.88-7.05Z",stroke:"#1C1F23",className:""}),a.createElement("path",{d:"M149.25 131.7s3.36 19.46-12.34 21.04c-11.53 1.15-40.77-4.55-53.76-7.79 4.72 12.82 9.61 39.86 7 42.16-3.33 2.93-47.55 1.76-55.96 0-8.42-1.75 13.82-11.46 15.45-14.66 2.99-5.84-5.48-21.18-5.75-45.45-.27-24.27 18.18-24.86 34.47-21.64 13.02 2.57 41.63 18.33 52.56 26.86l18.33-.52Z",fill:"white",stroke:"#515151"}),a.createElement("path",{d:"M141.5 153.87c-3.11 2.55-27.72 5-35.58 3.53l2.75-6.8c20.23 2.85 28.08 3.34 33.46 1.16l-.63 2.11Z",fill:"#515151",className:"__web-inspector-hide-shortcut__"}),a.createElement("path",{d:"M141.5 153.87c-3.11 2.55-27.72 5-35.58 3.53l2.75-6.8c20.23 2.85 28.08 3.34 33.46 1.16l-.63 2.11Z",fill:"#515151"}),a.createElement("path",{d:"M126.02 142.7c-3.1-2.99-4.99-7.5-4.16-12.35",stroke:"#515151"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M130.6 95.65c-9.03-10.98-18.97-19.74-25.5-24.56l1.63-2.22c6.7 4.95 16.81 13.86 26 25.02 9.18 11.16 17.54 24.67 20.59 38.83l-2.7.59c-2.91-13.56-10.97-26.67-20.02-37.66Z",fill:"#515151"}),a.createElement("path",{d:"m149.12 107.09-16.36 13.2 22.27 17.8 8.87-19.19c-.14-3.93-2.34-5.34-5.83-4.66l-3.12-2.5c.08-3.5-2.18-5.64-5.83-4.65Z",fill:"#E6E8EA"}),a.createElement("path",{d:"m148.24 128.62 9.45-14.34-2.91-2.33-10.94 13.07 4.4 3.6Z",stroke:"#515151"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M143.67 127.98a6.93 6.93 0 1 1-10.82-8.65 6.93 6.93 0 0 1 10.82 8.65Zm12.28 9.82a6.93 6.93 0 1 1-10.82-8.66 6.93 6.93 0 0 1 10.82 8.66Z",fill:"#515151"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m133.43 123.46 9.21-1.8.32 1.61-9.2 1.81-.33-1.62Z",fill:"white"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m145.5 133.11 9.21-1.8.32 1.62-9.2 1.8-.33-1.62Z",fill:"white"}),a.createElement("defs",null,a.createElement("clipPath",{id:"clip_failure_96_39_65"},a.createElement("rect",{width:44.4004,height:44.4627,transform:"matrix(0.963965 -0.266028 0.266198 0.963918 18.4214 34.6221)",fill:"white"}))))}var q=H;const K=({packages:r})=>e.jsx("div",{children:r.map(({name:t,size:s},c)=>{const n=(s/1024/1024).toFixed(2)+"MB",d=s<=4*1024*1024;return e.jsxs("div",{style:{display:"flex",alignItems:"center",padding:"2px 8px",borderRadius:6,backgroundColor:d?"#E8F5E9":"#FCE4EC",marginBottom:c===r.length-1?0:8,width:"fit-content"},children:[e.jsxs(l.Text,{style:{fontWeight:600,fontSize:14},children:[t,":"]}),e.jsx(l.Text,{style:{color:d?"#4CAF50":"#F44336",fontWeight:600},children:n}),e.jsx(l.Text,{type:"tertiary",style:{marginLeft:8},children:d?i("notExceedIndependentPkgSizeLimit",{limit:"4MB"}):i("exceedIndependentPkgSizeLimit",{limit:"4MB"})})]},t)})}),Y=({size:r,limit:t})=>{const s=(r/1024/1024).toFixed(2)+"MB",c=r<=t*1024*1024,n=c?i("notExceedSizeLimit",{limit:t+"MB"}):i("exceedSizeLimit",{limit:t+"MB"});return e.jsxs("div",{style:{display:"flex",alignItems:"center",width:"fit-content",padding:"2px 8px",borderRadius:6,backgroundColor:c?"#E8F5E9":"#FCE4EC"},children:[e.jsx(l.Text,{style:{fontWeight:600,color:c?"#4CAF50":"#F44336"},children:s}),e.jsx(l.Text,{type:"tertiary",style:{marginLeft:8},children:n})]})},X=({packages:r,limit:t})=>{const s=r.find(m=>m.type==="main")?.size,c=(s/1024/1024).toFixed(2)+"MB",n=s<=t*1024*1024,d=n?i("notExceedMainPkgSizeLimit",{limit:t+"MB"}):i("exceedMainPkgSizeLimit",{limit:t+"MB"});return e.jsxs("div",{style:{display:"flex",alignItems:"center",padding:"2px 8px",width:"fit-content",borderRadius:6,backgroundColor:n?"#E8F5E9":"#FCE4EC"},children:[e.jsx(l.Text,{style:{fontWeight:600,color:n?"#4CAF50":"#F44336"},children:c}),e.jsx(l.Text,{type:"tertiary",style:{marginLeft:8},children:d})]})},$=({domains:r=[]})=>r?.length?e.jsx(R,{className:"trusted-domain-list",style:{flexWrap:"wrap"},children:r.map(t=>e.jsx(S,{className:"trusted-domain-tag",children:t},t))}):e.jsx("div",{className:"project-detail-warning",children:e.jsx(l.Text,{className:"project-detail-warning-text",children:i("trustDomainEmptyTip")})}),J=({termsOfServiceLink:r})=>{const t=i("termsLabel");return r?e.jsxs("div",{className:"terms-privacy-item",children:[e.jsx(l.Text,{type:"tertiary",className:"terms-privacy-label",children:t}),e.jsx("a",{className:"terms-privacy-value",href:r,title:r,target:"_blank",rel:"noreferrer",children:r})]}):e.jsxs("div",{className:"terms-privacy-item",children:[e.jsx(l.Text,{type:"tertiary",className:"terms-privacy-label",children:t}),e.jsx("div",{className:"project-detail-warning",children:e.jsx(l.Text,{className:"project-detail-warning-text",children:i("termsOfServiceEmptyTip")})})]})},Q=({privacyPolicyLink:r})=>{const t=i("privacyLabel");return r?e.jsxs("div",{className:"terms-privacy-item",children:[e.jsx(l.Text,{type:"tertiary",className:"terms-privacy-label",children:t}),e.jsx("a",{className:"terms-privacy-value",href:r,title:r,target:"_blank",rel:"noreferrer",children:r})]}):e.jsxs("div",{className:"terms-privacy-item",children:[e.jsx(l.Text,{type:"tertiary",className:"terms-privacy-label",children:t}),e.jsx("div",{className:"project-detail-warning",children:e.jsx(l.Text,{className:"project-detail-warning-text",children:i("privacyPolicyEmptyTip")})})]})},ee=({logo:r,placeholder:t})=>{if(!r?.trim())return e.jsx("div",{className:"project-detail-warning",children:e.jsx(l.Text,{className:"project-detail-warning-text",children:i("gameIconEmptyTip")})});const[s,c]=a.useState(!1);return e.jsxs("div",{style:{width:100,height:100,borderRadius:4,overflow:"hidden",position:"relative",background:"#f0f0f0",display:"flex",alignItems:"center",justifyContent:"center"},children:[!s&&(t||e.jsx("div",{style:{width:"100%",height:"100%",background:"#e0e0e0",display:"flex",alignItems:"center",justifyContent:"center",color:"#aaa",fontSize:14}})),e.jsx("img",{src:r,alt:"logo",style:{width:"100%",height:"100%",borderRadius:4,objectFit:"cover",position:"absolute",top:0,left:0,opacity:s?1:0,transition:"opacity 0.3s"},onLoad:()=>c(!0)})]})},ae=({description:r})=>r?e.jsx(l.Text,{style:{fontSize:14},children:r}):e.jsx("div",{className:"project-detail-warning",children:e.jsx(l.Text,{className:"project-detail-warning-text",children:i("gameDescEmptyTip")})}),re="https://bytedance.larkoffice.com/wiki/PeIawT4M4ia9R8kYyLMcjwHknOg",te=({errorMsg:r,errorState:t="unknown"})=>{const s=C(),c=t==="notLoggedIn"||t==="loginExpired",n=t==="noPermission",d=c?"projectInfo.error.login.title":n?"projectInfo.error.permission.title":"projectInfo.error.general.title",m=c?"projectInfo.error.login.desc":n?"projectInfo.error.permission.desc":"projectInfo.error.general.desc",v=c?["projectInfo.error.login.stepLogin","projectInfo.error.login.stepRestart","projectInfo.error.login.stepProxy"]:n?["projectInfo.error.permission.stepCheckAccount","projectInfo.error.permission.stepApply","projectInfo.error.permission.stepRestart"]:["projectInfo.error.general.stepCheck","projectInfo.error.general.stepRetry"],g=()=>{window.open(re,"_blank","noopener,noreferrer")};return e.jsxs("div",{className:"error-display",children:[e.jsx(z,{className:"error-display-banner",type:"info",closeIcon:null,description:e.jsxs("div",{className:"error-display-banner-content",children:[e.jsx(l.Text,{strong:!0,children:i(d)}),e.jsx(l.Text,{children:i(m)})]})}),e.jsxs("div",{className:"error-display-panel",children:[e.jsxs("div",{className:"error-display-hero",children:[e.jsx("div",{className:"error-display-hero-illustration",children:e.jsx(q,{})}),e.jsxs("div",{className:"error-display-hero-copy",children:[e.jsx(l.Title,{heading:4,children:i("projectInfo.error.guideTitle")}),e.jsx(l.Paragraph,{className:"error-display-main-text",children:r})]})]}),e.jsxs("div",{className:"error-display-guide-grid",children:[e.jsxs("section",{className:"error-display-guide-card",children:[e.jsx(l.Text,{strong:!0,children:i("projectInfo.error.stepTitle")}),e.jsx("div",{className:"error-display-step-list",children:v.map((f,u)=>e.jsxs("div",{className:"error-display-step-item",children:[e.jsx("span",{className:"error-display-step-index",children:u+1}),e.jsx(l.Text,{children:i(f)})]},f))}),c?e.jsxs("div",{className:"error-display-command-list",children:[e.jsxs("div",{className:"error-display-command-item",children:[e.jsx(l.Text,{type:"tertiary",children:i("projectInfo.error.commandLogin")}),e.jsx("code",{children:"ttmg login"})]}),e.jsxs("div",{className:"error-display-command-item",children:[e.jsx(l.Text,{type:"tertiary",children:i("projectInfo.error.commandRestart")}),e.jsx("code",{children:"ttmg dev"})]}),e.jsxs("div",{className:"error-display-command-item",children:[e.jsx(l.Text,{type:"tertiary",children:i("projectInfo.error.commandProxy")}),e.jsx("code",{children:"ttmg config set proxy http://127.0.0.1:7890"}),e.jsx(l.Text,{type:"tertiary",className:"error-display-command-hint",children:i("projectInfo.error.commandProxyHint")})]})]}):null]}),e.jsxs("section",{className:"error-display-guide-card",children:[e.jsx(l.Text,{strong:!0,children:i("projectInfo.error.helpTitle")}),e.jsx(l.Paragraph,{className:"error-display-help-text",children:c?i("projectInfo.error.helpLoginDesc"):n?i("projectInfo.error.helpPermissionDesc"):i("projectInfo.error.helpGeneralDesc")}),c?e.jsxs("div",{className:"error-display-actions",children:[e.jsx(M,{theme:"light",onClick:()=>s("/basic_debug_guide"),children:i("basicDebugGuide.entryAction")}),e.jsx(M,{theme:"solid",type:"primary",onClick:g,children:i("projectInfo.error.openProxyDoc")})]}):null]})]})]})]})},E=({label:r,children:t,wide:s=!1})=>e.jsxs("div",{className:`game-detail-field ${s?"game-detail-field-wide":""}`,children:[e.jsx(l.Text,{type:"tertiary",className:"game-detail-field-label",children:r}),e.jsx("div",{className:"game-detail-field-value",children:t})]}),ie=()=>{const{state:{gameDetail:r,user:t,packages:s,engine:c},setGameDetail:n}=L(),[d,m]=a.useState(!0),[v,g]=a.useState(!1),[f,u]=a.useState(""),[T,b]=a.useState("unknown"),N=({errorCode:p,errorMsg:h,clientKey:j})=>{m(!1),g(!0),b(O({errorCode:p,user:t})),u(A({errorCode:p,errorMsg:h,clientKey:j,user:t}))};a.useEffect(()=>{if(r&&!r.has_error){m(!1);return}r?.has_error&&(g(!0),N({errorCode:r.error_code,errorMsg:r.error_msg,clientKey:r.client_key})),F({url:"/game/detail",method:"GET"}).then(p=>{if(p?.error)m(!1),N(p.error);else{const{data:h}=p;n(h),m(!1)}})},[]);const o=a.useMemo(()=>{if(!r||r?.has_error)return null;const{size:p,request_allowed_domains:h}=r,j=c==="unity",y=s?.length>0?s:r.packages??[],k=y.reduce((x,D)=>x+(D?.size??0),0)||p,_=j?60:30,I=y.filter(x=>x.type==="independent"),P=y.some(x=>x.type==="main");return{isUnity:j,packageList:y,projectSize:k,projectSizeLimit:_,independentPackages:I,hasMainPackage:P,domains:h}},[c,r,s]);return d&&!r?e.jsx("div",{className:"game-detail-loading-container",children:e.jsx(B,{size:"large"})}):v?e.jsx(te,{errorMsg:f,errorState:T}):!r||!o?null:e.jsx("div",{className:"game-detail-container",children:e.jsxs("div",{className:"game-detail-page",children:[e.jsxs("section",{className:"game-detail-intro",children:[e.jsx(l.Paragraph,{className:"game-detail-page-desc",children:i("projectInfoDesc")}),e.jsx(l.Paragraph,{className:"game-detail-page-desc",children:i("projectInfoDescTip")})]}),e.jsxs("section",{className:"game-detail-panel",children:[e.jsx("div",{className:"game-detail-panel-head",children:e.jsx(l.Text,{strong:!0,children:i("projectInfo.section.basic")})}),e.jsxs("div",{className:"game-detail-basic-hero",children:[e.jsx("div",{className:"game-detail-logo-shell game-detail-logo-shell-basic",children:e.jsx(ee,{logo:r.display_icon_url||""})}),e.jsx("div",{className:"game-detail-basic-main",children:e.jsxs("div",{className:"game-detail-basic-meta",children:[e.jsxs("div",{className:"game-detail-basic-row",children:[e.jsx(l.Text,{type:"tertiary",className:"game-detail-basic-meta-label",children:i("gameName")}),e.jsx("div",{className:"game-detail-basic-meta-value",children:r.name?.trim()?e.jsx(l.Text,{strong:!0,className:"game-detail-basic-name",children:r.name}):e.jsx("div",{className:"project-detail-warning",children:e.jsx(l.Text,{className:"project-detail-warning-text",children:i("gameNameEmptyTip")})})})]}),e.jsxs("div",{className:"game-detail-basic-row",children:[e.jsx(l.Text,{type:"tertiary",className:"game-detail-basic-meta-label",children:i("gameID")}),e.jsx(l.Text,{className:"game-detail-basic-meta-value game-detail-basic-meta-value-code",children:r.client_key||"-"})]}),e.jsxs("div",{className:"game-detail-basic-row",children:[e.jsx(l.Text,{type:"tertiary",className:"game-detail-basic-meta-label",children:i("gameDesc")}),e.jsx("div",{className:"game-detail-basic-meta-value",children:e.jsx(ae,{description:r.description})})]})]})})]})]}),e.jsxs("div",{className:"game-detail-section-grid",children:[e.jsxs("section",{className:"game-detail-panel",children:[e.jsx("div",{className:"game-detail-panel-head",children:e.jsx(l.Text,{strong:!0,children:i("projectInfo.section.package")})}),e.jsxs("div",{className:"game-detail-fields-grid",children:[e.jsx(E,{label:i("gameSize"),children:e.jsx(Y,{size:o.projectSize,limit:o.projectSizeLimit})}),!o.isUnity&&o.hasMainPackage?e.jsx(E,{label:i("gameMainPackageSize"),children:e.jsx(X,{packages:o.packageList,limit:4})}):null,!o.isUnity&&o.independentPackages.length>0?e.jsx(E,{label:i("gameIndependentPackageSize"),wide:!0,children:e.jsx(K,{packages:o.independentPackages})}):null]})]}),e.jsxs("section",{className:"game-detail-panel",children:[e.jsx("div",{className:"game-detail-panel-head",children:e.jsx(l.Text,{strong:!0,children:i("projectInfo.section.platform")})}),e.jsxs("div",{className:"game-detail-platform-stack",children:[e.jsxs("div",{className:"game-detail-platform-card",children:[e.jsx("div",{className:"game-detail-platform-card-head",children:e.jsx(l.Text,{strong:!0,children:i("gameTrustDomains")})}),e.jsx($,{domains:o.domains})]}),e.jsxs("div",{className:"game-detail-platform-card",children:[e.jsx("div",{className:"game-detail-platform-card-head",children:e.jsx(l.Text,{strong:!0,children:i("gameTermsAndPrivacy")})}),e.jsxs("div",{className:"game-detail-terms-stack",children:[e.jsx(J,{termsOfServiceLink:r.terms_of_service_link}),e.jsx(Q,{privacyPolicyLink:r.privacy_policy_link})]})]})]})]})]})]})})};export{ie as ProjectDetail};
|
|
1
|
+
import{r as a,j as e,T as l,i,S as R,a as S,u as C,B as z,b as M,c as L,d as F,e as B,g as O,f as A}from"./index-Dau-IOT4.js";var G=Object.defineProperty,Z=Object.getOwnPropertySymbols,U=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable,w=(r,t,s)=>t in r?G(r,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):r[t]=s,V=(r,t)=>{for(var s in t||(t={}))U.call(t,s)&&w(r,s,t[s]);if(Z)for(var s of Z(t))W.call(t,s)&&w(r,s,t[s]);return r};function H(r){return a.createElement("svg",V({width:200,height:200,viewBox:"0 0 200 200",fill:"none",xmlns:"http://www.w3.org/2000/svg",focusable:!1,"aria-hidden":!0},r),a.createElement("rect",{width:200,height:200,fill:"transparent"}),a.createElement("path",{d:"M74.7 78.6c20.78-6.32 57.55-12.26 71.81-9.86 4.21.7 8.12 1.98 11.36 3.42-.51-1.69-.95-3.5-1.38-5.3l-.04-.18c-1.03-4.27-2.05-8.44-3.95-10.55-4.8-5.32.67-10.12.67-10.12l.93-10.53c13.02 4.82 21.65 14.92 27 25.08 4.57 8.67 6.75 17.37 7.25 22.89 1.06 12-8.18 18.86-19.2 18.86-9.74 0-18.36-1.64-24.81-3.1.64 2.18 5.44 19.18 7.53 32.66l-46.15.58-7.58-14.68-4.66-12.26c-19.46 7.46-50.77 19.02-64.9 18.44-10.35-.42-15.68-15.68-17.44-28.7a71.55 71.55 0 0 1-.67-9.4c0-5.64.3-12.18 2.22-17.89.74-2.21 1.73-4.3 3.04-6.17a18.1 18.1 0 0 1 4.6-4.59c0 4-1.02 13.54 2.8 14.12 5.06.78 10.4-9.08 13.85-7.06 3.87 2.27-1.65 16.34-1.33 17.2.27.7.53 1.4.76 2.07a48.99 48.99 0 0 1 2.25 8.55C46.59 87.56 60 83.06 74.69 78.6Z",fill:"white"}),a.createElement("path",{d:"M181.1 60.56c4.57 8.67 6.75 17.37 7.25 22.89 1.06 12-8.18 18.86-19.2 18.86-9.74 0-18.36-1.64-24.81-3.1m36.77-38.65c-5.36-10.16-13.99-20.26-27-25.08l-.94 10.53s-5.46 4.8-.67 10.12c1.9 2.11 2.92 6.28 3.95 10.55m24.66-6.12c-6-.37-18.32.8-24.66 6.12m0 0c1.57 6.53 3.15 13.3 7.91 13.3 7.2 0-3.6-8.84-17.85-11.24-14.25-2.4-51.03 3.54-71.82 9.86-20.78 6.32-39.04 12.71-42.77 19.1-3.63 6.23 13.24 10.92 4.49-14.17m0 0c-.23-.67-.49-1.36-.76-2.08-.32-.85 5.2-14.92 1.33-17.19-3.45-2.02-8.8 7.84-13.85 7.06-3.82-.58-2.8-10.12-2.8-14.12a18.1 18.1 0 0 0-4.6 4.6M36.4 83.52c-7.27 1.58-21.92 8.1-25.27 11.73m0 0a71.55 71.55 0 0 1-.67-9.41c0-5.64.3-12.18 2.22-17.89m-1.55 27.3c1.76 13 7.09 28.27 17.45 28.7 14.12.57 45.43-10.99 64.89-18.45l4.66 12.26 7.58 14.68 46.15-.58c-2.09-13.48-6.89-30.48-7.53-32.67M15.73 61.8c-.98 3-1.08 5.5.19 7.8m-.2-7.8a24.08 24.08 0 0 0-3.03 6.16m0 0a5.43 5.43 0 0 0 1.25 4.22m130.4 27.02c-.9-3.08-3.12-9.95-4.76-12.76",stroke:"#515151"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m156.89 15.66-2.04 27.96 2.57 28.1c-7.51-3.07-13.32-4.34-27.25-3.36-11.94.83-31.75 3.95-46.23 7.62-16.66 4.27-37.81 11.64-45.21 15.9-.77-4.64-2.92-10.15-2.92-10.15-.07-.7 2.63-8.32 2.73-13.06.08-3.08-.91-4.45-2.33-4.75a3.47 3.47 0 0 0-2.05.35c-.63.32-.86.48-1.38.84-1.34.98-2.38 2.02-3.95 3.34a17.14 17.14 0 0 1-3.04 2.17 4.6 4.6 0 0 1-2.89.63c-.63-.1-1.21-.47-1.71-1.58l-.07-.89c-.5-5.79-2.7-20.12-2.7-34.91 0-7.74 1.61-10.04 2.7-11.59l.13-.18c3.85-5.53 13.67-6.75 23.12-6.96 2.5-.14 5.2-.2 8.1-.17l.11.15H53.15l-.52.07 18.32 25.49-3.62 14.08 10.2 15.98-2.84-16.49 10-11.99-3.5-27.7s8.78-.5 19.47-1.77c10.69-1.28 18.47-1.9 29.42-1.83 1.64.01 3.4.1 5.23.22 9.64.65 18.55 2.56 21.46 4.4l.13.09h-.01Z",fill:"var(--semi-color-primary-light-default)"}),a.createElement("path",{d:"M143 27.91a1.38 1.38 0 0 1 1.77-.85c.5.18.98.41 1.44.71a1.38 1.38 0 0 1-1.53 2.31c-.26-.17-.53-.3-.82-.4a1.38 1.38 0 0 1-.85-1.77Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M140.65 28.12c.21.74-.21 1.5-.95 1.72-.36.1-.73.22-1.11.36a1.38 1.38 0 1 1-.95-2.6c.43-.16.87-.3 1.3-.43.74-.2 1.5.22 1.71.95Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M134.74 30.4c.37.67.14 1.51-.53 1.89l-1.07.62a1.38 1.38 0 1 1-1.41-2.38l1.12-.65a1.38 1.38 0 0 1 1.89.52Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M97.86 31.43h.76a1.38 1.38 0 1 1-.06 2.77h-.52a6.7 6.7 0 0 0-.57.1 1.38 1.38 0 0 1-.64-2.68c.33-.08.64-.14.94-.18l.09-.01Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M147.78 31.75c.73-.23 1.5.19 1.72.92.13.43.25.88.35 1.35a1.38 1.38 0 0 1-2.7.58c-.1-.4-.19-.78-.3-1.13-.22-.73.2-1.5.93-1.72Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M102.27 33.13c.19-.75.94-1.2 1.68-1.01.45.11.89.23 1.3.37a1.38 1.38 0 0 1-.84 2.63c-.36-.11-.73-.22-1.13-.32a1.38 1.38 0 0 1-1-1.67Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M129.3 33.68c.42.64.25 1.5-.4 1.92l-.52.34-.53.36a1.38 1.38 0 0 1-1.53-2.31l.32-.21.21-.14.3-.2.23-.15c.64-.42 1.5-.25 1.92.39Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M108.25 35.22c.36-.67 1.2-.92 1.88-.55a246.5 246.5 0 0 1 1.11.61 1.38 1.38 0 0 1-1.33 2.43l-.5-.28h-.01l-.6-.34a1.38 1.38 0 0 1-.55-1.87Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M92.83 35.77c.76-.01 1.4.6 1.4 1.36.01.16.03.34.07.55a1.38 1.38 0 1 1-2.7.58 5.62 5.62 0 0 1-.13-1.08c-.01-.76.6-1.4 1.36-1.4Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M124 37.2c.31.7 0 1.51-.7 1.82a6.07 6.07 0 0 1-1.44.45 1.38 1.38 0 1 1-.67-2.68l.58-.16c.1-.03.24-.07.42-.15.7-.3 1.51.02 1.82.72Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M113.9 38.14c.15-.75.89-1.22 1.63-1.06.35.07.72.13 1.1.16a1.38 1.38 0 0 1-.26 2.76c-.49-.05-.96-.12-1.41-.22a1.38 1.38 0 0 1-1.07-1.64Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M148.98 37.95c.76-.01 1.4.6 1.4 1.36a38.45 38.45 0 0 1 0 1.42 1.38 1.38 0 0 1-2.77-.08 24.28 24.28 0 0 0 0-1.3c0-.76.6-1.39 1.37-1.4Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M148.6 44.88c.75.16 1.22.9 1.06 1.65-.1.47-.22.94-.34 1.41a1.38 1.38 0 1 1-2.68-.7c.12-.43.22-.87.31-1.3.17-.75.9-1.22 1.65-1.06Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M146.69 51.6c.7.31 1 1.13.7 1.83-.2.44-.41.88-.63 1.31a1.38 1.38 0 0 1-2.48-1.24c.2-.4.4-.8.58-1.2.31-.7 1.13-1.01 1.83-.7Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M41.67 55.45c.07.77-.5 1.44-1.25 1.5-.43.04-.86.1-1.26.19a1.38 1.38 0 1 1-.54-2.72c.5-.1 1.02-.17 1.55-.22.76-.07 1.43.5 1.5 1.25Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M44.58 55.78c.22-.73 1-1.15 1.72-.93l.74.23a1.38 1.38 0 1 1-.9 2.62l-.62-.2a1.38 1.38 0 0 1-.94-1.72Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M91.9 56.9c.05.76-.52 1.42-1.29 1.47-.44.02-.89.06-1.32.11a1.38 1.38 0 0 1-.31-2.75c.48-.05.96-.1 1.45-.13.77-.05 1.42.53 1.47 1.3Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M94.72 56.95c.07-.76.74-1.33 1.5-1.26l1.43.14a1.38 1.38 0 0 1-.32 2.75c-.45-.05-.9-.1-1.35-.13a1.38 1.38 0 0 1-1.26-1.5Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M101.64 57.83c.16-.75.9-1.22 1.64-1.07l1.39.31a1.38 1.38 0 1 1-.62 2.7l-1.34-.3a1.38 1.38 0 0 1-1.07-1.64Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M34.85 57.26c.48.6.39 1.46-.2 1.94-.33.27-.63.55-.9.84a1.38 1.38 0 0 1-2.03-1.89c.36-.39.76-.75 1.18-1.1.6-.48 1.46-.39 1.95.2Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M85 57.9c.29.71-.06 1.51-.78 1.8a15.8 15.8 0 0 0-1.26.54 1.38 1.38 0 1 1-1.15-2.52 71.64 71.64 0 0 1 1.4-.6c.71-.28 1.52.07 1.8.78Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M143.4 57.76c.61.47.72 1.34.26 1.95-.3.39-.62.77-.94 1.14a1.38 1.38 0 0 1-2.09-1.81 24 24 0 0 0 .84-1.03c.47-.6 1.33-.71 1.94-.25Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M108.43 59.46c.22-.74.99-1.15 1.72-.93l1.35.41a1.38 1.38 0 1 1-.82 2.64l-1.32-.4a1.38 1.38 0 0 1-.93-1.72Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M115.08 61.58a1.38 1.38 0 0 1 1.77-.82l1.32.48a1.38 1.38 0 0 1-.97 2.6c-.43-.17-.87-.33-1.3-.48a1.38 1.38 0 0 1-.82-1.78Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M138.67 62.89c.42.64.25 1.5-.4 1.92-.41.27-.85.54-1.29.78a1.38 1.38 0 0 1-1.32-2.43c.37-.2.73-.43 1.1-.66.63-.42 1.49-.25 1.91.39Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M30.5 62.78c.77.07 1.33.74 1.26 1.5l-.03.59.01.75-1.6 1.4a1.38 1.38 0 0 1-1.16-1.32l-.02-.83c0-.28.02-.56.04-.84.07-.76.75-1.32 1.5-1.25Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M121.6 64.07c.3-.7 1.1-1.04 1.8-.75a146.8 146.8 0 0 1 1.26.52 1.38 1.38 0 1 1-.97 2.59 19.62 19.62 0 0 1-1.35-.55c-.7-.3-1.04-1.1-.74-1.81Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M72.11 64.94c.48.6.4 1.47-.2 1.95-.38.3-.74.62-1.09.92A1.38 1.38 0 1 1 69 65.73c.37-.33.76-.66 1.17-.99.59-.48 1.46-.39 1.94.2Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M132.4 65.92c.09.76-.46 1.44-1.22 1.53-.5.05-1.02.08-1.53.09a1.38 1.38 0 1 1-.02-2.77c.42 0 .84-.03 1.25-.07.76-.09 1.44.46 1.53 1.22Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M66.66 69.9c.57.52.6 1.4.09 1.96l-.73.8-.02.02-.16.18-.08.09a1.38 1.38 0 0 1-2.05-1.86l.25-.28.75-.82c.51-.56 1.39-.6 1.95-.09Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M61.6 75.28c.45.61.31 1.48-.3 1.93-.44.31-.88.61-1.36.89a1.38 1.38 0 1 1-1.4-2.4c.4-.22.77-.46 1.12-.72a1.38 1.38 0 0 1 1.94.3Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M37.67 75.97c.42.19.86.37 1.35.53a1.38 1.38 0 0 1-.89 2.62c-.56-.19-1.1-.4-1.6-.63l.72-2.63c.14.01.28.05.42.11Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M55.05 78.57c.12.75-.4 1.46-1.15 1.58-.5.08-1 .15-1.54.2a1.38 1.38 0 1 1-.28-2.75c.49-.05.95-.11 1.39-.18.75-.12 1.46.4 1.58 1.15Z",fill:"var(--semi-color-primary)"}),a.createElement("path",{d:"M43.4 78.87c.06-.76.73-1.33 1.49-1.27a38.43 38.43 0 0 0 1.5.1 1.38 1.38 0 1 1-.12 2.76 62.94 62.94 0 0 1-1.6-.1 1.38 1.38 0 0 1-1.27-1.49Z",fill:"var(--semi-color-primary)"}),a.createElement("g",{clipPath:"url(#clip_failure_96_39_65)"},a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M30.9 46.87a13.45 13.45 0 0 1 9.37-16.53 13.46 13.46 0 0 1 16.52 9.39c2.64 9.56-4.76 29.27-5.14 29.9a.75.75 0 0 1-.99.27c-.64-.34-17.11-13.47-19.76-23.03Zm14.36 1.54a6.1 6.1 0 0 1-3.25-11.75 6.1 6.1 0 0 1 3.25 11.75Z",fill:"var(--semi-color-primary)"})),a.createElement("path",{d:"M102.31 100.69c-2.8 1.55-5.63 2.85-9.36 4.58l1.48 3.92c2.14-.96 6.16-6.03 7.88-8.5Z",fill:"#515151"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M121 63.04c8.85 2.1 12.43-6.5 13.12-8.77.68-2.27-5.6-11.86-8-11.2l-.42.12-.23.06c-3.1.82-11.15 2.94-12.35 8-1.3 5.46 2.4 10.49 7.88 11.79Z",fill:"#515151"}),a.createElement("path",{d:"M134.5 64.73c-.43.47-1.2.74-2.33.73a12.7 12.7 0 0 1-4.06-.86 31.25 31.25 0 0 1-9.94-6.22c-3.25-2.97-5.97-5.8-7.59-8.42-1.61-2.61-2.05-4.88-.98-6.84a3.7 3.7 0 0 1 2.11-1.86 4.53 4.53 0 0 1 2.9.15c2.16.76 4.57 2.83 6.48 6.02 3.4 5.63 6.89 8.23 9.7 10.33.49.35.95.7 1.38 1.03a7.29 7.29 0 0 1 2.61 3.48c.34 1.1.16 1.97-.28 2.46Z",fill:"white",stroke:"#515151"}),a.createElement("mask",{id:"mask_failure_130_526","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:98,y:44,width:36,height:27},a.createElement("path",{d:"M130.53 62.1c-.5-3.3-9.52-14.75-16.08-15.03l-12.68 4.52 6.47 14.16 17.25 3.07c1.84-1.14 5.43-4.07 5.04-6.72Z",fill:"#C4C4C4"})),a.createElement("g",{mask:"url(#mask_failure_130_526)"},a.createElement("path",{d:"M127.2 63.62a9.74 9.74 0 0 1-13.76.5 9.74 9.74 0 0 1-.32-13.77 9.74 9.74 0 0 1 13.77-.5 9.74 9.74 0 0 1 .32 13.77Z",fill:"white",stroke:"#515151"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m116.79 47.35-.02.37c2.86.5 8.57 2.59 8.58 6.87 0 5.36-7.44 9.34-14.47 3.46-.34-.28-.66-.53-.95-.74a10.09 10.09 0 0 0 3.17 7.17 10.24 10.24 0 0 0 14.47-.52 10.24 10.24 0 0 0-.34-14.47 10.16 10.16 0 0 0-10.44-2.14Z",fill:"#515151"}),a.createElement("path",{d:"M119.34 55a.79.79 0 1 0-1.1-1.12.79.79 0 0 0 1.1 1.12Z",fill:"#515151"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M119.98 50.72c.21-.09.45.01.54.22a7.87 7.87 0 0 0 1.84 2.65.41.41 0 1 1-.55.62 8.67 8.67 0 0 1-2.05-2.95.41.41 0 0 1 .22-.54Z",fill:"#515151"}),a.createElement("path",{d:"M114.85 52.4a.79.79 0 1 0-1.1-1.1.79.79 0 0 0 1.1 1.1Z",fill:"#515151"}),a.createElement("mask",{id:"path-18-inside-1",fill:"white"},a.createElement("ellipse",{rx:2.97818,ry:2.97818,transform:"matrix(0.727696 0.6859 -0.685903 0.727693 128.435 60.0508)"})),a.createElement("ellipse",{rx:2.97818,ry:2.97818,transform:"matrix(0.727696 0.6859 -0.685903 0.727693 128.435 60.0508)",fill:"white"}),a.createElement("path",{d:"m128.42 60.04.01-.01a.03.03 0 0 1 .02 0l-4.12 4.37a5.98 5.98 0 0 0 8.45-.25l-4.36-4.11Zm.03 0v.02l-4.37-4.11a5.98 5.98 0 0 0 .25 8.45l4.12-4.37Zm0 .03h-.01a.03.03 0 0 1-.02 0l4.12-4.37a5.98 5.98 0 0 0-8.46.25l4.37 4.12Zm-.03 0v-.03l4.37 4.11a5.98 5.98 0 0 0-.25-8.45l-4.12 4.37Z",fill:"#515151",mask:"url(#path-18-inside-1)"})),a.createElement("path",{d:"M145.63 40.19c1.37-2.75 12.75 2.35 16.14 6.78 3.38 4.43 1.48 10.74-1.9 9.68-6.69-2.12-7.56-6.7-7.94-9.48-1.2-1.85-7.67-4.24-6.3-6.98Z",fill:"white",stroke:"#515151"}),a.createElement("path",{d:"m158.95 41.56 6.64 2.52 1.66 12.47-8.3 1.98-3.47-12.03 3.47-4.94Z",fill:"white"}),a.createElement("path",{d:"M167.3 151.94c5.19 1.66 23.35 35.57 19.05 35.57-13.86 0-34.5.53-71.42.53-15.63 0-17.9-5.16-11.79-22.08a353.23 353.23 0 0 1 6.14-15.76l32.5 1.26c-.43 1.53-.91 3.07-1.38 4.4a26.82 26.82 0 0 1 8.73-1.47c5.27 0 7.04 1.4 11.77 0 2.13-.62 4.8-2.97 6.4-2.45Z",fill:"white",className:""}),a.createElement("path",{d:"M140.4 155.87c.47-1.34.95-2.88 1.38-4.4l-32.5-1.27a353.23 353.23 0 0 0-6.14 15.76c-6.1 16.92-3.84 22.08 11.79 22.08 36.93 0 57.56-.53 71.42-.53 4.3 0-13.86-33.91-19.06-35.57-1.6-.52-4.26 1.83-6.4 2.45-4.72 1.4-6.5 0-11.76 0-3.08 0-6.06.55-8.72 1.48Zm0 0a26.67 26.67 0 0 1-4.44 8.38c-1.7 2.22-3.99 4.43-5.43 4.33-1.44-.1-1.42-3.18 0-5.66 1.97-3.44 6.45-5.87 9.88-7.05Z",stroke:"#1C1F23",className:""}),a.createElement("path",{d:"M149.25 131.7s3.36 19.46-12.34 21.04c-11.53 1.15-40.77-4.55-53.76-7.79 4.72 12.82 9.61 39.86 7 42.16-3.33 2.93-47.55 1.76-55.96 0-8.42-1.75 13.82-11.46 15.45-14.66 2.99-5.84-5.48-21.18-5.75-45.45-.27-24.27 18.18-24.86 34.47-21.64 13.02 2.57 41.63 18.33 52.56 26.86l18.33-.52Z",fill:"white",stroke:"#515151"}),a.createElement("path",{d:"M141.5 153.87c-3.11 2.55-27.72 5-35.58 3.53l2.75-6.8c20.23 2.85 28.08 3.34 33.46 1.16l-.63 2.11Z",fill:"#515151",className:"__web-inspector-hide-shortcut__"}),a.createElement("path",{d:"M141.5 153.87c-3.11 2.55-27.72 5-35.58 3.53l2.75-6.8c20.23 2.85 28.08 3.34 33.46 1.16l-.63 2.11Z",fill:"#515151"}),a.createElement("path",{d:"M126.02 142.7c-3.1-2.99-4.99-7.5-4.16-12.35",stroke:"#515151"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M130.6 95.65c-9.03-10.98-18.97-19.74-25.5-24.56l1.63-2.22c6.7 4.95 16.81 13.86 26 25.02 9.18 11.16 17.54 24.67 20.59 38.83l-2.7.59c-2.91-13.56-10.97-26.67-20.02-37.66Z",fill:"#515151"}),a.createElement("path",{d:"m149.12 107.09-16.36 13.2 22.27 17.8 8.87-19.19c-.14-3.93-2.34-5.34-5.83-4.66l-3.12-2.5c.08-3.5-2.18-5.64-5.83-4.65Z",fill:"#E6E8EA"}),a.createElement("path",{d:"m148.24 128.62 9.45-14.34-2.91-2.33-10.94 13.07 4.4 3.6Z",stroke:"#515151"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M143.67 127.98a6.93 6.93 0 1 1-10.82-8.65 6.93 6.93 0 0 1 10.82 8.65Zm12.28 9.82a6.93 6.93 0 1 1-10.82-8.66 6.93 6.93 0 0 1 10.82 8.66Z",fill:"#515151"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m133.43 123.46 9.21-1.8.32 1.61-9.2 1.81-.33-1.62Z",fill:"white"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m145.5 133.11 9.21-1.8.32 1.62-9.2 1.8-.33-1.62Z",fill:"white"}),a.createElement("defs",null,a.createElement("clipPath",{id:"clip_failure_96_39_65"},a.createElement("rect",{width:44.4004,height:44.4627,transform:"matrix(0.963965 -0.266028 0.266198 0.963918 18.4214 34.6221)",fill:"white"}))))}var q=H;const K=({packages:r})=>e.jsx("div",{children:r.map(({name:t,size:s},c)=>{const n=(s/1024/1024).toFixed(2)+"MB",d=s<=4*1024*1024;return e.jsxs("div",{style:{display:"flex",alignItems:"center",padding:"2px 8px",borderRadius:6,backgroundColor:d?"#E8F5E9":"#FCE4EC",marginBottom:c===r.length-1?0:8,width:"fit-content"},children:[e.jsxs(l.Text,{style:{fontWeight:600,fontSize:14},children:[t,":"]}),e.jsx(l.Text,{style:{color:d?"#4CAF50":"#F44336",fontWeight:600},children:n}),e.jsx(l.Text,{type:"tertiary",style:{marginLeft:8},children:d?i("notExceedIndependentPkgSizeLimit",{limit:"4MB"}):i("exceedIndependentPkgSizeLimit",{limit:"4MB"})})]},t)})}),Y=({size:r,limit:t})=>{const s=(r/1024/1024).toFixed(2)+"MB",c=r<=t*1024*1024,n=c?i("notExceedSizeLimit",{limit:t+"MB"}):i("exceedSizeLimit",{limit:t+"MB"});return e.jsxs("div",{style:{display:"flex",alignItems:"center",width:"fit-content",padding:"2px 8px",borderRadius:6,backgroundColor:c?"#E8F5E9":"#FCE4EC"},children:[e.jsx(l.Text,{style:{fontWeight:600,color:c?"#4CAF50":"#F44336"},children:s}),e.jsx(l.Text,{type:"tertiary",style:{marginLeft:8},children:n})]})},X=({packages:r,limit:t})=>{const s=r.find(m=>m.type==="main")?.size,c=(s/1024/1024).toFixed(2)+"MB",n=s<=t*1024*1024,d=n?i("notExceedMainPkgSizeLimit",{limit:t+"MB"}):i("exceedMainPkgSizeLimit",{limit:t+"MB"});return e.jsxs("div",{style:{display:"flex",alignItems:"center",padding:"2px 8px",width:"fit-content",borderRadius:6,backgroundColor:n?"#E8F5E9":"#FCE4EC"},children:[e.jsx(l.Text,{style:{fontWeight:600,color:n?"#4CAF50":"#F44336"},children:c}),e.jsx(l.Text,{type:"tertiary",style:{marginLeft:8},children:d})]})},$=({domains:r=[]})=>r?.length?e.jsx(R,{className:"trusted-domain-list",style:{flexWrap:"wrap"},children:r.map(t=>e.jsx(S,{className:"trusted-domain-tag",children:t},t))}):e.jsx("div",{className:"project-detail-warning",children:e.jsx(l.Text,{className:"project-detail-warning-text",children:i("trustDomainEmptyTip")})}),J=({termsOfServiceLink:r})=>{const t=i("termsLabel");return r?e.jsxs("div",{className:"terms-privacy-item",children:[e.jsx(l.Text,{type:"tertiary",className:"terms-privacy-label",children:t}),e.jsx("a",{className:"terms-privacy-value",href:r,title:r,target:"_blank",rel:"noreferrer",children:r})]}):e.jsxs("div",{className:"terms-privacy-item",children:[e.jsx(l.Text,{type:"tertiary",className:"terms-privacy-label",children:t}),e.jsx("div",{className:"project-detail-warning",children:e.jsx(l.Text,{className:"project-detail-warning-text",children:i("termsOfServiceEmptyTip")})})]})},Q=({privacyPolicyLink:r})=>{const t=i("privacyLabel");return r?e.jsxs("div",{className:"terms-privacy-item",children:[e.jsx(l.Text,{type:"tertiary",className:"terms-privacy-label",children:t}),e.jsx("a",{className:"terms-privacy-value",href:r,title:r,target:"_blank",rel:"noreferrer",children:r})]}):e.jsxs("div",{className:"terms-privacy-item",children:[e.jsx(l.Text,{type:"tertiary",className:"terms-privacy-label",children:t}),e.jsx("div",{className:"project-detail-warning",children:e.jsx(l.Text,{className:"project-detail-warning-text",children:i("privacyPolicyEmptyTip")})})]})},ee=({logo:r,placeholder:t})=>{if(!r?.trim())return e.jsx("div",{className:"project-detail-warning",children:e.jsx(l.Text,{className:"project-detail-warning-text",children:i("gameIconEmptyTip")})});const[s,c]=a.useState(!1);return e.jsxs("div",{style:{width:100,height:100,borderRadius:4,overflow:"hidden",position:"relative",background:"#f0f0f0",display:"flex",alignItems:"center",justifyContent:"center"},children:[!s&&(t||e.jsx("div",{style:{width:"100%",height:"100%",background:"#e0e0e0",display:"flex",alignItems:"center",justifyContent:"center",color:"#aaa",fontSize:14}})),e.jsx("img",{src:r,alt:"logo",style:{width:"100%",height:"100%",borderRadius:4,objectFit:"cover",position:"absolute",top:0,left:0,opacity:s?1:0,transition:"opacity 0.3s"},onLoad:()=>c(!0)})]})},ae=({description:r})=>r?e.jsx(l.Text,{style:{fontSize:14},children:r}):e.jsx("div",{className:"project-detail-warning",children:e.jsx(l.Text,{className:"project-detail-warning-text",children:i("gameDescEmptyTip")})}),re="https://bytedance.larkoffice.com/wiki/PeIawT4M4ia9R8kYyLMcjwHknOg",te=({errorMsg:r,errorState:t="unknown"})=>{const s=C(),c=t==="notLoggedIn"||t==="loginExpired",n=t==="noPermission",d=c?"projectInfo.error.login.title":n?"projectInfo.error.permission.title":"projectInfo.error.general.title",m=c?"projectInfo.error.login.desc":n?"projectInfo.error.permission.desc":"projectInfo.error.general.desc",v=c?["projectInfo.error.login.stepLogin","projectInfo.error.login.stepRestart","projectInfo.error.login.stepProxy"]:n?["projectInfo.error.permission.stepCheckAccount","projectInfo.error.permission.stepApply","projectInfo.error.permission.stepRestart"]:["projectInfo.error.general.stepCheck","projectInfo.error.general.stepRetry"],g=()=>{window.open(re,"_blank","noopener,noreferrer")};return e.jsxs("div",{className:"error-display",children:[e.jsx(z,{className:"error-display-banner",type:"info",closeIcon:null,description:e.jsxs("div",{className:"error-display-banner-content",children:[e.jsx(l.Text,{strong:!0,children:i(d)}),e.jsx(l.Text,{children:i(m)})]})}),e.jsxs("div",{className:"error-display-panel",children:[e.jsxs("div",{className:"error-display-hero",children:[e.jsx("div",{className:"error-display-hero-illustration",children:e.jsx(q,{})}),e.jsxs("div",{className:"error-display-hero-copy",children:[e.jsx(l.Title,{heading:4,children:i("projectInfo.error.guideTitle")}),e.jsx(l.Paragraph,{className:"error-display-main-text",children:r})]})]}),e.jsxs("div",{className:"error-display-guide-grid",children:[e.jsxs("section",{className:"error-display-guide-card",children:[e.jsx(l.Text,{strong:!0,children:i("projectInfo.error.stepTitle")}),e.jsx("div",{className:"error-display-step-list",children:v.map((f,u)=>e.jsxs("div",{className:"error-display-step-item",children:[e.jsx("span",{className:"error-display-step-index",children:u+1}),e.jsx(l.Text,{children:i(f)})]},f))}),c?e.jsxs("div",{className:"error-display-command-list",children:[e.jsxs("div",{className:"error-display-command-item",children:[e.jsx(l.Text,{type:"tertiary",children:i("projectInfo.error.commandLogin")}),e.jsx("code",{children:"ttmg login"})]}),e.jsxs("div",{className:"error-display-command-item",children:[e.jsx(l.Text,{type:"tertiary",children:i("projectInfo.error.commandRestart")}),e.jsx("code",{children:"ttmg dev"})]}),e.jsxs("div",{className:"error-display-command-item",children:[e.jsx(l.Text,{type:"tertiary",children:i("projectInfo.error.commandProxy")}),e.jsx("code",{children:"ttmg config set proxy http://127.0.0.1:7890"}),e.jsx(l.Text,{type:"tertiary",className:"error-display-command-hint",children:i("projectInfo.error.commandProxyHint")})]})]}):null]}),e.jsxs("section",{className:"error-display-guide-card",children:[e.jsx(l.Text,{strong:!0,children:i("projectInfo.error.helpTitle")}),e.jsx(l.Paragraph,{className:"error-display-help-text",children:c?i("projectInfo.error.helpLoginDesc"):n?i("projectInfo.error.helpPermissionDesc"):i("projectInfo.error.helpGeneralDesc")}),c?e.jsxs("div",{className:"error-display-actions",children:[e.jsx(M,{theme:"light",onClick:()=>s("/basic_debug_guide"),children:i("basicDebugGuide.entryAction")}),e.jsx(M,{theme:"solid",type:"primary",onClick:g,children:i("projectInfo.error.openProxyDoc")})]}):null]})]})]})]})},E=({label:r,children:t,wide:s=!1})=>e.jsxs("div",{className:`game-detail-field ${s?"game-detail-field-wide":""}`,children:[e.jsx(l.Text,{type:"tertiary",className:"game-detail-field-label",children:r}),e.jsx("div",{className:"game-detail-field-value",children:t})]}),ie=()=>{const{state:{gameDetail:r,user:t,packages:s,engine:c},setGameDetail:n}=L(),[d,m]=a.useState(!0),[v,g]=a.useState(!1),[f,u]=a.useState(""),[T,b]=a.useState("unknown"),N=({errorCode:p,errorMsg:h,clientKey:j})=>{m(!1),g(!0),b(O({errorCode:p,user:t})),u(A({errorCode:p,errorMsg:h,clientKey:j,user:t}))};a.useEffect(()=>{if(r&&!r.has_error){m(!1);return}r?.has_error&&(g(!0),N({errorCode:r.error_code,errorMsg:r.error_msg,clientKey:r.client_key})),F({url:"/game/detail",method:"GET"}).then(p=>{if(p?.error)m(!1),N(p.error);else{const{data:h}=p;n(h),m(!1)}})},[]);const o=a.useMemo(()=>{if(!r||r?.has_error)return null;const{size:p,request_allowed_domains:h}=r,j=c==="unity",y=s?.length>0?s:r.packages??[],k=y.reduce((x,D)=>x+(D?.size??0),0)||p,_=j?60:30,I=y.filter(x=>x.type==="independent"),P=y.some(x=>x.type==="main");return{isUnity:j,packageList:y,projectSize:k,projectSizeLimit:_,independentPackages:I,hasMainPackage:P,domains:h}},[c,r,s]);return d&&!r?e.jsx("div",{className:"game-detail-loading-container",children:e.jsx(B,{size:"large"})}):v?e.jsx(te,{errorMsg:f,errorState:T}):!r||!o?null:e.jsx("div",{className:"game-detail-container",children:e.jsxs("div",{className:"game-detail-page",children:[e.jsxs("section",{className:"game-detail-intro",children:[e.jsx(l.Paragraph,{className:"game-detail-page-desc",children:i("projectInfoDesc")}),e.jsx(l.Paragraph,{className:"game-detail-page-desc",children:i("projectInfoDescTip")})]}),e.jsxs("section",{className:"game-detail-panel",children:[e.jsx("div",{className:"game-detail-panel-head",children:e.jsx(l.Text,{strong:!0,children:i("projectInfo.section.basic")})}),e.jsxs("div",{className:"game-detail-basic-hero",children:[e.jsx("div",{className:"game-detail-logo-shell game-detail-logo-shell-basic",children:e.jsx(ee,{logo:r.display_icon_url||""})}),e.jsx("div",{className:"game-detail-basic-main",children:e.jsxs("div",{className:"game-detail-basic-meta",children:[e.jsxs("div",{className:"game-detail-basic-row",children:[e.jsx(l.Text,{type:"tertiary",className:"game-detail-basic-meta-label",children:i("gameName")}),e.jsx("div",{className:"game-detail-basic-meta-value",children:r.name?.trim()?e.jsx(l.Text,{strong:!0,className:"game-detail-basic-name",children:r.name}):e.jsx("div",{className:"project-detail-warning",children:e.jsx(l.Text,{className:"project-detail-warning-text",children:i("gameNameEmptyTip")})})})]}),e.jsxs("div",{className:"game-detail-basic-row",children:[e.jsx(l.Text,{type:"tertiary",className:"game-detail-basic-meta-label",children:i("gameID")}),e.jsx(l.Text,{className:"game-detail-basic-meta-value game-detail-basic-meta-value-code",children:r.client_key||"-"})]}),e.jsxs("div",{className:"game-detail-basic-row",children:[e.jsx(l.Text,{type:"tertiary",className:"game-detail-basic-meta-label",children:i("gameDesc")}),e.jsx("div",{className:"game-detail-basic-meta-value",children:e.jsx(ae,{description:r.description})})]})]})})]})]}),e.jsxs("div",{className:"game-detail-section-grid",children:[e.jsxs("section",{className:"game-detail-panel",children:[e.jsx("div",{className:"game-detail-panel-head",children:e.jsx(l.Text,{strong:!0,children:i("projectInfo.section.package")})}),e.jsxs("div",{className:"game-detail-fields-grid",children:[e.jsx(E,{label:i("gameSize"),children:e.jsx(Y,{size:o.projectSize,limit:o.projectSizeLimit})}),!o.isUnity&&o.hasMainPackage?e.jsx(E,{label:i("gameMainPackageSize"),children:e.jsx(X,{packages:o.packageList,limit:4})}):null,!o.isUnity&&o.independentPackages.length>0?e.jsx(E,{label:i("gameIndependentPackageSize"),wide:!0,children:e.jsx(K,{packages:o.independentPackages})}):null]})]}),e.jsxs("section",{className:"game-detail-panel",children:[e.jsx("div",{className:"game-detail-panel-head",children:e.jsx(l.Text,{strong:!0,children:i("projectInfo.section.platform")})}),e.jsxs("div",{className:"game-detail-platform-stack",children:[e.jsxs("div",{className:"game-detail-platform-card",children:[e.jsx("div",{className:"game-detail-platform-card-head",children:e.jsx(l.Text,{strong:!0,children:i("gameTrustDomains")})}),e.jsx($,{domains:o.domains})]}),e.jsxs("div",{className:"game-detail-platform-card",children:[e.jsx("div",{className:"game-detail-platform-card-head",children:e.jsx(l.Text,{strong:!0,children:i("gameTermsAndPrivacy")})}),e.jsxs("div",{className:"game-detail-terms-stack",children:[e.jsx(J,{termsOfServiceLink:r.terms_of_service_link}),e.jsx(Q,{privacyPolicyLink:r.privacy_policy_link})]})]})]})]})]})]})})};export{ie as ProjectDetail};
|
|
Binary file
|