Last active
February 21, 2024 08:34
-
-
Save crapthings/e6944153ea1fd2a1c9c02147a30dcb97 to your computer and use it in GitHub Desktop.
web-adapter.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ! function i(a, o, r) { | |
| function c(t, e) { | |
| if (!o[t]) { | |
| if (!a[t]) { | |
| var n = "function" == typeof require && require; | |
| if (!e && n) return n(t, !0); | |
| if (s) return s(t, !0); | |
| throw (e = new Error("Cannot find module '" + t + "'")).code = "MODULE_NOT_FOUND", e | |
| } | |
| n = o[t] = { | |
| exports: {} | |
| }, a[t][0].call(n.exports, function(e) { | |
| return c(a[t][1][e] || e) | |
| }, n, n.exports, i, a, o, r) | |
| } | |
| return o[t].exports | |
| } | |
| for (var s = "function" == typeof require && require, e = 0; e < r.length; e++) c(r[e]); | |
| return c | |
| }({ | |
| 1: [function(s, R, B) { | |
| "use strict"; | |
| var l = s("./cache-manager"), | |
| e = window.fsUtils, | |
| u = e.fs, | |
| d = e.downloadFile, | |
| a = e.readText, | |
| o = e.readArrayBuffer, | |
| i = e.readJson, | |
| f = e.loadSubpackage, | |
| h = e.getUserDataPath, | |
| r = e.exists, | |
| p = /^https?:\/\/.*/, | |
| m = cc.assetManager.downloader, | |
| e = cc.assetManager.parser, | |
| t = cc.assetManager.presets, | |
| g = (m.maxConcurrency = 12, m.maxRequestsPerFrame = 64, t.scene.maxConcurrency = 12, t.scene.maxRequestsPerFrame = 64, {}), | |
| _ = cc.sys; | |
| function n(e, t, n) { | |
| p.test(e) ? n && n(new Error("Can not load remote scripts")) : (_.platform !== _.Platform.TAOBAO_CREATIVE_APP && s("../../../".concat(e)), n && n(null)) | |
| } | |
| function c(t, e, n) { | |
| cc.AudioPlayer.load(t).then(function(e) { | |
| e = { | |
| player: e, | |
| url: t, | |
| duration: e.duration, | |
| type: e.type | |
| }; | |
| n(null, e) | |
| }).catch(function(e) { | |
| n(e) | |
| }) | |
| } | |
| function y(i, t, a, e, o) { | |
| var n = function(e, t) { | |
| var n = !1, | |
| i = !1; | |
| !e.startsWith(h()) && p.test(e) ? t.reload || ((t = l.cachedFiles.get(e)) ? (i = !0, e = t.url) : (t = l.tempFiles.get(e)) && (n = !0, e = t)) : n = !0; | |
| return { | |
| url: e, | |
| inLocal: n, | |
| inCache: i | |
| } | |
| }(i, a); | |
| n.inLocal ? t(n.url, a, o) : n.inCache ? (l.updateLastTime(i), t(n.url, a, function(e, t) { | |
| e && l.removeCache(i), o(e, t) | |
| })) : d(i, null, a.header, e, function(e, n) { | |
| e ? o(e, null) : t(n, a, function(e, t) { | |
| e || (l.tempFiles.add(i, n), l.cacheFile(i, n, a.cacheEnabled, a.__cacheBundleRoot__, !0)), o(e, t) | |
| }) | |
| }) | |
| } | |
| function v(e, t, n) { | |
| o(e, n) | |
| } | |
| function b(e, t, n) { | |
| a(e, n) | |
| } | |
| function w(e, t, n) { | |
| i(e, n) | |
| } | |
| function E(e, t, n) { | |
| y(e, w, t, t.onFileProgress, n) | |
| } | |
| function P(e, t, n) { | |
| n(null, __globalAdapter.loadFont(e) || "Arial") | |
| } | |
| function F(t, e, n) { | |
| r(t, function(e) { | |
| e ? n(null, t) : n(new Error("file ".concat(t, " does not exist!"))) | |
| }) | |
| } | |
| function T(e, t, n) { | |
| y(e, F, t, t.onFileProgress, n) | |
| } | |
| _.platform === _.Platform.BAIDU_MINI_GAME && (s = __baiduRequire), _.platform === _.Platform.TAOBAO_MINI_GAME && (s = globalThis.__taobaoRequire); | |
| function x(e, n, i) { | |
| o(e, function(e, t) { | |
| if (e) return i(e); | |
| M(t, n, i) | |
| }) | |
| } | |
| function A(e, n, i) { | |
| o(e, function(e, t) { | |
| if (e) return i(e); | |
| k(t, n, i) | |
| }) | |
| } | |
| function C(e, n, i) { | |
| o(e, function(e, t) { | |
| if (e) return i(e); | |
| O(t, n, i) | |
| }) | |
| } | |
| function S(e, n, i) { | |
| a(e, function(e, t) { | |
| if (e) return i(e); | |
| I(t, n, i) | |
| }) | |
| } | |
| var M = e.parsePVRTex, | |
| k = e.parsePKMTex, | |
| O = e.parseASTCTex, | |
| I = e.parsePlist; | |
| m.downloadScript = n, m._downloadArrayBuffer = function(e, t, n) { | |
| y(e, v, t, t.onFileProgress, n) | |
| }, m._downloadJson = E, e.parsePVRTex = x, e.parsePKMTex = A, e.parseASTCTex = C, e.parsePlist = S, m.register({ | |
| ".js": n, | |
| ".mp3": T, | |
| ".ogg": T, | |
| ".wav": T, | |
| ".m4a": T, | |
| ".png": T, | |
| ".jpg": T, | |
| ".bmp": T, | |
| ".jpeg": T, | |
| ".gif": T, | |
| ".ico": T, | |
| ".tiff": T, | |
| ".image": T, | |
| ".webp": T, | |
| ".pvr": T, | |
| ".pkm": T, | |
| ".astc": T, | |
| ".font": T, | |
| ".eot": T, | |
| ".ttf": T, | |
| ".woff": T, | |
| ".svg": T, | |
| ".ttc": T, | |
| ".txt": T, | |
| ".xml": T, | |
| ".vsh": T, | |
| ".fsh": T, | |
| ".atlas": T, | |
| ".tmx": T, | |
| ".tsx": T, | |
| ".plist": T, | |
| ".fnt": T, | |
| ".json": E, | |
| ".ExportJson": T, | |
| ".binary": T, | |
| ".bin": T, | |
| ".dbbin": T, | |
| ".skel": T, | |
| ".mp4": T, | |
| ".avi": T, | |
| ".mov": T, | |
| ".mpg": T, | |
| ".mpeg": T, | |
| ".rm": T, | |
| ".rmvb": T, | |
| bundle: function(e, t, r) { | |
| var n, i, c, a = cc.path.basename(e), | |
| o = (o = t.version || cc.assetManager.downloader.bundleVers[a]) ? "".concat(o, ".") : ""; | |
| g[a] ? (n = (_.platform === _.Platform.TAOBAO_MINI_GAME ? "" : "subpackages/").concat(a, "/config.").concat(o, "json"), f(a, t.onFileProgress, function(e) { | |
| e ? r(e, null) : E(n, t, function(e, t) { | |
| var n; | |
| (n = t) && (_.platform === _.Platform.TAOBAO_MINI_GAME ? n.base = "".concat(a, "/") : n.base = "subpackages/".concat(a, "/")), r(e, t) | |
| }) | |
| })) : (p.test(e) || e.startsWith(h()) ? (c = e, i = "src/bundle-scripts/".concat(a, "/index.").concat(o, "js"), l.makeBundleFolder(a)) : -1 !== m.remoteBundles.indexOf(a) ? (c = "".concat(m.remoteServerAddress, "remote/").concat(a), i = "src/bundle-scripts/".concat(a, "/index.").concat(o, "js"), l.makeBundleFolder(a)) : (c = "assets/".concat(a), i = "assets/".concat(a, "/index.").concat(o, "js")), _.platform === _.Platform.TAOBAO_MINI_GAME ? s(i) : _.platform !== _.Platform.TAOBAO_CREATIVE_APP && s("./".concat(i)), t.__cacheBundleRoot__ = a, E("".concat(c, "/config.").concat(o, "json"), t, function(e, n) { | |
| var i, a, o; | |
| e ? r && r(e) : n.isZip ? (e = n.zipVersion, e = "".concat(c, "/res.").concat(e ? "".concat(e, ".") : "", "zip"), i = e, a = t, o = function(e, t) { | |
| e ? r && r(e) : (n.base = "".concat(t, "/res/"), _.platform === _.Platform.ALIPAY_MINI_GAME && _.os === _.OS.ANDROID && (e = "".concat(t, "res/"), u.accessSync({ | |
| path: e | |
| }).success) && (n.base = e), r && r(null, n)) | |
| }, (e = l.cachedFiles.get(i)) ? (l.updateLastTime(i), o && o(null, e.url)) : p.test(i) ? d(i, null, a.header, a.onFileProgress, function(e, t) { | |
| e ? o && o(e) : l.unzipAndCacheBundle(i, t, a.__cacheBundleRoot__, o) | |
| }) : l.unzipAndCacheBundle(i, i, a.__cacheBundleRoot__, o)) : (n.base = "".concat(c, "/"), r && r(null, n)) | |
| })) | |
| }, | |
| default: function(e, t, n) { | |
| y(e, b, t, t.onFileProgress, n) | |
| } | |
| }), e.register({ | |
| ".png": m.downloadDomImage, | |
| ".jpg": m.downloadDomImage, | |
| ".bmp": m.downloadDomImage, | |
| ".jpeg": m.downloadDomImage, | |
| ".gif": m.downloadDomImage, | |
| ".ico": m.downloadDomImage, | |
| ".tiff": m.downloadDomImage, | |
| ".image": m.downloadDomImage, | |
| ".webp": m.downloadDomImage, | |
| ".pvr": x, | |
| ".pkm": A, | |
| ".astc": C, | |
| ".font": P, | |
| ".eot": P, | |
| ".ttf": P, | |
| ".woff": P, | |
| ".svg": P, | |
| ".ttc": P, | |
| ".mp3": c, | |
| ".ogg": c, | |
| ".wav": c, | |
| ".m4a": c, | |
| ".txt": b, | |
| ".xml": b, | |
| ".vsh": b, | |
| ".fsh": b, | |
| ".atlas": b, | |
| ".tmx": b, | |
| ".tsx": b, | |
| ".fnt": b, | |
| ".plist": S, | |
| ".binary": v, | |
| ".bin": v, | |
| ".dbbin": v, | |
| ".skel": v, | |
| ".ExportJson": w | |
| }), cc.assetManager.transformPipeline.append(function(e) { | |
| for (var t = e.output = e.input, n = 0, i = t.length; n < i; n++) { | |
| var a = t[n], | |
| o = a.options; | |
| if (a.config) o.__cacheBundleRoot__ = a.config.name; | |
| else { | |
| if ("bundle" === a.ext) continue; | |
| o.cacheEnabled = void 0 !== o.cacheEnabled && o.cacheEnabled | |
| } | |
| ".cconb" === a.ext ? a.url = a.url.replace(a.ext, ".bin") : ".ccon" === a.ext && (a.url = a.url.replace(a.ext, ".json")) | |
| } | |
| }); | |
| var D = cc.assetManager.init; | |
| cc.assetManager.init = function(e) { | |
| D.call(cc.assetManager, e); | |
| e = cc.settings.querySettings("assets", "subpackages"); | |
| e && e.forEach(function(e) { | |
| return g[e] = "subpackages/".concat(e) | |
| }), l.init() | |
| } | |
| }, { | |
| "./cache-manager": 3 | |
| }], | |
| 2: [function(e, t, n) { | |
| "use strict"; | |
| function i() { | |
| this._delegate = null, this._editing = !1, this._eventListeners = { | |
| onKeyboardInput: null, | |
| onKeyboardConfirm: null, | |
| onKeyboardComplete: null | |
| } | |
| } | |
| var a, o, r, c, s; | |
| cc && cc.internal && cc.internal.EditBox && (a = cc.internal.EditBox, o = cc.js, r = a.KeyboardReturnType, s = c = null, o.extend(i, a._EditBoxImpl), a._EditBoxImpl = i, Object.assign(i.prototype, { | |
| init: function(e) { | |
| e ? this._delegate = e : cc.error("EditBox init failed") | |
| }, | |
| beginEditing: function() { | |
| var t = this; | |
| this._editing || this._ensureKeyboardHide(function() { | |
| var e = t._delegate; | |
| t._showKeyboard(), t._registerKeyboardEvent(), t._editing = !0, s = t, e._editBoxEditingDidBegan() | |
| }) | |
| }, | |
| endEditing: function() { | |
| this._hideKeyboard(); | |
| var e = this._eventListeners; | |
| e.onKeyboardComplete && e.onKeyboardComplete() | |
| }, | |
| _registerKeyboardEvent: function() { | |
| var n = this, | |
| i = this._delegate, | |
| e = this._eventListeners; | |
| e.onKeyboardInput = function(e) { | |
| i._string !== e.value && i._editBoxTextChanged(e.value) | |
| }, e.onKeyboardConfirm = function(e) { | |
| e && e.value ? i._editBoxEditingReturn(e.value) : i._editBoxEditingReturn(); | |
| var t = n._eventListeners; | |
| t.onKeyboardComplete && t.onKeyboardComplete(e) | |
| }, e.onKeyboardComplete = function(e) { | |
| n._editing = !1, s = null, cc.sys.platform !== cc.sys.Platform.WECHAT_MINI_PROGRAM && n._unregisterKeyboardEvent(), e && e.value && e.value !== i.string && i._editBoxTextChanged(e.value), e && e.value ? i._editBoxEditingDidEnded(e.value) : i._editBoxEditingDidEnded() | |
| }, __globalAdapter.onKeyboardInput(e.onKeyboardInput), __globalAdapter.onKeyboardConfirm(e.onKeyboardConfirm), __globalAdapter.onKeyboardComplete(e.onKeyboardComplete) | |
| }, | |
| _unregisterKeyboardEvent: function() { | |
| var e = this._eventListeners; | |
| e.onKeyboardInput && (__globalAdapter.offKeyboardInput(e.onKeyboardInput), e.onKeyboardInput = null), e.onKeyboardConfirm && (__globalAdapter.offKeyboardConfirm(e.onKeyboardConfirm), e.onKeyboardConfirm = null), e.onKeyboardComplete && (__globalAdapter.offKeyboardComplete(e.onKeyboardComplete), e.onKeyboardComplete = null) | |
| }, | |
| _otherEditing: function() { | |
| return !!s && s !== this && s._editing | |
| }, | |
| _ensureKeyboardHide: function(e) { | |
| var t = this._otherEditing(); | |
| if (!t && !c) return e(); | |
| c && clearTimeout(c), t && s.endEditing(), c = setTimeout(function() { | |
| c = null, e() | |
| }, 600) | |
| }, | |
| _showKeyboard: function() { | |
| var e = this._delegate, | |
| t = e.inputMode === a.InputMode.ANY; | |
| __globalAdapter.showKeyboard({ | |
| defaultValue: e.string, | |
| maxLength: e.maxLength < 0 ? 65535 : e.maxLength, | |
| multiple: t, | |
| confirmHold: !1, | |
| confirmType: function(e) { | |
| switch (e) { | |
| case r.DEFAULT: | |
| case r.DONE: | |
| return "done"; | |
| case r.SEND: | |
| return "send"; | |
| case r.SEARCH: | |
| return "search"; | |
| case r.GO: | |
| return "go"; | |
| case r.NEXT: | |
| return "next" | |
| } | |
| return "done" | |
| }(e.returnType), | |
| success: function(e) {}, | |
| fail: function(e) { | |
| cc.warn(e.errMsg) | |
| } | |
| }) | |
| }, | |
| _hideKeyboard: function() { | |
| __globalAdapter.hideKeyboard({ | |
| success: function(e) {}, | |
| fail: function(e) { | |
| cc.warn(e.errMsg) | |
| } | |
| }) | |
| } | |
| })) | |
| }, {}], | |
| 3: [function(e, t, n) { | |
| "use strict"; | |
| var i = window.fsUtils, | |
| a = i.getUserDataPath, | |
| o = i.readJsonSync, | |
| c = i.makeDirSync, | |
| r = i.writeFileSync, | |
| u = i.copyFile, | |
| d = i.downloadFile, | |
| s = i.deleteFile, | |
| l = i.rmdirSync, | |
| f = i.unzip, | |
| h = i.isOutOfStorage, | |
| p = !1, | |
| m = null, | |
| g = !1, | |
| _ = 0, | |
| y = /^https?:\/\/.*/; | |
| cc.assetManager.cacheManager = t.exports = { | |
| cacheDir: "gamecaches", | |
| cachedFileName: "cacheList.json", | |
| cacheEnabled: !0, | |
| autoClear: !0, | |
| cacheInterval: 500, | |
| deleteInterval: 500, | |
| writeFileInterval: 2e3, | |
| outOfStorage: !1, | |
| tempFiles: null, | |
| cachedFiles: null, | |
| cacheQueue: {}, | |
| version: "1.0", | |
| getCache: function(e) { | |
| return this.cachedFiles.has(e) ? this.cachedFiles.get(e).url : "" | |
| }, | |
| getTemp: function(e) { | |
| return this.tempFiles.has(e) ? this.tempFiles.get(e) : "" | |
| }, | |
| init: function() { | |
| this.cacheDir = a() + "/" + this.cacheDir; | |
| var e = this.cacheDir + "/" + this.cachedFileName, | |
| t = o(e); | |
| t instanceof Error || !t.version ? (t instanceof Error || l(this.cacheDir, !0), this.cachedFiles = new cc.AssetManager.Cache, c(this.cacheDir, !0), r(e, JSON.stringify({ | |
| files: this.cachedFiles._map, | |
| version: this.version | |
| }), "utf8")) : this.cachedFiles = new cc.AssetManager.Cache(t.files), this.tempFiles = new cc.AssetManager.Cache | |
| }, | |
| updateLastTime: function(e) { | |
| this.cachedFiles.has(e) && (this.cachedFiles.get(e).lastTime = Date.now()) | |
| }, | |
| _write: function() { | |
| m = null, r(this.cacheDir + "/" + this.cachedFileName, JSON.stringify({ | |
| files: this.cachedFiles._map, | |
| version: this.version | |
| }), "utf8") | |
| }, | |
| writeCacheFile: function() { | |
| m = m || setTimeout(this._write.bind(this), this.writeFileInterval) | |
| }, | |
| _cache: function() { | |
| p = !1; | |
| var e, t, n, i, a, o, r, c = this, | |
| s = ""; | |
| for (e in this.cacheQueue) { | |
| s = e; | |
| break | |
| } | |
| function l(e) { | |
| if (e) { | |
| if (h(e.message)) return c.outOfStorage = !0, void(c.autoClear && c.clearLRU()) | |
| } else c.cachedFiles.add(s, { | |
| bundle: a, | |
| url: r, | |
| lastTime: o | |
| }), c.writeCacheFile(); | |
| delete c.cacheQueue[s], cc.js.isEmptyObject(c.cacheQueue) || p || (p = !0, setTimeout(c._cache.bind(c), c.cacheInterval)) | |
| } | |
| s && (n = (t = this.cacheQueue[s]).srcUrl, i = t.isCopy, a = t.cacheBundleRoot, o = Date.now().toString(), r = "", r = (a ? "".concat(this.cacheDir, "/").concat(a, "/") : "".concat(this.cacheDir, "/")).concat(o).concat(_++).concat(cc.path.extname(s)), i ? u(n, r, l) : d(n, r, null, l)) | |
| }, | |
| cacheFile: function(e, t, n, i, a) { | |
| !(n = void 0 !== n ? n : this.cacheEnabled) || this.cacheQueue[e] || this.cachedFiles.has(e) || (this.cacheQueue[e] = { | |
| srcUrl: t, | |
| cacheBundleRoot: i, | |
| isCopy: a | |
| }, p) || this.outOfStorage || (p = !0, setTimeout(this._cache.bind(this), this.cacheInterval)) | |
| }, | |
| clearCache: function() { | |
| var t = this; | |
| l(this.cacheDir, !0), this.cachedFiles = new cc.AssetManager.Cache, c(this.cacheDir, !0), this.outOfStorage = !1, clearTimeout(m), this._write(), cc.assetManager.bundles.forEach(function(e) { | |
| y.test(e.base) && t.makeBundleFolder(e.name) | |
| }) | |
| }, | |
| clearLRU: function() { | |
| if (!g) { | |
| g = !0; | |
| var n = [], | |
| i = this; | |
| if (this.cachedFiles.forEach(function(t, e) { | |
| i._isZipFile(e) && cc.assetManager.bundles.find(function(e) { | |
| return -1 !== e.base.indexOf(t.url) | |
| }) || n.push({ | |
| originUrl: e, | |
| url: t.url, | |
| lastTime: t.lastTime | |
| }) | |
| }), n.sort(function(e, t) { | |
| return e.lastTime - t.lastTime | |
| }), n.length = Math.floor(n.length / 3), 0 !== n.length) { | |
| for (var e = 0, t = n.length; e < t; e++) this.cachedFiles.remove(n[e].originUrl); | |
| clearTimeout(m), this._write(), setTimeout(function e() { | |
| var t = n.pop(); | |
| i._isZipFile(t.originUrl) ? (l(t.url, !0), i._deleteFileCB()) : s(t.url, i._deleteFileCB.bind(i)), 0 < n.length ? setTimeout(e, i.deleteInterval) : g = !1 | |
| }, i.deleteInterval) | |
| } | |
| } | |
| }, | |
| removeCache: function(e) { | |
| var t; | |
| this.cachedFiles.has(e) && (t = this.cachedFiles.remove(e).url, clearTimeout(m), this._write(), this._isZipFile(e) ? (l(t, !0), this._deleteFileCB()) : s(t, this._deleteFileCB.bind(this))) | |
| }, | |
| _deleteFileCB: function(e) { | |
| e || (this.outOfStorage = !1) | |
| }, | |
| makeBundleFolder: function(e) { | |
| c(this.cacheDir + "/" + e, !0) | |
| }, | |
| unzipAndCacheBundle: function(t, e, n, i) { | |
| var a = Date.now().toString(), | |
| o = "".concat(this.cacheDir, "/").concat(n, "/").concat(a).concat(_++), | |
| r = this; | |
| c(o, !0), f(e, o, function(e) { | |
| e ? (l(o, !0), h(e.message) && (r.outOfStorage = !0, r.autoClear) && r.clearLRU(), i && i(e)) : (r.cachedFiles.add(t, { | |
| bundle: n, | |
| url: o, | |
| lastTime: a | |
| }), r.writeCacheFile(), i && i(null, o)) | |
| }) | |
| }, | |
| _isZipFile: function(e) { | |
| return ".zip" === e.slice(-4) | |
| } | |
| } | |
| }, {}], | |
| 4: [function(e, t, n) { | |
| "use strict"; | |
| e("./Editbox"), e("./AssetManager") | |
| }, { | |
| "./AssetManager": 1, | |
| "./Editbox": 2 | |
| }], | |
| 5: [function(e, t, n) { | |
| "use strict"; | |
| cc.ImageAsset && Object.defineProperty(cc.ImageAsset.prototype, "data", { | |
| get: function() { | |
| return this._nativeData && this._nativeData._data || this._nativeData | |
| } | |
| }) | |
| }, {}], | |
| 6: [function(e, t, n) { | |
| "use strict"; | |
| var i, a, o, r; | |
| cc && cc.LabelComponent && (i = cc.LabelComponent, o = (a = document.createElement("canvas")).getContext("2d"), r = { | |
| canvas: a, | |
| context: o | |
| }, cc.game.on(cc.Game.EVENT_ENGINE_INITED, function() { | |
| Object.assign(i._canvasPool, { | |
| get: function() { | |
| return r | |
| }, | |
| put: function() {} | |
| }) | |
| })) | |
| }, {}], | |
| 7: [function(e, t, n) { | |
| "use strict"; | |
| function a(e) { | |
| return (a = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { | |
| return typeof e | |
| } : function(e) { | |
| return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e | |
| })(e) | |
| } | |
| function o(e, t) { | |
| for (var n = 0; n < t.length; n++) { | |
| var i = t[n]; | |
| i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, function(e) { | |
| e = function(e, t) { | |
| if ("object" !== a(e) || null === e) return e; | |
| var n = e[Symbol.toPrimitive]; | |
| if (void 0 === n) return ("string" === t ? String : Number)(e); | |
| n = n.call(e, t || "default"); | |
| if ("object" !== a(n)) return n; | |
| throw new TypeError("@@toPrimitive must return a primitive value.") | |
| }(e, "string"); | |
| return "symbol" === a(e) ? e : String(e) | |
| }(i.key), i) | |
| } | |
| } | |
| function r(e, t) { | |
| return (r = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) { | |
| return e.__proto__ = t, e | |
| })(e, t) | |
| } | |
| function c(n) { | |
| var i = function() { | |
| if ("undefined" == typeof Reflect || !Reflect.construct) return !1; | |
| if (Reflect.construct.sham) return !1; | |
| if ("function" == typeof Proxy) return !0; | |
| try { | |
| return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})), !0 | |
| } catch (e) { | |
| return !1 | |
| } | |
| }(); | |
| return function() { | |
| var e, t = s(n), | |
| t = (e = i ? (e = s(this).constructor, Reflect.construct(t, arguments, e)) : t.apply(this, arguments), this); | |
| if (e && ("object" === a(e) || "function" == typeof e)) return e; | |
| if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); | |
| if (void 0 !== t) return t; | |
| throw new ReferenceError("this hasn't been initialised - super() hasn't been called") | |
| } | |
| } | |
| function s(e) { | |
| return (s = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) { | |
| return e.__proto__ || Object.getPrototypeOf(e) | |
| })(e) | |
| } | |
| var l, u, d, f, h, i; | |
| cc.internal.VideoPlayer && (l = cc.internal.VideoPlayer.EventType, u = cc.Vec3, d = cc.mat4(), f = new u, h = new u, tt.getSystemInfoSync().pixelRatio, cc.internal.VideoPlayerImplManager.getImpl = function(e) { | |
| return new i(e) | |
| }, i = function(e) { | |
| var t = a; | |
| if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); | |
| t.prototype = Object.create(e && e.prototype, { | |
| constructor: { | |
| value: t, | |
| writable: !0, | |
| configurable: !0 | |
| } | |
| }), Object.defineProperty(t, "prototype", { | |
| writable: !1 | |
| }), e && r(t, e); | |
| var n, i = c(a); | |
| function a(e) { | |
| if (this instanceof a) return i.call(this, e); | |
| throw new TypeError("Cannot call a class as a function") | |
| } | |
| return t = a, (e = [{ | |
| key: "syncClip", | |
| value: function(e) { | |
| this.removeVideoPlayer(), e && this.createVideoPlayer(e._nativeAsset) | |
| } | |
| }, { | |
| key: "syncURL", | |
| value: function(e) { | |
| this.removeVideoPlayer(), e && this.createVideoPlayer(e) | |
| } | |
| }, { | |
| key: "onCanplay", | |
| value: function() { | |
| this._loaded || (this._loaded = !0, this.setVisible(this._visible), this.dispatchEvent(l.READY_TO_PLAY), this.delayedPlay()) | |
| } | |
| }, { | |
| key: "_bindEvent", | |
| value: function() { | |
| var n = this._video, | |
| i = this; | |
| n && (n.onCanplay(function() { | |
| var t; | |
| i._video === n && (i._loaded = !0, i.setVisible(i._visible), i.dispatchEvent(l.READY_TO_PLAY), n.play(), t = i._getInitRect(), function e() { | |
| requestAnimationFrame(e), n.paintTo(cc.game.canvas, t.x, t.y, 0, 0, t.width, t.height) | |
| }()) | |
| }), n.onPlay(function() { | |
| i._video === n && (i._playing = !0, i.dispatchEvent(l.PLAYING)) | |
| }), n.onEnded(function() { | |
| i._video === n && (i._playing = !1, i._currentTime = i._duration, i.dispatchEvent(l.COMPLETED)) | |
| }), n.onPause(function() { | |
| i._video === n && (i._playing = !1, i.dispatchEvent(l.PAUSED)) | |
| }), n.onTimeUpdate(function(e) { | |
| i._duration = e.duration, i._currentTime = e.position | |
| }), n.onStop(function() { | |
| i._video === n && (i._playing = !1, i.dispatchEvent(l.STOPPED)) | |
| })) | |
| } | |
| }, { | |
| key: "_unbindEvent", | |
| value: function() { | |
| var e = this._video; | |
| e && (e.offPlay(), e.offEnded(), e.offPause(), e.offTimeUpdate(), e.offStop()) | |
| } | |
| }, { | |
| key: "createVideoPlayer", | |
| value: function(e) { | |
| tt.createVideo ? (this._video || (this._video = tt.createOffscreenVideo(), this._duration = 0, this._currentTime = 0, this._loaded = !1, this.setVisible(this._visible), this._bindEvent(), this._forceUpdate = !0), this.setURL(e), this._forceUpdate = !0) : console.warn("VideoPlayer not supported") | |
| } | |
| }, { | |
| key: "setURL", | |
| value: function(e) { | |
| var t, n = this._video; | |
| n && n.src !== e && (n.stop(), this._unbindEvent(), n.autoplay = !0, n.src = e, n.muted = !0, (t = this)._loaded = !1, n.onPlay(function() { | |
| t._bindEvent(), n.muted = !1, t._loaded = !0, t.dispatchEvent(l.READY_TO_PLAY) | |
| }), n.onEnded(function() { | |
| n.offPlay(), n.stop(), t._playing = !1, t._currentTime = 0, t.dispatchEvent(l.COMPLETED) | |
| })) | |
| } | |
| }, { | |
| key: "removeVideoPlayer", | |
| value: function() { | |
| var e = this.video; | |
| e && (e.stop(), e.destroy(), this._playing = !1, this._loaded = !1, this._loadedMeta = !1, this._ignorePause = !1, this._cachedCurrentTime = 0, this._video = null) | |
| } | |
| }, { | |
| key: "setVisible", | |
| value: function(e) { | |
| var t = this._video; | |
| t && this._visible !== e && (t.width = e && this._actualWidth || 0, this._visible = e) | |
| } | |
| }, { | |
| key: "getDuration", | |
| value: function() { | |
| return this.duration() | |
| } | |
| }, { | |
| key: "duration", | |
| value: function() { | |
| return this._duration | |
| } | |
| }, { | |
| key: "syncPlaybackRate", | |
| value: function(e) { | |
| var t = this._video; | |
| t && e !== t.playbackRate && (.5 === e | .8 === e | 1 === e | 1.25 === e | 1.5 === e ? t.playbackRate = e : console.warn("The platform does not support this PlaybackRate!")) | |
| } | |
| }, { | |
| key: "syncVolume", | |
| value: function() { | |
| console.warn("The platform does not support") | |
| } | |
| }, { | |
| key: "syncMute", | |
| value: function(e) { | |
| var t = this._video; | |
| t && t.muted !== e && (t.muted = e) | |
| } | |
| }, { | |
| key: "syncLoop", | |
| value: function(e) { | |
| var t = this._video; | |
| t && t.loop !== e && (t.loop = e) | |
| } | |
| }, { | |
| key: "syncStayOnBottom", | |
| value: function() { | |
| console.warn("The platform does not support") | |
| } | |
| }, { | |
| key: "getCurrentTime", | |
| value: function() { | |
| return this.video ? this.currentTime() : -1 | |
| } | |
| }, { | |
| key: "currentTime", | |
| value: function() { | |
| return this._currentTime | |
| } | |
| }, { | |
| key: "seekTo", | |
| value: function(e) { | |
| var t = this._video; | |
| t && this._loaded && t.seek(e) | |
| } | |
| }, { | |
| key: "disable", | |
| value: function(e) { | |
| this._video && (e || this._video.pause(), this.setVisible(!1), this._visible = !1) | |
| } | |
| }, { | |
| key: "enable", | |
| value: function() { | |
| this._video && (this.setVisible(!0), this._visible = !0) | |
| } | |
| }, { | |
| key: "canPlay", | |
| value: function() { | |
| this._video.play(), this.syncCurrentTime() | |
| } | |
| }, { | |
| key: "resume", | |
| value: function() { | |
| var e = this._video; | |
| !this._playing && e && e.play() | |
| } | |
| }, { | |
| key: "pause", | |
| value: function() { | |
| var e = this._video; | |
| this._playing && e && e.pause() | |
| } | |
| }, { | |
| key: "stop", | |
| value: function() { | |
| var t = this, | |
| e = this._video; | |
| e && this._visible && e.stop().then(function(e) { | |
| e.errMsg && !e.errMsg.includes("ok") ? console.error("failed to stop video player") : (t._currentTime = 0, t._playing = !1, t.dispatchEvent(l.STOPPED)) | |
| }) | |
| } | |
| }, { | |
| key: "canFullScreen", | |
| value: function(e) { | |
| this._video && this.setFullScreenEnabled(e) | |
| } | |
| }, { | |
| key: "setFullScreenEnabled", | |
| value: function(e) { | |
| var t = this._video; | |
| t && this._fullScreenEnabled !== e && (e ? t.requestFullScreen() : t.exitFullScreen(), this._fullScreenEnabled = e) | |
| } | |
| }, { | |
| key: "syncKeepAspectRatio", | |
| value: function(e) { | |
| console.warn("On bytedance game videoPlayer is always keep the aspect ratio") | |
| } | |
| }, { | |
| key: "syncMatrix", | |
| value: function() {} | |
| }, { | |
| key: "_getInitRect", | |
| value: function() { | |
| if (this._component && this._uiTrans) { | |
| var e, t, n = this.UICamera; | |
| if (n) return this._component.node.getWorldMatrix(d), e = this._uiTrans.contentSize.width, t = this._uiTrans.contentSize.height, this._m00 = d.m00, this._m01 = d.m01, this._m04 = d.m04, this._m05 = d.m05, this._m12 = d.m12, this._m13 = d.m13, this._w = e, this._h = t, cc.game.canvas.width, e = cc.game.canvas.height, t = this._uiTrans.anchorPoint, u.set(f, -t.x * this._w, (1 - t.y) * this._h, 0), u.set(h, (1 - t.x) * this._w, -t.y * this._h, 0), u.transformMat4(f, f, d), u.transformMat4(h, h, d), n.worldToScreen(f, f), n.worldToScreen(h, h), t = h.x - f.x, n = f.y - h.y, { | |
| x: f.x, | |
| y: e - f.y, | |
| width: t, | |
| height: n | |
| } | |
| } | |
| } | |
| }]) && o(t.prototype, e), n && o(t, n), Object.defineProperty(t, "prototype", { | |
| writable: !1 | |
| }), a | |
| }(cc.internal.VideoPlayerImpl)) | |
| }, {}], | |
| 8: [function(e, t, n) { | |
| "use strict"; | |
| e("../fs-utils"), e("../../../../common/engine/index"), e("./VideoPlayer"), e("./Label"), e("./ImageAsset") | |
| }, { | |
| "../../../../common/engine/index": 4, | |
| "../fs-utils": 9, | |
| "./ImageAsset": 5, | |
| "./Label": 6, | |
| "./VideoPlayer": 7 | |
| }], | |
| 9: [function(a, e, t) { | |
| "use strict"; | |
| var o = tt.getFileSystemManager ? tt.getFileSystemManager() : null, | |
| n = /size.*limit.*exceeded/, | |
| r = { | |
| fs: o, | |
| isOutOfStorage: function(e) { | |
| return n.test(e) | |
| }, | |
| getUserDataPath: function() { | |
| return tt.env.USER_DATA_PATH | |
| }, | |
| checkFsValid: function() { | |
| return !!o || (console.warn("can not get the file system!"), !1) | |
| }, | |
| deleteFile: function(t, n) { | |
| o.unlink({ | |
| filePath: t, | |
| success: function() { | |
| n && n(null) | |
| }, | |
| fail: function(e) { | |
| console.warn("Delete file failed: path: ".concat(t, " message: ").concat(e.errMsg)), n && n(new Error(e.errMsg)) | |
| } | |
| }) | |
| }, | |
| downloadFile: function(t, e, n, i, a) { | |
| var o = { | |
| url: t, | |
| success: function(e) { | |
| 200 === e.statusCode ? a && a(null, e.tempFilePath || e.filePath) : (e.filePath && r.deleteFile(e.filePath), console.warn("Download file failed: path: ".concat(t, " message: ").concat(e.statusCode)), a && a(new Error(e.statusCode), null)) | |
| }, | |
| fail: function(e) { | |
| console.warn("Download file failed: path: ".concat(t, " message: ").concat(e.errMsg)), a && a(new Error(e.errMsg), null) | |
| } | |
| }, | |
| e = (e && (o.filePath = e), n && (o.header = n), tt.downloadFile(o)); | |
| i && e.onProgressUpdate(i) | |
| }, | |
| saveFile: function(t, e, n) { | |
| tt.saveFile({ | |
| tempFilePath: t, | |
| filePath: e, | |
| success: function(e) { | |
| n && n(null) | |
| }, | |
| fail: function(e) { | |
| console.warn("Save file failed: path: ".concat(t, " message: ").concat(e.errMsg)), n && n(new Error(e.errMsg)) | |
| } | |
| }) | |
| }, | |
| copyFile: function(t, e, n) { | |
| o.copyFile({ | |
| srcPath: t, | |
| destPath: e, | |
| success: function() { | |
| n && n(null) | |
| }, | |
| fail: function(e) { | |
| console.warn("Copy file failed: path: ".concat(t, " message: ").concat(e.errMsg)), n && n(new Error(e.errMsg)) | |
| } | |
| }) | |
| }, | |
| writeFile: function(t, e, n, i) { | |
| o.writeFile({ | |
| filePath: t, | |
| encoding: n, | |
| data: e, | |
| success: function() { | |
| i && i(null) | |
| }, | |
| fail: function(e) { | |
| console.warn("Write file failed: path: ".concat(t, " message: ").concat(e.errMsg)), i && i(new Error(e.errMsg)) | |
| } | |
| }) | |
| }, | |
| writeFileSync: function(t, e, n) { | |
| try { | |
| return o.writeFileSync(t, e, n), null | |
| } catch (e) { | |
| return console.warn("Write file failed: path: ".concat(t, " message: ").concat(e.message)), new Error(e.message) | |
| } | |
| }, | |
| readFile: function(t, e, n) { | |
| o.readFile({ | |
| filePath: t, | |
| encoding: e, | |
| success: function(e) { | |
| n && n(null, e.data) | |
| }, | |
| fail: function(e) { | |
| console.warn("Read file failed: path: ".concat(t, " message: ").concat(e.errMsg)), n && n(new Error(e.errMsg), null) | |
| } | |
| }) | |
| }, | |
| readDir: function(t, n) { | |
| o.readdir({ | |
| dirPath: t, | |
| success: function(e) { | |
| n && n(null, e.files) | |
| }, | |
| fail: function(e) { | |
| console.warn("Read directory failed: path: ".concat(t, " message: ").concat(e.errMsg)), n && n(new Error(e.errMsg), null) | |
| } | |
| }) | |
| }, | |
| readText: function(e, t) { | |
| r.readFile(e, "utf8", t) | |
| }, | |
| readArrayBuffer: function(e, t) { | |
| r.readFile(e, void 0, t) | |
| }, | |
| readJson: function(i, a) { | |
| r.readFile(i, "utf8", function(t, e) { | |
| var n = null; | |
| if (!t) try { | |
| n = JSON.parse(e) | |
| } catch (e) { | |
| console.warn("Read json failed: path: ".concat(i, " message: ").concat(e.message)), t = new Error(e.message) | |
| } | |
| a && a(t, n) | |
| }) | |
| }, | |
| readJsonSync: function(t) { | |
| try { | |
| var e = o.readFileSync(t, "utf8"); | |
| return JSON.parse(e) | |
| } catch (e) { | |
| return console.warn("Read json failed: path: ".concat(t, " message: ").concat(e.message)), new Error(e.message) | |
| } | |
| }, | |
| makeDirSync: function(t, e) { | |
| try { | |
| return o.mkdirSync(t, e), null | |
| } catch (e) { | |
| return console.warn("Make directory failed: path: ".concat(t, " message: ").concat(e.message)), new Error(e.message) | |
| } | |
| }, | |
| rmdirSync: function(t, e) { | |
| try { | |
| o.rmdirSync(t, e) | |
| } catch (e) { | |
| return console.warn("rm directory failed: path: ".concat(t, " message: ").concat(e.message)), new Error(e.message) | |
| } | |
| }, | |
| exists: function(e, t) { | |
| o.access({ | |
| path: e, | |
| success: function() { | |
| t && t(!0) | |
| }, | |
| fail: function() { | |
| t && t(!1) | |
| } | |
| }) | |
| }, | |
| loadSubpackage: function(t, e, n) { | |
| var i; | |
| if (tt.loadSubpackage) return i = tt.loadSubpackage({ | |
| name: t, | |
| success: function() { | |
| n && n() | |
| }, | |
| fail: function(e) { | |
| console.warn("Load Subpackage failed: path: ".concat(t, " message: ").concat(e.errMsg)), n && n(new Error("Failed to load subpackage ".concat(t, ": ").concat(e.errMsg))) | |
| } | |
| }), e && i.onProgressUpdate(e), i; | |
| console.warn("tt.loadSubpackage not supported, fallback to loading bundle"), a("subpackages/".concat(t, "/game.js")), n && n() | |
| }, | |
| unzip: function(t, e, n) { | |
| o.unzip({ | |
| zipFilePath: t, | |
| targetPath: e, | |
| success: function() { | |
| n && n(null) | |
| }, | |
| fail: function(e) { | |
| console.warn("unzip failed: path: ".concat(t, " message: ").concat(e.errMsg)), n && n(new Error("unzip failed: ".concat(e.errMsg))) | |
| } | |
| }) | |
| } | |
| }; | |
| window.fsUtils = e.exports = r | |
| }, {}] | |
| }, {}, [8]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| loadCC(); | |
| function loadCC() { | |
| require('./web-adapter'); | |
| // Polyfills bundle. | |
| require("src/polyfills.bundle.js"); | |
| // SystemJS support. | |
| require("src/system.bundle.js"); | |
| // Adapt for IOS, swap if opposite | |
| if (canvas){ | |
| var _w = canvas.width; | |
| var _h = canvas.height; | |
| if (screen.width < screen.height) { | |
| if (canvas.width > canvas.height) { | |
| _w = canvas.height; | |
| _h = canvas.width; | |
| } | |
| } else { | |
| if (canvas.width < canvas.height) { | |
| _w = canvas.height; | |
| _h = canvas.width; | |
| } | |
| } | |
| canvas.width = _w; | |
| canvas.height = _h; | |
| } | |
| // Adjust initial canvas size | |
| if (canvas && window.devicePixelRatio >= 2) {canvas.width *= 2; canvas.height *= 2;} | |
| const importMap = require("src/import-map.js").default; | |
| System.warmup({ | |
| importMap, | |
| importMapUrl: 'src/import-map.js', | |
| defaultHandler: (urlNoSchema) => { | |
| require('.' + urlNoSchema); | |
| }, | |
| handlers: { | |
| 'plugin:': (urlNoSchema) => { | |
| requirePlugin(urlNoSchema); | |
| }, | |
| }, | |
| }); | |
| System.import('./application.js').then(({ Application }) => { | |
| return new Application(); | |
| }).then((application) => { | |
| return onApplicationCreated(application); | |
| }).catch((err) => { | |
| console.error(err); | |
| }); | |
| function onApplicationCreated(application) { | |
| return System.import('cc').then((cc) => { | |
| require('./engine-adapter'); | |
| return application.init(cc); | |
| }).then(() => { return application.start(); }); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ! function r(o, i, a) { | |
| function u(t, e) { | |
| if (!i[t]) { | |
| if (!o[t]) { | |
| var n = "function" == typeof require && require; | |
| if (!e && n) return n(t, !0); | |
| if (c) return c(t, !0); | |
| throw (e = new Error("Cannot find module '" + t + "'")).code = "MODULE_NOT_FOUND", e | |
| } | |
| n = i[t] = { | |
| exports: {} | |
| }, o[t][0].call(n.exports, function(e) { | |
| return u(o[t][1][e] || e) | |
| }, n, n.exports, r, o, i, a) | |
| } | |
| return i[t].exports | |
| } | |
| for (var c = "function" == typeof require && require, e = 0; e < a.length; e++) u(a[e]); | |
| return u | |
| }({ | |
| 1: [function(e, t, n) { | |
| "use strict"; | |
| function r(e) { | |
| this.options = e || { | |
| locator: {} | |
| } | |
| } | |
| function l() { | |
| this.cdata = !1 | |
| } | |
| function s(e, t) { | |
| t.lineNumber = e.lineNumber, t.columnNumber = e.columnNumber | |
| } | |
| function f(e) { | |
| if (e) return "\n@" + (e.systemId || "") + "#[line:" + e.lineNumber + ",col:" + e.columnNumber + "]" | |
| } | |
| function o(e, t, n) { | |
| return "string" == typeof e ? e.substr(t, n) : e.length >= t + n || t ? new java.lang.String(e, t, n) + "" : e | |
| } | |
| function p(e, t) { | |
| (e.currentElement || e.doc).appendChild(t) | |
| } | |
| r.prototype.parseFromString = function(e, t) { | |
| var n = this.options, | |
| r = new m, | |
| o = n.domBuilder || new l, | |
| i = n.errorHandler, | |
| a = n.locator, | |
| u = n.xmlns || {}, | |
| t = /\/x?html?$/.test(t), | |
| c = t ? d.entityMap : { | |
| lt: "<", | |
| gt: ">", | |
| amp: "&", | |
| quot: '"', | |
| apos: "'" | |
| }; | |
| return a && o.setDocumentLocator(a), r.errorHandler = function(r, e, o) { | |
| if (!r) { | |
| if (e instanceof l) return e; | |
| r = e | |
| } | |
| var i = {}, | |
| a = r instanceof Function; | |
| function t(t) { | |
| var n = r[t]; | |
| !n && a && (n = 2 == r.length ? function(e) { | |
| r(t, e) | |
| } : r), i[t] = n ? function(e) { | |
| n("[xmldom " + t + "]\t" + e + f(o)) | |
| } : function() {} | |
| } | |
| return o = o || {}, t("warning"), t("error"), t("fatalError"), i | |
| }(i, o, a), r.domBuilder = n.domBuilder || o, t && (u[""] = "http://www.w3.org/1999/xhtml"), u.xml = u.xml || "http://www.w3.org/XML/1998/namespace", e ? r.parse(e, u, c) : r.errorHandler.error("invalid doc source"), o.doc | |
| }, l.prototype = { | |
| startDocument: function() { | |
| this.doc = (new i).createDocument(null, null, null), this.locator && (this.doc.documentURI = this.locator.systemId) | |
| }, | |
| startElement: function(e, t, n, r) { | |
| var o = this.doc, | |
| i = o.createElementNS(e, n || t), | |
| a = r.length; | |
| p(this, i), this.currentElement = i, this.locator && s(this.locator, i); | |
| for (var u = 0; u < a; u++) { | |
| var e = r.getURI(u), | |
| c = r.getValue(u), | |
| n = r.getQName(u), | |
| l = o.createAttributeNS(e, n); | |
| this.locator && s(r.getLocator(u), l), l.value = l.nodeValue = c, i.setAttributeNode(l) | |
| } | |
| }, | |
| endElement: function(e, t, n) { | |
| var r = this.currentElement; | |
| r.tagName; | |
| this.currentElement = r.parentNode | |
| }, | |
| startPrefixMapping: function(e, t) {}, | |
| endPrefixMapping: function(e) {}, | |
| processingInstruction: function(e, t) { | |
| e = this.doc.createProcessingInstruction(e, t); | |
| this.locator && s(this.locator, e), p(this, e) | |
| }, | |
| ignorableWhitespace: function(e, t, n) {}, | |
| characters: function(e, t, n) { | |
| var r; | |
| (e = o.apply(this, arguments)) && (r = this.cdata ? this.doc.createCDATASection(e) : this.doc.createTextNode(e), this.currentElement ? this.currentElement.appendChild(r) : /^\s*$/.test(e) && this.doc.appendChild(r), this.locator) && s(this.locator, r) | |
| }, | |
| skippedEntity: function(e) {}, | |
| endDocument: function() { | |
| this.doc.normalize() | |
| }, | |
| setDocumentLocator: function(e) { | |
| (this.locator = e) && (e.lineNumber = 0) | |
| }, | |
| comment: function(e, t, n) { | |
| e = o.apply(this, arguments); | |
| e = this.doc.createComment(e); | |
| this.locator && s(this.locator, e), p(this, e) | |
| }, | |
| startCDATA: function() { | |
| this.cdata = !0 | |
| }, | |
| endCDATA: function() { | |
| this.cdata = !1 | |
| }, | |
| startDTD: function(e, t, n) { | |
| var r = this.doc.implementation; | |
| r && r.createDocumentType && (r = r.createDocumentType(e, t, n), this.locator && s(this.locator, r), p(this, r)) | |
| }, | |
| warning: function(e) { | |
| console.warn("[xmldom warning]\t" + e, f(this.locator)) | |
| }, | |
| error: function(e) { | |
| console.error("[xmldom error]\t" + e, f(this.locator)) | |
| }, | |
| fatalError: function(e) { | |
| throw console.error("[xmldom fatalError]\t" + e, f(this.locator)), e | |
| } | |
| }, "endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g, function(e) { | |
| l.prototype[e] = function() { | |
| return null | |
| } | |
| }); | |
| var d = e("./entities"), | |
| m = e("./sax").XMLReader, | |
| i = n.DOMImplementation = e("./dom").DOMImplementation; | |
| n.XMLSerializer = e("./dom").XMLSerializer, n.DOMParser = r, window.DOMParser = r | |
| }, { | |
| "./dom": 2, | |
| "./entities": 3, | |
| "./sax": 4 | |
| }], | |
| 2: [function(k, L, e) { | |
| "use strict"; | |
| function p(e) { | |
| return (p = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { | |
| return typeof e | |
| } : function(e) { | |
| return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e | |
| })(e) | |
| } | |
| function t(e, t) { | |
| for (var n in e) t[n] = e[n] | |
| } | |
| function n(e, t) { | |
| var n = e.prototype; | |
| if (!(n instanceof t)) { | |
| var r, o = function() {}; | |
| for (r in o.prototype = t.prototype, o = new o, n) o[r] = n[r]; | |
| e.prototype = n = o | |
| } | |
| n.constructor != e && ("function" != typeof e && console.error("unknow Class:" + e), n.constructor = e) | |
| } | |
| var r, o = {}, | |
| i = (o.ELEMENT_NODE = 1, o.ATTRIBUTE_NODE = 2, o.TEXT_NODE = 3, o.CDATA_SECTION_NODE = 4, o.ENTITY_REFERENCE_NODE = 5, o.ENTITY_NODE = 6, o.PROCESSING_INSTRUCTION_NODE = 7, o.COMMENT_NODE = 8, o.DOCUMENT_NODE = 9, o.DOCUMENT_TYPE_NODE = 10, o.DOCUMENT_FRAGMENT_NODE = 11, o.NOTATION_NODE = 12, {}), | |
| a = {}; | |
| i.INDEX_SIZE_ERR = (a[1] = "Index size error", 1), i.DOMSTRING_SIZE_ERR = (a[2] = "DOMString size error", 2), i.HIERARCHY_REQUEST_ERR = (a[3] = "Hierarchy request error", 3), i.WRONG_DOCUMENT_ERR = (a[4] = "Wrong document", 4), i.INVALID_CHARACTER_ERR = (a[5] = "Invalid character", 5), i.NO_DATA_ALLOWED_ERR = (a[6] = "No data allowed", 6), i.NO_MODIFICATION_ALLOWED_ERR = (a[7] = "No modification allowed", 7), i.NOT_FOUND_ERR = (a[8] = "Not found", 8), i.NOT_SUPPORTED_ERR = (a[9] = "Not supported", 9), i.INUSE_ATTRIBUTE_ERR = (a[10] = "Attribute in use", 10), i.INVALID_STATE_ERR = (a[11] = "Invalid state", 11), i.SYNTAX_ERR = (a[12] = "Syntax error", 12), i.INVALID_MODIFICATION_ERR = (a[13] = "Invalid modification", 13), i.NAMESPACE_ERR = (a[14] = "Invalid namespace", 14), i.INVALID_ACCESS_ERR = (a[15] = "Invalid access", 15); | |
| function u(e, t) { | |
| var n; | |
| return t instanceof Error ? n = t : (n = this, Error.call(this, a[e]), this.message = a[e], Error.captureStackTrace && Error.captureStackTrace(this, u)), n.code = e, t && (this.message = this.message + ": " + t), n | |
| } | |
| function d() {} | |
| function c(e, t) { | |
| this._node = e, this._refresh = t, l(this) | |
| } | |
| function l(e) { | |
| var t = e._node._inc || e._node.ownerDocument._inc; | |
| if (e._inc != t) { | |
| var n, r = e._refresh(e._node); | |
| for (n in G(e, "length", r.length), r) e[n] = r[n]; | |
| e._inc = t | |
| } | |
| } | |
| function m() {} | |
| function s(e, t) { | |
| for (var n = e.length; n--;) | |
| if (e[n] === t) return n | |
| } | |
| function f(e, t, n, r) { | |
| r ? t[s(t, r)] = n : t[t.length++] = n, e && (t = (n.ownerElement = e).ownerDocument) && (r && E(t, e, r), r = e, e = n, (n = t) && n._inc++, "http://www.w3.org/2000/xmlns/" == e.namespaceURI) && (r._nsMap[e.prefix ? e.localName : ""] = e.value) | |
| } | |
| function y(e, t, n) { | |
| var r = s(t, n); | |
| if (!(0 <= r)) throw u(8, new Error(e.tagName + "@" + n)); | |
| for (var o, i = t.length - 1; r < i;) t[r] = t[++r]; | |
| t.length = i, e && (o = e.ownerDocument) && (E(o, e, n), n.ownerElement = null) | |
| } | |
| function h(e) { | |
| if (this._features = {}, e) | |
| for (var t in e) this._features = e[t] | |
| } | |
| function b() {} | |
| function v(e) { | |
| return ("<" == e ? "<" : ">" == e && ">") || ("&" == e ? "&" : '"' == e && """) || "&#" + e.charCodeAt() + ";" | |
| } | |
| function g(e, t) { | |
| if (t(e)) return 1; | |
| if (e = e.firstChild) | |
| do { | |
| if (g(e, t)) return 1 | |
| } while (e = e.nextSibling) | |
| } | |
| function w() {} | |
| function E(e, t, n) { | |
| e && e._inc++, "http://www.w3.org/2000/xmlns/" == n.namespaceURI && delete t._nsMap[n.prefix ? n.localName : ""] | |
| } | |
| function O(e, t, n) { | |
| if (e && e._inc) { | |
| e._inc++; | |
| var r = t.childNodes; | |
| if (n) r[r.length++] = n; | |
| else { | |
| for (var o = t.firstChild, i = 0; o;) o = (r[i++] = o).nextSibling; | |
| r.length = i | |
| } | |
| } | |
| } | |
| function S(e, t) { | |
| var n = t.previousSibling, | |
| r = t.nextSibling; | |
| return n ? n.nextSibling = r : e.firstChild = r, r ? r.previousSibling = n : e.lastChild = n, O(e.ownerDocument, e), t | |
| } | |
| function _(e, t, n) { | |
| var r = t.parentNode; | |
| if (r && r.removeChild(t), 11 === t.nodeType) { | |
| var o = t.firstChild; | |
| if (null == o) return t; | |
| var i = t.lastChild | |
| } else o = i = t; | |
| r = n ? n.previousSibling : e.lastChild; | |
| for (o.previousSibling = r, i.nextSibling = n, r ? r.nextSibling = o : e.firstChild = o, null == n ? e.lastChild = i : n.previousSibling = i; o.parentNode = e, o !== i && (o = o.nextSibling);); | |
| return O(e.ownerDocument || e, e), 11 == t.nodeType && (t.firstChild = t.lastChild = null), t | |
| } | |
| function N() { | |
| this._nsMap = {} | |
| } | |
| function T() {} | |
| function j() {} | |
| function P() {} | |
| function M() {} | |
| function x() {} | |
| function C() {} | |
| function H() {} | |
| function F() {} | |
| function D() {} | |
| function A() {} | |
| function R() {} | |
| function B() {} | |
| function W(e, t) { | |
| var n, r = [], | |
| o = 9 == this.nodeType && this.documentElement || this, | |
| i = o.prefix, | |
| a = o.namespaceURI; | |
| return I(this, r, e, t, n = a && null == i && null == o.lookupPrefix(a) ? [{ | |
| namespace: a, | |
| prefix: null | |
| }] : n), r.join("") | |
| } | |
| function U(e, t, n) { | |
| var r = e.prefix || "", | |
| o = e.namespaceURI; | |
| if ((r || o) && ("xml" !== r || "http://www.w3.org/XML/1998/namespace" !== o) && "http://www.w3.org/2000/xmlns/" != o) { | |
| for (var i = n.length; i--;) { | |
| var a = n[i]; | |
| if (a.prefix == r) return a.namespace != o | |
| } | |
| return 1 | |
| } | |
| } | |
| function I(e, t, n, r, o) { | |
| if (r) { | |
| if (!(e = r(e))) return; | |
| if ("string" == typeof e) return void t.push(e) | |
| } | |
| switch (e.nodeType) { | |
| case 1: | |
| o = o || []; | |
| var i = e.attributes, | |
| a = i.length, | |
| u = e.firstChild, | |
| c = e.tagName; | |
| n = "http://www.w3.org/1999/xhtml" === e.namespaceURI || n, t.push("<", c); | |
| for (var l = 0; l < a; l++) "xmlns" == (s = i.item(l)).prefix ? o.push({ | |
| prefix: s.localName, | |
| namespace: s.value | |
| }) : "xmlns" == s.nodeName && o.push({ | |
| prefix: "", | |
| namespace: s.value | |
| }); | |
| for (var s, f, p, l = 0; l < a; l++) U(s = i.item(l), 0, o) && (f = s.prefix || "", p = s.namespaceURI, t.push(f ? " xmlns:" + f : " xmlns", '="', p, '"'), o.push({ | |
| prefix: f, | |
| namespace: p | |
| })), I(s, t, n, r, o); | |
| if (U(e, 0, o) && (f = e.prefix || "", p = e.namespaceURI, t.push(f ? " xmlns:" + f : " xmlns", '="', p, '"'), o.push({ | |
| prefix: f, | |
| namespace: p | |
| })), u || n && !/^(?:meta|link|img|br|hr|input)$/i.test(c)) { | |
| if (t.push(">"), n && /^script$/i.test(c)) | |
| for (; u;) u.data ? t.push(u.data) : I(u, t, n, r, o), u = u.nextSibling; | |
| else | |
| for (; u;) I(u, t, n, r, o), u = u.nextSibling; | |
| t.push("</", c, ">") | |
| } else t.push("/>"); | |
| return; | |
| case 9: | |
| case 11: | |
| for (u = e.firstChild; u;) I(u, t, n, r, o), u = u.nextSibling; | |
| return; | |
| case 2: | |
| return t.push(" ", e.name, '="', e.value.replace(/[<&"]/g, v), '"'); | |
| case 3: | |
| return t.push(e.data.replace(/[<&]/g, v)); | |
| case 4: | |
| return t.push("<![CDATA[", e.data, "]]>"); | |
| case 8: | |
| return t.push("\x3c!--", e.data, "--\x3e"); | |
| case 10: | |
| var c = e.publicId, | |
| d = e.systemId; | |
| return t.push("<!DOCTYPE ", e.name), void(c ? (t.push(' PUBLIC "', c), d && "." != d && t.push('" "', d), t.push('">')) : d && "." != d ? t.push(' SYSTEM "', d, '">') : ((c = e.internalSubset) && t.push(" [", c, "]"), t.push(">"))); | |
| case 7: | |
| return t.push("<?", e.target, " ", e.data, "?>"); | |
| case 5: | |
| return t.push("&", e.nodeName, ";"); | |
| default: | |
| t.push("??", e.nodeName) | |
| } | |
| } | |
| function G(e, t, n) { | |
| e[t] = n | |
| } | |
| u.prototype = Error.prototype, t(i, u), d.prototype = { | |
| length: 0, | |
| item: function(e) { | |
| return this[e] || null | |
| }, | |
| toString: function(e, t) { | |
| for (var n = [], r = 0; r < this.length; r++) I(this[r], n, e, t); | |
| return n.join("") | |
| } | |
| }, c.prototype.item = function(e) { | |
| return l(this), this[e] | |
| }, n(c, d), m.prototype = { | |
| length: 0, | |
| item: d.prototype.item, | |
| getNamedItem: function(e) { | |
| for (var t = this.length; t--;) { | |
| var n = this[t]; | |
| if (n.nodeName == e) return n | |
| } | |
| }, | |
| setNamedItem: function(e) { | |
| var t = e.ownerElement; | |
| if (t && t != this._ownerElement) throw new u(10); | |
| t = this.getNamedItem(e.nodeName); | |
| return f(this._ownerElement, this, e, t), t | |
| }, | |
| setNamedItemNS: function(e) { | |
| var t = e.ownerElement; | |
| if (t && t != this._ownerElement) throw new u(10); | |
| return t = this.getNamedItemNS(e.namespaceURI, e.localName), f(this._ownerElement, this, e, t), t | |
| }, | |
| removeNamedItem: function(e) { | |
| e = this.getNamedItem(e); | |
| return y(this._ownerElement, this, e), e | |
| }, | |
| removeNamedItemNS: function(e, t) { | |
| e = this.getNamedItemNS(e, t); | |
| return y(this._ownerElement, this, e), e | |
| }, | |
| getNamedItemNS: function(e, t) { | |
| for (var n = this.length; n--;) { | |
| var r = this[n]; | |
| if (r.localName == t && r.namespaceURI == e) return r | |
| } | |
| return null | |
| } | |
| }, h.prototype = { | |
| hasFeature: function(e, t) { | |
| e = this._features[e.toLowerCase()]; | |
| return !(!e || t && !(t in e)) | |
| }, | |
| createDocument: function(e, t, n) { | |
| var r = new w; | |
| return r.implementation = this, r.childNodes = new d, (r.doctype = n) && r.appendChild(n), t && (n = r.createElementNS(e, t), r.appendChild(n)), r | |
| }, | |
| createDocumentType: function(e, t, n) { | |
| var r = new C; | |
| return r.name = e, r.nodeName = e, r.publicId = t, r.systemId = n, r | |
| } | |
| }, b.prototype = { | |
| firstChild: null, | |
| lastChild: null, | |
| previousSibling: null, | |
| nextSibling: null, | |
| attributes: null, | |
| parentNode: null, | |
| childNodes: null, | |
| ownerDocument: null, | |
| nodeValue: null, | |
| namespaceURI: null, | |
| prefix: null, | |
| localName: null, | |
| insertBefore: function(e, t) { | |
| return _(this, e, t) | |
| }, | |
| replaceChild: function(e, t) { | |
| this.insertBefore(e, t), t && this.removeChild(t) | |
| }, | |
| removeChild: function(e) { | |
| return S(this, e) | |
| }, | |
| appendChild: function(e) { | |
| return this.insertBefore(e, null) | |
| }, | |
| hasChildNodes: function() { | |
| return null != this.firstChild | |
| }, | |
| cloneNode: function(e) { | |
| return function e(t, n, r) { | |
| var o = new n.constructor; | |
| for (var i in n) { | |
| var a = n[i]; | |
| "object" != p(a) && a != o[i] && (o[i] = a) | |
| } | |
| n.childNodes && (o.childNodes = new d); | |
| o.ownerDocument = t; | |
| switch (o.nodeType) { | |
| case 1: | |
| var u = n.attributes, | |
| c = o.attributes = new m, | |
| l = u.length; | |
| c._ownerElement = o; | |
| for (var s = 0; s < l; s++) o.setAttributeNode(e(t, u.item(s), !0)); | |
| break; | |
| case 2: | |
| r = !0 | |
| } | |
| if (r) | |
| for (var f = n.firstChild; f;) o.appendChild(e(t, f, r)), f = f.nextSibling; | |
| return o | |
| }(this.ownerDocument || this, this, e) | |
| }, | |
| normalize: function() { | |
| for (var e = this.firstChild; e;) { | |
| var t = e.nextSibling; | |
| t && 3 == t.nodeType && 3 == e.nodeType ? (this.removeChild(t), e.appendData(t.data)) : (e.normalize(), e = t) | |
| } | |
| }, | |
| isSupported: function(e, t) { | |
| return this.ownerDocument.implementation.hasFeature(e, t) | |
| }, | |
| hasAttributes: function() { | |
| return 0 < this.attributes.length | |
| }, | |
| lookupPrefix: function(e) { | |
| for (var t = this; t;) { | |
| var n = t._nsMap; | |
| if (n) | |
| for (var r in n) | |
| if (n[r] == e) return r; | |
| t = 2 == t.nodeType ? t.ownerDocument : t.parentNode | |
| } | |
| return null | |
| }, | |
| lookupNamespaceURI: function(e) { | |
| for (var t = this; t;) { | |
| var n = t._nsMap; | |
| if (n && e in n) return n[e]; | |
| t = 2 == t.nodeType ? t.ownerDocument : t.parentNode | |
| } | |
| return null | |
| }, | |
| isDefaultNamespace: function(e) { | |
| return null == this.lookupPrefix(e) | |
| } | |
| }, t(o, b), t(o, b.prototype), w.prototype = { | |
| nodeName: "#document", | |
| nodeType: 9, | |
| doctype: null, | |
| documentElement: null, | |
| _inc: 1, | |
| insertBefore: function(e, t) { | |
| if (11 == e.nodeType) | |
| for (var n = e.firstChild; n;) { | |
| var r = n.nextSibling; | |
| this.insertBefore(n, t), n = r | |
| } else null == this.documentElement && 1 == e.nodeType && (this.documentElement = e), _(this, e, t), e.ownerDocument = this; | |
| return e | |
| }, | |
| removeChild: function(e) { | |
| return this.documentElement == e && (this.documentElement = null), S(this, e) | |
| }, | |
| importNode: function(e, t) { | |
| return function e(t, n, r) { | |
| var o; | |
| switch (n.nodeType) { | |
| case 1: | |
| (o = n.cloneNode(!1)).ownerDocument = t; | |
| case 11: | |
| break; | |
| case 2: | |
| r = !0 | |
| } | |
| o = o || n.cloneNode(!1); | |
| o.ownerDocument = t; | |
| o.parentNode = null; | |
| if (r) | |
| for (var i = n.firstChild; i;) o.appendChild(e(t, i, r)), i = i.nextSibling; | |
| return o | |
| }(this, e, t) | |
| }, | |
| getElementById: function(t) { | |
| var n = null; | |
| return g(this.documentElement, function(e) { | |
| if (1 == e.nodeType && e.getAttribute("id") == t) return n = e, !0 | |
| }), n | |
| }, | |
| createElement: function(e) { | |
| var t = new N; | |
| return t.ownerDocument = this, t.nodeName = e, t.tagName = e, t.childNodes = new d, (t.attributes = new m)._ownerElement = t | |
| }, | |
| createDocumentFragment: function() { | |
| var e = new A; | |
| return e.ownerDocument = this, e.childNodes = new d, e | |
| }, | |
| createTextNode: function(e) { | |
| var t = new P; | |
| return t.ownerDocument = this, t.appendData(e), t | |
| }, | |
| createComment: function(e) { | |
| var t = new M; | |
| return t.ownerDocument = this, t.appendData(e), t | |
| }, | |
| createCDATASection: function(e) { | |
| var t = new x; | |
| return t.ownerDocument = this, t.appendData(e), t | |
| }, | |
| createProcessingInstruction: function(e, t) { | |
| var n = new R; | |
| return n.ownerDocument = this, n.tagName = n.target = e, n.nodeValue = n.data = t, n | |
| }, | |
| createAttribute: function(e) { | |
| var t = new T; | |
| return t.ownerDocument = this, t.name = e, t.nodeName = e, t.localName = e, t.specified = !0, t | |
| }, | |
| createEntityReference: function(e) { | |
| var t = new D; | |
| return t.ownerDocument = this, t.nodeName = e, t | |
| }, | |
| createElementNS: function(e, t) { | |
| var n = new N, | |
| r = t.split(":"), | |
| o = n.attributes = new m; | |
| return n.childNodes = new d, n.ownerDocument = this, n.nodeName = t, n.tagName = t, n.namespaceURI = e, 2 == r.length ? (n.prefix = r[0], n.localName = r[1]) : n.localName = t, o._ownerElement = n | |
| }, | |
| createAttributeNS: function(e, t) { | |
| var n = new T, | |
| r = t.split(":"); | |
| return n.ownerDocument = this, n.nodeName = t, n.name = t, n.namespaceURI = e, n.specified = !0, 2 == r.length ? (n.prefix = r[0], n.localName = r[1]) : n.localName = t, n | |
| } | |
| }, n(w, b), w.prototype.getElementsByTagName = (N.prototype = { | |
| nodeType: 1, | |
| hasAttribute: function(e) { | |
| return null != this.getAttributeNode(e) | |
| }, | |
| getAttribute: function(e) { | |
| e = this.getAttributeNode(e); | |
| return e && e.value || "" | |
| }, | |
| getAttributeNode: function(e) { | |
| return this.attributes.getNamedItem(e) | |
| }, | |
| setAttribute: function(e, t) { | |
| e = this.ownerDocument.createAttribute(e); | |
| e.value = e.nodeValue = "" + t, this.setAttributeNode(e) | |
| }, | |
| removeAttribute: function(e) { | |
| e = this.getAttributeNode(e); | |
| e && this.removeAttributeNode(e) | |
| }, | |
| appendChild: function(e) { | |
| return 11 === e.nodeType ? this.insertBefore(e, null) : (t = this, (n = (e = e).parentNode) && (r = t.lastChild, n.removeChild(e), r = t.lastChild), r = t.lastChild, e.parentNode = t, e.previousSibling = r, e.nextSibling = null, r ? r.nextSibling = e : t.firstChild = e, t.lastChild = e, O(t.ownerDocument, t, e), e); | |
| var t, n, r | |
| }, | |
| setAttributeNode: function(e) { | |
| return this.attributes.setNamedItem(e) | |
| }, | |
| setAttributeNodeNS: function(e) { | |
| return this.attributes.setNamedItemNS(e) | |
| }, | |
| removeAttributeNode: function(e) { | |
| return this.attributes.removeNamedItem(e.nodeName) | |
| }, | |
| removeAttributeNS: function(e, t) { | |
| e = this.getAttributeNodeNS(e, t); | |
| e && this.removeAttributeNode(e) | |
| }, | |
| hasAttributeNS: function(e, t) { | |
| return null != this.getAttributeNodeNS(e, t) | |
| }, | |
| getAttributeNS: function(e, t) { | |
| e = this.getAttributeNodeNS(e, t); | |
| return e && e.value || "" | |
| }, | |
| setAttributeNS: function(e, t, n) { | |
| e = this.ownerDocument.createAttributeNS(e, t); | |
| e.value = e.nodeValue = "" + n, this.setAttributeNode(e) | |
| }, | |
| getAttributeNodeNS: function(e, t) { | |
| return this.attributes.getNamedItemNS(e, t) | |
| }, | |
| getElementsByTagName: function(r) { | |
| return new c(this, function(t) { | |
| var n = []; | |
| return g(t, function(e) { | |
| e === t || 1 != e.nodeType || "*" !== r && e.tagName != r || n.push(e) | |
| }), n | |
| }) | |
| }, | |
| getElementsByTagNameNS: function(r, o) { | |
| return new c(this, function(t) { | |
| var n = []; | |
| return g(t, function(e) { | |
| e === t || 1 !== e.nodeType || "*" !== r && e.namespaceURI !== r || "*" !== o && e.localName != o || n.push(e) | |
| }), n | |
| }) | |
| } | |
| }).getElementsByTagName, w.prototype.getElementsByTagNameNS = N.prototype.getElementsByTagNameNS, n(N, b), T.prototype.nodeType = 2, n(T, b), j.prototype = { | |
| data: "", | |
| substringData: function(e, t) { | |
| return this.data.substring(e, e + t) | |
| }, | |
| appendData: function(e) { | |
| e = this.data + e, this.nodeValue = this.data = e, this.length = e.length | |
| }, | |
| insertData: function(e, t) { | |
| this.replaceData(e, 0, t) | |
| }, | |
| appendChild: function(e) { | |
| throw new Error(a[3]) | |
| }, | |
| deleteData: function(e, t) { | |
| this.replaceData(e, t, "") | |
| }, | |
| replaceData: function(e, t, n) { | |
| var r = this.data.substring(0, e), | |
| e = this.data.substring(e + t); | |
| this.nodeValue = this.data = n = r + n + e, this.length = n.length | |
| } | |
| }, n(j, b), P.prototype = { | |
| nodeName: "#text", | |
| nodeType: 3, | |
| splitText: function(e) { | |
| var t = (n = this.data).substring(e), | |
| n = n.substring(0, e), | |
| e = (this.data = this.nodeValue = n, this.length = n.length, this.ownerDocument.createTextNode(t)); | |
| return this.parentNode && this.parentNode.insertBefore(e, this.nextSibling), e | |
| } | |
| }, n(P, j), M.prototype = { | |
| nodeName: "#comment", | |
| nodeType: 8 | |
| }, n(M, j), x.prototype = { | |
| nodeName: "#cdata-section", | |
| nodeType: 4 | |
| }, n(x, j), C.prototype.nodeType = 10, n(C, b), H.prototype.nodeType = 12, n(H, b), F.prototype.nodeType = 6, n(F, b), D.prototype.nodeType = 5, n(D, b), A.prototype.nodeName = "#document-fragment", A.prototype.nodeType = 11, n(A, b), R.prototype.nodeType = 7, n(R, b), B.prototype.serializeToString = function(e, t, n) { | |
| return W.call(e, t, n) | |
| }, b.prototype.toString = W; | |
| try { | |
| Object.defineProperty && (r = function e(t) { | |
| switch (t.nodeType) { | |
| case 1: | |
| case 11: | |
| var n = []; | |
| for (t = t.firstChild; t;) 7 !== t.nodeType && 8 !== t.nodeType && n.push(e(t)), t = t.nextSibling; | |
| return n.join(""); | |
| default: | |
| return t.nodeValue | |
| } | |
| }, Object.defineProperty(c.prototype, "length", { | |
| get: function() { | |
| return l(this), this.$$length | |
| } | |
| }), Object.defineProperty(b.prototype, "textContent", { | |
| get: function() { | |
| return r(this) | |
| }, | |
| set: function(e) { | |
| switch (this.nodeType) { | |
| case 1: | |
| case 11: | |
| for (; this.firstChild;) this.removeChild(this.firstChild); | |
| (e || String(e)) && this.appendChild(this.ownerDocument.createTextNode(e)); | |
| break; | |
| default: | |
| this.data = e, this.value = e, this.nodeValue = e | |
| } | |
| } | |
| }), G = function(e, t, n) { | |
| e["$$" + t] = n | |
| }) | |
| } catch (e) {} | |
| e.DOMImplementation = h, e.XMLSerializer = B | |
| }, {}], | |
| 3: [function(e, t, n) { | |
| "use strict"; | |
| n.entityMap = { | |
| lt: "<", | |
| gt: ">", | |
| amp: "&", | |
| quot: '"', | |
| apos: "'", | |
| Agrave: "À", | |
| Aacute: "Á", | |
| Acirc: "Â", | |
| Atilde: "Ã", | |
| Auml: "Ä", | |
| Aring: "Å", | |
| AElig: "Æ", | |
| Ccedil: "Ç", | |
| Egrave: "È", | |
| Eacute: "É", | |
| Ecirc: "Ê", | |
| Euml: "Ë", | |
| Igrave: "Ì", | |
| Iacute: "Í", | |
| Icirc: "Î", | |
| Iuml: "Ï", | |
| ETH: "Ð", | |
| Ntilde: "Ñ", | |
| Ograve: "Ò", | |
| Oacute: "Ó", | |
| Ocirc: "Ô", | |
| Otilde: "Õ", | |
| Ouml: "Ö", | |
| Oslash: "Ø", | |
| Ugrave: "Ù", | |
| Uacute: "Ú", | |
| Ucirc: "Û", | |
| Uuml: "Ü", | |
| Yacute: "Ý", | |
| THORN: "Þ", | |
| szlig: "ß", | |
| agrave: "à", | |
| aacute: "á", | |
| acirc: "â", | |
| atilde: "ã", | |
| auml: "ä", | |
| aring: "å", | |
| aelig: "æ", | |
| ccedil: "ç", | |
| egrave: "è", | |
| eacute: "é", | |
| ecirc: "ê", | |
| euml: "ë", | |
| igrave: "ì", | |
| iacute: "í", | |
| icirc: "î", | |
| iuml: "ï", | |
| eth: "ð", | |
| ntilde: "ñ", | |
| ograve: "ò", | |
| oacute: "ó", | |
| ocirc: "ô", | |
| otilde: "õ", | |
| ouml: "ö", | |
| oslash: "ø", | |
| ugrave: "ù", | |
| uacute: "ú", | |
| ucirc: "û", | |
| uuml: "ü", | |
| yacute: "ý", | |
| thorn: "þ", | |
| yuml: "ÿ", | |
| nbsp: " ", | |
| iexcl: "¡", | |
| cent: "¢", | |
| pound: "£", | |
| curren: "¤", | |
| yen: "¥", | |
| brvbar: "¦", | |
| sect: "§", | |
| uml: "¨", | |
| copy: "©", | |
| ordf: "ª", | |
| laquo: "«", | |
| not: "¬", | |
| shy: "", | |
| reg: "®", | |
| macr: "¯", | |
| deg: "°", | |
| plusmn: "±", | |
| sup2: "²", | |
| sup3: "³", | |
| acute: "´", | |
| micro: "µ", | |
| para: "¶", | |
| middot: "·", | |
| cedil: "¸", | |
| sup1: "¹", | |
| ordm: "º", | |
| raquo: "»", | |
| frac14: "¼", | |
| frac12: "½", | |
| frac34: "¾", | |
| iquest: "¿", | |
| times: "×", | |
| divide: "÷", | |
| forall: "∀", | |
| part: "∂", | |
| exist: "∃", | |
| empty: "∅", | |
| nabla: "∇", | |
| isin: "∈", | |
| notin: "∉", | |
| ni: "∋", | |
| prod: "∏", | |
| sum: "∑", | |
| minus: "−", | |
| lowast: "∗", | |
| radic: "√", | |
| prop: "∝", | |
| infin: "∞", | |
| ang: "∠", | |
| and: "∧", | |
| or: "∨", | |
| cap: "∩", | |
| cup: "∪", | |
| int: "∫", | |
| there4: "∴", | |
| sim: "∼", | |
| cong: "≅", | |
| asymp: "≈", | |
| ne: "≠", | |
| equiv: "≡", | |
| le: "≤", | |
| ge: "≥", | |
| sub: "⊂", | |
| sup: "⊃", | |
| nsub: "⊄", | |
| sube: "⊆", | |
| supe: "⊇", | |
| oplus: "⊕", | |
| otimes: "⊗", | |
| perp: "⊥", | |
| sdot: "⋅", | |
| Alpha: "Α", | |
| Beta: "Β", | |
| Gamma: "Γ", | |
| Delta: "Δ", | |
| Epsilon: "Ε", | |
| Zeta: "Ζ", | |
| Eta: "Η", | |
| Theta: "Θ", | |
| Iota: "Ι", | |
| Kappa: "Κ", | |
| Lambda: "Λ", | |
| Mu: "Μ", | |
| Nu: "Ν", | |
| Xi: "Ξ", | |
| Omicron: "Ο", | |
| Pi: "Π", | |
| Rho: "Ρ", | |
| Sigma: "Σ", | |
| Tau: "Τ", | |
| Upsilon: "Υ", | |
| Phi: "Φ", | |
| Chi: "Χ", | |
| Psi: "Ψ", | |
| Omega: "Ω", | |
| alpha: "α", | |
| beta: "β", | |
| gamma: "γ", | |
| delta: "δ", | |
| epsilon: "ε", | |
| zeta: "ζ", | |
| eta: "η", | |
| theta: "θ", | |
| iota: "ι", | |
| kappa: "κ", | |
| lambda: "λ", | |
| mu: "μ", | |
| nu: "ν", | |
| xi: "ξ", | |
| omicron: "ο", | |
| pi: "π", | |
| rho: "ρ", | |
| sigmaf: "ς", | |
| sigma: "σ", | |
| tau: "τ", | |
| upsilon: "υ", | |
| phi: "φ", | |
| chi: "χ", | |
| psi: "ψ", | |
| omega: "ω", | |
| thetasym: "ϑ", | |
| upsih: "ϒ", | |
| piv: "ϖ", | |
| OElig: "Œ", | |
| oelig: "œ", | |
| Scaron: "Š", | |
| scaron: "š", | |
| Yuml: "Ÿ", | |
| fnof: "ƒ", | |
| circ: "ˆ", | |
| tilde: "˜", | |
| ensp: " ", | |
| emsp: " ", | |
| thinsp: " ", | |
| zwnj: "", | |
| zwj: "", | |
| lrm: "", | |
| rlm: "", | |
| ndash: "–", | |
| mdash: "—", | |
| lsquo: "‘", | |
| rsquo: "’", | |
| sbquo: "‚", | |
| ldquo: "“", | |
| rdquo: "”", | |
| bdquo: "„", | |
| dagger: "†", | |
| Dagger: "‡", | |
| bull: "•", | |
| hellip: "…", | |
| permil: "‰", | |
| prime: "′", | |
| Prime: "″", | |
| lsaquo: "‹", | |
| rsaquo: "›", | |
| oline: "‾", | |
| euro: "€", | |
| trade: "™", | |
| larr: "←", | |
| uarr: "↑", | |
| rarr: "→", | |
| darr: "↓", | |
| harr: "↔", | |
| crarr: "↵", | |
| lceil: "⌈", | |
| rceil: "⌉", | |
| lfloor: "⌊", | |
| rfloor: "⌋", | |
| loz: "◊", | |
| spades: "♠", | |
| clubs: "♣", | |
| hearts: "♥", | |
| diams: "♦" | |
| } | |
| }, {}], | |
| 4: [function(e, t, n) { | |
| "use strict"; | |
| var r = /[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/, | |
| o = new RegExp("[\\-\\.0-9" + r.source.slice(1, -1) + "\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"), | |
| i = new RegExp("^" + r.source + o.source + "*(?::" + r.source + o.source + "*)?$"), | |
| x = 0, | |
| C = 1, | |
| D = 2, | |
| A = 3, | |
| R = 4, | |
| I = 5, | |
| k = 6, | |
| L = 7; | |
| function a() {} | |
| function H(e, t) { | |
| return t.lineNumber = e.lineNumber, t.columnNumber = e.columnNumber, t | |
| } | |
| function F(e, t, n) { | |
| for (var r = e.tagName, o = null, i = e.length; i--;) { | |
| var a = e[i], | |
| u = a.qName, | |
| c = a.value, | |
| u = 0 < (s = u.indexOf(":")) ? (l = a.prefix = u.slice(0, s), f = u.slice(s + 1), "xmlns" === l && f) : (l = null, "xmlns" === (f = u) && ""); | |
| a.localName = f, !1 !== u && (null == o && (o = {}, d(n, n = {})), n[u] = o[u] = c, a.uri = "http://www.w3.org/2000/xmlns/", t.startPrefixMapping(u, c)) | |
| } | |
| for (var l, i = e.length; i--;)(l = (a = e[i]).prefix) && ("xml" === l && (a.uri = "http://www.w3.org/XML/1998/namespace"), "xmlns" !== l) && (a.uri = n[l || ""]); | |
| var s, f = 0 < (s = r.indexOf(":")) ? (l = e.prefix = r.slice(0, s), e.localName = r.slice(s + 1)) : (l = null, e.localName = r), | |
| p = e.uri = n[l || ""]; | |
| if (t.startElement(p, f, r, e), !e.closed) return e.currentNSMap = n, e.localNSMap = o, 1; | |
| if (t.endElement(p, f, r), o) | |
| for (l in o) t.endPrefixMapping(l) | |
| } | |
| function d(e, t) { | |
| for (var n in e) t[n] = e[n] | |
| } | |
| function B(e) {} | |
| a.prototype = { | |
| parse: function(e, t, n) { | |
| var r = this.domBuilder; | |
| r.startDocument(), d(t, t = {}), | |
| function(n, e, r, o, i) { | |
| function a(e) { | |
| var t = e.slice(1, -1); | |
| return t in r ? r[t] : "#" === t.charAt(0) ? 65535 < (t = parseInt(t.substr(1).replace("x", "0x"))) ? (t -= 65536, String.fromCharCode(55296 + (t >> 10), 56320 + (1023 & t))) : String.fromCharCode(t) : (i.error("entity not found:" + e), e) | |
| } | |
| function t(e) { | |
| var t; | |
| m < e && (t = n.substring(m, e).replace(/&#?\w+;/g, a), f && u(m), o.characters(t, 0, e - m), m = e) | |
| } | |
| function u(e, t) { | |
| for (; l <= e && (t = s.exec(n));) c = t.index, l = c + t[0].length, f.lineNumber++; | |
| f.columnNumber = e - c + 1 | |
| } | |
| var c = 0, | |
| l = 0, | |
| s = /.*(?:\r\n?|\n)|.*$/g, | |
| f = o.locator, | |
| p = [{ | |
| currentNSMap: e | |
| }], | |
| d = {}, | |
| m = 0; | |
| for (;;) { | |
| try { | |
| var y, h, b = n.indexOf("<", m); | |
| if (b < 0) return n.substr(m).match(/^\s*$/) || (y = o.doc, h = y.createTextNode(n.substr(m)), y.appendChild(h), o.currentElement = h); | |
| switch (m < b && t(b), n.charAt(b + 1)) { | |
| case "/": | |
| var v = n.indexOf(">", b + 3), | |
| g = n.substring(b + 2, v), | |
| w = p.pop(), | |
| E = (v < 0 ? (g = n.substring(b + 2).replace(/[\s<].*/, ""), i.error("end tag name: " + g + " is not complete:" + w.tagName), v = b + 1 + g.length) : g.match(/\s</) && (g = g.replace(/[\s<].*/, ""), i.error("end tag name: " + g + " maybe not complete"), v = b + 1 + g.length), w.localNSMap), | |
| O = w.tagName == g; | |
| if (O || w.tagName && w.tagName.toLowerCase() == g.toLowerCase()) { | |
| if (o.endElement(w.uri, w.localName, g), E) | |
| for (var S in E) o.endPrefixMapping(S); | |
| O || i.fatalError("end tag name: " + g + " is not match the current start tagName:" + w.tagName) | |
| } else p.push(w); | |
| v++; | |
| break; | |
| case "?": | |
| f && u(b), v = function(e, t, n) { | |
| var r = e.indexOf("?>", t); | |
| if (r) { | |
| e = e.substring(t, r).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/); | |
| if (e) return e[0].length, n.processingInstruction(e[1], e[2]), r + 2 | |
| } | |
| return -1 | |
| }(n, b, o); | |
| break; | |
| case "!": | |
| f && u(b), v = function(e, t, n, r) { | |
| { | |
| if ("-" === e.charAt(t + 2)) return "-" === e.charAt(t + 3) ? (i = e.indexOf("--\x3e", t + 4), t < i ? (n.comment(e, t + 4, i - t - 4), i + 3) : (r.error("Unclosed comment"), -1)) : -1; | |
| if ("CDATA[" == e.substr(t + 3, 6)) return i = e.indexOf("]]>", t + 9), n.startCDATA(), n.characters(e, t + 9, i - t - 9), n.endCDATA(), i + 3; | |
| var o, r = function(e, t) { | |
| var n, r = [], | |
| o = /'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g; | |
| o.lastIndex = t, o.exec(e); | |
| for (; n = o.exec(e);) | |
| if (r.push(n), n[1]) return r | |
| }(e, t), | |
| i = r.length; | |
| if (1 < i && /!doctype/i.test(r[0][0])) return e = r[1][0], t = 3 < i && /^public$/i.test(r[2][0]) && r[3][0], o = 4 < i && r[4][0], r = r[i - 1], n.startDTD(e, t && t.replace(/^(['"])(.*?)\1$/, "$2"), o && o.replace(/^(['"])(.*?)\1$/, "$2")), n.endDTD(), r.index + r[0].length | |
| } | |
| return -1 | |
| }(n, b, o, i); | |
| break; | |
| default: | |
| f && u(b); | |
| var _ = new B, | |
| N = p[p.length - 1].currentNSMap, | |
| v = function(e, t, n, r, o, i) { | |
| var a, u = ++t, | |
| c = x; | |
| for (;;) { | |
| var l = e.charAt(u); | |
| switch (l) { | |
| case "=": | |
| if (c === C) a = e.slice(t, u); | |
| else if (c !== D) throw new Error("attribute equal must after attrName"); | |
| c = A; | |
| break; | |
| case "'": | |
| case '"': | |
| if (c === A || c === C) { | |
| if (c === C && (i.warning('attribute value must after "="'), a = e.slice(t, u)), t = u + 1, !(0 < (u = e.indexOf(l, t)))) throw new Error("attribute value no end '" + l + "' match"); | |
| s = e.slice(t, u).replace(/&#?\w+;/g, o), n.add(a, s, t - 1) | |
| } else { | |
| if (c != R) throw new Error('attribute value must after "="'); | |
| s = e.slice(t, u).replace(/&#?\w+;/g, o), n.add(a, s, t), i.warning('attribute "' + a + '" missed start quot(' + l + ")!!"), t = u + 1 | |
| } | |
| c = I; | |
| break; | |
| case "/": | |
| switch (c) { | |
| case x: | |
| n.setTagName(e.slice(t, u)); | |
| case I: | |
| case k: | |
| case L: | |
| c = L, n.closed = !0; | |
| case R: | |
| case C: | |
| case D: | |
| break; | |
| default: | |
| throw new Error("attribute invalid close char('/')") | |
| } | |
| break; | |
| case "": | |
| return i.error("unexpected end of input"), c == x && n.setTagName(e.slice(t, u)), u; | |
| case ">": | |
| switch (c) { | |
| case x: | |
| n.setTagName(e.slice(t, u)); | |
| case I: | |
| case k: | |
| case L: | |
| break; | |
| case R: | |
| case C: | |
| "/" === (s = e.slice(t, u)).slice(-1) && (n.closed = !0, s = s.slice(0, -1)); | |
| case D: | |
| c === D && (s = a), c == R ? (i.warning('attribute "' + s + '" missed quot(")!!'), n.add(a, s.replace(/&#?\w+;/g, o), t)) : ("http://www.w3.org/1999/xhtml" === r[""] && s.match(/^(?:disabled|checked|selected)$/i) || i.warning('attribute "' + s + '" missed value!! "' + s + '" instead!!'), n.add(s, s, t)); | |
| break; | |
| case A: | |
| throw new Error("attribute value missed!!") | |
| } | |
| return u; | |
| case "": | |
| l = " "; | |
| default: | |
| if (l <= " ") switch (c) { | |
| case x: | |
| n.setTagName(e.slice(t, u)), c = k; | |
| break; | |
| case C: | |
| a = e.slice(t, u), c = D; | |
| break; | |
| case R: | |
| var s = e.slice(t, u).replace(/&#?\w+;/g, o); | |
| i.warning('attribute "' + s + '" missed quot(")!!'), n.add(a, s, t); | |
| case I: | |
| c = k | |
| } else switch (c) { | |
| case D: | |
| n.tagName; | |
| "http://www.w3.org/1999/xhtml" === r[""] && a.match(/^(?:disabled|checked|selected)$/i) || i.warning('attribute "' + a + '" missed value!! "' + a + '" instead2!!'), n.add(a, a, t), t = u, c = C; | |
| break; | |
| case I: | |
| i.warning('attribute space is required"' + a + '"!!'); | |
| case k: | |
| c = C, t = u; | |
| break; | |
| case A: | |
| c = R, t = u; | |
| break; | |
| case L: | |
| throw new Error("elements closed character '/' and '>' must be connected to") | |
| } | |
| } | |
| u++ | |
| } | |
| }(n, b, _, N, a, i), | |
| T = _.length; | |
| if (!_.closed && function(e, t, n, r) { | |
| var o = r[n]; | |
| null == o && ((o = e.lastIndexOf("</" + n + ">")) < t && (o = e.lastIndexOf("</" + n)), r[n] = o); | |
| return o < t | |
| }(n, v, _.tagName, d) && (_.closed = !0, r.nbsp || i.warning("unclosed xml attribute")), f && T) { | |
| for (var j = H(f, {}), P = 0; P < T; P++) { | |
| var M = _[P]; | |
| u(M.offset), M.locator = H(f, {}) | |
| } | |
| o.locator = j, F(_, o, N) && p.push(_), o.locator = f | |
| } else F(_, o, N) && p.push(_); | |
| "http://www.w3.org/1999/xhtml" !== _.uri || _.closed ? v++ : v = function(e, t, n, r, o) { | |
| if (/^(?:script|textarea)$/i.test(n)) { | |
| var i = e.indexOf("</" + n + ">", t), | |
| e = e.substring(t + 1, i); | |
| if (/[&<]/.test(e)) return /^script$/i.test(n) ? o.characters(e, 0, e.length) : (e = e.replace(/&#?\w+;/g, r), o.characters(e, 0, e.length)), i | |
| } | |
| return t + 1 | |
| }(n, v, _.tagName, a, o) | |
| } | |
| } catch (e) { | |
| i.error("element parse error: " + e), v = -1 | |
| } | |
| m < v ? m = v : t(Math.max(b, m) + 1) | |
| } | |
| }(e, t, n, r, this.errorHandler), r.endDocument() | |
| } | |
| }, B.prototype = { | |
| setTagName: function(e) { | |
| if (!i.test(e)) throw new Error("invalid tagName:" + e); | |
| this.tagName = e | |
| }, | |
| add: function(e, t, n) { | |
| if (!i.test(e)) throw new Error("invalid attribute:" + e); | |
| this[this.length++] = { | |
| qName: e, | |
| value: t, | |
| offset: n | |
| } | |
| }, | |
| length: 0, | |
| getLocalName: function(e) { | |
| return this[e].localName | |
| }, | |
| getLocator: function(e) { | |
| return this[e].locator | |
| }, | |
| getQName: function(e) { | |
| return this[e].qName | |
| }, | |
| getURI: function(e) { | |
| return this[e].uri | |
| }, | |
| getValue: function(e) { | |
| return this[e].value | |
| } | |
| }, n.XMLReader = a | |
| }, {}], | |
| 5: [function(e, t, n) { | |
| "use strict"; | |
| function o(e) { | |
| return (o = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { | |
| return typeof e | |
| } : function(e) { | |
| return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e | |
| })(e) | |
| } | |
| Object.defineProperty(n, "__esModule", { | |
| value: !0 | |
| }), n.default = void 0; | |
| e = (e = e("./HTMLAudioElement")) && e.__esModule ? e : { | |
| default: e | |
| }; | |
| function i(e, t) { | |
| for (var n = 0; n < t.length; n++) { | |
| var r = t[n]; | |
| r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, function(e) { | |
| e = function(e, t) { | |
| if ("object" !== o(e) || null === e) return e; | |
| var n = e[Symbol.toPrimitive]; | |
| if (void 0 === n) return ("string" === t ? String : Number)(e); | |
| n = n.call(e, t || "default"); | |
| if ("object" !== o(n)) return n; | |
| throw new TypeError("@@toPrimitive must return a primitive value.") | |
| }(e, "string"); | |
| return "symbol" === o(e) ? e : String(e) | |
| }(r.key), r) | |
| } | |
| } | |
| function a() { | |
| return (a = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function(e, t, n) { | |
| var r = function(e, t) { | |
| for (; !Object.prototype.hasOwnProperty.call(e, t) && null !== (e = l(e));); | |
| return e | |
| }(e, t); | |
| if (r) return (r = Object.getOwnPropertyDescriptor(r, t)).get ? r.get.call(arguments.length < 3 ? e : n) : r.value | |
| }).apply(this, arguments) | |
| } | |
| function u(e, t) { | |
| return (u = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) { | |
| return e.__proto__ = t, e | |
| })(e, t) | |
| } | |
| function c(n) { | |
| var r = function() { | |
| if ("undefined" == typeof Reflect || !Reflect.construct) return !1; | |
| if (Reflect.construct.sham) return !1; | |
| if ("function" == typeof Proxy) return !0; | |
| try { | |
| return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})), !0 | |
| } catch (e) { | |
| return !1 | |
| } | |
| }(); | |
| return function() { | |
| var e, t = l(n), | |
| t = (e = r ? (e = l(this).constructor, Reflect.construct(t, arguments, e)) : t.apply(this, arguments), this); | |
| if (e && ("object" === o(e) || "function" == typeof e)) return e; | |
| if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); | |
| if (void 0 !== t) return t; | |
| throw new ReferenceError("this hasn't been initialised - super() hasn't been called") | |
| } | |
| } | |
| function l(e) { | |
| return (l = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) { | |
| return e.__proto__ || Object.getPrototypeOf(e) | |
| })(e) | |
| } | |
| var s = 1, | |
| f = {}, | |
| e = function(e) { | |
| var t = o; | |
| if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); | |
| t.prototype = Object.create(e && e.prototype, { | |
| constructor: { | |
| value: t, | |
| writable: !0, | |
| configurable: !0 | |
| } | |
| }), Object.defineProperty(t, "prototype", { | |
| writable: !1 | |
| }), e && u(t, e); | |
| var n, r = c(o); | |
| function o(e) { | |
| var t; | |
| if (!(this instanceof o)) throw new TypeError("Cannot call a class as a function"); | |
| (t = r.call(this))._$sn = s++, t.HAVE_NOTHING = 0, t.HAVE_METADATA = 1, t.HAVE_CURRENT_DATA = 2, t.HAVE_FUTURE_DATA = 3, t.HAVE_ENOUGH_DATA = 4, t.readyState = 0; | |
| var n = tt.createInnerAudioContext(); | |
| return f[t._$sn] = n, t._canplayEvents = ["load", "loadend", "canplay", "canplaythrough", "loadedmetadata"], n.onCanplay(function() { | |
| t._loaded = !0, t.readyState = t.HAVE_CURRENT_DATA, t._canplayEvents.forEach(function(e) { | |
| t.dispatchEvent({ | |
| type: e | |
| }) | |
| }) | |
| }), n.onPlay(function() { | |
| t._paused = f[t._$sn].paused, t.dispatchEvent({ | |
| type: "play" | |
| }) | |
| }), n.onPause(function() { | |
| t._paused = f[t._$sn].paused, t.dispatchEvent({ | |
| type: "pause" | |
| }) | |
| }), n.onEnded(function() { | |
| t._paused = f[t._$sn].paused, !1 === f[t._$sn].loop && t.dispatchEvent({ | |
| type: "ended" | |
| }), t.readyState = 4 | |
| }), n.onError(function() { | |
| t._paused = f[t._$sn].paused, t.dispatchEvent({ | |
| type: "error" | |
| }) | |
| }), e ? t.src = e : t._src = "", t._loop = n.loop, t._autoplay = n.autoplay, t._paused = n.paused, t._volume = n.volume, t._muted = !1, t | |
| } | |
| return t = o, (e = [{ | |
| key: "addEventListener", | |
| value: function(e, t) { | |
| var n = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : {}; | |
| a(l(o.prototype), "addEventListener", this).call(this, e, t, n), e = String(e).toLowerCase(), this._loaded && -1 !== this._canplayEvents.indexOf(e) && this.dispatchEvent({ | |
| type: e | |
| }) | |
| } | |
| }, { | |
| key: "load", | |
| value: function() {} | |
| }, { | |
| key: "play", | |
| value: function() { | |
| f[this._$sn].play() | |
| } | |
| }, { | |
| key: "resume", | |
| value: function() { | |
| f[this._$sn].resume() | |
| } | |
| }, { | |
| key: "pause", | |
| value: function() { | |
| f[this._$sn].pause() | |
| } | |
| }, { | |
| key: "stop", | |
| value: function() { | |
| f[this._$sn].stop() | |
| } | |
| }, { | |
| key: "destroy", | |
| value: function() { | |
| f[this._$sn].destroy() | |
| } | |
| }, { | |
| key: "canPlayType", | |
| value: function() { | |
| var e = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : ""; | |
| return "string" == typeof e && (-1 < e.indexOf("audio/mpeg") || e.indexOf("audio/mp4")) ? "probably" : "" | |
| } | |
| }, { | |
| key: "currentTime", | |
| get: function() { | |
| return f[this._$sn].currentTime | |
| }, | |
| set: function(e) { | |
| f[this._$sn].seek(e) | |
| } | |
| }, { | |
| key: "duration", | |
| get: function() { | |
| return f[this._$sn].duration | |
| } | |
| }, { | |
| key: "src", | |
| get: function() { | |
| return this._src | |
| }, | |
| set: function(e) { | |
| this._src = e, this._loaded = !1, this.readyState = this.HAVE_NOTHING, f[this._$sn].src = e | |
| } | |
| }, { | |
| key: "loop", | |
| get: function() { | |
| return this._loop | |
| }, | |
| set: function(e) { | |
| this._loop = e, f[this._$sn].loop = e | |
| } | |
| }, { | |
| key: "autoplay", | |
| get: function() { | |
| return this.autoplay | |
| }, | |
| set: function(e) { | |
| this._autoplay = e, f[this._$sn].autoplay = e | |
| } | |
| }, { | |
| key: "paused", | |
| get: function() { | |
| return this._paused | |
| } | |
| }, { | |
| key: "volume", | |
| get: function() { | |
| return this._volume | |
| }, | |
| set: function(e) { | |
| this._volume = e, this._muted || (f[this._$sn].volume = e) | |
| } | |
| }, { | |
| key: "muted", | |
| get: function() { | |
| return this._muted | |
| }, | |
| set: function(e) { | |
| this._muted = e, f[this._$sn].volume = e ? 0 : this._volume | |
| } | |
| }, { | |
| key: "cloneNode", | |
| value: function() { | |
| var e = new o; | |
| return e.loop = this.loop, e.autoplay = this.autoplay, e.src = this.src, e | |
| } | |
| }]) && i(t.prototype, e), n && i(t, n), Object.defineProperty(t, "prototype", { | |
| writable: !1 | |
| }), o | |
| }(e.default); | |
| n.default = e | |
| }, { | |
| "./HTMLAudioElement": 13 | |
| }], | |
| 6: [function(e, t, n) { | |
| "use strict"; | |
| Object.defineProperty(n, "__esModule", { | |
| value: !0 | |
| }), n.default = function() { | |
| var e = tt.createCanvas(); | |
| e.type = "canvas", e.getContext; | |
| return e.getBoundingClientRect = function() { | |
| return { | |
| top: 0, | |
| left: 0, | |
| width: window.innerWidth, | |
| height: window.innerHeight | |
| } | |
| }, e.style = { | |
| top: "0px", | |
| left: "0px", | |
| width: r.innerWidth + "px", | |
| height: r.innerHeight + "px" | |
| }, e.addEventListener = function(e, t) { | |
| document.addEventListener(e, t, 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : {}) | |
| }, e.removeEventListener = function(e, t) { | |
| document.removeEventListener(e, t) | |
| }, e.dispatchEvent = function() { | |
| var e = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {}; | |
| console.log("canvas.dispatchEvent", e.type, e) | |
| }, Object.defineProperty(e, "clientWidth", { | |
| enumerable: !0, | |
| get: function() { | |
| return r.innerWidth | |
| } | |
| }), Object.defineProperty(e, "clientHeight", { | |
| enumerable: !0, | |
| get: function() { | |
| return r.innerHeight | |
| } | |
| }), e | |
| }; | |
| var r = e("./WindowProperties") | |
| }, { | |
| "./WindowProperties": 24 | |
| }], | |
| 7: [function(e, t, n) { | |
| "use strict"; | |
| function o(e) { | |
| return (o = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { | |
| return typeof e | |
| } : function(e) { | |
| return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e | |
| })(e) | |
| } | |
| function a(e, t) { | |
| for (var n = 0; n < t.length; n++) { | |
| var r = t[n]; | |
| r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, f(r.key), r) | |
| } | |
| } | |
| function u(e, t) { | |
| return (u = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) { | |
| return e.__proto__ = t, e | |
| })(e, t) | |
| } | |
| function c(n) { | |
| var r = function() { | |
| if ("undefined" == typeof Reflect || !Reflect.construct) return !1; | |
| if (Reflect.construct.sham) return !1; | |
| if ("function" == typeof Proxy) return !0; | |
| try { | |
| return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})), !0 | |
| } catch (e) { | |
| return !1 | |
| } | |
| }(); | |
| return function() { | |
| var e, t = i(n), | |
| t = (e = r ? (e = i(this).constructor, Reflect.construct(t, arguments, e)) : t.apply(this, arguments), this); | |
| if (e && ("object" === o(e) || "function" == typeof e)) return e; | |
| if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); | |
| return l(t) | |
| } | |
| } | |
| function l(e) { | |
| if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
| return e | |
| } | |
| function i(e) { | |
| return (i = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) { | |
| return e.__proto__ || Object.getPrototypeOf(e) | |
| })(e) | |
| } | |
| function s(e, t, n) { | |
| (t = f(t)) in e ? Object.defineProperty(e, t, { | |
| value: n, | |
| enumerable: !0, | |
| configurable: !0, | |
| writable: !0 | |
| }) : e[t] = n | |
| } | |
| function f(e) { | |
| e = function(e, t) { | |
| if ("object" !== o(e) || null === e) return e; | |
| var n = e[Symbol.toPrimitive]; | |
| if (void 0 === n) return ("string" === t ? String : Number)(e); | |
| n = n.call(e, t || "default"); | |
| if ("object" !== o(n)) return n; | |
| throw new TypeError("@@toPrimitive must return a primitive value.") | |
| }(e, "string"); | |
| return "symbol" === o(e) ? e : String(e) | |
| } | |
| Object.defineProperty(n, "__esModule", { | |
| value: !0 | |
| }), n.default = void 0; | |
| e = function(e) { | |
| var t = i; | |
| if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); | |
| t.prototype = Object.create(e && e.prototype, { | |
| constructor: { | |
| value: t, | |
| writable: !0, | |
| configurable: !0 | |
| } | |
| }), Object.defineProperty(t, "prototype", { | |
| writable: !1 | |
| }), e && u(t, e); | |
| var n, r, o = c(i); | |
| function i() { | |
| var e; | |
| if (this instanceof i) return s(l(e = o.call(this)), "className", ""), s(l(e), "children", []), e; | |
| throw new TypeError("Cannot call a class as a function") | |
| } | |
| return t = i, n && a(t.prototype, n), r && a(t, r), Object.defineProperty(t, "prototype", { | |
| writable: !1 | |
| }), t | |
| }(((e = e("./Node")) && e.__esModule ? e : { | |
| default: e | |
| }).default); | |
| n.default = e | |
| }, { | |
| "./Node": 21 | |
| }], | |
| 8: [function(e, t, n) { | |
| "use strict"; | |
| function o(e) { | |
| return (o = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { | |
| return typeof e | |
| } : function(e) { | |
| return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e | |
| })(e) | |
| } | |
| function r(e, t) { | |
| for (var n = 0; n < t.length; n++) { | |
| var r = t[n]; | |
| r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, function(e) { | |
| e = function(e, t) { | |
| if ("object" !== o(e) || null === e) return e; | |
| var n = e[Symbol.toPrimitive]; | |
| if (void 0 === n) return ("string" === t ? String : Number)(e); | |
| n = n.call(e, t || "default"); | |
| if ("object" !== o(n)) return n; | |
| throw new TypeError("@@toPrimitive must return a primitive value.") | |
| }(e, "string"); | |
| return "symbol" === o(e) ? e : String(e) | |
| }(r.key), r) | |
| } | |
| } | |
| function i(e, t, n) { | |
| return t && r(e.prototype, t), n && r(e, n), Object.defineProperty(e, "prototype", { | |
| writable: !1 | |
| }), e | |
| } | |
| Object.defineProperty(n, "__esModule", { | |
| value: !0 | |
| }), n.default = void 0, n.default = i(function e() { | |
| if (!(this instanceof e)) throw new TypeError("Cannot call a class as a function") | |
| }) | |
| }, {}], | |
| 9: [function(e, t, n) { | |
| "use strict"; | |
| Object.defineProperty(n, "__esModule", { | |
| value: !0 | |
| }), n.default = void 0; | |
| var r = e("../util/index.js"); | |
| function o(e) { | |
| return (o = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { | |
| return typeof e | |
| } : function(e) { | |
| return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e | |
| })(e) | |
| } | |
| function i(e, t) { | |
| for (var n = 0; n < t.length; n++) { | |
| var r = t[n]; | |
| r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, c(r.key), r) | |
| } | |
| } | |
| function a(e, t, n) { | |
| return t && i(e.prototype, t), n && i(e, n), Object.defineProperty(e, "prototype", { | |
| writable: !1 | |
| }), e | |
| } | |
| function u(e, t, n) { | |
| (t = c(t)) in e ? Object.defineProperty(e, t, { | |
| value: n, | |
| enumerable: !0, | |
| configurable: !0, | |
| writable: !0 | |
| }) : e[t] = n | |
| } | |
| function c(e) { | |
| e = function(e, t) { | |
| if ("object" !== o(e) || null === e) return e; | |
| var n = e[Symbol.toPrimitive]; | |
| if (void 0 === n) return ("string" === t ? String : Number)(e); | |
| n = n.call(e, t || "default"); | |
| if ("object" !== o(n)) return n; | |
| throw new TypeError("@@toPrimitive must return a primitive value.") | |
| }(e, "string"); | |
| return "symbol" === o(e) ? e : String(e) | |
| } | |
| var l = a(function e(t) { | |
| if (!(this instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
| u(this, "touches", []), u(this, "targetTouches", []), u(this, "changedTouches", []), u(this, "preventDefault", r.noop), u(this, "stopPropagation", r.noop), this.type = t, this.target = window.canvas, this.currentTarget = window.canvas | |
| }); | |
| function s(n) { | |
| return function(e) { | |
| var t = new l(n); | |
| t.touches = e.touches, t.targetTouches = Array.prototype.slice.call(e.touches), t.changedTouches = e.changedTouches, t.timeStamp = e.timeStamp, document.dispatchEvent(t) | |
| } | |
| } | |
| n.default = l, tt.onTouchStart(s("touchstart")), tt.onTouchMove(s("touchmove")), tt.onTouchEnd(s("touchend")), tt.onTouchCancel(s("touchcancel")) | |
| }, { | |
| "../util/index.js": 31 | |
| }], | |
| 10: [function(e, t, n) { | |
| "use strict"; | |
| Object.defineProperty(n, "__esModule", { | |
| value: !0 | |
| }), Object.defineProperty(n, "MouseEvent", { | |
| enumerable: !0, | |
| get: function() { | |
| return o.default | |
| } | |
| }), Object.defineProperty(n, "TouchEvent", { | |
| enumerable: !0, | |
| get: function() { | |
| return r.default | |
| } | |
| }); | |
| var r = i(e("./TouchEvent")), | |
| o = i(e("./MouseEvent")); | |
| function i(e) { | |
| return e && e.__esModule ? e : { | |
| default: e | |
| } | |
| } | |
| }, { | |
| "./MouseEvent": 8, | |
| "./TouchEvent": 9 | |
| }], | |
| 11: [function(e, t, n) { | |
| "use strict"; | |
| function o(e) { | |
| return (o = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { | |
| return typeof e | |
| } : function(e) { | |
| return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e | |
| })(e) | |
| } | |
| function i(e, t) { | |
| for (var n = 0; n < t.length; n++) { | |
| var r = t[n]; | |
| r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, function(e) { | |
| e = function(e, t) { | |
| if ("object" !== o(e) || null === e) return e; | |
| var n = e[Symbol.toPrimitive]; | |
| if (void 0 === n) return ("string" === t ? String : Number)(e); | |
| n = n.call(e, t || "default"); | |
| if ("object" !== o(n)) return n; | |
| throw new TypeError("@@toPrimitive must return a primitive value.") | |
| }(e, "string"); | |
| return "symbol" === o(e) ? e : String(e) | |
| }(r.key), r) | |
| } | |
| } | |
| Object.defineProperty(n, "__esModule", { | |
| value: !0 | |
| }), n.default = void 0; | |
| var a = new WeakMap, | |
| r = function() { | |
| function e() { | |
| if (!(this instanceof e)) throw new TypeError("Cannot call a class as a function"); | |
| a.set(this, {}) | |
| } | |
| var t, n, r; | |
| return t = e, (n = [{ | |
| key: "addEventListener", | |
| value: function(e, t) { | |
| var n = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : {}, | |
| r = a.get(this); | |
| r || a.set(this, r = {}), r[e] || (r[e] = []), r[e].push(t), n.capture, n.once, n.passive | |
| } | |
| }, { | |
| key: "removeEventListener", | |
| value: function(e, t) { | |
| var n = a.get(this); | |
| if (n) { | |
| var r = n[e]; | |
| if (r && 0 < r.length) | |
| for (var o = r.length; o--;) | |
| if (r[o] === t) { | |
| r.splice(o, 1); | |
| break | |
| } | |
| } | |
| } | |
| }, { | |
| key: "dispatchEvent", | |
| value: function() { | |
| var e = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {}, | |
| t = a.get(this)[e.type]; | |
| if (t) | |
| for (var n = 0; n < t.length; n++) t[n](e) | |
| } | |
| }]) && i(t.prototype, n), r && i(t, r), Object.defineProperty(t, "prototype", { | |
| writable: !1 | |
| }), e | |
| }(); | |
| n.default = r | |
| }, {}], | |
| 12: [function(e, t, n) { | |
| "use strict"; | |
| function o(e) { | |
| return (o = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { | |
| return typeof e | |
| } : function(e) { | |
| return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e | |
| })(e) | |
| } | |
| function i(e, t) { | |
| for (var n = 0; n < t.length; n++) { | |
| var r = t[n]; | |
| r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, function(e) { | |
| e = function(e, t) { | |
| if ("object" !== o(e) || null === e) return e; | |
| var n = e[Symbol.toPrimitive]; | |
| if (void 0 === n) return ("string" === t ? String : Number)(e); | |
| n = n.call(e, t || "default"); | |
| if ("object" !== o(n)) return n; | |
| throw new TypeError("@@toPrimitive must return a primitive value.") | |
| }(e, "string"); | |
| return "symbol" === o(e) ? e : String(e) | |
| }(r.key), r) | |
| } | |
| } | |
| Object.defineProperty(n, "__esModule", { | |
| value: !0 | |
| }), n.default = void 0; | |
| var r = function() { | |
| function e() { | |
| if (!(this instanceof e)) throw new TypeError("Cannot call a class as a function") | |
| } | |
| var t, n, r; | |
| return t = e, (n = [{ | |
| key: "construct", | |
| value: function() {} | |
| }]) && i(t.prototype, n), r && i(t, r), Object.defineProperty(t, "prototype", { | |
| writable: !1 | |
| }), e | |
| }(); | |
| n.default = r | |
| }, {}], | |
| 13: [function(e, t, n) { | |
| "use strict"; | |
| function o(e) { | |
| return (o = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { | |
| return typeof e | |
| } : function(e) { | |
| return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e | |
| })(e) | |
| } | |
| function a(e, t) { | |
| for (var n = 0; n < t.length; n++) { | |
| var r = t[n]; | |
| r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, function(e) { | |
| e = function(e, t) { | |
| if ("object" !== o(e) || null === e) return e; | |
| var n = e[Symbol.toPrimitive]; | |
| if (void 0 === n) return ("string" === t ? String : Number)(e); | |
| n = n.call(e, t || "default"); | |
| if ("object" !== o(n)) return n; | |
| throw new TypeError("@@toPrimitive must return a primitive value.") | |
| }(e, "string"); | |
| return "symbol" === o(e) ? e : String(e) | |
| }(r.key), r) | |
| } | |
| } | |
| function u(e, t) { | |
| return (u = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) { | |
| return e.__proto__ = t, e | |
| })(e, t) | |
| } | |
| function c(n) { | |
| var r = function() { | |
| if ("undefined" == typeof Reflect || !Reflect.construct) return !1; | |
| if (Reflect.construct.sham) return !1; | |
| if ("function" == typeof Proxy) return !0; | |
| try { | |
| return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})), !0 | |
| } catch (e) { | |
| return !1 | |
| } | |
| }(); | |
| return function() { | |
| var e, t = i(n), | |
| t = (e = r ? (e = i(this).constructor, Reflect.construct(t, arguments, e)) : t.apply(this, arguments), this); | |
| if (e && ("object" === o(e) || "function" == typeof e)) return e; | |
| if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); | |
| if (void 0 !== t) return t; | |
| throw new ReferenceError("this hasn't been initialised - super() hasn't been called") | |
| } | |
| } | |
| function i(e) { | |
| return (i = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) { | |
| return e.__proto__ || Object.getPrototypeOf(e) | |
| })(e) | |
| } | |
| Object.defineProperty(n, "__esModule", { | |
| value: !0 | |
| }), n.default = void 0; | |
| e = function(e) { | |
| var t = i; | |
| if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); | |
| t.prototype = Object.create(e && e.prototype, { | |
| constructor: { | |
| value: t, | |
| writable: !0, | |
| configurable: !0 | |
| } | |
| }), Object.defineProperty(t, "prototype", { | |
| writable: !1 | |
| }), e && u(t, e); | |
| var n, r, o = c(i); | |
| function i() { | |
| if (this instanceof i) return o.call(this, "audio"); | |
| throw new TypeError("Cannot call a class as a function") | |
| } | |
| return t = i, n && a(t.prototype, n), r && a(t, r), Object.defineProperty(t, "prototype", { | |
| writable: !1 | |
| }), t | |
| }(((e = e("./HTMLMediaElement")) && e.__esModule ? e : { | |
| default: e | |
| }).default); | |
| n.default = e | |
| }, { | |
| "./HTMLMediaElement": 17 | |
| }], | |
| 14: [function(e, t, n) { | |
| "use strict"; | |
| Object.defineProperty(n, "__esModule", { | |
| value: !0 | |
| }), n.default = void 0; | |
| e = (e = e("./Canvas")) && e.__esModule ? e : { | |
| default: e | |
| }; | |
| GameGlobal.screencanvas = GameGlobal.screencanvas || new e.default; | |
| e = GameGlobal.screencanvas.constructor; | |
| n.default = e | |
| }, { | |
| "./Canvas": 6 | |
| }], | |
| 15: [function(e, t, n) { | |
| "use strict"; | |
| Object.defineProperty(n, "__esModule", { | |
| value: !0 | |
| }), n.default = void 0; | |
| var r = (r = e("./Element")) && r.__esModule ? r : { | |
| default: r | |
| }, | |
| i = e("./util/index.js"), | |
| a = e("./WindowProperties"); | |
| function o(e) { | |
| return (o = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { | |
| return typeof e | |
| } : function(e) { | |
| return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e | |
| })(e) | |
| } | |
| function u(e, t) { | |
| for (var n = 0; n < t.length; n++) { | |
| var r = t[n]; | |
| r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, d(r.key), r) | |
| } | |
| } | |
| function c(e, t) { | |
| return (c = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) { | |
| return e.__proto__ = t, e | |
| })(e, t) | |
| } | |
| function l(n) { | |
| var r = function() { | |
| if ("undefined" == typeof Reflect || !Reflect.construct) return !1; | |
| if (Reflect.construct.sham) return !1; | |
| if ("function" == typeof Proxy) return !0; | |
| try { | |
| return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})), !0 | |
| } catch (e) { | |
| return !1 | |
| } | |
| }(); | |
| return function() { | |
| var e, t = f(n), | |
| t = (e = r ? (e = f(this).constructor, Reflect.construct(t, arguments, e)) : t.apply(this, arguments), this); | |
| if (e && ("object" === o(e) || "function" == typeof e)) return e; | |
| if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); | |
| return s(t) | |
| } | |
| } | |
| function s(e) { | |
| if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
| return e | |
| } | |
| function f(e) { | |
| return (f = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) { | |
| return e.__proto__ || Object.getPrototypeOf(e) | |
| })(e) | |
| } | |
| function p(e, t, n) { | |
| (t = d(t)) in e ? Object.defineProperty(e, t, { | |
| value: n, | |
| enumerable: !0, | |
| configurable: !0, | |
| writable: !0 | |
| }) : e[t] = n | |
| } | |
| function d(e) { | |
| e = function(e, t) { | |
| if ("object" !== o(e) || null === e) return e; | |
| var n = e[Symbol.toPrimitive]; | |
| if (void 0 === n) return ("string" === t ? String : Number)(e); | |
| n = n.call(e, t || "default"); | |
| if ("object" !== o(n)) return n; | |
| throw new TypeError("@@toPrimitive must return a primitive value.") | |
| }(e, "string"); | |
| return "symbol" === o(e) ? e : String(e) | |
| } | |
| e = function(e) { | |
| var t = o; | |
| if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); | |
| t.prototype = Object.create(e && e.prototype, { | |
| constructor: { | |
| value: t, | |
| writable: !0, | |
| configurable: !0 | |
| } | |
| }), Object.defineProperty(t, "prototype", { | |
| writable: !1 | |
| }), e && c(t, e); | |
| var n, r = l(o); | |
| function o() { | |
| var e = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : "", | |
| t = this, | |
| n = o; | |
| if (t instanceof n) return p(s(t = r.call(this)), "className", ""), p(s(t), "childern", []), p(s(t), "style", { | |
| width: "".concat(a.innerWidth, "px"), | |
| height: "".concat(a.innerHeight, "px") | |
| }), p(s(t), "insertBefore", i.noop), p(s(t), "innerHTML", ""), t.tagName = e.toUpperCase(), t; | |
| throw new TypeError("Cannot call a class as a function") | |
| } | |
| return t = o, (e = [{ | |
| key: "setAttribute", | |
| value: function(e, t) { | |
| this[e] = t | |
| } | |
| }, { | |
| key: "getAttribute", | |
| value: function(e) { | |
| return this[e] | |
| } | |
| }, { | |
| key: "clientWidth", | |
| get: function() { | |
| var e = parseInt(this.style.fontSize, 10) * this.innerHTML.length; | |
| return Number.isNaN(e) ? 0 : e | |
| } | |
| }, { | |
| key: "clientHeight", | |
| get: function() { | |
| var e = parseInt(this.style.fontSize, 10); | |
| return Number.isNaN(e) ? 0 : e | |
| } | |
| }, { | |
| key: "getBoundingClientRect", | |
| value: function() { | |
| return { | |
| top: 0, | |
| left: 0, | |
| width: a.innerWidth, | |
| height: a.innerHeight | |
| } | |
| } | |
| }, { | |
| key: "focus", | |
| value: function() {} | |
| }]) && u(t.prototype, e), n && u(t, n), Object.defineProperty(t, "prototype", { | |
| writable: !1 | |
| }), o | |
| }(r.default); | |
| n.default = e | |
| }, { | |
| "./Element": 7, | |
| "./WindowProperties": 24, | |
| "./util/index.js": 31 | |
| }], | |
| 16: [function(e, t, n) { | |
| "use strict"; | |
| Object.defineProperty(n, "__esModule", { | |
| value: !0 | |
| }), n.default = void 0; | |
| var r = tt.createImage().constructor; | |
| n.default = r | |
| }, {}], | |
| 17: [function(e, t, n) { | |
| "use strict"; | |
| function o(e) { | |
| return (o = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { | |
| return typeof e | |
| } : function(e) { | |
| return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e | |
| })(e) | |
| } | |
| function i(e, t) { | |
| for (var n = 0; n < t.length; n++) { | |
| var r = t[n]; | |
| r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, function(e) { | |
| e = function(e, t) { | |
| if ("object" !== o(e) || null === e) return e; | |
| var n = e[Symbol.toPrimitive]; | |
| if (void 0 === n) return ("string" === t ? String : Number)(e); | |
| n = n.call(e, t || "default"); | |
| if ("object" !== o(n)) return n; | |
| throw new TypeError("@@toPrimitive must return a primitive value.") | |
| }(e, "string"); | |
| return "symbol" === o(e) ? e : String(e) | |
| }(r.key), r) | |
| } | |
| } | |
| function a(e, t) { | |
| return (a = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) { | |
| return e.__proto__ = t, e | |
| })(e, t) | |
| } | |
| function u(n) { | |
| var r = function() { | |
| if ("undefined" == typeof Reflect || !Reflect.construct) return !1; | |
| if (Reflect.construct.sham) return !1; | |
| if ("function" == typeof Proxy) return !0; | |
| try { | |
| return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})), !0 | |
| } catch (e) { | |
| return !1 | |
| } | |
| }(); | |
| return function() { | |
| var e, t = c(n), | |
| t = (e = r ? (e = c(this).constructor, Reflect.construct(t, arguments, e)) : t.apply(this, arguments), this); | |
| if (e && ("object" === o(e) || "function" == typeof e)) return e; | |
| if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); | |
| if (void 0 !== t) return t; | |
| throw new ReferenceError("this hasn't been initialised - super() hasn't been called") | |
| } | |
| } | |
| function c(e) { | |
| return (c = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) { | |
| return e.__proto__ || Object.getPrototypeOf(e) | |
| })(e) | |
| } | |
| Object.defineProperty(n, "__esModule", { | |
| value: !0 | |
| }), n.default = void 0; | |
| e = function(e) { | |
| var t = o; | |
| if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); | |
| t.prototype = Object.create(e && e.prototype, { | |
| constructor: { | |
| value: t, | |
| writable: !0, | |
| configurable: !0 | |
| } | |
| }), Object.defineProperty(t, "prototype", { | |
| writable: !1 | |
| }), e && a(t, e); | |
| var n, r = u(o); | |
| function o(e) { | |
| if (this instanceof o) return r.call(this, e); | |
| throw new TypeError("Cannot call a class as a function") | |
| } | |
| return t = o, (e = [{ | |
| key: "addTextTrack", | |
| value: function() {} | |
| }, { | |
| key: "captureStream", | |
| value: function() {} | |
| }, { | |
| key: "fastSeek", | |
| value: function() {} | |
| }, { | |
| key: "load", | |
| value: function() {} | |
| }, { | |
| key: "pause", | |
| value: function() {} | |
| }, { | |
| key: "play", | |
| value: function() {} | |
| }]) && i(t.prototype, e), n && i(t, n), Object.defineProperty(t, "prototype", { | |
| writable: !1 | |
| }), o | |
| }(((e = e("./HTMLElement")) && e.__esModule ? e : { | |
| default: e | |
| }).default); | |
| n.default = e | |
| }, { | |
| "./HTMLElement": 15 | |
| }], | |
| 18: [function(e, t, n) { | |
| "use strict"; | |
| function o(e) { | |
| return (o = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { | |
| return typeof e | |
| } : function(e) { | |
| return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e | |
| })(e) | |
| } | |
| function a(e, t) { | |
| for (var n = 0; n < t.length; n++) { | |
| var r = t[n]; | |
| r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, function(e) { | |
| e = function(e, t) { | |
| if ("object" !== o(e) || null === e) return e; | |
| var n = e[Symbol.toPrimitive]; | |
| if (void 0 === n) return ("string" === t ? String : Number)(e); | |
| n = n.call(e, t || "default"); | |
| if ("object" !== o(n)) return n; | |
| throw new TypeError("@@toPrimitive must return a primitive value.") | |
| }(e, "string"); | |
| return "symbol" === o(e) ? e : String(e) | |
| }(r.key), r) | |
| } | |
| } | |
| function u(e, t) { | |
| return (u = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) { | |
| return e.__proto__ = t, e | |
| })(e, t) | |
| } | |
| function c(n) { | |
| var r = function() { | |
| if ("undefined" == typeof Reflect || !Reflect.construct) return !1; | |
| if (Reflect.construct.sham) return !1; | |
| if ("function" == typeof Proxy) return !0; | |
| try { | |
| return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})), !0 | |
| } catch (e) { | |
| return !1 | |
| } | |
| }(); | |
| return function() { | |
| var e, t = i(n), | |
| t = (e = r ? (e = i(this).constructor, Reflect.construct(t, arguments, e)) : t.apply(this, arguments), this); | |
| if (e && ("object" === o(e) || "function" == typeof e)) return e; | |
| if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); | |
| if (void 0 !== t) return t; | |
| throw new ReferenceError("this hasn't been initialised - super() hasn't been called") | |
| } | |
| } | |
| function i(e) { | |
| return (i = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) { | |
| return e.__proto__ || Object.getPrototypeOf(e) | |
| })(e) | |
| } | |
| Object.defineProperty(n, "__esModule", { | |
| value: !0 | |
| }), n.default = void 0; | |
| e = function(e) { | |
| var t = i; | |
| if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); | |
| t.prototype = Object.create(e && e.prototype, { | |
| constructor: { | |
| value: t, | |
| writable: !0, | |
| configurable: !0 | |
| } | |
| }), Object.defineProperty(t, "prototype", { | |
| writable: !1 | |
| }), e && u(t, e); | |
| var n, r, o = c(i); | |
| function i() { | |
| if (this instanceof i) return o.call(this, "video"); | |
| throw new TypeError("Cannot call a class as a function") | |
| } | |
| return t = i, n && a(t.prototype, n), r && a(t, r), Object.defineProperty(t, "prototype", { | |
| writable: !1 | |
| }), t | |
| }(((e = e("./HTMLMediaElement")) && e.__esModule ? e : { | |
| default: e | |
| }).default); | |
| n.default = e | |
| }, { | |
| "./HTMLMediaElement": 17 | |
| }], | |
| 19: [function(e, t, n) { | |
| "use strict"; | |
| Object.defineProperty(n, "__esModule", { | |
| value: !0 | |
| }), n.default = function() { | |
| return tt.createImage() | |
| } | |
| }, {}], | |
| 20: [function(e, t, n) { | |
| "use strict"; | |
| function o(e) { | |
| return (o = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { | |
| return typeof e | |
| } : function(e) { | |
| return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e | |
| })(e) | |
| } | |
| function r(e, t) { | |
| for (var n = 0; n < t.length; n++) { | |
| var r = t[n]; | |
| r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, function(e) { | |
| e = function(e, t) { | |
| if ("object" !== o(e) || null === e) return e; | |
| var n = e[Symbol.toPrimitive]; | |
| if (void 0 === n) return ("string" === t ? String : Number)(e); | |
| n = n.call(e, t || "default"); | |
| if ("object" !== o(n)) return n; | |
| throw new TypeError("@@toPrimitive must return a primitive value.") | |
| }(e, "string"); | |
| return "symbol" === o(e) ? e : String(e) | |
| }(r.key), r) | |
| } | |
| } | |
| function i(e, t, n) { | |
| return t && r(e.prototype, t), n && r(e, n), Object.defineProperty(e, "prototype", { | |
| writable: !1 | |
| }), e | |
| } | |
| Object.defineProperty(n, "__esModule", { | |
| value: !0 | |
| }), n.default = void 0, n.default = i(function e() { | |
| if (!(this instanceof e)) throw new TypeError("Cannot call a class as a function") | |
| }) | |
| }, {}], | |
| 21: [function(e, t, n) { | |
| "use strict"; | |
| function o(e) { | |
| return (o = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { | |
| return typeof e | |
| } : function(e) { | |
| return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e | |
| })(e) | |
| } | |
| function r(e, t) { | |
| for (var n = 0; n < t.length; n++) { | |
| var r = t[n]; | |
| r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, l(r.key), r) | |
| } | |
| } | |
| function a(e, t) { | |
| return (a = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) { | |
| return e.__proto__ = t, e | |
| })(e, t) | |
| } | |
| function u(n) { | |
| var r = function() { | |
| if ("undefined" == typeof Reflect || !Reflect.construct) return !1; | |
| if (Reflect.construct.sham) return !1; | |
| if ("function" == typeof Proxy) return !0; | |
| try { | |
| return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})), !0 | |
| } catch (e) { | |
| return !1 | |
| } | |
| }(); | |
| return function() { | |
| var e, t = i(n), | |
| t = (e = r ? (e = i(this).constructor, Reflect.construct(t, arguments, e)) : t.apply(this, arguments), this); | |
| if (e && ("object" === o(e) || "function" == typeof e)) return e; | |
| if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); | |
| return c(t) | |
| } | |
| } | |
| function c(e) { | |
| if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
| return e | |
| } | |
| function i(e) { | |
| return (i = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) { | |
| return e.__proto__ || Object.getPrototypeOf(e) | |
| })(e) | |
| } | |
| function l(e) { | |
| e = function(e, t) { | |
| if ("object" !== o(e) || null === e) return e; | |
| var n = e[Symbol.toPrimitive]; | |
| if (void 0 === n) return ("string" === t ? String : Number)(e); | |
| n = n.call(e, t || "default"); | |
| if ("object" !== o(n)) return n; | |
| throw new TypeError("@@toPrimitive must return a primitive value.") | |
| }(e, "string"); | |
| return "symbol" === o(e) ? e : String(e) | |
| } | |
| Object.defineProperty(n, "__esModule", { | |
| value: !0 | |
| }), n.default = void 0; | |
| e = function(e) { | |
| var t = i; | |
| if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); | |
| t.prototype = Object.create(e && e.prototype, { | |
| constructor: { | |
| value: t, | |
| writable: !0, | |
| configurable: !0 | |
| } | |
| }), Object.defineProperty(t, "prototype", { | |
| writable: !1 | |
| }), e && a(t, e); | |
| var n, o = u(i); | |
| function i() { | |
| var e, t, n, r; | |
| if (this instanceof i) return e = o.call(this), t = c(e), r = [], (n = l(n = "childNodes")) in t ? Object.defineProperty(t, n, { | |
| value: r, | |
| enumerable: !0, | |
| configurable: !0, | |
| writable: !0 | |
| }) : t[n] = r, e; | |
| throw new TypeError("Cannot call a class as a function") | |
| } | |
| return t = i, (e = [{ | |
| key: "appendChild", | |
| value: function(e) { | |
| this.childNodes.push(e) | |
| } | |
| }, { | |
| key: "cloneNode", | |
| value: function() { | |
| var e = Object.create(this); | |
| return Object.assign(e, this), e | |
| } | |
| }, { | |
| key: "removeChild", | |
| value: function(t) { | |
| var e = this.childNodes.findIndex(function(e) { | |
| return e === t | |
| }); | |
| return -1 < e ? this.childNodes.splice(e, 1) : null | |
| } | |
| }]) && r(t.prototype, e), n && r(t, n), Object.defineProperty(t, "prototype", { | |
| writable: !1 | |
| }), i | |
| }(((e = e("./EventTarget.js")) && e.__esModule ? e : { | |
| default: e | |
| }).default); | |
| n.default = e | |
| }, { | |
| "./EventTarget.js": 11 | |
| }], | |
| 22: [function(e, t, n) { | |
| "use strict"; | |
| function o(e) { | |
| return (o = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { | |
| return typeof e | |
| } : function(e) { | |
| return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e | |
| })(e) | |
| } | |
| function r(e, t) { | |
| for (var n = 0; n < t.length; n++) { | |
| var r = t[n]; | |
| r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, function(e) { | |
| e = function(e, t) { | |
| if ("object" !== o(e) || null === e) return e; | |
| var n = e[Symbol.toPrimitive]; | |
| if (void 0 === n) return ("string" === t ? String : Number)(e); | |
| n = n.call(e, t || "default"); | |
| if ("object" !== o(n)) return n; | |
| throw new TypeError("@@toPrimitive must return a primitive value.") | |
| }(e, "string"); | |
| return "symbol" === o(e) ? e : String(e) | |
| }(r.key), r) | |
| } | |
| } | |
| function i(e, t, n) { | |
| return t && r(e.prototype, t), n && r(e, n), Object.defineProperty(e, "prototype", { | |
| writable: !1 | |
| }), e | |
| } | |
| Object.defineProperty(n, "__esModule", { | |
| value: !0 | |
| }), n.default = void 0, n.default = i(function e() { | |
| if (!(this instanceof e)) throw new TypeError("Cannot call a class as a function") | |
| }) | |
| }, {}], | |
| 23: [function(e, t, n) { | |
| "use strict"; | |
| function r(e) { | |
| return (r = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { | |
| return typeof e | |
| } : function(e) { | |
| return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e | |
| })(e) | |
| } | |
| function o(e, t) { | |
| for (var n = 0; n < t.length; n++) { | |
| var r = t[n]; | |
| r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, i(r.key), r) | |
| } | |
| } | |
| function a(e, t, n) { | |
| (t = i(t)) in e ? Object.defineProperty(e, t, { | |
| value: n, | |
| enumerable: !0, | |
| configurable: !0, | |
| writable: !0 | |
| }) : e[t] = n | |
| } | |
| function i(e) { | |
| e = function(e, t) { | |
| if ("object" !== r(e) || null === e) return e; | |
| var n = e[Symbol.toPrimitive]; | |
| if (void 0 === n) return ("string" === t ? String : Number)(e); | |
| n = n.call(e, t || "default"); | |
| if ("object" !== r(n)) return n; | |
| throw new TypeError("@@toPrimitive must return a primitive value.") | |
| }(e, "string"); | |
| return "symbol" === r(e) ? e : String(e) | |
| } | |
| Object.defineProperty(n, "__esModule", { | |
| value: !0 | |
| }), n.default = void 0; | |
| var u = new WeakMap, | |
| c = function() { | |
| function i(e) { | |
| var t = this, | |
| n = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : [], | |
| r = this, | |
| o = i; | |
| if (!(r instanceof o)) throw new TypeError("Cannot call a class as a function"); | |
| if (a(this, "binaryType", ""), a(this, "bufferedAmount", 0), a(this, "extensions", ""), a(this, "onclose", null), a(this, "onerror", null), a(this, "onmessage", null), a(this, "onopen", null), a(this, "protocol", ""), a(this, "readyState", 3), "string" != typeof e || !/(^ws:\/\/)|(^wss:\/\/)/.test(e)) throw new TypeError("Failed to construct 'WebSocket': The URL '".concat(e, "' is invalid")); | |
| this.url = e, this.readyState = i.CONNECTING; | |
| r = tt.connectSocket({ | |
| url: e, | |
| protocols: Array.isArray(n) ? n : [n], | |
| tcpNoDelay: !0 | |
| }); | |
| return u.set(this, r), r.onClose(function(e) { | |
| t.readyState = i.CLOSED, "function" == typeof t.onclose && t.onclose(e) | |
| }), r.onMessage(function(e) { | |
| "function" == typeof t.onmessage && t.onmessage(e) | |
| }), r.onOpen(function() { | |
| t.readyState = i.OPEN, "function" == typeof t.onopen && t.onopen() | |
| }), r.onError(function(e) { | |
| "function" == typeof t.onerror && t.onerror(new Error(e.errMsg)) | |
| }), this | |
| } | |
| var e, t, n; | |
| return e = i, (t = [{ | |
| key: "close", | |
| value: function(e, t) { | |
| this.readyState = i.CLOSING, u.get(this).close({ | |
| code: e, | |
| reason: t | |
| }) | |
| } | |
| }, { | |
| key: "send", | |
| value: function(e) { | |
| if (!("string" == typeof e || e instanceof ArrayBuffer || ArrayBuffer.isView(e))) throw new TypeError("Failed to send message: The data ".concat(e, " is invalid")); | |
| u.get(this).send({ | |
| data: e | |
| }) | |
| } | |
| }]) && o(e.prototype, t), n && o(e, n), Object.defineProperty(e, "prototype", { | |
| writable: !1 | |
| }), i | |
| }(); | |
| a(n.default = c, "CONNECTING", 0), a(c, "OPEN", 1), a(c, "CLOSING", 2), a(c, "CLOSED", 3) | |
| }, {}], | |
| 24: [function(e, t, n) { | |
| "use strict"; | |
| Object.defineProperty(n, "__esModule", { | |
| value: !0 | |
| }), n.screen = n.performance = n.ontouchstart = n.ontouchmove = n.ontouchend = n.innerWidth = n.innerHeight = n.devicePixelRatio = void 0; | |
| var r = tt.getSystemInfoSync(), | |
| o = r.screenWidth, | |
| i = r.screenHeight, | |
| r = r.devicePixelRatio, | |
| r = (n.devicePixelRatio = r, o), | |
| a = i, | |
| o = { | |
| width: o, | |
| height: i, | |
| availWidth: n.innerWidth = r, | |
| availHeight: n.innerHeight = a, | |
| availLeft: 0, | |
| availTop: 0 | |
| }, | |
| i = (n.screen = o, { | |
| now: Date.now | |
| }); | |
| n.performance = i, n.ontouchstart = null, n.ontouchmove = null; | |
| n.ontouchend = null | |
| }, {}], | |
| 25: [function(e, t, n) { | |
| "use strict"; | |
| Object.defineProperty(n, "__esModule", { | |
| value: !0 | |
| }), n.default = void 0; | |
| e = (e = e("./EventTarget.js")) && e.__esModule ? e : { | |
| default: e | |
| }; | |
| function o(e) { | |
| return (o = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { | |
| return typeof e | |
| } : function(e) { | |
| return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e | |
| })(e) | |
| } | |
| function i(e, t) { | |
| for (var n = 0; n < t.length; n++) { | |
| var r = t[n]; | |
| r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, f(r.key), r) | |
| } | |
| } | |
| function a(e, t) { | |
| return (a = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) { | |
| return e.__proto__ = t, e | |
| })(e, t) | |
| } | |
| function c(n) { | |
| var r = function() { | |
| if ("undefined" == typeof Reflect || !Reflect.construct) return !1; | |
| if (Reflect.construct.sham) return !1; | |
| if ("function" == typeof Proxy) return !0; | |
| try { | |
| return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})), !0 | |
| } catch (e) { | |
| return !1 | |
| } | |
| }(); | |
| return function() { | |
| var e, t = u(n), | |
| t = (e = r ? (e = u(this).constructor, Reflect.construct(t, arguments, e)) : t.apply(this, arguments), this); | |
| if (e && ("object" === o(e) || "function" == typeof e)) return e; | |
| if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); | |
| return l(t) | |
| } | |
| } | |
| function l(e) { | |
| if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
| return e | |
| } | |
| function u(e) { | |
| return (u = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) { | |
| return e.__proto__ || Object.getPrototypeOf(e) | |
| })(e) | |
| } | |
| function s(e, t, n) { | |
| (t = f(t)) in e ? Object.defineProperty(e, t, { | |
| value: n, | |
| enumerable: !0, | |
| configurable: !0, | |
| writable: !0 | |
| }) : e[t] = n | |
| } | |
| function f(e) { | |
| e = function(e, t) { | |
| if ("object" !== o(e) || null === e) return e; | |
| var n = e[Symbol.toPrimitive]; | |
| if (void 0 === n) return ("string" === t ? String : Number)(e); | |
| n = n.call(e, t || "default"); | |
| if ("object" !== o(n)) return n; | |
| throw new TypeError("@@toPrimitive must return a primitive value.") | |
| }(e, "string"); | |
| return "symbol" === o(e) ? e : String(e) | |
| } | |
| var p = new WeakMap, | |
| d = new WeakMap, | |
| m = new WeakMap, | |
| y = new WeakMap, | |
| h = new WeakMap; | |
| function b(e) { | |
| if ("function" == typeof this["on".concat(e)]) { | |
| for (var t = arguments.length, n = new Array(1 < t ? t - 1 : 0), r = 1; r < t; r++) n[r - 1] = arguments[r]; | |
| this["on".concat(e)].apply(this, n) | |
| } | |
| } | |
| function v(e) { | |
| this.readyState = e, b.call(this, "readystatechange") | |
| } | |
| e = function(e) { | |
| var t = u; | |
| if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); | |
| t.prototype = Object.create(e && e.prototype, { | |
| constructor: { | |
| value: t, | |
| writable: !0, | |
| configurable: !0 | |
| } | |
| }), Object.defineProperty(t, "prototype", { | |
| writable: !1 | |
| }), e && a(t, e); | |
| var n, r = c(u); | |
| function u() { | |
| var e; | |
| if (this instanceof u) return s(l(e = r.call(this)), "onabort", null), s(l(e), "onerror", null), s(l(e), "onload", null), s(l(e), "onloadstart", null), s(l(e), "onprogress", null), s(l(e), "ontimeout", null), s(l(e), "onloadend", null), s(l(e), "onreadystatechange", null), s(l(e), "readyState", 0), s(l(e), "response", null), s(l(e), "responseText", null), s(l(e), "responseType", ""), s(l(e), "responseXML", null), s(l(e), "status", 0), s(l(e), "statusText", ""), s(l(e), "upload", {}), s(l(e), "withCredentials", !1), m.set(l(e), { | |
| "content-type": "application/x-www-form-urlencoded" | |
| }), y.set(l(e), {}), e; | |
| throw new TypeError("Cannot call a class as a function") | |
| } | |
| return t = u, (e = [{ | |
| key: "abort", | |
| value: function() { | |
| var e = h.get(this); | |
| e && e.abort() | |
| } | |
| }, { | |
| key: "getAllResponseHeaders", | |
| value: function() { | |
| var t = y.get(this); | |
| return Object.keys(t).map(function(e) { | |
| return "".concat(e, ": ").concat(t[e]) | |
| }).join("\n") | |
| } | |
| }, { | |
| key: "getResponseHeader", | |
| value: function(e) { | |
| return y.get(this)[e] | |
| } | |
| }, { | |
| key: "open", | |
| value: function(e, t) { | |
| d.set(this, e), p.set(this, t), v.call(this, u.OPENED) | |
| } | |
| }, { | |
| key: "overrideMimeType", | |
| value: function() {} | |
| }, { | |
| key: "send", | |
| value: function() { | |
| var a = this, | |
| e = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : ""; | |
| if (this.readyState !== u.OPENED) throw new Error("Failed to execute 'send' on 'XMLHttpRequest': The object's state must be OPENED."); | |
| e = tt.request({ | |
| data: e, | |
| url: p.get(this), | |
| method: d.get(this), | |
| header: m.get(this), | |
| dataType: "other", | |
| responseType: "arraybuffer" === this.responseType ? "arraybuffer" : "text", | |
| success: function(e) { | |
| var t = e.data, | |
| n = e.statusCode, | |
| e = e.header; | |
| switch (a.status = n, y.set(a, e), b.call(a, "loadstart"), v.call(a, u.HEADERS_RECEIVED), v.call(a, u.LOADING), a.responseType) { | |
| case "json": | |
| a.responseText = t; | |
| try { | |
| a.response = JSON.parse(t) | |
| } catch (e) { | |
| a.response = null | |
| } | |
| break; | |
| case "": | |
| case "text": | |
| a.responseText = a.response = t; | |
| break; | |
| case "arraybuffer": | |
| a.response = t, a.responseText = ""; | |
| for (var r = new Uint8Array(t), o = r.byteLength, i = 0; i < o; i++) a.responseText += String.fromCharCode(r[i]); | |
| break; | |
| default: | |
| a.response = null | |
| } | |
| v.call(a, u.DONE), b.call(a, "load"), b.call(a, "loadend") | |
| }, | |
| fail: function(e) { | |
| e = e.errMsg; - 1 !== e.indexOf("abort") ? b.call(a, "abort") : -1 !== e.indexOf("timeout") ? b.call(a, "timeout") : b.call(a, "error", e), b.call(a, "loadend") | |
| } | |
| }); | |
| h.set(this, e) | |
| } | |
| }, { | |
| key: "setRequestHeader", | |
| value: function(e, t) { | |
| var n = m.get(this); | |
| n[e] = t, m.set(this, n) | |
| } | |
| }, { | |
| key: "addEventListener", | |
| value: function(e, t) { | |
| var n; | |
| "function" == typeof t && (n = this, this["on" + e] = function(e) { | |
| t.call(n, e) | |
| }) | |
| } | |
| }]) && i(t.prototype, e), n && i(t, n), Object.defineProperty(t, "prototype", { | |
| writable: !1 | |
| }), u | |
| }(e.default); | |
| s(n.default = e, "UNSEND", 0), s(e, "OPENED", 1), s(e, "HEADERS_RECEIVED", 2), s(e, "LOADING", 3), s(e, "DONE", 4) | |
| }, { | |
| "./EventTarget.js": 11 | |
| }], | |
| 26: [function(e, t, n) { | |
| "use strict"; | |
| function a(e) { | |
| return (a = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { | |
| return typeof e | |
| } : function(e) { | |
| return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e | |
| })(e) | |
| } | |
| Object.defineProperty(n, "__esModule", { | |
| value: !0 | |
| }), n.default = void 0; | |
| var r = function(e, t) { | |
| if (!t && e && e.__esModule) return e; | |
| if (null === e || "object" !== a(e) && "function" != typeof e) return { | |
| default: e | |
| }; | |
| t = f(t); | |
| if (t && t.has(e)) return t.get(e); | |
| var n, r = {}, | |
| o = Object.defineProperty && Object.getOwnPropertyDescriptor; | |
| for (n in e) { | |
| var i; | |
| "default" !== n && Object.prototype.hasOwnProperty.call(e, n) && ((i = o ? Object.getOwnPropertyDescriptor(e, n) : null) && (i.get || i.set) ? Object.defineProperty(r, n, i) : r[n] = e[n]) | |
| } | |
| r.default = e, t && t.set(e, r); | |
| return r | |
| }(e("./window")), | |
| o = s(e("./HTMLElement")), | |
| i = s(e("./HTMLVideoElement")), | |
| u = s(e("./Image")), | |
| c = s(e("./Audio")), | |
| l = s(e("./Canvas")); | |
| function s(e) { | |
| return e && e.__esModule ? e : { | |
| default: e | |
| } | |
| } | |
| function f(e) { | |
| var t, n; | |
| return "function" != typeof WeakMap ? null : (t = new WeakMap, n = new WeakMap, (f = function(e) { | |
| return e ? n : t | |
| })(e)) | |
| } | |
| e("./EventIniter/index.js"); | |
| var p = {}, | |
| d = { | |
| readyState: "complete", | |
| visibilityState: "visible", | |
| documentElement: r, | |
| hidden: !1, | |
| style: {}, | |
| location: r.location, | |
| ontouchstart: null, | |
| ontouchmove: null, | |
| ontouchend: null, | |
| head: new o.default("head"), | |
| body: new o.default("body"), | |
| createElement: function(e) { | |
| return "canvas" === e ? new l.default : "audio" === e ? new c.default : "img" === e ? new u.default : "video" === e ? new i.default : new o.default(e) | |
| }, | |
| createElementNS: function(e, t) { | |
| return this.createElement(t) | |
| }, | |
| getElementById: function(e) { | |
| return e === r.canvas.id ? r.canvas : null | |
| }, | |
| getElementsByTagName: function(e) { | |
| return "head" === e ? [d.head] : "body" === e ? [d.body] : "canvas" === e ? [r.canvas] : [] | |
| }, | |
| getElementsByName: function(e) { | |
| return "head" === e ? [d.head] : "body" === e ? [d.body] : "canvas" === e ? [r.canvas] : [] | |
| }, | |
| querySelector: function(e) { | |
| return "head" === e ? d.head : "body" === e ? d.body : "canvas" === e || e === "#".concat(r.canvas.id) ? r.canvas : null | |
| }, | |
| querySelectorAll: function(e) { | |
| return "head" === e ? [d.head] : "body" === e ? [d.body] : "canvas" === e ? [r.canvas] : [] | |
| }, | |
| addEventListener: function(e, t) { | |
| p[e] || (p[e] = []), p[e].push(t) | |
| }, | |
| removeEventListener: function(e, t) { | |
| var n = p[e]; | |
| if (n && 0 < n.length) | |
| for (var r = n.length; r--;) | |
| if (n[r] === t) { | |
| n.splice(r, 1); | |
| break | |
| } | |
| }, | |
| dispatchEvent: function(e) { | |
| var t = p[e.type]; | |
| if (t) | |
| for (var n = 0; n < t.length; n++) t[n](e) | |
| } | |
| }; | |
| n.default = d | |
| }, { | |
| "./Audio": 5, | |
| "./Canvas": 6, | |
| "./EventIniter/index.js": 10, | |
| "./HTMLElement": 15, | |
| "./HTMLVideoElement": 18, | |
| "./Image": 19, | |
| "./window": 32 | |
| }], | |
| 27: [function(e, t, n) { | |
| "use strict"; | |
| function a(e) { | |
| return (a = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { | |
| return typeof e | |
| } : function(e) { | |
| return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e | |
| })(e) | |
| } | |
| var r = function(e, t) { | |
| if (!t && e && e.__esModule) return e; | |
| if (null === e || "object" !== a(e) && "function" != typeof e) return { | |
| default: e | |
| }; | |
| t = u(t); | |
| if (t && t.has(e)) return t.get(e); | |
| var n, r = {}, | |
| o = Object.defineProperty && Object.getOwnPropertyDescriptor; | |
| for (n in e) { | |
| var i; | |
| "default" !== n && Object.prototype.hasOwnProperty.call(e, n) && ((i = o ? Object.getOwnPropertyDescriptor(e, n) : null) && (i.get || i.set) ? Object.defineProperty(r, n, i) : r[n] = e[n]) | |
| } | |
| r.default = e, t && t.set(e, r); | |
| return r | |
| }(e("./window")), | |
| o = (o = e("./document")) && o.__esModule ? o : { | |
| default: o | |
| }; | |
| function u(e) { | |
| var t, n; | |
| return "function" != typeof WeakMap ? null : (t = new WeakMap, n = new WeakMap, (u = function(e) { | |
| return e ? n : t | |
| })(e)) | |
| } | |
| var i = GameGlobal; | |
| if (!GameGlobal.__isAdapterInjected) { | |
| GameGlobal.__isAdapterInjected = !0, r.document = o.default, r.addEventListener = function(e, t) { | |
| r.document.addEventListener(e, t) | |
| }, r.removeEventListener = function(e, t) { | |
| r.document.removeEventListener(e, t) | |
| }, r.dispatchEvent = function() { | |
| var e = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {}; | |
| console.log("window.dispatchEvent", e.type, e) | |
| }; | |
| o = tt.getSystemInfoSync().platform; | |
| if ("undefined" == typeof __devtoolssubcontext && "devtools" === o) { | |
| for (var c in r) { | |
| var l = Object.getOwnPropertyDescriptor(i, c); | |
| l && !0 !== l.configurable || Object.defineProperty(window, c, { | |
| value: r[c] | |
| }) | |
| } | |
| for (var s in r.document) { | |
| var f = Object.getOwnPropertyDescriptor(i.document, s); | |
| f && !0 !== f.configurable || Object.defineProperty(i.document, s, { | |
| value: r.document[s] | |
| }) | |
| } | |
| window.parent = window | |
| } else { | |
| for (var p in r) i[p] = r[p]; | |
| i.window = r, (window = i).top = window.parent = window, GameGlobal.global = GameGlobal.global || GameGlobal | |
| } | |
| } | |
| e("../../../../common/xmldom/dom-parser"), e("../unify") | |
| }, { | |
| "../../../../common/xmldom/dom-parser": 1, | |
| "../unify": 33, | |
| "./document": 26, | |
| "./window": 32 | |
| }], | |
| 28: [function(e, t, n) { | |
| "use strict"; | |
| Object.defineProperty(n, "__esModule", { | |
| value: !0 | |
| }), n.default = void 0, n.default = { | |
| get length() { | |
| return tt.getStorageInfoSync().keys.length | |
| }, | |
| key: function(e) { | |
| return tt.getStorageInfoSync().keys[e] | |
| }, | |
| getItem: function(e) { | |
| return tt.getStorageSync(e) | |
| }, | |
| setItem: function(e, t) { | |
| return tt.setStorageSync(e, t) | |
| }, | |
| removeItem: function(e) { | |
| tt.removeStorageSync(e) | |
| }, | |
| clear: function() { | |
| tt.clearStorageSync() | |
| } | |
| } | |
| }, {}], | |
| 29: [function(e, t, n) { | |
| "use strict"; | |
| Object.defineProperty(n, "__esModule", { | |
| value: !0 | |
| }), n.default = void 0; | |
| n.default = { | |
| href: "game.js", | |
| protocol: "", | |
| reload: function() {} | |
| } | |
| }, {}], | |
| 30: [function(e, t, n) { | |
| "use strict"; | |
| Object.defineProperty(n, "__esModule", { | |
| value: !0 | |
| }), n.default = void 0; | |
| var e = e("./util/index.js"), | |
| r = tt.getSystemInfoSync(), | |
| o = (console.log(r), r.system), | |
| i = r.platform, | |
| a = r.language, | |
| r = r.version, | |
| o = -1 !== o.toLowerCase().indexOf("android") ? "Android; CPU ".concat(o) : "iPhone; CPU iPhone OS ".concat(o, " like Mac OS X"), | |
| r = "Mozilla/5.0 (".concat(o, ") AppleWebKit/603.1.30 (KHTML, like Gecko) Mobile/14E8301 MicroMessenger/").concat(r, " MiniGame NetType/WIFI Language/").concat(a), | |
| u = { | |
| platform: i, | |
| language: a, | |
| appVersion: "5.0 (".concat(o, ") AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1"), | |
| userAgent: r, | |
| onLine: !0, | |
| geolocation: { | |
| getCurrentPosition: e.noop, | |
| watchPosition: e.noop, | |
| clearWatch: e.noop | |
| } | |
| }; | |
| tt.onNetworkStatusChange && tt.onNetworkStatusChange(function(e) { | |
| u.onLine = e.isConnected | |
| }), n.default = u | |
| }, { | |
| "./util/index.js": 31 | |
| }], | |
| 31: [function(e, t, n) { | |
| "use strict"; | |
| Object.defineProperty(n, "__esModule", { | |
| value: !0 | |
| }), n.noop = function() {} | |
| }, {}], | |
| 32: [function(e, t, n) { | |
| "use strict"; | |
| Object.defineProperty(n, "__esModule", { | |
| value: !0 | |
| }); | |
| var r = { | |
| canvas: !0, | |
| setTimeout: !0, | |
| setInterval: !0, | |
| clearTimeout: !0, | |
| clearInterval: !0, | |
| requestAnimationFrame: !0, | |
| cancelAnimationFrame: !0, | |
| navigator: !0, | |
| XMLHttpRequest: !0, | |
| WebSocket: !0, | |
| Image: !0, | |
| ImageBitmap: !0, | |
| Audio: !0, | |
| FileReader: !0, | |
| HTMLElement: !0, | |
| HTMLImageElement: !0, | |
| HTMLCanvasElement: !0, | |
| HTMLMediaElement: !0, | |
| HTMLAudioElement: !0, | |
| HTMLVideoElement: !0, | |
| WebGLRenderingContext: !0, | |
| TouchEvent: !0, | |
| MouseEvent: !0, | |
| DeviceMotionEvent: !0, | |
| localStorage: !0, | |
| location: !0 | |
| }, | |
| o = (Object.defineProperty(n, "Audio", { | |
| enumerable: !0, | |
| get: function() { | |
| return s.default | |
| } | |
| }), Object.defineProperty(n, "DeviceMotionEvent", { | |
| enumerable: !0, | |
| get: function() { | |
| return g.DeviceMotionEvent | |
| } | |
| }), Object.defineProperty(n, "FileReader", { | |
| enumerable: !0, | |
| get: function() { | |
| return f.default | |
| } | |
| }), Object.defineProperty(n, "HTMLAudioElement", { | |
| enumerable: !0, | |
| get: function() { | |
| return h.default | |
| } | |
| }), Object.defineProperty(n, "HTMLCanvasElement", { | |
| enumerable: !0, | |
| get: function() { | |
| return m.default | |
| } | |
| }), Object.defineProperty(n, "HTMLElement", { | |
| enumerable: !0, | |
| get: function() { | |
| return p.default | |
| } | |
| }), Object.defineProperty(n, "HTMLImageElement", { | |
| enumerable: !0, | |
| get: function() { | |
| return d.default | |
| } | |
| }), Object.defineProperty(n, "HTMLMediaElement", { | |
| enumerable: !0, | |
| get: function() { | |
| return y.default | |
| } | |
| }), Object.defineProperty(n, "HTMLVideoElement", { | |
| enumerable: !0, | |
| get: function() { | |
| return b.default | |
| } | |
| }), Object.defineProperty(n, "Image", { | |
| enumerable: !0, | |
| get: function() { | |
| return c.default | |
| } | |
| }), Object.defineProperty(n, "ImageBitmap", { | |
| enumerable: !0, | |
| get: function() { | |
| return l.default | |
| } | |
| }), Object.defineProperty(n, "MouseEvent", { | |
| enumerable: !0, | |
| get: function() { | |
| return g.MouseEvent | |
| } | |
| }), Object.defineProperty(n, "TouchEvent", { | |
| enumerable: !0, | |
| get: function() { | |
| return g.TouchEvent | |
| } | |
| }), Object.defineProperty(n, "WebGLRenderingContext", { | |
| enumerable: !0, | |
| get: function() { | |
| return v.default | |
| } | |
| }), Object.defineProperty(n, "WebSocket", { | |
| enumerable: !0, | |
| get: function() { | |
| return u.default | |
| } | |
| }), Object.defineProperty(n, "XMLHttpRequest", { | |
| enumerable: !0, | |
| get: function() { | |
| return a.default | |
| } | |
| }), n.clearTimeout = n.clearInterval = n.canvas = n.cancelAnimationFrame = void 0, Object.defineProperty(n, "localStorage", { | |
| enumerable: !0, | |
| get: function() { | |
| return w.default | |
| } | |
| }), Object.defineProperty(n, "location", { | |
| enumerable: !0, | |
| get: function() { | |
| return E.default | |
| } | |
| }), Object.defineProperty(n, "navigator", { | |
| enumerable: !0, | |
| get: function() { | |
| return i.default | |
| } | |
| }), n.setTimeout = n.setInterval = n.requestAnimationFrame = void 0, S(e("./Canvas"))), | |
| i = S(e("./navigator")), | |
| a = S(e("./XMLHttpRequest")), | |
| u = S(e("./WebSocket")), | |
| c = S(e("./Image")), | |
| l = S(e("./ImageBitmap")), | |
| s = S(e("./Audio")), | |
| f = S(e("./FileReader")), | |
| p = S(e("./HTMLElement")), | |
| d = S(e("./HTMLImageElement")), | |
| m = S(e("./HTMLCanvasElement")), | |
| y = S(e("./HTMLMediaElement")), | |
| h = S(e("./HTMLAudioElement")), | |
| b = S(e("./HTMLVideoElement")), | |
| v = S(e("./WebGLRenderingContext")), | |
| g = e("./EventIniter/index.js"), | |
| w = S(e("./localStorage")), | |
| E = S(e("./location")), | |
| O = e("./WindowProperties"); | |
| function S(e) { | |
| return e && e.__esModule ? e : { | |
| default: e | |
| } | |
| } | |
| Object.keys(O).forEach(function(e) { | |
| "default" === e || "__esModule" === e || Object.prototype.hasOwnProperty.call(r, e) || e in n && n[e] === O[e] || Object.defineProperty(n, e, { | |
| enumerable: !0, | |
| get: function() { | |
| return O[e] | |
| } | |
| }) | |
| }), GameGlobal.screencanvas = GameGlobal.screencanvas || new o.default; | |
| var e = GameGlobal.screencanvas, | |
| o = (n.canvas = e, GameGlobal), | |
| e = o.setTimeout, | |
| _ = o.setInterval, | |
| N = o.clearTimeout, | |
| T = o.clearInterval, | |
| j = o.requestAnimationFrame, | |
| o = o.cancelAnimationFrame; | |
| n.cancelAnimationFrame = o, n.requestAnimationFrame = j, n.clearInterval = T, n.clearTimeout = N, n.setInterval = _, n.setTimeout = e | |
| }, { | |
| "./Audio": 5, | |
| "./Canvas": 6, | |
| "./EventIniter/index.js": 10, | |
| "./FileReader": 12, | |
| "./HTMLAudioElement": 13, | |
| "./HTMLCanvasElement": 14, | |
| "./HTMLElement": 15, | |
| "./HTMLImageElement": 16, | |
| "./HTMLMediaElement": 17, | |
| "./HTMLVideoElement": 18, | |
| "./Image": 19, | |
| "./ImageBitmap": 20, | |
| "./WebGLRenderingContext": 22, | |
| "./WebSocket": 23, | |
| "./WindowProperties": 24, | |
| "./XMLHttpRequest": 25, | |
| "./localStorage": 28, | |
| "./location": 29, | |
| "./navigator": 30 | |
| }], | |
| 33: [function(e, t, n) { | |
| "use strict"; | |
| var r, o, i, a, u, c, e = e("./utils"); | |
| window.__globalAdapter = window.__globalAdapter || {}, window.__globalAdapter && (r = window.__globalAdapter, i = (o = tt.getSystemInfoSync()).windowWidth, a = o.windowHeight < i, r.isSubContext = void 0 === tt.getOpenDataContext, r.isDevTool = "devtools" === o.platform, e.cloneMethod(r, tt, "getSystemInfoSync"), e.cloneMethod(r, tt, "onTouchStart"), e.cloneMethod(r, tt, "onTouchMove"), e.cloneMethod(r, tt, "onTouchEnd"), e.cloneMethod(r, tt, "onTouchCancel"), e.cloneMethod(r, tt, "createInnerAudioContext"), e.cloneMethod(r, tt, "createVideo"), e.cloneMethod(r, tt, "setPreferredFramesPerSecond"), e.cloneMethod(r, tt, "showKeyboard"), e.cloneMethod(r, tt, "hideKeyboard"), e.cloneMethod(r, tt, "updateKeyboard"), e.cloneMethod(r, tt, "onKeyboardInput"), e.cloneMethod(r, tt, "onKeyboardConfirm"), e.cloneMethod(r, tt, "onKeyboardComplete"), e.cloneMethod(r, tt, "offKeyboardInput"), e.cloneMethod(r, tt, "offKeyboardConfirm"), e.cloneMethod(r, tt, "offKeyboardComplete"), e.cloneMethod(r, tt, "getOpenDataContext"), e.cloneMethod(r, tt, "onMessage"), e.cloneMethod(r, tt, "getSharedCanvas"), e.cloneMethod(r, tt, "loadFont"), e.cloneMethod(r, tt, "onShow"), e.cloneMethod(r, tt, "onHide"), e.cloneMethod(r, tt, "onError"), e.cloneMethod(r, tt, "offError"), u = !1, c = 1, tt.onDeviceOrientationChange && tt.onDeviceOrientationChange(function(e) { | |
| "landscape" === e.value ? c = 1 : "landscapeReverse" === e.value && (c = -1) | |
| }), Object.assign(r, { | |
| startAccelerometer: function(i) { | |
| u ? tt.startAccelerometer && tt.startAccelerometer({ | |
| fail: function(e) { | |
| console.error("start accelerometer failed", e) | |
| } | |
| }) : (u = !0, tt.onAccelerometerChange && tt.onAccelerometerChange(function(e) { | |
| var t, n = {}, | |
| r = e.x, | |
| o = e.y; | |
| a && (t = r, r = -o, o = t), n.x = r * c, n.y = o * c, n.z = e.z, i && i(n) | |
| })) | |
| }, | |
| stopAccelerometer: function() { | |
| tt.stopAccelerometer && tt.stopAccelerometer({ | |
| fail: function(e) { | |
| console.error("stop accelerometer failed", e) | |
| } | |
| }) | |
| } | |
| })) | |
| }, { | |
| "./utils": 34 | |
| }], | |
| 34: [function(e, t, n) { | |
| "use strict"; | |
| t.exports = { | |
| cloneMethod: function(e, t, n, r) { | |
| t[n] && (e[r = r || n] = t[n].bind(t)) | |
| } | |
| } | |
| }, {}] | |
| }, {}, [27]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment