@xmobitea/gn-typescript-client 0.0.2 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/runtime/GNNetwork.d.ts +0 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e={1619:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GNNetwork=void 0;const o=r(6081),n=r(7315),s=r(4178),i=r(7474);class GNNetwork{static getGNServerSettings(){return this.gnServerSettings}static getPing(){return null!=this.peer?this.peer.getPing():-1}static getServerTimestamp(){return null!=this.peer?this.peer.getServerTimestamp():(new Date).getUTCMilliseconds()}static setAuthToken(e){this.peer.authToken=e,globalThis.exports.localStorage.setItem(GNNetwork.AUTH_TOKEN_KEY,e),this.peer.sendRequestAuthSocket()}static getAuthToken(){return this.peer.authToken}static setUserId(e){this.peer.userId=e,globalThis.exports.localStorage.setItem(GNNetwork.USER_ID_KEY,e)}static getUserId(){return this.peer.userId}static getPlatform(){return 17}static getDeviceId(){let e=globalThis.exports.localStorage.getItem(GNNetwork.DEVICE_ID_KEY);return e||(e=globalThis.exports.crypto.randomUUID(),globalThis.exports.localStorage.setItem(GNNetwork.DEVICE_ID_KEY,e)),e}static getDeviceInfo(){return this.getPlatform()+"_"+this.getDeviceId()}static init(e){null==this.gnServerSettings?(this.gnServerSettings=e,n.GNSupport.init(),i.CodeHelper.init()):o.GNDebug.log("GNNetwork has been init!")}static run(){o.GNDebug.log((n.GNSupport.isBrowser(),"browser.")),this.initServerSettings(),this.initGNDebug(),this.initGNSocketObject();let e=globalThis.exports.localStorage.getItem(GNNetwork.AUTH_TOKEN_KEY);e||(e=""),this.peer.authToken=e;let t=globalThis.exports.localStorage.getItem(GNNetwork.USER_ID_KEY);t||(t=""),this.peer.userId=t}static getClientSdkVersion(){return"0.0.1"}static initServerSettings(){}static initGNDebug(){if(null==this.gnServerSettings)throw new Error("Null EUN Server Settings, please find it now");o.GNDebug.setLogType(this.gnServerSettings.getLogType())}static initGNSocketObject(){this.peer=new s.NetworkingPeer,this.peer.initPeer()}static sendViaSocket(e,t=null){this.peer.sendViaSocket(e,t)}static sendViaHttp(e,t=null){this.peer.sendViaHttp(e,t)}static sendViaSocketTRequestTResponse(e,t=null){this.sendViaSocketTResponse(e.build(),t)}static sendViaHttpTRequestTResponse(e,t=null){this.sendViaHttpTResponse(e.build(),t)}static sendViaSocketTResponse(e,t=null){}static sendViaHttpTResponse(e,t=null){}static connectSocket(e=null){this.peer.connectSocket(e)}static disconnectSocket(e=null){this.peer.disconnectSocket(e)}static setOnConnectHandler(e){this.peer.setOnConnectHandler(e)}static setOnDisconnectHandler(e){this.peer.setOnDisconnectHandler(e)}static removeOnConnectHandler(e){this.peer.removeOnConnectHandler(e)}static removeOnDisconnectHandler(e){this.peer.removeOnDisconnectHandler(e)}static subscriberServerEventHandler(e){this.peer.subscriberServerEventHandler(e)}static syncTs(e=null){this.peer.syncTs(e)}static getConfig(e,t){this.peer.getConfig(e,t)}static downloadFile(e,t){this.peer.downloadFile(e,t)}static uploadFile(e,t,r,o){this.peer.uploadFile(e,t,r,o)}static debug(e,t,r,o,n,s=null){this.peer.debug(e,t,r,o,n,s)}static enterDisplayName(e,t=null){this.peer.enterDisplayName(e,t)}static fetchAllData(e=null){this.peer.fetchAllData(e)}static fetchSparkPlayer(e=null){this.peer.fetchSparkPlayer(e)}static getAppConfig(e,t=null){this.peer.getAppConfig(e,t)}static accountLogin(e,t,r=null){this.peer.accountLogin(e,t,r)}static deviceLogin(e=null){this.peer.deviceLogin(e)}static facebookLogin(e,t=null){this.peer.facebookLogin(e,t)}static googleLogin(e,t,r=null){this.peer.googleLogin(e,t,r)}static appleLogin(e,t=null,r=null){this.peer.appleLogin(e,t,r)}static userIdLogin(e,t=null){this.peer.userIdLogin(e,t)}static publicAddressLogin(e,t,r,o=null){this.peer.publicAddressLogin(e,t,r,o)}static publicAddressGetRandomMessage(e=null){this.peer.publicAddressGetRandomMessage(e)}static customIdLogin(e,t=null){this.peer.customIdLogin(e,t)}static registerAccount(e,t,r=null){this.peer.registerAccount(e,t,r)}static registerSocket(e,t=null){this.peer.registerSocket(e,t)}static template(e,t=null){this.peer.template(e,t)}static createNewFileUploadInfo(e,t=null){this.peer.createNewFileUploadInfo(e,t)}static getFileUploadInfo(e,t=null){this.peer.getFileUploadInfo(e,t)}static logout(e=null){this.peer.logout(e)}}t.GNNetwork=GNNetwork,GNNetwork.AUTH_TOKEN_KEY="[GN]_AUTH_TOKEN_KEY",GNNetwork.USER_ID_KEY="[GN]_USER_ID_KEY",GNNetwork.DEVICE_ID_KEY="[GN]_DEVICE_ID_KEY"},6381:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GNArray=t.GNArrayBuilder=t.GNHashtable=t.GNHashtableBuilder=void 0;class GNData{get(e,t){return t}getBoolean(e,t){return this.get(e,t)}getObject(e,t){return this.get(e,t)}getString(e,t){return this.get(e,t)}getNumber(e,t){return this.get(e,t)}getGNHashtable(e,t){return this.get(e,t)}getGNArray(e,t){return this.get(e,t)}static createGNHashtableFromObject(e){let t=new GNHashtable,r=Object.keys(e);for(let o=0;o<r.length;o++){let n=r[o];t.add(n,e[n])}return t}static createGNArrayFromArray(e){let t=new GNArray,r=e;for(let e=0;e<r.length;e++)t.add(r[e]);return t}static createUseDataFromOriginData(e){if(null==e)return null;let t=typeof e;return"string"===t||"number"===t||"boolean"===t||e instanceof GNArray||e instanceof GNHashtable?e:"object"===t?Array.isArray(e)?this.createGNArrayFromArray(e):this.createGNHashtableFromObject(e):null}static createDataFromUseData(e){return null==e?null:e instanceof GNArray||e instanceof GNHashtable?e.toData():e}}class GNHashtableBuilder{add(e,t){return this.dict[e]=t,this}addAll(e){return Object.keys(e).forEach((t=>{this.add(t,e[t])})),this}constructor(){this.dict={},this.dict={}}build(){let e=new GNHashtable;return Object.keys(this.dict).forEach((t=>{e.add(t,this.dict[t])})),e}}t.GNHashtableBuilder=GNHashtableBuilder;class GNHashtable extends GNData{constructor(){super(...arguments),this.dict={}}clear(){this.dict={}}remove(e){return!!this.containsKey(e)&&(delete this.dict[e],!0)}count(){return Object.keys(this.dict).length}containsKey(e){let t=Object.keys(this.dict),r=e.toString();return-1!=t.indexOf(r)}get(e,t){let r=this.dict[e];return null==r?t:r}add(e,t){this.dict[e]=GNData.createUseDataFromOriginData(t)}toData(){let e={},t=Object.keys(this.dict);for(let r=0;r<t.length;r++){let o=t[r];e[o]=GNData.createDataFromUseData(this.dict[o])}return e}static builder(){return new GNHashtableBuilder}toString(){return JSON.stringify(this.dict)}}t.GNHashtable=GNHashtable;class GNArrayBuilder{add(e){return this.array.push(e),this}addAll(e){return e.forEach((e=>{this.add(e)})),this}build(){let e=new GNArray;return this.array.forEach((t=>{e.add(t)})),e}constructor(){this.array=[],this.array=[]}}t.GNArrayBuilder=GNArrayBuilder;class GNArray extends GNData{constructor(){super(...arguments),this.array=[]}clear(){this.array=[]}remove(e){return!(e<0||e>=this.array.length)&&(this.array.splice(e,1),!0)}count(){return this.array.length}get(e,t){if(e<0||e>=this.array.length)return null;let r=this.array[e];return null==r?t:r}add(e){this.array.push(GNData.createUseDataFromOriginData(e))}toData(){let e=[];for(let t=0;t<this.array.length;t++)e.push(GNData.createDataFromUseData(this.array[t]));return e}static builder(){return new GNArrayBuilder}toString(){return JSON.stringify(this.array)}}t.GNArray=GNArray},4951:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GNServerSettings=void 0;const o=r(6081);t.GNServerSettings=class GNServerSettings{constructor(){this.serverAddress="127.0.0.1",this.serverPort=2202,this.useSsl=!1,this.useSocket=!0,this.useHttp=!0,this.sendRate=20,this.reconnectDelay=5e3,this.pingInterval=2e4,this.pingTimeout=2e4,this.logType=o.LogType.All}config(e){this.serverAddress=e.serverAddress,this.serverPort=e.serverPort,this.useSsl=e.useSsl,this.useSocket=e.useSocket,this.useHttp=e.useHttp,this.sendRate=e.sendRate,this.reconnectDelay=e.reconnectDelay,this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.codeCanSendNotAuthorized=e.codeCanSendNotAuthorized,this.gnServerSourcePath=e.gnServerSourcePath,this.logType=e.logType}getServerAddress(){return this.serverAddress}setServerAddress(e){this.serverAddress=e}getServerPort(){return this.serverPort}setServerPort(e){this.serverPort=e}isUseSsl(){return this.useSsl}setUseSsl(e){this.useSsl=e}isUseSocket(){return this.useSocket}setUseSocket(e){this.useSocket=e}isUseHttp(){return this.useHttp}setUseHttp(e){this.useHttp=e}getSendRate(){return this.sendRate}setSendRate(e){this.sendRate=e}getReconnectDelay(){return this.reconnectDelay}setReconnectDelay(e){this.reconnectDelay=e}getPingInterval(){return this.pingInterval}setPingInterval(e){this.pingInterval=e}getPingTimeout(){return this.pingTimeout}setPingTimeout(e){this.pingTimeout=e}getCodeCanSendNotAuthorized(){return this.codeCanSendNotAuthorized}setCodeCanSendNotAuthorized(e){this.codeCanSendNotAuthorized=e}getGNServerSourcePath(){return this.gnServerSourcePath}setGNServerSourcePath(e){this.gnServerSourcePath=e}getLogType(){return this.logType}setLogType(e){this.logType=e}getSocketUrl(){return this.serverPort<0?(this.useSsl?"https":"http")+"://"+this.serverAddress:(this.useSsl?"https":"http")+"://"+this.serverAddress+":"+this.getServerPort}getHttpUrl(){return this.serverPort<0?(this.isUseSsl?"https":"http")+"://"+this.serverAddress:(this.useSsl?"https":"http")+"://"+this.serverAddress+":"+this.serverPort}}},2509:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Commands=void 0;class Commands{}t.Commands=Commands,Commands.USER_AGENT="User-Agent",Commands.CONTENT_TYPE="Content-Type",Commands.CONTENT_LENGHT="Content-Length",Commands.APPLICATION_JSON="application/json",Commands.APPLICATION_MSGPACK="application/msgpack",Commands.RequestAuthTokenCmd="a",Commands.RequestCmd_MsgPack="r",Commands.ResponseCmd_MsgPack="r",Commands.EventCmd_MsgPack="e",Commands.RequestCmd_Json="t",Commands.ResponseCmd_Json="t",Commands.EventCmd_Json="y",Commands.Data="d",Commands.File="f"},384:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.EventCode=void 0;class EventCode{}t.EventCode=EventCode,EventCode.OnDebug=-1},9423:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.OperationCode=void 0;class OperationCode{}t.OperationCode=OperationCode,OperationCode.Logout=-10,OperationCode.Debug=-1,OperationCode.GetAppConfig=1,OperationCode.Login=2,OperationCode.RegisterAccount=3,OperationCode.EnterDisplayName=4,OperationCode.RegisterSocket=5,OperationCode.FetchAllData=6,OperationCode.CreateNewFileUploadInfo=7,OperationCode.GetFileUploadInfo=8,OperationCode.FetchSparkPlayer=9},5985:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ReturnCode=void 0;class ReturnCode{}t.ReturnCode=ReturnCode,ReturnCode.MaxSizeRequestReject=-10,ReturnCode.MaxRequestReject=-9,ReturnCode.MaxCCUReject=-8,ReturnCode.OperationNotAuthorized=-7,ReturnCode.InvalidRequestParameters=-6,ReturnCode.OperationInvalid=-3,ReturnCode.InternalServerError=-2,ReturnCode.OperationTimeout=-1,ReturnCode.UnknownError=0,ReturnCode.Ok=1},6345:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FriendStatus=void 0,function(e){e[e.Friend=0]="Friend",e[e.WaitingAccept=1]="WaitingAccept",e[e.SentRequestAndWaitingAccept=2]="SentRequestAndWaitingAccept",e[e.Unknown=3]="Unknown"}(t.FriendStatus||(t.FriendStatus={}))},2558:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GoogleLoginType=void 0,function(e){e[e.AccessToken=1]="AccessToken",e[e.IdToken=2]="IdToken"}(t.GoogleLoginType||(t.GoogleLoginType={}))},635:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidMemberType=void 0,function(e){e[e.UnknownError=0]="UnknownError",e[e.DataRequired=1]="DataRequired",e[e.TypeInvalid=2]="TypeInvalid",e[e.StringNull=3]="StringNull",e[e.StringMinLength=4]="StringMinLength",e[e.StringMaxLength=5]="StringMaxLength",e[e.NumberMinValue=6]="NumberMinValue",e[e.NumberMaxValue=7]="NumberMaxValue",e[e.NumberMustInt=8]="NumberMustInt",e[e.GNHashtableNull=9]="GNHashtableNull",e[e.GNHashtableMinLength=10]="GNHashtableMinLength",e[e.GNHashtableMaxLength=11]="GNHashtableMaxLength",e[e.GNArrayNull=12]="GNArrayNull",e[e.GNArrayMinLength=13]="GNArrayMinLength",e[e.GNArrayMaxLength=14]="GNArrayMaxLength"}(t.InvalidMemberType||(t.InvalidMemberType={}))},8466:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LoginType=void 0,function(e){e[e.Account=1]="Account",e[e.Device=2]="Device",e[e.Facebook=3]="Facebook",e[e.Google=4]="Google",e[e.Apple=5]="Apple",e[e.UserId=6]="UserId",e[e.PublicAddress=7]="PublicAddress",e[e.CustomId=8]="CustomId"}(t.LoginType||(t.LoginType={}))},6392:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PlatformType=void 0,function(e){e[e.PC=0]="PC",e[e.Android=1]="Android",e[e.iOS=2]="iOS",e[e.WebGL=3]="WebGL",e[e.Editor=4]="Editor",e[e.Unknown=9]="Unknown"}(t.PlatformType||(t.PlatformType={}))},4919:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UserRoleType=void 0,function(e){e[e.Administrator=0]="Administrator",e[e.GameMaster=1]="GameMaster",e[e.SuperModerazor=2]="SuperModerazor",e[e.Moderazor=3]="Moderazor",e[e.User=100]="User",e[e.UserNonActivate=101]="UserNonActivate"}(t.UserRoleType||(t.UserRoleType={}))},7043:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DebugErrorCode=void 0;class DebugErrorCode{}t.DebugErrorCode=DebugErrorCode,DebugErrorCode.Ok=1},9084:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.EnterDisplayNameErrorCode=void 0;class EnterDisplayNameErrorCode{}t.EnterDisplayNameErrorCode=EnterDisplayNameErrorCode,EnterDisplayNameErrorCode.Ok=1},9212:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FetchAllDataErrorCode=void 0;class FetchAllDataErrorCode{}t.FetchAllDataErrorCode=FetchAllDataErrorCode,FetchAllDataErrorCode.Ok=1,FetchAllDataErrorCode.UserHadBanned=2},4102:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FetchSparkPlayerErrorCode=void 0;class FetchSparkPlayerErrorCode{}t.FetchSparkPlayerErrorCode=FetchSparkPlayerErrorCode,FetchSparkPlayerErrorCode.Ok=1,FetchSparkPlayerErrorCode.UserHadBanned=2},8620:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FileUploadInfoErrorCode=void 0;class FileUploadInfoErrorCode{}t.FileUploadInfoErrorCode=FileUploadInfoErrorCode,FileUploadInfoErrorCode.Ok=1,FileUploadInfoErrorCode.LimitFileUpload=2,FileUploadInfoErrorCode.FileIdNotFound=3},9818:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GetAppConfigErrorCode=void 0;class GetAppConfigErrorCode{}t.GetAppConfigErrorCode=GetAppConfigErrorCode,GetAppConfigErrorCode.Ok=1},7425:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LoginErrorCode=void 0;class LoginErrorCode{}t.LoginErrorCode=LoginErrorCode,LoginErrorCode.Ok=1,LoginErrorCode.UserDoesNotExists=2,LoginErrorCode.ErrorWhenLoginFacebook=3,LoginErrorCode.UserDoesExists=4,LoginErrorCode.UserHadBanned=5,LoginErrorCode.ErrorWhenLoginApple=6,LoginErrorCode.RandomMessageExpired=7,LoginErrorCode.PublicAddressWrong=8,LoginErrorCode.MaxCCU=9},2432:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RegisterSocketErrorCode=void 0;class RegisterSocketErrorCode{}t.RegisterSocketErrorCode=RegisterSocketErrorCode,RegisterSocketErrorCode.Ok=1},901:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DebugParameterCode=void 0;class DebugParameterCode{}t.DebugParameterCode=DebugParameterCode,DebugParameterCode.String="1",DebugParameterCode.Number="2",DebugParameterCode.Boolean="3",DebugParameterCode.GNHashtable="4",DebugParameterCode.GNArray="5"},2423:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.EnterDisplayNameParameterCode=void 0;class EnterDisplayNameParameterCode{}t.EnterDisplayNameParameterCode=EnterDisplayNameParameterCode,EnterDisplayNameParameterCode.DisplayName="1",EnterDisplayNameParameterCode.UserRole="2"},1594:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FetchAllDataParameterCode=void 0;class FetchAllDataParameterCode{}t.FetchAllDataParameterCode=FetchAllDataParameterCode,FetchAllDataParameterCode.UserId="1",FetchAllDataParameterCode.DisplayName="2",FetchAllDataParameterCode.UserRole="3",FetchAllDataParameterCode.TsExpire="4",FetchAllDataParameterCode.Reason="5"},3009:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FetchSparkPlayerParameterCode=void 0;class FetchSparkPlayerParameterCode{}t.FetchSparkPlayerParameterCode=FetchSparkPlayerParameterCode,FetchSparkPlayerParameterCode.UserId="1",FetchSparkPlayerParameterCode.UserExternal="2",FetchSparkPlayerParameterCode.CustomId="3",FetchSparkPlayerParameterCode.FacebookId="4",FetchSparkPlayerParameterCode.GoogleUserId="5",FetchSparkPlayerParameterCode.AppleUserId="6",FetchSparkPlayerParameterCode.DeviceInfo="7",FetchSparkPlayerParameterCode.PublicAddress="8",FetchSparkPlayerParameterCode.TsExpire="9",FetchSparkPlayerParameterCode.Reason="10",FetchSparkPlayerParameterCode.UserRole="11",FetchSparkPlayerParameterCode.TsCreate="12",FetchSparkPlayerParameterCode.Fullname="13"},8823:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FileUploadInfoParameterCode=void 0;class FileUploadInfoParameterCode{}t.FileUploadInfoParameterCode=FileUploadInfoParameterCode,FileUploadInfoParameterCode.FileId="1",FileUploadInfoParameterCode.OriginFileName="2",FileUploadInfoParameterCode.TsCreate="3",FileUploadInfoParameterCode.TsUploadExpire="4",FileUploadInfoParameterCode.UserId="5",FileUploadInfoParameterCode.TsUploadFile="6",FileUploadInfoParameterCode.MimeType="7",FileUploadInfoParameterCode.Size="8",FileUploadInfoParameterCode.FolderFileName="9"},3074:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GetAppConfigParameterCode=void 0;class GetAppConfigParameterCode{}t.GetAppConfigParameterCode=GetAppConfigParameterCode,GetAppConfigParameterCode.ConfigTypes="1",GetAppConfigParameterCode.ConfigNotUptodateLst="2"},4688:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LoginParameterCode=void 0;class LoginParameterCode{}t.LoginParameterCode=LoginParameterCode,LoginParameterCode.LoginType="1",LoginParameterCode.Username="2",LoginParameterCode.Password="3",LoginParameterCode.DeviceInfo="4",LoginParameterCode.FacebookToken="5",LoginParameterCode.GoogleToken="6",LoginParameterCode.UserId="7",LoginParameterCode.AppleToken="8",LoginParameterCode.DisplayName="9",LoginParameterCode.Signature="10",LoginParameterCode.PublicAddress="11",LoginParameterCode.Message="12",LoginParameterCode.CustomId="13",LoginParameterCode.TsExpire="14",LoginParameterCode.Reason="15",LoginParameterCode.GoogleLoginType="16"},1822:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ParameterCode=void 0;class ParameterCode{}t.ParameterCode=ParameterCode,ParameterCode.AuthToken="A",ParameterCode.Ts="T",ParameterCode.ErrorCode="E",ParameterCode.UserId="U"},479:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RegisterSocketParameterCode=void 0;class RegisterSocketParameterCode{}t.RegisterSocketParameterCode=RegisterSocketParameterCode,RegisterSocketParameterCode.SId="1"},3552:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidMember=void 0;t.InvalidMember=class InvalidMember{}},7578:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.OperationEvent=void 0;const o=r(7474);t.OperationEvent=class OperationEvent{constructor(e,t=null,r=!0){this.eventCode=e,this.parameters=t,this.encrypted=r}getEventCode(){return this.eventCode}getParameters(){return this.parameters}isEncrypted(){return this.encrypted}setScriptData(e,t){return this.parameters.add(e,t),this}setParameters(e){return this.parameters=e,this}setEncrypted(e){return this.encrypted=e,this}toString(){return"Code: "+o.CodeHelper.getEventCodeName(this.eventCode)+", parameters "+this.parameters}}},8264:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.OperationHelper=void 0;const o=r(5985),n=r(2574);class OperationHelper{static invalidMemberData(e){let t=[],r=e.getInvalidMembers();if(null!=r)for(let e=0;e<r.length;e++){let o=r[e];t.push([o.code,o.invalidMemberType])}return t}static toResponseSocketData(e){return[e.getReturnCode(),e.getReturnCode()==o.ReturnCode.Ok?e.getParameters().toData():e.getReturnCode()==o.ReturnCode.InvalidRequestParameters?OperationHelper.invalidMemberData(e):e.getDebugMessage(),e.getResponseId()]}static toResponseHttpData(e){return[e.getReturnCode(),e.getReturnCode()==o.ReturnCode.Ok?e.getParameters().toData():e.getReturnCode()==o.ReturnCode.InvalidRequestParameters?OperationHelper.invalidMemberData(e):e.getDebugMessage()]}static newOperationResponse(e,t,r){return new n.OperationResponse(e,t,r)}static newOperationResponseInvalid(e,t,r,n){let s=this.newOperationResponse(e,t,r);return s.setReturnCode(o.ReturnCode.OperationInvalid),null!==n&&s.setDebugMessage(n),s}static newOperationResponseInvalidRequestParameters(e,t,r,n,s){let i=this.newOperationResponse(e,t,n);return i.setReturnCode(o.ReturnCode.InvalidRequestParameters),i.setInvalidMembers(r),null!==s&&i.setDebugMessage(s),i}static newOperationResponseInternalServerError(e,t,r,n){let s=this.newOperationResponse(e,t,r);return s.setReturnCode(o.ReturnCode.InternalServerError),null!==n&&s.setDebugMessage(n),s}static newOperationResponseNotAuthorized(e,t,r,n){let s=this.newOperationResponse(e,t,r);return s.setReturnCode(o.ReturnCode.OperationNotAuthorized),null!==n&&s.setDebugMessage(n),s}static toEventSocketData(e){return[e.getEventCode(),null==e.getParameters()?null:e.getParameters().toData()]}static toSocketData(e){let t=e.getRequestId();return-1==t?[e.getOperationCode(),null==e.getParameters()?null:e.getParameters().toData()]:[e.getOperationCode(),null==e.getParameters()?null:e.getParameters().toData(),t]}}t.OperationHelper=OperationHelper},2088:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.OperationRequest=void 0;const o=r(7474),n=r(6381);class OperationRequest{isValidRequest(){return this.isValid}constructor(e,t,r=OperationRequest.DefaultTimeOut){this.operationCode=e,this.encrypted=t,this.timeout=r}getOperationCode(){return this.operationCode}getRequestId(){return this.requestId}getParameters(){return this.parameters}isEncrypted(){return this.encrypted}getTimeout(){return this.timeout}setRequestId(e){return this.requestId=e,this}setScriptData(e,t){return null==this.parameters&&(this.parameters=new n.GNHashtable),this.parameters.add(e,t),this}setParameters(e){return this.parameters=e,this}setEncrypted(e){return this.encrypted=e,this}setTimeout(e){return this.timeout=e,this}toString(){return"Code: "+o.CodeHelper.getOperationCodeName(this.operationCode)+", requestId: "+this.requestId+", parameters "+this.parameters+", encrypted "+this.encrypted}}t.OperationRequest=OperationRequest,OperationRequest.DefaultTimeOut=15},2574:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.OperationResponse=void 0;const o=r(7474),n=r(6381),s=r(5985);t.OperationResponse=class OperationResponse{constructor(e,t,r=!0){this.operationCode=e,this.responseId=t,this.encrypted=r,this.parameters=new n.GNHashtable,this.debugMessage=null}getOperationCode(){return this.operationCode}getReturnCode(){return this.returnCode}getParameters(){return this.parameters}isEncrypted(){return this.encrypted}getResponseId(){return this.responseId}getDebugMessage(){return this.debugMessage}getInvalidMembers(){return this.invalidMembers}hasError(){return this.getReturnCode()!=s.ReturnCode.Ok}setReturnCode(e){return this.returnCode=e,this}setDebugMessage(e){return this.debugMessage=e,this}setScriptData(e,t){return this.parameters.add(e,t),this}setParameters(e){return this.parameters=e,this}setEncrypted(e){return this.encrypted=e,this}setInvalidMembers(e){return this.invalidMembers=e,this}toString(){let e="";if(e+="Code: "+o.CodeHelper.getOperationCodeName(this.operationCode)+", responseId: "+this.responseId+", returnCode "+o.CodeHelper.getReturnCodeName(this.returnCode),this.returnCode==s.ReturnCode.Ok)e+=", parameters "+this.parameters;else if(this.returnCode==s.ReturnCode.InvalidRequestParameters)if(null!=this.invalidMembers){let t="";this.invalidMembers.forEach((e=>{t+=e})),e+=", invalidMembers "+t}else e+=", invalidMembers "+this.invalidMembers;else e+=", debugMessage "+this.debugMessage;return e}}},1655:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CreateNewFileUploadInfoOperationRequest=void 0;const o=r(6381),n=r(9423),s=r(8823),i=r(2088),a=r(3913);class CreateNewFileUploadInfoOperationRequest extends a.CustomOperationRequest{constructor(e,t=i.OperationRequest.DefaultTimeOut){super(t),this.operationCode=n.OperationCode.CreateNewFileUploadInfo,this.operationEncrypted=!0,this.operationParameters=o.GNHashtable.builder().add(s.FileUploadInfoParameterCode.OriginFileName,e).build()}}t.CreateNewFileUploadInfoOperationRequest=CreateNewFileUploadInfoOperationRequest},3913:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CustomOperationRequest=void 0;const o=r(2088);t.CustomOperationRequest=class CustomOperationRequest{constructor(e){this.operationTimeout=e}build(){let e=new o.OperationRequest(this.operationCode,this.operationEncrypted,this.operationTimeout);return null!=this.operationParameters&&e.setParameters(this.operationParameters),e}}},8275:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DebugOperationRequest=void 0;const o=r(6381),n=r(9423),s=r(901),i=r(2088),a=r(3913);class DebugOperationRequest extends a.CustomOperationRequest{constructor(e,t,r,a,p,l=i.OperationRequest.DefaultTimeOut){super(l),this.operationCode=n.OperationCode.Debug,this.operationEncrypted=!0,this.operationParameters=o.GNHashtable.builder().add(s.DebugParameterCode.Boolean,e).add(s.DebugParameterCode.Number,t).add(s.DebugParameterCode.String,r).add(s.DebugParameterCode.GNHashtable,a).add(s.DebugParameterCode.GNArray,p).build()}}t.DebugOperationRequest=DebugOperationRequest},2135:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.EnterDisplayNameOperationRequest=void 0;const o=r(6381),n=r(9423),s=r(2423),i=r(2088),a=r(3913);class EnterDisplayNameOperationRequest extends a.CustomOperationRequest{constructor(e,t=i.OperationRequest.DefaultTimeOut){super(t),this.operationCode=n.OperationCode.EnterDisplayName,this.operationEncrypted=!0,this.operationParameters=o.GNHashtable.builder().add(s.EnterDisplayNameParameterCode.DisplayName,e).build()}}t.EnterDisplayNameOperationRequest=EnterDisplayNameOperationRequest},1477:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FetchAllDataOperationRequest=void 0;const o=r(9423),n=r(2088),s=r(3913);class FetchAllDataOperationRequest extends s.CustomOperationRequest{constructor(e=n.OperationRequest.DefaultTimeOut){super(e),this.operationCode=o.OperationCode.FetchAllData,this.operationEncrypted=!0}}t.FetchAllDataOperationRequest=FetchAllDataOperationRequest},5347:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FetchSparkPlayerOperationRequest=void 0;const o=r(9423),n=r(2088),s=r(3913);class FetchSparkPlayerOperationRequest extends s.CustomOperationRequest{constructor(e=n.OperationRequest.DefaultTimeOut){super(e),this.operationCode=o.OperationCode.FetchSparkPlayer,this.operationEncrypted=!0}}t.FetchSparkPlayerOperationRequest=FetchSparkPlayerOperationRequest},7067:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GetAppConfigOperationRequest=void 0;const o=r(6381),n=r(9423),s=r(3074),i=r(2088),a=r(3913);class GetAppConfigOperationRequest extends a.CustomOperationRequest{constructor(e,t=i.OperationRequest.DefaultTimeOut){super(t),this.operationCode=n.OperationCode.GetAppConfig,this.operationEncrypted=!0,this.operationParameters=o.GNHashtable.builder().add(s.GetAppConfigParameterCode.ConfigTypes,e).build()}}t.GetAppConfigOperationRequest=GetAppConfigOperationRequest},5257:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GetFileUploadInfoOperationRequest=void 0;const o=r(6381),n=r(9423),s=r(8823),i=r(2088),a=r(3913);class GetFileUploadInfoOperationRequest extends a.CustomOperationRequest{constructor(e,t=i.OperationRequest.DefaultTimeOut){super(t),this.operationCode=n.OperationCode.GetFileUploadInfo,this.operationEncrypted=!0,this.operationParameters=o.GNHashtable.builder().add(s.FileUploadInfoParameterCode.FileId,e).build()}}t.GetFileUploadInfoOperationRequest=GetFileUploadInfoOperationRequest},842:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CustomIdLoginOperationRequest=t.PublicAddressGetRandomMessageOperationRequest=t.PublicAddressLoginOperationRequest=t.UserIdLoginOperationRequest=t.AppleLoginOperationRequest=t.GoogleLoginOperationRequest=t.FacebookLoginOperationRequest=t.DeviceLoginOperationRequest=t.AccountLoginOperationRequest=t.LoginOperationRequest=void 0;const o=r(6381),n=r(8466),s=r(9423),i=r(4688),a=r(2088),p=r(3913);class LoginOperationRequest extends p.CustomOperationRequest{constructor(e=a.OperationRequest.DefaultTimeOut){super(e),this.operationCode=s.OperationCode.Login,this.operationEncrypted=!0}}t.LoginOperationRequest=LoginOperationRequest;t.AccountLoginOperationRequest=class AccountLoginOperationRequest extends LoginOperationRequest{constructor(e,t,r=a.OperationRequest.DefaultTimeOut){super(r),this.operationParameters=o.GNHashtable.builder().add(i.LoginParameterCode.LoginType,n.LoginType.Account).add(i.LoginParameterCode.Username,e).add(i.LoginParameterCode.Password,t).build()}};t.DeviceLoginOperationRequest=class DeviceLoginOperationRequest extends LoginOperationRequest{constructor(e,t=a.OperationRequest.DefaultTimeOut){super(t),this.operationParameters=o.GNHashtable.builder().add(i.LoginParameterCode.LoginType,n.LoginType.Device).add(i.LoginParameterCode.DeviceInfo,e).build()}};t.FacebookLoginOperationRequest=class FacebookLoginOperationRequest extends LoginOperationRequest{constructor(e,t=a.OperationRequest.DefaultTimeOut){super(t),this.operationParameters=o.GNHashtable.builder().add(i.LoginParameterCode.LoginType,n.LoginType.Facebook).add(i.LoginParameterCode.FacebookToken,e).build()}};t.GoogleLoginOperationRequest=class GoogleLoginOperationRequest extends LoginOperationRequest{constructor(e,t,r=a.OperationRequest.DefaultTimeOut){super(r),this.operationParameters=o.GNHashtable.builder().add(i.LoginParameterCode.LoginType,n.LoginType.Google).add(i.LoginParameterCode.GoogleToken,e).add(i.LoginParameterCode.GoogleLoginType,t).build()}};t.AppleLoginOperationRequest=class AppleLoginOperationRequest extends LoginOperationRequest{constructor(e,t,r=a.OperationRequest.DefaultTimeOut){super(r),this.operationParameters=o.GNHashtable.builder().add(i.LoginParameterCode.LoginType,n.LoginType.Apple).add(i.LoginParameterCode.AppleToken,e).add(i.LoginParameterCode.DisplayName,t).build()}};t.UserIdLoginOperationRequest=class UserIdLoginOperationRequest extends LoginOperationRequest{constructor(e,t=a.OperationRequest.DefaultTimeOut){super(t),this.operationParameters=o.GNHashtable.builder().add(i.LoginParameterCode.LoginType,n.LoginType.UserId).add(i.LoginParameterCode.UserId,e).build()}};t.PublicAddressLoginOperationRequest=class PublicAddressLoginOperationRequest extends LoginOperationRequest{constructor(e,t,r,s=a.OperationRequest.DefaultTimeOut){super(s),this.operationParameters=o.GNHashtable.builder().add(i.LoginParameterCode.LoginType,n.LoginType.PublicAddress).add(i.LoginParameterCode.Signature,e).add(i.LoginParameterCode.PublicAddress,t).add(i.LoginParameterCode.Message,r).build()}};t.PublicAddressGetRandomMessageOperationRequest=class PublicAddressGetRandomMessageOperationRequest extends LoginOperationRequest{constructor(e=a.OperationRequest.DefaultTimeOut){super(e),this.operationParameters=o.GNHashtable.builder().add(i.LoginParameterCode.LoginType,n.LoginType.PublicAddress).build()}};t.CustomIdLoginOperationRequest=class CustomIdLoginOperationRequest extends LoginOperationRequest{constructor(e,t=a.OperationRequest.DefaultTimeOut){super(t),this.operationParameters=o.GNHashtable.builder().add(i.LoginParameterCode.LoginType,n.LoginType.CustomId).add(i.LoginParameterCode.CustomId,e).build()}}},759:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LogoutOperationRequest=void 0;const o=r(9423),n=r(2088),s=r(3913);class LogoutOperationRequest extends s.CustomOperationRequest{constructor(e=n.OperationRequest.DefaultTimeOut){super(e),this.operationCode=o.OperationCode.Logout,this.operationEncrypted=!0}}t.LogoutOperationRequest=LogoutOperationRequest},4516:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RegisterAccountOperationRequest=void 0;const o=r(6381),n=r(9423),s=r(4688),i=r(2088),a=r(3913);class RegisterAccountOperationRequest extends a.CustomOperationRequest{constructor(e,t,r=i.OperationRequest.DefaultTimeOut){super(r),this.operationCode=n.OperationCode.RegisterAccount,this.operationEncrypted=!0,this.operationParameters=o.GNHashtable.builder().add(s.LoginParameterCode.Username,e).add(s.LoginParameterCode.Password,t).build()}}t.RegisterAccountOperationRequest=RegisterAccountOperationRequest},7239:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RegisterSocketOperationRequest=void 0;const o=r(6381),n=r(9423),s=r(479),i=r(2088),a=r(3913);class RegisterSocketOperationRequest extends a.CustomOperationRequest{constructor(e,t=i.OperationRequest.DefaultTimeOut){super(t),this.operationCode=n.OperationCode.RegisterSocket,this.operationEncrypted=!0,this.operationParameters=o.GNHashtable.builder().add(s.RegisterSocketParameterCode.SId,e).build()}}t.RegisterSocketOperationRequest=RegisterSocketOperationRequest},9010:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TemplateOperationRequest=void 0;const o=r(6381),n=r(9423),s=r(901),i=r(2088),a=r(3913);class TemplateOperationRequest extends a.CustomOperationRequest{constructor(e,t=i.OperationRequest.DefaultTimeOut){super(t),this.operationCode=n.OperationCode.Debug,this.operationEncrypted=!0,this.operationParameters=o.GNHashtable.builder().add(s.DebugParameterCode.Boolean,e).build()}}t.TemplateOperationRequest=TemplateOperationRequest},1099:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CreateNewFileUploadInfoOperationResponse=void 0;const o=r(8620),n=r(8823),s=r(2584);class CreateNewFileUploadInfoOperationResponse extends s.CustomOperationResponse{setupOperationResponse(e){super.setupOperationResponse(e),this.hasError()||this.errorCode==o.FileUploadInfoErrorCode.Ok&&(this.fileId=this.parameters.getString(n.FileUploadInfoParameterCode.FileId),this.originFileName=this.parameters.getString(n.FileUploadInfoParameterCode.OriginFileName),this.tsCreate=this.parameters.getNumber(n.FileUploadInfoParameterCode.TsCreate),this.tsUploadExpire=this.parameters.getNumber(n.FileUploadInfoParameterCode.TsUploadExpire),this.userId=this.parameters.getString(n.FileUploadInfoParameterCode.UserId))}}t.CreateNewFileUploadInfoOperationResponse=CreateNewFileUploadInfoOperationResponse},2584:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CustomOperationResponse=void 0;const o=r(1822),n=r(5985);t.CustomOperationResponse=class CustomOperationResponse{hasError(){return this.returnCode!=n.ReturnCode.Ok}setupOperationResponse(e){this.operationCode=e.getOperationCode(),this.returnCode=e.getReturnCode(),this.debugMessage=e.getDebugMessage(),this.parameters=e.getParameters(),this.invalidMembers=e.getInvalidMembers(),this.hasError()||(this.errorCode=this.parameters.getNumber(o.ParameterCode.ErrorCode))}toString(){return"ReturnCode: "+this.returnCode+" "+(null!=this.parameters?this.parameters.toString():this.debugMessage)}}},9248:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DebugOperationResponse=void 0;const o=r(7043),n=r(901),s=r(2584);class DebugOperationResponse extends s.CustomOperationResponse{setupOperationResponse(e){super.setupOperationResponse(e),this.hasError()||this.errorCode==o.DebugErrorCode.Ok&&(this.boolean=this.parameters.getBoolean(n.DebugParameterCode.Boolean),this.string=this.parameters.getString(n.DebugParameterCode.String),this.number=this.parameters.getNumber(n.DebugParameterCode.Number),this.gnHashtable=this.parameters.getGNHashtable(n.DebugParameterCode.GNHashtable),this.gnArray=this.parameters.getGNArray(n.DebugParameterCode.GNArray))}}t.DebugOperationResponse=DebugOperationResponse},1165:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.EnterDisplayNameOperationResponse=void 0;const o=r(9084),n=r(2423),s=r(2584);class EnterDisplayNameOperationResponse extends s.CustomOperationResponse{setupOperationResponse(e){super.setupOperationResponse(e),this.hasError()||this.errorCode==o.EnterDisplayNameErrorCode.Ok&&(this.userRole=this.parameters.getNumber(n.EnterDisplayNameParameterCode.UserRole),this.displayName=this.parameters.getString(n.EnterDisplayNameParameterCode.DisplayName))}}t.EnterDisplayNameOperationResponse=EnterDisplayNameOperationResponse},7162:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FetchAllDataOperationResponse=void 0;const o=r(9212),n=r(1594),s=r(2584);class FetchAllDataOperationResponse extends s.CustomOperationResponse{setupOperationResponse(e){super.setupOperationResponse(e),this.hasError()||(this.errorCode==o.FetchAllDataErrorCode.Ok?(this.userId=this.parameters.getString(n.FetchAllDataParameterCode.UserId),this.userRole=this.parameters.getNumber(n.FetchAllDataParameterCode.UserRole),this.displayName=this.parameters.getString(n.FetchAllDataParameterCode.DisplayName)):this.errorCode==o.FetchAllDataErrorCode.UserHadBanned&&(this.tsExpire=this.parameters.getNumber(n.FetchAllDataParameterCode.TsExpire),this.reason=this.parameters.getString(n.FetchAllDataParameterCode.Reason)))}}t.FetchAllDataOperationResponse=FetchAllDataOperationResponse},8023:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FetchSparkPlayerOperationResponse=void 0;const o=r(4102),n=r(3009),s=r(2584);class FetchSparkPlayerOperationResponse extends s.CustomOperationResponse{setupOperationResponse(e){if(super.setupOperationResponse(e),!this.hasError())if(this.errorCode==o.FetchSparkPlayerErrorCode.Ok){this.userId=this.parameters.getString(n.FetchSparkPlayerParameterCode.UserId),this.userRole=this.parameters.getNumber(n.FetchSparkPlayerParameterCode.UserRole),this.fullname=this.parameters.getString(n.FetchSparkPlayerParameterCode.Fullname),this.tsCreate=this.parameters.getNumber(n.FetchSparkPlayerParameterCode.TsCreate);let e=this.parameters.getGNHashtable(n.FetchSparkPlayerParameterCode.UserExternal);this.userExternal={customId:e.getString(n.FetchSparkPlayerParameterCode.CustomId),facebookId:e.getString(n.FetchSparkPlayerParameterCode.FacebookId),googleUserId:e.getString(n.FetchSparkPlayerParameterCode.GoogleUserId),appleUserId:e.getString(n.FetchSparkPlayerParameterCode.AppleUserId),deviceInfo:e.getString(n.FetchSparkPlayerParameterCode.DeviceInfo),publicAddress:e.getString(n.FetchSparkPlayerParameterCode.PublicAddress)}}else this.errorCode==o.FetchSparkPlayerErrorCode.UserHadBanned&&(this.tsExpire=this.parameters.getNumber(n.FetchSparkPlayerParameterCode.TsExpire),this.reason=this.parameters.getString(n.FetchSparkPlayerParameterCode.Reason))}}t.FetchSparkPlayerOperationResponse=FetchSparkPlayerOperationResponse},2443:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GetAppConfigOperationResponse=void 0;const o=r(9818),n=r(3074),s=r(2584);class GetAppConfigOperationResponse extends s.CustomOperationResponse{setupOperationResponse(e){if(super.setupOperationResponse(e),!this.hasError()&&this.errorCode==o.GetAppConfigErrorCode.Ok){let e=this.parameters.getGNArray(n.GetAppConfigParameterCode.ConfigNotUptodateLst);this.configNotUptodateLst=[];for(let t=0;t<e.count();t++)this.configNotUptodateLst.push(e.getString(t))}}}t.GetAppConfigOperationResponse=GetAppConfigOperationResponse},6262:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GetFileUploadInfoOperationResponse=void 0;const o=r(8620),n=r(8823),s=r(2584);class GetFileUploadInfoOperationResponse extends s.CustomOperationResponse{setupOperationResponse(e){super.setupOperationResponse(e),this.hasError()||this.errorCode==o.FileUploadInfoErrorCode.Ok&&(this.fileId=this.parameters.getString(n.FileUploadInfoParameterCode.FileId),this.originFileName=this.parameters.getString(n.FileUploadInfoParameterCode.OriginFileName),this.tsCreate=this.parameters.getNumber(n.FileUploadInfoParameterCode.TsCreate),this.userId=this.parameters.getString(n.FileUploadInfoParameterCode.UserId),this.parameters.containsKey(n.FileUploadInfoParameterCode.TsUploadExpire)?(this.fileHasUpload=!1,this.tsUploadExpire=this.parameters.getNumber(n.FileUploadInfoParameterCode.TsUploadExpire)):(this.fileHasUpload=!0,this.tsUploadFile=this.parameters.getNumber(n.FileUploadInfoParameterCode.TsUploadFile),this.mimeType=this.parameters.getString(n.FileUploadInfoParameterCode.MimeType),this.size=this.parameters.getNumber(n.FileUploadInfoParameterCode.Size),this.folderFileName=this.parameters.getString(n.FileUploadInfoParameterCode.FolderFileName)))}}t.GetFileUploadInfoOperationResponse=GetFileUploadInfoOperationResponse},8178:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LoginOperationResponse=void 0;const o=r(7425),n=r(4688),s=r(1822),i=r(2584);class LoginOperationResponse extends i.CustomOperationResponse{setupOperationResponse(e){super.setupOperationResponse(e),this.hasError()||(this.errorCode==o.LoginErrorCode.Ok?(this.authToken=this.parameters.getString(s.ParameterCode.AuthToken),this.userId=this.parameters.getString(s.ParameterCode.UserId)):this.errorCode==o.LoginErrorCode.UserHadBanned&&(this.tsExpire=this.parameters.getNumber(n.LoginParameterCode.TsExpire),this.reason=this.parameters.getString(n.LoginParameterCode.Reason)))}}t.LoginOperationResponse=LoginOperationResponse},7224:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LogoutOperationResponse=void 0;const o=r(1619),n=r(6081),s=r(2584);class LogoutOperationResponse extends s.CustomOperationResponse{setupOperationResponse(e){super.setupOperationResponse(e),this.hasError()?n.GNDebug.logError("[GN] You need login before logout."):(o.GNNetwork.setAuthToken(""),o.GNNetwork.setUserId(""),n.GNDebug.log("[GN] Logout success."))}}t.LogoutOperationResponse=LogoutOperationResponse},1635:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PublicAddressGetRandomMessageOperationResponse=void 0;const o=r(7425),n=r(4688),s=r(2584);class PublicAddressGetRandomMessageOperationResponse extends s.CustomOperationResponse{setupOperationResponse(e){super.setupOperationResponse(e),this.hasError()||this.errorCode==o.LoginErrorCode.Ok&&(this.message=this.parameters.getString(n.LoginParameterCode.Message))}}t.PublicAddressGetRandomMessageOperationResponse=PublicAddressGetRandomMessageOperationResponse},4962:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RegisterAccountOperationResponse=void 0;const o=r(7425),n=r(8178);class RegisterAccountOperationResponse extends n.LoginOperationResponse{setupOperationResponse(e){super.setupOperationResponse(e),this.hasError||(this.errorCode,o.LoginErrorCode.Ok)}}t.RegisterAccountOperationResponse=RegisterAccountOperationResponse},8301:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RegisterSocketOperationResponse=void 0;const o=r(2432),n=r(2584);class RegisterSocketOperationResponse extends n.CustomOperationResponse{setupOperationResponse(e){super.setupOperationResponse(e),this.hasError||(this.errorCode,o.RegisterSocketErrorCode.Ok)}}t.RegisterSocketOperationResponse=RegisterSocketOperationResponse},2976:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TemplateOperationResponse=void 0;const o=r(7043),n=r(901),s=r(2584);class TemplateOperationResponse extends s.CustomOperationResponse{setupOperationResponse(e){super.setupOperationResponse(e),this.hasError()||this.errorCode==o.DebugErrorCode.Ok&&(this.boolean=this.parameters.getBoolean(n.DebugParameterCode.Boolean))}}t.TemplateOperationResponse=TemplateOperationResponse},7474:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CodeHelper=void 0;const o=r(384),n=r(9423),s=r(5985);class CodeHelper{static getOperationCodeName(e){let t=this.operationCodeDic[e];return t||this.UnknownCode}static getEventCodeName(e){let t=this.eventCodeDic[e];return t||this.UnknownCode}static getReturnCodeName(e){let t=this.returnCodeDic[e];return t||this.UnknownCode}static init(){this.setOperationCodeDic(),this.setEventCodeDic(),this.setReturnCodeDic()}static setOperationCodeDic(){this.operationCodeDic={},this.addOperationCodeDic(n.OperationCode)}static addOperationCodeDic(e){let t=Object.keys(e),r=Object.values(e);for(let e=0;e<t.length;e++)this.operationCodeDic[r[e]]=t[e]}static setEventCodeDic(){this.eventCodeDic={},this.addEventCodeDic(o.EventCode)}static addEventCodeDic(e){let t=Object.keys(e),r=Object.values(e);for(let e=0;e<t.length;e++)this.eventCodeDic[r[e]]=t[e]}static setReturnCodeDic(){this.returnCodeDic={},this.addReturnCodeDic(s.ReturnCode)}static addReturnCodeDic(e){let t=Object.keys(e),r=Object.values(e);for(let e=0;e<t.length;e++)this.returnCodeDic[r[e]]=t[e]}}t.CodeHelper=CodeHelper,CodeHelper.UnknownCode="Unknown"},7315:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GNSupport=void 0;t.GNSupport=class GNSupport{static init(){if(this._isBrowser="undefined"!=typeof window,this._isBrowser){null==globalThis.exports&&(globalThis.exports={}),globalThis.exports.localStorage=window.localStorage,globalThis.exports.crypto=window.crypto,globalThis.exports.axios=window.axios;let e=window.io;globalThis.exports.Manager=e.Manager,globalThis.exports.Socket=e.Socket;let t=window.msgpack;globalThis.exports.decode=t.decode,globalThis.exports.encode=t.encode}else{globalThis.exports||(globalThis.exports={});let e=r(1335).LocalStorage;globalThis.exports.localStorage=new e("./scratch");let t=r(4347);globalThis.exports.crypto=t,globalThis.exports.axios=r(2167);let o=r(8087);globalThis.exports.Manager=o.Manager,globalThis.exports.Socket=o.Socket;let n=r(2692);globalThis.exports.decode=n.decode,globalThis.exports.encode=n.encode}}static isBrowser(){return this._isBrowser}}},6081:(e,t)=>{var r;Object.defineProperty(t,"__esModule",{value:!0}),t.GNDebug=t.LogType=void 0,function(e){e[e.Off=0]="Off",e[e.Exception=1]="Exception",e[e.Error=2]="Error",e[e.Warning=3]="Warning",e[e.All=4]="All"}(r=t.LogType||(t.LogType={}));t.GNDebug=class GNDebug{static setLogType(e){this._logType=e}static log(e){this._logType>=r.All&&console.log(e)}static logException(e){this._logType>=r.Exception&&console.error(e)}static logWarning(e){this._logType>=r.Warning&&console.warn(e)}static logError(e){this._logType>=r.Error&&console.error(e)}}},6575:function(e,t,r){var o=this&&this.__awaiter||function(e,t,r,o){return new(r||(r=Promise))((function(n,s){function fulfilled(e){try{step(o.next(e))}catch(e){s(e)}}function rejected(e){try{step(o.throw(e))}catch(e){s(e)}}function step(e){e.done?n(e.value):function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}(e.value).then(fulfilled,rejected)}step((o=o.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.HttpPeer=t.PostType=t.HttpAppResponse=void 0;const n=r(6381),s=r(2509),i=r(9423),a=r(5985),p=r(1619),l=r(6081),u=r(4178),d=r(647),c=r(7437),g=r(7315);class HttpAppResponse{hasError(){return null!=this.error}}var h;t.HttpAppResponse=HttpAppResponse,function(e){e[e.Json=0]="Json",e[e.MsgPack=1]="MsgPack"}(h=t.PostType||(t.PostType={}));class HttpPeer extends d.PeerBase{initGNSocketObject(){let e=p.GNNetwork.getGNServerSettings();if(null==e)throw new Error("Where is GN Server Settings");this.isUse=e.isUseHttp(),this.httpUrl=e.getHttpUrl(),HttpPeer.userAgent="GN-ts-"+p.GNNetwork.getPlatform()+"@"+p.GNNetwork.getClientSdkVersion()}send(e){super.send(e),l.GNDebug.log("[GN Http SEND] "+e.getOperationRequest().toString());let t=e.getOperationRequest();if(p.GNNetwork.getAuthToken()&&-1==p.GNNetwork.getGNServerSettings().getCodeCanSendNotAuthorized().indexOf(t.getOperationCode())){let e=new n.GNArray;return e.add(a.ReturnCode.OperationNotAuthorized),e.add(null),e.add(t.getRequestId()),void this.onResponseHandler(e,t.isEncrypted())}if(t.getOperationCode()==i.OperationCode.Logout){let e=new n.GNArray;return e.add(a.ReturnCode.Ok),e.add(new n.GNHashtable),e.add(t.getRequestId()),void this.onResponseHandler(e,t.isEncrypted())}g.GNSupport.isBrowser()&&t.isEncrypted()&&(l.GNDebug.logWarning("GN JS client sdk does not support send encrypted request via HTTP, so we will send this request via HTTP non encrypted"),t.setEncrypted(!1));let r=t.isEncrypted()?h.MsgPack:h.Json,o=(r==h.Json?u.NetworkingPeer.API_JSON:u.NetworkingPeer.API_MSG_PACK)+"/"+t.getOperationCode(),s=this;this.postRequestViaHTTPRequest(o,t.getParameters(),r,{invoke:function(t){s.onSendOperationRequestResponse(e,t)}},t.getTimeout())}onSendOperationRequestResponse(e,t){let r=e.getOperationRequest(),o=new n.GNArray;if(!t.hasError()&&200==t.statusCode){let e=!1,s=null;if(t.text&&t.text[0]===HttpPeer.JSON_CHAR_KNOWN){let e=JSON.parse(t.text);s=n.GNArray.builder().addAll(e).build()}if(null==s&&null!=t.data){let r=globalThis.exports.decode(t.data);s=n.GNArray.builder().addAll(c.NetworkingPeerBase.fromMsgList(r)).build(),e=!0}if(null!=s){let t=s.getNumber(0);return o.add(t),t==a.ReturnCode.Ok?o.add(s.getGNHashtable(1,new n.GNHashtable)):t==a.ReturnCode.InvalidRequestParameters?o.add(s.getGNArray(1,new n.GNArray)):o.add(s.getString(1)),o.add(r.getRequestId()),void this.onResponseHandler(o,e)}}o.add(a.ReturnCode.UnknownError),o.add(t.error),o.add(r.getRequestId()),this.onResponseHandler(o,r.isEncrypted())}getRequest(e,t,r=15){this.getRequestViaHTTPRequest(e,t,r)}getRequestViaHTTPRequest(e,t,r){return o(this,void 0,void 0,(function*(){let o=globalThis.exports.axios,n={},i=p.GNNetwork.getAuthToken();i&&(n[s.Commands.RequestAuthTokenCmd]=i),g.GNSupport.isBrowser()||(n[s.Commands.USER_AGENT]=HttpPeer.userAgent);let a=new HttpAppResponse;try{let t=yield o.get(this.httpUrl+"/"+e,{headers:n,timeout:1e3*r,responseType:"arraybuffer"});a.statusCode=t.status;let s=this.toBuffers(t.data);a.data=s[0],a.text=s[1]}catch(e){a.error=e.toString(),a.statusCode=-1,a.text="[-2]",l.GNDebug.logError(e)}null==t||t.invoke(a)}))}postRequestViaHTTPRequest(e,t,r,i,a){return o(this,void 0,void 0,(function*(){let o=globalThis.exports.axios,u={},d=p.GNNetwork.getAuthToken();d&&(u[s.Commands.RequestAuthTokenCmd]=d),g.GNSupport.isBrowser()||(u[s.Commands.USER_AGENT]=HttpPeer.userAgent),null==t&&(t=new n.GNHashtable);let c=null;if(r==h.Json){c=t.toData(),g.GNSupport.isBrowser()||(u[s.Commands.CONTENT_LENGHT]=JSON.stringify(c).length,u[s.Commands.CONTENT_TYPE]=s.Commands.APPLICATION_JSON)}else if(r==h.MsgPack){let e=t.toData();c=globalThis.exports.encode(e),u[s.Commands.CONTENT_TYPE]=s.Commands.APPLICATION_MSGPACK,g.GNSupport.isBrowser()||(u[s.Commands.CONTENT_LENGHT]=c.length)}let m=new HttpAppResponse;try{let t=yield o.post(this.httpUrl+"/"+e,c,{headers:u,timeout:1e3*a,responseType:"arraybuffer"});m.statusCode=t.status;let r=this.toBuffers(t.data);m.data=r[0],m.text=r[1]}catch(e){m.error=e.toString(),m.statusCode=-1,m.text="[-2]",l.GNDebug.logError(e)}null==i||i.invoke(m)}))}uploadFile(e,t,r,o,n=60){if(!p.GNNetwork.getAuthToken()){let e=new HttpAppResponse;return e.statusCode=401,e.error="Auth token null",void(null==o||o.invoke(e))}let s=u.NetworkingPeer.UPLOAD_FILE+"/"+e;this.postRequestUploadViaHTTPRequest(s,t,r,o,n)}postRequestUploadViaHTTPRequest(e,t,r,n,s){return o(this,void 0,void 0,(function*(){l.GNDebug.logWarning("GN JS client sdk does not support upload file yet.");let e=new HttpAppResponse;e.error="Upload file does not support in GN JS client sdk.",e.statusCode=-1,e.text="[-3]",null==n||n.invoke(e)}))}uint8ArrayToString(e){return decodeURIComponent(escape(String.fromCharCode(...e)))}toBuffers(e){return g.GNSupport.isBrowser()?[e=new Uint8Array(e),this.uint8ArrayToString(e)]:[e,e.toString()]}}t.HttpPeer=HttpPeer,HttpPeer.userAgent="",HttpPeer.JSON_CHAR_KNOWN="["},4178:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NetworkingPeer=void 0;const o=r(6381),n=r(5985),s=r(1655),i=r(8275),a=r(2135),p=r(1477),l=r(5347),u=r(7067),d=r(5257),c=r(842),g=r(759),h=r(4516),m=r(7239),O=r(9010),b=r(1099),C=r(9248),P=r(1165),R=r(7162),_=r(8023),f=r(2443),k=r(6262),y=r(8178),N=r(7224),v=r(1635),S=r(4962),D=r(8301),q=r(2976),E=r(1619),A=r(6575),G=r(4592);class NetworkingPeer{constructor(){this.authToken="",this.userId=""}getPing(){let e=0,t=0;return this.httpPeer.isUsing()&&(e++,t+=this.httpPeer.ping),this.socketPeer.isUsing()&&(e++,t+=this.socketPeer.ping),t/e}update(){this.service()}service(){this.httpPeer.service(),this.socketPeer.service()}setServerTimeMilliseconds(e){this.lastCurrentServerMilliseconds=e,this.lastGetCurrentMilliseconds=Date.now()/1e3}getServerTimestamp(){return this.lastCurrentServerMilliseconds+1e3*(Date.now()/1e3-this.lastGetCurrentMilliseconds)}initPeer(){if(this.setServerTimeMilliseconds((new Date).getUTCMilliseconds()),null==E.GNNetwork.getGNServerSettings())throw new Error("Null GN Server Settings, please find it now");this.httpPeer=new A.HttpPeer,this.httpPeer.initPeer(),this.socketPeer=new G.SocketPeer,this.socketPeer.initPeer(),setInterval((()=>this.update()),50)}sendViaSocket(e,t=null){this.socketPeer.enqueue(e,t)}sendViaHttp(e,t=null){this.httpPeer.enqueue(e,t)}sendRequestAuthSocket(){this.socketPeer.sendRequestAuthSocket()}connectSocket(e){this.socketPeer.connect(e)}disconnectSocket(e){this.socketPeer.disconnect(e)}setOnConnectHandler(e){this.socketPeer.setOnConnectHandler(e)}setOnDisconnectHandler(e){this.socketPeer.setOnDisconnectHandler(e)}removeOnConnectHandler(e){this.socketPeer.removeOnConnectHandler(e)}removeOnDisconnectHandler(e){this.socketPeer.removeOnDisconnectHandler(e)}subscriberServerEventHandler(e){this.socketPeer.subscriberAServerEventHandler(e)}syncTs(e=null){let t=this;this.httpPeer.getRequest(NetworkingPeer.SYNC_TS,{invoke:function(r){if(!r.hasError()&&200==r.statusCode){let e=JSON.parse(r.text),s=o.GNArray.builder().addAll(e).build();if(s.getNumber(0)==n.ReturnCode.Ok){let e=s.getGNHashtable(1).getNumber("1",(new Date).getUTCMilliseconds());t.setServerTimeMilliseconds(e)}}null==e||e.invoke(t.getServerTimestamp())}})}getConfig(e,t){this.httpPeer.getRequest(NetworkingPeer.GET_CONFIG+"/"+e,{invoke:function(e){if(!e.hasError()&&200==e.statusCode){let r=JSON.parse(e.text),s=o.GNArray.builder().addAll(r).build();if(s.getNumber(0)==n.ReturnCode.Ok){let e=s.getGNHashtable(1).getString("1");null==t||t.invoke(e)}}}})}downloadFile(e,t){this.httpPeer.getRequest(NetworkingPeer.DOWNLOAD_FILE+"/"+e,t)}uploadFile(e,t,r,o){this.httpPeer.uploadFile(e,t,r,o)}debug(e,t,r,o,n,s=null){let a=new i.DebugOperationRequest(e,t,r,o,n).build();this.sendViaHttp(a,{invoke:function(e){let t=new C.DebugOperationResponse;t.setupOperationResponse(e),null==s||s.invoke(t)}})}enterDisplayName(e,t=null){let r=new a.EnterDisplayNameOperationRequest(e).build();this.sendViaHttp(r,{invoke:function(e){let r=new P.EnterDisplayNameOperationResponse;r.setupOperationResponse(e),null==t||t.invoke(r)}})}fetchAllData(e=null){let t=(new p.FetchAllDataOperationRequest).build();this.sendViaHttp(t,{invoke:function(t){let r=new R.FetchAllDataOperationResponse;r.setupOperationResponse(t),null==e||e.invoke(r)}})}fetchSparkPlayer(e=null){let t=(new l.FetchSparkPlayerOperationRequest).build();this.sendViaHttp(t,{invoke:function(t){let r=new _.FetchSparkPlayerOperationResponse;r.setupOperationResponse(t),null==e||e.invoke(r)}})}getAppConfig(e,t=null){let r=new u.GetAppConfigOperationRequest(e).build();this.sendViaHttp(r,{invoke:function(e){let r=new f.GetAppConfigOperationResponse;r.setupOperationResponse(e),null==t||t.invoke(r)}})}accountLogin(e,t,r=null){let o=new c.AccountLoginOperationRequest(e,t).build();this.sendViaHttp(o,{invoke:function(e){let t=new y.LoginOperationResponse;t.setupOperationResponse(e),null==r||r.invoke(t)}})}deviceLogin(e=null){let t=new c.DeviceLoginOperationRequest(E.GNNetwork.getDeviceInfo()).build();this.sendViaHttp(t,{invoke:function(t){let r=new y.LoginOperationResponse;r.setupOperationResponse(t),null==e||e.invoke(r)}})}facebookLogin(e,t=null){let r=new c.FacebookLoginOperationRequest(e).build();this.sendViaHttp(r,{invoke:function(e){let r=new y.LoginOperationResponse;r.setupOperationResponse(e),null==t||t.invoke(r)}})}googleLogin(e,t,r=null){let o=new c.GoogleLoginOperationRequest(e,t).build();this.sendViaHttp(o,{invoke:function(e){let t=new y.LoginOperationResponse;t.setupOperationResponse(e),null==r||r.invoke(t)}})}appleLogin(e,t,r=null){let o=new c.AppleLoginOperationRequest(e,t).build();this.sendViaHttp(o,{invoke:function(e){let t=new y.LoginOperationResponse;t.setupOperationResponse(e),null==r||r.invoke(t)}})}userIdLogin(e,t=null){let r=new c.UserIdLoginOperationRequest(e).build();this.sendViaHttp(r,{invoke:function(e){let r=new y.LoginOperationResponse;r.setupOperationResponse(e),null==t||t.invoke(r)}})}publicAddressLogin(e,t,r,o=null){let n=new c.PublicAddressLoginOperationRequest(e,t,r).build();this.sendViaHttp(n,{invoke:function(e){let t=new y.LoginOperationResponse;t.setupOperationResponse(e),null==o||o.invoke(t)}})}publicAddressGetRandomMessage(e=null){let t=(new c.PublicAddressGetRandomMessageOperationRequest).build();this.sendViaHttp(t,{invoke:function(t){let r=new v.PublicAddressGetRandomMessageOperationResponse;r.setupOperationResponse(t),null==e||e.invoke(r)}})}customIdLogin(e,t=null){let r=new c.CustomIdLoginOperationRequest(e).build();this.sendViaHttp(r,{invoke:function(e){let r=new y.LoginOperationResponse;r.setupOperationResponse(e),null==t||t.invoke(r)}})}registerAccount(e,t,r=null){let o=new h.RegisterAccountOperationRequest(e,t).build();this.sendViaHttp(o,{invoke:function(e){let t=new S.RegisterAccountOperationResponse;t.setupOperationResponse(e),null==r||r.invoke(t)}})}registerSocket(e,t=null){let r=new m.RegisterSocketOperationRequest(e).build();this.sendViaHttp(r,{invoke:function(e){let r=new D.RegisterSocketOperationResponse;r.setupOperationResponse(e),null==t||t.invoke(r)}})}template(e,t=null){let r=new O.TemplateOperationRequest(e).build();this.sendViaHttp(r,{invoke:function(e){let r=new q.TemplateOperationResponse;r.setupOperationResponse(e),null==t||t.invoke(r)}})}createNewFileUploadInfo(e,t=null){let r=new s.CreateNewFileUploadInfoOperationRequest(e).build();this.sendViaHttp(r,{invoke:function(e){let r=new b.CreateNewFileUploadInfoOperationResponse;r.setupOperationResponse(e),null==t||t.invoke(r)}})}getFileUploadInfo(e,t=null){let r=new d.GetFileUploadInfoOperationRequest(e).build();this.sendViaHttp(r,{invoke:function(e){let r=new k.GetFileUploadInfoOperationResponse;r.setupOperationResponse(e),null==t||t.invoke(r)}})}logout(e=null){let t=(new g.LogoutOperationRequest).build();this.sendViaHttp(t,{invoke:function(t){let r=new N.LogoutOperationResponse;r.setupOperationResponse(t),null==e||e.invoke(r)}})}}t.NetworkingPeer=NetworkingPeer,NetworkingPeer.SYNC_TS="ts",NetworkingPeer.UPLOAD_FILE="upload",NetworkingPeer.DOWNLOAD_FILE="upload",NetworkingPeer.GET_CONFIG="getConfig",NetworkingPeer.API_JSON="api/0",NetworkingPeer.API_MSG_PACK="api/1"},7437:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NetworkingPeerBase=t.SocketPacket=void 0;const o=r(6381),n=r(1619),s=r(6081);t.SocketPacket=class SocketPacket{constructor(e,t){this.obj=e,this.encrypted=t}};class NetworkingPeerBase{constructor(){}init(e,t,r,o){this.responsePacketLst=[],this.eventPacketLst=[],this.clientId="",this.url=e,this.reconnectDelay=t,this.pingInterval=r,this.pingTimeout=o}onApplicationQuit(){this.close(null)}connect(e){this._onSocketConnect=e}close(e){this._onSocketDisconnect=e}sendRequestAuthSocket(){}send(e){this.emit(e)}reInitNewSocket(){}setOnConnectHandler(e){this._onConnectHandler=e}setOnDisconnectHandler(e){this._onDisconnectHandler=e}removeOnConnectHandler(e){this._onConnectHandler=e}removeOnDisconnectHandler(e){this._onDisconnectHandler=e}onConnectHandler(){var e,t;null===(e=this._onConnectHandler)||void 0===e||e.invoke(),null!=n.GNNetwork.getAuthToken()&&this.sendRequestAuthSocket(),null===(t=this._onSocketConnect)||void 0===t||t.invoke(),this._onSocketConnect=null}onDisconnectHandler(){var e,t;null===(e=this._onDisconnectHandler)||void 0===e||e.invoke(),null===(t=this._onSocketDisconnect)||void 0===t||t.invoke(),this._onSocketDisconnect=null}setOnEventHandler(e){this._onEventHandler=e}onEventHandler(e,t){var r;null===(r=this._onEventHandler)||void 0===r||r.invoke(e,t)}setOnResponseHandler(e){this._onResponseHandler=e}onResponseHandler(e,t){var r;null===(r=this._onResponseHandler)||void 0===r||r.invoke(e,t)}static fromMsgList(e){let t=[];for(let r=0;r<e.length;r++){let o=e[r];t.push(o)}return t}static fromJsonList(e){return e}service(){if(this.responsePacketLst.length>0){for(let e=0;e<this.responsePacketLst.length;e++){let t=this.responsePacketLst[e];if(t.encrypted)try{let e=globalThis.exports.decode(t.obj),r=o.GNArray.builder().addAll(NetworkingPeerBase.fromMsgList(e)).build();this.onResponseHandler(r,t.encrypted)}catch(e){s.GNDebug.logException(e)}else try{let e=t.obj,r=o.GNArray.builder().addAll(NetworkingPeerBase.fromJsonList(e)).build();this.onResponseHandler(r,t.encrypted)}catch(e){s.GNDebug.logException(e)}}this.responsePacketLst.length=0}if(this.eventPacketLst.length>0){for(let e=0;e<this.eventPacketLst.length;e++){let t=this.eventPacketLst[e];if(t.encrypted)try{let e=globalThis.exports.decode(t.obj),r=o.GNArray.builder().addAll(NetworkingPeerBase.fromMsgList(e)).build();this.onEventHandler(r,t.encrypted)}catch(e){s.GNDebug.logException(e)}else try{let e=t.obj,r=o.GNArray.builder().addAll(NetworkingPeerBase.fromJsonList(e)).build();this.onEventHandler(r,t.encrypted)}catch(e){s.GNDebug.logException(e)}}this.eventPacketLst.length=0}}}t.NetworkingPeerBase=NetworkingPeerBase},6933:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NetworkingPeerSocket=void 0;const o=r(2509),n=r(6081),s=r(7437),i=r(1619),a=r(8264);class NetworkingPeerSocket extends s.NetworkingPeerBase{sendRequestAuthSocket(){super.sendRequestAuthSocket(),this.clientId&&this.socketManager.socket("/").emit(o.Commands.RequestAuthTokenCmd,i.GNNetwork.getAuthToken())}reInitNewSocket(){if(super.reInitNewSocket(),null==this.socketManager){this.socketManager=new globalThis.exports.Manager(this.url+"/socket.io/",{reconnection:!0,reconnectionDelay:this.reconnectDelay,timeout:this.pingTimeout,autoConnect:!1,transports:["websocket"]});let e=this.socketManager.socket("/");e.on("connect",(()=>{this.onConnect()})),e.on("disconnect",(e=>{this.onDisconnect()})),e.io.on("error",(e=>{this.onError(e)})),e.on(o.Commands.ResponseCmd_MsgPack,(e=>{this.onResponseMsgPack(e)})),e.on(o.Commands.EventCmd_MsgPack,(e=>{this.onEventMsgPack(e)})),e.on(o.Commands.ResponseCmd_Json,(e=>{this.onResponseJson(e)})),e.on(o.Commands.EventCmd_Json,(e=>{this.onEventJson(e)})),this.socket=e}}onResponseMsgPack(...e){this.responsePacketLst.push(new s.SocketPacket(e[0],!0))}onEventMsgPack(...e){this.eventPacketLst.push(new s.SocketPacket(e[0],!0))}onResponseJson(...e){this.responsePacketLst.push(new s.SocketPacket(e[0],!1))}onEventJson(...e){this.eventPacketLst.push(new s.SocketPacket(e[0],!1))}onConnect(){n.GNDebug.log("[GN Socket RECV] HandleOpen "+this.socket.id),this.clientId=this.socket.id,this.onConnectHandler()}onDisconnect(){n.GNDebug.log("[GN Socket RECV] HandleClose "),this.clientId="",this.onDisconnectHandler()}onError(e){n.GNDebug.logError(e)}init(e,t,r,o){super.init(e,t,r,o)}emit(e){if(null==this.socketManager)return;let t=this.socketManager.socket("/");if(null==t)return;let r=a.OperationHelper.toSocketData(e);e.isEncrypted()?t.emit(o.Commands.RequestCmd_MsgPack,globalThis.exports.encode(r)):t.emit(o.Commands.RequestCmd_Json,r)}close(e){super.close(e),this.isConnected=!1,null==this.socketManager||"closed"==this.socketManager._readyState?(null!=this.socket&&this.socket.disconnect(),n.GNDebug.log("[GN Socket] Disconnecting via SocketIO client"),this.onDisconnectHandler()):this.socketManager._close()}connect(e){super.connect(e),this.isConnected?n.GNDebug.log("[GN Socket] Reconnecting"):(this.isConnected=!0,n.GNDebug.log("[GN Socket] Connecting via SocketIO client"),null!=this.socketManager&&this.socketManager.open(),null!=this.socket&&this.socket.connect())}}t.NetworkingPeerSocket=NetworkingPeerSocket},6816:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.OperationPending=void 0;const o=r(2088);t.OperationPending=class OperationPending{constructor(e,t){this.operationRequest=e,this.onOperationResponse=t,this.timeout=Date.now()/1e3+o.OperationRequest.DefaultTimeOut,this.firstSend=0,this.secondsSend=0}onSend(){this.firstSend=Date.now()/1e3,this.timeout=this.firstSend+this.operationRequest.getTimeout()}onRecv(){this.secondsSend=Date.now()/1e3}getExecuteTimerInMs(){return this.secondsSend-this.firstSend}isTimeout(){return this.timeout<Date.now()/1e3}getOperationRequest(){return this.operationRequest}getCallback(){return this.onOperationResponse}}},647:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PeerBase=void 0;const o=r(6381),n=r(1822),s=r(5985),i=r(2574),a=r(1619),p=r(6081),l=r(6816);class PeerBase{constructor(){this.perMsgTimer=0,this.nextSendMsgTimer=0,this.checkTimeoutOperationPending=0}getSendRate(){return 1e3/this.perMsgTimer}setSendRate(e){this.perMsgTimer=1e3/e/1e3}initPeer(){null==this.operationPendingQueue&&(this.operationPendingQueue=[]),null==this.operationWaitingResponseDic&&(this.operationWaitingResponseDic={}),null==this.pingLst&&(this.pingLst=[]),this.initSendRate(),this.initGNSocketObject()}initSendRate(){let e=a.GNNetwork.getGNServerSettings();if(null==e)throw new Error("Null GN Server Settings, please find it now");this.setSendRate(e.getSendRate())}enqueue(e,t){if(!this.isUsing)return void p.GNDebug.logError("[GN] Server Settings dont setup to use this to send operation request.");let r=new l.OperationPending(e,t);this.operationPendingQueue.push(r)}isUsing(){return this.isUse}service(){if(!this.isUsing)return;let e=Date.now()/1e3;if(this.checkTimeoutOperationPending<e){this.checkTimeoutOperationPending=e+.1;let t=Object.keys(this.operationWaitingResponseDic);if(0!=t.length){let e=[];t.forEach((t=>{let r=this.operationWaitingResponseDic[t];if(r.isTimeout()){let t=new o.GNArray;t.add(s.ReturnCode.OperationTimeout),t.add(null),t.add(r.getOperationRequest().getRequestId()),t.add(r.getOperationRequest().isEncrypted()),e.push(t)}})),0!=e.length&&e.forEach((e=>{this.onResponseHandler(e,e.getBoolean(3))}))}}if(this.nextSendMsgTimer<e&&0!=this.operationPendingQueue.length){this.nextSendMsgTimer=e+this.perMsgTimer;let t=this.operationPendingQueue.shift();this.send(t)}}onResponseHandler(e,t){var r;let o=e.getNumber(2);if(null!=this.operationWaitingResponseDic[o]){let l=this.operationWaitingResponseDic[o];l.onRecv(),delete this.operationWaitingResponseDic[o];let u=e.getNumber(0),d=null,c=null,g=null;u==s.ReturnCode.Ok?d=e.getGNHashtable(1):u==s.ReturnCode.InvalidRequestParameters?g=e.getGNArray(1):u==s.ReturnCode.OperationNotAuthorized?a.GNNetwork.getAuthToken()&&(a.GNNetwork.setAuthToken(""),a.GNNetwork.setUserId("")):c=e.getString(1);let h=l.getOperationRequest(),m=new i.OperationResponse(h.getOperationCode(),h.getRequestId(),t);if(m.setReturnCode(u),m.setDebugMessage(c),m.setParameters(d),null!=g){let e=[];for(let t=0;t<g.count();t++){let r=g.getGNArray(t);e.push({code:r.getNumber(0),invalidMemberType:r.getNumber(1)})}m.setInvalidMembers(e)}if(p.GNDebug.log("[GN RECV] "+m.toString()),null===(r=l.getCallback())||void 0===r||r.invoke(m),!m.hasError()&&(this.addPing(l.getExecuteTimerInMs()),null!=d)){if(d.containsKey(n.ParameterCode.AuthToken)){let e=d.getString(n.ParameterCode.AuthToken);a.GNNetwork.setAuthToken(e)}if(d.containsKey(n.ParameterCode.UserId)){let e=d.getString(n.ParameterCode.UserId);a.GNNetwork.setUserId(e)}d.containsKey(n.ParameterCode.Ts)&&a.GNNetwork.peer.setServerTimeMilliseconds(d.getNumber(n.ParameterCode.Ts,(new Date).getUTCMilliseconds()))}}else p.GNDebug.logError("[GN] OnResponseHandler, un available request id "+e)}send(e){e.onSend();let t=e.getOperationRequest();-1!=t.getRequestId()&&(t.setRequestId(PeerBase.requestId++),null!=e.getCallback()&&(this.operationWaitingResponseDic[t.getRequestId()]=e))}addPing(e){if(this.pingLst.length>10&&this.pingLst.shift(),this.pingLst.push(e/2),0!=this.pingLst.length){let e=0;for(let t=0;t<this.pingLst.length;t++)e+=this.pingLst[t];let t=e/this.pingLst.length;this.ping=1e3*t}else this.ping=-1}}t.PeerBase=PeerBase,PeerBase.requestId=0},4592:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SocketPeer=void 0;const o=r(6381),n=r(5985),s=r(7578),i=r(1619),a=r(6081),p=r(8581),l=r(6933),u=r(647);class SocketPeer extends u.PeerBase{getClientId(){return this.networkingPeerBase.clientId}isConnected(){return this.networkingPeerBase.isWsConnected}sendRequestAuthSocket(){this.networkingPeerBase.sendRequestAuthSocket()}subscriberServerEventHandler(){this.serverEventHandlerDic={};let e=p.IServerEventHandler.getImplementations();for(let t=0;t<e.length;t++){let r=new e[t];null!=r&&(this.serverEventHandlerDic[r.getEventCode()]=r)}}subscriberAServerEventHandler(e){this.serverEventHandlerDic[e.getEventCode()]=e}initGNSocketObject(){let e=i.GNNetwork.getGNServerSettings();if(null==e)throw new Error("Where is GN Server Settings");this.isUse=e.isUseSocket(),this.networkingPeerBase=new l.NetworkingPeerSocket,this.networkingPeerBase.init(e.getSocketUrl(),e.getReconnectDelay(),e.getPingInterval(),e.getPingTimeout()),this.networkingPeerBase.reInitNewSocket(),this.networkingPeerBase.setOnEventHandler({invoke:(e,t)=>{this.onEventHandler(e,t)}}),this.networkingPeerBase.setOnResponseHandler({invoke:(e,t)=>{this.onResponseHandler(e,t)}}),this.subscriberServerEventHandler()}setOnConnectHandler(e){this.networkingPeerBase.setOnConnectHandler(e)}setOnDisconnectHandler(e){this.networkingPeerBase.setOnDisconnectHandler(e)}removeOnConnectHandler(e){this.networkingPeerBase.removeOnConnectHandler(e)}removeOnDisconnectHandler(e){this.networkingPeerBase.removeOnDisconnectHandler(e)}connect(e){this.networkingPeerBase.connect(e)}disconnect(e){this.networkingPeerBase.close(e)}send(e){super.send(e),a.GNDebug.log("[GN Socket SEND] "+e.getOperationRequest().toString());let t=e.getOperationRequest();if(!i.GNNetwork.getAuthToken()&&-1==i.GNNetwork.getGNServerSettings().getCodeCanSendNotAuthorized().indexOf(t.getOperationCode())){let e=new o.GNArray;return e.add(n.ReturnCode.OperationNotAuthorized),e.add(null),e.add(t.getRequestId()),void this.onResponseHandler(e,t.isEncrypted())}this.networkingPeerBase.send(e.getOperationRequest())}onEventHandler(e,t){let r=e.getNumber(0);if(null==this.serverEventHandlerDic[r])return;let o=new s.OperationEvent(r,e.getGNHashtable(1));o.setEncrypted(t),a.GNDebug.log("[GN Socket EVENT] "+o.toString()),this.serverEventHandlerDic[r].handle(o)}service(){super.service(),this.networkingPeerBase.service()}}t.SocketPeer=SocketPeer},8581:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.IServerEventHandler=void 0,function(e){const t=[];e.getImplementations=function getImplementations(){return t},e.registerEvent=function registerEvent(e){return t.push(e),e}}(t.IServerEventHandler||(t.IServerEventHandler={}))},2402:function(e,t,r){var o=this&&this.__decorate||function(e,t,r,o){var n,s=arguments.length,i=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(i=(s<3?n(i):s>3?n(t,r,i):n(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i};Object.defineProperty(t,"__esModule",{value:!0}),t.OnDebugEventHander=void 0;const n=r(384),s=r(8581);let i=class OnDebugEventHander{getEventCode(){return n.EventCode.OnDebug}handle(e){console.log(e.toString())}};i=o([s.IServerEventHandler.registerEvent],i),t.OnDebugEventHander=i},2692:e=>{e.exports=require("@msgpack/msgpack")},2167:e=>{e.exports=require("axios")},4347:e=>{e.exports=require("crypto")},1335:e=>{e.exports=require("node-localstorage")},8087:e=>{e.exports=require("socket.io-client")}},t={};function __webpack_require__(r){var o=t[r];if(void 0!==o)return o.exports;var n=t[r]={exports:{}};return e[r].call(n.exports,n,n.exports,__webpack_require__),n.exports}var r={};(()=>{var e=r;Object.defineProperty(e,"__esModule",{value:!0}),e.UserIdLoginOperationRequest=e.PublicAddressLoginOperationRequest=e.PublicAddressGetRandomMessageOperationRequest=e.GoogleLoginOperationRequest=e.FacebookLoginOperationRequest=e.DeviceLoginOperationRequest=e.CustomIdLoginOperationRequest=e.AppleLoginOperationRequest=e.AccountLoginOperationRequest=e.LoginOperationRequest=e.GetFileUploadInfoOperationRequest=e.GetAppConfigOperationRequest=e.FetchSparkPlayerOperationRequest=e.FetchAllDataOperationRequest=e.EnterDisplayNameOperationRequest=e.DebugOperationRequest=e.CustomOperationRequest=e.CreateNewFileUploadInfoOperationRequest=e.ReturnCode=e.OperationCode=e.EventCode=e.Commands=e.RegisterSocketParameterCode=e.ParameterCode=e.LoginParameterCode=e.GetAppConfigParameterCode=e.FileUploadInfoParameterCode=e.FetchSparkPlayerParameterCode=e.FetchAllDataParameterCode=e.EnterDisplayNameParameterCode=e.DebugParameterCode=e.RegisterSocketErrorCode=e.LoginErrorCode=e.GetAppConfigErrorCode=e.FileUploadInfoErrorCode=e.FetchSparkPlayerErrorCode=e.FetchAllDataErrorCode=e.EnterDisplayNameErrorCode=e.DebugErrorCode=e.UserRoleType=e.PlatformType=e.LoginType=e.InvalidMemberType=e.GoogleLoginType=e.FriendStatus=e.GNServerSettings=e.GNArray=e.GNArrayBuilder=e.GNHashtable=e.GNHashtableBuilder=void 0,e.CodeHelper=e.GNSupport=e.GNNetwork=e.SocketPeer=e.PeerBase=e.OperationPending=e.NetworkingPeerSocket=e.SocketPacket=e.NetworkingPeerBase=e.NetworkingPeer=e.PostType=e.HttpAppResponse=e.HttpPeer=e.OnDebugEventHander=e.IServerEventHandler=e.LogType=e.GNDebug=e.OperationResponse=e.OperationRequest=e.OperationHelper=e.OperationEvent=e.InvalidMember=e.TemplateOperationResponse=e.RegisterSocketOperationResponse=e.RegisterAccountOperationResponse=e.PublicAddressGetRandomMessageOperationResponse=e.LogoutOperationResponse=e.LoginOperationResponse=e.GetFileUploadInfoOperationResponse=e.GetAppConfigOperationResponse=e.FetchSparkPlayerOperationResponse=e.FetchAllDataOperationResponse=e.EnterDisplayNameOperationResponse=e.DebugOperationResponse=e.CustomOperationResponse=e.CreateNewFileUploadInfoOperationResponse=e.TemplateOperationRequest=e.RegisterSocketOperationRequest=e.RegisterAccountOperationRequest=e.LogoutOperationRequest=void 0;const t=__webpack_require__(6381);Object.defineProperty(e,"GNHashtableBuilder",{enumerable:!0,get:function(){return t.GNHashtableBuilder}}),Object.defineProperty(e,"GNHashtable",{enumerable:!0,get:function(){return t.GNHashtable}}),Object.defineProperty(e,"GNArrayBuilder",{enumerable:!0,get:function(){return t.GNArrayBuilder}}),Object.defineProperty(e,"GNArray",{enumerable:!0,get:function(){return t.GNArray}});const o=__webpack_require__(4951);Object.defineProperty(e,"GNServerSettings",{enumerable:!0,get:function(){return o.GNServerSettings}});const n=__webpack_require__(6345);Object.defineProperty(e,"FriendStatus",{enumerable:!0,get:function(){return n.FriendStatus}});const s=__webpack_require__(2558);Object.defineProperty(e,"GoogleLoginType",{enumerable:!0,get:function(){return s.GoogleLoginType}});const i=__webpack_require__(635);Object.defineProperty(e,"InvalidMemberType",{enumerable:!0,get:function(){return i.InvalidMemberType}});const a=__webpack_require__(8466);Object.defineProperty(e,"LoginType",{enumerable:!0,get:function(){return a.LoginType}});const p=__webpack_require__(6392);Object.defineProperty(e,"PlatformType",{enumerable:!0,get:function(){return p.PlatformType}});const l=__webpack_require__(4919);Object.defineProperty(e,"UserRoleType",{enumerable:!0,get:function(){return l.UserRoleType}});const u=__webpack_require__(7043);Object.defineProperty(e,"DebugErrorCode",{enumerable:!0,get:function(){return u.DebugErrorCode}});const d=__webpack_require__(9084);Object.defineProperty(e,"EnterDisplayNameErrorCode",{enumerable:!0,get:function(){return d.EnterDisplayNameErrorCode}});const c=__webpack_require__(9212);Object.defineProperty(e,"FetchAllDataErrorCode",{enumerable:!0,get:function(){return c.FetchAllDataErrorCode}});const g=__webpack_require__(4102);Object.defineProperty(e,"FetchSparkPlayerErrorCode",{enumerable:!0,get:function(){return g.FetchSparkPlayerErrorCode}});const h=__webpack_require__(8620);Object.defineProperty(e,"FileUploadInfoErrorCode",{enumerable:!0,get:function(){return h.FileUploadInfoErrorCode}});const m=__webpack_require__(9818);Object.defineProperty(e,"GetAppConfigErrorCode",{enumerable:!0,get:function(){return m.GetAppConfigErrorCode}});const O=__webpack_require__(7425);Object.defineProperty(e,"LoginErrorCode",{enumerable:!0,get:function(){return O.LoginErrorCode}});const b=__webpack_require__(2432);Object.defineProperty(e,"RegisterSocketErrorCode",{enumerable:!0,get:function(){return b.RegisterSocketErrorCode}});const C=__webpack_require__(901);Object.defineProperty(e,"DebugParameterCode",{enumerable:!0,get:function(){return C.DebugParameterCode}});const P=__webpack_require__(2423);Object.defineProperty(e,"EnterDisplayNameParameterCode",{enumerable:!0,get:function(){return P.EnterDisplayNameParameterCode}});const R=__webpack_require__(1594);Object.defineProperty(e,"FetchAllDataParameterCode",{enumerable:!0,get:function(){return R.FetchAllDataParameterCode}});const _=__webpack_require__(3009);Object.defineProperty(e,"FetchSparkPlayerParameterCode",{enumerable:!0,get:function(){return _.FetchSparkPlayerParameterCode}});const f=__webpack_require__(8823);Object.defineProperty(e,"FileUploadInfoParameterCode",{enumerable:!0,get:function(){return f.FileUploadInfoParameterCode}});const k=__webpack_require__(3074);Object.defineProperty(e,"GetAppConfigParameterCode",{enumerable:!0,get:function(){return k.GetAppConfigParameterCode}});const y=__webpack_require__(4688);Object.defineProperty(e,"LoginParameterCode",{enumerable:!0,get:function(){return y.LoginParameterCode}});const N=__webpack_require__(1822);Object.defineProperty(e,"ParameterCode",{enumerable:!0,get:function(){return N.ParameterCode}});const v=__webpack_require__(479);Object.defineProperty(e,"RegisterSocketParameterCode",{enumerable:!0,get:function(){return v.RegisterSocketParameterCode}});const S=__webpack_require__(2509);Object.defineProperty(e,"Commands",{enumerable:!0,get:function(){return S.Commands}});const D=__webpack_require__(384);Object.defineProperty(e,"EventCode",{enumerable:!0,get:function(){return D.EventCode}});const q=__webpack_require__(9423);Object.defineProperty(e,"OperationCode",{enumerable:!0,get:function(){return q.OperationCode}});const E=__webpack_require__(5985);Object.defineProperty(e,"ReturnCode",{enumerable:!0,get:function(){return E.ReturnCode}});const A=__webpack_require__(1655);Object.defineProperty(e,"CreateNewFileUploadInfoOperationRequest",{enumerable:!0,get:function(){return A.CreateNewFileUploadInfoOperationRequest}});const G=__webpack_require__(3913);Object.defineProperty(e,"CustomOperationRequest",{enumerable:!0,get:function(){return G.CustomOperationRequest}});const w=__webpack_require__(8275);Object.defineProperty(e,"DebugOperationRequest",{enumerable:!0,get:function(){return w.DebugOperationRequest}});const T=__webpack_require__(2135);Object.defineProperty(e,"EnterDisplayNameOperationRequest",{enumerable:!0,get:function(){return T.EnterDisplayNameOperationRequest}});const L=__webpack_require__(1477);Object.defineProperty(e,"FetchAllDataOperationRequest",{enumerable:!0,get:function(){return L.FetchAllDataOperationRequest}});const I=__webpack_require__(5347);Object.defineProperty(e,"FetchSparkPlayerOperationRequest",{enumerable:!0,get:function(){return I.FetchSparkPlayerOperationRequest}});const F=__webpack_require__(7067);Object.defineProperty(e,"GetAppConfigOperationRequest",{enumerable:!0,get:function(){return F.GetAppConfigOperationRequest}});const H=__webpack_require__(5257);Object.defineProperty(e,"GetFileUploadInfoOperationRequest",{enumerable:!0,get:function(){return H.GetFileUploadInfoOperationRequest}});const U=__webpack_require__(842);Object.defineProperty(e,"LoginOperationRequest",{enumerable:!0,get:function(){return U.LoginOperationRequest}}),Object.defineProperty(e,"AccountLoginOperationRequest",{enumerable:!0,get:function(){return U.AccountLoginOperationRequest}}),Object.defineProperty(e,"AppleLoginOperationRequest",{enumerable:!0,get:function(){return U.AppleLoginOperationRequest}}),Object.defineProperty(e,"CustomIdLoginOperationRequest",{enumerable:!0,get:function(){return U.CustomIdLoginOperationRequest}}),Object.defineProperty(e,"DeviceLoginOperationRequest",{enumerable:!0,get:function(){return U.DeviceLoginOperationRequest}}),Object.defineProperty(e,"FacebookLoginOperationRequest",{enumerable:!0,get:function(){return U.FacebookLoginOperationRequest}}),Object.defineProperty(e,"GoogleLoginOperationRequest",{enumerable:!0,get:function(){return U.GoogleLoginOperationRequest}}),Object.defineProperty(e,"PublicAddressGetRandomMessageOperationRequest",{enumerable:!0,get:function(){return U.PublicAddressGetRandomMessageOperationRequest}}),Object.defineProperty(e,"PublicAddressLoginOperationRequest",{enumerable:!0,get:function(){return U.PublicAddressLoginOperationRequest}}),Object.defineProperty(e,"UserIdLoginOperationRequest",{enumerable:!0,get:function(){return U.UserIdLoginOperationRequest}});const M=__webpack_require__(759);Object.defineProperty(e,"LogoutOperationRequest",{enumerable:!0,get:function(){return M.LogoutOperationRequest}});const j=__webpack_require__(4516);Object.defineProperty(e,"RegisterAccountOperationRequest",{enumerable:!0,get:function(){return j.RegisterAccountOperationRequest}});const x=__webpack_require__(7239);Object.defineProperty(e,"RegisterSocketOperationRequest",{enumerable:!0,get:function(){return x.RegisterSocketOperationRequest}});const B=__webpack_require__(9010);Object.defineProperty(e,"TemplateOperationRequest",{enumerable:!0,get:function(){return B.TemplateOperationRequest}});const V=__webpack_require__(1099);Object.defineProperty(e,"CreateNewFileUploadInfoOperationResponse",{enumerable:!0,get:function(){return V.CreateNewFileUploadInfoOperationResponse}});const J=__webpack_require__(2584);Object.defineProperty(e,"CustomOperationResponse",{enumerable:!0,get:function(){return J.CustomOperationResponse}});const W=__webpack_require__(9248);Object.defineProperty(e,"DebugOperationResponse",{enumerable:!0,get:function(){return W.DebugOperationResponse}});const K=__webpack_require__(1165);Object.defineProperty(e,"EnterDisplayNameOperationResponse",{enumerable:!0,get:function(){return K.EnterDisplayNameOperationResponse}});const z=__webpack_require__(7162);Object.defineProperty(e,"FetchAllDataOperationResponse",{enumerable:!0,get:function(){return z.FetchAllDataOperationResponse}});const Y=__webpack_require__(8023);Object.defineProperty(e,"FetchSparkPlayerOperationResponse",{enumerable:!0,get:function(){return Y.FetchSparkPlayerOperationResponse}});const Q=__webpack_require__(2443);Object.defineProperty(e,"GetAppConfigOperationResponse",{enumerable:!0,get:function(){return Q.GetAppConfigOperationResponse}});const X=__webpack_require__(6262);Object.defineProperty(e,"GetFileUploadInfoOperationResponse",{enumerable:!0,get:function(){return X.GetFileUploadInfoOperationResponse}});const Z=__webpack_require__(8178);Object.defineProperty(e,"LoginOperationResponse",{enumerable:!0,get:function(){return Z.LoginOperationResponse}});const $=__webpack_require__(7224);Object.defineProperty(e,"LogoutOperationResponse",{enumerable:!0,get:function(){return $.LogoutOperationResponse}});const ee=__webpack_require__(1635);Object.defineProperty(e,"PublicAddressGetRandomMessageOperationResponse",{enumerable:!0,get:function(){return ee.PublicAddressGetRandomMessageOperationResponse}});const te=__webpack_require__(4962);Object.defineProperty(e,"RegisterAccountOperationResponse",{enumerable:!0,get:function(){return te.RegisterAccountOperationResponse}});const re=__webpack_require__(8301);Object.defineProperty(e,"RegisterSocketOperationResponse",{enumerable:!0,get:function(){return re.RegisterSocketOperationResponse}});const oe=__webpack_require__(2976);Object.defineProperty(e,"TemplateOperationResponse",{enumerable:!0,get:function(){return oe.TemplateOperationResponse}});const ne=__webpack_require__(3552);Object.defineProperty(e,"InvalidMember",{enumerable:!0,get:function(){return ne.InvalidMember}});const se=__webpack_require__(7578);Object.defineProperty(e,"OperationEvent",{enumerable:!0,get:function(){return se.OperationEvent}});const ie=__webpack_require__(8264);Object.defineProperty(e,"OperationHelper",{enumerable:!0,get:function(){return ie.OperationHelper}});const ae=__webpack_require__(2088);Object.defineProperty(e,"OperationRequest",{enumerable:!0,get:function(){return ae.OperationRequest}});const pe=__webpack_require__(2574);Object.defineProperty(e,"OperationResponse",{enumerable:!0,get:function(){return pe.OperationResponse}});const le=__webpack_require__(6081);Object.defineProperty(e,"GNDebug",{enumerable:!0,get:function(){return le.GNDebug}}),Object.defineProperty(e,"LogType",{enumerable:!0,get:function(){return le.LogType}});const ue=__webpack_require__(8581);Object.defineProperty(e,"IServerEventHandler",{enumerable:!0,get:function(){return ue.IServerEventHandler}});const de=__webpack_require__(2402);Object.defineProperty(e,"OnDebugEventHander",{enumerable:!0,get:function(){return de.OnDebugEventHander}});const ce=__webpack_require__(6575);Object.defineProperty(e,"HttpPeer",{enumerable:!0,get:function(){return ce.HttpPeer}}),Object.defineProperty(e,"HttpAppResponse",{enumerable:!0,get:function(){return ce.HttpAppResponse}}),Object.defineProperty(e,"PostType",{enumerable:!0,get:function(){return ce.PostType}});const ge=__webpack_require__(4178);Object.defineProperty(e,"NetworkingPeer",{enumerable:!0,get:function(){return ge.NetworkingPeer}});const he=__webpack_require__(7437);Object.defineProperty(e,"NetworkingPeerBase",{enumerable:!0,get:function(){return he.NetworkingPeerBase}}),Object.defineProperty(e,"SocketPacket",{enumerable:!0,get:function(){return he.SocketPacket}});const me=__webpack_require__(6933);Object.defineProperty(e,"NetworkingPeerSocket",{enumerable:!0,get:function(){return me.NetworkingPeerSocket}});const Oe=__webpack_require__(6816);Object.defineProperty(e,"OperationPending",{enumerable:!0,get:function(){return Oe.OperationPending}});const be=__webpack_require__(647);Object.defineProperty(e,"PeerBase",{enumerable:!0,get:function(){return be.PeerBase}});const Ce=__webpack_require__(4592);Object.defineProperty(e,"SocketPeer",{enumerable:!0,get:function(){return Ce.SocketPeer}});const Pe=__webpack_require__(1619);Object.defineProperty(e,"GNNetwork",{enumerable:!0,get:function(){return Pe.GNNetwork}});const Re=__webpack_require__(7315);Object.defineProperty(e,"GNSupport",{enumerable:!0,get:function(){return Re.GNSupport}});const _e=__webpack_require__(7474);Object.defineProperty(e,"CodeHelper",{enumerable:!0,get:function(){return _e.CodeHelper}})})();var o=exports;for(var n in r)o[n]=r[n];r.__esModule&&Object.defineProperty(o,"__esModule",{value:!0})})();
|
|
1
|
+
(()=>{"use strict";var e={1619:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GNNetwork=void 0;const o=r(6081),n=r(7315),s=r(4178),i=r(7474);class GNNetwork{static getGNServerSettings(){return this.gnServerSettings}static getPing(){return null!=this.peer?this.peer.getPing():-1}static getServerTimestamp(){return null!=this.peer?this.peer.getServerTimestamp():(new Date).getUTCMilliseconds()}static setAuthToken(e){this.peer.authToken=e,globalThis.exports.localStorage.setItem(GNNetwork.AUTH_TOKEN_KEY,e),this.peer.sendRequestAuthSocket()}static getAuthToken(){return this.peer.authToken}static setUserId(e){this.peer.userId=e,globalThis.exports.localStorage.setItem(GNNetwork.USER_ID_KEY,e)}static getUserId(){return this.peer.userId}static getPlatform(){return 17}static getDeviceId(){let e=globalThis.exports.localStorage.getItem(GNNetwork.DEVICE_ID_KEY);return e||(e=globalThis.exports.crypto.randomUUID(),globalThis.exports.localStorage.setItem(GNNetwork.DEVICE_ID_KEY,e)),e}static getDeviceInfo(){return this.getPlatform()+"_"+this.getDeviceId()}static init(e){if(null!=this.gnServerSettings)return void o.GNDebug.log("GNNetwork has been init!");o.GNDebug.log((n.GNSupport.isBrowser(),"browser.")),this.gnServerSettings=e,n.GNSupport.init(),i.CodeHelper.init(),this.initServerSettings(),this.initGNDebug(),this.initGNSocketObject();let t=globalThis.exports.localStorage.getItem(GNNetwork.AUTH_TOKEN_KEY);t||(t=""),this.peer.authToken=t;let r=globalThis.exports.localStorage.getItem(GNNetwork.USER_ID_KEY);r||(r=""),this.peer.userId=r}static getClientSdkVersion(){return"0.0.4"}static initServerSettings(){}static initGNDebug(){if(null==this.gnServerSettings)throw new Error("Null EUN Server Settings, please find it now");o.GNDebug.setLogType(this.gnServerSettings.getLogType())}static initGNSocketObject(){this.peer=new s.NetworkingPeer,this.peer.initPeer()}static sendViaSocket(e,t=null){this.peer.sendViaSocket(e,t)}static sendViaHttp(e,t=null){this.peer.sendViaHttp(e,t)}static sendViaSocketTRequestTResponse(e,t=null){this.sendViaSocketTResponse(e.build(),t)}static sendViaHttpTRequestTResponse(e,t=null){this.sendViaHttpTResponse(e.build(),t)}static sendViaSocketTResponse(e,t=null){}static sendViaHttpTResponse(e,t=null){}static connectSocket(e=null){this.peer.connectSocket(e)}static disconnectSocket(e=null){this.peer.disconnectSocket(e)}static setOnConnectHandler(e){this.peer.setOnConnectHandler(e)}static setOnDisconnectHandler(e){this.peer.setOnDisconnectHandler(e)}static removeOnConnectHandler(e){this.peer.removeOnConnectHandler(e)}static removeOnDisconnectHandler(e){this.peer.removeOnDisconnectHandler(e)}static subscriberServerEventHandler(e){this.peer.subscriberServerEventHandler(e)}static syncTs(e=null){this.peer.syncTs(e)}static getConfig(e,t){this.peer.getConfig(e,t)}static downloadFile(e,t){this.peer.downloadFile(e,t)}static uploadFile(e,t,r,o){this.peer.uploadFile(e,t,r,o)}static debug(e,t,r,o,n,s=null){this.peer.debug(e,t,r,o,n,s)}static enterDisplayName(e,t=null){this.peer.enterDisplayName(e,t)}static fetchAllData(e=null){this.peer.fetchAllData(e)}static fetchSparkPlayer(e=null){this.peer.fetchSparkPlayer(e)}static getAppConfig(e,t=null){this.peer.getAppConfig(e,t)}static accountLogin(e,t,r=null){this.peer.accountLogin(e,t,r)}static deviceLogin(e=null){this.peer.deviceLogin(e)}static facebookLogin(e,t=null){this.peer.facebookLogin(e,t)}static googleLogin(e,t,r=null){this.peer.googleLogin(e,t,r)}static appleLogin(e,t=null,r=null){this.peer.appleLogin(e,t,r)}static userIdLogin(e,t=null){this.peer.userIdLogin(e,t)}static publicAddressLogin(e,t,r,o=null){this.peer.publicAddressLogin(e,t,r,o)}static publicAddressGetRandomMessage(e=null){this.peer.publicAddressGetRandomMessage(e)}static customIdLogin(e,t=null){this.peer.customIdLogin(e,t)}static registerAccount(e,t,r=null){this.peer.registerAccount(e,t,r)}static registerSocket(e,t=null){this.peer.registerSocket(e,t)}static template(e,t=null){this.peer.template(e,t)}static createNewFileUploadInfo(e,t=null){this.peer.createNewFileUploadInfo(e,t)}static getFileUploadInfo(e,t=null){this.peer.getFileUploadInfo(e,t)}static logout(e=null){this.peer.logout(e)}}t.GNNetwork=GNNetwork,GNNetwork.AUTH_TOKEN_KEY="[GN]_AUTH_TOKEN_KEY",GNNetwork.USER_ID_KEY="[GN]_USER_ID_KEY",GNNetwork.DEVICE_ID_KEY="[GN]_DEVICE_ID_KEY"},6381:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GNArray=t.GNArrayBuilder=t.GNHashtable=t.GNHashtableBuilder=void 0;class GNData{get(e,t){return t}getBoolean(e,t){return this.get(e,t)}getObject(e,t){return this.get(e,t)}getString(e,t){return this.get(e,t)}getNumber(e,t){return this.get(e,t)}getGNHashtable(e,t){return this.get(e,t)}getGNArray(e,t){return this.get(e,t)}static createGNHashtableFromObject(e){let t=new GNHashtable,r=Object.keys(e);for(let o=0;o<r.length;o++){let n=r[o];t.add(n,e[n])}return t}static createGNArrayFromArray(e){let t=new GNArray,r=e;for(let e=0;e<r.length;e++)t.add(r[e]);return t}static createUseDataFromOriginData(e){if(null==e)return null;let t=typeof e;return"string"===t||"number"===t||"boolean"===t||e instanceof GNArray||e instanceof GNHashtable?e:"object"===t?Array.isArray(e)?this.createGNArrayFromArray(e):this.createGNHashtableFromObject(e):null}static createDataFromUseData(e){return null==e?null:e instanceof GNArray||e instanceof GNHashtable?e.toData():e}}class GNHashtableBuilder{add(e,t){return this.dict[e]=t,this}addAll(e){return Object.keys(e).forEach((t=>{this.add(t,e[t])})),this}constructor(){this.dict={},this.dict={}}build(){let e=new GNHashtable;return Object.keys(this.dict).forEach((t=>{e.add(t,this.dict[t])})),e}}t.GNHashtableBuilder=GNHashtableBuilder;class GNHashtable extends GNData{constructor(){super(...arguments),this.dict={}}clear(){this.dict={}}remove(e){return!!this.containsKey(e)&&(delete this.dict[e],!0)}count(){return Object.keys(this.dict).length}containsKey(e){let t=Object.keys(this.dict),r=e.toString();return-1!=t.indexOf(r)}get(e,t){let r=this.dict[e];return null==r?t:r}add(e,t){this.dict[e]=GNData.createUseDataFromOriginData(t)}toData(){let e={},t=Object.keys(this.dict);for(let r=0;r<t.length;r++){let o=t[r];e[o]=GNData.createDataFromUseData(this.dict[o])}return e}static builder(){return new GNHashtableBuilder}toString(){return JSON.stringify(this.dict)}}t.GNHashtable=GNHashtable;class GNArrayBuilder{add(e){return this.array.push(e),this}addAll(e){return e.forEach((e=>{this.add(e)})),this}build(){let e=new GNArray;return this.array.forEach((t=>{e.add(t)})),e}constructor(){this.array=[],this.array=[]}}t.GNArrayBuilder=GNArrayBuilder;class GNArray extends GNData{constructor(){super(...arguments),this.array=[]}clear(){this.array=[]}remove(e){return!(e<0||e>=this.array.length)&&(this.array.splice(e,1),!0)}count(){return this.array.length}get(e,t){if(e<0||e>=this.array.length)return null;let r=this.array[e];return null==r?t:r}add(e){this.array.push(GNData.createUseDataFromOriginData(e))}toData(){let e=[];for(let t=0;t<this.array.length;t++)e.push(GNData.createDataFromUseData(this.array[t]));return e}static builder(){return new GNArrayBuilder}toString(){return JSON.stringify(this.array)}}t.GNArray=GNArray},4951:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GNServerSettings=void 0;const o=r(6081);t.GNServerSettings=class GNServerSettings{constructor(){this.serverAddress="127.0.0.1",this.serverPort=2202,this.useSsl=!1,this.useSocket=!0,this.useHttp=!0,this.sendRate=20,this.reconnectDelay=5e3,this.pingInterval=2e4,this.pingTimeout=2e4,this.logType=o.LogType.All}config(e){this.serverAddress=e.serverAddress,this.serverPort=e.serverPort,this.useSsl=e.useSsl,this.useSocket=e.useSocket,this.useHttp=e.useHttp,this.sendRate=e.sendRate,this.reconnectDelay=e.reconnectDelay,this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.codeCanSendNotAuthorized=e.codeCanSendNotAuthorized,this.gnServerSourcePath=e.gnServerSourcePath,this.logType=e.logType}getServerAddress(){return this.serverAddress}setServerAddress(e){this.serverAddress=e}getServerPort(){return this.serverPort}setServerPort(e){this.serverPort=e}isUseSsl(){return this.useSsl}setUseSsl(e){this.useSsl=e}isUseSocket(){return this.useSocket}setUseSocket(e){this.useSocket=e}isUseHttp(){return this.useHttp}setUseHttp(e){this.useHttp=e}getSendRate(){return this.sendRate}setSendRate(e){this.sendRate=e}getReconnectDelay(){return this.reconnectDelay}setReconnectDelay(e){this.reconnectDelay=e}getPingInterval(){return this.pingInterval}setPingInterval(e){this.pingInterval=e}getPingTimeout(){return this.pingTimeout}setPingTimeout(e){this.pingTimeout=e}getCodeCanSendNotAuthorized(){return this.codeCanSendNotAuthorized}setCodeCanSendNotAuthorized(e){this.codeCanSendNotAuthorized=e}getGNServerSourcePath(){return this.gnServerSourcePath}setGNServerSourcePath(e){this.gnServerSourcePath=e}getLogType(){return this.logType}setLogType(e){this.logType=e}getSocketUrl(){return this.serverPort<0?(this.useSsl?"https":"http")+"://"+this.serverAddress:(this.useSsl?"https":"http")+"://"+this.serverAddress+":"+this.getServerPort}getHttpUrl(){return this.serverPort<0?(this.isUseSsl?"https":"http")+"://"+this.serverAddress:(this.useSsl?"https":"http")+"://"+this.serverAddress+":"+this.serverPort}}},2509:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Commands=void 0;class Commands{}t.Commands=Commands,Commands.USER_AGENT="User-Agent",Commands.CONTENT_TYPE="Content-Type",Commands.CONTENT_LENGHT="Content-Length",Commands.APPLICATION_JSON="application/json",Commands.APPLICATION_MSGPACK="application/msgpack",Commands.RequestAuthTokenCmd="a",Commands.RequestCmd_MsgPack="r",Commands.ResponseCmd_MsgPack="r",Commands.EventCmd_MsgPack="e",Commands.RequestCmd_Json="t",Commands.ResponseCmd_Json="t",Commands.EventCmd_Json="y",Commands.Data="d",Commands.File="f"},384:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.EventCode=void 0;class EventCode{}t.EventCode=EventCode,EventCode.OnDebug=-1},9423:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.OperationCode=void 0;class OperationCode{}t.OperationCode=OperationCode,OperationCode.Logout=-10,OperationCode.Debug=-1,OperationCode.GetAppConfig=1,OperationCode.Login=2,OperationCode.RegisterAccount=3,OperationCode.EnterDisplayName=4,OperationCode.RegisterSocket=5,OperationCode.FetchAllData=6,OperationCode.CreateNewFileUploadInfo=7,OperationCode.GetFileUploadInfo=8,OperationCode.FetchSparkPlayer=9},5985:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ReturnCode=void 0;class ReturnCode{}t.ReturnCode=ReturnCode,ReturnCode.MaxSizeRequestReject=-10,ReturnCode.MaxRequestReject=-9,ReturnCode.MaxCCUReject=-8,ReturnCode.OperationNotAuthorized=-7,ReturnCode.InvalidRequestParameters=-6,ReturnCode.OperationInvalid=-3,ReturnCode.InternalServerError=-2,ReturnCode.OperationTimeout=-1,ReturnCode.UnknownError=0,ReturnCode.Ok=1},6345:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FriendStatus=void 0,function(e){e[e.Friend=0]="Friend",e[e.WaitingAccept=1]="WaitingAccept",e[e.SentRequestAndWaitingAccept=2]="SentRequestAndWaitingAccept",e[e.Unknown=3]="Unknown"}(t.FriendStatus||(t.FriendStatus={}))},2558:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GoogleLoginType=void 0,function(e){e[e.AccessToken=1]="AccessToken",e[e.IdToken=2]="IdToken"}(t.GoogleLoginType||(t.GoogleLoginType={}))},635:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidMemberType=void 0,function(e){e[e.UnknownError=0]="UnknownError",e[e.DataRequired=1]="DataRequired",e[e.TypeInvalid=2]="TypeInvalid",e[e.StringNull=3]="StringNull",e[e.StringMinLength=4]="StringMinLength",e[e.StringMaxLength=5]="StringMaxLength",e[e.NumberMinValue=6]="NumberMinValue",e[e.NumberMaxValue=7]="NumberMaxValue",e[e.NumberMustInt=8]="NumberMustInt",e[e.GNHashtableNull=9]="GNHashtableNull",e[e.GNHashtableMinLength=10]="GNHashtableMinLength",e[e.GNHashtableMaxLength=11]="GNHashtableMaxLength",e[e.GNArrayNull=12]="GNArrayNull",e[e.GNArrayMinLength=13]="GNArrayMinLength",e[e.GNArrayMaxLength=14]="GNArrayMaxLength"}(t.InvalidMemberType||(t.InvalidMemberType={}))},8466:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LoginType=void 0,function(e){e[e.Account=1]="Account",e[e.Device=2]="Device",e[e.Facebook=3]="Facebook",e[e.Google=4]="Google",e[e.Apple=5]="Apple",e[e.UserId=6]="UserId",e[e.PublicAddress=7]="PublicAddress",e[e.CustomId=8]="CustomId"}(t.LoginType||(t.LoginType={}))},6392:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PlatformType=void 0,function(e){e[e.PC=0]="PC",e[e.Android=1]="Android",e[e.iOS=2]="iOS",e[e.WebGL=3]="WebGL",e[e.Editor=4]="Editor",e[e.Unknown=9]="Unknown"}(t.PlatformType||(t.PlatformType={}))},4919:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UserRoleType=void 0,function(e){e[e.Administrator=0]="Administrator",e[e.GameMaster=1]="GameMaster",e[e.SuperModerazor=2]="SuperModerazor",e[e.Moderazor=3]="Moderazor",e[e.User=100]="User",e[e.UserNonActivate=101]="UserNonActivate"}(t.UserRoleType||(t.UserRoleType={}))},7043:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DebugErrorCode=void 0;class DebugErrorCode{}t.DebugErrorCode=DebugErrorCode,DebugErrorCode.Ok=1},9084:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.EnterDisplayNameErrorCode=void 0;class EnterDisplayNameErrorCode{}t.EnterDisplayNameErrorCode=EnterDisplayNameErrorCode,EnterDisplayNameErrorCode.Ok=1},9212:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FetchAllDataErrorCode=void 0;class FetchAllDataErrorCode{}t.FetchAllDataErrorCode=FetchAllDataErrorCode,FetchAllDataErrorCode.Ok=1,FetchAllDataErrorCode.UserHadBanned=2},4102:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FetchSparkPlayerErrorCode=void 0;class FetchSparkPlayerErrorCode{}t.FetchSparkPlayerErrorCode=FetchSparkPlayerErrorCode,FetchSparkPlayerErrorCode.Ok=1,FetchSparkPlayerErrorCode.UserHadBanned=2},8620:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FileUploadInfoErrorCode=void 0;class FileUploadInfoErrorCode{}t.FileUploadInfoErrorCode=FileUploadInfoErrorCode,FileUploadInfoErrorCode.Ok=1,FileUploadInfoErrorCode.LimitFileUpload=2,FileUploadInfoErrorCode.FileIdNotFound=3},9818:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GetAppConfigErrorCode=void 0;class GetAppConfigErrorCode{}t.GetAppConfigErrorCode=GetAppConfigErrorCode,GetAppConfigErrorCode.Ok=1},7425:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LoginErrorCode=void 0;class LoginErrorCode{}t.LoginErrorCode=LoginErrorCode,LoginErrorCode.Ok=1,LoginErrorCode.UserDoesNotExists=2,LoginErrorCode.ErrorWhenLoginFacebook=3,LoginErrorCode.UserDoesExists=4,LoginErrorCode.UserHadBanned=5,LoginErrorCode.ErrorWhenLoginApple=6,LoginErrorCode.RandomMessageExpired=7,LoginErrorCode.PublicAddressWrong=8,LoginErrorCode.MaxCCU=9},2432:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RegisterSocketErrorCode=void 0;class RegisterSocketErrorCode{}t.RegisterSocketErrorCode=RegisterSocketErrorCode,RegisterSocketErrorCode.Ok=1},901:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DebugParameterCode=void 0;class DebugParameterCode{}t.DebugParameterCode=DebugParameterCode,DebugParameterCode.String="1",DebugParameterCode.Number="2",DebugParameterCode.Boolean="3",DebugParameterCode.GNHashtable="4",DebugParameterCode.GNArray="5"},2423:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.EnterDisplayNameParameterCode=void 0;class EnterDisplayNameParameterCode{}t.EnterDisplayNameParameterCode=EnterDisplayNameParameterCode,EnterDisplayNameParameterCode.DisplayName="1",EnterDisplayNameParameterCode.UserRole="2"},1594:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FetchAllDataParameterCode=void 0;class FetchAllDataParameterCode{}t.FetchAllDataParameterCode=FetchAllDataParameterCode,FetchAllDataParameterCode.UserId="1",FetchAllDataParameterCode.DisplayName="2",FetchAllDataParameterCode.UserRole="3",FetchAllDataParameterCode.TsExpire="4",FetchAllDataParameterCode.Reason="5"},3009:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FetchSparkPlayerParameterCode=void 0;class FetchSparkPlayerParameterCode{}t.FetchSparkPlayerParameterCode=FetchSparkPlayerParameterCode,FetchSparkPlayerParameterCode.UserId="1",FetchSparkPlayerParameterCode.UserExternal="2",FetchSparkPlayerParameterCode.CustomId="3",FetchSparkPlayerParameterCode.FacebookId="4",FetchSparkPlayerParameterCode.GoogleUserId="5",FetchSparkPlayerParameterCode.AppleUserId="6",FetchSparkPlayerParameterCode.DeviceInfo="7",FetchSparkPlayerParameterCode.PublicAddress="8",FetchSparkPlayerParameterCode.TsExpire="9",FetchSparkPlayerParameterCode.Reason="10",FetchSparkPlayerParameterCode.UserRole="11",FetchSparkPlayerParameterCode.TsCreate="12",FetchSparkPlayerParameterCode.Fullname="13"},8823:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FileUploadInfoParameterCode=void 0;class FileUploadInfoParameterCode{}t.FileUploadInfoParameterCode=FileUploadInfoParameterCode,FileUploadInfoParameterCode.FileId="1",FileUploadInfoParameterCode.OriginFileName="2",FileUploadInfoParameterCode.TsCreate="3",FileUploadInfoParameterCode.TsUploadExpire="4",FileUploadInfoParameterCode.UserId="5",FileUploadInfoParameterCode.TsUploadFile="6",FileUploadInfoParameterCode.MimeType="7",FileUploadInfoParameterCode.Size="8",FileUploadInfoParameterCode.FolderFileName="9"},3074:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GetAppConfigParameterCode=void 0;class GetAppConfigParameterCode{}t.GetAppConfigParameterCode=GetAppConfigParameterCode,GetAppConfigParameterCode.ConfigTypes="1",GetAppConfigParameterCode.ConfigNotUptodateLst="2"},4688:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LoginParameterCode=void 0;class LoginParameterCode{}t.LoginParameterCode=LoginParameterCode,LoginParameterCode.LoginType="1",LoginParameterCode.Username="2",LoginParameterCode.Password="3",LoginParameterCode.DeviceInfo="4",LoginParameterCode.FacebookToken="5",LoginParameterCode.GoogleToken="6",LoginParameterCode.UserId="7",LoginParameterCode.AppleToken="8",LoginParameterCode.DisplayName="9",LoginParameterCode.Signature="10",LoginParameterCode.PublicAddress="11",LoginParameterCode.Message="12",LoginParameterCode.CustomId="13",LoginParameterCode.TsExpire="14",LoginParameterCode.Reason="15",LoginParameterCode.GoogleLoginType="16"},1822:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ParameterCode=void 0;class ParameterCode{}t.ParameterCode=ParameterCode,ParameterCode.AuthToken="A",ParameterCode.Ts="T",ParameterCode.ErrorCode="E",ParameterCode.UserId="U"},479:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RegisterSocketParameterCode=void 0;class RegisterSocketParameterCode{}t.RegisterSocketParameterCode=RegisterSocketParameterCode,RegisterSocketParameterCode.SId="1"},3552:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidMember=void 0;t.InvalidMember=class InvalidMember{}},7578:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.OperationEvent=void 0;const o=r(7474);t.OperationEvent=class OperationEvent{constructor(e,t=null,r=!0){this.eventCode=e,this.parameters=t,this.encrypted=r}getEventCode(){return this.eventCode}getParameters(){return this.parameters}isEncrypted(){return this.encrypted}setScriptData(e,t){return this.parameters.add(e,t),this}setParameters(e){return this.parameters=e,this}setEncrypted(e){return this.encrypted=e,this}toString(){return"Code: "+o.CodeHelper.getEventCodeName(this.eventCode)+", parameters "+this.parameters}}},8264:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.OperationHelper=void 0;const o=r(5985),n=r(2574);class OperationHelper{static invalidMemberData(e){let t=[],r=e.getInvalidMembers();if(null!=r)for(let e=0;e<r.length;e++){let o=r[e];t.push([o.code,o.invalidMemberType])}return t}static toResponseSocketData(e){return[e.getReturnCode(),e.getReturnCode()==o.ReturnCode.Ok?e.getParameters().toData():e.getReturnCode()==o.ReturnCode.InvalidRequestParameters?OperationHelper.invalidMemberData(e):e.getDebugMessage(),e.getResponseId()]}static toResponseHttpData(e){return[e.getReturnCode(),e.getReturnCode()==o.ReturnCode.Ok?e.getParameters().toData():e.getReturnCode()==o.ReturnCode.InvalidRequestParameters?OperationHelper.invalidMemberData(e):e.getDebugMessage()]}static newOperationResponse(e,t,r){return new n.OperationResponse(e,t,r)}static newOperationResponseInvalid(e,t,r,n){let s=this.newOperationResponse(e,t,r);return s.setReturnCode(o.ReturnCode.OperationInvalid),null!==n&&s.setDebugMessage(n),s}static newOperationResponseInvalidRequestParameters(e,t,r,n,s){let i=this.newOperationResponse(e,t,n);return i.setReturnCode(o.ReturnCode.InvalidRequestParameters),i.setInvalidMembers(r),null!==s&&i.setDebugMessage(s),i}static newOperationResponseInternalServerError(e,t,r,n){let s=this.newOperationResponse(e,t,r);return s.setReturnCode(o.ReturnCode.InternalServerError),null!==n&&s.setDebugMessage(n),s}static newOperationResponseNotAuthorized(e,t,r,n){let s=this.newOperationResponse(e,t,r);return s.setReturnCode(o.ReturnCode.OperationNotAuthorized),null!==n&&s.setDebugMessage(n),s}static toEventSocketData(e){return[e.getEventCode(),null==e.getParameters()?null:e.getParameters().toData()]}static toSocketData(e){let t=e.getRequestId();return-1==t?[e.getOperationCode(),null==e.getParameters()?null:e.getParameters().toData()]:[e.getOperationCode(),null==e.getParameters()?null:e.getParameters().toData(),t]}}t.OperationHelper=OperationHelper},2088:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.OperationRequest=void 0;const o=r(7474),n=r(6381);class OperationRequest{isValidRequest(){return this.isValid}constructor(e,t,r=OperationRequest.DefaultTimeOut){this.operationCode=e,this.encrypted=t,this.timeout=r}getOperationCode(){return this.operationCode}getRequestId(){return this.requestId}getParameters(){return this.parameters}isEncrypted(){return this.encrypted}getTimeout(){return this.timeout}setRequestId(e){return this.requestId=e,this}setScriptData(e,t){return null==this.parameters&&(this.parameters=new n.GNHashtable),this.parameters.add(e,t),this}setParameters(e){return this.parameters=e,this}setEncrypted(e){return this.encrypted=e,this}setTimeout(e){return this.timeout=e,this}toString(){return"Code: "+o.CodeHelper.getOperationCodeName(this.operationCode)+", requestId: "+this.requestId+", parameters "+this.parameters+", encrypted "+this.encrypted}}t.OperationRequest=OperationRequest,OperationRequest.DefaultTimeOut=15},2574:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.OperationResponse=void 0;const o=r(7474),n=r(6381),s=r(5985);t.OperationResponse=class OperationResponse{constructor(e,t,r=!0){this.operationCode=e,this.responseId=t,this.encrypted=r,this.parameters=new n.GNHashtable,this.debugMessage=null}getOperationCode(){return this.operationCode}getReturnCode(){return this.returnCode}getParameters(){return this.parameters}isEncrypted(){return this.encrypted}getResponseId(){return this.responseId}getDebugMessage(){return this.debugMessage}getInvalidMembers(){return this.invalidMembers}hasError(){return this.getReturnCode()!=s.ReturnCode.Ok}setReturnCode(e){return this.returnCode=e,this}setDebugMessage(e){return this.debugMessage=e,this}setScriptData(e,t){return this.parameters.add(e,t),this}setParameters(e){return this.parameters=e,this}setEncrypted(e){return this.encrypted=e,this}setInvalidMembers(e){return this.invalidMembers=e,this}toString(){let e="";if(e+="Code: "+o.CodeHelper.getOperationCodeName(this.operationCode)+", responseId: "+this.responseId+", returnCode "+o.CodeHelper.getReturnCodeName(this.returnCode),this.returnCode==s.ReturnCode.Ok)e+=", parameters "+this.parameters;else if(this.returnCode==s.ReturnCode.InvalidRequestParameters)if(null!=this.invalidMembers){let t="";this.invalidMembers.forEach((e=>{t+=e})),e+=", invalidMembers "+t}else e+=", invalidMembers "+this.invalidMembers;else e+=", debugMessage "+this.debugMessage;return e}}},1655:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CreateNewFileUploadInfoOperationRequest=void 0;const o=r(6381),n=r(9423),s=r(8823),i=r(2088),a=r(3913);class CreateNewFileUploadInfoOperationRequest extends a.CustomOperationRequest{constructor(e,t=i.OperationRequest.DefaultTimeOut){super(t),this.operationCode=n.OperationCode.CreateNewFileUploadInfo,this.operationEncrypted=!0,this.operationParameters=o.GNHashtable.builder().add(s.FileUploadInfoParameterCode.OriginFileName,e).build()}}t.CreateNewFileUploadInfoOperationRequest=CreateNewFileUploadInfoOperationRequest},3913:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CustomOperationRequest=void 0;const o=r(2088);t.CustomOperationRequest=class CustomOperationRequest{constructor(e){this.operationTimeout=e}build(){let e=new o.OperationRequest(this.operationCode,this.operationEncrypted,this.operationTimeout);return null!=this.operationParameters&&e.setParameters(this.operationParameters),e}}},8275:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DebugOperationRequest=void 0;const o=r(6381),n=r(9423),s=r(901),i=r(2088),a=r(3913);class DebugOperationRequest extends a.CustomOperationRequest{constructor(e,t,r,a,p,l=i.OperationRequest.DefaultTimeOut){super(l),this.operationCode=n.OperationCode.Debug,this.operationEncrypted=!0,this.operationParameters=o.GNHashtable.builder().add(s.DebugParameterCode.Boolean,e).add(s.DebugParameterCode.Number,t).add(s.DebugParameterCode.String,r).add(s.DebugParameterCode.GNHashtable,a).add(s.DebugParameterCode.GNArray,p).build()}}t.DebugOperationRequest=DebugOperationRequest},2135:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.EnterDisplayNameOperationRequest=void 0;const o=r(6381),n=r(9423),s=r(2423),i=r(2088),a=r(3913);class EnterDisplayNameOperationRequest extends a.CustomOperationRequest{constructor(e,t=i.OperationRequest.DefaultTimeOut){super(t),this.operationCode=n.OperationCode.EnterDisplayName,this.operationEncrypted=!0,this.operationParameters=o.GNHashtable.builder().add(s.EnterDisplayNameParameterCode.DisplayName,e).build()}}t.EnterDisplayNameOperationRequest=EnterDisplayNameOperationRequest},1477:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FetchAllDataOperationRequest=void 0;const o=r(9423),n=r(2088),s=r(3913);class FetchAllDataOperationRequest extends s.CustomOperationRequest{constructor(e=n.OperationRequest.DefaultTimeOut){super(e),this.operationCode=o.OperationCode.FetchAllData,this.operationEncrypted=!0}}t.FetchAllDataOperationRequest=FetchAllDataOperationRequest},5347:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FetchSparkPlayerOperationRequest=void 0;const o=r(9423),n=r(2088),s=r(3913);class FetchSparkPlayerOperationRequest extends s.CustomOperationRequest{constructor(e=n.OperationRequest.DefaultTimeOut){super(e),this.operationCode=o.OperationCode.FetchSparkPlayer,this.operationEncrypted=!0}}t.FetchSparkPlayerOperationRequest=FetchSparkPlayerOperationRequest},7067:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GetAppConfigOperationRequest=void 0;const o=r(6381),n=r(9423),s=r(3074),i=r(2088),a=r(3913);class GetAppConfigOperationRequest extends a.CustomOperationRequest{constructor(e,t=i.OperationRequest.DefaultTimeOut){super(t),this.operationCode=n.OperationCode.GetAppConfig,this.operationEncrypted=!0,this.operationParameters=o.GNHashtable.builder().add(s.GetAppConfigParameterCode.ConfigTypes,e).build()}}t.GetAppConfigOperationRequest=GetAppConfigOperationRequest},5257:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GetFileUploadInfoOperationRequest=void 0;const o=r(6381),n=r(9423),s=r(8823),i=r(2088),a=r(3913);class GetFileUploadInfoOperationRequest extends a.CustomOperationRequest{constructor(e,t=i.OperationRequest.DefaultTimeOut){super(t),this.operationCode=n.OperationCode.GetFileUploadInfo,this.operationEncrypted=!0,this.operationParameters=o.GNHashtable.builder().add(s.FileUploadInfoParameterCode.FileId,e).build()}}t.GetFileUploadInfoOperationRequest=GetFileUploadInfoOperationRequest},842:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CustomIdLoginOperationRequest=t.PublicAddressGetRandomMessageOperationRequest=t.PublicAddressLoginOperationRequest=t.UserIdLoginOperationRequest=t.AppleLoginOperationRequest=t.GoogleLoginOperationRequest=t.FacebookLoginOperationRequest=t.DeviceLoginOperationRequest=t.AccountLoginOperationRequest=t.LoginOperationRequest=void 0;const o=r(6381),n=r(8466),s=r(9423),i=r(4688),a=r(2088),p=r(3913);class LoginOperationRequest extends p.CustomOperationRequest{constructor(e=a.OperationRequest.DefaultTimeOut){super(e),this.operationCode=s.OperationCode.Login,this.operationEncrypted=!0}}t.LoginOperationRequest=LoginOperationRequest;t.AccountLoginOperationRequest=class AccountLoginOperationRequest extends LoginOperationRequest{constructor(e,t,r=a.OperationRequest.DefaultTimeOut){super(r),this.operationParameters=o.GNHashtable.builder().add(i.LoginParameterCode.LoginType,n.LoginType.Account).add(i.LoginParameterCode.Username,e).add(i.LoginParameterCode.Password,t).build()}};t.DeviceLoginOperationRequest=class DeviceLoginOperationRequest extends LoginOperationRequest{constructor(e,t=a.OperationRequest.DefaultTimeOut){super(t),this.operationParameters=o.GNHashtable.builder().add(i.LoginParameterCode.LoginType,n.LoginType.Device).add(i.LoginParameterCode.DeviceInfo,e).build()}};t.FacebookLoginOperationRequest=class FacebookLoginOperationRequest extends LoginOperationRequest{constructor(e,t=a.OperationRequest.DefaultTimeOut){super(t),this.operationParameters=o.GNHashtable.builder().add(i.LoginParameterCode.LoginType,n.LoginType.Facebook).add(i.LoginParameterCode.FacebookToken,e).build()}};t.GoogleLoginOperationRequest=class GoogleLoginOperationRequest extends LoginOperationRequest{constructor(e,t,r=a.OperationRequest.DefaultTimeOut){super(r),this.operationParameters=o.GNHashtable.builder().add(i.LoginParameterCode.LoginType,n.LoginType.Google).add(i.LoginParameterCode.GoogleToken,e).add(i.LoginParameterCode.GoogleLoginType,t).build()}};t.AppleLoginOperationRequest=class AppleLoginOperationRequest extends LoginOperationRequest{constructor(e,t,r=a.OperationRequest.DefaultTimeOut){super(r),this.operationParameters=o.GNHashtable.builder().add(i.LoginParameterCode.LoginType,n.LoginType.Apple).add(i.LoginParameterCode.AppleToken,e).add(i.LoginParameterCode.DisplayName,t).build()}};t.UserIdLoginOperationRequest=class UserIdLoginOperationRequest extends LoginOperationRequest{constructor(e,t=a.OperationRequest.DefaultTimeOut){super(t),this.operationParameters=o.GNHashtable.builder().add(i.LoginParameterCode.LoginType,n.LoginType.UserId).add(i.LoginParameterCode.UserId,e).build()}};t.PublicAddressLoginOperationRequest=class PublicAddressLoginOperationRequest extends LoginOperationRequest{constructor(e,t,r,s=a.OperationRequest.DefaultTimeOut){super(s),this.operationParameters=o.GNHashtable.builder().add(i.LoginParameterCode.LoginType,n.LoginType.PublicAddress).add(i.LoginParameterCode.Signature,e).add(i.LoginParameterCode.PublicAddress,t).add(i.LoginParameterCode.Message,r).build()}};t.PublicAddressGetRandomMessageOperationRequest=class PublicAddressGetRandomMessageOperationRequest extends LoginOperationRequest{constructor(e=a.OperationRequest.DefaultTimeOut){super(e),this.operationParameters=o.GNHashtable.builder().add(i.LoginParameterCode.LoginType,n.LoginType.PublicAddress).build()}};t.CustomIdLoginOperationRequest=class CustomIdLoginOperationRequest extends LoginOperationRequest{constructor(e,t=a.OperationRequest.DefaultTimeOut){super(t),this.operationParameters=o.GNHashtable.builder().add(i.LoginParameterCode.LoginType,n.LoginType.CustomId).add(i.LoginParameterCode.CustomId,e).build()}}},759:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LogoutOperationRequest=void 0;const o=r(9423),n=r(2088),s=r(3913);class LogoutOperationRequest extends s.CustomOperationRequest{constructor(e=n.OperationRequest.DefaultTimeOut){super(e),this.operationCode=o.OperationCode.Logout,this.operationEncrypted=!0}}t.LogoutOperationRequest=LogoutOperationRequest},4516:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RegisterAccountOperationRequest=void 0;const o=r(6381),n=r(9423),s=r(4688),i=r(2088),a=r(3913);class RegisterAccountOperationRequest extends a.CustomOperationRequest{constructor(e,t,r=i.OperationRequest.DefaultTimeOut){super(r),this.operationCode=n.OperationCode.RegisterAccount,this.operationEncrypted=!0,this.operationParameters=o.GNHashtable.builder().add(s.LoginParameterCode.Username,e).add(s.LoginParameterCode.Password,t).build()}}t.RegisterAccountOperationRequest=RegisterAccountOperationRequest},7239:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RegisterSocketOperationRequest=void 0;const o=r(6381),n=r(9423),s=r(479),i=r(2088),a=r(3913);class RegisterSocketOperationRequest extends a.CustomOperationRequest{constructor(e,t=i.OperationRequest.DefaultTimeOut){super(t),this.operationCode=n.OperationCode.RegisterSocket,this.operationEncrypted=!0,this.operationParameters=o.GNHashtable.builder().add(s.RegisterSocketParameterCode.SId,e).build()}}t.RegisterSocketOperationRequest=RegisterSocketOperationRequest},9010:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TemplateOperationRequest=void 0;const o=r(6381),n=r(9423),s=r(901),i=r(2088),a=r(3913);class TemplateOperationRequest extends a.CustomOperationRequest{constructor(e,t=i.OperationRequest.DefaultTimeOut){super(t),this.operationCode=n.OperationCode.Debug,this.operationEncrypted=!0,this.operationParameters=o.GNHashtable.builder().add(s.DebugParameterCode.Boolean,e).build()}}t.TemplateOperationRequest=TemplateOperationRequest},1099:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CreateNewFileUploadInfoOperationResponse=void 0;const o=r(8620),n=r(8823),s=r(2584);class CreateNewFileUploadInfoOperationResponse extends s.CustomOperationResponse{setupOperationResponse(e){super.setupOperationResponse(e),this.hasError()||this.errorCode==o.FileUploadInfoErrorCode.Ok&&(this.fileId=this.parameters.getString(n.FileUploadInfoParameterCode.FileId),this.originFileName=this.parameters.getString(n.FileUploadInfoParameterCode.OriginFileName),this.tsCreate=this.parameters.getNumber(n.FileUploadInfoParameterCode.TsCreate),this.tsUploadExpire=this.parameters.getNumber(n.FileUploadInfoParameterCode.TsUploadExpire),this.userId=this.parameters.getString(n.FileUploadInfoParameterCode.UserId))}}t.CreateNewFileUploadInfoOperationResponse=CreateNewFileUploadInfoOperationResponse},2584:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CustomOperationResponse=void 0;const o=r(1822),n=r(5985);t.CustomOperationResponse=class CustomOperationResponse{hasError(){return this.returnCode!=n.ReturnCode.Ok}setupOperationResponse(e){this.operationCode=e.getOperationCode(),this.returnCode=e.getReturnCode(),this.debugMessage=e.getDebugMessage(),this.parameters=e.getParameters(),this.invalidMembers=e.getInvalidMembers(),this.hasError()||(this.errorCode=this.parameters.getNumber(o.ParameterCode.ErrorCode))}toString(){return"ReturnCode: "+this.returnCode+" "+(null!=this.parameters?this.parameters.toString():this.debugMessage)}}},9248:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DebugOperationResponse=void 0;const o=r(7043),n=r(901),s=r(2584);class DebugOperationResponse extends s.CustomOperationResponse{setupOperationResponse(e){super.setupOperationResponse(e),this.hasError()||this.errorCode==o.DebugErrorCode.Ok&&(this.boolean=this.parameters.getBoolean(n.DebugParameterCode.Boolean),this.string=this.parameters.getString(n.DebugParameterCode.String),this.number=this.parameters.getNumber(n.DebugParameterCode.Number),this.gnHashtable=this.parameters.getGNHashtable(n.DebugParameterCode.GNHashtable),this.gnArray=this.parameters.getGNArray(n.DebugParameterCode.GNArray))}}t.DebugOperationResponse=DebugOperationResponse},1165:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.EnterDisplayNameOperationResponse=void 0;const o=r(9084),n=r(2423),s=r(2584);class EnterDisplayNameOperationResponse extends s.CustomOperationResponse{setupOperationResponse(e){super.setupOperationResponse(e),this.hasError()||this.errorCode==o.EnterDisplayNameErrorCode.Ok&&(this.userRole=this.parameters.getNumber(n.EnterDisplayNameParameterCode.UserRole),this.displayName=this.parameters.getString(n.EnterDisplayNameParameterCode.DisplayName))}}t.EnterDisplayNameOperationResponse=EnterDisplayNameOperationResponse},7162:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FetchAllDataOperationResponse=void 0;const o=r(9212),n=r(1594),s=r(2584);class FetchAllDataOperationResponse extends s.CustomOperationResponse{setupOperationResponse(e){super.setupOperationResponse(e),this.hasError()||(this.errorCode==o.FetchAllDataErrorCode.Ok?(this.userId=this.parameters.getString(n.FetchAllDataParameterCode.UserId),this.userRole=this.parameters.getNumber(n.FetchAllDataParameterCode.UserRole),this.displayName=this.parameters.getString(n.FetchAllDataParameterCode.DisplayName)):this.errorCode==o.FetchAllDataErrorCode.UserHadBanned&&(this.tsExpire=this.parameters.getNumber(n.FetchAllDataParameterCode.TsExpire),this.reason=this.parameters.getString(n.FetchAllDataParameterCode.Reason)))}}t.FetchAllDataOperationResponse=FetchAllDataOperationResponse},8023:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FetchSparkPlayerOperationResponse=void 0;const o=r(4102),n=r(3009),s=r(2584);class FetchSparkPlayerOperationResponse extends s.CustomOperationResponse{setupOperationResponse(e){if(super.setupOperationResponse(e),!this.hasError())if(this.errorCode==o.FetchSparkPlayerErrorCode.Ok){this.userId=this.parameters.getString(n.FetchSparkPlayerParameterCode.UserId),this.userRole=this.parameters.getNumber(n.FetchSparkPlayerParameterCode.UserRole),this.fullname=this.parameters.getString(n.FetchSparkPlayerParameterCode.Fullname),this.tsCreate=this.parameters.getNumber(n.FetchSparkPlayerParameterCode.TsCreate);let e=this.parameters.getGNHashtable(n.FetchSparkPlayerParameterCode.UserExternal);this.userExternal={customId:e.getString(n.FetchSparkPlayerParameterCode.CustomId),facebookId:e.getString(n.FetchSparkPlayerParameterCode.FacebookId),googleUserId:e.getString(n.FetchSparkPlayerParameterCode.GoogleUserId),appleUserId:e.getString(n.FetchSparkPlayerParameterCode.AppleUserId),deviceInfo:e.getString(n.FetchSparkPlayerParameterCode.DeviceInfo),publicAddress:e.getString(n.FetchSparkPlayerParameterCode.PublicAddress)}}else this.errorCode==o.FetchSparkPlayerErrorCode.UserHadBanned&&(this.tsExpire=this.parameters.getNumber(n.FetchSparkPlayerParameterCode.TsExpire),this.reason=this.parameters.getString(n.FetchSparkPlayerParameterCode.Reason))}}t.FetchSparkPlayerOperationResponse=FetchSparkPlayerOperationResponse},2443:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GetAppConfigOperationResponse=void 0;const o=r(9818),n=r(3074),s=r(2584);class GetAppConfigOperationResponse extends s.CustomOperationResponse{setupOperationResponse(e){if(super.setupOperationResponse(e),!this.hasError()&&this.errorCode==o.GetAppConfigErrorCode.Ok){let e=this.parameters.getGNArray(n.GetAppConfigParameterCode.ConfigNotUptodateLst);this.configNotUptodateLst=[];for(let t=0;t<e.count();t++)this.configNotUptodateLst.push(e.getString(t))}}}t.GetAppConfigOperationResponse=GetAppConfigOperationResponse},6262:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GetFileUploadInfoOperationResponse=void 0;const o=r(8620),n=r(8823),s=r(2584);class GetFileUploadInfoOperationResponse extends s.CustomOperationResponse{setupOperationResponse(e){super.setupOperationResponse(e),this.hasError()||this.errorCode==o.FileUploadInfoErrorCode.Ok&&(this.fileId=this.parameters.getString(n.FileUploadInfoParameterCode.FileId),this.originFileName=this.parameters.getString(n.FileUploadInfoParameterCode.OriginFileName),this.tsCreate=this.parameters.getNumber(n.FileUploadInfoParameterCode.TsCreate),this.userId=this.parameters.getString(n.FileUploadInfoParameterCode.UserId),this.parameters.containsKey(n.FileUploadInfoParameterCode.TsUploadExpire)?(this.fileHasUpload=!1,this.tsUploadExpire=this.parameters.getNumber(n.FileUploadInfoParameterCode.TsUploadExpire)):(this.fileHasUpload=!0,this.tsUploadFile=this.parameters.getNumber(n.FileUploadInfoParameterCode.TsUploadFile),this.mimeType=this.parameters.getString(n.FileUploadInfoParameterCode.MimeType),this.size=this.parameters.getNumber(n.FileUploadInfoParameterCode.Size),this.folderFileName=this.parameters.getString(n.FileUploadInfoParameterCode.FolderFileName)))}}t.GetFileUploadInfoOperationResponse=GetFileUploadInfoOperationResponse},8178:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LoginOperationResponse=void 0;const o=r(7425),n=r(4688),s=r(1822),i=r(2584);class LoginOperationResponse extends i.CustomOperationResponse{setupOperationResponse(e){super.setupOperationResponse(e),this.hasError()||(this.errorCode==o.LoginErrorCode.Ok?(this.authToken=this.parameters.getString(s.ParameterCode.AuthToken),this.userId=this.parameters.getString(s.ParameterCode.UserId)):this.errorCode==o.LoginErrorCode.UserHadBanned&&(this.tsExpire=this.parameters.getNumber(n.LoginParameterCode.TsExpire),this.reason=this.parameters.getString(n.LoginParameterCode.Reason)))}}t.LoginOperationResponse=LoginOperationResponse},7224:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LogoutOperationResponse=void 0;const o=r(1619),n=r(6081),s=r(2584);class LogoutOperationResponse extends s.CustomOperationResponse{setupOperationResponse(e){super.setupOperationResponse(e),this.hasError()?n.GNDebug.logError("[GN] You need login before logout."):(o.GNNetwork.setAuthToken(""),o.GNNetwork.setUserId(""),n.GNDebug.log("[GN] Logout success."))}}t.LogoutOperationResponse=LogoutOperationResponse},1635:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PublicAddressGetRandomMessageOperationResponse=void 0;const o=r(7425),n=r(4688),s=r(2584);class PublicAddressGetRandomMessageOperationResponse extends s.CustomOperationResponse{setupOperationResponse(e){super.setupOperationResponse(e),this.hasError()||this.errorCode==o.LoginErrorCode.Ok&&(this.message=this.parameters.getString(n.LoginParameterCode.Message))}}t.PublicAddressGetRandomMessageOperationResponse=PublicAddressGetRandomMessageOperationResponse},4962:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RegisterAccountOperationResponse=void 0;const o=r(7425),n=r(8178);class RegisterAccountOperationResponse extends n.LoginOperationResponse{setupOperationResponse(e){super.setupOperationResponse(e),this.hasError||(this.errorCode,o.LoginErrorCode.Ok)}}t.RegisterAccountOperationResponse=RegisterAccountOperationResponse},8301:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RegisterSocketOperationResponse=void 0;const o=r(2432),n=r(2584);class RegisterSocketOperationResponse extends n.CustomOperationResponse{setupOperationResponse(e){super.setupOperationResponse(e),this.hasError||(this.errorCode,o.RegisterSocketErrorCode.Ok)}}t.RegisterSocketOperationResponse=RegisterSocketOperationResponse},2976:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TemplateOperationResponse=void 0;const o=r(7043),n=r(901),s=r(2584);class TemplateOperationResponse extends s.CustomOperationResponse{setupOperationResponse(e){super.setupOperationResponse(e),this.hasError()||this.errorCode==o.DebugErrorCode.Ok&&(this.boolean=this.parameters.getBoolean(n.DebugParameterCode.Boolean))}}t.TemplateOperationResponse=TemplateOperationResponse},7474:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CodeHelper=void 0;const o=r(384),n=r(9423),s=r(5985);class CodeHelper{static getOperationCodeName(e){let t=this.operationCodeDic[e];return t||this.UnknownCode}static getEventCodeName(e){let t=this.eventCodeDic[e];return t||this.UnknownCode}static getReturnCodeName(e){let t=this.returnCodeDic[e];return t||this.UnknownCode}static init(){this.setOperationCodeDic(),this.setEventCodeDic(),this.setReturnCodeDic()}static setOperationCodeDic(){this.operationCodeDic={},this.addOperationCodeDic(n.OperationCode)}static addOperationCodeDic(e){let t=Object.keys(e),r=Object.values(e);for(let e=0;e<t.length;e++)this.operationCodeDic[r[e]]=t[e]}static setEventCodeDic(){this.eventCodeDic={},this.addEventCodeDic(o.EventCode)}static addEventCodeDic(e){let t=Object.keys(e),r=Object.values(e);for(let e=0;e<t.length;e++)this.eventCodeDic[r[e]]=t[e]}static setReturnCodeDic(){this.returnCodeDic={},this.addReturnCodeDic(s.ReturnCode)}static addReturnCodeDic(e){let t=Object.keys(e),r=Object.values(e);for(let e=0;e<t.length;e++)this.returnCodeDic[r[e]]=t[e]}}t.CodeHelper=CodeHelper,CodeHelper.UnknownCode="Unknown"},7315:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GNSupport=void 0;t.GNSupport=class GNSupport{static init(){if(this._isBrowser="undefined"!=typeof window,this._isBrowser){null==globalThis.exports&&(globalThis.exports={}),globalThis.exports.localStorage=window.localStorage,globalThis.exports.crypto=window.crypto,globalThis.exports.axios=window.axios;let e=window.io;globalThis.exports.Manager=e.Manager,globalThis.exports.Socket=e.Socket;let t=window.msgpack;globalThis.exports.decode=t.decode,globalThis.exports.encode=t.encode}else{globalThis.exports||(globalThis.exports={});let e=r(1335).LocalStorage;globalThis.exports.localStorage=new e(__dirname+"/../../../.././scratch");let t=r(4347);globalThis.exports.crypto=t,globalThis.exports.axios=r(2167);let o=r(8087);globalThis.exports.Manager=o.Manager,globalThis.exports.Socket=o.Socket;let n=r(2692);globalThis.exports.decode=n.decode,globalThis.exports.encode=n.encode}}static isBrowser(){return this._isBrowser}}},6081:(e,t)=>{var r;Object.defineProperty(t,"__esModule",{value:!0}),t.GNDebug=t.LogType=void 0,function(e){e[e.Off=0]="Off",e[e.Exception=1]="Exception",e[e.Error=2]="Error",e[e.Warning=3]="Warning",e[e.All=4]="All"}(r=t.LogType||(t.LogType={}));t.GNDebug=class GNDebug{static setLogType(e){this._logType=e}static log(e){this._logType>=r.All&&console.log(e)}static logException(e){this._logType>=r.Exception&&console.error(e)}static logWarning(e){this._logType>=r.Warning&&console.warn(e)}static logError(e){this._logType>=r.Error&&console.error(e)}}},6575:function(e,t,r){var o=this&&this.__awaiter||function(e,t,r,o){return new(r||(r=Promise))((function(n,s){function fulfilled(e){try{step(o.next(e))}catch(e){s(e)}}function rejected(e){try{step(o.throw(e))}catch(e){s(e)}}function step(e){e.done?n(e.value):function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}(e.value).then(fulfilled,rejected)}step((o=o.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.HttpPeer=t.PostType=t.HttpAppResponse=void 0;const n=r(6381),s=r(2509),i=r(9423),a=r(5985),p=r(1619),l=r(6081),d=r(4178),u=r(647),c=r(7437),g=r(7315);class HttpAppResponse{hasError(){return null!=this.error}}var h;t.HttpAppResponse=HttpAppResponse,function(e){e[e.Json=0]="Json",e[e.MsgPack=1]="MsgPack"}(h=t.PostType||(t.PostType={}));class HttpPeer extends u.PeerBase{initGNSocketObject(){let e=p.GNNetwork.getGNServerSettings();if(null==e)throw new Error("Where is GN Server Settings");this.isUse=e.isUseHttp(),this.httpUrl=e.getHttpUrl(),HttpPeer.userAgent="GN-ts-"+p.GNNetwork.getPlatform()+"@"+p.GNNetwork.getClientSdkVersion()}send(e){super.send(e),l.GNDebug.log("[GN Http SEND] "+e.getOperationRequest().toString());let t=e.getOperationRequest();if(!p.GNNetwork.getAuthToken()&&-1==p.GNNetwork.getGNServerSettings().getCodeCanSendNotAuthorized().indexOf(t.getOperationCode())){let e=new n.GNArray;return e.add(a.ReturnCode.OperationNotAuthorized),e.add(null),e.add(t.getRequestId()),void this.onResponseHandler(e,t.isEncrypted())}if(t.getOperationCode()==i.OperationCode.Logout){let e=new n.GNArray;return e.add(a.ReturnCode.Ok),e.add(new n.GNHashtable),e.add(t.getRequestId()),void this.onResponseHandler(e,t.isEncrypted())}g.GNSupport.isBrowser()&&t.isEncrypted()&&(l.GNDebug.logWarning("GN JS client sdk does not support send encrypted request via HTTP, so we will send this request via HTTP non encrypted"),t.setEncrypted(!1));let r=t.isEncrypted()?h.MsgPack:h.Json,o=(r==h.Json?d.NetworkingPeer.API_JSON:d.NetworkingPeer.API_MSG_PACK)+"/"+t.getOperationCode(),s=this;this.postRequestViaHTTPRequest(o,t.getParameters(),r,{invoke:function(t){s.onSendOperationRequestResponse(e,t)}},t.getTimeout())}onSendOperationRequestResponse(e,t){let r=e.getOperationRequest(),o=new n.GNArray;if(!t.hasError()&&200==t.statusCode){let e=!1,s=null;if(t.text&&t.text[0]===HttpPeer.JSON_CHAR_KNOWN){let e=JSON.parse(t.text);s=n.GNArray.builder().addAll(e).build()}if(null==s&&null!=t.data){let r=globalThis.exports.decode(t.data);s=n.GNArray.builder().addAll(c.NetworkingPeerBase.fromMsgList(r)).build(),e=!0}if(null!=s){let t=s.getNumber(0);return o.add(t),t==a.ReturnCode.Ok?o.add(s.getGNHashtable(1,new n.GNHashtable)):t==a.ReturnCode.InvalidRequestParameters?o.add(s.getGNArray(1,new n.GNArray)):o.add(s.getString(1)),o.add(r.getRequestId()),void this.onResponseHandler(o,e)}}o.add(a.ReturnCode.UnknownError),o.add(t.error),o.add(r.getRequestId()),this.onResponseHandler(o,r.isEncrypted())}getRequest(e,t,r=15){this.getRequestViaHTTPRequest(e,t,r)}getRequestViaHTTPRequest(e,t,r){return o(this,void 0,void 0,(function*(){let o=globalThis.exports.axios,n={},i=p.GNNetwork.getAuthToken();i&&(n[s.Commands.RequestAuthTokenCmd]=i),g.GNSupport.isBrowser()||(n[s.Commands.USER_AGENT]=HttpPeer.userAgent);let a=new HttpAppResponse;try{let t=yield o.get(this.httpUrl+"/"+e,{headers:n,timeout:1e3*r,responseType:"arraybuffer"});a.statusCode=t.status;let s=this.toBuffers(t.data);a.data=s[0],a.text=s[1]}catch(e){a.error=e.toString(),a.statusCode=-1,a.text="[-2]",l.GNDebug.logError(e)}null==t||t.invoke(a)}))}postRequestViaHTTPRequest(e,t,r,i,a){return o(this,void 0,void 0,(function*(){let o=globalThis.exports.axios,d={},u=p.GNNetwork.getAuthToken();u&&(d[s.Commands.RequestAuthTokenCmd]=u),g.GNSupport.isBrowser()||(d[s.Commands.USER_AGENT]=HttpPeer.userAgent),null==t&&(t=new n.GNHashtable);let c=null;if(r==h.Json){c=t.toData(),g.GNSupport.isBrowser()||(d[s.Commands.CONTENT_LENGHT]=JSON.stringify(c).length,d[s.Commands.CONTENT_TYPE]=s.Commands.APPLICATION_JSON)}else if(r==h.MsgPack){let e=t.toData();c=globalThis.exports.encode(e),d[s.Commands.CONTENT_TYPE]=s.Commands.APPLICATION_MSGPACK,g.GNSupport.isBrowser()||(d[s.Commands.CONTENT_LENGHT]=c.length)}let m=new HttpAppResponse;try{let t=yield o.post(this.httpUrl+"/"+e,c,{headers:d,timeout:1e3*a,responseType:"arraybuffer"});m.statusCode=t.status;let r=this.toBuffers(t.data);m.data=r[0],m.text=r[1]}catch(e){m.error=e.toString(),m.statusCode=-1,m.text="[-2]",l.GNDebug.logError(e)}null==i||i.invoke(m)}))}uploadFile(e,t,r,o,n=60){if(!p.GNNetwork.getAuthToken()){let e=new HttpAppResponse;return e.statusCode=401,e.error="Auth token null",void(null==o||o.invoke(e))}let s=d.NetworkingPeer.UPLOAD_FILE+"/"+e;this.postRequestUploadViaHTTPRequest(s,t,r,o,n)}postRequestUploadViaHTTPRequest(e,t,r,n,s){return o(this,void 0,void 0,(function*(){l.GNDebug.logWarning("GN JS client sdk does not support upload file yet.");let e=new HttpAppResponse;e.error="Upload file does not support in GN JS client sdk.",e.statusCode=-1,e.text="[-3]",null==n||n.invoke(e)}))}uint8ArrayToString(e){return decodeURIComponent(escape(String.fromCharCode(...e)))}toBuffers(e){return g.GNSupport.isBrowser()?[e=new Uint8Array(e),this.uint8ArrayToString(e)]:[e,e.toString()]}}t.HttpPeer=HttpPeer,HttpPeer.userAgent="",HttpPeer.JSON_CHAR_KNOWN="["},4178:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NetworkingPeer=void 0;const o=r(6381),n=r(5985),s=r(1655),i=r(8275),a=r(2135),p=r(1477),l=r(5347),d=r(7067),u=r(5257),c=r(842),g=r(759),h=r(4516),m=r(7239),O=r(9010),b=r(1099),C=r(9248),P=r(1165),R=r(7162),_=r(8023),f=r(2443),k=r(6262),y=r(8178),N=r(7224),v=r(1635),S=r(4962),D=r(8301),q=r(2976),E=r(1619),A=r(6575),G=r(4592);class NetworkingPeer{constructor(){this.authToken="",this.userId=""}getPing(){let e=0,t=0;return this.httpPeer.isUsing()&&(e++,t+=this.httpPeer.ping),this.socketPeer.isUsing()&&(e++,t+=this.socketPeer.ping),t/e}update(){this.service()}service(){this.httpPeer.service(),this.socketPeer.service()}setServerTimeMilliseconds(e){this.lastCurrentServerMilliseconds=e,this.lastGetCurrentMilliseconds=Date.now()/1e3}getServerTimestamp(){return this.lastCurrentServerMilliseconds+1e3*(Date.now()/1e3-this.lastGetCurrentMilliseconds)}initPeer(){if(this.setServerTimeMilliseconds((new Date).getUTCMilliseconds()),null==E.GNNetwork.getGNServerSettings())throw new Error("Null GN Server Settings, please find it now");this.httpPeer=new A.HttpPeer,this.httpPeer.initPeer(),this.socketPeer=new G.SocketPeer,this.socketPeer.initPeer(),setInterval((()=>this.update()),50)}sendViaSocket(e,t=null){this.socketPeer.enqueue(e,t)}sendViaHttp(e,t=null){this.httpPeer.enqueue(e,t)}sendRequestAuthSocket(){this.socketPeer.sendRequestAuthSocket()}connectSocket(e){this.socketPeer.connect(e)}disconnectSocket(e){this.socketPeer.disconnect(e)}setOnConnectHandler(e){this.socketPeer.setOnConnectHandler(e)}setOnDisconnectHandler(e){this.socketPeer.setOnDisconnectHandler(e)}removeOnConnectHandler(e){this.socketPeer.removeOnConnectHandler(e)}removeOnDisconnectHandler(e){this.socketPeer.removeOnDisconnectHandler(e)}subscriberServerEventHandler(e){this.socketPeer.subscriberAServerEventHandler(e)}syncTs(e=null){let t=this;this.httpPeer.getRequest(NetworkingPeer.SYNC_TS,{invoke:function(r){if(!r.hasError()&&200==r.statusCode){let e=JSON.parse(r.text),s=o.GNArray.builder().addAll(e).build();if(s.getNumber(0)==n.ReturnCode.Ok){let e=s.getGNHashtable(1).getNumber("1",(new Date).getUTCMilliseconds());t.setServerTimeMilliseconds(e)}}null==e||e.invoke(t.getServerTimestamp())}})}getConfig(e,t){this.httpPeer.getRequest(NetworkingPeer.GET_CONFIG+"/"+e,{invoke:function(e){if(!e.hasError()&&200==e.statusCode){let r=JSON.parse(e.text),s=o.GNArray.builder().addAll(r).build();if(s.getNumber(0)==n.ReturnCode.Ok){let e=s.getGNHashtable(1).getString("1");null==t||t.invoke(e)}}}})}downloadFile(e,t){this.httpPeer.getRequest(NetworkingPeer.DOWNLOAD_FILE+"/"+e,t)}uploadFile(e,t,r,o){this.httpPeer.uploadFile(e,t,r,o)}debug(e,t,r,o,n,s=null){let a=new i.DebugOperationRequest(e,t,r,o,n).build();this.sendViaHttp(a,{invoke:function(e){let t=new C.DebugOperationResponse;t.setupOperationResponse(e),null==s||s.invoke(t)}})}enterDisplayName(e,t=null){let r=new a.EnterDisplayNameOperationRequest(e).build();this.sendViaHttp(r,{invoke:function(e){let r=new P.EnterDisplayNameOperationResponse;r.setupOperationResponse(e),null==t||t.invoke(r)}})}fetchAllData(e=null){let t=(new p.FetchAllDataOperationRequest).build();this.sendViaHttp(t,{invoke:function(t){let r=new R.FetchAllDataOperationResponse;r.setupOperationResponse(t),null==e||e.invoke(r)}})}fetchSparkPlayer(e=null){let t=(new l.FetchSparkPlayerOperationRequest).build();this.sendViaHttp(t,{invoke:function(t){let r=new _.FetchSparkPlayerOperationResponse;r.setupOperationResponse(t),null==e||e.invoke(r)}})}getAppConfig(e,t=null){let r=new d.GetAppConfigOperationRequest(e).build();this.sendViaHttp(r,{invoke:function(e){let r=new f.GetAppConfigOperationResponse;r.setupOperationResponse(e),null==t||t.invoke(r)}})}accountLogin(e,t,r=null){let o=new c.AccountLoginOperationRequest(e,t).build();this.sendViaHttp(o,{invoke:function(e){let t=new y.LoginOperationResponse;t.setupOperationResponse(e),null==r||r.invoke(t)}})}deviceLogin(e=null){let t=new c.DeviceLoginOperationRequest(E.GNNetwork.getDeviceInfo()).build();this.sendViaHttp(t,{invoke:function(t){let r=new y.LoginOperationResponse;r.setupOperationResponse(t),null==e||e.invoke(r)}})}facebookLogin(e,t=null){let r=new c.FacebookLoginOperationRequest(e).build();this.sendViaHttp(r,{invoke:function(e){let r=new y.LoginOperationResponse;r.setupOperationResponse(e),null==t||t.invoke(r)}})}googleLogin(e,t,r=null){let o=new c.GoogleLoginOperationRequest(e,t).build();this.sendViaHttp(o,{invoke:function(e){let t=new y.LoginOperationResponse;t.setupOperationResponse(e),null==r||r.invoke(t)}})}appleLogin(e,t,r=null){let o=new c.AppleLoginOperationRequest(e,t).build();this.sendViaHttp(o,{invoke:function(e){let t=new y.LoginOperationResponse;t.setupOperationResponse(e),null==r||r.invoke(t)}})}userIdLogin(e,t=null){let r=new c.UserIdLoginOperationRequest(e).build();this.sendViaHttp(r,{invoke:function(e){let r=new y.LoginOperationResponse;r.setupOperationResponse(e),null==t||t.invoke(r)}})}publicAddressLogin(e,t,r,o=null){let n=new c.PublicAddressLoginOperationRequest(e,t,r).build();this.sendViaHttp(n,{invoke:function(e){let t=new y.LoginOperationResponse;t.setupOperationResponse(e),null==o||o.invoke(t)}})}publicAddressGetRandomMessage(e=null){let t=(new c.PublicAddressGetRandomMessageOperationRequest).build();this.sendViaHttp(t,{invoke:function(t){let r=new v.PublicAddressGetRandomMessageOperationResponse;r.setupOperationResponse(t),null==e||e.invoke(r)}})}customIdLogin(e,t=null){let r=new c.CustomIdLoginOperationRequest(e).build();this.sendViaHttp(r,{invoke:function(e){let r=new y.LoginOperationResponse;r.setupOperationResponse(e),null==t||t.invoke(r)}})}registerAccount(e,t,r=null){let o=new h.RegisterAccountOperationRequest(e,t).build();this.sendViaHttp(o,{invoke:function(e){let t=new S.RegisterAccountOperationResponse;t.setupOperationResponse(e),null==r||r.invoke(t)}})}registerSocket(e,t=null){let r=new m.RegisterSocketOperationRequest(e).build();this.sendViaHttp(r,{invoke:function(e){let r=new D.RegisterSocketOperationResponse;r.setupOperationResponse(e),null==t||t.invoke(r)}})}template(e,t=null){let r=new O.TemplateOperationRequest(e).build();this.sendViaHttp(r,{invoke:function(e){let r=new q.TemplateOperationResponse;r.setupOperationResponse(e),null==t||t.invoke(r)}})}createNewFileUploadInfo(e,t=null){let r=new s.CreateNewFileUploadInfoOperationRequest(e).build();this.sendViaHttp(r,{invoke:function(e){let r=new b.CreateNewFileUploadInfoOperationResponse;r.setupOperationResponse(e),null==t||t.invoke(r)}})}getFileUploadInfo(e,t=null){let r=new u.GetFileUploadInfoOperationRequest(e).build();this.sendViaHttp(r,{invoke:function(e){let r=new k.GetFileUploadInfoOperationResponse;r.setupOperationResponse(e),null==t||t.invoke(r)}})}logout(e=null){let t=(new g.LogoutOperationRequest).build();this.sendViaHttp(t,{invoke:function(t){let r=new N.LogoutOperationResponse;r.setupOperationResponse(t),null==e||e.invoke(r)}})}}t.NetworkingPeer=NetworkingPeer,NetworkingPeer.SYNC_TS="ts",NetworkingPeer.UPLOAD_FILE="upload",NetworkingPeer.DOWNLOAD_FILE="upload",NetworkingPeer.GET_CONFIG="getConfig",NetworkingPeer.API_JSON="api/0",NetworkingPeer.API_MSG_PACK="api/1"},7437:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NetworkingPeerBase=t.SocketPacket=void 0;const o=r(6381),n=r(1619),s=r(6081);t.SocketPacket=class SocketPacket{constructor(e,t){this.obj=e,this.encrypted=t}};class NetworkingPeerBase{constructor(){}init(e,t,r,o){this.responsePacketLst=[],this.eventPacketLst=[],this.clientId="",this.url=e,this.reconnectDelay=t,this.pingInterval=r,this.pingTimeout=o}onApplicationQuit(){this.close(null)}connect(e){this._onSocketConnect=e}close(e){this._onSocketDisconnect=e}sendRequestAuthSocket(){}send(e){this.emit(e)}reInitNewSocket(){}setOnConnectHandler(e){this._onConnectHandler=e}setOnDisconnectHandler(e){this._onDisconnectHandler=e}removeOnConnectHandler(e){this._onConnectHandler=e}removeOnDisconnectHandler(e){this._onDisconnectHandler=e}onConnectHandler(){var e,t;null===(e=this._onConnectHandler)||void 0===e||e.invoke(),null!=n.GNNetwork.getAuthToken()&&this.sendRequestAuthSocket(),null===(t=this._onSocketConnect)||void 0===t||t.invoke(),this._onSocketConnect=null}onDisconnectHandler(){var e,t;null===(e=this._onDisconnectHandler)||void 0===e||e.invoke(),null===(t=this._onSocketDisconnect)||void 0===t||t.invoke(),this._onSocketDisconnect=null}setOnEventHandler(e){this._onEventHandler=e}onEventHandler(e,t){var r;null===(r=this._onEventHandler)||void 0===r||r.invoke(e,t)}setOnResponseHandler(e){this._onResponseHandler=e}onResponseHandler(e,t){var r;null===(r=this._onResponseHandler)||void 0===r||r.invoke(e,t)}static fromMsgList(e){let t=[];for(let r=0;r<e.length;r++){let o=e[r];t.push(o)}return t}static fromJsonList(e){return e}service(){if(this.responsePacketLst.length>0){for(let e=0;e<this.responsePacketLst.length;e++){let t=this.responsePacketLst[e];if(t.encrypted)try{let e=globalThis.exports.decode(t.obj),r=o.GNArray.builder().addAll(NetworkingPeerBase.fromMsgList(e)).build();this.onResponseHandler(r,t.encrypted)}catch(e){s.GNDebug.logException(e)}else try{let e=t.obj,r=o.GNArray.builder().addAll(NetworkingPeerBase.fromJsonList(e)).build();this.onResponseHandler(r,t.encrypted)}catch(e){s.GNDebug.logException(e)}}this.responsePacketLst.length=0}if(this.eventPacketLst.length>0){for(let e=0;e<this.eventPacketLst.length;e++){let t=this.eventPacketLst[e];if(t.encrypted)try{let e=globalThis.exports.decode(t.obj),r=o.GNArray.builder().addAll(NetworkingPeerBase.fromMsgList(e)).build();this.onEventHandler(r,t.encrypted)}catch(e){s.GNDebug.logException(e)}else try{let e=t.obj,r=o.GNArray.builder().addAll(NetworkingPeerBase.fromJsonList(e)).build();this.onEventHandler(r,t.encrypted)}catch(e){s.GNDebug.logException(e)}}this.eventPacketLst.length=0}}}t.NetworkingPeerBase=NetworkingPeerBase},6933:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NetworkingPeerSocket=void 0;const o=r(2509),n=r(6081),s=r(7437),i=r(1619),a=r(8264);class NetworkingPeerSocket extends s.NetworkingPeerBase{sendRequestAuthSocket(){super.sendRequestAuthSocket(),this.clientId&&this.socketManager.socket("/").emit(o.Commands.RequestAuthTokenCmd,i.GNNetwork.getAuthToken())}reInitNewSocket(){if(super.reInitNewSocket(),null==this.socketManager){this.socketManager=new globalThis.exports.Manager(this.url+"/socket.io/",{reconnection:!0,reconnectionDelay:this.reconnectDelay,timeout:this.pingTimeout,autoConnect:!1,transports:["websocket"]});let e=this.socketManager.socket("/");e.on("connect",(()=>{this.onConnect()})),e.on("disconnect",(e=>{this.onDisconnect()})),e.io.on("error",(e=>{this.onError(e)})),e.on(o.Commands.ResponseCmd_MsgPack,(e=>{this.onResponseMsgPack(e)})),e.on(o.Commands.EventCmd_MsgPack,(e=>{this.onEventMsgPack(e)})),e.on(o.Commands.ResponseCmd_Json,(e=>{this.onResponseJson(e)})),e.on(o.Commands.EventCmd_Json,(e=>{this.onEventJson(e)})),this.socket=e}}onResponseMsgPack(...e){this.responsePacketLst.push(new s.SocketPacket(e[0],!0))}onEventMsgPack(...e){this.eventPacketLst.push(new s.SocketPacket(e[0],!0))}onResponseJson(...e){this.responsePacketLst.push(new s.SocketPacket(e[0],!1))}onEventJson(...e){this.eventPacketLst.push(new s.SocketPacket(e[0],!1))}onConnect(){n.GNDebug.log("[GN Socket RECV] HandleOpen "+this.socket.id),this.clientId=this.socket.id,this.onConnectHandler()}onDisconnect(){n.GNDebug.log("[GN Socket RECV] HandleClose "),this.clientId="",this.onDisconnectHandler()}onError(e){n.GNDebug.logError(e)}init(e,t,r,o){super.init(e,t,r,o)}emit(e){if(null==this.socketManager)return;let t=this.socketManager.socket("/");if(null==t)return;let r=a.OperationHelper.toSocketData(e);e.isEncrypted()?t.emit(o.Commands.RequestCmd_MsgPack,globalThis.exports.encode(r)):t.emit(o.Commands.RequestCmd_Json,r)}close(e){super.close(e),this.isConnected=!1,null==this.socketManager||"closed"==this.socketManager._readyState?(null!=this.socket&&this.socket.disconnect(),n.GNDebug.log("[GN Socket] Disconnecting via SocketIO client"),this.onDisconnectHandler()):this.socketManager._close()}connect(e){super.connect(e),this.isConnected?n.GNDebug.log("[GN Socket] Reconnecting"):(this.isConnected=!0,n.GNDebug.log("[GN Socket] Connecting via SocketIO client"),null!=this.socketManager&&this.socketManager.open(),null!=this.socket&&this.socket.connect())}}t.NetworkingPeerSocket=NetworkingPeerSocket},6816:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.OperationPending=void 0;const o=r(2088);t.OperationPending=class OperationPending{constructor(e,t){this.operationRequest=e,this.onOperationResponse=t,this.timeout=Date.now()/1e3+o.OperationRequest.DefaultTimeOut,this.firstSend=0,this.secondsSend=0}onSend(){this.firstSend=Date.now()/1e3,this.timeout=this.firstSend+this.operationRequest.getTimeout()}onRecv(){this.secondsSend=Date.now()/1e3}getExecuteTimerInMs(){return this.secondsSend-this.firstSend}isTimeout(){return this.timeout<Date.now()/1e3}getOperationRequest(){return this.operationRequest}getCallback(){return this.onOperationResponse}}},647:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PeerBase=void 0;const o=r(6381),n=r(1822),s=r(5985),i=r(2574),a=r(1619),p=r(6081),l=r(6816);class PeerBase{constructor(){this.perMsgTimer=0,this.nextSendMsgTimer=0,this.checkTimeoutOperationPending=0}getSendRate(){return 1e3/this.perMsgTimer}setSendRate(e){this.perMsgTimer=1e3/e/1e3}initPeer(){null==this.operationPendingQueue&&(this.operationPendingQueue=[]),null==this.operationWaitingResponseDic&&(this.operationWaitingResponseDic={}),null==this.pingLst&&(this.pingLst=[]),this.initSendRate(),this.initGNSocketObject()}initSendRate(){let e=a.GNNetwork.getGNServerSettings();if(null==e)throw new Error("Null GN Server Settings, please find it now");this.setSendRate(e.getSendRate())}enqueue(e,t){if(!this.isUsing)return void p.GNDebug.logError("[GN] Server Settings dont setup to use this to send operation request.");let r=new l.OperationPending(e,t);this.operationPendingQueue.push(r)}isUsing(){return this.isUse}service(){if(!this.isUsing)return;let e=Date.now()/1e3;if(this.checkTimeoutOperationPending<e){this.checkTimeoutOperationPending=e+.1;let t=Object.keys(this.operationWaitingResponseDic);if(0!=t.length){let e=[];t.forEach((t=>{let r=this.operationWaitingResponseDic[t];if(r.isTimeout()){let t=new o.GNArray;t.add(s.ReturnCode.OperationTimeout),t.add(null),t.add(r.getOperationRequest().getRequestId()),t.add(r.getOperationRequest().isEncrypted()),e.push(t)}})),0!=e.length&&e.forEach((e=>{this.onResponseHandler(e,e.getBoolean(3))}))}}if(this.nextSendMsgTimer<e&&0!=this.operationPendingQueue.length){this.nextSendMsgTimer=e+this.perMsgTimer;let t=this.operationPendingQueue.shift();this.send(t)}}onResponseHandler(e,t){var r;let o=e.getNumber(2);if(null!=this.operationWaitingResponseDic[o]){let l=this.operationWaitingResponseDic[o];l.onRecv(),delete this.operationWaitingResponseDic[o];let d=e.getNumber(0),u=null,c=null,g=null;d==s.ReturnCode.Ok?u=e.getGNHashtable(1):d==s.ReturnCode.InvalidRequestParameters?g=e.getGNArray(1):d==s.ReturnCode.OperationNotAuthorized?a.GNNetwork.getAuthToken()&&(a.GNNetwork.setAuthToken(""),a.GNNetwork.setUserId("")):c=e.getString(1);let h=l.getOperationRequest(),m=new i.OperationResponse(h.getOperationCode(),h.getRequestId(),t);if(m.setReturnCode(d),m.setDebugMessage(c),m.setParameters(u),null!=g){let e=[];for(let t=0;t<g.count();t++){let r=g.getGNArray(t);e.push({code:r.getNumber(0),invalidMemberType:r.getNumber(1)})}m.setInvalidMembers(e)}if(!m.hasError()&&(this.addPing(l.getExecuteTimerInMs()),null!=u)){if(u.containsKey(n.ParameterCode.AuthToken)){let e=u.getString(n.ParameterCode.AuthToken);a.GNNetwork.setAuthToken(e)}if(u.containsKey(n.ParameterCode.UserId)){let e=u.getString(n.ParameterCode.UserId);a.GNNetwork.setUserId(e)}u.containsKey(n.ParameterCode.Ts)&&a.GNNetwork.peer.setServerTimeMilliseconds(u.getNumber(n.ParameterCode.Ts,(new Date).getUTCMilliseconds()))}p.GNDebug.log("[GN RECV] "+m.toString()),null===(r=l.getCallback())||void 0===r||r.invoke(m)}else p.GNDebug.logError("[GN] OnResponseHandler, un available request id "+e)}send(e){e.onSend();let t=e.getOperationRequest();-1!=t.getRequestId()&&(t.setRequestId(PeerBase.requestId++),null!=e.getCallback()&&(this.operationWaitingResponseDic[t.getRequestId()]=e))}addPing(e){if(this.pingLst.length>10&&this.pingLst.shift(),this.pingLst.push(e/2),0!=this.pingLst.length){let e=0;for(let t=0;t<this.pingLst.length;t++)e+=this.pingLst[t];let t=e/this.pingLst.length;this.ping=1e3*t}else this.ping=-1}}t.PeerBase=PeerBase,PeerBase.requestId=0},4592:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SocketPeer=void 0;const o=r(6381),n=r(5985),s=r(7578),i=r(1619),a=r(6081),p=r(8581),l=r(6933),d=r(647);class SocketPeer extends d.PeerBase{getClientId(){return this.networkingPeerBase.clientId}isConnected(){return this.networkingPeerBase.isWsConnected}sendRequestAuthSocket(){this.networkingPeerBase.sendRequestAuthSocket()}subscriberServerEventHandler(){this.serverEventHandlerDic={};let e=p.IServerEventHandler.getImplementations();for(let t=0;t<e.length;t++){let r=new e[t];null!=r&&(this.serverEventHandlerDic[r.getEventCode()]=r)}}subscriberAServerEventHandler(e){this.serverEventHandlerDic[e.getEventCode()]=e}initGNSocketObject(){let e=i.GNNetwork.getGNServerSettings();if(null==e)throw new Error("Where is GN Server Settings");this.isUse=e.isUseSocket(),this.networkingPeerBase=new l.NetworkingPeerSocket,this.networkingPeerBase.init(e.getSocketUrl(),e.getReconnectDelay(),e.getPingInterval(),e.getPingTimeout()),this.networkingPeerBase.reInitNewSocket(),this.networkingPeerBase.setOnEventHandler({invoke:(e,t)=>{this.onEventHandler(e,t)}}),this.networkingPeerBase.setOnResponseHandler({invoke:(e,t)=>{this.onResponseHandler(e,t)}}),this.subscriberServerEventHandler()}setOnConnectHandler(e){this.networkingPeerBase.setOnConnectHandler(e)}setOnDisconnectHandler(e){this.networkingPeerBase.setOnDisconnectHandler(e)}removeOnConnectHandler(e){this.networkingPeerBase.removeOnConnectHandler(e)}removeOnDisconnectHandler(e){this.networkingPeerBase.removeOnDisconnectHandler(e)}connect(e){this.networkingPeerBase.connect(e)}disconnect(e){this.networkingPeerBase.close(e)}send(e){super.send(e),a.GNDebug.log("[GN Socket SEND] "+e.getOperationRequest().toString());let t=e.getOperationRequest();if(!i.GNNetwork.getAuthToken()&&-1==i.GNNetwork.getGNServerSettings().getCodeCanSendNotAuthorized().indexOf(t.getOperationCode())){let e=new o.GNArray;return e.add(n.ReturnCode.OperationNotAuthorized),e.add(null),e.add(t.getRequestId()),void this.onResponseHandler(e,t.isEncrypted())}this.networkingPeerBase.send(e.getOperationRequest())}onEventHandler(e,t){let r=e.getNumber(0);if(null==this.serverEventHandlerDic[r])return;let o=new s.OperationEvent(r,e.getGNHashtable(1));o.setEncrypted(t),a.GNDebug.log("[GN Socket EVENT] "+o.toString()),this.serverEventHandlerDic[r].handle(o)}service(){super.service(),this.networkingPeerBase.service()}}t.SocketPeer=SocketPeer},8581:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.IServerEventHandler=void 0,function(e){const t=[];e.getImplementations=function getImplementations(){return t},e.registerEvent=function registerEvent(e){return t.push(e),e}}(t.IServerEventHandler||(t.IServerEventHandler={}))},2402:function(e,t,r){var o=this&&this.__decorate||function(e,t,r,o){var n,s=arguments.length,i=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(i=(s<3?n(i):s>3?n(t,r,i):n(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i};Object.defineProperty(t,"__esModule",{value:!0}),t.OnDebugEventHander=void 0;const n=r(384),s=r(8581);let i=class OnDebugEventHander{getEventCode(){return n.EventCode.OnDebug}handle(e){console.log(e.toString())}};i=o([s.IServerEventHandler.registerEvent],i),t.OnDebugEventHander=i},2692:e=>{e.exports=require("@msgpack/msgpack")},2167:e=>{e.exports=require("axios")},4347:e=>{e.exports=require("crypto")},1335:e=>{e.exports=require("node-localstorage")},8087:e=>{e.exports=require("socket.io-client")}},t={};function __webpack_require__(r){var o=t[r];if(void 0!==o)return o.exports;var n=t[r]={exports:{}};return e[r].call(n.exports,n,n.exports,__webpack_require__),n.exports}var r={};(()=>{var e=r;Object.defineProperty(e,"__esModule",{value:!0}),e.UserIdLoginOperationRequest=e.PublicAddressLoginOperationRequest=e.PublicAddressGetRandomMessageOperationRequest=e.GoogleLoginOperationRequest=e.FacebookLoginOperationRequest=e.DeviceLoginOperationRequest=e.CustomIdLoginOperationRequest=e.AppleLoginOperationRequest=e.AccountLoginOperationRequest=e.LoginOperationRequest=e.GetFileUploadInfoOperationRequest=e.GetAppConfigOperationRequest=e.FetchSparkPlayerOperationRequest=e.FetchAllDataOperationRequest=e.EnterDisplayNameOperationRequest=e.DebugOperationRequest=e.CustomOperationRequest=e.CreateNewFileUploadInfoOperationRequest=e.ReturnCode=e.OperationCode=e.EventCode=e.Commands=e.RegisterSocketParameterCode=e.ParameterCode=e.LoginParameterCode=e.GetAppConfigParameterCode=e.FileUploadInfoParameterCode=e.FetchSparkPlayerParameterCode=e.FetchAllDataParameterCode=e.EnterDisplayNameParameterCode=e.DebugParameterCode=e.RegisterSocketErrorCode=e.LoginErrorCode=e.GetAppConfigErrorCode=e.FileUploadInfoErrorCode=e.FetchSparkPlayerErrorCode=e.FetchAllDataErrorCode=e.EnterDisplayNameErrorCode=e.DebugErrorCode=e.UserRoleType=e.PlatformType=e.LoginType=e.InvalidMemberType=e.GoogleLoginType=e.FriendStatus=e.GNServerSettings=e.GNArray=e.GNArrayBuilder=e.GNHashtable=e.GNHashtableBuilder=void 0,e.CodeHelper=e.GNSupport=e.GNNetwork=e.SocketPeer=e.PeerBase=e.OperationPending=e.NetworkingPeerSocket=e.SocketPacket=e.NetworkingPeerBase=e.NetworkingPeer=e.PostType=e.HttpAppResponse=e.HttpPeer=e.OnDebugEventHander=e.IServerEventHandler=e.LogType=e.GNDebug=e.OperationResponse=e.OperationRequest=e.OperationHelper=e.OperationEvent=e.InvalidMember=e.TemplateOperationResponse=e.RegisterSocketOperationResponse=e.RegisterAccountOperationResponse=e.PublicAddressGetRandomMessageOperationResponse=e.LogoutOperationResponse=e.LoginOperationResponse=e.GetFileUploadInfoOperationResponse=e.GetAppConfigOperationResponse=e.FetchSparkPlayerOperationResponse=e.FetchAllDataOperationResponse=e.EnterDisplayNameOperationResponse=e.DebugOperationResponse=e.CustomOperationResponse=e.CreateNewFileUploadInfoOperationResponse=e.TemplateOperationRequest=e.RegisterSocketOperationRequest=e.RegisterAccountOperationRequest=e.LogoutOperationRequest=void 0;const t=__webpack_require__(6381);Object.defineProperty(e,"GNHashtableBuilder",{enumerable:!0,get:function(){return t.GNHashtableBuilder}}),Object.defineProperty(e,"GNHashtable",{enumerable:!0,get:function(){return t.GNHashtable}}),Object.defineProperty(e,"GNArrayBuilder",{enumerable:!0,get:function(){return t.GNArrayBuilder}}),Object.defineProperty(e,"GNArray",{enumerable:!0,get:function(){return t.GNArray}});const o=__webpack_require__(4951);Object.defineProperty(e,"GNServerSettings",{enumerable:!0,get:function(){return o.GNServerSettings}});const n=__webpack_require__(6345);Object.defineProperty(e,"FriendStatus",{enumerable:!0,get:function(){return n.FriendStatus}});const s=__webpack_require__(2558);Object.defineProperty(e,"GoogleLoginType",{enumerable:!0,get:function(){return s.GoogleLoginType}});const i=__webpack_require__(635);Object.defineProperty(e,"InvalidMemberType",{enumerable:!0,get:function(){return i.InvalidMemberType}});const a=__webpack_require__(8466);Object.defineProperty(e,"LoginType",{enumerable:!0,get:function(){return a.LoginType}});const p=__webpack_require__(6392);Object.defineProperty(e,"PlatformType",{enumerable:!0,get:function(){return p.PlatformType}});const l=__webpack_require__(4919);Object.defineProperty(e,"UserRoleType",{enumerable:!0,get:function(){return l.UserRoleType}});const d=__webpack_require__(7043);Object.defineProperty(e,"DebugErrorCode",{enumerable:!0,get:function(){return d.DebugErrorCode}});const u=__webpack_require__(9084);Object.defineProperty(e,"EnterDisplayNameErrorCode",{enumerable:!0,get:function(){return u.EnterDisplayNameErrorCode}});const c=__webpack_require__(9212);Object.defineProperty(e,"FetchAllDataErrorCode",{enumerable:!0,get:function(){return c.FetchAllDataErrorCode}});const g=__webpack_require__(4102);Object.defineProperty(e,"FetchSparkPlayerErrorCode",{enumerable:!0,get:function(){return g.FetchSparkPlayerErrorCode}});const h=__webpack_require__(8620);Object.defineProperty(e,"FileUploadInfoErrorCode",{enumerable:!0,get:function(){return h.FileUploadInfoErrorCode}});const m=__webpack_require__(9818);Object.defineProperty(e,"GetAppConfigErrorCode",{enumerable:!0,get:function(){return m.GetAppConfigErrorCode}});const O=__webpack_require__(7425);Object.defineProperty(e,"LoginErrorCode",{enumerable:!0,get:function(){return O.LoginErrorCode}});const b=__webpack_require__(2432);Object.defineProperty(e,"RegisterSocketErrorCode",{enumerable:!0,get:function(){return b.RegisterSocketErrorCode}});const C=__webpack_require__(901);Object.defineProperty(e,"DebugParameterCode",{enumerable:!0,get:function(){return C.DebugParameterCode}});const P=__webpack_require__(2423);Object.defineProperty(e,"EnterDisplayNameParameterCode",{enumerable:!0,get:function(){return P.EnterDisplayNameParameterCode}});const R=__webpack_require__(1594);Object.defineProperty(e,"FetchAllDataParameterCode",{enumerable:!0,get:function(){return R.FetchAllDataParameterCode}});const _=__webpack_require__(3009);Object.defineProperty(e,"FetchSparkPlayerParameterCode",{enumerable:!0,get:function(){return _.FetchSparkPlayerParameterCode}});const f=__webpack_require__(8823);Object.defineProperty(e,"FileUploadInfoParameterCode",{enumerable:!0,get:function(){return f.FileUploadInfoParameterCode}});const k=__webpack_require__(3074);Object.defineProperty(e,"GetAppConfigParameterCode",{enumerable:!0,get:function(){return k.GetAppConfigParameterCode}});const y=__webpack_require__(4688);Object.defineProperty(e,"LoginParameterCode",{enumerable:!0,get:function(){return y.LoginParameterCode}});const N=__webpack_require__(1822);Object.defineProperty(e,"ParameterCode",{enumerable:!0,get:function(){return N.ParameterCode}});const v=__webpack_require__(479);Object.defineProperty(e,"RegisterSocketParameterCode",{enumerable:!0,get:function(){return v.RegisterSocketParameterCode}});const S=__webpack_require__(2509);Object.defineProperty(e,"Commands",{enumerable:!0,get:function(){return S.Commands}});const D=__webpack_require__(384);Object.defineProperty(e,"EventCode",{enumerable:!0,get:function(){return D.EventCode}});const q=__webpack_require__(9423);Object.defineProperty(e,"OperationCode",{enumerable:!0,get:function(){return q.OperationCode}});const E=__webpack_require__(5985);Object.defineProperty(e,"ReturnCode",{enumerable:!0,get:function(){return E.ReturnCode}});const A=__webpack_require__(1655);Object.defineProperty(e,"CreateNewFileUploadInfoOperationRequest",{enumerable:!0,get:function(){return A.CreateNewFileUploadInfoOperationRequest}});const G=__webpack_require__(3913);Object.defineProperty(e,"CustomOperationRequest",{enumerable:!0,get:function(){return G.CustomOperationRequest}});const w=__webpack_require__(8275);Object.defineProperty(e,"DebugOperationRequest",{enumerable:!0,get:function(){return w.DebugOperationRequest}});const T=__webpack_require__(2135);Object.defineProperty(e,"EnterDisplayNameOperationRequest",{enumerable:!0,get:function(){return T.EnterDisplayNameOperationRequest}});const L=__webpack_require__(1477);Object.defineProperty(e,"FetchAllDataOperationRequest",{enumerable:!0,get:function(){return L.FetchAllDataOperationRequest}});const I=__webpack_require__(5347);Object.defineProperty(e,"FetchSparkPlayerOperationRequest",{enumerable:!0,get:function(){return I.FetchSparkPlayerOperationRequest}});const F=__webpack_require__(7067);Object.defineProperty(e,"GetAppConfigOperationRequest",{enumerable:!0,get:function(){return F.GetAppConfigOperationRequest}});const H=__webpack_require__(5257);Object.defineProperty(e,"GetFileUploadInfoOperationRequest",{enumerable:!0,get:function(){return H.GetFileUploadInfoOperationRequest}});const U=__webpack_require__(842);Object.defineProperty(e,"LoginOperationRequest",{enumerable:!0,get:function(){return U.LoginOperationRequest}}),Object.defineProperty(e,"AccountLoginOperationRequest",{enumerable:!0,get:function(){return U.AccountLoginOperationRequest}}),Object.defineProperty(e,"AppleLoginOperationRequest",{enumerable:!0,get:function(){return U.AppleLoginOperationRequest}}),Object.defineProperty(e,"CustomIdLoginOperationRequest",{enumerable:!0,get:function(){return U.CustomIdLoginOperationRequest}}),Object.defineProperty(e,"DeviceLoginOperationRequest",{enumerable:!0,get:function(){return U.DeviceLoginOperationRequest}}),Object.defineProperty(e,"FacebookLoginOperationRequest",{enumerable:!0,get:function(){return U.FacebookLoginOperationRequest}}),Object.defineProperty(e,"GoogleLoginOperationRequest",{enumerable:!0,get:function(){return U.GoogleLoginOperationRequest}}),Object.defineProperty(e,"PublicAddressGetRandomMessageOperationRequest",{enumerable:!0,get:function(){return U.PublicAddressGetRandomMessageOperationRequest}}),Object.defineProperty(e,"PublicAddressLoginOperationRequest",{enumerable:!0,get:function(){return U.PublicAddressLoginOperationRequest}}),Object.defineProperty(e,"UserIdLoginOperationRequest",{enumerable:!0,get:function(){return U.UserIdLoginOperationRequest}});const M=__webpack_require__(759);Object.defineProperty(e,"LogoutOperationRequest",{enumerable:!0,get:function(){return M.LogoutOperationRequest}});const j=__webpack_require__(4516);Object.defineProperty(e,"RegisterAccountOperationRequest",{enumerable:!0,get:function(){return j.RegisterAccountOperationRequest}});const x=__webpack_require__(7239);Object.defineProperty(e,"RegisterSocketOperationRequest",{enumerable:!0,get:function(){return x.RegisterSocketOperationRequest}});const B=__webpack_require__(9010);Object.defineProperty(e,"TemplateOperationRequest",{enumerable:!0,get:function(){return B.TemplateOperationRequest}});const V=__webpack_require__(1099);Object.defineProperty(e,"CreateNewFileUploadInfoOperationResponse",{enumerable:!0,get:function(){return V.CreateNewFileUploadInfoOperationResponse}});const J=__webpack_require__(2584);Object.defineProperty(e,"CustomOperationResponse",{enumerable:!0,get:function(){return J.CustomOperationResponse}});const W=__webpack_require__(9248);Object.defineProperty(e,"DebugOperationResponse",{enumerable:!0,get:function(){return W.DebugOperationResponse}});const K=__webpack_require__(1165);Object.defineProperty(e,"EnterDisplayNameOperationResponse",{enumerable:!0,get:function(){return K.EnterDisplayNameOperationResponse}});const z=__webpack_require__(7162);Object.defineProperty(e,"FetchAllDataOperationResponse",{enumerable:!0,get:function(){return z.FetchAllDataOperationResponse}});const Y=__webpack_require__(8023);Object.defineProperty(e,"FetchSparkPlayerOperationResponse",{enumerable:!0,get:function(){return Y.FetchSparkPlayerOperationResponse}});const Q=__webpack_require__(2443);Object.defineProperty(e,"GetAppConfigOperationResponse",{enumerable:!0,get:function(){return Q.GetAppConfigOperationResponse}});const X=__webpack_require__(6262);Object.defineProperty(e,"GetFileUploadInfoOperationResponse",{enumerable:!0,get:function(){return X.GetFileUploadInfoOperationResponse}});const Z=__webpack_require__(8178);Object.defineProperty(e,"LoginOperationResponse",{enumerable:!0,get:function(){return Z.LoginOperationResponse}});const $=__webpack_require__(7224);Object.defineProperty(e,"LogoutOperationResponse",{enumerable:!0,get:function(){return $.LogoutOperationResponse}});const ee=__webpack_require__(1635);Object.defineProperty(e,"PublicAddressGetRandomMessageOperationResponse",{enumerable:!0,get:function(){return ee.PublicAddressGetRandomMessageOperationResponse}});const te=__webpack_require__(4962);Object.defineProperty(e,"RegisterAccountOperationResponse",{enumerable:!0,get:function(){return te.RegisterAccountOperationResponse}});const re=__webpack_require__(8301);Object.defineProperty(e,"RegisterSocketOperationResponse",{enumerable:!0,get:function(){return re.RegisterSocketOperationResponse}});const oe=__webpack_require__(2976);Object.defineProperty(e,"TemplateOperationResponse",{enumerable:!0,get:function(){return oe.TemplateOperationResponse}});const ne=__webpack_require__(3552);Object.defineProperty(e,"InvalidMember",{enumerable:!0,get:function(){return ne.InvalidMember}});const se=__webpack_require__(7578);Object.defineProperty(e,"OperationEvent",{enumerable:!0,get:function(){return se.OperationEvent}});const ie=__webpack_require__(8264);Object.defineProperty(e,"OperationHelper",{enumerable:!0,get:function(){return ie.OperationHelper}});const ae=__webpack_require__(2088);Object.defineProperty(e,"OperationRequest",{enumerable:!0,get:function(){return ae.OperationRequest}});const pe=__webpack_require__(2574);Object.defineProperty(e,"OperationResponse",{enumerable:!0,get:function(){return pe.OperationResponse}});const le=__webpack_require__(6081);Object.defineProperty(e,"GNDebug",{enumerable:!0,get:function(){return le.GNDebug}}),Object.defineProperty(e,"LogType",{enumerable:!0,get:function(){return le.LogType}});const de=__webpack_require__(8581);Object.defineProperty(e,"IServerEventHandler",{enumerable:!0,get:function(){return de.IServerEventHandler}});const ue=__webpack_require__(2402);Object.defineProperty(e,"OnDebugEventHander",{enumerable:!0,get:function(){return ue.OnDebugEventHander}});const ce=__webpack_require__(6575);Object.defineProperty(e,"HttpPeer",{enumerable:!0,get:function(){return ce.HttpPeer}}),Object.defineProperty(e,"HttpAppResponse",{enumerable:!0,get:function(){return ce.HttpAppResponse}}),Object.defineProperty(e,"PostType",{enumerable:!0,get:function(){return ce.PostType}});const ge=__webpack_require__(4178);Object.defineProperty(e,"NetworkingPeer",{enumerable:!0,get:function(){return ge.NetworkingPeer}});const he=__webpack_require__(7437);Object.defineProperty(e,"NetworkingPeerBase",{enumerable:!0,get:function(){return he.NetworkingPeerBase}}),Object.defineProperty(e,"SocketPacket",{enumerable:!0,get:function(){return he.SocketPacket}});const me=__webpack_require__(6933);Object.defineProperty(e,"NetworkingPeerSocket",{enumerable:!0,get:function(){return me.NetworkingPeerSocket}});const Oe=__webpack_require__(6816);Object.defineProperty(e,"OperationPending",{enumerable:!0,get:function(){return Oe.OperationPending}});const be=__webpack_require__(647);Object.defineProperty(e,"PeerBase",{enumerable:!0,get:function(){return be.PeerBase}});const Ce=__webpack_require__(4592);Object.defineProperty(e,"SocketPeer",{enumerable:!0,get:function(){return Ce.SocketPeer}});const Pe=__webpack_require__(1619);Object.defineProperty(e,"GNNetwork",{enumerable:!0,get:function(){return Pe.GNNetwork}});const Re=__webpack_require__(7315);Object.defineProperty(e,"GNSupport",{enumerable:!0,get:function(){return Re.GNSupport}});const _e=__webpack_require__(7474);Object.defineProperty(e,"CodeHelper",{enumerable:!0,get:function(){return _e.CodeHelper}})})();var o=exports;for(var n in r)o[n]=r[n];r.__esModule&&Object.defineProperty(o,"__esModule",{value:!0})})();
|
|
@@ -40,7 +40,6 @@ export declare class GNNetwork {
|
|
|
40
40
|
static getDeviceId(): string;
|
|
41
41
|
static getDeviceInfo(): string;
|
|
42
42
|
static init(gnServerSettings: GNServerSettings): void;
|
|
43
|
-
static run(): void;
|
|
44
43
|
static getClientSdkVersion(): string;
|
|
45
44
|
private static initServerSettings;
|
|
46
45
|
private static initGNDebug;
|