@honor-minigame/cli
Version:
honor minigame pack cli
3,439 lines • 106 kB
JavaScript
/* eslint-disable */
!(function (e) {
var t = {};
function n(r) {
if (t[r]) return t[r].exports;
var o = (t[r] = { i: r, l: !1, exports: {} });
return e[r].call(o.exports, o, o.exports, n), (o.l = !0), o.exports;
}
(n.m = e),
(n.c = t),
(n.d = function (e, t, r) {
n.o(e, t) || Object.defineProperty(e, t, { enumerable: !0, get: r });
}),
(n.r = function (e) {
"undefined" != typeof Symbol &&
Symbol.toStringTag &&
Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }),
Object.defineProperty(e, "__esModule", { value: !0 });
}),
(n.t = function (e, t) {
if ((1 & t && (e = n(e)), 8 & t)) return e;
if (4 & t && "object" == typeof e && e && e.__esModule) return e;
var r = Object.create(null);
if (
(n.r(r),
Object.defineProperty(r, "default", { enumerable: !0, value: e }),
2 & t && "string" != typeof e)
)
for (var o in e)
n.d(
r,
o,
function (t) {
return e[t];
}.bind(null, o)
);
return r;
}),
(n.n = function (e) {
var t =
e && e.__esModule
? function () {
return e.default;
}
: function () {
return e;
};
return n.d(t, "a", t), t;
}),
(n.o = function (e, t) {
return Object.prototype.hasOwnProperty.call(e, t);
}),
(n.p = ""),
n((n.s = 16));
})([
function (e, t) {
class n {
constructor(e, t) {
(this._type = e),
(this._target = null),
(this._eventPhase = 2),
(this._currentTarget = null),
(this._canceled = !1),
(this._stopped = !1),
(this._passiveListener = null),
(this._timeStamp = Date.now());
}
get type() {
return this._type;
}
get target() {
return this._target;
}
get currentTarget() {
return this._currentTarget;
}
get isTrusted() {
return !1;
}
get timeStamp() {
return this._timeStamp;
}
composedPath() {
const e = this._currentTarget;
return null === e ? [] : [e];
}
get eventPhase() {
return this._eventPhase;
}
stopPropagation() {}
stopImmediatePropagation() {
this._stopped = !0;
}
get bubbles() {
return !1;
}
get cancelable() {
return !0;
}
preventDefault() {
null === this._passiveListener
? this.cancelable && (this._canceled = !0)
: console.warn(
"Event#preventDefault() was called from a passive listener:",
this._passiveListener
);
}
get defaultPrevented() {
return this._canceled;
}
get composed() {
return !1;
}
get timeStamp() {
return this._timeStamp;
}
}
(n.NONE = 0),
(n.CAPTURING_PHASE = 1),
(n.AT_TARGET = 2),
(n.BUBBLING_PHASE = 3),
(e.exports = n);
},
function (e, t, n) {
const r = n(6);
e.exports = class extends r {
constructor(e = "") {
super(),
(this.tagName = e.toUpperCase()),
(this.className = ""),
(this.children = []),
(this.style = {
width: `${window.innerWidth}px`,
height: `${window.innerHeight}px`,
}),
(this.innerHTML = ""),
(this.parentElement = mainCanvas);
}
setAttribute(e, t) {
this[e] = t;
}
getAttribute(e) {
return this[e];
}
focus() {}
};
},
function (e, t) {
var n = 0,
r = { touch: {}, mouse: {}, keyboard: {}, devicemotion: {} },
o = { touch: 0, mouse: 0, keyboard: 0, devicemotion: 0 },
i = { touch: null, mouse: null, keyboard: null, devicemotion: null },
a = { touch: null, mouse: null, keyboard: null, devicemotion: null };
const s = {
touch: ["touchstart", "touchmove", "touchend", "touchcancel"],
mouse: ["mousedown", "mousemove", "mouseup", "mousewheel"],
keyboard: ["keydown", "keyup", "keypress"],
devicemotion: ["devicemotion"],
},
c = 1,
u = 2;
function l(e) {
return e && "object" == typeof e;
}
e.exports = class {
constructor() {
(this._targetID = ++n),
(this._listenerCount = {
touch: 0,
mouse: 0,
keyboard: 0,
devicemotion: 0,
}),
(this._listeners = new Map());
}
_associateSystemEventListener(e) {
for (var t in s)
if (s[t].indexOf(e) > -1) {
i[t] && 0 === o[t] && i[t](),
0 === this._listenerCount[t] && (r[t][this._targetID] = this),
++this._listenerCount[t],
++o[t];
break;
}
}
_dissociateSystemEventListener(e) {
for (var t in s)
if (s[t].indexOf(e) > -1) {
this._listenerCount[t] <= 0 && delete r[t][this._targetID],
--o[t],
a[t] && 0 === o[t] && a[t]();
break;
}
}
addEventListener(e, t, n) {
if (!t) return !1;
if ("function" != typeof t && !l(t))
throw new TypeError("'listener' should be a function or an object.");
const r = this._listeners,
o = l(n),
i = (o ? Boolean(n.capture) : Boolean(n)) ? c : u,
a = {
listener: t,
listenerType: i,
passive: o && Boolean(n.passive),
once: o && Boolean(n.once),
next: null,
};
let s = r.get(e);
if (void 0 === s)
return r.set(e, a), this._associateSystemEventListener(e), !0;
let d = null;
for (; s; ) {
if (s.listener === t && s.listenerType === i) return !1;
(d = s), (s = s.next);
}
return (d.next = a), this._associateSystemEventListener(e), !0;
}
removeEventListener(e, t, n) {
if (!t) return !1;
const r = this._listeners,
o = (l(n) ? Boolean(n.capture) : Boolean(n)) ? c : u;
let i = null,
a = r.get(e);
for (; a; ) {
if (a.listener === t && a.listenerType === o)
return (
i ? (i.next = a.next) : a.next ? r.set(e, a.next) : r.delete(e),
this._dissociateSystemEventListener(e),
!0
);
(i = a), (a = a.next);
}
return !1;
}
dispatchEvent(e) {
if (!e || "string" != typeof e.type)
throw new TypeError('"event.type" should be a string.');
const t = e.type;
var n = this["on" + t];
if (
n &&
"function" == typeof n &&
((e._target = e._currentTarget = this),
n.call(this, e),
(e._target = e._currentTarget = null),
(e._eventPhase = 0),
(e._passiveListener = null),
e.defaultPrevented)
)
return !1;
const r = this._listeners;
let o = r.get(t);
if (!o) return !0;
e._target = e._currentTarget = this;
let i = null;
for (
;
o &&
(o.once
? i
? (i.next = o.next)
: o.next
? r.set(t, o.next)
: r.delete(t)
: (i = o),
(e._passiveListener = o.passive ? o.listener : null),
"function" == typeof o.listener && o.listener.call(this, e),
!e._stopped);
)
o = o.next;
return (
(e._target = e._currentTarget = null),
(e._eventPhase = 0),
(e._passiveListener = null),
!e.defaultPrevented
);
}
};
},
function (e, t) {
function n(e, t) {
for (var n in e) t[n] = e[n];
}
function r(e, t) {
var r = e.prototype;
if (!(r instanceof t)) {
function o() {}
(o.prototype = t.prototype), n(r, (o = new o())), (e.prototype = r = o);
}
r.constructor != e &&
("function" != typeof e && console.error("unknow Class:" + e),
(r.constructor = e));
}
var o = "http://www.w3.org/1999/xhtml",
i = {},
a = (i.ELEMENT_NODE = 1),
s = (i.ATTRIBUTE_NODE = 2),
c = (i.TEXT_NODE = 3),
u = (i.CDATA_SECTION_NODE = 4),
l = (i.ENTITY_REFERENCE_NODE = 5),
d = (i.ENTITY_NODE = 6),
h = (i.PROCESSING_INSTRUCTION_NODE = 7),
f = (i.COMMENT_NODE = 8),
p = (i.DOCUMENT_NODE = 9),
g = (i.DOCUMENT_TYPE_NODE = 10),
m = (i.DOCUMENT_FRAGMENT_NODE = 11),
w = (i.NOTATION_NODE = 12),
y = {},
v = {},
_ =
((y.INDEX_SIZE_ERR = ((v[1] = "Index size error"), 1)),
(y.DOMSTRING_SIZE_ERR = ((v[2] = "DOMString size error"), 2)),
(y.HIERARCHY_REQUEST_ERR = ((v[3] = "Hierarchy request error"), 3))),
x =
((y.WRONG_DOCUMENT_ERR = ((v[4] = "Wrong document"), 4)),
(y.INVALID_CHARACTER_ERR = ((v[5] = "Invalid character"), 5)),
(y.NO_DATA_ALLOWED_ERR = ((v[6] = "No data allowed"), 6)),
(y.NO_MODIFICATION_ALLOWED_ERR =
((v[7] = "No modification allowed"), 7)),
(y.NOT_FOUND_ERR = ((v[8] = "Not found"), 8))),
b =
((y.NOT_SUPPORTED_ERR = ((v[9] = "Not supported"), 9)),
(y.INUSE_ATTRIBUTE_ERR = ((v[10] = "Attribute in use"), 10)));
(y.INVALID_STATE_ERR = ((v[11] = "Invalid state"), 11)),
(y.SYNTAX_ERR = ((v[12] = "Syntax error"), 12)),
(y.INVALID_MODIFICATION_ERR = ((v[13] = "Invalid modification"), 13)),
(y.NAMESPACE_ERR = ((v[14] = "Invalid namespace"), 14)),
(y.INVALID_ACCESS_ERR = ((v[15] = "Invalid access"), 15));
function E(e, t) {
if (t instanceof Error) var n = t;
else
(n = this),
Error.call(this, v[e]),
(this.message = v[e]),
Error.captureStackTrace && Error.captureStackTrace(this, E);
return (n.code = e), t && (this.message = this.message + ": " + t), n;
}
function T() {}
function S(e, t) {
(this._node = e), (this._refresh = t), N(this);
}
function N(e) {
var t = e._node._inc || e._node.ownerDocument._inc;
if (e._inc != t) {
var r = e._refresh(e._node);
ne(e, "length", r.length), n(r, e), (e._inc = t);
}
}
function C() {}
function A(e, t) {
for (var n = e.length; n--; ) if (e[n] === t) return n;
}
function R(e, t, n, r) {
if ((r ? (t[A(t, r)] = n) : (t[t.length++] = n), e)) {
n.ownerElement = e;
var o = e.ownerDocument;
o &&
(r && q(o, e, r),
(function (e, t, n) {
e && e._inc++,
"http://www.w3.org/2000/xmlns/" == n.namespaceURI &&
(t._nsMap[n.prefix ? n.localName : ""] = n.value);
})(o, e, n));
}
}
function I(e, t, n) {
var r = A(t, n);
if (!(r >= 0)) throw E(x, new Error(e.tagName + "@" + n));
for (var o = t.length - 1; r < o; ) t[r] = t[++r];
if (((t.length = o), e)) {
var i = e.ownerDocument;
i && (q(i, e, n), (n.ownerElement = null));
}
}
function D(e) {
if (((this._features = {}), e)) for (var t in e) this._features = e[t];
}
function k() {}
function P(e) {
return (
("<" == e ? "<" : ">" == e && ">") ||
("&" == e && "&") ||
('"' == e && """) ||
"&#" + e.charCodeAt() + ";"
);
}
function M(e, t) {
if (t(e)) return !0;
if ((e = e.firstChild))
do {
if (M(e, t)) return !0;
} while ((e = e.nextSibling));
}
function L() {}
function q(e, t, n, r) {
e && e._inc++,
"http://www.w3.org/2000/xmlns/" == n.namespaceURI &&
delete t._nsMap[n.prefix ? n.localName : ""];
}
function F(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; )
(r[i++] = o), (o = o.nextSibling);
r.length = i;
}
}
}
function B(e, t) {
var n = t.previousSibling,
r = t.nextSibling;
return (
n ? (n.nextSibling = r) : (e.firstChild = r),
r ? (r.previousSibling = n) : (e.lastChild = n),
F(e.ownerDocument, e),
t
);
}
function U(e, t, n) {
var r = t.parentNode;
if ((r && r.removeChild(t), t.nodeType === m)) {
var o = t.firstChild;
if (null == o) return t;
var i = t.lastChild;
} else o = i = t;
var a = n ? n.previousSibling : e.lastChild;
(o.previousSibling = a),
(i.nextSibling = n),
a ? (a.nextSibling = o) : (e.firstChild = o),
null == n ? (e.lastChild = i) : (n.previousSibling = i);
do {
o.parentNode = e;
} while (o !== i && (o = o.nextSibling));
return (
F(e.ownerDocument || e, e),
t.nodeType == m && (t.firstChild = t.lastChild = null),
t
);
}
function O() {
this._nsMap = {};
}
function K() {}
function G() {}
function V() {}
function z() {}
function X() {}
function j() {}
function H() {}
function Y() {}
function W() {}
function $() {}
function Z() {}
function Q() {}
function J(e, t) {
var n = [],
r = (9 == this.nodeType && this.documentElement) || this,
o = r.prefix,
i = r.namespaceURI;
if (i && null == o && null == (o = r.lookupPrefix(i)))
var a = [{ namespace: i, prefix: null }];
return te(this, n, e, t, a), n.join("");
}
function ee(e, t, n) {
var r = e.prefix || "",
o = e.namespaceURI;
if (!r && !o) return !1;
if (
("xml" === r && "http://www.w3.org/XML/1998/namespace" === o) ||
"http://www.w3.org/2000/xmlns/" == o
)
return !1;
for (var i = n.length; i--; ) {
var a = n[i];
if (a.prefix == r) return a.namespace != o;
}
return !0;
}
function te(e, t, n, r, i) {
if (r) {
if (!(e = r(e))) return;
if ("string" == typeof e) return void t.push(e);
}
switch (e.nodeType) {
case a:
i || (i = []);
i.length;
var d = e.attributes,
w = d.length,
y = e.firstChild,
v = e.tagName;
(n = o === e.namespaceURI || n), t.push("<", v);
for (var _ = 0; _ < w; _++) {
"xmlns" == (x = d.item(_)).prefix
? i.push({ prefix: x.localName, namespace: x.value })
: "xmlns" == x.nodeName &&
i.push({ prefix: "", namespace: x.value });
}
for (_ = 0; _ < w; _++) {
var x;
if (ee((x = d.item(_)), 0, i)) {
var b = x.prefix || "",
E = x.namespaceURI,
T = b ? " xmlns:" + b : " xmlns";
t.push(T, '="', E, '"'), i.push({ prefix: b, namespace: E });
}
te(x, t, n, r, i);
}
if (ee(e, 0, i)) {
(b = e.prefix || ""),
(E = e.namespaceURI),
(T = b ? " xmlns:" + b : " xmlns");
t.push(T, '="', E, '"'), i.push({ prefix: b, namespace: E });
}
if (y || (n && !/^(?:meta|link|img|br|hr|input)$/i.test(v))) {
if ((t.push(">"), n && /^script$/i.test(v)))
for (; y; )
y.data ? t.push(y.data) : te(y, t, n, r, i),
(y = y.nextSibling);
else for (; y; ) te(y, t, n, r, i), (y = y.nextSibling);
t.push("</", v, ">");
} else t.push("/>");
return;
case p:
case m:
for (y = e.firstChild; y; ) te(y, t, n, r, i), (y = y.nextSibling);
return;
case s:
return t.push(" ", e.name, '="', e.value.replace(/[<&"]/g, P), '"');
case c:
return t.push(e.data.replace(/[<&]/g, P));
case u:
return t.push("<![CDATA[", e.data, "]]>");
case f:
return t.push("\x3c!--", e.data, "--\x3e");
case g:
var S = e.publicId,
N = e.systemId;
if ((t.push("<!DOCTYPE ", e.name), S))
t.push(' PUBLIC "', S),
N && "." != N && t.push('" "', N),
t.push('">');
else if (N && "." != N) t.push(' SYSTEM "', N, '">');
else {
var C = e.internalSubset;
C && t.push(" [", C, "]"), t.push(">");
}
return;
case h:
return t.push("<?", e.target, " ", e.data, "?>");
case l:
return t.push("&", e.nodeName, ";");
default:
t.push("??", e.nodeName);
}
}
function ne(e, t, n) {
e[t] = n;
}
(E.prototype = Error.prototype),
n(y, E),
(T.prototype = {
length: 0,
item: function (e) {
return this[e] || null;
},
toString: function (e, t) {
for (var n = [], r = 0; r < this.length; r++) te(this[r], n, e, t);
return n.join("");
},
}),
(S.prototype.item = function (e) {
return N(this), this[e];
}),
r(S, T),
(C.prototype = {
length: 0,
item: T.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 E(b);
var n = this.getNamedItem(e.nodeName);
return R(this._ownerElement, this, e, n), n;
},
setNamedItemNS: function (e) {
var t,
n = e.ownerElement;
if (n && n != this._ownerElement) throw new E(b);
return (
(t = this.getNamedItemNS(e.namespaceURI, e.localName)),
R(this._ownerElement, this, e, t),
t
);
},
removeNamedItem: function (e) {
var t = this.getNamedItem(e);
return I(this._ownerElement, this, t), t;
},
removeNamedItemNS: function (e, t) {
var n = this.getNamedItemNS(e, t);
return I(this._ownerElement, this, n), n;
},
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;
},
}),
(D.prototype = {
hasFeature: function (e, t) {
var n = this._features[e.toLowerCase()];
return !(!n || (t && !(t in n)));
},
createDocument: function (e, t, n) {
var r = new L();
if (
((r.implementation = this),
(r.childNodes = new T()),
(r.doctype = n),
n && r.appendChild(n),
t)
) {
var o = r.createElementNS(e, t);
r.appendChild(o);
}
return r;
},
createDocumentType: function (e, t, n) {
var r = new j();
return (
(r.name = e),
(r.nodeName = e),
(r.publicId = t),
(r.systemId = n),
r
);
},
}),
(k.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 U(this, e, t);
},
replaceChild: function (e, t) {
this.insertBefore(e, t), t && this.removeChild(t);
},
removeChild: function (e) {
return B(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 c = n[i];
"object" != typeof c && c != o[i] && (o[i] = c);
}
n.childNodes && (o.childNodes = new T());
o.ownerDocument = t;
switch (o.nodeType) {
case a:
var u = n.attributes,
l = (o.attributes = new C()),
d = u.length;
l._ownerElement = o;
for (var h = 0; h < d; h++)
o.setAttributeNode(e(t, u.item(h), !0));
break;
case s:
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 && t.nodeType == c && e.nodeType == c
? (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 this.attributes.length > 0;
},
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 = t.nodeType == s ? 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 = t.nodeType == s ? t.ownerDocument : t.parentNode;
}
return null;
},
isDefaultNamespace: function (e) {
return null == this.lookupPrefix(e);
},
}),
n(i, k),
n(i, k.prototype),
(L.prototype = {
nodeName: "#document",
nodeType: p,
doctype: null,
documentElement: null,
_inc: 1,
insertBefore: function (e, t) {
if (e.nodeType == m) {
for (var n = e.firstChild; n; ) {
var r = n.nextSibling;
this.insertBefore(n, t), (n = r);
}
return e;
}
return (
null == this.documentElement &&
e.nodeType == a &&
(this.documentElement = e),
U(this, e, t),
(e.ownerDocument = this),
e
);
},
removeChild: function (e) {
return (
this.documentElement == e && (this.documentElement = null),
B(this, e)
);
},
importNode: function (e, t) {
return (function e(t, n, r) {
var o;
switch (n.nodeType) {
case a:
(o = n.cloneNode(!1)).ownerDocument = t;
case m:
break;
case s:
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 (e) {
var t = null;
return (
M(this.documentElement, function (n) {
if (n.nodeType == a && n.getAttribute("id") == e)
return (t = n), !0;
}),
t
);
},
createElement: function (e) {
var t = new O();
return (
(t.ownerDocument = this),
(t.nodeName = e),
(t.tagName = e),
(t.childNodes = new T()),
((t.attributes = new C())._ownerElement = t),
t
);
},
createDocumentFragment: function () {
var e = new $();
return (e.ownerDocument = this), (e.childNodes = new T()), e;
},
createTextNode: function (e) {
var t = new V();
return (t.ownerDocument = this), t.appendData(e), t;
},
createComment: function (e) {
var t = new z();
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 Z();
return (
(n.ownerDocument = this),
(n.tagName = n.target = e),
(n.nodeValue = n.data = t),
n
);
},
createAttribute: function (e) {
var t = new K();
return (
(t.ownerDocument = this),
(t.name = e),
(t.nodeName = e),
(t.localName = e),
(t.specified = !0),
t
);
},
createEntityReference: function (e) {
var t = new W();
return (t.ownerDocument = this), (t.nodeName = e), t;
},
createElementNS: function (e, t) {
var n = new O(),
r = t.split(":"),
o = (n.attributes = new C());
return (
(n.childNodes = new T()),
(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),
n
);
},
createAttributeNS: function (e, t) {
var n = new K(),
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
);
},
}),
r(L, k),
(O.prototype = {
nodeType: a,
hasAttribute: function (e) {
return null != this.getAttributeNode(e);
},
getAttribute: function (e) {
var t = this.getAttributeNode(e);
return (t && t.value) || "";
},
getAttributeNode: function (e) {
return this.attributes.getNamedItem(e);
},
setAttribute: function (e, t) {
var n = this.ownerDocument.createAttribute(e);
(n.value = n.nodeValue = "" + t), this.setAttributeNode(n);
},
removeAttribute: function (e) {
var t = this.getAttributeNode(e);
t && this.removeAttributeNode(t);
},
appendChild: function (e) {
return e.nodeType === m
? this.insertBefore(e, null)
: (function (e, t) {
var n = t.parentNode;
if (n) {
var r = e.lastChild;
n.removeChild(t), (r = e.lastChild);
}
return (
(r = e.lastChild),
(t.parentNode = e),
(t.previousSibling = r),
(t.nextSibling = null),
r ? (r.nextSibling = t) : (e.firstChild = t),
(e.lastChild = t),
F(e.ownerDocument, e, t),
t
);
})(this, e);
},
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) {
var n = this.getAttributeNodeNS(e, t);
n && this.removeAttributeNode(n);
},
hasAttributeNS: function (e, t) {
return null != this.getAttributeNodeNS(e, t);
},
getAttributeNS: function (e, t) {
var n = this.getAttributeNodeNS(e, t);
return (n && n.value) || "";
},
setAttributeNS: function (e, t, n) {
var r = this.ownerDocument.createAttributeNS(e, t);
(r.value = r.nodeValue = "" + n), this.setAttributeNode(r);
},
getAttributeNodeNS: function (e, t) {
return this.attributes.getNamedItemNS(e, t);
},
getElementsByTagName: function (e) {
return new S(this, function (t) {
var n = [];
return (
M(t, function (r) {
r === t ||
r.nodeType != a ||
("*" !== e && r.tagName != e) ||
n.push(r);
}),
n
);
});
},
getElementsByTagNameNS: function (e, t) {
return new S(this, function (n) {
var r = [];
return (
M(n, function (o) {
o === n ||
o.nodeType !== a ||
("*" !== e && o.namespaceURI !== e) ||
("*" !== t && o.localName != t) ||
r.push(o);
}),
r
);
});
},
}),
(L.prototype.getElementsByTagName = O.prototype.getElementsByTagName),
(L.prototype.getElementsByTagNameNS = O.prototype.getElementsByTagNameNS),
r(O, k),
(K.prototype.nodeType = s),
r(K, k),
(G.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(v[_]);
},
deleteData: function (e, t) {
this.replaceData(e, t, "");
},
replaceData: function (e, t, n) {
(n = this.data.substring(0, e) + n + this.data.substring(e + t)),
(this.nodeValue = this.data = n),
(this.length = n.length);
},
}),
r(G, k),
(V.prototype = {
nodeName: "#text",
nodeType: c,
splitText: function (e) {
var t = this.data,
n = t.substring(e);
(t = t.substring(0, e)),
(this.data = this.nodeValue = t),
(this.length = t.length);
var r = this.ownerDocument.createTextNode(n);
return (
this.parentNode &&
this.parentNode.insertBefore(r, this.nextSibling),
r
);
},
}),
r(V, G),
(z.prototype = { nodeName: "#comment", nodeType: f }),
r(z, G),
(X.prototype = { nodeName: "#cdata-section", nodeType: u }),
r(X, G),
(j.prototype.nodeType = g),
r(j, k),
(H.prototype.nodeType = w),
r(H, k),
(Y.prototype.nodeType = d),
r(Y, k),
(W.prototype.nodeType = l),
r(W, k),
($.prototype.nodeName = "#document-fragment"),
($.prototype.nodeType = m),
r($, k),
(Z.prototype.nodeType = h),
r(Z, k),
(Q.prototype.serializeToString = function (e, t, n) {
return J.call(e, t, n);
}),
(k.prototype.toString = J);
try {
if (Object.defineProperty) {
Object.defineProperty(S.prototype, "length", {
get: function () {
return N(this), this.$$length;
},
}),
Object.defineProperty(k.prototype, "textContent", {
get: function () {
return (function e(t) {
switch (t.nodeType) {
case a:
case m:
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;
}
})(this);
},
set: function (e) {
switch (this.nodeType) {
case a:
case m:
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);
}
},
}),
(ne = function (e, t, n) {
e["$$" + t] = n;
});
}
} catch (e) {}
(t.DOMImplementation = D), (t.XMLSerializer = Q);
},
function (e, t) {
if (window.HTMLCanvasElement) {
e.exports = window.HTMLCanvasElement;
}else {
const n = window.mainCanvas || qg.createCanvas();
e.exports = n.constructor;
}
},
function (e, t) {
const n = {
href: "game.js",
pathname: "game.js",
search: "",
hash: "",
reload() {},
};
e.exports = n;
},
function (e, t, n) {
const r = n(7),
o = n(25);
e.exports = class extends r {
constructor() {
super(),
(this.className = ""),
(this.children = []),
(this.clientLeft = 0),
(this.clientTop = 0),
(this.scrollLeft = 0),
(this.scrollTop = 0);
}
get clientWidth() {
return 0;
}
get clientHeight() {
return 0;
}
getBoundingClientRect() {
return new o(0, 0, window.innerWidth, window.innerHeight);
}
removeAttribute(e) {}
};
},
function (e, t, n) {
const r = n(2);
e.exports = class extends r {
constructor() {
super(), (this.childNodes = []), (this.parentNode = mainCanvas);
}
appendChild(e) {
this.childNodes.push(e);
}
insertBefore(e, t) {
return e;
}
replaceChild(e, t) {
return t;
}
cloneNode() {
const e = Object.create(this);
return Object.assign(e, this), e;
}
removeChild(e) {
const t = this.childNodes.findIndex((t) => t === e);
return t > -1 ? this.childNodes.splice(t, 1) : null;
}
contains(e) {
return this.childNodes.indexOf(e) > -1;
}
};
},
function (e, t) {
if (window.HTMLImageElement) {
e.exports = window.HTMLImageElement;
} else {
const n = qg.createImage();
e.exports = n.constructor;
}
},
function (e, t, n) {
const r = n(10);
e.exports = r;
},
function (e, t) {
const n = qg.createInnerAudioContext();
e.exports = n.constructor;
},
function (e, t, n) {
const r = n(12);
e.exports = class extends r {
constructor() {
super("video");
}
canPlayType(e) {
return !1;
}
};
},
function (e, t, n) {
const r = n(1),
o = n(26),
i = 0;
e.exports = class extends r {
constructor(e) {
super(e),
(this._volume = 1),
(this._duration = 0),
(this._isEnded = !1),
(this._isMute = !1),
(this._readyState = i),
(this._error = new o());
}
addTextTrack() {}
captureStream() {}
fastSeek() {}
load() {}
pause() {}
play() {}
canPlayType(e) {
return "";
}
set volume(e) {
this._volume = e;
}
get volume() {
return this._volume;
}
get duration() {
return this._duration;
}
get ended() {
return this._isEnded;
}
get muted() {
return this._isMute;
}
get readyState() {
return this._readyState;
}
get error() {
return this._error;
}
get currentTime() {
return 0;
}
};
},
function (e, t, n) {
const r = n(1);
n(0);
e.exports = class extends r {
constructor(e, t) {
super("script");
}
set src(e) {}
};
},
function (e, t, n) {
const r = n(2),
o = n(0);
e.exports = class extends r {
constructor() {
super(), (this._status = "loading");
}
get status() {
return this._status;
}
set onloading(e) {
this.addEventListener("loading", e);
}
set onloadingdone(e) {
this.addEventListener("loadingdone", e);
}
set onloadingerror(e) {
this.addEventListener("loadingerror", e);
}
add(e) {
(this._status = e._status = "loading"),
this.dispatchEvent(new o("loading"));
let t = qg.loadFont(e.source);
setTimeout(() => {
t
? ((e._status = this._status = "loaded"),
e._resolveCB(),
this.dispatchEvent(new o("loadingdone")))
: ((e._status = this._status = "error"),
e._rejectCB(),
this.dispatchEvent(new o("loadingerror")));
}, 0);
}
clear() {}
delete() {}
load() {}
ready() {}
};
},
function (e, t) {},
function (e, t, n) {
window._isAdapted || (n(17), n(35), (window._isAdapted = !0));
},
function (e, t, n) {
const defineReadOnlyProperty = (obj, name, value) => {
try {
Object.defineProperty(obj, name, {
configurable: false,
enumerable: true,
get() {
return value;
},
set(newValue) {
if (newValue !== value) {
console.warn(`can not rewrite wx property: ${name}`);
}
},
});
} catch (e) {
console.error(e);
}
};
const { btoa: r, atob: o } = n(18);
defineReadOnlyProperty(window, "btoa", r),
defineReadOnlyProperty(window, "atob", o);
// 兼容联盟接口写法
if (!window.Blob) {
const { Blob: i, URL: a } = n(19);
defineReadOnlyProperty(window, "Blob", i)
if (!window.URL){
defineReadOnlyProperty(window, "URL", a)
}
}
defineReadOnlyProperty(window, "DOMParser", n(21).DOMParser)
if (!window.CanvasRenderingContext2D) {
defineReadOnlyProperty(
window,
"CanvasRenderingContext2D",
qg.getCanvasRenderingContext2D()
)
}
(window.top = window.parent = window),
(window.ontouchstart = null),
(window.ontouchmove = null),
(window.ontouchend = null),
(window.ontouchcancel = null),
(window.pageXOffset =
window.pageYOffset =
window.clientTop =
window.clientLeft =
0),
(window.outerWidth = window.innerWidth),
(window.outerHeight = window.innerHeight),
defineReadOnlyProperty(
window,
"mainCanvas",
window.canvas || window.mainCanvas || qg.createCanvas()
),
defineReadOnlyProperty(window, "HTMLCanvasElement", n(4))
if (!window.location) {
defineReadOnlyProperty(window, "location", n(5))
}
defineReadOnlyProperty(window, "document", n(24)),
defineReadOnlyProperty(window, "Element", n(6)),
defineReadOnlyProperty(window, "HTMLElement", n(1)),
defineReadOnlyProperty(window, "HTMLImageElement", n(27)),
defineReadOnlyProperty(window, "HTMLMediaElement", n(12)),
defineReadOnlyProperty(window, "HTMLAudioElement", n(10)),
defineReadOnlyProperty(window, "HTMLVideoElement", n(11)),
defineReadOnlyProperty(window, "HTMLScriptElement", n(13));
// navigator
const info = qg.getSystemInfoSync()
const navi = {
platform: info.osType || 'android',
language: info.language || 'zh',
appVersion: info.osVersionName || '11',
userAgent: 'Mozilla/5.0 (Android;) Mobile/14E8301 MicroMessenger/6.6.0 MiniGame NetType/WIFI Language/zh_CN',
geolocation: { getCurrentPosition: ()=>{}, watchPosition: ()=>{}, clearWatch: ()=>{} }
};
window.navigator = navi;
window.navigator.default = {
platform: window.navigator.platform,
language: window.navigator.language,
appVersion: window.navigator.appVersion,
userAgent: 'Mozilla/5.0 (Android;) Mobile/14E8301 MicroMessenger/6.6.0 MiniGame NetType/WIFI Language/zh_CN',
geolocation: window.navigator.geolocation
};
(window.Image = n(8)),
defineReadOnlyProperty(window, "Audio", n(9)),
defineReadOnlyProperty(window, "FileReader", n(28)),
defineReadOnlyProperty(window, "FontFace", n(29)),
defineReadOnlyProperty(window, "FontFaceSet", n(14)),
defineReadOnlyProperty(window, "EventTarget", n(2)),
defineReadOnlyProperty(window, "Event", n(0)),
defineReadOnlyProperty(window, "TouchEvent", n(30)),
defineReadOnlyProperty(window, "MouseEvent", n(31)),
defineReadOnlyProperty(window, "KeyboardEvent", n(32)),
defineReadOnlyProperty(window, "DeviceMotionEvent", n(33));
if (!window.canvas) {
defineReadOnlyProperty(
window,
"canvas",
window.mainCanvas || qg.createCanvas()
);
}
var s = info.deviceOrientation === 'portrait' ? 0 : 90;
if (qg.getDeviceRotation) {
switch (qg.getDeviceRotation()) {
case 1:
s = 90;
break;
case 2:
s = 180;
break;
case 3:
s = -90;
}
}
defineReadOnlyProperty(window, "orientation", s),
window.devicePixelRatio = 1,
window.screen = {
availTop: 0,
availLeft: 0,
availHeight: window.innerWidth,
availWidth: window.innerHeight,
colorDepth: 8,
pixelDepth: 8,
left: 0,
top: 0,
width: window.innerWidth,
height: window.innerHeight
},
(window.addEventListener = function (e, t, n) {
window.mainCanvas.addEventListener(e, t, n);
}),
(window.removeEventListener = function (e, t, n) {
window.mainCanvas.removeEventListener(e, t, n);
}),
(window.dispatchEvent = function (e) {
window.mainCanvas.dispatchEvent(e);
}),
defineReadOnlyProperty(window, "getComputedStyle", function (e) {
return { position: "absolute", left: "0px", top: "0px", height: "0px" };
}),
(window.focus = function () {}),
(window.scroll = function () {}),
(window.resize = function (e, t) { // 复写window.resize方法,当屏幕发生变化时,会传入新的宽高
(window.innerWidth = e),
(window.innerHeight = t),
(window.outerWidth = window.innerWidth),
(window.outerHeight = window.innerHeight),
(window.mainCanvas._width = window.innerWidth),
(window.mainCanvas._height = window.innerHeight),
(window.screen.availWidth = window.innerWidth),
(window.screen.availHeight = window.innerHeight),
(window.screen.width = window.innerWidth),
(window.screen.height = window.innerHeight);
if (qg.onWindowResize) {
qg.onWindowResize({
windowWidth:e,
windowHeight:t
})
}
});
// 兼容联盟写法
if (!window.localStorage) {
(window.localStorage = n(34))
}
(window.alert = console.error.bind(console)),
(window.close = qg.getClose ? qg.getClose : function () {});
defineReadOnlyProperty(global, "window", window);
defineReadOnlyProperty(global.window, "top", window);
defineReadOnlyProperty(global.window, "parent", window);
defineReadOnlyProperty(global, "WebSocket", window.WebSocket);
try {
defineReadOnlyProperty(
global.canvas.__proto__,
"__proto__",
global.canvas.__proto__.__proto__
);
defineReadOnlyProperty(
global.canvas.__proto__.__proto__,
"__proto__",
global.canvas.__proto__.__proto__.__proto__
);
defineReadOnlyProperty(
global.canvas.__proto__.__proto__.__proto__,
"__proto__",
global.canvas.__proto__.__proto__.__proto__.__proto__
);
// GameGlobal = global;
GameGlobal.__isAdapterInjected = true;
// Object.freeze(global.canvas.__proto__);
} catch (e) {
// console.error(e);
}
},
function (e, t, n) {
!(function () {
function e(e) {
this.message = e;
}
var n = t,
r = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
(e.prototype = new Error()),
(e.prototype.name = "InvalidCharacterError"),
n.btoa ||
(n.btoa = function (t) {
for (
var n, o, i = String(t), a = 0, s = r, c = "";
i.charAt(0 | a) || ((s = "="), a % 1);
c += s.charAt(63 & (n >> (8 - (a % 1) * 8)))
) {
if ((o = i.charCodeAt((a += 0.75))) > 255)
throw new e(
"'btoa' failed: The string to be encoded contains characters outside of the Latin1 range."
);
n = (n << 8) | o;
}
return c;
}),
n.atob ||
(n.atob = function (t) {
var n = String(t).replace(/[=]+$/, "");
if (n.length % 4 == 1)
throw new e(
"'atob' failed: The string to be decoded is not correctly encoded."
);
for (
var o, i, a = 0, s = 0, c = "";
(i = n.charAt(s++));
~i && ((o = a % 4 ? 64 * o + i : i), a++ % 4)
? (c += String.fromCharCode(255 & (o >> ((-2 * a) & 6))))
: 0
)
i = r.indexOf(i);
return c;
});
})();
},
function (e, t, n) {
(function (n) {
var r, o, i;
!(function (n) {
(o = [t]),
void 0 ===
(i =
"function" ==
typeof (r = function (e) {
"use strict";
if (((e.URL = n.URL || n.webkitURL), n.Blob && n.URL))
try {
return void new Blob();
} catch (e) {}
var t =
n.BlobBuilder ||
n.WebKitBlobBuilder ||
n.MozBlobBuilder ||
(function () {
var t = function (e) {
return Object.prototype.toString
.call(e)
.match(/^\[object\s(.*)\]$/)[1];
},
r = function () {
this.data = [];
},
o = function (e, t, n) {
(this.data = e),
(this.size = e.length),
(this.type = t),
(this.encoding = n);
},
i = r.prototype,
a = o.prototype,
s = n.FileReaderSync,
c = function (e) {
this.code = this[(this.name = e)];
},
u =
"NOT_FOUND_ERR SECURITY_ERR ABORT_ERR NOT_READABLE_ERR ENCODING_ERR NO_MODIFICATION_ALLOWED_ERR INVALID_STATE_ERR SYNTAX_ERR".split(
" "
),
l = u.length,
d = n.URL || n.webkitURL || e,
h = d.createObjectURL,
f = d.revokeObjectURL,
p = d,
g = n.btoa,
m = n.atob,
w = n.ArrayBuffer,
y = n.Uint8Array,
v = /^[\w-]+:\/*\[?[\w\.:-]+\]?(?::[0-9]+)?/;
for (o.fake = a.fake = !0; l--; ) c.prototype[u[l]] = l + 1;
return (
d.createObjectURL ||
(p = e.URL =
function (e) {
var t,
n = document.createElementNS(
"http://www.w3.org/1999/xhtml",
"a"
);
return (
(n.href = e),
"origin" in n ||
("data:" === n.protocol.toLowerCase()
? (n.origin = null)
: ((t = e.match(v)), (n.origin = t && t[1]))),
n
);
}),
(p.createObjectURL = function (e) {
var t,
n = e.type;
return (
null === n && (n = "application/octet-stream"),
e instanceof o
? ((t = "data:" + n),
"base64" === e.encoding
? t + ";base64," + e.data
: "URI" === e.encoding
? t + "," + decodeURIComponent(e.data)
: g
? t + ";base64," + g(e.data)
: t + "," + encodeURIComponent(e.data))
: h
? h.call(d, e)
: void 0
);
}),
(p.revokeObjectURL = function (e) {
"data:" !== e.substring(0, 5) && f && f.call(d, e);
}),
(i.append = function (e) {
var n = this.data;
if (y && (e instanceof w || e instanceof y)) {
for (
var r = "", i = new y(e), a = 0, u = i.length;
a < u;
a++
)
r += String.fromCharCode(i[a]);
n.push(r);
} else if ("Blob" === t(e) || "File" === t(e)) {
if (!s) throw new c("NOT_READABLE_ERR");
var l = new s();
n.push(l.readAsBinaryString(e));
} else
e instanceof o
? "base64" === e.encoding && m
? n.push(m(e.data))
: "URI" === e.encoding
? n.push(decodeURIComponent(e.data))
: "raw" === e.encoding && n.push(e.data)
: ("string" != typeof e && (e += ""),
n.push(unescape(encodeURIComponent(e))));
}),
(i.getBlob = function (e) {
return (
arguments.length || (e = null),
new o(this.data.join(""), e, "raw")
);
}),
(i.toString = function () {
return "[object BlobBuilder]";
}),
(a.slice = function (e, t, n) {
var r = arguments.length;
return (
r < 3 && (n = null),
new o(
this.data.slice(e, r > 1 ? t : this.data.length),
n,
this.encoding
)
);
}),
(a.toString = function () {
return "[object Blob]";
}),
(a.close = function () {
(this.size = 0), delete this.data;
}),
r
);
})();
e.Blob = function (e, n) {
var r = (n && n.type) || "",
o = new t();
if (e)
for (var i = 0, a = e.length; i < a; i++)
Uint8Array && e[i] instanceof Uint8Array
? o.append(e[i].buffer)
: o.append(e[i]);
var s = o.getBlob(r);
return (
!s.slice && s.webkitSlice && (s.slice = s.webkitSlice), s
);
};
var r =
Object.getPrototypeOf ||
function (e) {
return e.__proto__;
};
e.Blob.prototype = r(new e.Blob());
})
? r.apply(t, o)
: r) || (e.exports = i);
})(
("undefined" != typeof self && self) ||
("undefined" != typeof window && window) ||
(void 0 !== n && n) ||
this.content ||
this
);
}).call(this, n(20));
},
function (e, t) {
var n;
n = (function () {
return this;
})();
try {
n = n || new Function("return this")();
} catch (e) {
"object" == typeof window && (n = window);
}
e.exports = n;
},
function (e, t, n) {
function r(e) {
this.options = e || { locator: {} };
}
function o() {
this.cdata = !1;
}
function i(e, t) {
(t.lineNumber = e.lineNumber), (t.columnNumber = e.columnNumber);
}
function a(e) {
if (e)
return (
"\n@" +
(e.systemId || "") +
"#[line:" +
e.lineNumber +
",col:" +
e.columnNumber +
"]"
);
}
function s(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 c(e, t) {
e.currentElement ? e.currentElement.appendChild(t) : e.doc.appendChild(t);
}
(r.prototype.parseFromString = function (e, t) {
var n = this.options,
r = new l(),
i = n.domBuilder || new o(),
s = n.errorHandler,
c = n.locator,
d = n.xmlns || {},
h = /\/x?html?$/.test(t),
f = h
? u.entityMap
: { lt: "<", gt: ">", amp: "&", quot: '"', apos: "'" };
return (
c && i.setDocumentLocator(c),
(r.errorHandler = (function (e, t, n) {
if (!e) {
if (t instanceof o) return t;
e = t;
}
var r = {},
i = e instanceof Function;
function s(t) {
var o = e[t];
!o &&
i &&
(o =
2 == e.length
? function (n) {
e(t, n);
}
: e),
(r[t] =
(o &&
function (e) {
o("[xmldom " + t + "]\t" + e + a(n));
}) ||
function () {});
}
return (n = n || {}), s("warning"), s("error"), s("fatalError"), r;
})(s, i, c)),
(r.domBuilder = n.domBuilder || i),
h && (d[""] = "http://www.w3.org/1999/xhtml"),
(d.xml = d.xml || "http://www.w3.org/XML/1998/namespace"),
e ? r.parse(e, d, f) : r.errorHandler.error("invalid doc source"),
i.doc
);
}),
(o.prototype = {
startDocument: function () {
(this.doc = new d().createDocument(null, null, null)),
this.locator && (this.doc.documentURI = this.locator.systemId);
},
startElement: function (e, t, n, r) {
var o = this.doc,
a = o.createElementNS(e, n || t),
s = r.length;
c(this, a),
(this.currentElement = a),
this.locator && i(this.locator, a);
for (var u = 0; u < s; u++) {
e = r.getURI(u);
var l = r.getValue(u),
d = ((n = r.getQName(u)), o.createAttributeNS(e, n));
this.locator && i(r.getLocator(u), d),
(d.value = d.nodeValue = l),
a.setAttributeNode(d);
}
},
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) {
var n = this.doc.createProcessingInstruction(e, t);
this.locator && i(this.locator, n), c(this, n);
},
ignorableWhitespace: function (e, t, n) {},
characters: function (e, t, n) {
if ((e = s.apply(this, arguments))) {
if (this.cdata) var r = this.doc.createCDATASection(e);
else r = this.doc.createTextNode(e);
this.currentElement
? this.currentElement.appendChild(r)
: /^\s*$/.test(e) && this.doc.appendChild(r),
this.locator && i(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 = s.apply(this, arguments);
var r = this.doc.createComment(e);
this.locator && i(this.locator, r), c(this, r);
},
startCDATA: function () {
this.cdata = !0;
},
endCDATA: function () {
this.cdata = !1;
},
startDTD: function (e, t, n) {
var r = this.doc.implementation;
if (r && r.createDocumentType) {
var o = r.createDocumentType(e, t, n);
this.locator && i(this.locator, o), c(this, o);
}
},
warning: function (e) {
console.warn("[xmldom warning]\t" + e, a(this.locator));
},
error: function (e) {
console.error("[xmldom error]\t" + e, a(this.locator));
},
fatalError: function (e) {
throw (
(console.error("[xmldom fatalError]\t" + e, a(this.locator)), e)
);
},
}),
"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(
/\w+/g,
function (e) {
o.prototype[e] = function () {
return null;
};
}
);
var u = n(22),
l = n(23).XMLReader,
d = (t.DOMImplementation = n(3).DOMImplementation);
(t.XMLSerializer = n(3).XMLSerializer), (t.DOMParser = r);
},
function (e, t) {
t.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: "♦",
};
},
function (e, t) {
var n =
/[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]/,
r = new RegExp(
"[\\-\\.0-9" +
n.source.slice(1, -1) +
"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"
),
o = new RegExp(
"^" + n.source + r.source + "*(?::" + n.source + r.source + "*)?$"
),
i = 0,
a = 1,
s = 2,
c = 3,
u = 4,
l = 5,
d = 6,
h = 7;
function f() {}
function p(e, t) {
return (
(t.lineNumber = e.lineNumber), (t.columnNumber = e.columnNumber), t
);
}
function g(e, t, n, r, o, f) {
for (var p, g = ++t, m = i; ; ) {
var w = e.charAt(g);
switch (w) {
case "=":
if (m === a) (p = e.slice(t, g)), (m = c);
else {
if (m !== s)
throw new Error("attribute equal must after attrName");
m = c;
}
break;
case "'":
case '"':
if (m === c || m === a) {
if (
(m === a &&
(f.warning('attribute value must after "="'),
(p = e.slice(t, g))),
(t = g + 1),
!((g = e.indexOf(w, t)) > 0))
)
throw new Error("attribute value no end '" + w + "' match");
(y = e.slice(t, g).replace(/&#?\w+;/g, o)),
n.add(p, y, t - 1),
(m = l);
} else {
if (m != u) throw new Error('attribute value must after "="');
(y = e.slice(t, g).replace(/&#?\w+;/g, o)),
n.add(p, y, t),
f.warning(
'attribute "' + p + '" missed start quot(' + w + ")!!"
),
(t = g + 1),
(m = l);
}
break;
case "/":
switch (m) {
case i:
n.setTagName(e.slice(t, g));
case l:
case d:
case h:
(m = h), (n.closed = !0);
case u:
case a:
case s:
break;
default:
throw new Error("attribute invalid close char('/')");
}
break;
case "":
return (
f.error("unexpected end of input"),
m == i && n.setTagName(e.slice(t, g)),
g
);
case ">":
switch (m) {
case i:
n.setTagName(e.slice(t, g));
case l:
case d:
case h:
break;
case u:
case a:
"/" === (y = e.slice(t, g)).slice(-1) &&
((n.closed = !0), (y = y.slice(0, -1)));
case s:
m === s && (y = p),
m == u
? (f.warning('attribute "' + y + '" missed quot(")!!'),
n.add(p, y.replace(/&#?\w+;/g, o), t))
: (("http://www.w3.org/1999/xhtml" === r[""] &&
y.match(/^(?:disabled|checked|selected)$/i)) ||
f.warning(
'attribute "' +
y +
'" missed value!! "' +
y +
'" instead!!'
),
n.add(y, y, t));
break;
case c:
throw new Error("attribute value missed!!");
}
return g;
case "":
w = " ";
default:
if (w <= " ")
switch (m) {
case i:
n.setTagName(e.slice(t, g)), (m = d);
break;
case a:
(p = e.slice(t, g)), (m = s);
break;
case u:
var y = e.slice(t, g).replace(/&#?\w+;/g, o);
f.warning('attribute "' + y + '" missed quot(")!!'),
n.add(p, y, t);
case l:
m = d;
}
else
switch (m) {
case s:
n.tagName;
("http://www.w3.org/1999/xhtml" === r[""] &&
p.match(/^(?:disabled|checked|selected)$/i)) ||
f.warning(
'attribute "' +
p +
'" missed value!! "' +
p +
'" instead2!!'
),
n.add(p, p, t),
(t = g),
(m = a);
break;
case l:
f.warning('attribute space is required"' + p + '"!!');
case d:
(m = a), (t = g);
break;
case c:
(m = u), (t = g);
break;
case h:
throw new Error(
"elements closed character '/' and '>' must be connected to"
);
}
}
g++;
}
}
function m(e, t, n) {
for (var r = e.tagName, o = null, i = e.length; i--; ) {
var a = e[i],
s = a.qName,
c = a.value;
if ((h = s.indexOf(":")) > 0)
var u = (a.prefix = s.slice(0, h)),
l = s.slice(h + 1),
d = "xmlns" === u && l;
else (l = s), (u = null), (d = "xmlns" === s && "");
(a.localName = l),
!1 !== d &&
(null == o && ((o = {}), v(n, (n = {}))),
(n[d] = o[d] = c),
(a.uri = "http://www.w3.org/2000/xmlns/"),
t.startPrefixMapping(d, c));
}
for (i = e.length; i--; ) {
(u = (a = e[i]).prefix) &&
("xml" === u && (a.uri = "http://www.w3.org/XML/1998/namespace"),
"xmlns" !== u && (a.uri = n[u || ""]));
}
var h;
(h = r.indexOf(":")) > 0
? ((u = e.prefix = r.slice(0, h)), (l = e.localName = r.slice(h + 1)))
: ((u = null), (l = e.localName = r));
var f = (e.uri = n[u || ""]);
if ((t.startElement(f, l, r, e), !e.closed))
return (e.currentNSMap = n), (e.localNSMap = o), !0;
if ((t.endElement(f, l, r), o)) for (u in o) t.endPrefixMapping(u);
}
function w(e, t, n, r, o) {
if (/^(?:script|textarea)$/i.test(n)) {
var i = e.indexOf("</" + n + ">", t),
a = e.substring(t + 1, i);
if (/[&<]/.test(a))
return /^script$/i.test(n)
? (o.characters(a, 0, a.length), i)
: ((a = a.replace(/&#?\w+;/g, r)), o.characters(a, 0, a.length), i);
}
return t + 1;
}
function y(e, t, n, r) {
var o = r[n];
return (
null == o &&
((o = e.lastIndexOf("</" + n + ">")) < t &&
(o = e.lastIndexOf("</" + n)),
(r[n] = o)),
o < t
);
}
function v(e, t) {
for (var n in e) t[n] = e[n];
}
function _(e, t, n, r) {
switch (e.charAt(t + 2)) {
case "-":
return "-" === e.charAt(t + 3)
? (o = e.indexOf("--\x3e", t + 4)) > t
? (n.comment(e, t + 4, o - t - 4), o + 3)
: (r.error("Unclosed comment"), -1)
: -1;
default:
if ("CDATA[" == e.substr(t + 3, 6)) {
var o = e.indexOf("]]>", t + 9);
return (
n.startCDATA(),
n.characters(e, t + 9, o - t - 9),
n.endCDATA(),
o + 3
);
}
var i = (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),
a = i.length;
if (a > 1 && /!doctype/i.test(i[0][0])) {
var s = i[1][0],
c = a > 3 && /^public$/i.test(i[2][0]) && i[3][0],
u = a > 4 && i[4][0],
l = i[a - 1];
return (
n.startDTD(
s,
c && c.replace(/^(['"])(.*?)\1$/, "$2"),
u && u.replace(/^(['"])(.*?)\1$/, "$2")
),
n.endDTD(),
l.index + l[0].length
);
}
}
return -1;
}
function x(e, t, n) {
var r = e.indexOf("?>", t);
if (r) {
var o = e.substring(t, r).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);
if (o) {
o[0].length;
return n.processingInstruction(o[1], o[2]), r + 2;
}
return -1;
}
return -1;
}
function b(e) {}
(f.prototype = {
parse: function (e, t, n) {
var r = this.domBuilder;
r.startDocument(),
v(t, (t = {})),
(function (e, t, n, r, o) {
function i(e) {
var t = e.slice(1, -1);
return t in n
? n[t]
: "#" === t.charAt(0)
? (function (e) {
if (e > 65535) {
var t = 55296 + ((e -= 65536) >> 10),
n = 56320 + (1023 & e);
return String.fromCharCode(t, n);
}
return String.fromCharCode(e);
})(parseInt(t.substr(1).replace("x", "0x")))
: (o.error("entity not found:" + e), e);
}
function a(t) {
if (t > v) {
var n = e.substring(v, t).replace(/&#?\w+;/g, i);
d && s(v), r.characters(n, 0, t - v), (v = t);
}
}
function s(t, n) {
for (; t >= u && (n = l.exec(e)); )
(c = n.index), (u = c + n[0].length), d.lineNumber++;
d.columnNumber = t - c + 1;
}
var c = 0,
u = 0,
l = /.*(?:\r\n?|\n)|.*$/g,
d = r.locator,
h = [{ currentNSMap: t }],
f = {},
v = 0;
for (;;) {
try {
var E = e.indexOf("<", v);
if (E < 0) {
if (!e.substr(v).match(/^\s*$/)) {
var T = r.doc,
S = T.createTextNode(e.substr(v));
T.appendChild(S), (r.currentElement = S);
}
return;
}
switch ((E > v && a(E), e.charAt(E + 1))) {
case "/":
var N = e.indexOf(">", E + 3),
C = e.substring(E + 2, N),
A = h.pop();
N < 0
? ((C = e.substring(E + 2).replace(/[\s<].*/, "")),
o.error(
"end tag name: " + C + " is not complete:" + A.tagName
),
(N = E + 1 + C.length))
: C.match(/\s</) &&
((C = C.replace(/[\s<].*/, "")),
o.error("end tag name: " + C + " maybe not complete"),
(N = E + 1 + C.length));
var R = A.localNSMap,
I = A.tagName == C,
D =
I ||
(A.tagName &&
A.tagName.toLowerCase() == C.toLowerCase());
if (D) {
if ((r.endElement(A.uri, A.localName, C), R))
for (var k in R) r.endPrefixMapping(k);
I ||
o.fatalError(
"end tag name: " +
C +
" is not match the current start tagName:" +
A.tagName
);
} else h.push(A);
N++;
break;
case "?":
d && s(E), (N = x(e, E, r));
break;
case "!":
d && s(E), (N = _(e, E, r, o));
break;
default:
d && s(E);
var P = new b(),
M = h[h.length - 1].currentNSMap,
N = g(e, E, P, M, i, o),
L = P.length;
if (
(!P.closed &&
y(e, N, P.tagName, f) &&
((P.closed = !0),
n.nbsp || o.warning("unclosed xml attribute")),
d && L)
) {
for (var q = p(d, {}), F = 0; F < L; F++) {
var B = P[F];
s(B.offset), (B.locator = p(d, {}));
}
(r.locator = q), m(P, r, M) && h.push(P), (r.locator = d);
} else m(P, r, M) && h.push(P);
"http://www.w3.org/1999/xhtml" !== P.uri || P.closed
? N++
: (N = w(e, N, P.tagName, i, r));
}
} catch (e) {
o.error("element parse error: " + e), (N = -1);
}
N > v ? (v = N) : a(Math.max(E, v) + 1);
}
})(e, t, n, r, this.errorHandler),
r.endDocument();
},
}),
(b.prototype = {
setTagName: function (e) {
if (!o.test(e)) throw new Error("invalid tagName:" + e);
this.tagName = e;
},
add: function (e, t, n) {
if (!o.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;
},
}),
(t.XMLReader = f);
},
function (e, t, n) {
const r = n(1),
o = n(8),
i = n(9),
a = n(4),
s = n(11),
c = n(13),
u = n(7),
l = n(14);
let d = new (class extends u {
constructor() {
super(),
(this.readyState = "complete"),
(this.visibilityState = "visible"),
(this.documentElement = window),
(this.hidden = !1),
(this.style = {}),
(this.location = n(5)),
(this.head = new r("head")),
(this.body = new r("body")),
(this.fonts = new l()),
(this.scripts = []);
}
createElementNS(e, t, n) {
return this.createElement(t);
}
createElement(e) {
return "canvas" === e
? new a()
: "audio" === e
? new i()
: "img" === e
? new o()
: "video" === e
? new s()
: "script" === e
? new c()
: new r(e);
}
getElementById(e) {
return e === mainCanvas.id || "canvas" === e ? mainCanvas : new r(e);
}
getElementsByTagName(e) {
return "head" === e
? [d.head]
: "body" === e
? [d.body]
: "canvas" === e
? [mainCanvas]
: [new r(e)];
}
getElementsByName(e) {
return "head" === e
? [d.head]
: "body" === e
? [d.body]
: "canvas" === e
? [mainCanvas]
: [new r(e)];
}
querySelector(e) {
return "head" === e
? d.head
: "body" === e
? d.body
: "canvas" === e
? mainCanvas
: e === `#${mainCanvas.id}`
? mainCanvas
: new r(e);
}
querySelectorAll(e) {
return "head" === e
? [d.head]
: "body" === e
? [d.body]
: "canvas" === e
? [mainCanvas]
: [new r(e)];
}
createTextNode() {
return new r("text");
}
elementFromPoint() {
return window.canvas;
}
createEvent(e) {
return window[e] ? new window[e]() : null;
}
})();
e.exports = d;
},
function (e, t) {
e.exports = class {
constructor(e, t, n, r) {
(this.x = e || 0),
(this.y = t || 0),
(this.width = n || 0),
(this.height = r || 0),
(this.left = this.x),
(this.top = this.y),
(this.right = this.x + this.width),
(this.bottom = this.y + this.height);
}
};
},
function (e, t) {
const n = 1;
e.exports = class {
constructor() {}
get code() {
return n;
}
get message() {
return "";
}
};
},
function (e, t) {
if (window.HTMLImageElement){
e.exports = window.HTMLImageElement;
} else {
const n = qg.createImage();
e.exports = n.constructor;
}
},
function (e, t, n) {
const r = n(2);
e.exports = class extends r {
construct() {
this.result = null;
}
abort() {}
readAsArrayBuffer() {}
readAsDataURL(e) {
this.result = "data:image/png;base64," + window.btoa(e);
var t = new Event("load");
this.dispatchEvent(t);
}
readAsText() {}
};
},
function (e, t) {
e.exports = class {
constructor(e, t, n) {
(this.family = e),
(this.source = t),
(this.descriptors = n),
(this._status = "unloaded"),
(this._loaded = new Promise((e, t) => {
(this._resolveCB = e), (this._rejectCB = t);
}));
}
load() {}
get status() {
return this._status;
}
get loaded() {
return this._loaded;
}
};
},
function (e, t, n) {
const r = n(0);
e.exports = class extends r {
constructor(e, t) {
super(e),
(this.touches = []),
(this.targetTouches = []),
(this.changedTouches = []);
}
};
},
function (e, t, n) {
const r = n(0);
e.exports = class extends r {
constructor(e, t) {
super(e),
(this._button = t.button),
(this._which = t.which),
(this._wheelDelta = t.wheelDelta),
(this._clientX = t.clientX),
(this._clientY = t.clientY),
(this._screenX = t.screenX),
(this._screenY = t.screenY),
(this._pageX = t.pageX),
(this._pageY = t.pageY);
}
get button() {
return this._button;
}
get which() {
return this._which;
}
get wheelDelta() {
return this._wheelDelta;
}
get clientX() {
return this._clientX;
}
get clientY() {
return this._clientY;
}
get screenX() {
return this._screenX;
}
get screenY() {
return this._screenY;
}
get pageX() {
return this._pageX;
}
get pageY() {
return this._pageY;
}
};
},
function (e, t, n) {
const r = n(0),
o = {
48: ")",
49: "!",
50: "@",
51: "#",
52: "$",
53: "%",
54: "^",
55: "&",
56: "*",
57: "(",
};
var i = !1;
e.exports = class extends r {
constructor(e, t) {
super(e),
"object" == typeof t
? ((this._altKeyActive = !!t.altKey && t.altKey),
(this._ctrlKeyActive = !!t.ctrlKey && t.ctrlKey),
(this._metaKeyActive = !!t.metaKey && t.metaKey),
(this._shiftKeyActive = !!t.shiftKey && t.shiftKey),
(this._keyCode = t.keyCode ? t.keyCode : -1),
(this._repeat = !!t.repeat && t.repeat))
: ((this._altKeyActive = !1),
(this._ctrlKeyActive = !1),
(this._metaKeyActive = !1),
(this._shiftKeyActive = !1),
(this._keyCode = -1),
(this._repeat = !1));
var n = this._keyCode;
if (n >= 48 && n <= 57) {
var r = n - 48;
(this._code = "Digit" + r),
(this._key = this._shiftKeyActive ? o[n] : "" + r);
} else if (n >= 10048 && n <= 10057)
(r = (n = this._keyCode = n - 1e4) - 48),
(this._code = "Numpad" + r),
(this._key = "" + r);
else if (n >= 65 && n <= 90) {
var a = String.fromCharCode(n);
(this._code = "Key" + a),
(this._key = this._shiftKeyActive || i ? a : a.toLowerCase());
} else
n >= 112 && n <= 123
? (this._code = this._key = "F" + (n - 111))
: 27 === n
? (this._code = this._key = "Escape")
: 189 === n
? ((this._code = "Minus"),
(this._key = this._shiftKeyActive ? "_" : "-"))
: 187 === n
? ((this._code = "Equal"),
(this._key = this._shiftKeyActive ? "+" : "="))
: 220 === n
? ((this._code = "Backslash"),
(this._key = this._shiftKeyActive ? "|" : "\\"))
: 192 === n
? ((this._code = "Backquote"),
(this._key = this._shiftKeyActive ? "~" : "`"))
: 8 === n
? (this._code = this._key = "Backspace")
: 13 === n
? (this._code = this._key = "Enter")
: 219 === n
? ((this._code = "BracketLeft"),
(this._key = this._shiftKeyActive ? "{" : "["))
: 221 === n
? ((this._code = "BracketRight"),
(this._key = this._shiftKeyActive ? "}" : "]"))
: 186 === n
? ((this._code = "Semicolon"),
(this._key = this._shiftKeyActive ? ":" : ";"))
: 222 === n
? ((this._code = "Quote"),
(this._key = this._shiftKeyActive ? '"' : "'"))
: 9 === n
? (this._code = this._key = "Tab")
: 17 === n
? ((this._code = "ControlLeft"), (this._key = "Control"))
: 20017 === n
? ((this._keyCode = 17),
(this._code = "ControlRight"),
(this._key = "Control"))
: 16 === n
? ((this._code = "ShiftLeft"), (this._key = "Shift"))
: 20016 === n
? ((this._keyCode = 16),
(this._code = "ShiftRight"),
(this._key = "Shift"))
: 18 === n
? ((this._code = "AltLeft"), (this._key = "Alt"))
: 20018 === n
? ((this._keyCode = 18),
(this._code = "AltRight"),
(this._key = "Alt"))
: 91 === n
? ((this._code = "MetaLeft"), (this._key = "Meta"))
: 93 === n
? ((this._code = "MetaRight"), (this._key = "Meta"))
: 37 === n
? (this._code = this._key = "ArrowLeft")
: 38 === n
? (this._code = this._key = "ArrowUp")
: 39 === n
? (this._code = this._key = "ArrowRight")
: 40 === n
? (this._code = this._key = "ArrowDown")
: 20093 === n
? ((this._keyCode = 93), (this._code = this._key = "ContextMenu"))
: 20013 === n
? ((this._keyCode = 13),
(this._code = "NumpadEnter"),
(this._key = "Enter"))
: 107 === n
? ((this._code = "NumpadAdd"), (this._key = "+"))
: 109 === n
? ((this._code = "NumpadSubtract"), (this._key = "-"))
: 106 === n
? ((this._code = "NumpadMultiply"), (this._key = "*"))
: 111 === n
? ((this._code = "NumpadDivide"), (this._key = "/"))
: 12 === n
? ((this._code = "NumLock"), (this._key = "Clear"))
: 124 === n
? (this._code = this._key = "F13")
: 36 === n
? (this._code = this._key = "Home")
: 33 === n
? (this._code = this._key = "PageUp")
: 34 === n
? (this._code = this._key = "PageDown")
: 35 === n
? (this._code = this._key = "End")
: 188 === n
? ((this._code = "Comma"),
(this._key = this._shiftKeyActive ? "<" : ","))
: 190 === n
? ((this._code = "Period"),
(this._key = this._shiftKeyActive ? ">" : "."))
: 191 === n
? ((this._code = "Slash"),
(this._key = this._shiftKeyActive ? "?" : "/"))
: 32 === n
? ((this._code = "Space"), (this._key = " "))
: 46 === n
? (this._code = this._key = "Delete")
: 110 === n
? ((this._code = "NumpadDecimal"), (this._key = "."))
: 20 === n
? ((this._code = this._key = "CapsLock"), "keyup" === e && (i = !i))
: console.log("Unknown keyCode: " + this._keyCode);
}
getModifierState() {
return !1;
}
get altKey() {
return this._altKeyActive;
}
get code() {
return this._code;
}
get ctrlKey() {
return this._ctrlKeyActive;
}
get isComposing() {
return !1;
}
get key() {
return this._key;
}
get keyCode() {
return this._keyCode;
}
get location() {
return 0;
}
get metaKey() {
return this._metaKeyActive;
}
get repeat() {
return this._repeat;
}
get shiftKey() {
return this._shiftKeyActive;
}
};
},
function (e, t, n) {
const r = n(0);
e.exports = class extends r {
constructor(e) {
super("devicemotion"),
e
? ((this._acceleration = e.acceleration
? e.acceleration
: { x: 0, y: 0, z: 0 }),
(this._accelerationIncludingGravity =
e.accelerationIncludingGravity
? e.accelerationIncludingGravity
: { x: 0, y: 0, z: 0 }),
(this._rotationRate = e.rotationRate
? e.rotationRate
: { alpha: 0, beta: 0, gamma: 0 }),
(this._interval = e.interval))
: ((this._acceleration = { x: 0, y: 0, z: 0 }),
(this._accelerationIncludingGravity = { x: 0, y: 0, z: 0 }),
(this._rotationRate = { alpha: 0, beta: 0, gamma: 0 }),
(this._interval = 0));
}
get acceleration() {
return this._acceleration;
}
get accelerationIncludingGravity() {
return this._accelerationIncludingGravity;
}
get rotationRate() {
return this._rotationRate;
}
get interval() {
return this._interval;
}
};
},
function (e, t) {
const n = {
get length() {
const { keys: e } = qg.getStorageInfoSync();
return e.length;
},
key(e) {
const { keys: t } = qg.getStorageInfoSync();
return t[e];
},
getItem: (e) => qg.getStorageSync(e),
setItem(e, t) {
qg.setStorageSync(e, t);
},
removeItem(e) {
qg.removeStorageSync(e);
},
clear() {
qg.clearStorageSync();
},
};
e.exports = n;
},
function (e, t, n) {
require("./wxapi-adapter.js");
},
function (e, t, n) {
var r = (function (e) {
"use strict";
var t,
n = Object.prototype,
r = n.hasOwnProperty,
o = "function" == typeof Symbol ? Symbol : {},
i = o.iterator || "@@iterator",
a = o.asyncIterator || "@@asyncIterator",
s = o.toStringTag || "@@toStringTag";
function c(e, t, n, r) {
var o = t && t.prototype instanceof g ? t : g,
i = Object.create(o.prototype),
a = new C(r || []);
return (
(i._invoke = (function (e, t, n) {
var r = l;
return function (o, i) {
if (r === h) throw new Error("Generator is already running");
if (r === f) {
if ("throw" === o) throw i;
return R();
}
for (n.method = o, n.arg = i; ; ) {
var a = n.delegate;
if (a) {
var s = T(a, n);
if (s) {
if (s === p) continue;
return s;
}
}
if ("next" === n.method) n.sent = n._sent = n.arg;
else if ("throw" === n.method) {
if (r === l) throw ((r = f), n.arg);
n.dispatchException(n.arg);
} else "return" === n.method && n.abrupt("return", n.arg);
r = h;
var c = u(e, t, n);
if ("normal" === c.type) {
if (((r = n.done ? f : d), c.arg === p)) continue;
return { value: c.arg, done: n.done };
}
"throw" === c.type &&
((r = f), (n.method = "throw"), (n.arg = c.arg));
}
};
})(e, n, a)),
i
);
}
function u(e, t, n) {
try {
return { type: "normal", arg: e.call(t, n) };
} catch (e) {
return { type: "throw", arg: e };
}
}
e.wrap = c;
var l = "suspendedStart",
d = "suspendedYield",
h = "executing",
f = "completed",
p = {};
function g() {}
function m() {}
function w() {}
var y = {};
y[i] = function () {
return this;
};
var v = Object.getPrototypeOf,
_ = v && v(v(A([])));
_ && _ !== n && r.call(_, i) && (y = _);
var x = (w.prototype = g.prototype = Object.create(y));
function b(e) {
["next", "throw", "return"].forEach(function (t) {
e[t] = function (e) {
return this._invoke(t, e);
};
});
}
function E(e) {
var t;
this._invoke = function (n, o) {
function i() {
return new Promise(function (t, i) {
!(function t(n, o, i, a) {
var s = u(e[n], e, o);
if ("throw" !== s.type) {
var c = s.arg,
l = c.value;
return l && "object" == typeof l && r.call(l, "__await")
? Promise.resolve(l.__await).then(
function (e) {
t("next", e, i, a);
},
function (e) {
t("throw", e, i, a);
}
)
: Promise.resolve(l).then(
function (e) {
(c.value = e), i(c);
},
function (e) {
return t("throw", e, i, a);
}
);
}
a(s.arg);
})(n, o, t, i);
});
}
return (t = t ? t.then(i, i) : i());
};
}
function T(e, n) {
var r = e.iterator[n.method];
if (r === t) {
if (((n.delegate = null), "throw" === n.method)) {
if (
e.iterator.return &&
((n.method = "return"),
(n.arg = t),
T(e, n),
"throw" === n.method)
)
return p;
(n.method = "throw"),
(n.arg = new TypeError(
"The iterator does not provide a 'throw' method"
));
}
return p;
}
var o = u(r, e.iterator, n.arg);
if ("throw" === o.type)
return (n.method = "throw"), (n.arg = o.arg), (n.delegate = null), p;
var i = o.arg;
return i
? i.done
? ((n[e.resultName] = i.value),
(n.next = e.nextLoc),
"return" !== n.method && ((n.method = "next"), (n.arg = t)),
(n.delegate = null),
p)
: i
: ((n.method = "throw"),
(n.arg = new TypeError("iterator result is not an object")),
(n.delegate = null),
p);
}
function S(e) {
var t = { tryLoc: e[0] };
1 in e && (t.catchLoc = e[1]),
2 in e && ((t.finallyLoc = e[2]), (t.afterLoc = e[3])),
this.tryEntries.push(t);
}
function N(e) {
var t = e.completion || {};
(t.type = "normal"), delete t.arg, (e.completion = t);
}
function C(e) {
(this.tryEntries = [{ tryLoc: "root" }]),
e.forEach(S, this),
this.reset(!0);
}
function A(e) {
if (e) {
var n = e[i];
if (n) return n.call(e);
if ("function" == typeof e.next) return e;
if (!isNaN(e.length)) {
var o = -1,
a = function n() {
for (; ++o < e.length; )
if (r.call(e, o)) return (n.value = e[o]), (n.done = !1), n;
return (n.value = t), (n.done = !0), n;
};
return (a.next = a);
}
}
return { next: R };
}
function R() {
return { value: t, done: !0 };
}
return (
(m.prototype = x.constructor = w),
(w.constructor = m),
(w[s] = m.displayName = "GeneratorFunction"),
(e.isGeneratorFunction = function (e) {
var t = "function" == typeof e && e.constructor;
return (
!!t &&
(t === m || "GeneratorFunction" === (t.displayName || t.name))
);
}),
(e.mark = function (e) {
return (
Object.setPrototypeOf
? Object.setPrototypeOf(e, w)
: ((e.__proto__ = w), s in e || (e[s] = "GeneratorFunction")),
(e.prototype = Object.create(x)),
e
);
}),
(e.awrap = function (e) {
return { __await: e };
}),
b(E.prototype),
(E.prototype[a] = function () {
return this;
}),
(e.AsyncIterator = E),
(e.async = function (t, n, r, o) {
var i = new E(c(t, n, r, o));
return e.isGeneratorFunction(n)
? i
: i.next().then(function (e) {
return e.done ? e.value : i.next();
});
}),
b(x),
(x[s] = "Generator"),
(x[i] = function () {
return this;
}),
(x.toString = function () {
return "[object Generator]";
}),
(e.keys = function (e) {
var t = [];
for (var n in e) t.push(n);
return (
t.reverse(),
function n() {
for (; t.length; ) {
var r = t.pop();
if (r in e) return (n.value = r), (n.done = !1), n;
}
return (n.done = !0), n;
}
);
}),
(e.values = A),
(C.prototype = {
constructor: C,
reset: function (e) {
if (
((this.prev = 0),
(this.next = 0),
(this.sent = this._sent = t),
(this.done = !1),
(this.delegate = null),
(this.method = "next"),
(this.arg = t),
this.tryEntries.forEach(N),
!e)
)
for (var n in this)
"t" === n.charAt(0) &&
r.call(this, n) &&
!isNaN(+n.slice(1)) &&
(this[n] = t);
},
stop: function () {
this.done = !0;
var e = this.tryEntries[0].completion;
if ("throw" === e.type) throw e.arg;
return this.rval;
},
dispatchException: function (e) {
if (this.done) throw e;
var n = this;
function o(r, o) {
return (
(s.type = "throw"),
(s.arg = e),
(n.next = r),
o && ((n.method = "next"), (n.arg = t)),
!!o
);
}
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
var a = this.tryEntries[i],
s = a.completion;
if ("root" === a.tryLoc) return o("end");
if (a.tryLoc <= this.prev) {
var c = r.call(a, "catchLoc"),
u = r.call(a, "finallyLoc");
if (c && u) {
if (this.prev < a.catchLoc) return o(a.catchLoc, !0);
if (this.prev < a.finallyLoc) return o(a.finallyLoc);
} else if (c) {
if (this.prev < a.catchLoc) return o(a.catchLoc, !0);
} else {
if (!u)
throw new Error("try statement without catch or finally");
if (this.prev < a.finallyLoc) return o(a.finallyLoc);
}
}
}
},
abrupt: function (e, t) {
for (var n = this.tryEntries.length - 1; n >= 0; --n) {
var o = this.tryEntries[n];
if (
o.tryLoc <= this.prev &&
r.call(o, "finallyLoc") &&
this.prev < o.finallyLoc
) {
var i = o;
break;
}
}
i &&
("break" === e || "continue" === e) &&
i.tryLoc <= t &&
t <= i.finallyLoc &&
(i = null);
var a = i ? i.completion : {};
return (
(a.type = e),
(a.arg = t),
i
? ((this.method = "next"), (this.next = i.finallyLoc), p)
: this.complete(a)
);
},
complete: function (e, t) {
if ("throw" === e.type) throw e.arg;
return (
"break" === e.type || "continue" === e.type
? (this.next = e.arg)
: "return" === e.type
? ((this.rval = this.arg = e.arg),
(this.method = "return"),
(this.next = "end"))
: "normal" === e.type && t && (this.next = t),
p
);
},
finish: function (e) {
for (var t = this.tryEntries.length - 1; t >= 0; --t) {
var n = this.tryEntries[t];
if (n.finallyLoc === e)
return this.complete(n.completion, n.afterLoc), N(n), p;
}
},
catch: function (e) {
for (var t = this.tryEntries.length - 1; t >= 0; --t) {
var n = this.tryEntries[t];
if (n.tryLoc === e) {
var r = n.completion;
if ("throw" === r.type) {
var o = r.arg;
N(n);
}
return o;
}
}
throw new Error("illegal catch attempt");
},
delegateYield: function (e, n, r) {
return (
(this.delegate = { iterator: A(e), resultName: n, nextLoc: r }),
"next" === this.method && (this.arg = t),
p
);
},
}),
e
);
})(e.exports);
try {
regeneratorRuntime = r;
} catch (e) {
Function("r", "regeneratorRuntime = r")(r);
}
},
function (e, t, n) {
"use strict";
function r() {}
n.r(t);
const o = qg,
info = o.getSystemInfoSync(),
a = {
platform: info.platform || 'android',
language: info.language || 'zh',
appVersion: info.osVersionName || '11',
userAgent: 'Mozilla/5.0 (Android;) Mobile/14E8301 MicroMessenger/6.6.0 MiniGame NetType/WIFI Language/zh_CN',
geolocation: { getCurrentPosition: r, watchPosition: r, clearWatch: r },
};
t.default = a;
},
]);