@shijiu/jsview 2.2.373 → 2.3.0
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/dom/bin/DroidNaskh-Regular.ttf +0 -0
- package/dom/bin/DroidSans.ttf +0 -0
- package/dom/bin/DroidSansFallback.ttf +0 -0
- package/dom/bin/NotoColorEmoji.ttf +0 -0
- package/dom/bin/jsview-dom-browser-engine-core.min.js +2 -0
- package/dom/bin/jsview-dom-browser-engine-modules.min.js +2 -0
- package/dom/bin/jsview-dom-browser-forge.1436.54c9.wasm +0 -0
- package/dom/bin/jsview-dom-browser-forge.min.js +1 -0
- package/dom/bin/jsview-dom-browser-forge.worker.min.js +1 -0
- package/dom/bin/jsview-dom-browser.min.js +1 -1
- package/dom/bin/jsview-dom-native.min.js +1 -1
- package/dom/bin/jsview-engine-js-browser.min.js +1 -22
- package/dom/bin/jsview-engine-js-native.min.js +1 -1
- package/dom/bin/jsview-forge-define.min.js +1 -1
- package/dom/index.mjs +8 -10
- package/dom/target_core_revision.mjs +3 -3
- package/loader/jsv-core-api/jsview-core-api-glue.js +74 -0
- package/loader/jsv-core-api/wasm/backgroundtask.js +66 -0
- package/loader/jsv-core-api/wasm/core-api.js +208 -0
- package/loader/jsv-core-api/wasm/wasm-extension.js +37 -0
- package/loader/jsview-config.js +4 -1
- package/loader/jsview-loader.js +67 -77
- package/loader/jsview-main.mjs +1 -1
- package/package.json +1 -1
- package/patches/node_modules/vite/dist/node/jsview-vite-extension.js +67 -6
- package/tools/https-server-config/cert.pem +61 -0
- package/tools/https-server-config/key.pem +27 -0
- package/tools/https-server-config/serve.config.json +16 -0
- package/tools/jsview-common.mjs +86 -3
- package/tools/jsview-post-build.mjs +153 -3
- package/tools/jsview-post-install.mjs +7 -4
- package/tools/jsview-retrieve-sourcemap.mjs +64 -49
- package/tools/jsview-run-tool.mjs +88 -10
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* eslint-disable */ let t={sRenderBridge:null,sActivityManager:null,DesignMap:null};window.Forge=t;let s=function(t){},e=function(t){},i=function(t){},n=function(t){throw new Error(t)};class r{constructor(){this.i=[],this.h=[],this.l=[],this.o={}}RequestAlterId(t,s){this.o[t]=s}AddToQueue(t,s){this.i.push(s),this.h.push(t)}HasUpdate(){return this.i.length>0}ReadSyncList(){if(this.l.length>0){for(let t of this.l)t();this.l=[]}let t=this.i;return this.RenewSyncList(),t}AddStartSyncCallback(t){this.l.push(t)}RenewSyncList(){if(this.h)for(let t of this.h)t.RenewSyncInfo(this,null);this.i=[],this.h=[]}ProcAlterIds(t,s){for(let e=0;e<t.length;e++)if(this.o.hasOwnProperty(t[e])){let i=this.o[t[e]];i.OnAlterId(s[e]),i.RenewSyncInfo(this,null)}else console.error(`Error: ProcAlterIds not found proxyId=${t[e]}`);this.o={}}}class h{constructor(t,s=null,e=null){this.u=t,this.PrefSyncInfo=null,this.p=null,this.S=!1,this.v=s,this.SuffSyncInfo=null,this.N=null,this.I=!1,this.InitPackage(e),this.RenewSyncInfo(this.u,null),this.RenewSyncInfo(this.v,null)}AddStartSyncCallback(t){this.u.AddStartSyncCallback(t)}CallToNative(s,e,i=!1){let n={fn:s,a:e};return i?(this.N.push(n),this.I||(this.v.AddToQueue(this,this.SuffSyncInfo),this.I=!0)):(this.p.push(n),this.S||(this.u.AddToQueue(this,this.PrefSyncInfo),this.S=!0)),t.sRenderBridge.RequestSwap(),n}RequestAlterId(t,s=!1){s?this.v.RequestAlterId(t,this):this.u.RequestAlterId(t,this)}SuffCallToNative(t,s){return{fn:t,a:s}}AlterCallParams(t,s){t&&(t.a=s)}RenewSyncInfo(t,s){s||(s={}),this.S=!1,this.I=!1,t&&t==this.u&&(this.p=[],this.PrefSyncInfo={tl:this.p,...s}),t&&t==this.v&&(this.N=[],this.SuffSyncInfo={tl:this.N,...s})}InitPackage(t){}OnAlterId(t){}}let l=new r,a=new r;class o extends h{constructor(t){super(l,a,{id:t}),this.C=null,this.R=t}InitPackage(t){this.R=t.id}RenewSyncInfo(t,s){super.RenewSyncInfo(t,{tt:1,id:this.R})}NeedAlterId(t,s){this.C=t,super.RequestAlterId(this.R,s)}OnAlterId(t){this.R=t,this.C.TexId=t,this.C=null}}let u=new class extends h{constructor(){super(l,a)}RenewSyncInfo(t,s){super.RenewSyncInfo(t,{tt:0})}};let c=new class{constructor(){this.A=[1]}AddData(t){return this.A.push(t),this.A.length-1}TakeArray(){const t=this.A;return this.A=[1],t}PickArray(){return this.A}GetSize(){return this.A.length}ResetForNextSwap(){this.A=[1]}};let d=1;class p{constructor(t,s,e=!1){this.O=s,this.TexId=t,this.k=!1,this.P=0,this.D=0,this.G=null,this.F={},this._=e}GetTextureId(){return this.TexId}RequestSyncerAlterId(){this.O.NeedAlterId(this,this._)}RegisterLoadImageCallback(t,s,e){if(null==s)return 0;if(this.k)return s({width:this.P,height:this.D},e),0;{this.B();const t=d++,i=this,n=(n,r,h)=>{s({width:n,height:r,extra:h?JSON.parse(h):null},e),delete i.F[t]};this.F[t]=n;const r=c.AddData(n);return this.O.CallToNative(1,[t,r],this._),t}}UnregisterLoadImageCallback(t){t>0&&void 0!==this.F[t]&&delete this.F[t]}DispatchCommand(s,e){this.O.CallToNative(3,[s,e],this._),t.sRenderBridge.RequestSwap()}B(){if(null==this.G){const t=this;this.G=(s,e,i)=>{t.k=!0,t.P=s,t.D=e};const s=c.AddData(this.G);this.O.CallToNative(1,[d++,s],this._)}}EnableBackgroundLoad(){this.k||(this.B(),this.O.CallToNative(4,null,this._))}DisableBackgroundLoad(){this.O.CallToNative(5,null,this._)}RequestToUnload(){this.O.CallToNative(6,null,this._)}DisableAutoRecycle(){this.O.CallToNative(7,null,this._)}}class f extends p{constructor(t,s,e=!1){super(t,s,e),this.V=null}registerOnStart(t){this.U();let s=this.V,e=++s.IdGen;if(s.StartMapCount++,s.StartMapCount>0&&0==s.GlobalStartCallbackId){s.GlobalStartCallbackId=e;const t=()=>{for(let t in s.OnStartMap)s.OnStartMap[t]?.()},i=c.AddData(t);this.O.CallToNative(10,[s.GlobalStartCallbackId,i],this._)}return s.OnStartMap[e]=t,e}unregisterOnStart(t){if(!this.V)return;let s=this.V;s.OnStartMap.hasOwnProperty(t)&&s.StartMapCount--,0==s.StartMapCount&&0!=s.GlobalStartCallbackId&&(this.O.CallToNative(11,[s.GlobalStartCallbackId],this._),s.GlobalStartCallbackId=0)}registerOnEnd(t){this.U();let s=this.V,e=++s.IdGen;if(s.EndMapCount++,s.EndMapCount>0&&0==s.GlobalEndCallbackId){s.GlobalEndCallbackId=e;const t=()=>{for(let t in s.OnEndMap)s.OnEndMap[t]?.()},i=c.AddData(t);this.O.CallToNative(12,[s.GlobalEndCallbackId,i],this._)}return s.OnEndMap[e]=t,e}unregisterOnEnd(t){if(!this.V)return;let s=this.V;s.OnEndMap.hasOwnProperty(t)&&s.EndMapCount--,0==s.EndMapCount&&0!=s.GlobalEndCallbackId&&(this.O.CallToNative(13,[s.GlobalEndCallbackId],this._),s.GlobalEndCallbackId=0)}U(){this.V||(this.V={IdGen:1,GlobalStartCallbackId:0,OnStartMap:{},StartMapCount:0,GlobalEndCallbackId:0,OnEndMap:{},EndMapCount:0})}}class y extends f{constructor(t,s){super(t,s,!0)}}let S=global.NativeGetIdGroupIntf();const v=10;class w{constructor(t){this.W=t,this.J=0,this.q=0,this.K=new Array(v),this.j=0;for(let t=0;t<v;t++)this.K[t]={start:0,end:0,expired:!0}}genId(){this.K[this.J].expired&&this.Y();let t=this.K[this.J],s=t.start;return t.start++,t.start>t.end&&(t.expired=!0,this.J=(this.J+1)%v,this.j--),s}Y(){let t=20*(v-this.j);if(t>0){let s=S.GetIdArray(this.W,t);if(s){let t=JSON.parse(s);this.X(t[0],t[1])}}}X(t,s){let e=s-t+1,i=Math.floor(e/20),n=t;for(let t=0;t<i;t++){let t=this.K[this.q];t.start=n,t.end=n+20-1,t.expired=!1,this.q=(this.q+1)%v,n=t.end+1}this.j+=i,this.j>v&&console.error(`team over size to ${this.j}`)}}let m=new class{constructor(){this.$=new w(0),this.Z=new w(1),this.et=new w(2),this.it=new w(3)}genViewId(){return this.$.genId()}genTextureId(){return this.Z.genId()}genAnimationId(){return this.et.genId()}genSensorId(){return this.it.genId()}};var x,N,g;!function(t){t.RGBA_8888="RGBA_8888",t.RGBA_4444="RGBA_4444",t.RGBA_5551="RGBA_5551",t.RGB_565="RGB_565",t.RGB_ETC1="RGB_ETC1",t.RGBA_ETC1="RGBA_ETC1"}(x||(x={})),function(t){t.L=1,t.M=0,t.Q=3,t.H=2}(N||(N={})),function(t){t.AUTO=0,t.SYNC=1,t.ASYNC=2}(g||(g={}));class I{constructor(){this.O=u}GetId(){return 0}GetColorTexture(t){let s=m.genTextureId();this.O.CallToNative(1,[t,s]);let e=new p(s,new o(s));return e.RequestSyncerAlterId(),e}GetImage(t,s,e){return this.GetImage2(t,s,null,null,e)}GetImage2(t,s,e,n=x.RGBA_8888,r="",h=!1){if(!t||0==t.length)return i("GetImage2, url is not setted!"),null;let l=m.genTextureId(),a=0,u=0;e&&(a=e.width,u=e.height),n||(n=x.RGBA_8888),r||(r="");let c=null!=h&&h;this.O.CallToNative(2,[t,a,u,n,r,c,l]);let d=new p(l,new o(l));return d.RequestSyncerAlterId(),d}GetQRCodeTexture(t,s,e,i=g.AUTO,n=N.Q,r="#ffffff",h="#000000",l=-1){let a=m.genTextureId();return this.O.CallToNative(3,[t,s,e,n,r,h,l,i,a]),new p(a,new o(a))}GetDownloadTexture(t,s,e){if(!t)return i("GetDownloadTexture, url is null!"),null;let n=m.genTextureId();return this.O.CallToNative(4,[t,s,e,n]),new p(n,new o(n))}GetDomProxyTexture(t){let s=m.genTextureId();return this.O.CallToNative(5,[t,s],!0),new y(s,new o(s))}GetCanvasTexture(t,s){let e=m.genTextureId();return this.O.CallToNative(6,[t,s,e],!1),new p(e,new o(e))}GetPluginTexture(t,s){let e=m.genTextureId();return this.O.CallToNative(7,[t,s,e],!1),new p(e,new o(e))}GetCapturedTexture(){let t=m.genTextureId();return this.O.CallToNative(8,[t],!1),new p(t,new o(t))}}let b=new class{constructor(){this.nt=1}get count(){return this.nt}update(){this.nt<Number.MAX_SAFE_INTEGER?++this.nt:this.nt=1}},C=new r,R=new r;let A=new class extends h{constructor(){super(C,R)}RenewSyncInfo(t){super.RenewSyncInfo(t,{tt:0})}};class O extends h{constructor(t){super(C,R,{id:t}),this.rt=t}InitPackage(t){this.rt=t.id}RenewSyncInfo(t){super.RenewSyncInfo(t,{tt:1,id:this.rt})}}let T=new r,k=new r;class E extends h{constructor(t){super(T,k,{id:t}),this.ht=t}InitPackage(t){this.ht=t.id}RenewSyncInfo(t){super.RenewSyncInfo(t,{tt:1,id:this.ht})}}let P=new class extends h{constructor(){super(T,k)}RenewSyncInfo(t){super.RenewSyncInfo(t,{tt:0})}},D=new r;class G extends h{constructor(t){super(null,D,{id:t}),this.lt=t}InitPackage(t){this.lt=t.id}RenewSyncInfo(t,s){super.RenewSyncInfo(t,{tt:1,id:this.lt})}}let L=new class extends h{constructor(){super(null,D)}RenewSyncInfo(t,s){super.RenewSyncInfo(t,{tt:0})}};var F=null,M=null;class _{constructor(){this.ot={width:160,height:90,x:2/160,y:2/90,perspective:2/160,scaleRatio:1,designedWidth:1280},this.SwapCurrentTime=Date.now(),this.SwapCurrentCount=0,this.ct=new Map,this.dt=this.ft.bind(this),this.yt={hdl:null},this.St=!0,this.vt=-1,this.wt=!1,this.xt=1,this.St=!1,this.Nt(),this.It=!1,this.bt=[],this.Ct=1,this.Rt.OnScreenHide&&window.JsView?.onVisibilityChange((t=>{'{"status":"hide"}'===t&&this.Rt.OnScreenHide()}))}Nt(){void 0!==global.NativeSendImpactSensorSyncData&&global.NativeSendImpactSensorSyncData.bind(this.yt),void 0!==global.NativeSetStepFpsSwitch&&(F=global.NativeSetStepFpsSwitch.bind(this.yt)),void 0!==global.NativeSetGlobalConfig&&(M=global.NativeSetGlobalConfig.bind(this.yt)),this.Rt=global.NativeGetRenderIntf(),this.Rt.RegisterSwapFunc((()=>{this.RequestSwap()})),this.At=this.At.bind(this),this.Rt.RegisterPreDomSyncFunc((()=>{this.Ot()})),this.Rt.RegisterOnScreenInfo(this.Tt.bind(this))}SetStepFpsSwitch(t){this.St?F&&F(t):(console.warn("SetStepFpsSwitch(): API link status no ready!"),this.bt.push((()=>{this.SetStepFpsSwitch(t)})))}SetGlobalConfig(t){if(this.St){if(M){let s=JSON.stringify(t);console.log("SetGlobalConfig set with "+s),M(s),console.log("SetGlobalConfig set done")}}else console.warn("SetGlobalConfig(): API link status no ready!"),this.bt.push((()=>{this.SetGlobalConfig(t)}))}kt(){if(this.bt.length>0){for(let t=0;t<this.bt.length;t++)this.bt[t]();this.bt=[]}}RequestSwap(){this.wt?this.Ct++:(this.wt=!0,this.Ct++,this.xt++,this.Et(this.xt))}Et(t){let s=this,e=this.Ct;Promise.resolve().then((()=>{e==s.Ct?s.InstantPerformSwap():t==this.xt&&s.Et(t)}))}NotifyNetTypeStatus(t,s){}EnableRequestSwap(t){this.It=t,this.Rt.EnableRequestSwap(t)}InstantPerformSwap(){this.wt&&(this.wt=!1,this.xt++,this.At(!1))}Pt(t,s,e,i,n){let r=null,h=null,l=null,a=null,o=null;if(t.HasUpdate()&&(l=t.ReadSyncList()),s.HasUpdate()&&(h=s.ReadSyncList()),e.HasUpdate()&&(r=e.ReadSyncList()),i?.HasUpdate()&&(a=i.ReadSyncList()),null==r&&null==h&&null==l&&null==a||(o=this.Rt.SyncForgeJsCall(JSON.stringify({TexSync:l,AnimSync:h,ViewSync:r,SensorSync:a}),n)),o){let s;this.wt=!1,s=JSON.parse(o).TexSyncRet,s&&this.Dt(t,s)}}Ot(){this.Pt(l,C,T,null,c.PickArray())}At(t){if(!this.It)return void(this.wt=!1);b.update();let s=c.GetSize();if(this.Pt(l,C,T,null,c.PickArray()),this.ct.size>0&&this.ct.forEach(this.dt),this.Pt(a,R,k,D,c.PickArray()),s==c.GetSize())c.ResetForNextSwap();else{let t=c.GetSize();t>50&&console.warn("Warning: temp sync store kept with large size = "+t)}t=!!t,this.wt=!1,this.SwapCurrentTime=Date.now(),this.SwapCurrentCount++,this.Rt.DoRequestSwap(t)}GetScreenInfo(){return this.ot}SetForgeRtHandler(t){this.yt.hdl=t,this.St=!0,this.Rt.SetForgeRtHandler(t),this.kt()}InitScreenBuffer(t,s){isNaN(t)&&(t=1),isNaN(s)&&(s=1280);var e=s*t,i=e/16*9;this.ot.width=Math.floor(e),this.ot.height=Math.floor(i),this.ot.x=2/this.ot.width,this.ot.y=2/this.ot.height,this.ot.perspective=this.ot.x,this.ot.scaleRatio=t,this.ot.designedWidth=s}InitNativeScreenBuffer(){if(this.St){var t=JSON.stringify({displayScaleRatio:this.ot.scaleRatio,designedMapWidth:this.ot.designedWidth});this.Rt.InitScreenBuffer(t)}else console.warn("InitNativeScreenBuffer(): API link status no ready!")}SyncBackStatus(t,s){this.Rt.SyncBackStatus(t,s)}TakeAndSyncBackStatus(){1==this.Rt.TakeAndSyncBackStatus()&&this.RequestSwap()}Tt(t,s,e,i,n){this.ot.width=t,this.ot.height=s,this.ot.x=e,this.ot.y=i,this.ot.perspective=n}HasPendingRenderBreak(){return!!this.St&&this.Rt.HasPendingRenderBreak()}FinishRenderBreak(t){this.St?this.Rt.FinishRenderBreak(t):(console.warn("FinishRenderBreak(): API link status no ready, delay"),this.bt.push((()=>{this.Rt.FinishRenderBreak(t)})))}AddWillSwapListener(t,s){this.ct.set(t,s)}AddSwappedOnceObserver(t){this.St?this.Rt.AddSwappedOnceObserver(t):(console.warn("AddSwappedOnceObserver(): API link status no ready, delay"),this.bt.push((()=>{this.Rt.AddSwappedOnceObserver(t)})))}ActiveComponent(t){this.St?this.Rt.ActiveComponent(t):(console.warn("ActiveComponent(): API link status no ready, delay"),this.bt.push((()=>{this.Rt.ActiveComponent(t)})))}ShutdownComponents(t){this.St?this.Rt.ShutdownComponents(t):(console.warn("ShutdownComponents(): API link status no ready, delay"),this.bt.push((()=>{this.Rt.ShutdownComponents(t)})))}ft(t){t()}Dt(t,s){let e;e=s.idAlter,e&&t.ProcAlterIds(e.proxy,e.real)}}class B{constructor(){this.Gt=!1,this.Lt=0,this.Ft=!1,this.Mt=0,this._t=0,this.Bt=!1,this.Vt=!1,this.Ut=0,this.Wt=0,this.Jt=void 0!==window.jRuntimeBridge?.getSystemUptimeMillis,this.Jt&&(this.Bt=!0,this.qt())}SetTranslateDelay(t){B.sKeyTranslateDelay=t}CheckKey(t){if(!t.timeStamp||this.Gt)return!1;this.Ft=!0;const s=Date.now(),i=t.timeStamp;!this.Bt&&i-this.Lt>3e3&&(this.Mt=s,this._t=i,this.Lt=i);let n=s-this.Mt;(n<0||n>5e3)&&(this.Jt?this.qt():(this.Mt=s,this._t=i),n=0);return n+this._t-i>B.CONST_MAX_PASSING_GAP&&Math.abs(this.Wt-i)<B.CONST_MIN_VALID_KEY_GAP&&!t.repeat?(!this.Vt&&this.Bt&&(this.Ut++,this.Ut>50&&e("More than 50 keys are expired...")),!0):(this.Vt||(this.Vt=!0),this.Wt=i,!1)}toggleKeyGuard(){this.Gt=!this.Gt}IsActive(){return this.Ft}qt(){this.Mt=Date.now(),this._t=window.jRuntimeBridge.getSystemUptimeMillis()-B.sKeyTranslateDelay}}B.CONST_MAX_PASSING_GAP=20,B.CONST_MIN_VALID_KEY_GAP=180,B.sKeyTranslateDelay=5;let V,U=new B;class W{constructor(n,r,h){var l;if(this.Kt=null,this.Ht=1280,this.zt=!1,this.jt=0,l=4,console.log.bind(console),l>0&&console.error.bind(console),l>1&&(s=console.error.bind(console)),l>2&&(e=console.warn.bind(console)),l>3&&(i=console.log.bind(console)),l>4&&console.debug.bind(console),this.Yt=new I,this.Xt=new _,t.sRenderBridge=this.Xt,isNaN(h)&&(h=1280),this.Ht=h,this.zt=!1,this.Qt(n,r,h),this.$t={keyProc:null,keyUpProc:null},this.Zt(this.$t),this.ts=this.Xt.InstantPerformSwap.bind(this.Xt),null!=n){this.jt=n.canvasNativeHandle;for(let t in this.$t)n[t]=this.$t[t]}t.sActivityManager=this,console.log("manager done")}GetTextureManager(){return this.Yt}DelayedActivateCanvas(t){if(0==this.jt){this.jt=t.canvasNativeHandle,this.ss(t);for(let s in this.$t)t[s]=this.$t[s];this.Xt.InitNativeScreenBuffer(),this.Xt.RequestSwap()}else s("Error: already activated")}GetCanvasHandler(){return this.jt}StartActivity(t){this.Kt=t}Qt(t,s,e){this.ss(t),this.Xt.InitScreenBuffer(s,e)}ss(t){null!=t&&(this.Xt.SetForgeRtHandler(t.frtNativeHandle),t.renderBridge=this.Xt,this.Xt.EnableRequestSwap(!0))}es(t){if(this.zt)return!0;var s=!0;if(this.Kt){if(U.CheckKey(t))return console.log("keyEventGuard ignore keys"),!1;U.IsActive()&&this.Xt.InstantPerformSwap(),s=!this.Kt.DispatchKeyDown(t),this.Xt.TakeAndSyncBackStatus()}return s}ns(t){if(this.zt)return!0;var s=!0;return this.Kt&&(s=!this.Kt.DispatchKeyUp(t),this.Xt.TakeAndSyncBackStatus()),s}Zt(t){t.keyProc=this.es.bind(this),t.keyUpProc=this.ns.bind(this)}}class J{constructor(){this.rs=null}Init(t){let s=1280,e=1;try{if(K){let t=K();"number"==typeof t.width&&(s=t.width),"number"==typeof t.displayScale&&(e=t.displayScale)}}catch(t){console.log("Note: DesignMap failed")}this.rs=new W(t,e,s),q?q(this.rs):console.error("FATAL: no found entry")}getActivityManager(){return this.rs}}let q=null,K=null;class H{constructor(t){this.PageName=t,this.hs=null,this.ls=null,this.SubPages=[],this.os=null,this.zt=!1}OnRenderFrame(){s("OnRenderFrame() MUST override")}OnKeyDown(t){return!1}OnKeyUp(t){return!1}DispatchKeyDown(t){if(this.zt)return!0;let s=!1;return this.hs&&(s=this.hs.DispatchKeyDown(t)),s||(s=this.OnKeyDown(t)),s}OnCustomEvent(t){return!1}BubbleCustomEvent(t){this.OnCustomEvent(t)||this.os&&this.os.BubbleCustomEvent(t)}DispatchKeyUp(t){if(this.zt)return!0;let s=!1;return this.hs&&(s=this.hs.DispatchKeyUp(t)),s||(s=this.OnKeyUp(t)),s}PrintLastFocusPage(){let t="------"+this.PageName+"\n",s=this.os;return s&&(t+=s.PrintLastFocusPage()),t}IsFocus(){return!this.os||this.os.hs==this}us(){return this.IsFocus()&&!this.hs}SetParent(t){null!=t?(this.os=t,t.SubPages.push(this)):n("ERROR: parent is null")}SetParentPage(t){this.SetParent(t)}OnRemoveFromTree(){if(this.os=null,this.SubPages&&this.SubPages.length>0){for(let t of this.SubPages)t.OnRemoveFromTree();this.SubPages=[]}}RemoveSubPage(t){t==this.hs&&(this.hs=null),t==this.ls&&(this.ls=null);for(let s=0;s<this.SubPages.length;s++)if(t==this.SubPages[s]){this.SubPages.splice(s,1);break}}ClearSubPages(){this.SubPages=[],this.hs=null,this.ls=null}GetParentPage(){return this.os}Focus(t=!1){if(this.IsFocus()){if(!t)return void i("requestFocus(): Already focused name="+this.PageName);if(this.us())return void i("requestFocus(): Already focused name="+this.PageName)}if(z)return void j.push(this);if(z=!0,this.os){let s,e=[],i=this;for(;i.os&&!i.IsFocus();)e.push(i),i=i.os;s=t&&0==e.length?this.hs:e[e.length-1].os?.hs;let r=[];for(;s;)r.push(s),s=s.hs;for(let t=r.length-1;t>=0;t--)r[t].cs();for(let t=e.length-1;t>=0;t--)e[t].ds();if(t)this.ls=null;else{let t=e[0];for(;t.ls&&null==t.hs;)t.ls.ds(),t=t.hs,t||n("ERROR: focus chain is broken")}}z=!1;let s=j.length;if(s>0){let t=j;j=[];for(let e=0;e<s;e++)t[e].Focus()}}ReturnFocusToParent(){this.os&&(this.IsFocus()&&this.os.Focus(!0),this.os.hs==this&&(this.os.hs=null),this.os.ls==this&&(this.os.ls=null))}ds(){this.os?(this.os.hs=this,this.os.ls=this,this.OnFocus()):s("No dispatcher")}cs(){this.os?this.os.hs==this?(this.os.hs=null,this.OnBlur()):e("Not focus yet, page name="+this.PageName):s("No dispacher")}GetFocusChild(){return this.hs}OnFocus(){e("No overrided Page OnFocus event, page name="+this.PageName)}OnBlur(){e("No overrided Page OnBlur event, page name="+this.PageName)}KeyLock(){this.zt=!0}UnKeyLock(){this.zt=!1}}let z=!1,j=[];var Y;!function(t){t.VIEW_COMMAND=0,t.TEXTURE_COMMAND=1,t.ANIM_COMMAND=2,t.SYNC_COMMAND=3,t.APIC_PLAY=0,t.APIC_STOP=1,t.GET_BOUNDING_RECT=0,t.FILTER_VIEW_WAVE=1,t.TRANSLATE_FRAME_ALT_SPEED=0,t.FREE_MOVE_RUN_CMDPACKS=1,t.EXE_DEFAULT=0,t.EXE_AFTER_RENDER=1}(Y||(Y={}));const X=(t,s)=>{let e=0,i=0,n=0;return isNaN(t)||(e|=1,i=t),isNaN(s)||(e|=2,n=s),{e:e,x:i,y:n}};var Q,$,Z;!function(t){t.ActEvent_ActFinish=1,t.ActEvent_Speed_X_Revert=2,t.ActEvent_Speed_Y_Revert=3,t.ActEvent_ActReject=4,t.ActEvent_ActDragStart=5,t.ActEvent_ActDragEnd=6,t.ActEvent_ActFlingStart=7,t.ActEvent_ActFlingProgress=8,t.ActEvent_ActFlingEnd=9,t.ActEvent_ActTouchDown=10,t.ActEvent_ActTouchRelease=11,t.ActEvent_ActFlingCancel=12,t.ActEvent_ActFlingDrop=13,t.ActEvent_MovementSync=14}(Q||(Q={})),function(t){t.GroupType_ActionAssoc=10,t.GroupType_Fling=11,t.GroupType_Invalid_Ext=65535}($||($={})),function(t){t.FLING_ON_PROGRESS_INTERVAL=200}(Z||(Z={}));const tt=(t,s)=>{t.gtype=s.g,t.once=s.m?0:1;let e=s.s;e&&(t.name=e),t.brk=s.brk?1:0};const st=51;function et(t){return t?JSON.stringify(t.Package()):null}let it=new class{constructor(){this.O=A}CreateTranslate(t,s,e,i,n,r,h){n!=1/0&&null!=n||(console.warn("translate animation duration invalid="+n),n=0),this.O.CallToNative(1,[t,s,e,i,n,et(r),h])}CreateRotate(t,s,e,i,n,r,h){n!=1/0&&null!=n||(console.warn("rotate animation duration invalid="+n),n=0),this.O.CallToNative(2,[t,s,e.x,e.y,e.z,i.x,i.y,i.z,n,et(r),h])}CreateScale(t,s,e,i,n,r,h,l,a,o,u){a!=1/0&&null!=a||(console.warn("scale animation duration invalid="+a),a=0),this.O.CallToNative(3,[t,s,e,i,n,r,h,l,a,et(o),u])}CreateTranslateFrame(t,s,e,i,n,r,h,l){this.O.CallToNative(5,[t,s,e,i,!!n,r,h,l])}CreateCssKeyframe(t,s,e,i,n,r){s!=1/0&&null!=s||(console.warn("css animation duration invalid="+s),s=0),this.O.CallToNative(6,[t,s,e,i,n,r])}CreateFreeMoveAnimation(t,s,e,i){this.O.CallToNative(7,[t,s?c.AddData(s):0,e,i?1:0])}CreateShaderAnimation(t,s,e){this.O.CallToNative(8,[t,s,e])}};class nt{constructor(){this.AnimNativeId=m.genAnimationId(),this.O=new O(this.AnimNativeId),this.ps=null,this.fs=null}SetAnimationListener(t){this.ys(t)}AddAnimationListener(t){this.ps&&t.AddInherit(this.ps),this.ys(t)}RemoveAnimationListener(){this.ps=null}Enable(t){this.O.CallToNative(2,[t])}EnableInfinite(){return this.O.CallToNative(3,null),this}SetRepeat(t){return this.O.CallToNative(5,[t]),this}EnableDelay(t){return this.O.CallToNative(4,[t]),this}SetStartPos(t){return t>=0&&t<=1?this.O.CallToNative(6,[t]):console.warn("Warning: SetStartPos() out of range"),this}ys(t){let s=!0;if(this.ps&&(s=this.ps.ListenerEnabledFlags==t.ListenerEnabledFlags),this.ps=t,null!=this.ps&&(null==this.fs||!s)){let t=this;this.fs=s=>{t.ps?.InvokeFromNativeForge(s)};let s=c.AddData(this.fs);this.O.CallToNative(1,[s,this.ps.ListenerEnabledFlags])}}}var rt,ht;!function(t){t.ReleaseAfterEndCallback=1,t.KeepTransform=2,t.AckFinalProgress=4,t.AckRepeat=8}(rt||(rt={})),function(t){t.AltSpeed=(t,s,e)=>{let i={S60:Math.floor(100*s/55)/100,T:e};t?.DispatchAnimCommand(Y.TRANSLATE_FRAME_ALT_SPEED,JSON.stringify(i))},t.RunFreeMoveCmdPacks=(t,s)=>{t?.DispatchAnimCommand(Y.FREE_MOVE_RUN_CMDPACKS,JSON.stringify(s))}}(ht||(ht={}));class lt{constructor(){this.Ss="COMMON"}Type(){return this.Ss}ToSyncJsonObj(t){return t||(t={}),t.typ=this.Ss,t}}let at=new class{constructor(){this.vs={},this.ws=0}add(t){let s=t.view.ViewId;return this.vs.hasOwnProperty(s)&&(this.vs[s]=t),s}remove(t){this.vs[t]&&delete this.vs[t]}get(t){return this.vs[t]}clear(){this.vs={},this.ws=0}};class ot{constructor(){this.SensorId=m.genViewId(),this.xs=new G(this.SensorId),this.CreateSensor()}CreateSensor(){}CreateTypedSensor(t){L.CallToNative(1,[this.SensorId,t],!0)}Recycle(){this.xs.CallToNative(1,null,!0)}}class ut{constructor(t,s,e,i){this.Texture=t,this.MaskSetting=s,void 0===i&&(i=!0),this.HasAlpha=i}ToSyncJsonObj(t=void 0){return t||(t={}),t.texId=this.Texture?this.Texture.TexId:0,t.alpha=this.HasAlpha,this.MaskSetting?t.mask=this.MaskSetting.ToSyncJsonObj():t.mask=null,t}}var ct;!function(t){var s,e,i;(s=t.ControlType||(t.ControlType={})).DoKeepInRender=1,s.RecycleKeptView=2,(e=t.SyncedType||(t.SyncedType={})).Synced=0,e.NotSynced=1,e.RequestKeepInRender=2,e.OnKeepingInRender=3,e.RecycleKeeping=4,(i=t.TextureCoordAnchor||(t.TextureCoordAnchor={})).LeftTop=1,i.CenterTop=2,i.RightTop=3,i.LeftMiddle=4,i.Center=5,i.RightMiddle=6,i.LeftBottom=7,i.CenterBottom=8,i.RightBottom=9}(ct||(ct={}));let dt=new class{constructor(){this.O=P}CreateNativeView(t,s,e){this.O.CallToNative(1,[t,s],e)}CreateJsRootView(t){this.O.CallToNative(2,[t])}CreateDomProxyView(t,s,e){this.O.CallToNative(3,[t,s,e?1:0],!0)}};class pt{constructor(t,s,e=!1){this.Visibility=void 0,this.O=new E(t),this.ViewId=t,this.TextureSetting=null,this.Ns=null,this._=e,this.gs=null,this.CreateView(s)}CreateView(t=void 0){}ResetTexture(t=null){if(!this.Ns){this.Ns=this.O.CallToNative(1,null,this._);let t=this;this.O.AddStartSyncCallback((()=>{this.TextureSetting?t.O.AlterCallParams(t.Ns,[t.TextureSetting.ToSyncJsonObj()]):t.O.AlterCallParams(t.Ns,[null]),t.Ns=null}))}this.TextureSetting=t}BindedPageBase(t){}SetVisibility(t){if("INHERIT"!==t&&void 0!==t||(t="VISIBLE"),this.Visibility!=t){this.Visibility=t;let s=0;switch(t){case"VISIBLE":s=1;break;case"GONE":s=2;break;case"HIDDEN":s=3;break;default:return void console.error("unknown visible type="+t)}this.O.CallToNative(2,[s],this._)}}AddView(t,s){let e={x:0,y:0,width:0,height:0};s&&(e=this.Is(s)),this.O.CallToNative(3,[t.ViewId,s?1:0,e.x,e.y,e.width,e.height],this._)}ClearViews(){this.O.CallToNative(4,null,this._)}ResetTextureCssTransform(t,s){t=t||"",s=s||"",this.O.CallToNative(5,[t,s],this._)}SetTextureCoord(t,s,e,i,n=ct.TextureCoordAnchor.Center){this.O.CallToNative(9,[t,s,e,i,n],this._)}ResetLayoutParams(t){let s;null!=t?(s=this.Is(t),this.O.CallToNative(6,[s.x,s.y,s.width,s.height],this._)):n("ResetLayoutParams(): new params is null")}Is(t){return{x:isNaN(t.x)?0:t.x,y:isNaN(t.y)?0:t.y,width:isNaN(t.width)?0:t.width,height:isNaN(t.height)?0:t.height}}GetBoundingClientRect(){return new Promise(((t,s)=>{null!=this.gs&&(this.gs=null),this.gs=e=>{null!=this.gs&&(this.gs=null);const i=JSON.parse(e);0==i.status?t(i.data):s(i.error)};const e=c.AddData(this.gs);this.O.CallToNative(12,[e],this._)}))}StartAnimation(t,s,e){let i=t?t.AnimNativeId:0;this.O.CallToNative(7,[i,isNaN(e)?0:e],this._)}StopAnimation(){this.O.CallToNative(8,null,this._)}DispatchAnimCommand(t,s){this.O.CallToNative(13,[t,s],this._)}StartTextureAnimation(t){let s=t?t.AnimNativeId:0;this.O.CallToNative(10,[s],this._)}StopTextureAnimation(){this.O.CallToNative(11,null,this._)}DragEnables(t){this.O.CallToNative(14,[t],this._)}SetTapListener(t=void 0){if(null!=t){const s=c.AddData(t);this.O.CallToNative(15,[s],this._)}else this.O.CallToNative(15,[0],this._)}EnableAutoSize(){this.O.CallToNative(16,[],this._)}RegisterFlexAssigned(t=void 0){if(null!=t){const s=c.AddData(t);this.O.CallToNative(17,[s],this._)}else this.O.CallToNative(17,[0],this._)}EnableVisibleTestRect(){this.O.CallToNative(18,[],this._)}Capture2Texture(t,s=void 0){if(!t)return void console.error("Error: Capture2Texture need target texture");let e=t.GetTextureId();if(!s)return void console.error("Error: Capture2Texture need callback");const i=c.AddData(s);this.O.CallToNative(19,[e,i],this._)}}class ft extends pt{constructor(t=null){!t||t instanceof ut||n("ERROR:LayoutView need TextureSetting as parameter"),super(m.genViewId(),{DomDepends:!1}),this.Visibility="VISIBLE",t&&this.ResetTexture(t)}CreateView(t){dt.CreateNativeView(this.ViewId,0,t.DomDepends)}}function yt(t){let s=[];if(t instanceof Array)for(let e of t)e instanceof pt&&s.push(e.ViewId);return s}class St extends ot{constructor(t,s,e,i){super(),this.InitSet(t,s,e,i)}CreateSensor(){this.CreateTypedSensor(3)}InitSet(t,s,e,i){let n=0;e&&(n=c.AddData((t=>{1==t?e.OnBeginContact?.():2==t&&e.OnEndContact?.()}))),this.xs.CallToNative(20,[t.ViewId,s.ViewId,n,i?i.SensorId:0],!0)}}let vt={StartTrace:(t,s,e,i)=>new St(t,s,e,i),Callback:class{constructor(t,s){this.OnBeginContact=t,this.OnEndContact=s}UpdateImpactCallback(t){this.OnBeginContact=t}UpdateLeaveCallback(t){this.OnEndContact=t}},AutoFroze:class extends ot{constructor(t,s){super(),this.InitSet(),this.bs(yt(t)),this.Cs(yt(s)),this.Rs()}CreateSensor(){this.CreateTypedSensor(2)}InitSet(){this.xs.CallToNative(25,null,!0)}UpdatePreImpactList(t){this.bs(yt(t)),this.Rs()}UpdateOnImpactList(t){this.Cs(yt(t)),this.Rs()}bs(t){this.xs.CallToNative(26,[...t],!0)}Cs(t){this.xs.CallToNative(27,[...t],!0)}Rs(){this.xs.CallToNative(28,null,!0)}}};var wt;!function(t){t[t.NONE=0]="NONE",t[t.TEXT=1]="TEXT",t[t.PASSWORD=2]="PASSWORD",t[t.TEXT_AREA=3]="TEXT_AREA",t[t.CONTENT_EDITABLE=4]="CONTENT_EDITABLE",t[t.SEARCH=5]="SEARCH",t[t.URL=6]="URL",t[t.EMAIL=7]="EMAIL",t[t.TELEPHONE=8]="TELEPHONE",t[t.NUMBER=9]="NUMBER"}(wt||(wt={}));var mt,xt;!function(t){var s;(s=t.UniformType||(t.UniformType={}))[s.FLOAT=1]="FLOAT"}(mt||(mt={})),function(t){var s,e;(s=t.Type||(t.Type={}))[s.GRAY_DOWN=1]="GRAY_DOWN",s[s.WAVE=2]="WAVE",(e=t.Wave||(t.Wave={}))[e.CIRCLE_WAVE=1]="CIRCLE_WAVE",e[e.RECTANGLE_WAVE=2]="RECTANGLE_WAVE"}(xt||(xt={}));let Nt=0;class gt{constructor(){this.sourceList=[]}addSource(t,s,e,i,n){i=i??{type:xt.Wave.CIRCLE_WAVE},n=n??{timeDecay:3,distanceDecay:10,speed:100,frequency:8,waveNum:2};const r=++Nt;let h=0,l=0,a=0;return i.type==xt.Wave.RECTANGLE_WAVE&&(h=i.width,l=i.height,a=i.radius),this.sourceList.push(r,t,s,e,h,l,a,n.timeDecay,n.distanceDecay,n.speed,n.frequency,n.waveNum),r}getSourceList(){const t=this.sourceList;return this.sourceList=[],t}}class It extends pt{constructor(t,s){super(m.genViewId(),{DomElementId:t,UseMaskView:s},!0),this.Visibility="VISIBLE"}CreateView(t){dt.CreateDomProxyView(this.ViewId,t.DomElementId,t.UseMaskView)}RegisterOnProxyReady(t){t?.()}}var bt;!function(t){t.sDefaultFont="黑体",t.sDefaultFontSize=30,t.sDefaultFontColor="#FFFFFF",t.sDefaultBackgroundColor="rgba(0, 0, 0, 0)"}(bt||(bt={}));let Ct=t;Ct.Run=function(t){return V=new J,V.Init(t),V},Ct.InitStarter=function(s,e){t.DesignMap=e,q=s,K=e},Ct.NewDomProxyView=function(t,s){return new It(t,s)},Ct.sFrameCount=b,Ct.NativeConstant=Y,Ct.PageBase=H,Ct.ReactActivity=class extends H{constructor(t,s){super(t),this.Yt=s.GetTextureManager()}GetTextureManager(){return this.Yt}SetContentView(t,s){this.As=t,this.Os=s}},Ct.ViewTextureMask=class extends lt{constructor(t){super(),this.Ss="TEXTURE",this.ImageTexture=t}ToSyncJsonObj(t){return t||(t={}),t.texId=this.ImageTexture.TexId,super.ToSyncJsonObj(t)}},Ct.ViewRoundCornerMask=class extends lt{constructor(t,s,e,i){super(),this.Ss="CORNER",this.Ts=t,this.ks=isNaN(s)?t:s,this.Es=isNaN(e)?t:e,this.Ps=isNaN(i)?t:i}ToSyncJsonObj(t){return t||(t={}),t.tl=this.Ts,t.tr=this.ks,t.bl=this.Es,t.br=this.Ps,super.ToSyncJsonObj(t)}},Ct.sViewStore=at,Ct.ViewInfo=class{constructor(t,s){this.view=t,this.layout_params=s}},Ct.LayoutView=ft,Ct.AutoStretchView=class extends ft{constructor(t=null){super(t)}CreateView(t){dt.CreateNativeView(this.ViewId,12,t.DomDepends)}},Ct.EditControlView=class extends ft{constructor(t=null){super(t),this.Ds()}CreateView(t){dt.CreateNativeView(this.ViewId,5,t.DomDepends)}showIme(t,s,e){t!=wt.NONE?(void 0!==e&&null!=e||(e=s.length>0?s.length:0),e<0?e=0:e>s.length&&(e=s.length>0?s.length:0),this.O.CallToNative(5001,[t,s,e],this._)):console.log("showIme inputType error")}hideIme(){this.O.CallToNative(5002,null,this._)}updateCursorOffset(t,s){this.O.CallToNative(5003,[t,s],this._)}OnTextChanged(t,s){}OnStatusChanged(t){}OnEditAction(t){}Gs(t){if(t){var s=JSON.parse(t),e=s.text,i=s.status,n=s.action;if(void 0!==e){let t=s.select_start;this.OnTextChanged(decodeURIComponent(e),t)}else i?this.OnStatusChanged(i):n&&this.OnEditAction(n)}else console.log("EditControlView","_ImeEventListener input_data error")}Ds(){const t=c.AddData(this.Gs.bind(this));this.O.CallToNative(5004,[t])}},Ct.FilterView=class extends ft{constructor(t=null,s){super(t),this.Ls=s??xt.Type.GRAY_DOWN,this.O.CallToNative(10002,[this.Ls,[]],this._)}CreateView(t){dt.CreateNativeView(this.ViewId,10,t.DomDepends)}FilterSwitch(t){this.O.CallToNative(10001,[t],this._)}AddWaveSourceList(t){if(this.Ls==xt.Type.WAVE){const s={T:1,L:t.getSourceList()};this.DispatchCommand(Y.FILTER_VIEW_WAVE,JSON.stringify(s))}else console.error("FilterView error: add wave source while filter view type is GRAY_DOWN.")}AddWaveSourceSingle(t,s,e,i={type:xt.Wave.CIRCLE_WAVE},n={timeDecay:3,distanceDecay:10,speed:100,frequency:8,waveNum:2}){if(this.Ls==xt.Type.WAVE){const r=new gt,h=r.addSource(t,s,e,i,n);return this.AddWaveSourceList(r),h}return console.error("FilterView error: add wave source while filter view type is GRAY_DOWN."),-1}RemoveSource(t){if(this.Ls==xt.Type.WAVE){const s={T:2,L:t instanceof Array?t:[t]};this.DispatchCommand(Y.FILTER_VIEW_WAVE,JSON.stringify(s))}else console.error("FilterView error: remove wave source while filter view type is GRAY_DOWN.")}DispatchCommand(t,s){s&&this.O.CallToNative(10003,[t,s],this._)}},Ct.FragShaderView=class extends ft{constructor(t=null){super(t)}CreateView(t){dt.CreateNativeView(this.ViewId,11,t.DomDepends)}SetShaderInfo(t,s,e,i){const n={shaderStr:t,uniformParams:s,textureParams:e};let r=0;null!=i&&(r=c.AddData(i)),this.O.CallToNative(7001,[JSON.stringify(n),r],this._)}},Ct.NativeSharedView=class extends ft{constructor(t){super(t),this.Fs=window.JsView?window.JsView.getJsContextId():0,this.Ms=null,this.SetTrackId(this.Fs+"_"+this.ViewId)}CreateView(t){dt.CreateNativeView(this.ViewId,9,t.DomDepends)}GetTrackId(){return this.Ms}SetTrackId(t){this.Ms=t,this.O.CallToNative(10101,[this.Ms],this._)}SetOverSize(t){this.O.CallToNative(10102,[isNaN(t)?0:t],this._)}},Ct.NinePatchView=class extends ft{CreateView(t){dt.CreateNativeView(this.ViewId,4,t.DomDepends)}SetRepeat(t,s){this.O.CallToNative(4001,[t,s],this._)}SetPadding(t,s){this.O.CallToNative(4002,[t,s],this._)}SetImageDspSize(t,s){this.O.CallToNative(4003,[t,s],this._)}SetDesignMapWidth(t){this.O.CallToNative(4004,[t],this._)}EnableAlphaMix(t){this.O.CallToNative(4005,[t.TexId],this._)}},Ct.PreloadView=class extends ft{constructor(t=null){super(t)}CreateView(t){dt.CreateNativeView(this.ViewId,7,t.DomDepends)}},Ct.SprayView=class extends ft{constructor(t=null){super(t)}SetSprayInfo(t,s,e,i,n,r,h,l,a,o,u,c,d,p,f,y,S,v,w,m,x,N,g){this.O.CallToNative(6001,[t,s,e,i,n,r,h,l,a,o,u,c,d,p,!!f,!!y,!!S,v,w,m,x,N,g],this._)}CreateView(t){dt.CreateNativeView(this.ViewId,6,t.DomDepends)}},Ct.TextInputType=wt,Ct.FilterViewType=xt,Ct.TextureSetting=ut,Ct.ExternalTextureSetting=ut,Ct.TextUtils=bt,Ct.VisibleSensor=class extends ot{constructor(t,s=null){super(),this.InitSet(t,s)}CreateSensor(){this.CreateTypedSensor(1)}InitSet(t,s){let e=0;s&&(e=c.AddData(((t,e,i,n)=>{s(1==t,1==e,1==i,1==n)}))),this.xs.CallToNative(11,[t.ViewId,e],!0)}ResetArea(t){"number"!=typeof t.horizon&&(console.log("horizon not set, default to 1.0"),t.horizon=1),"number"!=typeof t.vertical&&(console.log("vertical not set, default to 1.0"),t.vertical=1),this.xs.CallToNative(12,[t.horizon,t.vertical],!0)}Enable(t){this.xs.CallToNative(13,[!!t],!0)}ResetContainer(t){let s;s=t?t.ViewId:0,this.xs.CallToNative(14,[s],!0)}},Ct.EnvBlockerSensor=class extends ot{constructor(t){super(),this.InitSet(t)}CreateSensor(){this.CreateTypedSensor(4)}InitSet(t){this.xs.CallToNative(30,[t.ViewId],!0)}ResetTopGID(t){this._s(0,t)}ResetBottomGID(t){this._s(1,t)}ResetLeftGID(t){this._s(2,t)}ResetRightGID(t){this._s(3,t)}_s(t,s){this.xs.CallToNative(31,[t,isNaN(s)?0:parseInt(s)],!0)}Enable(t){this.xs.CallToNative(32,[t],!0)}},Ct.sImpactSensorManager=vt,Ct.TextureInstantLoad=g,Ct.QRCodeLevel=N,Ct.ColorSpace=x,Ct.TextureManager=I,Ct.FreeMoveExternType=$,Ct.AnimationListener=class{constructor(t,s,e){this.ListenerEnabledFlags=0,this.InvokeAnimationStart=t,this.Bs=t,t&&(this.ListenerEnabledFlags|=1),this.InvokeAnimationEnd=s,this.Vs=s,s&&(this.ListenerEnabledFlags|=2),this.InvokeViewNoVisible=e,this.Us=e,e&&(this.ListenerEnabledFlags|=4),this.InvokeAnimRepeat=null,this.Ws=null,this.InvokeAnimFinal=null,this.Js=null,this.qs=null,this.Ks=[]}OnStart(t){return this.InvokeAnimationStart=this.Bs=t,t?this.ListenerEnabledFlags|=1:this.ListenerEnabledFlags&=30,this}OnEnd(t){return this.InvokeAnimationEnd=this.Vs=t,t?this.ListenerEnabledFlags|=2:this.ListenerEnabledFlags&=29,this}OnRepeat(t){return this.InvokeAnimRepeat=this.Ws=t,t?this.ListenerEnabledFlags|=8:this.ListenerEnabledFlags&=23,this}OnFinalProgress(t){return this.InvokeAnimFinal=this.Js=t,t?this.ListenerEnabledFlags|=16:this.ListenerEnabledFlags&=15,this}AddInherit(t){if(t){if(0==this.Ks.length){var s=this;this.InvokeAnimationStart=function(){s.Bs&&s.Bs();for(var t=0;t<s.Ks.length;t++)s.Ks[t].InvokeAnimationStart?.()},this.InvokeAnimationEnd=function(t){s.Vs&&s.Vs(t);for(var e=0;e<s.Ks.length;e++)s.Ks[e].InvokeAnimationEnd?.(t)},this.InvokeViewNoVisible=function(){s.Us&&s.Us();for(var t=0;t<s.Ks.length;t++)s.Ks[t].InvokeViewNoVisible?.()},this.InvokeAnimFinal=function(t){s.Js&&s.Js(t);for(var e=0;e<s.Ks.length;e++)s.Ks[e].InvokeAnimFinal?.(t)},this.InvokeAnimRepeat=function(t){s.Ws&&s.Ws(t);for(var e=0;e<s.Ks.length;e++)s.Ks[e].InvokeAnimRepeat?.(t)},this.ListenerEnabledFlags=31}this.Ks.push(t)}}InvokeFromNativeForge(t){switch(t.type){case"end":this.InvokeAnimationEnd?.(1==t.normalEnd);break;case"novisible":this.InvokeViewNoVisible?.();break;case"final":this.InvokeAnimFinal?.(t.progress);break;case"repeat":this.InvokeAnimRepeat?.(t.timesCount)}}},Ct.AnimFireCommand=ht,Ct.AnimationEnable=rt,Ct.TranslateAnimation=class extends nt{constructor(t,s,e,i,n,r){super(),it.CreateTranslate(t,s,e,i,n,r,this.AnimNativeId)}},Ct.RotateAnimation=class extends nt{constructor(t,s,e,i,n,r){super(),it.CreateRotate(t,s,e,i,n,r,this.AnimNativeId)}},Ct.ScaleAnimation=class extends nt{constructor(t,s,e,i,n,r,h,l,a=200,o=200){super(),it.CreateScale(t,s,e,i,n,r,a,o,h,l,this.AnimNativeId)}},Ct.TranslateFrameAnimation=class extends nt{constructor(t,s,e,i,n,r){super();let h=Math.floor(100*e/55)/100;it.CreateTranslateFrame(t,s,h,h,i,n,r,this.AnimNativeId)}},Ct.CssKeyframeAnimation=class extends nt{constructor(t,s,e,i,n){super(),it.CreateCssKeyframe(t,s,e,i,n,this.AnimNativeId)}},Ct.ShaderAnimation=class extends nt{constructor(t,s){super(),it.CreateShaderAnimation(t,s,this.AnimNativeId)}},Ct.FreeMoveAnimation=class extends nt{constructor(t,s,e){super(),this.Hs=t,it.CreateFreeMoveAnimation(this.AnimNativeId,t,s,e)}},Ct.FreeMoveActEvtType=Q,Ct.FreeMoveCmdPackBuilder=class{static InitActCmdPack(t,s,e,i){return{t:1,cmds:i,tkn:isNaN(e)?0:e,spd:isNaN(t)?0:t,acc:isNaN(s)?0:s}}static InitStateCmdPack(t){return{t:2,cmd:t}}},Ct.FreeMoveConditionSet=class{static AppendSubCmd(t,s){const e="cmds";t.hasOwnProperty("cmdPacks")?console.error("Error: conflict with command pack list"):(t.hasOwnProperty(e)||(t[e]=[]),t[e]?.push(s))}static SetCmdList(t,s){s instanceof Array&&(t.hasOwnProperty("cmdPacks")?console.error("Error: conflict with command pack list"):t.cmds=s)}static SetCmdPackList(t,s){s instanceof Array&&(t.hasOwnProperty("cmds")?console.error("Error: conflict with sub-command list"):t.cmdPacks=s)}static InitCommonInfo(){return{g:0,m:!1,s:null,brk:!1}}static UpdateCommonInfo(t,s,e,i,n){t.g=s??0,t.m=e??!1,t.s=i??null,t.brk=n}static ReachPosition(t,s,e){let i=X(t,s),n={subt:1,react:1,e:i.e,xv:i.x,yv:i.y};return tt(n,e),n}static AcrossPosition(t,s,e){let i=X(t,s),n={subt:1,react:2,e:i.e,xv:i.x,yv:i.y};return tt(n,e),n}static BoxPosition(t,s,e,i,n){let r=0,h=0,l=0,a=0,o=0;isNaN(t)||(r=t,o|=1),isNaN(s)||(h=s,o|=2),isNaN(e)||(l=e,o|=4),isNaN(i)||(a=i,o|=8);let u={subt:1,react:7,de:o,lv:r,tv:h,rv:l,bv:a};return tt(u,n),u}static StartMove(t,s){return this.OnMovement(s,1,1,t)}static OnMovement(t,s,e,i){let n={subt:1,react:9,xv:s,yv:e,e:i};return tt(n,t),n}static OffsetPosition(t,s,e,i,n){let r=0,h=0,l=0,a=0,o=0;isNaN(t)||(r=t,o|=1),isNaN(s)||(h=s,o|=2),isNaN(e)||(l=e,o|=4),isNaN(i)||(a=i,o|=8);let u={subt:1,react:8,de:o,lv:r,tv:h,rv:l,bv:a};return tt(u,n),u}static WallPosition(t,s,e,i){let n,r=X(s,e);switch(t){case"left":n=4;break;case"top":n=3;break;case"right":n=5;break;case"bottom":n=6;break;default:return console.error("WallPosition undefined direction",t),null}let h={subt:1,react:n,e:r.e,xv:r.x,yv:r.y};return tt(h,i),h}static ReachSpeed(t,s,e){let i=X(t,s),n={subt:2,react:1,e:i.e,xv:i.x,yv:i.y};return tt(n,e),n}static AcrossSpeed(t,s,e){let i=X(t,s),n={subt:2,react:2,e:i.e,xv:i.x,yv:i.y};return tt(n,e),n}static TouchCount(t,s){let e={subt:5,react:2,tct:s};return tt(e,t),e}static OnNexusEvent(t,s,e){let i={subt:3,nexus:t,etyp:s};return tt(i,e),i}static OnDragStart(t,s){let e={subt:3,nexus:s,etyp:Q.ActEvent_ActDragStart};return tt(e,t),e}static OnDragEnd(t,s){let e={subt:3,nexus:s,etyp:Q.ActEvent_ActDragEnd};return tt(e,t),e}static OnTouchDown(t,s){let e={subt:3,nexus:s,etyp:Q.ActEvent_ActTouchDown};return tt(e,t),e}static OnTouchRelease(t,s){let e={subt:3,nexus:s,etyp:Q.ActEvent_ActTouchRelease};return tt(e,t),e}static OnFlingStart(t,s){let e={subt:3,nexus:s,etyp:Q.ActEvent_ActFlingStart};return tt(e,t),e}static OnFlingProgress(t,s){let e={subt:3,nexus:s,etyp:Q.ActEvent_ActFlingProgress};return tt(e,t),e}static OnFlingEnd(t,s){let e={subt:3,nexus:s,etyp:Q.ActEvent_ActFlingEnd};return tt(e,t),e}static OnFlingCancel(t,s){let e={subt:3,nexus:s,etyp:Q.ActEvent_ActFlingCancel};return tt(e,t),e}static OnFlingDrop(t,s){let e={subt:3,nexus:s,etyp:Q.ActEvent_ActFlingDrop};return tt(e,t),e}static OnHitBlock(t,s){let e={subt:4,blkGid:t};return tt(e,s),e}static OnNextTick(t,s){let e={subt:5,react:1,tgap:t};return s.m=!1,tt(e,s),e}static MovementSyncNexus(t,s){let e={subt:3,nexus:s,etyp:Q.ActEvent_MovementSync};return tt(e,t),e}},Ct.FreeMoveActionBuilder=class{static SetSpeed(t,s){let e=X(t,s);return{typ:2,set:{xv:e.x,yv:e.y,xye:e.e}}}static SetAccel(t,s){let e=X(t,s);return{typ:7,set:{xye:e.e,xv:e.x,yv:e.y}}}static AltSpeed(t,s,e){if(!e)return null;let i=X(t,s);return{typ:5,set:{xv:i.x,yv:i.y,xye:i.e,tim:Math.floor(e)}}}static StopMoving(){return{typ:3}}static StopMovingExact(){return{typ:9}}static BrakeToPos(t,s){let e=X(t,s);return{typ:4,set:{xv:Math.floor(e.x),yv:Math.floor(e.y),xye:e.e}}}static SetArrowSpeed(t,s,e,i){let n=X(t,s),r=X(e,i);return{typ:6,set:{xye:n.e,xv:Math.floor(n.x),yv:Math.floor(n.y),xye1:r.e,xv1:r.x,yv1:r.y}}}static TeleportTo(t,s,e){let i=X(t,s);return{typ:8,set:{xye:i.e,xv:Math.floor(i.x),yv:Math.floor(i.y),isAbs:!e}}}static AckMovementSync(t,s,e,i,n,r){return{typ:10,set:{hstart:t,hend:s,vstart:e,vend:i,xye:n,st:r}}}},Ct.FreeMoveStateBuilder=class{static FireEcho(t){return{typ:52,set:{tkn:t}}}static FireNexusEvent(t,s){return isNaN(s)||0==s?null:{typ:55,set:{etyp:isNaN(t)?0:t,nexus:s}}}static NewCondition(t){return{typ:st,set:{sub:1,set:t}}}static DelActionAssocCondition(){return{typ:st,set:{sub:5}}}static RemoveAllCondtions(){return{typ:st,set:{sub:6}}}static RemoveByGroup(t){return{typ:st,set:{sub:4,gt:t}}}static ActiveCondition(t,s){return{typ:st,set:{sub:2,gt:isNaN(t)||t<=0?$.GroupType_Invalid_Ext:t,sn:s}}}static DeactiveCondition(t,s){return{typ:st,set:{sub:3,gt:isNaN(t)||t<=0?$.GroupType_Invalid_Ext:t,sn:s}}}static SetOffsetPos(t,s){let e=X(t,s);return{typ:53,set:{xv:Math.floor(e.x),yv:Math.floor(e.y),xye:e.e}}}static SetPos(t,s){let e=X(t,s);return{typ:54,set:{xv:Math.floor(e.x),yv:Math.floor(e.y),xye:e.e}}}static TouchLockSwitch(t,s,e=-1){return{typ:59,set:{il:t,dir:s,ut:e}}}static SetTouchAttractChild(t){return{typ:60,set:{cid:t?t.AnimNativeId:0}}}static SetHitWallOverflow(){return{typ:56}}static RevertWithHitBlock(){return{typ:57}}static StartMovementSync(t,s,e,i,n,r){return{typ:61,set:{hstart:s,hend:e,vstart:i,vend:n,xye:r,nexus:t}}}static StopMovementSync(){return{typ:62}}};export{t as default};
|
|
1
|
+
/* eslint-disable */ let t={sRenderBridge:null,sActivityManager:null,DesignMap:null};window.Forge=t;let s=function(t){},e=function(t){},i=function(t){},n=function(t){throw new Error(t)};class r{constructor(){this.i=[],this.h=[],this.l=[],this.o={}}RequestAlterId(t,s){this.o[t]=s}AddToQueue(t,s){this.i.push(s),this.h.push(t)}HasUpdate(){return this.i.length>0}ReadSyncList(){if(this.l.length>0){for(let t of this.l)t();this.l=[]}let t=this.i;return this.RenewSyncList(),t}AddStartSyncCallback(t){this.l.push(t)}RenewSyncList(){if(this.h)for(let t of this.h)t.RenewSyncInfo(this,null);this.i=[],this.h=[]}ProcAlterIds(t,s){for(let e=0;e<t.length;e++)if(this.o.hasOwnProperty(t[e])){let i=this.o[t[e]];i.OnAlterId(s[e]),i.RenewSyncInfo(this,null)}else console.error(`Error: ProcAlterIds not found proxyId=${t[e]}`);this.o={}}}class h{constructor(t,s=null,e=null){this.u=t,this.PrefSyncInfo=null,this.p=null,this.S=!1,this.v=s,this.SuffSyncInfo=null,this.N=null,this.I=!1,this.InitPackage(e),this.RenewSyncInfo(this.u,null),this.RenewSyncInfo(this.v,null)}AddStartSyncCallback(t){this.u.AddStartSyncCallback(t)}CallToNative(s,e,i=!1){let n={fn:s,a:e};return i?(this.N.push(n),this.I||(this.v.AddToQueue(this,this.SuffSyncInfo),this.I=!0)):(this.p.push(n),this.S||(this.u.AddToQueue(this,this.PrefSyncInfo),this.S=!0)),t.sRenderBridge.RequestSwap(),n}RequestAlterId(t,s=!1){s?this.v.RequestAlterId(t,this):this.u.RequestAlterId(t,this)}SuffCallToNative(t,s){return{fn:t,a:s}}AlterCallParams(t,s){t&&(t.a=s)}RenewSyncInfo(t,s){s||(s={}),this.S=!1,this.I=!1,t&&t==this.u&&(this.p=[],this.PrefSyncInfo={tl:this.p,...s}),t&&t==this.v&&(this.N=[],this.SuffSyncInfo={tl:this.N,...s})}InitPackage(t){}OnAlterId(t){}}let l=new r,a=new r;class o extends h{constructor(t){super(l,a,{id:t}),this.R=null,this.C=t}InitPackage(t){this.C=t.id}RenewSyncInfo(t,s){super.RenewSyncInfo(t,{tt:1,id:this.C})}NeedAlterId(t,s){this.R=t,super.RequestAlterId(this.C,s)}OnAlterId(t){this.C=t,this.R.TexId=t,this.R=null}}let u=new class extends h{constructor(){super(l,a)}RenewSyncInfo(t,s){super.RenewSyncInfo(t,{tt:0})}};let c=new class{constructor(){this.A=[1]}AddData(t){return this.A.push(t),this.A.length-1}TakeArray(){const t=this.A;return this.A=[1],t}PickArray(){return this.A}GetSize(){return this.A.length}ResetForNextSwap(){this.A=[1]}};let d=1;class p{constructor(t,s,e=!1){this.O=s,this.TexId=t,this.P=!1,this.k=0,this.D=0,this.G=null,this._={},this.F=e}GetTextureId(){return this.TexId}RequestSyncerAlterId(){this.O.NeedAlterId(this,this.F)}RegisterLoadImageCallback(t,s,e){if(null==s)return 0;if(this.P)return s({width:this.k,height:this.D},e),0;{this.B();const t=d++,i=this,n=(n,r,h)=>{s({width:n,height:r,extra:h?JSON.parse(h):null},e),delete i._[t]};this._[t]=n;const r=c.AddData(n);return this.O.CallToNative(1,[t,r],this.F),t}}UnregisterLoadImageCallback(t){t>0&&void 0!==this._[t]&&delete this._[t]}DispatchCommand(s,e){this.O.CallToNative(3,[s,e],this.F),t.sRenderBridge.RequestSwap()}B(){if(null==this.G){const t=this;this.G=(s,e,i)=>{t.P=!0,t.k=s,t.D=e};const s=c.AddData(this.G);this.O.CallToNative(1,[d++,s],this.F)}}EnableBackgroundLoad(){this.P||(this.B(),this.O.CallToNative(4,null,this.F))}DisableBackgroundLoad(){this.O.CallToNative(5,null,this.F)}RequestToUnload(){this.O.CallToNative(6,null,this.F)}DisableAutoRecycle(){this.O.CallToNative(7,null,this.F)}}class f extends p{constructor(t,s,e=!1){super(t,s,e),this.V=null}registerOnStart(t){this.J();let s=this.V,e=++s.IdGen;if(s.StartMapCount++,s.StartMapCount>0&&0==s.GlobalStartCallbackId){s.GlobalStartCallbackId=e;const t=()=>{for(let t in s.OnStartMap)s.OnStartMap[t]?.()},i=c.AddData(t);this.O.CallToNative(10,[s.GlobalStartCallbackId,i],this.F)}return s.OnStartMap[e]=t,e}unregisterOnStart(t){if(!this.V)return;let s=this.V;s.OnStartMap.hasOwnProperty(t)&&s.StartMapCount--,0==s.StartMapCount&&0!=s.GlobalStartCallbackId&&(this.O.CallToNative(11,[s.GlobalStartCallbackId],this.F),s.GlobalStartCallbackId=0)}registerOnEnd(t){this.J();let s=this.V,e=++s.IdGen;if(s.EndMapCount++,s.EndMapCount>0&&0==s.GlobalEndCallbackId){s.GlobalEndCallbackId=e;const t=()=>{for(let t in s.OnEndMap)s.OnEndMap[t]?.()},i=c.AddData(t);this.O.CallToNative(12,[s.GlobalEndCallbackId,i],this.F)}return s.OnEndMap[e]=t,e}unregisterOnEnd(t){if(!this.V)return;let s=this.V;s.OnEndMap.hasOwnProperty(t)&&s.EndMapCount--,0==s.EndMapCount&&0!=s.GlobalEndCallbackId&&(this.O.CallToNative(13,[s.GlobalEndCallbackId],this.F),s.GlobalEndCallbackId=0)}J(){this.V||(this.V={IdGen:1,GlobalStartCallbackId:0,OnStartMap:{},StartMapCount:0,GlobalEndCallbackId:0,OnEndMap:{},EndMapCount:0})}}class y extends f{constructor(t,s){super(t,s,!0)}}let S=window.NativeGetIdGroupIntf();const v=10;class w{constructor(t){this.W=t,this.U=0,this.q=0,this.K=new Array(v),this.j=0;for(let t=0;t<v;t++)this.K[t]={start:0,end:0,expired:!0}}genId(){this.K[this.U].expired&&this.Y();let t=this.K[this.U],s=t.start;return t.start++,t.start>t.end&&(t.expired=!0,this.U=(this.U+1)%v,this.j--),s}Y(){let t=20*(v-this.j);if(t>0){let s=S.GetIdArray(this.W,t);if(s){let t=JSON.parse(s);this.X(t[0],t[1])}}}X(t,s){let e=s-t+1,i=Math.floor(e/20),n=t;for(let t=0;t<i;t++){let t=this.K[this.q];t.start=n,t.end=n+20-1,t.expired=!1,this.q=(this.q+1)%v,n=t.end+1}this.j+=i,this.j>v&&console.error(`team over size to ${this.j}`)}}let m=new class{constructor(){this.$=new w(0),this.Z=new w(1),this.et=new w(2),this.it=new w(3)}genViewId(){return this.$.genId()}genTextureId(){return this.Z.genId()}genAnimationId(){return this.et.genId()}genSensorId(){return this.it.genId()}};var N,x,g;!function(t){t.RGBA_8888="RGBA_8888",t.RGBA_4444="RGBA_4444",t.RGBA_5551="RGBA_5551",t.RGB_565="RGB_565",t.RGB_ETC1="RGB_ETC1",t.RGBA_ETC1="RGBA_ETC1"}(N||(N={})),function(t){t.L=1,t.M=0,t.Q=3,t.H=2}(x||(x={})),function(t){t.AUTO=0,t.SYNC=1,t.ASYNC=2}(g||(g={}));class I{constructor(){this.O=u}GetId(){return 0}GetColorTexture(t){let s=m.genTextureId();this.O.CallToNative(1,[t,s]);let e=new p(s,new o(s));return e.RequestSyncerAlterId(),e}GetImage(t,s,e){return this.GetImage2(t,s,null,null,e)}GetImage2(t,s,e,n=N.RGBA_8888,r="",h=!1){if(!t||0==t.length)return i("GetImage2, url is not setted!"),null;let l=m.genTextureId(),a=0,u=0;e&&(a=e.width,u=e.height),n||(n=N.RGBA_8888),r||(r="");let c=null!=h&&h;this.O.CallToNative(2,[t,a,u,n,r,c,l]);let d=new p(l,new o(l));return d.RequestSyncerAlterId(),d}GetQRCodeTexture(t,s,e,i=g.AUTO,n=x.Q,r="#ffffff",h="#000000",l=-1){let a=m.genTextureId();return this.O.CallToNative(3,[t,s,e,n,r,h,l,i,a]),new p(a,new o(a))}GetDownloadTexture(t,s,e){if(!t)return i("GetDownloadTexture, url is null!"),null;let n=m.genTextureId();return this.O.CallToNative(4,[t,s,e,n]),new p(n,new o(n))}GetDomProxyTexture(t){let s=m.genTextureId();return this.O.CallToNative(5,[t,s],!0),new y(s,new o(s))}GetCanvasTexture(t,s){let e=m.genTextureId();return this.O.CallToNative(6,[t,s,e],!1),new p(e,new o(e))}GetPluginTexture(t,s){let e=m.genTextureId();return this.O.CallToNative(7,[t,s,e],!1),new p(e,new o(e))}GetCapturedTexture(){let t=m.genTextureId();return this.O.CallToNative(8,[t],!1),new p(t,new o(t))}}let b=new class{constructor(){this.nt=1}get count(){return this.nt}update(){this.nt<Number.MAX_SAFE_INTEGER?++this.nt:this.nt=1}},R=new r,C=new r;let A=new class extends h{constructor(){super(R,C)}RenewSyncInfo(t){super.RenewSyncInfo(t,{tt:0})}};class O extends h{constructor(t){super(R,C,{id:t}),this.rt=t}InitPackage(t){this.rt=t.id}RenewSyncInfo(t){super.RenewSyncInfo(t,{tt:1,id:this.rt})}}let T=new r,E=new r;class P extends h{constructor(t){super(T,E,{id:t}),this.ht=t}InitPackage(t){this.ht=t.id}RenewSyncInfo(t){super.RenewSyncInfo(t,{tt:1,id:this.ht})}}let k=new class extends h{constructor(){super(T,E)}RenewSyncInfo(t){super.RenewSyncInfo(t,{tt:0})}},D=new r;class G extends h{constructor(t){super(null,D,{id:t}),this.lt=t}InitPackage(t){this.lt=t.id}RenewSyncInfo(t,s){super.RenewSyncInfo(t,{tt:1,id:this.lt})}}let L=new class extends h{constructor(){super(null,D)}RenewSyncInfo(t,s){super.RenewSyncInfo(t,{tt:0})}};var _=null,F=null;class M{constructor(){this.ot={width:160,height:90,x:2/160,y:2/90,perspective:2/160,scaleRatio:1,designedWidth:1280},this.SwapCurrentTime=Date.now(),this.SwapCurrentCount=0,this.ct=new Map,this.dt=this.ft.bind(this),this.yt={hdl:null},this.St=!0,this.vt=-1,this.wt=!1,this.Nt=1,this.St=!1,this.xt(),this.It=!1,this.bt=[],this.Rt=1,this.Ct.OnScreenHide&&window.JsView?.onVisibilityChange((t=>{'{"status":"hide"}'===t&&this.Ct.OnScreenHide()}))}xt(){void 0!==global.NativeSendImpactSensorSyncData&&global.NativeSendImpactSensorSyncData.bind(this.yt),void 0!==global.NativeSetStepFpsSwitch&&(_=global.NativeSetStepFpsSwitch.bind(this.yt)),void 0!==global.NativeSetGlobalConfig&&(F=global.NativeSetGlobalConfig.bind(this.yt)),this.Ct=global.NativeGetRenderIntf(),this.Ct.RegisterSwapFunc((()=>{this.RequestSwap()})),this.At=this.At.bind(this),this.Ct.RegisterPreDomSyncFunc((()=>{this.Ot()})),this.Ct.RegisterOnScreenInfo(this.Tt.bind(this))}SetStepFpsSwitch(t){this.St?_&&_(t):(console.warn("SetStepFpsSwitch(): API link status no ready!"),this.bt.push((()=>{this.SetStepFpsSwitch(t)})))}SetGlobalConfig(t){if(this.St){if(F){let s=JSON.stringify(t);console.log("SetGlobalConfig set with "+s),F(s),console.log("SetGlobalConfig set done")}}else console.warn("SetGlobalConfig(): API link status no ready!"),this.bt.push((()=>{this.SetGlobalConfig(t)}))}Et(){if(this.bt.length>0){for(let t=0;t<this.bt.length;t++)this.bt[t]();this.bt=[]}}RequestSwap(){this.wt?this.Rt++:(this.wt=!0,this.Rt++,this.Nt++,this.Pt(this.Nt))}Pt(t){let s=this,e=this.Rt;Promise.resolve().then((()=>{e==s.Rt?s.InstantPerformSwap():t==this.Nt&&s.Pt(t)}))}NotifyNetTypeStatus(t,s){}EnableRequestSwap(t){this.It=t,this.Ct.EnableRequestSwap(t)}InstantPerformSwap(){this.wt&&(this.wt=!1,this.Nt++,this.At(!1))}kt(t,s,e,i,n){let r=null,h=null,l=null,a=null,o=null;if(t.HasUpdate()&&(l=t.ReadSyncList()),s.HasUpdate()&&(h=s.ReadSyncList()),e.HasUpdate()&&(r=e.ReadSyncList()),i?.HasUpdate()&&(a=i.ReadSyncList()),null==r&&null==h&&null==l&&null==a||(o=this.Ct.SyncForgeJsCall(JSON.stringify({TexSync:l,AnimSync:h,ViewSync:r,SensorSync:a}),n)),o){let s;this.wt=!1,s=JSON.parse(o).TexSyncRet,s&&this.Dt(t,s)}}Ot(){this.kt(l,R,T,null,c.PickArray())}At(t){if(!this.It)return void(this.wt=!1);b.update();let s=c.GetSize();if(this.kt(l,R,T,null,c.PickArray()),this.ct.size>0&&this.ct.forEach(this.dt),this.kt(a,C,E,D,c.PickArray()),s==c.GetSize())c.ResetForNextSwap();else{let t=c.GetSize();t>50&&console.warn("Warning: temp sync store kept with large size = "+t)}t=!!t,this.wt=!1,this.SwapCurrentTime=Date.now(),this.SwapCurrentCount++,this.Ct.DoRequestSwap(t)}GetScreenInfo(){return this.ot}SetForgeRtHandler(t){this.yt.hdl=t,this.St=!0,this.Ct.SetForgeRtHandler(t),this.Et()}InitScreenBuffer(t,s){isNaN(t)&&(t=1),isNaN(s)&&(s=1280);var e=s*t,i=e/16*9;this.ot.width=Math.floor(e),this.ot.height=Math.floor(i),this.ot.x=2/this.ot.width,this.ot.y=2/this.ot.height,this.ot.perspective=this.ot.x,this.ot.scaleRatio=t,this.ot.designedWidth=s}InitNativeScreenBuffer(){if(this.St){var t=JSON.stringify({displayScaleRatio:this.ot.scaleRatio,designedMapWidth:this.ot.designedWidth});this.Ct.InitScreenBuffer(t)}else console.info("InitNativeScreenBuffer(): API link status no ready!")}SyncBackStatus(t,s){this.Ct.SyncBackStatus(t,s)}TakeAndSyncBackStatus(){1==this.Ct.TakeAndSyncBackStatus()&&this.RequestSwap()}Tt(t,s,e,i,n){this.ot.width=t,this.ot.height=s,this.ot.x=e,this.ot.y=i,this.ot.perspective=n}HasPendingRenderBreak(){return!!this.St&&this.Ct.HasPendingRenderBreak()}FinishRenderBreak(t){this.St?this.Ct.FinishRenderBreak(t):(console.warn("FinishRenderBreak(): API link status no ready, delay"),this.bt.push((()=>{this.Ct.FinishRenderBreak(t)})))}AddWillSwapListener(t,s){this.ct.set(t,s)}AddSwappedOnceObserver(t){this.St?this.Ct.AddSwappedOnceObserver(t):(console.warn("AddSwappedOnceObserver(): API link status no ready, delay"),this.bt.push((()=>{this.Ct.AddSwappedOnceObserver(t)})))}ActiveComponent(t){this.St?this.Ct.ActiveComponent(t):(console.warn("ActiveComponent(): API link status no ready, delay"),this.bt.push((()=>{this.Ct.ActiveComponent(t)})))}ShutdownComponents(t){this.St?this.Ct.ShutdownComponents(t):(console.warn("ShutdownComponents(): API link status no ready, delay"),this.bt.push((()=>{this.Ct.ShutdownComponents(t)})))}SetPlatformMsgDisp(t){this.Gt=t}GetPlatformMsgDisp(){return this.Gt}GetTextToolsApi(){return this.Ct.TextToolApi}ft(t){t()}Dt(t,s){let e;e=s.idAlter,e&&t.ProcAlterIds(e.proxy,e.real)}}class B{constructor(){this.Lt=!1,this._t=0,this.Ft=!1,this.Mt=0,this.Bt=0,this.Vt=!1,this.Jt=!1,this.Wt=0,this.Ut=0,this.qt=void 0!==window.jRuntimeBridge?.getSystemUptimeMillis,this.qt&&(this.Vt=!0,this.Ht())}SetTranslateDelay(t){B.sKeyTranslateDelay=t}CheckKey(t){if(!t.timeStamp||this.Lt)return!1;this.Ft=!0;const s=Date.now(),i=t.timeStamp;!this.Vt&&i-this._t>3e3&&(this.Mt=s,this.Bt=i,this._t=i);let n=s-this.Mt;(n<0||n>5e3)&&(this.qt?this.Ht():(this.Mt=s,this.Bt=i),n=0);return n+this.Bt-i>B.CONST_MAX_PASSING_GAP&&Math.abs(this.Ut-i)<B.CONST_MIN_VALID_KEY_GAP&&!t.repeat?(!this.Jt&&this.Vt&&(this.Wt++,this.Wt>50&&e("More than 50 keys are expired...")),!0):(this.Jt||(this.Jt=!0),this.Ut=i,!1)}toggleKeyGuard(){this.Lt=!this.Lt}IsActive(){return this.Ft}Ht(){this.Mt=Date.now(),this.Bt=window.jRuntimeBridge.getSystemUptimeMillis()-B.sKeyTranslateDelay}}B.CONST_MAX_PASSING_GAP=20,B.CONST_MIN_VALID_KEY_GAP=180,B.sKeyTranslateDelay=5;let V,J=new B;class W{constructor(n,r,h){var l;if(this.Kt=null,this.zt=1280,this.jt=!1,this.Yt=0,l=4,console.log.bind(console),l>0&&console.error.bind(console),l>1&&(s=console.error.bind(console)),l>2&&(e=console.warn.bind(console)),l>3&&(i=console.log.bind(console)),l>4&&console.debug.bind(console),this.Xt=new I,this.Qt=new M,t.sRenderBridge=this.Qt,isNaN(h)&&(h=1280),this.zt=h,this.jt=!1,this.$t(n,r,h),this.Zt={keyProc:null,keyUpProc:null,activityStateProc:null},this.ts(this.Zt),this.ss(this.Zt),this.es=this.Qt.InstantPerformSwap.bind(this.Qt),null!=n){this.Yt=n.canvasNativeHandle;for(let t in this.Zt)n[t]=this.Zt[t]}t.sActivityManager=this,console.log("manager done")}GetTextureManager(){return this.Xt}DelayedActivateCanvas(t){if(0==this.Yt){this.Yt=t.canvasNativeHandle,this.ns(t);for(let s in this.Zt)t[s]=this.Zt[s];this.Qt.InitNativeScreenBuffer(),this.Qt.RequestSwap()}else s("Error: already activated")}GetCanvasHandler(){return this.Yt}StartActivity(t){this.Kt=t}$t(t,s,e){this.ns(t),this.Qt.InitScreenBuffer(s,e),this.Qt.InitNativeScreenBuffer()}ns(t){null!=t&&(this.Qt.SetForgeRtHandler(t.frtNativeHandle),t.renderBridge=this.Qt,this.Qt.EnableRequestSwap(!0))}rs(t){if(this.jt)return!0;var s=!0;if(this.Kt){if(J.CheckKey(t))return console.log("keyEventGuard ignore keys"),!1;J.IsActive()&&this.Qt.InstantPerformSwap(),s=!this.Kt.DispatchKeyDown(t),this.Qt.TakeAndSyncBackStatus()}return s}hs(t){if(this.jt)return!0;var s=!0;return this.Kt&&(s=!this.Kt.DispatchKeyUp(t),this.Qt.TakeAndSyncBackStatus()),s}ts(t){t.keyProc=this.rs.bind(this),t.keyUpProc=this.hs.bind(this)}ss(t){let s=this;var e=function(t){var e=t.State;switch(console.log("ActivityStateListenerChanged, state:"+e),e){case"onActivityResumed":s.Qt.EnableRequestSwap(!0),s.Qt.InstantPerformSwap();break;case"onActivityPaused":s.Qt.EnableRequestSwap(!1)}}.bind(this);t.activityStateProc=e}}class U{constructor(){this.ls=null}Init(t){let s=1280,e=1;try{if(H){let t=H();"number"==typeof t.width&&(s=t.width),"number"==typeof t.displayScale&&(e=t.displayScale)}}catch(t){console.log("Note: DesignMap failed")}this.ls=new W(t,e,s),q?q(this.ls):console.error("FATAL: no found entry")}getActivityManager(){return this.ls}}let q=null,H=null;class K{constructor(t){this.PageName=t,this.us=null,this.cs=null,this.SubPages=[],this.ds=null,this.jt=!1}OnRenderFrame(){s("OnRenderFrame() MUST override")}OnKeyDown(t){return!1}OnKeyUp(t){return!1}DispatchKeyDown(t){if(this.jt)return!0;let s=!1;return this.us&&(s=this.us.DispatchKeyDown(t)),s||(s=this.OnKeyDown(t)),s}OnCustomEvent(t){return!1}BubbleCustomEvent(t){this.OnCustomEvent(t)||this.ds&&this.ds.BubbleCustomEvent(t)}DispatchKeyUp(t){if(this.jt)return!0;let s=!1;return this.us&&(s=this.us.DispatchKeyUp(t)),s||(s=this.OnKeyUp(t)),s}PrintLastFocusPage(){let t="------"+this.PageName+"\n",s=this.ds;return s&&(t+=s.PrintLastFocusPage()),t}IsFocus(){return!this.ds||this.ds.us==this}ps(){return this.IsFocus()&&!this.us}SetParent(t){null!=t?(this.ds=t,t.SubPages.push(this)):n("ERROR: parent is null")}SetParentPage(t){this.SetParent(t)}OnRemoveFromTree(){if(this.ds=null,this.SubPages&&this.SubPages.length>0){for(let t of this.SubPages)t.OnRemoveFromTree();this.SubPages=[]}}RemoveSubPage(t){t==this.us&&(this.us=null),t==this.cs&&(this.cs=null);for(let s=0;s<this.SubPages.length;s++)if(t==this.SubPages[s]){this.SubPages.splice(s,1);break}}ClearSubPages(){this.SubPages=[],this.us=null,this.cs=null}GetParentPage(){return this.ds}Focus(t=!1){if(this.IsFocus()){if(!t)return void i("requestFocus(): Already focused name="+this.PageName);if(this.ps())return void i("requestFocus(): Already focused name="+this.PageName)}if(this.ds){let s,e=[],i=this;for(;i.ds&&!i.IsFocus();)e.push(i),i=i.ds;s=t&&0==e.length?this.us:e[e.length-1].ds?.us;let r=[];for(;s;)r.push(s),s=s.us;for(let t=r.length-1;t>=0;t--)r[t].fs();for(let t=e.length-1;t>=0;t--)e[t].ys();if(t)this.cs=null;else{let t=e[0];for(;t.cs&&null==t.us;)t.cs.ys(),t=t.us,t||n("ERROR: focus chain is broken")}}}ReturnFocusToParent(){this.ds&&(this.IsFocus()&&this.ds.Focus(!0),this.ds.us==this&&(this.ds.us=null),this.ds.cs==this&&(this.ds.cs=null))}ys(){this.ds?(this.ds.us=this,this.ds.cs=this,this.OnFocus()):s("No dispatcher")}fs(){this.ds?this.ds.us==this?(this.ds.us=null,this.OnBlur()):e("Not focus yet, page name="+this.PageName):s("No dispacher")}GetFocusChild(){return this.us}OnFocus(){e("No overrided Page OnFocus event, page name="+this.PageName)}OnBlur(){e("No overrided Page OnBlur event, page name="+this.PageName)}KeyLock(){this.jt=!0}UnKeyLock(){this.jt=!1}}var z;!function(t){t.VIEW_COMMAND=0,t.TEXTURE_COMMAND=1,t.ANIM_COMMAND=2,t.SYNC_COMMAND=3,t.APIC_PLAY=0,t.APIC_STOP=1,t.GET_BOUNDING_RECT=0,t.FILTER_VIEW_WAVE=1,t.TRANSLATE_FRAME_ALT_SPEED=0,t.FREE_MOVE_RUN_CMDPACKS=1,t.EXE_DEFAULT=0,t.EXE_AFTER_RENDER=1}(z||(z={}));const j=(t,s)=>{let e=0,i=0,n=0;return isNaN(t)||(e|=1,i=t),isNaN(s)||(e|=2,n=s),{e:e,x:i,y:n}};var Y,X,Q;!function(t){t.ActEvent_ActFinish=1,t.ActEvent_Speed_X_Revert=2,t.ActEvent_Speed_Y_Revert=3,t.ActEvent_ActReject=4,t.ActEvent_ActDragStart=5,t.ActEvent_ActDragEnd=6,t.ActEvent_ActFlingStart=7,t.ActEvent_ActFlingProgress=8,t.ActEvent_ActFlingEnd=9,t.ActEvent_ActTouchDown=10,t.ActEvent_ActTouchRelease=11,t.ActEvent_ActFlingCancel=12,t.ActEvent_ActFlingDrop=13,t.ActEvent_MovementSync=14}(Y||(Y={})),function(t){t.GroupType_ActionAssoc=10,t.GroupType_Fling=11,t.GroupType_Invalid_Ext=65535}(X||(X={})),function(t){t.FLING_ON_PROGRESS_INTERVAL=200}(Q||(Q={}));const $=(t,s)=>{t.gtype=s.g,t.once=s.m?0:1;let e=s.s;e&&(t.name=e),t.brk=s.brk?1:0};const Z=51;function tt(t){return t?JSON.stringify(t.Package()):null}let st=new class{constructor(){this.O=A}CreateTranslate(t,s,e,i,n,r,h){n!=1/0&&null!=n||(console.warn("translate animation duration invalid="+n),n=0),this.O.CallToNative(1,[t,s,e,i,n,tt(r),h])}CreateRotate(t,s,e,i,n,r,h){n!=1/0&&null!=n||(console.warn("rotate animation duration invalid="+n),n=0),this.O.CallToNative(2,[t,s,e.x,e.y,e.z,i.x,i.y,i.z,n,tt(r),h])}CreateScale(t,s,e,i,n,r,h,l,a,o,u){a!=1/0&&null!=a||(console.warn("scale animation duration invalid="+a),a=0),this.O.CallToNative(3,[t,s,e,i,n,r,h,l,a,tt(o),u])}CreateTranslateFrame(t,s,e,i,n,r,h,l){this.O.CallToNative(5,[t,s,e,i,!!n,r,h,l])}CreateCssKeyframe(t,s,e,i,n,r){s!=1/0&&null!=s||(console.warn("css animation duration invalid="+s),s=0),this.O.CallToNative(6,[t,s,e,i,n,r])}CreateFreeMoveAnimation(t,s,e,i){this.O.CallToNative(7,[t,s?c.AddData(s):0,e,i?1:0])}CreateShaderAnimation(t,s,e){this.O.CallToNative(8,[t,s,e])}};class et{constructor(){this.AnimNativeId=m.genAnimationId(),this.O=new O(this.AnimNativeId),this.Ss=null,this.vs=null}SetAnimationListener(t){this.ws(t)}AddAnimationListener(t){this.Ss&&t.AddInherit(this.Ss),this.ws(t)}RemoveAnimationListener(){this.Ss=null}Enable(t){this.O.CallToNative(2,[t])}EnableInfinite(){return this.O.CallToNative(3,null),this}SetRepeat(t){return this.O.CallToNative(5,[t]),this}EnableDelay(t){return this.O.CallToNative(4,[t]),this}SetStartPos(t){return t>=0&&t<=1?this.O.CallToNative(6,[t]):console.warn("Warning: SetStartPos() out of range"),this}ws(t){let s=!0;if(this.Ss&&(s=this.Ss.ListenerEnabledFlags==t.ListenerEnabledFlags),this.Ss=t,null!=this.Ss&&(null==this.vs||!s)){let t=this;this.vs=s=>{t.Ss?.InvokeFromNativeForge(s)};let s=c.AddData(this.vs);this.O.CallToNative(1,[s,this.Ss.ListenerEnabledFlags])}}}var it,nt;!function(t){t.ReleaseAfterEndCallback=1,t.KeepTransform=2,t.AckFinalProgress=4,t.AckRepeat=8}(it||(it={})),function(t){t.AltSpeed=(t,s,e)=>{let i={S60:Math.floor(100*s/55)/100,T:e};t?.DispatchAnimCommand(z.TRANSLATE_FRAME_ALT_SPEED,JSON.stringify(i))},t.RunFreeMoveCmdPacks=(t,s)=>{t?.DispatchAnimCommand(z.FREE_MOVE_RUN_CMDPACKS,JSON.stringify(s))}}(nt||(nt={}));class rt{constructor(){this.Ns="COMMON"}Type(){return this.Ns}ToSyncJsonObj(t){return t||(t={}),t.typ=this.Ns,t}}let ht=new class{constructor(){this.xs={},this.gs=0}add(t){let s=t.view.ViewId;return this.xs.hasOwnProperty(s)&&(this.xs[s]=t),s}remove(t){this.xs[t]&&delete this.xs[t]}get(t){return this.xs[t]}clear(){this.xs={},this.gs=0}};class lt{constructor(){this.SensorId=m.genViewId(),this.Is=new G(this.SensorId),this.CreateSensor()}CreateSensor(){}CreateTypedSensor(t){L.CallToNative(1,[this.SensorId,t],!0)}Recycle(){this.Is.CallToNative(1,null,!0)}}class at{constructor(t,s,e,i){this.Texture=t,this.MaskSetting=s,void 0===i&&(i=!0),this.HasAlpha=i}ToSyncJsonObj(t=void 0){return t||(t={}),t.texId=this.Texture?this.Texture.TexId:0,t.alpha=this.HasAlpha,this.MaskSetting?t.mask=this.MaskSetting.ToSyncJsonObj():t.mask=null,t}}var ot;!function(t){var s,e,i;(s=t.ControlType||(t.ControlType={})).DoKeepInRender=1,s.RecycleKeptView=2,(e=t.SyncedType||(t.SyncedType={})).Synced=0,e.NotSynced=1,e.RequestKeepInRender=2,e.OnKeepingInRender=3,e.RecycleKeeping=4,(i=t.TextureCoordAnchor||(t.TextureCoordAnchor={})).LeftTop=1,i.CenterTop=2,i.RightTop=3,i.LeftMiddle=4,i.Center=5,i.RightMiddle=6,i.LeftBottom=7,i.CenterBottom=8,i.RightBottom=9}(ot||(ot={}));let ut=new class{constructor(){this.O=k}CreateNativeView(t,s,e){this.O.CallToNative(1,[t,s],e)}CreateJsRootView(t){this.O.CallToNative(2,[t])}CreateDomProxyView(t,s,e){this.O.CallToNative(3,[t,s,e?1:0],!0)}};class ct{constructor(t,s,e=!1){this.Visibility=void 0,this.O=new P(t),this.ViewId=t,this.TextureSetting=null,this.bs=null,this.F=e,this.Rs=null,this.CreateView(s)}CreateView(t=void 0){}ResetTexture(t=null){if(!this.bs){this.bs=this.O.CallToNative(1,null,this.F);let t=this;this.O.AddStartSyncCallback((()=>{this.TextureSetting?t.O.AlterCallParams(t.bs,[t.TextureSetting.ToSyncJsonObj()]):t.O.AlterCallParams(t.bs,[null]),t.bs=null}))}this.TextureSetting=t}BindedPageBase(t){}SetVisibility(t){if("INHERIT"!==t&&void 0!==t||(t="VISIBLE"),this.Visibility!=t){this.Visibility=t;let s=0;switch(t){case"VISIBLE":s=1;break;case"GONE":s=2;break;case"HIDDEN":s=3;break;default:return void console.error("unknown visible type="+t)}this.O.CallToNative(2,[s],this.F)}}AddView(t,s){let e={x:0,y:0,width:0,height:0};s&&(e=this.Cs(s)),this.O.CallToNative(3,[t.ViewId,s?1:0,e.x,e.y,e.width,e.height],this.F)}ClearViews(){this.O.CallToNative(4,null,this.F)}ResetTextureCssTransform(t,s){t=t||"",s=s||"",this.O.CallToNative(5,[t,s],this.F)}SetTextureCoord(t,s,e,i,n=ot.TextureCoordAnchor.Center){this.O.CallToNative(9,[t,s,e,i,n],this.F)}ResetLayoutParams(t){let s;null!=t?(s=this.Cs(t),this.O.CallToNative(6,[s.x,s.y,s.width,s.height],this.F)):n("ResetLayoutParams(): new params is null")}Cs(t){return{x:isNaN(t.x)?0:t.x,y:isNaN(t.y)?0:t.y,width:isNaN(t.width)?0:t.width,height:isNaN(t.height)?0:t.height}}GetBoundingClientRect(){return new Promise(((t,s)=>{null!=this.Rs&&(this.Rs=null),this.Rs=e=>{null!=this.Rs&&(this.Rs=null);const i=JSON.parse(e);0==i.status?t(i.data):s(i.error)};const e=c.AddData(this.Rs);this.O.CallToNative(12,[e],this.F)}))}StartAnimation(t,s,e){let i=t?t.AnimNativeId:0;this.O.CallToNative(7,[i,isNaN(e)?0:e],this.F)}StopAnimation(){this.O.CallToNative(8,null,this.F)}DispatchAnimCommand(t,s){this.O.CallToNative(13,[t,s],this.F)}StartTextureAnimation(t){let s=t?t.AnimNativeId:0;this.O.CallToNative(10,[s],this.F)}StopTextureAnimation(){this.O.CallToNative(11,null,this.F)}DragEnables(t){this.O.CallToNative(14,[t],this.F)}SetTapListener(t=void 0){if(null!=t){const s=c.AddData(t);this.O.CallToNative(15,[s],this.F)}else this.O.CallToNative(15,[0],this.F)}EnableAutoSize(){this.O.CallToNative(16,[],this.F)}RegisterFlexAssigned(t=void 0){if(null!=t){const s=c.AddData(t);this.O.CallToNative(17,[s],this.F)}else this.O.CallToNative(17,[0],this.F)}EnableVisibleTestRect(){this.O.CallToNative(18,[],this.F)}Capture2Texture(t,s=void 0){if(!t)return void console.error("Error: Capture2Texture need target texture");let e=t.GetTextureId();if(!s)return void console.error("Error: Capture2Texture need callback");const i=c.AddData(s);this.O.CallToNative(19,[e,i],this.F)}}class dt extends ct{constructor(t=null){!t||t instanceof at||n("ERROR:LayoutView need TextureSetting as parameter"),super(m.genViewId(),{DomDepends:!1}),this.Visibility="VISIBLE",t&&this.ResetTexture(t)}CreateView(t){ut.CreateNativeView(this.ViewId,0,t.DomDepends)}}function pt(t){let s=[];if(t instanceof Array)for(let e of t)e instanceof ct&&s.push(e.ViewId);return s}class ft extends lt{constructor(t,s,e,i){super(),this.InitSet(t,s,e,i)}CreateSensor(){this.CreateTypedSensor(3)}InitSet(t,s,e,i){let n=0;e&&(n=c.AddData((t=>{1==t?e.OnBeginContact?.():2==t&&e.OnEndContact?.()}))),this.Is.CallToNative(20,[t.ViewId,s.ViewId,n,i?i.SensorId:0],!0)}}let yt={StartTrace:(t,s,e,i)=>new ft(t,s,e,i),Callback:class{constructor(t,s){this.OnBeginContact=t,this.OnEndContact=s}UpdateImpactCallback(t){this.OnBeginContact=t}UpdateLeaveCallback(t){this.OnEndContact=t}},AutoFroze:class extends lt{constructor(t,s){super(),this.InitSet(),this.As(pt(t)),this.Os(pt(s)),this.Ts()}CreateSensor(){this.CreateTypedSensor(2)}InitSet(){this.Is.CallToNative(25,null,!0)}UpdatePreImpactList(t){this.As(pt(t)),this.Ts()}UpdateOnImpactList(t){this.Os(pt(t)),this.Ts()}As(t){this.Is.CallToNative(26,[...t],!0)}Os(t){this.Is.CallToNative(27,[...t],!0)}Ts(){this.Is.CallToNative(28,null,!0)}}};var St;!function(t){t[t.NONE=0]="NONE",t[t.TEXT=1]="TEXT",t[t.PASSWORD=2]="PASSWORD",t[t.TEXT_AREA=3]="TEXT_AREA",t[t.CONTENT_EDITABLE=4]="CONTENT_EDITABLE",t[t.SEARCH=5]="SEARCH",t[t.URL=6]="URL",t[t.EMAIL=7]="EMAIL",t[t.TELEPHONE=8]="TELEPHONE",t[t.NUMBER=9]="NUMBER"}(St||(St={}));var vt,wt;!function(t){var s;(s=t.UniformType||(t.UniformType={}))[s.FLOAT=1]="FLOAT"}(vt||(vt={})),function(t){var s,e;(s=t.Type||(t.Type={}))[s.GRAY_DOWN=1]="GRAY_DOWN",s[s.WAVE=2]="WAVE",(e=t.Wave||(t.Wave={}))[e.CIRCLE_WAVE=1]="CIRCLE_WAVE",e[e.RECTANGLE_WAVE=2]="RECTANGLE_WAVE"}(wt||(wt={}));let mt=0;class Nt{constructor(){this.sourceList=[]}addSource(t,s,e,i,n){i=i??{type:wt.Wave.CIRCLE_WAVE},n=n??{timeDecay:3,distanceDecay:10,speed:100,frequency:8,waveNum:2};const r=++mt;let h=0,l=0,a=0;return i.type==wt.Wave.RECTANGLE_WAVE&&(h=i.width,l=i.height,a=i.radius),this.sourceList.push(r,t,s,e,h,l,a,n.timeDecay,n.distanceDecay,n.speed,n.frequency,n.waveNum),r}getSourceList(){const t=this.sourceList;return this.sourceList=[],t}}class xt extends ct{constructor(t,s){super(m.genViewId(),{DomElementId:t,UseMaskView:s},!0),this.Visibility="VISIBLE"}CreateView(t){ut.CreateDomProxyView(this.ViewId,t.DomElementId,t.UseMaskView)}RegisterOnProxyReady(t){t?.()}}function gt(t){return isNaN(t)?0:parseInt(t)}function It(t){return{fontFamily:t.fontFamily?t.fontFamily:Tt.sDefaultFont,fontSize:gt(t.fontSize),italic:"italic"===t.fontStyle,bold:"bold"===t.fontWeight,hasEmoji:1==t.JsvTextEmoji}}function bt(){return t.sRenderBridge.GetTextToolsApi()}function Rt(t,s){let e=It(s);return bt().GetTextWidth(t,JSON.stringify(e))}function Ct(t,s){let e=It(s);const i=bt().GetOneLineTextDrawWidth(t,JSON.stringify(e)),n={totalWidth:i[0],sliceInfo:[]};for(let t=1;t<i.length;t+=3)n.sliceInfo.push({start:i[t],end:i[t+1],width:i[4]});return n}function At(t,s,e,i,n,r){let h;if(t>0)h=bt().GetCursorPosition(t,s,null,null,null,1);else{let l=It(i),a=function(t){let s=gt(t.height),e=gt(t.lineHeight),i="string"==typeof t.wordWrap?t.wordWrap:"none";return"nowrap"==t.whiteSpace&&(i="none"),{width:gt(t.width),height:s,textAlign:"string"==typeof t.textAlign?t.textAlign:"left",lineHeight:0==e?s:e,wordWrap:i,textOverflow:"string"==typeof t.textOverflow?t.textOverflow:"clip"}}(n);h=bt().GetCursorPosition(t,s,e,JSON.stringify(l),JSON.stringify(a),r?1:0)}return h}function Ot(t){bt().RemoveCursorTextCache(t)}var Tt;!function(t){t.sDefaultFont="黑体",t.sDefaultFontSize=30,t.sDefaultFontColor="#FFFFFF",t.sDefaultBackgroundColor="rgba(0, 0, 0, 0)",t.GetTextWidth=Rt,t.GetOneLineTextDrawWidth=Ct,t.GetCursorPosition=At,t.RemoveCursorTextCache=Ot}(Tt||(Tt={}));let Et=t;Et.Run=function(t){return V=new U,V.Init(t),V},Et.InitStarter=function(s,e){t.DesignMap=e,q=s,H=e},Et.NewDomProxyView=function(t,s){return new xt(t,s)},Et.sFrameCount=b,Et.NativeConstant=z,Et.PageBase=K,Et.ReactActivity=class extends K{constructor(t,s){super(t),this.Xt=s.GetTextureManager()}GetTextureManager(){return this.Xt}SetContentView(t,s){this.Es=t,this.Ps=s}},Et.ViewTextureMask=class extends rt{constructor(t){super(),this.Ns="TEXTURE",this.ImageTexture=t}ToSyncJsonObj(t){return t||(t={}),t.texId=this.ImageTexture.TexId,super.ToSyncJsonObj(t)}},Et.ViewRoundCornerMask=class extends rt{constructor(t,s,e,i){super(),this.Ns="CORNER",this.ks=t,this.Ds=isNaN(s)?t:s,this.Gs=isNaN(e)?t:e,this.Ls=isNaN(i)?t:i}ToSyncJsonObj(t){return t||(t={}),t.tl=this.ks,t.tr=this.Ds,t.bl=this.Gs,t.br=this.Ls,super.ToSyncJsonObj(t)}},Et.sViewStore=ht,Et.ViewInfo=class{constructor(t,s){this.view=t,this.layout_params=s}},Et.LayoutView=dt,Et.AutoStretchView=class extends dt{constructor(t=null){super(t)}CreateView(t){ut.CreateNativeView(this.ViewId,12,t.DomDepends)}},Et.EditControlView=class extends dt{constructor(s=null){super(s),this._s=null,this.Fs=this.Ms.bind(this),this.Bs="_JscIme_"+this.ViewId,t.sRenderBridge.GetPlatformMsgDisp().subscribe(this.Bs,this.Fs)}CreateView(t){ut.CreateNativeView(this.ViewId,5,t.DomDepends)}releaseResource(){t.sRenderBridge.GetPlatformMsgDisp().unsubscribe(this.Bs,this.Fs)}setEditorStyle(t,s,e,i){this.O.CallToNative(5005,[t,s,e,i],this.F)}showIme(t,s,e,i,n){t!=St.NONE?(void 0!==e&&null!=e||(e=s.length>0?s.length:0),e<0?e=0:e>s.length&&(e=s.length>0?s.length:0),this.O.CallToNative(5001,[t,encodeURIComponent(s),e,i,n],this.F)):console.log("showIme inputType error")}hideIme(){this.O.CallToNative(5002,null,this.F)}updateCursorOffset(t,s,e,i){this.O.CallToNative(5003,[t,s,e,i],this.F)}addImeEventListener(t){this._s=t}Vs(t){this.O.CallToNative(5006,[t],this.F)}Ms(t){if(t){var s=JSON.parse(t);if("text"==s.type){var e=s.text;let t=s.selectStart,i=s.scrollLeft,n=s.scrollTop;this._s?.OnTextChanged(decodeURIComponent(e),t,i,n)}else if("vstatus"==s.type){let t=s.isVisible?1:0;this.Vs(t),this._s?.OnStatusChanged(t)}else if("action"==s.type){var i=s.action;this._s?.OnEditAction(i)}}else console.log("EditControlView","_ImeEventListener input_data error")}},Et.FilterView=class extends dt{constructor(t=null,s){super(t),this.Js=s??wt.Type.GRAY_DOWN,this.O.CallToNative(10002,[this.Js,[]],this.F)}CreateView(t){ut.CreateNativeView(this.ViewId,10,t.DomDepends)}FilterSwitch(t){this.O.CallToNative(10001,[t],this.F)}AddWaveSourceList(t){if(this.Js==wt.Type.WAVE){const s={T:1,L:t.getSourceList()};this.DispatchCommand(z.FILTER_VIEW_WAVE,JSON.stringify(s))}else console.error("FilterView error: add wave source while filter view type is GRAY_DOWN.")}AddWaveSourceSingle(t,s,e,i={type:wt.Wave.CIRCLE_WAVE},n={timeDecay:3,distanceDecay:10,speed:100,frequency:8,waveNum:2}){if(this.Js==wt.Type.WAVE){const r=new Nt,h=r.addSource(t,s,e,i,n);return this.AddWaveSourceList(r),h}return console.error("FilterView error: add wave source while filter view type is GRAY_DOWN."),-1}RemoveSource(t){if(this.Js==wt.Type.WAVE){const s={T:2,L:t instanceof Array?t:[t]};this.DispatchCommand(z.FILTER_VIEW_WAVE,JSON.stringify(s))}else console.error("FilterView error: remove wave source while filter view type is GRAY_DOWN.")}DispatchCommand(t,s){s&&this.O.CallToNative(10003,[t,s],this.F)}},Et.FragShaderView=class extends dt{constructor(t=null){super(t)}CreateView(t){ut.CreateNativeView(this.ViewId,11,t.DomDepends)}SetShaderInfo(t,s,e,i){const n={shaderStr:t,uniformParams:s,textureParams:e};let r=0;null!=i&&(r=c.AddData(i)),this.O.CallToNative(7001,[JSON.stringify(n),r],this.F)}},Et.NativeSharedView=class extends dt{constructor(t){super(t),this.Ws=window.JsView?window.JsView.getJsContextId():0,this.Us=null,this.SetTrackId(this.Ws+"_"+this.ViewId)}CreateView(t){ut.CreateNativeView(this.ViewId,9,t.DomDepends)}GetTrackId(){return this.Us}SetTrackId(t){this.Us=t,this.O.CallToNative(10101,[this.Us],this.F)}SetOverSize(t){this.O.CallToNative(10102,[isNaN(t)?0:t],this.F)}},Et.NinePatchView=class extends dt{CreateView(t){ut.CreateNativeView(this.ViewId,4,t.DomDepends)}SetRepeat(t,s){this.O.CallToNative(4001,[t,s],this.F)}SetPadding(t,s){this.O.CallToNative(4002,[t,s],this.F)}SetImageDspSize(t,s){this.O.CallToNative(4003,[t,s],this.F)}SetDesignMapWidth(t){this.O.CallToNative(4004,[t],this.F)}EnableAlphaMix(t){this.O.CallToNative(4005,[t.TexId],this.F)}},Et.PreloadView=class extends dt{constructor(t=null){super(t)}CreateView(t){ut.CreateNativeView(this.ViewId,7,t.DomDepends)}},Et.SprayView=class extends dt{constructor(t=null){super(t),this.onStop=null}SetSprayInfo(t,s,e,i,n,r,h,l,a,o,u,c,d,p,f,y,S,v,w,m,N,x,g){this.O.CallToNative(6001,[t,s,e,i,n,r,h,l,a,o,u,c,d,p,!!f,!!y,!!S,v,w,m,N,x,g],this.F)}CreateView(t){ut.CreateNativeView(this.ViewId,6,t.DomDepends)}Start(){this.O.CallToNative(6002,[],this.F)}Stop(t=!1){this.O.CallToNative(6003,[t],this.F)}RegisterOnStop(t){this.onStop=t}qs(t){try{if("onStop"===JSON.parse(t).type)this.onStop?.()}catch(t){console.error("SprayView onEvent error",t)}}RegisterEventListener(){const t=c.AddData(this.qs.bind(this));this.O.CallToNative(6004,[t])}},Et.TextInputType=St,Et.FilterViewType=wt,Et.TextureSetting=at,Et.ExternalTextureSetting=at,Et.TextUtils=Tt,Et.VisibleSensor=class extends lt{constructor(t,s=null){super(),this.InitSet(t,s)}CreateSensor(){this.CreateTypedSensor(1)}InitSet(t,s){let e=0;s&&(e=c.AddData(((t,e,i,n)=>{s(1==t,1==e,1==i,1==n)}))),this.Is.CallToNative(11,[t.ViewId,e],!0)}ResetArea(t){"number"!=typeof t.horizon&&(console.log("horizon not set, default to 1.0"),t.horizon=1),"number"!=typeof t.vertical&&(console.log("vertical not set, default to 1.0"),t.vertical=1),this.Is.CallToNative(12,[t.horizon,t.vertical],!0)}Enable(t){this.Is.CallToNative(13,[!!t],!0)}ResetContainer(t){let s;s=t?t.ViewId:0,this.Is.CallToNative(14,[s],!0)}},Et.EnvBlockerSensor=class extends lt{constructor(t){super(),this.InitSet(t)}CreateSensor(){this.CreateTypedSensor(4)}InitSet(t){this.Is.CallToNative(30,[t.ViewId],!0)}ResetTopGID(t){this.Hs(0,t)}ResetBottomGID(t){this.Hs(1,t)}ResetLeftGID(t){this.Hs(2,t)}ResetRightGID(t){this.Hs(3,t)}Hs(t,s){this.Is.CallToNative(31,[t,isNaN(s)?0:parseInt(s)],!0)}Enable(t){this.Is.CallToNative(32,[t],!0)}},Et.sImpactSensorManager=yt,Et.TextureInstantLoad=g,Et.QRCodeLevel=x,Et.ColorSpace=N,Et.TextureManager=I,Et.FreeMoveExternType=X,Et.AnimationListener=class{constructor(t,s,e){this.ListenerEnabledFlags=0,this.InvokeAnimationStart=t,this.Ks=t,t&&(this.ListenerEnabledFlags|=1),this.InvokeAnimationEnd=s,this.zs=s,s&&(this.ListenerEnabledFlags|=2),this.InvokeViewNoVisible=e,this.js=e,e&&(this.ListenerEnabledFlags|=4),this.InvokeAnimRepeat=null,this.Ys=null,this.InvokeAnimFinal=null,this.Xs=null,this.Qs=null,this.$s=[]}OnStart(t){return this.InvokeAnimationStart=this.Ks=t,t?this.ListenerEnabledFlags|=1:this.ListenerEnabledFlags&=30,this}OnEnd(t){return this.InvokeAnimationEnd=this.zs=t,t?this.ListenerEnabledFlags|=2:this.ListenerEnabledFlags&=29,this}OnRepeat(t){return this.InvokeAnimRepeat=this.Ys=t,t?this.ListenerEnabledFlags|=8:this.ListenerEnabledFlags&=23,this}OnFinalProgress(t){return this.InvokeAnimFinal=this.Xs=t,t?this.ListenerEnabledFlags|=16:this.ListenerEnabledFlags&=15,this}AddInherit(t){if(t){if(0==this.$s.length){var s=this;this.InvokeAnimationStart=function(){s.Ks&&s.Ks();for(var t=0;t<s.$s.length;t++)s.$s[t].InvokeAnimationStart?.()},this.InvokeAnimationEnd=function(t){s.zs&&s.zs(t);for(var e=0;e<s.$s.length;e++)s.$s[e].InvokeAnimationEnd?.(t)},this.InvokeViewNoVisible=function(){s.js&&s.js();for(var t=0;t<s.$s.length;t++)s.$s[t].InvokeViewNoVisible?.()},this.InvokeAnimFinal=function(t){s.Xs&&s.Xs(t);for(var e=0;e<s.$s.length;e++)s.$s[e].InvokeAnimFinal?.(t)},this.InvokeAnimRepeat=function(t){s.Ys&&s.Ys(t);for(var e=0;e<s.$s.length;e++)s.$s[e].InvokeAnimRepeat?.(t)},this.ListenerEnabledFlags=31}this.$s.push(t)}}InvokeFromNativeForge(t){switch(t.type){case"end":this.InvokeAnimationEnd?.(1==t.normalEnd);break;case"novisible":this.InvokeViewNoVisible?.();break;case"final":this.InvokeAnimFinal?.(t.progress);break;case"repeat":this.InvokeAnimRepeat?.(t.timesCount)}}},Et.AnimFireCommand=nt,Et.AnimationEnable=it,Et.TranslateAnimation=class extends et{constructor(t,s,e,i,n,r){super(),st.CreateTranslate(t,s,e,i,n,r,this.AnimNativeId)}},Et.RotateAnimation=class extends et{constructor(t,s,e,i,n,r){super(),st.CreateRotate(t,s,e,i,n,r,this.AnimNativeId)}},Et.ScaleAnimation=class extends et{constructor(t,s,e,i,n,r,h,l,a=200,o=200){super(),st.CreateScale(t,s,e,i,n,r,a,o,h,l,this.AnimNativeId)}},Et.TranslateFrameAnimation=class extends et{constructor(t,s,e,i,n,r){super();let h=Math.floor(100*e/55)/100;st.CreateTranslateFrame(t,s,h,h,i,n,r,this.AnimNativeId)}},Et.CssKeyframeAnimation=class extends et{constructor(t,s,e,i,n){super(),st.CreateCssKeyframe(t,s,e,i,n,this.AnimNativeId)}},Et.ShaderAnimation=class extends et{constructor(t,s){super(),st.CreateShaderAnimation(t,s,this.AnimNativeId)}},Et.FreeMoveAnimation=class extends et{constructor(t,s,e){super(),this.Zs=t,st.CreateFreeMoveAnimation(this.AnimNativeId,t,s,e)}},Et.FreeMoveActEvtType=Y,Et.FreeMoveCmdPackBuilder=class{static InitActCmdPack(t,s,e,i){return{t:1,cmds:i,tkn:isNaN(e)?0:e,spd:isNaN(t)?0:t,acc:isNaN(s)?0:s}}static InitStateCmdPack(t){return{t:2,cmd:t}}},Et.FreeMoveConditionSet=class{static AppendSubCmd(t,s){const e="cmds";t.hasOwnProperty("cmdPacks")?console.error("Error: conflict with command pack list"):(t.hasOwnProperty(e)||(t[e]=[]),t[e]?.push(s))}static SetCmdList(t,s){s instanceof Array&&(t.hasOwnProperty("cmdPacks")?console.error("Error: conflict with command pack list"):t.cmds=s)}static SetCmdPackList(t,s){s instanceof Array&&(t.hasOwnProperty("cmds")?console.error("Error: conflict with sub-command list"):t.cmdPacks=s)}static InitCommonInfo(){return{g:0,m:!1,s:null,brk:!1}}static UpdateCommonInfo(t,s,e,i,n){t.g=s??0,t.m=e??!1,t.s=i??null,t.brk=n}static ReachPosition(t,s,e){let i=j(t,s),n={subt:1,react:1,e:i.e,xv:i.x,yv:i.y};return $(n,e),n}static AcrossPosition(t,s,e){let i=j(t,s),n={subt:1,react:2,e:i.e,xv:i.x,yv:i.y};return $(n,e),n}static BoxPosition(t,s,e,i,n){let r=0,h=0,l=0,a=0,o=0;isNaN(t)||(r=t,o|=1),isNaN(s)||(h=s,o|=2),isNaN(e)||(l=e,o|=4),isNaN(i)||(a=i,o|=8);let u={subt:1,react:7,de:o,lv:r,tv:h,rv:l,bv:a};return $(u,n),u}static StartMove(t,s){return this.OnMovement(s,1,1,t)}static OnMovement(t,s,e,i){let n={subt:1,react:9,xv:s,yv:e,e:i};return $(n,t),n}static OffsetPosition(t,s,e,i,n){let r=0,h=0,l=0,a=0,o=0;isNaN(t)||(r=t,o|=1),isNaN(s)||(h=s,o|=2),isNaN(e)||(l=e,o|=4),isNaN(i)||(a=i,o|=8);let u={subt:1,react:8,de:o,lv:r,tv:h,rv:l,bv:a};return $(u,n),u}static WallPosition(t,s,e,i){let n,r=j(s,e);switch(t){case"left":n=4;break;case"top":n=3;break;case"right":n=5;break;case"bottom":n=6;break;default:return console.error("WallPosition undefined direction",t),null}let h={subt:1,react:n,e:r.e,xv:r.x,yv:r.y};return $(h,i),h}static ReachSpeed(t,s,e){let i=j(t,s),n={subt:2,react:1,e:i.e,xv:i.x,yv:i.y};return $(n,e),n}static AcrossSpeed(t,s,e){let i=j(t,s),n={subt:2,react:2,e:i.e,xv:i.x,yv:i.y};return $(n,e),n}static TouchCount(t,s){let e={subt:5,react:2,tct:s};return $(e,t),e}static OnNexusEvent(t,s,e){let i={subt:3,nexus:t,etyp:s};return $(i,e),i}static OnDragStart(t,s){let e={subt:3,nexus:s,etyp:Y.ActEvent_ActDragStart};return $(e,t),e}static OnDragEnd(t,s){let e={subt:3,nexus:s,etyp:Y.ActEvent_ActDragEnd};return $(e,t),e}static OnTouchDown(t,s){let e={subt:3,nexus:s,etyp:Y.ActEvent_ActTouchDown};return $(e,t),e}static OnTouchRelease(t,s){let e={subt:3,nexus:s,etyp:Y.ActEvent_ActTouchRelease};return $(e,t),e}static OnFlingStart(t,s){let e={subt:3,nexus:s,etyp:Y.ActEvent_ActFlingStart};return $(e,t),e}static OnFlingProgress(t,s){let e={subt:3,nexus:s,etyp:Y.ActEvent_ActFlingProgress};return $(e,t),e}static OnFlingEnd(t,s){let e={subt:3,nexus:s,etyp:Y.ActEvent_ActFlingEnd};return $(e,t),e}static OnFlingCancel(t,s){let e={subt:3,nexus:s,etyp:Y.ActEvent_ActFlingCancel};return $(e,t),e}static OnFlingDrop(t,s){let e={subt:3,nexus:s,etyp:Y.ActEvent_ActFlingDrop};return $(e,t),e}static OnHitBlock(t,s){let e={subt:4,blkGid:t};return $(e,s),e}static OnNextTick(t,s){let e={subt:5,react:1,tgap:t};return s.m=!1,$(e,s),e}static MovementSyncNexus(t,s){let e={subt:3,nexus:s,etyp:Y.ActEvent_MovementSync};return $(e,t),e}},Et.FreeMoveActionBuilder=class{static SetSpeed(t,s){let e=j(t,s);return{typ:2,set:{xv:e.x,yv:e.y,xye:e.e}}}static SetAccel(t,s){let e=j(t,s);return{typ:7,set:{xye:e.e,xv:e.x,yv:e.y}}}static AltSpeed(t,s,e){if(!e)return null;let i=j(t,s);return{typ:5,set:{xv:i.x,yv:i.y,xye:i.e,tim:Math.floor(e)}}}static StopMoving(){return{typ:3}}static StopMovingExact(){return{typ:9}}static BrakeToPos(t,s){let e=j(t,s);return{typ:4,set:{xv:Math.floor(e.x),yv:Math.floor(e.y),xye:e.e}}}static SetArrowSpeed(t,s,e,i){let n=j(t,s),r=j(e,i);return{typ:6,set:{xye:n.e,xv:Math.floor(n.x),yv:Math.floor(n.y),xye1:r.e,xv1:r.x,yv1:r.y}}}static TeleportTo(t,s,e){let i=j(t,s);return{typ:8,set:{xye:i.e,xv:Math.floor(i.x),yv:Math.floor(i.y),isAbs:!e}}}static AckMovementSync(t,s,e,i,n,r){return{typ:10,set:{hstart:t,hend:s,vstart:e,vend:i,xye:n,st:r}}}},Et.FreeMoveStateBuilder=class{static FireEcho(t){return{typ:52,set:{tkn:t}}}static FireNexusEvent(t,s){return isNaN(s)||0==s?null:{typ:55,set:{etyp:isNaN(t)?0:t,nexus:s}}}static NewCondition(t){return{typ:Z,set:{sub:1,set:t}}}static DelActionAssocCondition(){return{typ:Z,set:{sub:5}}}static RemoveAllCondtions(){return{typ:Z,set:{sub:6}}}static RemoveByGroup(t){return{typ:Z,set:{sub:4,gt:t}}}static RemoveByName(t){return{typ:Z,set:{sub:7,sn:t}}}static ActiveCondition(t,s){return{typ:Z,set:{sub:2,gt:isNaN(t)||t<=0?X.GroupType_Invalid_Ext:t,sn:s}}}static DeactiveCondition(t,s){return{typ:Z,set:{sub:3,gt:isNaN(t)||t<=0?X.GroupType_Invalid_Ext:t,sn:s}}}static SetOffsetPos(t,s){let e=j(t,s);return{typ:53,set:{xv:Math.floor(e.x),yv:Math.floor(e.y),xye:e.e}}}static SetPos(t,s){let e=j(t,s);return{typ:54,set:{xv:Math.floor(e.x),yv:Math.floor(e.y),xye:e.e}}}static TouchLockSwitch(t,s,e=-1){return{typ:59,set:{il:t,dir:s,ut:e}}}static SetTouchAttractChild(t){return{typ:60,set:{cid:t?t.AnimNativeId:0}}}static SetHitWallOverflow(){return{typ:56}}static RevertWithHitBlock(){return{typ:57}}static StartMovementSync(t,s,e,i,n,r){return{typ:61,set:{hstart:s,hend:e,vstart:i,vend:n,xye:r,nexus:t}}}static StopMovementSync(){return{typ:62}}};var Pt={SetupEngineJs:async(t,s)=>{Et.InitStarter(t,s)}};export{Pt as default};
|
|
2
2
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* eslint-disable */ if(void 0===window.Forge)throw new Error("Error: EngineJs missing");var
|
|
1
|
+
/* eslint-disable */ if(void 0===window.Forge)throw new Error("Error: EngineJs missing");var e=window.Forge;window.JsvCoreApi.setForgeJsHandle(e);class t{constructor(e,t){if(this.href="",this.origin="",this.protocol="",this.host="",this.hostname="",this.port="",this.pathname="",this.search="",this.hash="",!e)return;if(!0===e.startsWith("url")){let t=e.indexOf("(")+1,i=e.lastIndexOf(")");if("undefined"===(e=e.substring(t,i).trim())||"null"===e||0===e.length)return}if(!0===e.startsWith("data:")||!0===e.startsWith("jsvtexturestore:"))return void(this.href=e);let i=e.indexOf("://");if(!(i<0||i>10)||e.startsWith("./")||e.startsWith("/")||(e="./"+e),!0===e.startsWith("/"))e=window.location.origin+e;else if(!0===e.startsWith("./")&&void 0!==window.JsView&&void 0!==window.JsView.Dom.JsSubPath){if(void 0===window.JsView.Dom.MainPath||"undefined"===window.JsView.Dom.MainPathRef||window.JsView.Dom.MainPathRef!==window.location.href){window.JsView.Dom.JsSubPath.startsWith("/")||(window.JsView.Dom.JsSubPath="/"+window.JsView.Dom.JsSubPath),window.JsView.Dom.JsSubPath.endsWith("/")||(window.JsView.Dom.JsSubPath=window.JsView.Dom.JsSubPath+"/"),window.JsView.Dom.MainPathRef=window.location.href;let e=window.location.pathname.lastIndexOf(window.JsView.Dom.JsSubPath);window.JsView.Dom.MainPath=window.location.origin+window.location.pathname.substring(0,e)}e=window.JsView.Dom.MainPath+e.substring(1)}if(this.href=e,!t)return;let o=this.href,s=o.indexOf("#");s>0&&(this.hash=o.substring(s),o=o.substring(0,s));let n=o.indexOf("?");n>1&&(this.search=o.substring(n),o=o.substring(0,n));let r=o,a=r.indexOf("://");this.protocol=a>0?r.substring(0,a+1):"";let h=a>1?r.substring(a+3):"";a=h.indexOf("/"),this.host=a>0?h.substring(0,a):"",this.pathname=a>=1?h.substring(a):"","file:"==this.protocol&&(this.host="",this.pathname=h),this.origin=this.protocol+"//"+this.host,a=this.host.indexOf(":"),this.hostname=a>0?this.host.substring(0,a):this.host,this.port=a>1?this.host.substring(a+1):""}replace(e){this.href=e}}class i{static SetBackgroundColor(t,i,o){const s=window.JsvCode.ForgeHandles.TextureManager.GetColorTextureCached(i);let n;o&&(n=new e.ViewRoundCornerMask(o.topLeft,o.topRight,o.bottomLeft,o.bottomRight));const r=new e.ExternalTextureSetting(s,n);t.ResetTexture(r)}static SetBackgroundImage(i,o,s,n,r,a,h){let d,w={};if("string"==typeof o){const e=new t(o);if(e instanceof t==!1)throw Error("Bad Argument.",e);w.url=e.href}else"linear-gradient"==o?.type&&(w.gradient=o);if(w.gradient)if(w.gradient.colors?.length>2){const e=w.gradient.colors,t=[e[0],e[e.length-1]],i=e.slice(1,e.length-1);d=window.JsvCode.ForgeHandles.TextureManager.CreateLinearGradientTexture(t,i)}else 2==w.gradient.colors?.length?d=window.JsvCode.ForgeHandles.TextureManager.CreateMiniGradientTexture(!0,w.gradient.colors[0],w.gradient.colors[1],w.gradient.rawValue):console.warn("Failed to create backgroundImage gradient, bad colors.",w.gradient.colors);else w.url&&(d=w.url.includes(".gif")||w.url.includes(".webp")?window.JsvCode.ForgeHandles.TextureManager.GetGifImage(w.url,!1,null,h):window.JsvCode.ForgeHandles.TextureManager.GetImage2(w.url,!1,r,a||e.ColorSpace.RGBA_8888));if(d){let t;s&&(t=new e.ViewRoundCornerMask(s.topLeft,s.topRight,s.bottomLeft,s.bottomRight));const o=new e.ExternalTextureSetting(d,t);if(i.ResetTexture(o),n){let e=d.RegisterLoadImageCallback(null,(function(){n({width:d.Width,height:d.Height})}));i.RegisterDetachCallback((()=>{d.UnregisterLoadImageCallback(e)}))}}}static SetMaskedBackgroundImage(i,o,s,n){if("string"==typeof o&&(o=new t(o)),o instanceof t==!1)throw Error("Bad Argument.",o);if("string"==typeof s&&(s=new t(s)),s instanceof t==!1)throw Error("Bad Argument(MaskURL).",s);const r=window.JsvCode.ForgeHandles.TextureManager.GetImage2(o.href,!1,null,n||e.ColorSpace.RGBA_8888);if(r){const t=window.JsvCode.ForgeHandles.TextureManager.GetImage2(s.href,!1,null,e.ColorSpace.RGBA_8888),o=new e.ExternalTextureSetting(r,new e.ViewTextureMask(t));i.ResetTexture(o)}}}export{e as Forge,i as ForgeExtension};
|
|
2
2
|
|
package/dom/index.mjs
CHANGED
|
@@ -83,17 +83,17 @@ async function loadJsViewDomAsync(nativeOrBrowserDebug) {
|
|
|
83
83
|
return jsviewDom;
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
async function loadEngineJs(nativeOrBrowserDebug,
|
|
86
|
+
async function loadEngineJs(nativeOrBrowserDebug, on_render_bridge_func, design_map_query_func) {
|
|
87
87
|
const codeDebugConfig = getCodeDebugConfig();
|
|
88
|
-
let
|
|
88
|
+
let engine_js_init;
|
|
89
89
|
|
|
90
90
|
if (nativeOrBrowserDebug) {
|
|
91
91
|
// Native engineJs 加载
|
|
92
92
|
if (codeDebugConfig.enableDebug == false) {
|
|
93
|
-
|
|
93
|
+
engine_js_init = await import("./bin/jsview-engine-js-native.min.js");
|
|
94
94
|
} else {
|
|
95
95
|
// 兼容webpack写法
|
|
96
|
-
|
|
96
|
+
engine_js_init = await import(
|
|
97
97
|
/* webpackExclude: /@shijiu\/jsview\/dom\/code\/node_modules\// */
|
|
98
98
|
`${codeDebugConfig.engineNativePath}`
|
|
99
99
|
);
|
|
@@ -101,10 +101,10 @@ async function loadEngineJs(nativeOrBrowserDebug, run_app_func, design_map_query
|
|
|
101
101
|
} else {
|
|
102
102
|
// Browser engineJs 加载
|
|
103
103
|
if (codeDebugConfig.enableDebug == false) {
|
|
104
|
-
|
|
104
|
+
engine_js_init = await import("./bin/jsview-engine-js-browser.min.js");
|
|
105
105
|
} else {
|
|
106
106
|
// 兼容webpack写法
|
|
107
|
-
|
|
107
|
+
engine_js_init = await import(
|
|
108
108
|
/* webpackExclude: /@shijiu\/jsview\/dom\/code\/node_modules\// */
|
|
109
109
|
`${codeDebugConfig.engineBrowserPath}`
|
|
110
110
|
);
|
|
@@ -112,13 +112,11 @@ async function loadEngineJs(nativeOrBrowserDebug, run_app_func, design_map_query
|
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
// 设置主执行入口
|
|
115
|
-
|
|
115
|
+
await engine_js_init.default.SetupEngineJs(on_render_bridge_func, design_map_query_func);
|
|
116
116
|
|
|
117
117
|
await getForgeDefineAsync(); // 触发首次加载forge-define
|
|
118
118
|
|
|
119
|
-
|
|
120
|
-
window._BootEngineEmb.resolveFunc();
|
|
121
|
-
}
|
|
119
|
+
window._BootEngineEmb.resolveFunc();
|
|
122
120
|
}
|
|
123
121
|
|
|
124
122
|
export {
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
const TargetRevision = {
|
|
6
|
-
"CoreRevision":
|
|
7
|
-
"CoreRevisionAndBranch": "
|
|
6
|
+
"CoreRevision": 1022044,
|
|
7
|
+
"CoreRevisionAndBranch": "1022044",
|
|
8
8
|
"JseRevision":
|
|
9
9
|
"embedded",
|
|
10
10
|
"JseUrl":
|
|
11
|
-
"embedded",
|
|
11
|
+
"http://cdn.release.qcast.cn/forge_js/master/embedded",
|
|
12
12
|
"JseName":
|
|
13
13
|
"embedded",
|
|
14
14
|
"JsidtName": "libjsidt.102.7.so",
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import WasmApiClass from "./wasm/core-api.js"
|
|
2
|
+
|
|
3
|
+
// api名字列表,用于校验平台api是否完整
|
|
4
|
+
const api_name_list = [
|
|
5
|
+
// parameters
|
|
6
|
+
"CodeRevision",
|
|
7
|
+
"CoreBranchName",
|
|
8
|
+
"ForgeNativeRevision",
|
|
9
|
+
"BackgroundTask",
|
|
10
|
+
"EngineJs",
|
|
11
|
+
"UrlBuilder",
|
|
12
|
+
"Platform",
|
|
13
|
+
|
|
14
|
+
// apis
|
|
15
|
+
"loadRenderPlugin",
|
|
16
|
+
"setLruCacheSize",
|
|
17
|
+
"getJsContextId",
|
|
18
|
+
"notifyAppName",
|
|
19
|
+
"setMiniAppPermissionInfo",
|
|
20
|
+
"getCurrentTimeMs",
|
|
21
|
+
"addEventListener",
|
|
22
|
+
"removeEventListener",
|
|
23
|
+
"removeEventCallback",
|
|
24
|
+
"takeNativeHashChange",
|
|
25
|
+
"runJsWithUrl",
|
|
26
|
+
"getVisibility",
|
|
27
|
+
"onVisibilityChange",
|
|
28
|
+
"getNetStatus",
|
|
29
|
+
"onNetStatusChange",
|
|
30
|
+
"onNetReady",
|
|
31
|
+
"onActivityStateChange",
|
|
32
|
+
"setIgnoreSizeCheckWebSites",
|
|
33
|
+
"loadFont",
|
|
34
|
+
"hasPendingUserInput",
|
|
35
|
+
"triggerManualBlocker",
|
|
36
|
+
"enableReceivingUserInput",
|
|
37
|
+
"setAutoUriEncode",
|
|
38
|
+
"showUiCover",
|
|
39
|
+
"hideUiCover",
|
|
40
|
+
"simKeyEvent",
|
|
41
|
+
"reduceFps",
|
|
42
|
+
"enableFpsDisplay",
|
|
43
|
+
"addGlobalJsExceptionAck",
|
|
44
|
+
"removeGlobalJsExceptionAck",
|
|
45
|
+
"toggleViewVisible",
|
|
46
|
+
"getScreenInfo",
|
|
47
|
+
"appendNetTraceHeaders",
|
|
48
|
+
"ensureTesterUtils",
|
|
49
|
+
"setRenderGlobalConfig", // 原 setGlobalConfig
|
|
50
|
+
"setForgeJsHandle",
|
|
51
|
+
"logD",
|
|
52
|
+
"onMainTsDone"
|
|
53
|
+
];
|
|
54
|
+
|
|
55
|
+
export default function loadCoreApi() {
|
|
56
|
+
let core_api_export = null;
|
|
57
|
+
|
|
58
|
+
if (window.JsView) {
|
|
59
|
+
// 由native端的systemJs直接提供apis
|
|
60
|
+
core_api_export = window.JsView;
|
|
61
|
+
} else {
|
|
62
|
+
// wasm版本的core api(PC模拟为主)
|
|
63
|
+
core_api_export = new WasmApiClass();
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// check apis
|
|
67
|
+
for (let name of api_name_list) {
|
|
68
|
+
if (typeof core_api_export[name] == "undefined") {
|
|
69
|
+
console.error("window.JsvCoreApi missing api:" + name);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
return core_api_export;
|
|
74
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
export default class BackgroundTask {
|
|
2
|
+
constructor() {
|
|
3
|
+
this._timer_map = {};
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
postDelay(code, delay, ...args) {
|
|
7
|
+
let id = "tim_" + setTimeout(() => {
|
|
8
|
+
this._onTimeout(id, false);
|
|
9
|
+
}, delay);
|
|
10
|
+
let callback = this._getCallback(code);
|
|
11
|
+
this._timer_map[id] = () => {
|
|
12
|
+
callback(...args)
|
|
13
|
+
};
|
|
14
|
+
return id;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
setInterval(code, delay, ...args) {
|
|
18
|
+
let id = "inv_" + setTimeout(() => {
|
|
19
|
+
this._onTimeout(id, true);
|
|
20
|
+
}, delay);
|
|
21
|
+
let callback = this._getCallback(code);
|
|
22
|
+
this._timer_map[id] = () => {
|
|
23
|
+
callback(...args)
|
|
24
|
+
};
|
|
25
|
+
return id;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
clear(id) {
|
|
29
|
+
if (!id.startsWith("tim") && !id.startsWidth("inv_")) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
delete this._timer_map[id];
|
|
34
|
+
if (id.startsWidth("tim")) {
|
|
35
|
+
clearTimeout(parseInt(id.substr(4)));
|
|
36
|
+
} else {
|
|
37
|
+
clearInterval(parseInt(id.substr(4)));
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
_getCallback(code) {
|
|
42
|
+
var callback;
|
|
43
|
+
if (typeof code === "function") {
|
|
44
|
+
callback = code;
|
|
45
|
+
} else {
|
|
46
|
+
callback = () => {
|
|
47
|
+
window.eval(code)
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
return callback;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
_onTimeout(id, repeat) {
|
|
54
|
+
// console.info("_onTimeout() id=" + id + " repeat=" + repeat);
|
|
55
|
+
if (this._timer_map.hasOwnProperty(id) == false) {
|
|
56
|
+
// console.log("timer " + id + " is called or cleared.");
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
let callback = this._timer_map[id];
|
|
60
|
+
if (repeat == false) {
|
|
61
|
+
delete this._timer_map[id];
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
callback();
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import BackgroundTask from "./backgroundtask.js"
|
|
2
|
+
import WasmExt from "./wasm-extension.js"
|
|
3
|
+
|
|
4
|
+
export default class WasmCoreApis {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.CodeRevision = "102XXXX"; // TODO: wasm场景后续从.wasm文件拿信息, 先试用代码中的内容
|
|
7
|
+
this.CoreBranchName = "TODO_NEED_APPLY";
|
|
8
|
+
this.ForgeNativeRevision = 0;
|
|
9
|
+
this.BackgroundTask = new BackgroundTask();
|
|
10
|
+
this.EngineJs = "embedded";
|
|
11
|
+
this.UrlBuilder = URL;
|
|
12
|
+
this.Platform = "pc-wasm"; // 平台信息,可选有 android/pc-wasm/harmony-webview
|
|
13
|
+
|
|
14
|
+
this._ForgeHandle = null;
|
|
15
|
+
|
|
16
|
+
this.WasmExt = new WasmExt();
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
loadInfoFromCore() {
|
|
20
|
+
this.ForgeNativeRevision = NativeForgeGetVerCode(); // wasm库挂在window上的api:NativeForgeGetVerCode
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
loadRenderPlugin(name, className, path) {
|
|
24
|
+
console.log("loadRenderPlugin not implemented");
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
setLruCacheSize(size) {
|
|
28
|
+
// wasm场景没有 LruCache, 不需要设置
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
getJsContextId() {
|
|
32
|
+
// wasm场景下为JsvContext单例,返回单一的0
|
|
33
|
+
return 0;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
addKeysMap(bindKeyObj) {
|
|
37
|
+
// 不需设置,仅备份用来测试内存泄露
|
|
38
|
+
this._TmpValue_addKeysMap = bindKeyObj;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
notifyAppName(app_name) {
|
|
42
|
+
// 不需设置,仅备份用来测试内存泄露
|
|
43
|
+
this._TmpValue_notifyAppName = app_name;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
setMiniAppPermissionInfo(setting) {
|
|
47
|
+
// 不需设置,仅备份用来测试内存泄露
|
|
48
|
+
this._TmpValue_setMiniAppPermissionInfo = setting;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
getCurrentTimeMs() {
|
|
52
|
+
console.log("getCurrentTimeMs not implemented");
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
addEventListener(event_name, callback) {
|
|
56
|
+
console.log("addEventListener not implemented");
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
removeEventListener(event_name, callback) {
|
|
60
|
+
console.log("removeEventListener not implemented");
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
removeEventCallback(callback) {
|
|
64
|
+
console.log("removeEventCallback not implemented");
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
takeNativeHashChange(listener) {
|
|
68
|
+
this._TmpCallback_takeNativeHashChange = listener;
|
|
69
|
+
return null; // 初始值initHash为null,wasm模式下没有warmload模式
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
async runJsWithUrl(app_url, sync, callback, observer) {
|
|
74
|
+
console.log("runJsWithUrl not implemented");
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
getVisibility() {
|
|
78
|
+
console.log("getVisibility not implemented");
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
onVisibilityChange(callback) {
|
|
82
|
+
// wasm没有可视变化,所以不处理回调,但是讲callback保存住可以用来测试泄漏问题
|
|
83
|
+
this.addEventListener("__JsvVisibility", callback);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
getNetStatus() {
|
|
87
|
+
// 固定返回值为 类型:有线 链接状态:链接
|
|
88
|
+
return '{"NetType":"ethernet","Connected":true}';
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
onNetStatusChange(callback) {
|
|
92
|
+
// wasm没有断网状态,所以不处理回调,但是讲callback保存住可以用来测试泄漏问题
|
|
93
|
+
this.addEventListener("__JsvNet", callback);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
onNetReady(callback) {
|
|
97
|
+
// wasm无断网状态,直接回调
|
|
98
|
+
callback?.();
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
onActivityStateChange(callback) {
|
|
102
|
+
// wasm没有activity状态切换,所以不处理回调,但是讲callback保存住可以用来测试泄漏问题
|
|
103
|
+
this.addEventListener("onActivityState", callback);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
setIgnoreSizeCheckWebSites(webSites) {
|
|
107
|
+
// wasm场景,不需要调整此参数
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
loadFont(font_family_name, url, on_load, on_error) {
|
|
111
|
+
console.log("loadFont not implemented");
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
hasPendingUserInput() {
|
|
115
|
+
// wasm无法做骨架图打断处理
|
|
116
|
+
return false;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
triggerManualBlocker() {
|
|
120
|
+
// wasm无法做骨架图打断处理
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
enableReceivingUserInput() {
|
|
124
|
+
// wasm无法做骨架图打断处理,不需要做此设置
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
setAutoUriEncode(enable) {
|
|
129
|
+
console.log("setAutoUriEncode not implemented");
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
showUiCover(red_int, green_int, blue_int, alpha_float) {
|
|
133
|
+
console.log("showUiCover not implemented");
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
hideUiCover() {
|
|
137
|
+
console.log("hideUiCover not implemented");
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
simKeyEvent(keyCode, keyAction) {
|
|
141
|
+
console.log("simKeyEvent not implemented");
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
reduceFps(fps) {
|
|
145
|
+
console.log("reduceFps not implemented");
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
enableFpsDisplay(enable) {
|
|
149
|
+
this.WasmExt.ForgeCanvasRef?.enableFpsDisplay(enable);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
addGlobalJsExceptionAck(callback) {
|
|
153
|
+
console.log("addGlobalJsExceptionAck not implemented");
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
removeGlobalJsExceptionAck(callback) {
|
|
157
|
+
console.log("removeGlobalJsExceptionAck not implemented");
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
toggleViewVisible(toVisible) {
|
|
161
|
+
console.log("toggleViewVisible not implemented");
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
getScreenInfo() {
|
|
165
|
+
console.log("getScreenInfo not implemented");
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
appendNetTraceHeaders(headerMap) {
|
|
169
|
+
console.log("appendNetTraceHeaders not implemented");
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
ensureTesterUtils() {
|
|
173
|
+
console.log("ensureTesterUtils not implemented");
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
logD(tag, ...args) {
|
|
177
|
+
console.log(tag, args?.join());
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
setStorageDomain(newStorageDomain) {
|
|
181
|
+
// wasm不支持调整storage domain
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
enableStorageNames(...args) {
|
|
185
|
+
// wasm不需要设置,localStorage即可以通过变量名访问
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
setCookieDomain(newCookieDomain) {
|
|
189
|
+
// wasm不支持调整 cookie domain
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
setRenderGlobalConfig(json) {
|
|
193
|
+
this._ForgeHandle?.SetGlobalConfig(json);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
setForgeJsHandle(forgeHandle) {
|
|
197
|
+
this._ForgeHandle = forgeHandle;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
onMainTsDone() {
|
|
201
|
+
console.log("onMainTsDone...");
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
enableConsoleTag(tag) {
|
|
205
|
+
this.WasmExt.ForgeLogRef?.EnableTag(tag);
|
|
206
|
+
this.WasmExt.JseLogRef?.EnableTag(tag);
|
|
207
|
+
}
|
|
208
|
+
}
|