{
  "code": "import GameConfig from \"./GameConfig\";\r\nimport { LoadView } from \"./View/LoadView\";\r\nimport { CheckMain } from \"./Main/CheckMain\";\r\nimport { WXSDK } from \"./Net/WXSDK\";\r\nexport class Main {\r\n    constructor() {\r\n        if (CheckMain.Creat)\r\n            return;\r\n        CheckMain.Creat = true;\r\n        if (window[\"Laya3D\"])\r\n            Laya3D.init(GameConfig.width, GameConfig.height);\r\n        else\r\n            Laya.init(GameConfig.width, GameConfig.height, Laya[\"WebGL\"]);\r\n        Laya[\"Physics\"] && Laya[\"Physics\"].enable();\r\n        Laya[\"DebugPanel\"] && Laya[\"DebugPanel\"].enable();\r\n        Laya.stage.scaleMode = GameConfig.scaleMode;\r\n        Laya.stage.screenMode = GameConfig.screenMode;\r\n        Laya.stage.alignV = GameConfig.alignV;\r\n        Laya.stage.alignH = GameConfig.alignH;\r\n        Laya.URL.exportSceneToJson = GameConfig.exportSceneToJson;\r\n        if (GameConfig.debug || Laya.Utils.getQueryString(\"debug\") == \"true\")\r\n            Laya.enableDebugPanel();\r\n        if (GameConfig.physicsDebug && Laya[\"PhysicsDebugDraw\"])\r\n            Laya[\"PhysicsDebugDraw\"].enable();\r\n        if (GameConfig.stat)\r\n            Laya.Stat.show();\r\n        Laya.alertGlobalError = true;\r\n        if (Laya.Browser.onWeiXin) {\r\n            Laya.Browser.window.wx.showShareMenu({\r\n                withShareTicket: true\r\n            });\r\n            Laya.Browser.window.wx.onShareAppMessage(function () {\r\n                return {\r\n                    title: \"试一下你的脑力能到第几关\",\r\n                    imageUrl: \"Game/res/Share/fx.png\",\r\n                };\r\n            });\r\n            Laya.Browser.window.wx.onShow((option) => {\r\n                var shareTicket = option.shareTicket;\r\n                var userId = option.query.userId;\r\n                var shareTitle = option.query.shareTitle;\r\n                Main.SceneNum = option.scene;\r\n                WXSDK.querychannel = option.query.channel;\r\n                WXSDK.shareOpenId = option.query.userId;\r\n                console.log(\"option---\", option);\r\n                console.log(\"scene:\", option.scene);\r\n                if (WXSDK.querychannel != null) {\r\n                    console.log(\"onShow channel is:\", WXSDK.querychannel);\r\n                }\r\n                if (option.referrerInfo) {\r\n                    WXSDK.referrerInfoappId = option.referrerInfo.appId;\r\n                    console.log(\"onShow appId is:\", option.referrerInfo.appId);\r\n                }\r\n            });\r\n            const updateManager = Laya.Browser.window.wx.getUpdateManager();\r\n            updateManager.onCheckForUpdate(function (res) {\r\n                console.log(\"最新版本:\" + res.hasUpdate);\r\n            });\r\n            updateManager.onUpdateReady(function () {\r\n                Laya.Browser.window.wx.showModal({\r\n                    showCancel: false,\r\n                    title: '更新提示',\r\n                    content: '新版本已经准备好，是否重启应用？',\r\n                    success(res) {\r\n                        updateManager.applyUpdate();\r\n                    },\r\n                    fail(res) {\r\n                        updateManager.applyUpdate();\r\n                    }\r\n                });\r\n            });\r\n        }\r\n        Laya.ResourceVersion.enable(\"version.json\", Laya.Handler.create(this, this.onVersionLoaded), Laya.ResourceVersion.FILENAME_VERSION);\r\n    }\r\n    onVersionLoaded() {\r\n        Laya.AtlasInfoManager.enable(\"fileconfig.json\", Laya.Handler.create(this, this.onConfigLoaded));\r\n    }\r\n    onConfigLoaded() {\r\n        new LoadView();\r\n    }\r\n}\r\nMain.Ver = \"1.0.0\";\r\nMain.CFG = \"123\";\r\nMain.SceneNum = \"000\";\r\nnew Main();\r\n//# sourceMappingURL=Main.js.map",
  "references": [
    "E:/LayaProject/2048_laya/src/GameConfig.ts",
    "E:/LayaProject/2048_laya/src/View/LoadView.ts",
    "E:/LayaProject/2048_laya/src/Main/CheckMain.ts",
    "E:/LayaProject/2048_laya/src/Net/WXSDK.ts"
  ],
  "map": "{\"version\":3,\"file\":\"Main.js\",\"sourceRoot\":\"\",\"sources\":[\"../../src/Main.ts\"],\"names\":[],\"mappings\":\"AAAA,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC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