ranuts 0.1.0-alpha.2 → 0.1.0-alpha.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/build/build.es.d.ts +2 -0
- package/dist/build/build.umd.d.ts +2 -0
- package/dist/build/build.umd.ml.d.ts +2 -0
- package/dist/build/build.umd.node.d.ts +2 -0
- package/dist/build/build.umd.react.d.ts +2 -0
- package/dist/build/build.umd.utils.d.ts +2 -0
- package/dist/build/build.umd.wasm.d.ts +2 -0
- package/dist/examples/clone-deep-example.d.ts +1 -0
- package/dist/examples/is-equal-example.d.ts +1 -0
- package/dist/index.d.ts +9 -16
- package/dist/index.js +147 -1116
- package/dist/mimeType-CrLryRe7.js +81821 -0
- package/dist/plugins/vite-plugins-banner.d.ts +2 -0
- package/dist/reactify-Z-V9Vblb.js +83 -0
- package/dist/src/arithmetic/index.d.ts +186 -0
- package/dist/src/cache/expires.d.ts +1 -0
- package/dist/src/ml/index.d.ts +2 -0
- package/dist/src/ml/index.js +1243 -0
- package/dist/src/ml/ocr.d.ts +11 -0
- package/dist/src/node/appendFile.d.ts +7 -0
- package/dist/src/node/body.d.ts +9 -0
- package/dist/src/node/color.d.ts +7 -0
- package/dist/src/node/command.d.ts +8 -0
- package/dist/src/node/ctx2req.d.ts +5 -0
- package/dist/src/node/fileInfo.d.ts +7 -0
- package/dist/src/node/fs.d.ts +7 -0
- package/dist/src/node/get.d.ts +10 -0
- package/dist/src/node/getIPAdress.d.ts +1 -0
- package/dist/src/node/index.d.ts +25 -0
- package/dist/src/node/index.js +54 -0
- package/dist/src/node/isColorSupported.d.ts +2 -0
- package/dist/src/node/paresUrl.d.ts +19 -0
- package/dist/src/node/readDir.d.ts +6 -0
- package/dist/src/node/readFile.d.ts +9 -0
- package/dist/src/node/router.d.ts +42 -0
- package/dist/src/node/send.d.ts +7 -0
- package/dist/src/node/server.d.ts +18 -0
- package/dist/src/node/startTask.d.ts +2 -0
- package/dist/src/node/stream.d.ts +15 -0
- package/dist/src/node/taskEnd.d.ts +2 -0
- package/dist/src/node/traverse.d.ts +17 -0
- package/dist/src/node/watchFile.d.ts +8 -0
- package/dist/src/node/websocket.d.ts +57 -0
- package/dist/src/node/writeFile.d.ts +8 -0
- package/dist/src/node/ws.d.ts +8 -0
- package/dist/src/optimize/index.d.ts +36 -0
- package/dist/src/optimize/promise.d.ts +0 -0
- package/dist/src/ran/commit.d.ts +0 -0
- package/dist/src/ran/dom.d.ts +0 -0
- package/dist/src/ran/hooks.d.ts +0 -0
- package/dist/src/ran/index.d.ts +20 -0
- package/dist/src/ran/min.d.ts +32 -0
- package/dist/src/ran/reconcile.d.ts +0 -0
- package/dist/src/ran/schedule.d.ts +0 -0
- package/dist/src/react/index.d.ts +2 -0
- package/dist/src/react/index.js +4 -0
- package/dist/src/react/reactify.d.ts +2 -0
- package/dist/src/sort/bubble.d.ts +7 -0
- package/dist/src/sort/bucket.d.ts +7 -0
- package/dist/src/sort/count.d.ts +7 -0
- package/dist/src/sort/heap.d.ts +7 -0
- package/dist/src/sort/index.d.ts +0 -0
- package/dist/src/sort/insert.d.ts +7 -0
- package/dist/src/sort/merge.d.ts +7 -0
- package/dist/src/sort/quick.d.ts +7 -0
- package/dist/src/sort/radix.d.ts +7 -0
- package/dist/src/sort/randomArray.d.ts +9 -0
- package/dist/src/sort/select.d.ts +7 -0
- package/dist/src/sort/shell.d.ts +7 -0
- package/dist/src/utils/audioRecorder.d.ts +16 -0
- package/dist/src/utils/behavior.d.ts +15 -0
- package/dist/src/utils/bom.d.ts +220 -0
- package/dist/src/utils/color.d.ts +71 -0
- package/dist/src/utils/compose.d.ts +10 -0
- package/dist/src/utils/console.d.ts +1 -0
- package/dist/src/utils/debounce.d.ts +7 -0
- package/dist/src/utils/device.d.ts +25 -0
- package/dist/src/utils/dom.d.ts +105 -0
- package/dist/src/utils/error.d.ts +1 -0
- package/dist/src/utils/img.d.ts +16 -0
- package/dist/src/utils/index.d.ts +35 -0
- package/dist/src/utils/index.js +4504 -0
- package/dist/src/utils/memoize.d.ts +7 -0
- package/dist/src/utils/mimeType.d.ts +3 -0
- package/dist/src/utils/monitor.d.ts +38 -0
- package/dist/src/utils/network.d.ts +39 -0
- package/dist/src/utils/noop.d.ts +2 -0
- package/dist/src/utils/number.d.ts +45 -0
- package/dist/src/utils/obj.d.ts +83 -0
- package/dist/src/utils/performance.d.ts +21 -0
- package/dist/src/utils/queue.d.ts +33 -0
- package/dist/src/utils/report.d.ts +8 -0
- package/dist/src/utils/request.d.ts +17 -0
- package/dist/src/utils/script.d.ts +7 -0
- package/dist/src/utils/signal.d.ts +6 -0
- package/dist/src/utils/storage.d.ts +2 -0
- package/dist/src/utils/str.d.ts +72 -0
- package/dist/src/utils/subscribe.d.ts +46 -0
- package/dist/src/utils/throttle.d.ts +15 -0
- package/dist/src/utils/time.d.ts +20 -0
- package/dist/src/utils/totp/sha/common.d.ts +151 -0
- package/dist/src/utils/totp/sha/converters.d.ts +88 -0
- package/dist/src/utils/totp/sha/custom_types.d.ts +60 -0
- package/dist/src/utils/totp/sha/primitives_32.d.ts +98 -0
- package/dist/src/utils/totp/sha/primitives_64.d.ts +116 -0
- package/dist/src/utils/totp/sha/sha.d.ts +103 -0
- package/dist/src/utils/totp/sha/sha1.d.ts +18 -0
- package/dist/src/utils/totp/sha/sha256.d.ts +20 -0
- package/dist/src/utils/totp/sha/sha3.d.ts +53 -0
- package/dist/src/utils/totp/sha/sha512.d.ts +21 -0
- package/dist/src/utils/totp/totp.d.ts +23 -0
- package/dist/src/utils/visual/application.d.ts +14 -0
- package/dist/src/utils/visual/demo/index.d.ts +1 -0
- package/dist/src/utils/visual/demo/sankey.d.ts +2 -0
- package/dist/src/utils/visual/enums.d.ts +27 -0
- package/dist/src/utils/visual/event/boundary.d.ts +22 -0
- package/dist/src/utils/visual/event/event.d.ts +14 -0
- package/dist/src/utils/visual/event/index.d.ts +6 -0
- package/dist/src/utils/visual/event/types.d.ts +32 -0
- package/dist/src/utils/visual/graphics/graphics.d.ts +81 -0
- package/dist/src/utils/visual/graphics/graphicsData.d.ts +13 -0
- package/dist/src/utils/visual/graphics/graphicsGeometry.d.ts +35 -0
- package/dist/src/utils/visual/graphics/index.d.ts +4 -0
- package/dist/src/utils/visual/index.d.ts +7 -0
- package/dist/src/utils/visual/math/bezier.d.ts +2 -0
- package/dist/src/utils/visual/math/enums.d.ts +3 -0
- package/dist/src/utils/visual/math/index.d.ts +5 -0
- package/dist/src/utils/visual/math/matrix.d.ts +113 -0
- package/dist/src/utils/visual/math/transform.d.ts +29 -0
- package/dist/src/utils/visual/render/batchRenderer.d.ts +72 -0
- package/dist/src/utils/visual/render/canvasRenderer.d.ts +10 -0
- package/dist/src/utils/visual/render/index.d.ts +3 -0
- package/dist/src/utils/visual/render/render.d.ts +15 -0
- package/dist/src/utils/visual/render/utils/batch/index.d.ts +90 -0
- package/dist/src/utils/visual/render/utils/float.d.ts +63 -0
- package/dist/src/utils/visual/render/utils/index.d.ts +3 -0
- package/dist/src/utils/visual/render/utils/verticy.d.ts +13 -0
- package/dist/src/utils/visual/render/utils/webgl/batchPool.d.ts +28 -0
- package/dist/src/utils/visual/render/utils/webgl/initShader.d.ts +2 -0
- package/dist/src/utils/visual/render/utils/webgl/shaders.d.ts +2 -0
- package/dist/src/utils/visual/render/utils/webgpu/shaders.d.ts +8 -0
- package/dist/src/utils/visual/render/webGPURenderer.d.ts +49 -0
- package/dist/src/utils/visual/render/webGlRenderer.d.ts +17 -0
- package/dist/src/utils/visual/shape/circle.d.ts +11 -0
- package/dist/src/utils/visual/shape/ellipse.d.ts +12 -0
- package/dist/src/utils/visual/shape/index.d.ts +7 -0
- package/dist/src/utils/visual/shape/polygon.d.ts +11 -0
- package/dist/src/utils/visual/shape/rectangle.d.ts +12 -0
- package/dist/src/utils/visual/shape/roundedRectangle.d.ts +13 -0
- package/dist/src/utils/visual/shape/shape.d.ts +6 -0
- package/dist/src/utils/visual/style/fill.d.ts +8 -0
- package/dist/src/utils/visual/style/index.d.ts +3 -0
- package/dist/src/utils/visual/style/line.d.ts +10 -0
- package/dist/src/utils/visual/types.d.ts +17 -0
- package/dist/src/utils/visual/vertex/container.d.ts +73 -0
- package/dist/src/utils/visual/vertex/index.d.ts +5 -0
- package/dist/src/utils/visual/vertex/point.d.ts +18 -0
- package/dist/src/utils/visual/vertex/vertex.d.ts +36 -0
- package/dist/src/vnode/chainDom.d.ts +47 -0
- package/dist/src/vnode/h.d.ts +6 -0
- package/dist/src/vnode/hooks.d.ts +23 -0
- package/dist/src/vnode/htmlDomApi.d.ts +33 -0
- package/dist/src/vnode/init.d.ts +2 -0
- package/dist/src/vnode/is.d.ts +5 -0
- package/dist/src/vnode/modules/attributes.d.ts +8 -0
- package/dist/src/vnode/modules/class.d.ts +8 -0
- package/dist/src/vnode/modules/index.d.ts +3 -0
- package/dist/src/vnode/modules/listeners.d.ts +12 -0
- package/dist/src/vnode/modules/props.d.ts +8 -0
- package/dist/src/vnode/modules/style.d.ts +14 -0
- package/dist/src/vnode/vnode.d.ts +31 -0
- package/dist/src/wasm/index.d.ts +2 -0
- package/dist/src/wasm/index.js +346 -0
- package/dist/src/wasm/word.d.ts +17 -0
- package/dist/src/wicket/bridge.d.ts +4 -0
- package/dist/src/wicket/index.d.ts +29 -0
- package/dist/test/arithmetic.test.d.ts +1 -0
- package/dist/test/cloneDeep.test.d.ts +1 -0
- package/dist/test/encodeUrl.test.d.ts +1 -0
- package/dist/test/escapeHtml.test.d.ts +1 -0
- package/dist/test/is-equal.test.d.ts +1 -0
- package/dist/test/mimeType.test.d.ts +1 -0
- package/dist/test/server.test.d.ts +1 -0
- package/dist/test/sort.test.d.ts +1 -0
- package/dist/test/status.test.d.ts +1 -0
- package/dist/test/totp.test.d.ts +1 -0
- package/dist/test/utils/compose.test.d.ts +1 -0
- package/dist/test/utils/mergeObj.test.d.ts +1 -0
- package/dist/test/utils/ocr.test.d.ts +1 -0
- package/dist/test/visual/math.test.d.ts +1 -0
- package/dist/test/vnode/index.d.ts +1 -0
- package/dist/test/vnode/server.d.ts +2 -0
- package/dist/test/vnode/vnode.d.ts +1 -0
- package/dist/test/websocket.test.d.ts +1 -0
- package/dist/test/writeFile.test.d.ts +1 -0
- package/dist/tsconfig.json +25 -0
- package/dist/umd/index.umd.cjs +1 -0
- package/dist/umd/ml/ml.umd.cjs +1 -0
- package/dist/umd/node/node.umd.cjs +1 -0
- package/dist/umd/react/react.umd.cjs +1 -0
- package/dist/umd/utils/utils.umd.cjs +1 -0
- package/dist/umd/wasm/wasm.umd.cjs +1 -0
- package/dist/vite.config.d.ts +11 -0
- package/dist/ws-ioQsn2UB.js +703 -0
- package/package.json +55 -21
- package/readme.md +90 -0
- package/typings.d.ts +28 -0
- package/assets/img/sort/bubble.gif +0 -0
- package/assets/img/sort/complexity.png +0 -0
- package/assets/img/sort/select.gif +0 -0
- package/assets/img/sort/sort.png +0 -0
- package/assets/img/tree/balanceTree.png +0 -0
- package/dist/index.js.map +0 -1
- package/dist/index.umd.cjs +0 -2
- package/dist/index.umd.cjs.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,1120 +1,151 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
7
|
-
import fs from "node:fs";
|
|
8
|
-
let fileSystem = fs;
|
|
9
|
-
if (typeof process !== "undefined" && typeof fileSystem.Stats === "function") {
|
|
10
|
-
fileSystem._identification = true;
|
|
11
|
-
} else {
|
|
12
|
-
fileSystem = { _identification: false, message: "require is not defined" };
|
|
13
|
-
}
|
|
14
|
-
const fs$1 = fileSystem;
|
|
15
|
-
const writeFile = (path, content) => new Promise((resolve, reject) => {
|
|
16
|
-
if (!fs$1._identification)
|
|
17
|
-
return reject({ _identification: false, data: "fs is not loaded" });
|
|
18
|
-
fs$1.writeFile(
|
|
19
|
-
path,
|
|
20
|
-
content,
|
|
21
|
-
{
|
|
22
|
-
mode: 438,
|
|
23
|
-
flag: "w+",
|
|
24
|
-
encoding: "utf-8"
|
|
25
|
-
},
|
|
26
|
-
(err) => {
|
|
27
|
-
if (err) {
|
|
28
|
-
reject({ _identification: false, data: err });
|
|
29
|
-
throw err;
|
|
30
|
-
} else {
|
|
31
|
-
resolve({ _identification: true, data: { path, content } });
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
);
|
|
35
|
-
});
|
|
36
|
-
const readFile = (path, format = "utf-8") => new Promise((resolve, reject) => {
|
|
37
|
-
if (!fs$1._identification)
|
|
38
|
-
return reject({ _identification: false, data: "fs is not loaded" });
|
|
39
|
-
fs$1.readFile(path, format, (err, data) => {
|
|
40
|
-
err ? reject({ _identification: false, data: err }) : resolve({ _identification: true, data });
|
|
41
|
-
});
|
|
42
|
-
});
|
|
43
|
-
const watchFile = (path, interval = 20) => new Promise((resolve, reject) => {
|
|
44
|
-
if (!fs$1._identification)
|
|
45
|
-
return reject({ _identification: false, data: "fs is not loaded" });
|
|
46
|
-
fs$1.watchFile(path, { interval }, (curr, prev) => {
|
|
47
|
-
if (curr.mtime !== prev.mtime) {
|
|
48
|
-
fs$1.unwatchFile(path);
|
|
49
|
-
resolve({ _identification: true, data: { msg: "file is changed" } });
|
|
50
|
-
} else {
|
|
51
|
-
resolve({
|
|
52
|
-
_identification: false,
|
|
53
|
-
data: { msg: "file is not changed" }
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
});
|
|
58
|
-
class Subscribe {
|
|
59
|
-
constructor() {
|
|
60
|
-
__publicField(this, "_events");
|
|
61
|
-
__publicField(this, "on", (eventName, eventItem) => {
|
|
62
|
-
if (this._events[eventName] && eventName !== Symbol.for("new-listener")) {
|
|
63
|
-
this.emit(Symbol.for("new-listener"), eventName);
|
|
64
|
-
}
|
|
65
|
-
const callbacks = this._events[eventName] || [];
|
|
66
|
-
if (typeof eventItem === "function") {
|
|
67
|
-
callbacks.push({
|
|
68
|
-
name: eventName,
|
|
69
|
-
callback: eventItem
|
|
70
|
-
});
|
|
71
|
-
} else {
|
|
72
|
-
callbacks.push(eventItem);
|
|
73
|
-
}
|
|
74
|
-
this._events[eventName] = callbacks;
|
|
75
|
-
});
|
|
76
|
-
__publicField(this, "emit", (eventName, ...args) => {
|
|
77
|
-
const callbacks = this._events[eventName] || [];
|
|
78
|
-
callbacks.forEach((item) => {
|
|
79
|
-
const { callback } = item;
|
|
80
|
-
callback(...args);
|
|
81
|
-
});
|
|
82
|
-
});
|
|
83
|
-
__publicField(this, "once", (eventName, eventItem) => {
|
|
84
|
-
let one;
|
|
85
|
-
if (typeof eventItem === "function") {
|
|
86
|
-
one = {
|
|
87
|
-
name: eventName,
|
|
88
|
-
callback: (...args) => {
|
|
89
|
-
eventItem(...args);
|
|
90
|
-
this.off(eventName, one);
|
|
91
|
-
},
|
|
92
|
-
initialCallback: eventItem
|
|
93
|
-
};
|
|
94
|
-
} else {
|
|
95
|
-
const { callback } = eventItem;
|
|
96
|
-
one = {
|
|
97
|
-
name: eventName,
|
|
98
|
-
callback: (...args) => {
|
|
99
|
-
callback(...args);
|
|
100
|
-
this.off(eventName, one);
|
|
101
|
-
},
|
|
102
|
-
initialCallback: callback
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
this.on(eventName, one);
|
|
106
|
-
});
|
|
107
|
-
__publicField(this, "off", (eventName, eventItem) => {
|
|
108
|
-
const callbacks = this._events[eventName] || [];
|
|
109
|
-
const newCallbacks = callbacks.filter((item) => {
|
|
110
|
-
if (typeof eventItem === "function") {
|
|
111
|
-
return item.callback !== eventItem && item.initialCallback !== eventItem;
|
|
112
|
-
} else {
|
|
113
|
-
const { callback } = eventItem;
|
|
114
|
-
return item.callback !== callback && item.initialCallback !== callback;
|
|
115
|
-
}
|
|
116
|
-
});
|
|
117
|
-
this._events[eventName] = newCallbacks;
|
|
118
|
-
});
|
|
119
|
-
this._events = {};
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
const queryFileInfo = (path) => new Promise((resolve, reject) => {
|
|
123
|
-
if (!fs$1._identification)
|
|
124
|
-
return reject({ _identification: false, data: "fs is not loaded" });
|
|
125
|
-
fs$1.stat(path, (err, data) => {
|
|
126
|
-
err ? reject({ _identification: false, data: err }) : resolve({ _identification: true, data });
|
|
127
|
-
});
|
|
128
|
-
});
|
|
129
|
-
const filterObj = (obj, list) => {
|
|
130
|
-
const result = {};
|
|
131
|
-
Object.keys(obj).forEach((item) => {
|
|
132
|
-
if (!list.includes(obj[item])) {
|
|
133
|
-
result[item] = obj[item];
|
|
134
|
-
}
|
|
135
|
-
});
|
|
136
|
-
return result;
|
|
137
|
-
};
|
|
138
|
-
const readDir = (options) => {
|
|
139
|
-
const { dirPath } = options;
|
|
140
|
-
try {
|
|
141
|
-
return fs$1.readdirSync(dirPath);
|
|
142
|
-
} catch (error) {
|
|
143
|
-
console.log("readDir error", error);
|
|
144
|
-
throw error;
|
|
145
|
-
}
|
|
146
|
-
};
|
|
147
|
-
const str2Xml = (xmlStr, format = "text/xml") => {
|
|
148
|
-
if (window.DOMParser)
|
|
149
|
-
return new window.DOMParser().parseFromString(xmlStr, format).documentElement;
|
|
150
|
-
if (typeof window.ActiveXObject !== "undefined" && new window.ActiveXObject("Microsoft.XMLDOM")) {
|
|
151
|
-
const xmlDoc = new window.ActiveXObject("Microsoft.XMLDOM");
|
|
152
|
-
xmlDoc.async = "false";
|
|
153
|
-
xmlDoc.loadXML(xmlStr);
|
|
154
|
-
return xmlDoc;
|
|
155
|
-
}
|
|
156
|
-
return void 0;
|
|
157
|
-
};
|
|
158
|
-
function vnode$1(sel, data, children, text, elm) {
|
|
159
|
-
const key = data === void 0 ? void 0 : data.key;
|
|
160
|
-
return { sel, data, children, text, elm, key };
|
|
161
|
-
}
|
|
162
|
-
function createElement(tagName2, options) {
|
|
163
|
-
return document.createElement(tagName2, options);
|
|
164
|
-
}
|
|
165
|
-
function createElementNS(namespaceURI, qualifiedName, options) {
|
|
166
|
-
return document.createElementNS(namespaceURI, qualifiedName, options);
|
|
167
|
-
}
|
|
168
|
-
function createDocumentFragment() {
|
|
169
|
-
return parseFragment(document.createDocumentFragment());
|
|
170
|
-
}
|
|
171
|
-
function createTextNode(text) {
|
|
172
|
-
return document.createTextNode(text);
|
|
173
|
-
}
|
|
174
|
-
function createComment(text) {
|
|
175
|
-
return document.createComment(text);
|
|
176
|
-
}
|
|
177
|
-
function insertBefore(parentNode2, newNode, referenceNode) {
|
|
178
|
-
if (isDocumentFragment(parentNode2)) {
|
|
179
|
-
let node = parentNode2;
|
|
180
|
-
while (node && isDocumentFragment(node)) {
|
|
181
|
-
const fragment = parseFragment(node);
|
|
182
|
-
node = fragment.parent;
|
|
183
|
-
}
|
|
184
|
-
parentNode2 = node != null ? node : parentNode2;
|
|
185
|
-
}
|
|
186
|
-
if (isDocumentFragment(newNode)) {
|
|
187
|
-
newNode = parseFragment(newNode, parentNode2);
|
|
188
|
-
}
|
|
189
|
-
if (referenceNode && isDocumentFragment(referenceNode)) {
|
|
190
|
-
referenceNode = parseFragment(referenceNode).firstChildNode;
|
|
191
|
-
}
|
|
192
|
-
parentNode2.insertBefore(newNode, referenceNode);
|
|
193
|
-
}
|
|
194
|
-
function removeChild(node, child) {
|
|
195
|
-
node.removeChild(child);
|
|
196
|
-
}
|
|
197
|
-
function appendChild(node, child) {
|
|
198
|
-
if (isDocumentFragment(child)) {
|
|
199
|
-
child = parseFragment(child, node);
|
|
200
|
-
}
|
|
201
|
-
node.appendChild(child);
|
|
202
|
-
}
|
|
203
|
-
function parentNode(node) {
|
|
204
|
-
if (isDocumentFragment(node)) {
|
|
205
|
-
while (node && isDocumentFragment(node)) {
|
|
206
|
-
const fragment = parseFragment(node);
|
|
207
|
-
node = fragment.parent;
|
|
208
|
-
}
|
|
209
|
-
return node != null ? node : null;
|
|
210
|
-
}
|
|
211
|
-
return node.parentNode;
|
|
212
|
-
}
|
|
213
|
-
function nextSibling(node) {
|
|
214
|
-
var _a;
|
|
215
|
-
if (isDocumentFragment(node)) {
|
|
216
|
-
const fragment = parseFragment(node);
|
|
217
|
-
const parent = parentNode(fragment);
|
|
218
|
-
if (parent && fragment.lastChildNode) {
|
|
219
|
-
const children = Array.from(parent.childNodes);
|
|
220
|
-
const index = children.indexOf(fragment.lastChildNode);
|
|
221
|
-
return (_a = children[index + 1]) != null ? _a : null;
|
|
222
|
-
}
|
|
223
|
-
return null;
|
|
224
|
-
}
|
|
225
|
-
return node.nextSibling;
|
|
226
|
-
}
|
|
227
|
-
function tagName(elm) {
|
|
228
|
-
return elm.tagName;
|
|
229
|
-
}
|
|
230
|
-
function setTextContent(node, text) {
|
|
231
|
-
node.textContent = text;
|
|
232
|
-
}
|
|
233
|
-
function getTextContent(node) {
|
|
234
|
-
return node.textContent;
|
|
235
|
-
}
|
|
236
|
-
function isElement(node) {
|
|
237
|
-
return node.nodeType === 1;
|
|
238
|
-
}
|
|
239
|
-
function isText(node) {
|
|
240
|
-
return node.nodeType === 3;
|
|
241
|
-
}
|
|
242
|
-
function isComment(node) {
|
|
243
|
-
return node.nodeType === 8;
|
|
244
|
-
}
|
|
245
|
-
function isDocumentFragment(node) {
|
|
246
|
-
return node.nodeType === 11;
|
|
247
|
-
}
|
|
248
|
-
function parseFragment(fragmentNode, parentNode2) {
|
|
249
|
-
var _a, _b, _c;
|
|
250
|
-
const fragment = fragmentNode;
|
|
251
|
-
(_a = fragment.parent) != null ? _a : fragment.parent = parentNode2 != null ? parentNode2 : null;
|
|
252
|
-
(_b = fragment.firstChildNode) != null ? _b : fragment.firstChildNode = fragmentNode.firstChild;
|
|
253
|
-
(_c = fragment.lastChildNode) != null ? _c : fragment.lastChildNode = fragmentNode.lastChild;
|
|
254
|
-
return fragment;
|
|
255
|
-
}
|
|
256
|
-
const htmlDomApi = {
|
|
257
|
-
createElement,
|
|
258
|
-
createElementNS,
|
|
259
|
-
createTextNode,
|
|
260
|
-
createDocumentFragment,
|
|
261
|
-
createComment,
|
|
262
|
-
insertBefore,
|
|
263
|
-
removeChild,
|
|
264
|
-
appendChild,
|
|
265
|
-
parentNode,
|
|
266
|
-
nextSibling,
|
|
267
|
-
tagName,
|
|
268
|
-
setTextContent,
|
|
269
|
-
getTextContent,
|
|
270
|
-
isElement,
|
|
271
|
-
isText,
|
|
272
|
-
isComment,
|
|
273
|
-
isDocumentFragment
|
|
274
|
-
};
|
|
275
|
-
const array = Array.isArray;
|
|
276
|
-
function primitive(s) {
|
|
277
|
-
return typeof s === "string" || typeof s === "number";
|
|
278
|
-
}
|
|
279
|
-
function isVnode$1(s) {
|
|
280
|
-
return !!(s == null ? void 0 : s.sel);
|
|
281
|
-
}
|
|
282
|
-
const xlinkNS = "http://www.w3.org/1999/xlink";
|
|
283
|
-
const xmlNS = "http://www.w3.org/XML/1998/namespace";
|
|
284
|
-
const colonChar = 58;
|
|
285
|
-
const xChar = 120;
|
|
286
|
-
function updateAttrs(oldVnode, vnode2) {
|
|
287
|
-
let key;
|
|
288
|
-
const elm = vnode2.elm;
|
|
289
|
-
let oldAttrs = oldVnode.data && oldVnode.data.attrs;
|
|
290
|
-
let attrs = vnode2.data && vnode2.data.attrs;
|
|
291
|
-
if (!oldAttrs && !attrs)
|
|
292
|
-
return;
|
|
293
|
-
if (oldAttrs === attrs)
|
|
294
|
-
return;
|
|
295
|
-
oldAttrs = oldAttrs || {};
|
|
296
|
-
attrs = attrs || {};
|
|
297
|
-
for (key in attrs) {
|
|
298
|
-
const cur = attrs[key];
|
|
299
|
-
const old = oldAttrs[key];
|
|
300
|
-
if (old !== cur) {
|
|
301
|
-
if (cur === true) {
|
|
302
|
-
elm.setAttribute(key, "");
|
|
303
|
-
} else if (cur === false) {
|
|
304
|
-
elm.removeAttribute(key);
|
|
305
|
-
} else {
|
|
306
|
-
if (key.charCodeAt(0) !== xChar) {
|
|
307
|
-
elm.setAttribute(key, cur);
|
|
308
|
-
} else if (key.charCodeAt(3) === colonChar) {
|
|
309
|
-
elm.setAttributeNS(xmlNS, key, cur);
|
|
310
|
-
} else if (key.charCodeAt(5) === colonChar) {
|
|
311
|
-
elm.setAttributeNS(xlinkNS, key, cur);
|
|
312
|
-
} else {
|
|
313
|
-
elm.setAttribute(key, `${cur}`);
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
for (key in oldAttrs) {
|
|
319
|
-
if (!(key in attrs)) {
|
|
320
|
-
elm.removeAttribute(key);
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
const attributesModule = { create: updateAttrs, update: updateAttrs };
|
|
325
|
-
function updateClass(oldVnode, vnode2) {
|
|
326
|
-
let cur;
|
|
327
|
-
let name;
|
|
328
|
-
const elm = vnode2.elm;
|
|
329
|
-
let oldClass = oldVnode.data && oldVnode.data.class;
|
|
330
|
-
let className = vnode2.data && vnode2.data.class;
|
|
331
|
-
if (!oldClass && !className)
|
|
332
|
-
return;
|
|
333
|
-
if (oldClass === className)
|
|
334
|
-
return;
|
|
335
|
-
oldClass = oldClass || {};
|
|
336
|
-
className = className || {};
|
|
337
|
-
for (name in oldClass) {
|
|
338
|
-
if (oldClass[name] && !Object.prototype.hasOwnProperty.call(className, name)) {
|
|
339
|
-
elm.classList.remove(name);
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
for (name in className) {
|
|
343
|
-
cur = className[name];
|
|
344
|
-
if (cur !== oldClass[name]) {
|
|
345
|
-
elm.classList[cur ? "add" : "remove"](name);
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
const classModule = { create: updateClass, update: updateClass };
|
|
350
|
-
const isFunction = (handler) => {
|
|
351
|
-
return typeof handler === "function";
|
|
352
|
-
};
|
|
353
|
-
function invokeHandler(handler, vnode2, event) {
|
|
354
|
-
if (isFunction(handler)) {
|
|
355
|
-
handler.call(vnode2, event, vnode2);
|
|
356
|
-
} else if (typeof handler === "object") {
|
|
357
|
-
for (let i = 0; i < handler.length; i++) {
|
|
358
|
-
invokeHandler(handler[i], vnode2, event);
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
function handleEvent(event, vnode2) {
|
|
363
|
-
const name = event.type;
|
|
364
|
-
const on = vnode2.data && vnode2.data.on;
|
|
365
|
-
if (on && on[name]) {
|
|
366
|
-
invokeHandler(on[name], vnode2, event);
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
function createListener() {
|
|
370
|
-
return function handler(event) {
|
|
371
|
-
handleEvent(event, handler.vnode);
|
|
372
|
-
};
|
|
373
|
-
}
|
|
374
|
-
function updateEventListeners(oldVnode, vnode2) {
|
|
375
|
-
var _a, _b;
|
|
376
|
-
const oldOn = (_a = oldVnode == null ? void 0 : oldVnode.data) == null ? void 0 : _a.on;
|
|
377
|
-
const oldListener = oldVnode == null ? void 0 : oldVnode.listener;
|
|
378
|
-
const oldElm = oldVnode.elm;
|
|
379
|
-
const on = (_b = vnode2 == null ? void 0 : vnode2.data) == null ? void 0 : _b.on;
|
|
380
|
-
const elm = vnode2 && vnode2.elm;
|
|
381
|
-
let name;
|
|
382
|
-
if (oldOn === on) {
|
|
383
|
-
return;
|
|
384
|
-
}
|
|
385
|
-
if (oldOn && oldListener) {
|
|
386
|
-
if (!on) {
|
|
387
|
-
for (name in oldOn) {
|
|
388
|
-
oldElm.removeEventListener(name, oldListener, false);
|
|
389
|
-
}
|
|
390
|
-
} else {
|
|
391
|
-
for (name in oldOn) {
|
|
392
|
-
if (!on[name]) {
|
|
393
|
-
oldElm.removeEventListener(name, oldListener, false);
|
|
394
|
-
}
|
|
395
|
-
}
|
|
396
|
-
}
|
|
397
|
-
}
|
|
398
|
-
if (on) {
|
|
399
|
-
const listener = vnode2.listener = oldVnode.listener || createListener();
|
|
400
|
-
if (!oldOn) {
|
|
401
|
-
for (name in on) {
|
|
402
|
-
elm.addEventListener(name, listener, false);
|
|
403
|
-
}
|
|
404
|
-
} else {
|
|
405
|
-
for (name in on) {
|
|
406
|
-
if (!oldOn[name]) {
|
|
407
|
-
elm.addEventListener(name, listener, false);
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
}
|
|
412
|
-
}
|
|
413
|
-
const eventListenersModule = {
|
|
414
|
-
create: updateEventListeners,
|
|
415
|
-
update: updateEventListeners,
|
|
416
|
-
destroy: updateEventListeners
|
|
417
|
-
};
|
|
418
|
-
function updateProps(oldVnode, vnode2) {
|
|
419
|
-
let key;
|
|
420
|
-
let cur;
|
|
421
|
-
let old;
|
|
422
|
-
const elm = vnode2.elm;
|
|
423
|
-
let oldProps = oldVnode.data ? oldVnode.data.props : void 0;
|
|
424
|
-
let props = vnode2.data ? vnode2.data.props : void 0;
|
|
425
|
-
if (!oldProps && !props)
|
|
426
|
-
return;
|
|
427
|
-
if (oldProps === props)
|
|
428
|
-
return;
|
|
429
|
-
oldProps = oldProps || {};
|
|
430
|
-
props = props || {};
|
|
431
|
-
for (key in props) {
|
|
432
|
-
cur = props[key];
|
|
433
|
-
old = oldProps[key];
|
|
434
|
-
if (old !== cur && (key !== "value" || elm[key] !== cur)) {
|
|
435
|
-
elm[key] = cur;
|
|
436
|
-
}
|
|
437
|
-
}
|
|
438
|
-
}
|
|
439
|
-
const propsModule = { create: updateProps, update: updateProps };
|
|
440
|
-
let reflowForced = false;
|
|
441
|
-
function updateStyle(oldVnode, vnode2) {
|
|
442
|
-
let cur;
|
|
443
|
-
let name;
|
|
444
|
-
const elm = vnode2.elm;
|
|
445
|
-
let oldStyle = oldVnode.data.style;
|
|
446
|
-
let style = vnode2.data.style;
|
|
447
|
-
if (!oldStyle && !style)
|
|
448
|
-
return;
|
|
449
|
-
if (oldStyle === style)
|
|
450
|
-
return;
|
|
451
|
-
oldStyle = oldStyle || {};
|
|
452
|
-
style = style || {};
|
|
453
|
-
for (name in oldStyle) {
|
|
454
|
-
if (!style[name]) {
|
|
455
|
-
if (name[0] === "-" && name[1] === "-") {
|
|
456
|
-
elm.style.removeProperty(name);
|
|
457
|
-
} else {
|
|
458
|
-
elm.style[name] = "";
|
|
459
|
-
}
|
|
460
|
-
}
|
|
461
|
-
}
|
|
462
|
-
for (name in style) {
|
|
463
|
-
cur = style[name];
|
|
464
|
-
if (cur !== oldStyle[name]) {
|
|
465
|
-
if (name[0] === "-" && name[1] === "-") {
|
|
466
|
-
elm.style.setProperty(name, cur);
|
|
467
|
-
} else {
|
|
468
|
-
elm.style[name] = cur;
|
|
469
|
-
}
|
|
470
|
-
}
|
|
471
|
-
}
|
|
472
|
-
}
|
|
473
|
-
function forceReflow() {
|
|
474
|
-
reflowForced = false;
|
|
475
|
-
}
|
|
476
|
-
function applyDestroyStyle(vnode2) {
|
|
477
|
-
let style;
|
|
478
|
-
let name;
|
|
479
|
-
const elm = vnode2.elm;
|
|
480
|
-
const s = vnode2.data.style;
|
|
481
|
-
if (!s || !(style = s.destroy))
|
|
482
|
-
return;
|
|
483
|
-
for (name in style) {
|
|
484
|
-
elm.style[name] = style[name];
|
|
485
|
-
}
|
|
486
|
-
}
|
|
487
|
-
function applyRemoveStyle(vnode2, rm) {
|
|
488
|
-
const s = vnode2.data.style;
|
|
489
|
-
if (!s || !s.remove) {
|
|
490
|
-
rm();
|
|
491
|
-
return;
|
|
492
|
-
}
|
|
493
|
-
if (!reflowForced) {
|
|
494
|
-
vnode2.elm.offsetLeft;
|
|
495
|
-
reflowForced = true;
|
|
496
|
-
}
|
|
497
|
-
let name;
|
|
498
|
-
const elm = vnode2.elm;
|
|
499
|
-
let i = 0;
|
|
500
|
-
const style = s.remove;
|
|
501
|
-
let amount = 0;
|
|
502
|
-
const applied = [];
|
|
503
|
-
for (name in style) {
|
|
504
|
-
applied.push(name);
|
|
505
|
-
elm.style[name] = style[name];
|
|
506
|
-
}
|
|
507
|
-
const compStyle = getComputedStyle(elm);
|
|
508
|
-
const props = compStyle["transition-property"].split(", ");
|
|
509
|
-
for (; i < props.length; ++i) {
|
|
510
|
-
if (applied.indexOf(props[i]) !== -1)
|
|
511
|
-
amount++;
|
|
512
|
-
}
|
|
513
|
-
elm.addEventListener(
|
|
514
|
-
"transitionend",
|
|
515
|
-
function(ev) {
|
|
516
|
-
if (ev.target === elm)
|
|
517
|
-
--amount;
|
|
518
|
-
if (amount === 0)
|
|
519
|
-
rm();
|
|
520
|
-
}
|
|
521
|
-
);
|
|
522
|
-
}
|
|
523
|
-
const styleModule = {
|
|
524
|
-
pre: forceReflow,
|
|
525
|
-
create: updateStyle,
|
|
526
|
-
update: updateStyle,
|
|
527
|
-
destroy: applyDestroyStyle,
|
|
528
|
-
remove: applyRemoveStyle
|
|
529
|
-
};
|
|
530
|
-
const modules = {
|
|
531
|
-
attributesModule,
|
|
532
|
-
classModule,
|
|
533
|
-
eventListenersModule,
|
|
534
|
-
propsModule,
|
|
535
|
-
styleModule
|
|
536
|
-
};
|
|
537
|
-
function sameVnode(vnode1, vnode2) {
|
|
538
|
-
return vnode1.key === vnode2.key && vnode1.sel === vnode2.sel;
|
|
539
|
-
}
|
|
540
|
-
function isVnode(vnode2) {
|
|
541
|
-
return vnode2.sel !== void 0;
|
|
542
|
-
}
|
|
543
|
-
function createKeyToOldIdx(children, beginIdx, endIdx) {
|
|
544
|
-
var _a;
|
|
545
|
-
const map = {};
|
|
546
|
-
for (let i = beginIdx; i <= endIdx; ++i) {
|
|
547
|
-
const key = (_a = children[i]) == null ? void 0 : _a.key;
|
|
548
|
-
if (key !== void 0) {
|
|
549
|
-
map[key] = i;
|
|
550
|
-
}
|
|
551
|
-
}
|
|
552
|
-
return map;
|
|
553
|
-
}
|
|
554
|
-
const emptyNode = vnode$1("", {}, [], void 0, void 0);
|
|
555
|
-
function init() {
|
|
556
|
-
const api = htmlDomApi;
|
|
557
|
-
const cbs = {
|
|
558
|
-
create: [],
|
|
559
|
-
update: [],
|
|
560
|
-
destroy: []
|
|
561
|
-
};
|
|
562
|
-
for (const key of Object.keys(cbs)) {
|
|
563
|
-
cbs[key] = [];
|
|
564
|
-
for (const module of Object.keys(modules)) {
|
|
565
|
-
const hook = modules[module][key];
|
|
566
|
-
if (hook !== void 0) {
|
|
567
|
-
cbs[key].push(hook);
|
|
568
|
-
}
|
|
569
|
-
}
|
|
570
|
-
}
|
|
571
|
-
function emptyNodeAt(elm) {
|
|
572
|
-
const id = elm.id ? "#" + elm.id : "";
|
|
573
|
-
const c = elm.className ? "." + elm.className.split(" ").join(".") : "";
|
|
574
|
-
return vnode$1(
|
|
575
|
-
api.tagName(elm).toLowerCase() + id + c,
|
|
576
|
-
{},
|
|
577
|
-
[],
|
|
578
|
-
void 0,
|
|
579
|
-
elm
|
|
580
|
-
);
|
|
581
|
-
}
|
|
582
|
-
function isUndef(s) {
|
|
583
|
-
return s === void 0;
|
|
584
|
-
}
|
|
585
|
-
function isDef(s) {
|
|
586
|
-
return s !== void 0;
|
|
587
|
-
}
|
|
588
|
-
function createElm(vnode2) {
|
|
589
|
-
let i;
|
|
590
|
-
const children = vnode2.children;
|
|
591
|
-
const sel = vnode2.sel;
|
|
592
|
-
if (sel === "!") {
|
|
593
|
-
if (isUndef(vnode2.text)) {
|
|
594
|
-
vnode2.text = "";
|
|
595
|
-
}
|
|
596
|
-
vnode2.elm = api.createComment(`${vnode2.text}`);
|
|
597
|
-
} else if (sel !== void 0) {
|
|
598
|
-
const hashIdx = sel.indexOf("#");
|
|
599
|
-
const dotIdx = sel.indexOf(".", hashIdx);
|
|
600
|
-
const hash = hashIdx > 0 ? hashIdx : sel.length;
|
|
601
|
-
const dot = dotIdx > 0 ? dotIdx : sel.length;
|
|
602
|
-
const tag = hashIdx !== -1 || dotIdx !== -1 ? sel.slice(0, Math.min(hash, dot)) : sel;
|
|
603
|
-
const elm = vnode2.elm = api.createElement(tag);
|
|
604
|
-
if (hash < dot)
|
|
605
|
-
elm.setAttribute("id", sel.slice(hash + 1, dot));
|
|
606
|
-
if (dotIdx > 0)
|
|
607
|
-
elm.setAttribute("class", sel.slice(dot + 1).replace(/\./g, " "));
|
|
608
|
-
for (i = 0; i < cbs.create.length; ++i) {
|
|
609
|
-
cbs.create[i](emptyNode, vnode2);
|
|
610
|
-
}
|
|
611
|
-
if (array(children)) {
|
|
612
|
-
for (i = 0; i < children.length; ++i) {
|
|
613
|
-
const ch = children[i];
|
|
614
|
-
if (ch != null) {
|
|
615
|
-
api.appendChild(elm, createElm(ch));
|
|
616
|
-
}
|
|
617
|
-
}
|
|
618
|
-
} else if (primitive(vnode2.text)) {
|
|
619
|
-
api.appendChild(elm, api.createTextNode(`${vnode2.text}`));
|
|
620
|
-
}
|
|
621
|
-
} else {
|
|
622
|
-
vnode2.elm = api.createTextNode(`${vnode2.text}`);
|
|
623
|
-
}
|
|
624
|
-
return vnode2.elm;
|
|
625
|
-
}
|
|
626
|
-
function addVnodes(parentElm, before, vnodes, startIdx, endIdx) {
|
|
627
|
-
for (; startIdx <= endIdx; ++startIdx) {
|
|
628
|
-
const ch = vnodes[startIdx];
|
|
629
|
-
if (ch != null) {
|
|
630
|
-
api.insertBefore(parentElm, createElm(ch), before);
|
|
631
|
-
}
|
|
632
|
-
}
|
|
633
|
-
}
|
|
634
|
-
function invokeDestroyHook(vnode2) {
|
|
635
|
-
const data = vnode2.data;
|
|
636
|
-
if (data !== void 0) {
|
|
637
|
-
for (let i = 0; i < cbs.destroy.length; ++i)
|
|
638
|
-
cbs.destroy[i](vnode2);
|
|
639
|
-
if (vnode2.children !== void 0) {
|
|
640
|
-
for (let j = 0; j < vnode2.children.length; ++j) {
|
|
641
|
-
const child = vnode2.children[j];
|
|
642
|
-
if (child != null && typeof child !== "string" && typeof child !== "number") {
|
|
643
|
-
invokeDestroyHook(child);
|
|
644
|
-
}
|
|
645
|
-
}
|
|
646
|
-
}
|
|
647
|
-
}
|
|
648
|
-
}
|
|
649
|
-
function createRmCb(childElm) {
|
|
650
|
-
return function rmCb() {
|
|
651
|
-
const parent = api.parentNode(childElm);
|
|
652
|
-
api.removeChild(parent, childElm);
|
|
653
|
-
};
|
|
654
|
-
}
|
|
655
|
-
function removeVnodes(parentElm, vnodes, startIdx, endIdx) {
|
|
656
|
-
for (; startIdx <= endIdx; ++startIdx) {
|
|
657
|
-
let rm;
|
|
658
|
-
const ch = vnodes[startIdx];
|
|
659
|
-
if (ch != null) {
|
|
660
|
-
if (isDef(ch.sel)) {
|
|
661
|
-
invokeDestroyHook(ch);
|
|
662
|
-
rm = createRmCb(ch.elm);
|
|
663
|
-
rm();
|
|
664
|
-
} else {
|
|
665
|
-
api.removeChild(parentElm, ch.elm);
|
|
666
|
-
}
|
|
667
|
-
}
|
|
668
|
-
}
|
|
669
|
-
}
|
|
670
|
-
function updateChildren(parentElm, oldCh, newCh) {
|
|
671
|
-
let oldStartIdx = 0;
|
|
672
|
-
let newStartIdx = 0;
|
|
673
|
-
let oldEndIdx = oldCh.length - 1;
|
|
674
|
-
let newEndIdx = newCh.length - 1;
|
|
675
|
-
let oldStartVnode = oldCh[0];
|
|
676
|
-
let oldEndVnode = oldCh[oldEndIdx];
|
|
677
|
-
let newStartVnode = newCh[0];
|
|
678
|
-
let newEndVnode = newCh[newEndIdx];
|
|
679
|
-
let oldKeyToIdx;
|
|
680
|
-
let idxInOld;
|
|
681
|
-
let elmToMove;
|
|
682
|
-
let before;
|
|
683
|
-
while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
|
|
684
|
-
if (oldStartVnode == null) {
|
|
685
|
-
oldStartVnode = oldCh[++oldStartIdx];
|
|
686
|
-
} else if (oldEndVnode == null) {
|
|
687
|
-
oldEndVnode = oldCh[--oldEndIdx];
|
|
688
|
-
} else if (newStartVnode == null) {
|
|
689
|
-
newStartVnode = newCh[++newStartIdx];
|
|
690
|
-
} else if (newEndVnode == null) {
|
|
691
|
-
newEndVnode = newCh[--newEndIdx];
|
|
692
|
-
} else if (sameVnode(oldStartVnode, newStartVnode)) {
|
|
693
|
-
patchVnode(oldStartVnode, newStartVnode);
|
|
694
|
-
oldStartVnode = oldCh[++oldStartIdx];
|
|
695
|
-
newStartVnode = newCh[++newStartIdx];
|
|
696
|
-
} else if (sameVnode(oldEndVnode, newEndVnode)) {
|
|
697
|
-
patchVnode(oldEndVnode, newEndVnode);
|
|
698
|
-
oldEndVnode = oldCh[--oldEndIdx];
|
|
699
|
-
newEndVnode = newCh[--newEndIdx];
|
|
700
|
-
} else if (sameVnode(oldStartVnode, newEndVnode)) {
|
|
701
|
-
patchVnode(oldStartVnode, newEndVnode);
|
|
702
|
-
api.insertBefore(parentElm, oldStartVnode.elm, api.nextSibling(oldEndVnode.elm));
|
|
703
|
-
oldStartVnode = oldCh[++oldStartIdx];
|
|
704
|
-
newEndVnode = newCh[--newEndIdx];
|
|
705
|
-
} else if (sameVnode(oldEndVnode, newStartVnode)) {
|
|
706
|
-
patchVnode(oldEndVnode, newStartVnode);
|
|
707
|
-
api.insertBefore(parentElm, oldEndVnode.elm, oldStartVnode.elm);
|
|
708
|
-
oldEndVnode = oldCh[--oldEndIdx];
|
|
709
|
-
newStartVnode = newCh[++newStartIdx];
|
|
710
|
-
} else {
|
|
711
|
-
if (oldKeyToIdx === void 0) {
|
|
712
|
-
oldKeyToIdx = createKeyToOldIdx(oldCh, oldStartIdx, oldEndIdx);
|
|
713
|
-
}
|
|
714
|
-
idxInOld = oldKeyToIdx[newStartVnode.key];
|
|
715
|
-
if (isUndef(idxInOld)) {
|
|
716
|
-
api.insertBefore(
|
|
717
|
-
parentElm,
|
|
718
|
-
createElm(newStartVnode),
|
|
719
|
-
oldStartVnode.elm
|
|
720
|
-
);
|
|
721
|
-
} else {
|
|
722
|
-
elmToMove = oldCh[idxInOld];
|
|
723
|
-
if (elmToMove.sel !== newStartVnode.sel) {
|
|
724
|
-
api.insertBefore(
|
|
725
|
-
parentElm,
|
|
726
|
-
createElm(newStartVnode),
|
|
727
|
-
oldStartVnode.elm
|
|
728
|
-
);
|
|
729
|
-
} else {
|
|
730
|
-
patchVnode(elmToMove, newStartVnode);
|
|
731
|
-
oldCh[idxInOld] = void 0;
|
|
732
|
-
api.insertBefore(parentElm, elmToMove.elm, oldStartVnode.elm);
|
|
733
|
-
}
|
|
734
|
-
}
|
|
735
|
-
newStartVnode = newCh[++newStartIdx];
|
|
736
|
-
}
|
|
737
|
-
}
|
|
738
|
-
if (oldStartIdx <= oldEndIdx || newStartIdx <= newEndIdx) {
|
|
739
|
-
if (oldStartIdx > oldEndIdx) {
|
|
740
|
-
before = newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].elm;
|
|
741
|
-
addVnodes(parentElm, before, newCh, newStartIdx, newEndIdx);
|
|
742
|
-
} else {
|
|
743
|
-
removeVnodes(parentElm, oldCh, oldStartIdx, oldEndIdx);
|
|
744
|
-
}
|
|
745
|
-
}
|
|
746
|
-
}
|
|
747
|
-
function patchVnode(oldVnode, vnode2) {
|
|
748
|
-
if (vnode2.data !== void 0) {
|
|
749
|
-
for (let i = 0; i < cbs.update.length; ++i) {
|
|
750
|
-
cbs.update[i](oldVnode, vnode2);
|
|
751
|
-
}
|
|
752
|
-
}
|
|
753
|
-
const elm = vnode2.elm = oldVnode.elm;
|
|
754
|
-
const oldCh = oldVnode.children;
|
|
755
|
-
const ch = vnode2.children;
|
|
756
|
-
if (oldVnode === vnode2)
|
|
757
|
-
return;
|
|
758
|
-
if (isUndef(vnode2.text)) {
|
|
759
|
-
if (isDef(oldCh) && isDef(ch)) {
|
|
760
|
-
if (oldCh !== ch) {
|
|
761
|
-
updateChildren(elm, oldCh, ch);
|
|
762
|
-
}
|
|
763
|
-
}
|
|
764
|
-
}
|
|
765
|
-
}
|
|
766
|
-
return function patch(oldVnode, vnode2) {
|
|
767
|
-
let elm, parent;
|
|
768
|
-
if (!isVnode(oldVnode)) {
|
|
769
|
-
oldVnode = emptyNodeAt(oldVnode);
|
|
770
|
-
}
|
|
771
|
-
if (sameVnode(oldVnode, vnode2)) {
|
|
772
|
-
patchVnode(oldVnode, vnode2);
|
|
773
|
-
} else {
|
|
774
|
-
elm = oldVnode.elm;
|
|
775
|
-
parent = api.parentNode(elm);
|
|
776
|
-
createElm(vnode2);
|
|
777
|
-
if (parent != null) {
|
|
778
|
-
api.insertBefore(parent, vnode2.elm, api.nextSibling(elm));
|
|
779
|
-
removeVnodes(parent, [oldVnode], 0, 0);
|
|
780
|
-
}
|
|
781
|
-
}
|
|
782
|
-
return vnode2;
|
|
783
|
-
};
|
|
784
|
-
}
|
|
785
|
-
function addNS(data, children, sel) {
|
|
786
|
-
data.ns = "http://www.w3.org/2000/svg";
|
|
787
|
-
if (sel !== "foreignObject" && children !== void 0) {
|
|
788
|
-
for (let i = 0; i < children.length; ++i) {
|
|
789
|
-
const child = children[i];
|
|
790
|
-
if (typeof child === "string" || typeof child === "number")
|
|
791
|
-
continue;
|
|
792
|
-
const childData = child.data;
|
|
793
|
-
if (childData !== void 0) {
|
|
794
|
-
addNS(childData, child.children, child.sel);
|
|
795
|
-
}
|
|
796
|
-
}
|
|
797
|
-
}
|
|
798
|
-
}
|
|
799
|
-
function h(sel, b, c) {
|
|
800
|
-
let data = {};
|
|
801
|
-
let children = void 0;
|
|
802
|
-
let text;
|
|
803
|
-
let i;
|
|
804
|
-
if (c !== void 0) {
|
|
805
|
-
if (b != null) {
|
|
806
|
-
data = b;
|
|
807
|
-
}
|
|
808
|
-
if (array(c)) {
|
|
809
|
-
children = c;
|
|
810
|
-
} else if (primitive(c)) {
|
|
811
|
-
text = c;
|
|
812
|
-
} else if (c && c.sel) {
|
|
813
|
-
children = [c];
|
|
814
|
-
}
|
|
815
|
-
} else if (b !== void 0 && b != null) {
|
|
816
|
-
if (array(b)) {
|
|
817
|
-
children = b;
|
|
818
|
-
} else if (primitive(b)) {
|
|
819
|
-
text = b;
|
|
820
|
-
} else {
|
|
821
|
-
if (isVnode$1(b)) {
|
|
822
|
-
children = [b];
|
|
823
|
-
} else {
|
|
824
|
-
data = b;
|
|
825
|
-
}
|
|
826
|
-
}
|
|
827
|
-
}
|
|
828
|
-
if (typeof children !== "undefined") {
|
|
829
|
-
for (i = 0; i < children.length; ++i) {
|
|
830
|
-
const msg = children[i];
|
|
831
|
-
if (primitive(msg)) {
|
|
832
|
-
children[i] = vnode$1(void 0, void 0, void 0, msg, void 0);
|
|
833
|
-
}
|
|
834
|
-
}
|
|
835
|
-
}
|
|
836
|
-
if (sel[0] === "s" && sel[1] === "v" && sel[2] === "g" && (sel.length === 3 || sel[3] === "." || sel[3] === "#")) {
|
|
837
|
-
addNS(data, children, sel);
|
|
838
|
-
}
|
|
839
|
-
return vnode$1(sel, data, children, text, void 0);
|
|
840
|
-
}
|
|
841
|
-
function querystring(data = {}) {
|
|
842
|
-
if (typeof data !== "object") {
|
|
843
|
-
throw new TypeError("param must be object");
|
|
844
|
-
}
|
|
845
|
-
return Object.entries(data).reduce((searchParams, [name, value]) => value === void 0 || value == null ? searchParams : (searchParams.append(decodeURIComponent(name), decodeURIComponent(value)), searchParams), new URLSearchParams()).toString();
|
|
846
|
-
}
|
|
847
|
-
function randomString(len = 8) {
|
|
848
|
-
const chars = "ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678";
|
|
849
|
-
const maxPos = chars.length;
|
|
850
|
-
let pwd = "";
|
|
851
|
-
for (let i = 0; i < len; i++) {
|
|
852
|
-
pwd += chars.charAt(Math.floor(Math.random() * maxPos));
|
|
853
|
-
}
|
|
854
|
-
return `${Date.now()}-${pwd}`;
|
|
855
|
-
}
|
|
856
|
-
function getCookie(name) {
|
|
857
|
-
const cookieList = window.document.cookie.match(
|
|
858
|
-
new RegExp(`(^| )${name}(?:=([^;]*))?(;|$)`)
|
|
859
|
-
);
|
|
860
|
-
if (cookieList && cookieList[2])
|
|
861
|
-
return cookieList[2];
|
|
862
|
-
return "";
|
|
863
|
-
}
|
|
864
|
-
function createData(params = {}) {
|
|
865
|
-
return Object.assign({}, {
|
|
866
|
-
id: randomString(),
|
|
867
|
-
path: window.location.href,
|
|
868
|
-
time: Date.now(),
|
|
869
|
-
userAgent: window.navigator.userAgent,
|
|
870
|
-
referrer: document.referrer,
|
|
871
|
-
ip: window.returnCitySN || { cid: "", cip: "", cname: "" },
|
|
872
|
-
userId: getCookie("chaxus_prod")
|
|
873
|
-
}, params);
|
|
874
|
-
}
|
|
875
|
-
const throttle = (fn, wait = 300) => {
|
|
876
|
-
let timer = null;
|
|
877
|
-
return function(...args) {
|
|
878
|
-
const context = this;
|
|
879
|
-
if (!timer) {
|
|
880
|
-
timer = setTimeout(() => {
|
|
881
|
-
timer = null;
|
|
882
|
-
fn.apply(context, args);
|
|
883
|
-
}, wait);
|
|
884
|
-
}
|
|
885
|
-
};
|
|
886
|
-
};
|
|
887
|
-
const Noop = () => {
|
|
888
|
-
};
|
|
889
|
-
function replaceOld(source, name, replacement, isForced) {
|
|
890
|
-
if (typeof source === "undefined")
|
|
891
|
-
return;
|
|
892
|
-
if (name in source || isForced) {
|
|
893
|
-
const original = source[name];
|
|
894
|
-
const wrapped = replacement(original);
|
|
895
|
-
if (typeof wrapped === "function") {
|
|
896
|
-
source[name] = wrapped;
|
|
897
|
-
}
|
|
898
|
-
}
|
|
899
|
-
}
|
|
900
|
-
const isString = (obj) => {
|
|
901
|
-
return toString.call(obj) === "[object String]";
|
|
902
|
-
};
|
|
903
|
-
const handleClick = (hooks = Noop) => {
|
|
904
|
-
document.addEventListener("click", function(event) {
|
|
905
|
-
hooks(event);
|
|
906
|
-
}, true);
|
|
907
|
-
};
|
|
908
|
-
const handleError = (hooks = Noop) => {
|
|
909
|
-
window.addEventListener("unhandledrejection", (error) => {
|
|
910
|
-
hooks(error);
|
|
911
|
-
}, true);
|
|
912
|
-
window.addEventListener("error", (error) => {
|
|
913
|
-
hooks(error);
|
|
914
|
-
return false;
|
|
915
|
-
}, true);
|
|
916
|
-
};
|
|
917
|
-
function getPerformance() {
|
|
918
|
-
const [performanceNavigationTiming] = performance.getEntriesByType("navigation");
|
|
919
|
-
const [firstPaint, firstContentfulPaint] = performance.getEntriesByType("paint");
|
|
920
|
-
const {
|
|
921
|
-
domainLookupEnd,
|
|
922
|
-
domainLookupStart,
|
|
923
|
-
connectEnd,
|
|
924
|
-
connectStart,
|
|
925
|
-
secureConnectionStart,
|
|
926
|
-
loadEventStart,
|
|
927
|
-
domInteractive,
|
|
928
|
-
domContentLoadedEventEnd,
|
|
929
|
-
duration,
|
|
930
|
-
responseStart,
|
|
931
|
-
requestStart,
|
|
932
|
-
responseEnd,
|
|
933
|
-
fetchStart,
|
|
934
|
-
transferSize,
|
|
935
|
-
encodedBodySize,
|
|
936
|
-
redirectEnd,
|
|
937
|
-
redirectStart,
|
|
938
|
-
redirectCount
|
|
939
|
-
} = performanceNavigationTiming;
|
|
940
|
-
const { startTime: fp } = firstPaint;
|
|
941
|
-
const { startTime: fcp } = firstContentfulPaint;
|
|
942
|
-
return {
|
|
943
|
-
dnsSearch: domainLookupEnd - domainLookupStart,
|
|
944
|
-
tcpConnect: connectEnd - connectStart,
|
|
945
|
-
sslConnect: connectEnd - secureConnectionStart,
|
|
946
|
-
request: responseStart - requestStart,
|
|
947
|
-
response: responseEnd - responseStart,
|
|
948
|
-
parseDomTree: domInteractive - responseEnd,
|
|
949
|
-
resource: loadEventStart - domContentLoadedEventEnd,
|
|
950
|
-
domReady: domContentLoadedEventEnd - fetchStart,
|
|
951
|
-
interactive: domInteractive - fetchStart,
|
|
952
|
-
complete: loadEventStart - fetchStart,
|
|
953
|
-
httpHead: transferSize - encodedBodySize,
|
|
954
|
-
redirect: redirectCount,
|
|
955
|
-
redirectTime: redirectEnd - redirectStart,
|
|
956
|
-
duration,
|
|
957
|
-
fp,
|
|
958
|
-
fcp
|
|
959
|
-
};
|
|
960
|
-
}
|
|
961
|
-
const getHost = (env) => {
|
|
962
|
-
let host = "";
|
|
963
|
-
if (env && isString(env)) {
|
|
964
|
-
if (/trunk|neibu|release/.test(env)) {
|
|
965
|
-
host = `.${env}`;
|
|
966
|
-
} else if (/test/.test(env)) {
|
|
967
|
-
host = env;
|
|
968
|
-
} else if (/prod/.test(env)) {
|
|
969
|
-
host = "";
|
|
970
|
-
} else {
|
|
971
|
-
host = "";
|
|
972
|
-
}
|
|
973
|
-
} else {
|
|
974
|
-
const env2 = /\w(\.trunk|\.neibu|\.release|test)\./.exec(
|
|
975
|
-
window.location.hostname
|
|
976
|
-
);
|
|
977
|
-
if (env2) {
|
|
978
|
-
host = env2[1];
|
|
979
|
-
}
|
|
980
|
-
}
|
|
981
|
-
return host ? `https://log${host}.chaxus.com` : "https://log.chaxus.com";
|
|
982
|
-
};
|
|
983
|
-
const sendBeacon = ({ url = "", type = "application/json; charset=UTF-8", payload = {} }) => {
|
|
984
|
-
const requestUrl = url ? url : getHost();
|
|
985
|
-
if (navigator.sendBeacon) {
|
|
986
|
-
const param = new Blob([JSON.stringify(payload)], { type });
|
|
987
|
-
return navigator.sendBeacon(requestUrl, param);
|
|
988
|
-
}
|
|
989
|
-
};
|
|
990
|
-
const sendImage = ({ url = "", payload = {} }) => {
|
|
991
|
-
const requestUrl = url ? url : getHost();
|
|
992
|
-
const image = new Image();
|
|
993
|
-
image.width = 1;
|
|
994
|
-
image.height = 1;
|
|
995
|
-
image.src = `${requestUrl}?${querystring(payload)}`;
|
|
996
|
-
};
|
|
997
|
-
const report = ({ url = "", type = "application/json; charset=UTF-8", payload = {} }) => {
|
|
998
|
-
const requestUrl = url ? url : getHost();
|
|
999
|
-
if (typeof navigator.sendBeacon !== "undefined") {
|
|
1000
|
-
return sendBeacon({ url: requestUrl, type, payload });
|
|
1001
|
-
}
|
|
1002
|
-
return sendImage({ url: requestUrl, payload });
|
|
1003
|
-
};
|
|
1004
|
-
const handleFetchHook = (options = {}) => {
|
|
1005
|
-
if (typeof window !== "undefined") {
|
|
1006
|
-
const { requestHook = Noop, responseHook = Noop, errorHook = Noop } = options;
|
|
1007
|
-
const replacement = (originalFetch) => {
|
|
1008
|
-
return (url, config) => {
|
|
1009
|
-
requestHook(url, config);
|
|
1010
|
-
return originalFetch.apply(window, [url, config]).then((response) => {
|
|
1011
|
-
responseHook(url, config, response);
|
|
1012
|
-
return response;
|
|
1013
|
-
}).catch((error) => {
|
|
1014
|
-
errorHook(url, error);
|
|
1015
|
-
throw error;
|
|
1016
|
-
});
|
|
1017
|
-
};
|
|
1018
|
-
};
|
|
1019
|
-
replaceOld(window, "fetch", replacement);
|
|
1020
|
-
}
|
|
1021
|
-
};
|
|
1022
|
-
const handleXhrHook = (options = {}) => {
|
|
1023
|
-
const originalXhrProto = XMLHttpRequest.prototype;
|
|
1024
|
-
const { requestHook = Noop, responseHook = Noop, errorHook = Noop } = options;
|
|
1025
|
-
const replacementXhrOpen = (originalOpen) => {
|
|
1026
|
-
return function(...args) {
|
|
1027
|
-
requestHook(args);
|
|
1028
|
-
originalOpen.apply(this, args);
|
|
1029
|
-
};
|
|
1030
|
-
};
|
|
1031
|
-
replaceOld(originalXhrProto, "open", replacementXhrOpen);
|
|
1032
|
-
const replacementXhrSend = (originalSend) => {
|
|
1033
|
-
return function(...args) {
|
|
1034
|
-
this.addEventListener("loadend", function() {
|
|
1035
|
-
responseHook(this);
|
|
1036
|
-
});
|
|
1037
|
-
this.addEventListener("error", function() {
|
|
1038
|
-
errorHook(this);
|
|
1039
|
-
});
|
|
1040
|
-
originalSend.apply(this, args);
|
|
1041
|
-
};
|
|
1042
|
-
};
|
|
1043
|
-
replaceOld(originalXhrProto, "send", replacementXhrSend);
|
|
1044
|
-
};
|
|
1045
|
-
class Monitor {
|
|
1046
|
-
reportPerformance() {
|
|
1047
|
-
const params = getPerformance();
|
|
1048
|
-
const payload = createData();
|
|
1049
|
-
report({
|
|
1050
|
-
payload: {
|
|
1051
|
-
...params,
|
|
1052
|
-
...payload
|
|
1053
|
-
}
|
|
1054
|
-
});
|
|
1055
|
-
}
|
|
1056
|
-
log(payload) {
|
|
1057
|
-
report({ payload });
|
|
1058
|
-
}
|
|
1059
|
-
reportClick() {
|
|
1060
|
-
const throttleReport = throttle(report);
|
|
1061
|
-
const payload = createData();
|
|
1062
|
-
const hook = (event) => {
|
|
1063
|
-
throttleReport({ payload: { ...payload, event, type: "click" } });
|
|
1064
|
-
};
|
|
1065
|
-
handleClick(hook);
|
|
1066
|
-
}
|
|
1067
|
-
reportXhr() {
|
|
1068
|
-
const throttleReport = throttle(report);
|
|
1069
|
-
const payload = createData();
|
|
1070
|
-
const requestHook = (...args) => {
|
|
1071
|
-
throttleReport({ payload: { ...payload, ...args, type: "xhrRequest" } });
|
|
1072
|
-
};
|
|
1073
|
-
const responseHook = (...args) => {
|
|
1074
|
-
throttleReport({ payload: { ...payload, ...args, type: "xhrResponse" } });
|
|
1075
|
-
};
|
|
1076
|
-
const errorHook = (...args) => {
|
|
1077
|
-
throttleReport({ payload: { ...payload, ...args, type: "xhrError" } });
|
|
1078
|
-
};
|
|
1079
|
-
handleXhrHook({ requestHook, responseHook, errorHook });
|
|
1080
|
-
}
|
|
1081
|
-
reportFetch() {
|
|
1082
|
-
const throttleReport = throttle(report);
|
|
1083
|
-
const payload = createData();
|
|
1084
|
-
const requestHook = (...args) => {
|
|
1085
|
-
throttleReport({ payload: { ...payload, ...args, type: "fetchRequest" } });
|
|
1086
|
-
};
|
|
1087
|
-
const responseHook = (...args) => {
|
|
1088
|
-
throttleReport({ payload: { ...payload, ...args, type: "fetchResponse" } });
|
|
1089
|
-
};
|
|
1090
|
-
const errorHook = (...args) => {
|
|
1091
|
-
throttleReport({ payload: { ...payload, ...args, type: "fetchError" } });
|
|
1092
|
-
};
|
|
1093
|
-
handleFetchHook({ requestHook, responseHook, errorHook });
|
|
1094
|
-
}
|
|
1095
|
-
reportError() {
|
|
1096
|
-
const throttleReport = throttle(report);
|
|
1097
|
-
const payload = createData();
|
|
1098
|
-
const hook = (...args) => {
|
|
1099
|
-
throttleReport({ payload: { ...payload, ...args, type: "error" } });
|
|
1100
|
-
};
|
|
1101
|
-
handleError(hook);
|
|
1102
|
-
}
|
|
1103
|
-
}
|
|
1104
|
-
const vnode = {
|
|
1105
|
-
init,
|
|
1106
|
-
h
|
|
1107
|
-
};
|
|
1
|
+
import { AudioRecorder, BridgeManager, Chain, Client, Mathjs, Monitor, PostMessageBridge, QuestQueue, SyncHook, TOTP, addClassToElement, addNumSym, appendUrl, audioVendor, bridgeManager, canvasVendor, cloneDeep, compose, connection, convertImageToBase64, create, createData, createDocumentFragment, createObjectURL, createSignal, currentDevice, debounce, durationHandler, encodeUrl, escapeHtml, filterObj, formatJson, generateThrottle, getAllQueryString, getCookie, getCookieByName, getFrame, getHost, getPerformance, getPixelRatio, getQuery, getStatus, getWindow, handleConsole, handleError, handleFetchHook, imageRequest, isBangDevice, isClient, isEqual, isImageSize, isMobile, isSafari, isWeiXin, localStorageGetItem, localStorageSetItem, mathjs, memoize, merge, mergeExports, networkSpeed, noop, perToNum, performanceTime, querystring, range, removeClassToElement, removeGhosting, replaceOld, report, requestUrlToBuffer, retain, scriptOnLoad, setAttributeByGlobal, setFontSize2html, status, subscribers, throttle, timeFormat, timestampToTime, transformNumber, webglVendor } from "./src/utils/index.js";
|
|
2
|
+
import { C, a, F, H, b, E, M, R, c, d, z, e, f, g, x, h, D, i, j, k, l, m, n, o, B, r, p, q, s, t, u, v, w, y, A } from "./mimeType-CrLryRe7.js";
|
|
3
|
+
import { R as R2, S, W, a as a2, b as b2, c as c2, d as d2, g as g2, e as e2, i as i2, p as p2, f as f2, q as q2, r as r2, h as h2, j as j2, k as k2, s as s2, l as l2, t as t2, m as m2, n as n2, w as w2, o as o2 } from "./ws-ioQsn2UB.js";
|
|
4
|
+
import "node:fs";
|
|
5
|
+
import { r as r3 } from "./reactify-Z-V9Vblb.js";
|
|
6
|
+
import { ocr } from "./src/ml/index.js";
|
|
1108
7
|
export {
|
|
1109
|
-
|
|
8
|
+
AudioRecorder,
|
|
9
|
+
BridgeManager,
|
|
10
|
+
Chain,
|
|
11
|
+
Client,
|
|
12
|
+
C as Color,
|
|
13
|
+
a as ColorScheme,
|
|
14
|
+
F as FMT,
|
|
15
|
+
H as Hsl,
|
|
16
|
+
b as Hsla,
|
|
17
|
+
Mathjs,
|
|
18
|
+
E as MessageCodec,
|
|
19
|
+
M as MimeType,
|
|
1110
20
|
Monitor,
|
|
21
|
+
PostMessageBridge,
|
|
22
|
+
QuestQueue,
|
|
23
|
+
R as Rgb,
|
|
24
|
+
c as Rgba,
|
|
25
|
+
R2 as Router,
|
|
26
|
+
S as Server,
|
|
27
|
+
SyncHook,
|
|
28
|
+
TOTP,
|
|
29
|
+
W as WSS,
|
|
30
|
+
addClassToElement,
|
|
31
|
+
addNumSym,
|
|
32
|
+
a2 as appendFile,
|
|
33
|
+
appendUrl,
|
|
34
|
+
audioVendor,
|
|
35
|
+
b2 as body,
|
|
36
|
+
bridgeManager,
|
|
37
|
+
canvasVendor,
|
|
38
|
+
d as changeHumpToLowerCase,
|
|
39
|
+
z as checkEncoding,
|
|
40
|
+
e as clearBr,
|
|
41
|
+
f as clearStr,
|
|
42
|
+
cloneDeep,
|
|
43
|
+
c2 as colors,
|
|
44
|
+
g as componentToHex,
|
|
45
|
+
compose,
|
|
46
|
+
d2 as connect,
|
|
47
|
+
connection,
|
|
48
|
+
convertImageToBase64,
|
|
49
|
+
create,
|
|
50
|
+
createData,
|
|
51
|
+
createDocumentFragment,
|
|
52
|
+
createObjectURL,
|
|
53
|
+
createSignal,
|
|
54
|
+
currentDevice,
|
|
55
|
+
debounce,
|
|
56
|
+
durationHandler,
|
|
57
|
+
encodeUrl,
|
|
58
|
+
escapeHtml,
|
|
1111
59
|
filterObj,
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
60
|
+
formatJson,
|
|
61
|
+
generateThrottle,
|
|
62
|
+
g2 as get,
|
|
63
|
+
getAllQueryString,
|
|
64
|
+
getCookie,
|
|
65
|
+
getCookieByName,
|
|
66
|
+
getFrame,
|
|
67
|
+
getHost,
|
|
68
|
+
e2 as getIPAdress,
|
|
69
|
+
x as getMatchingSentences,
|
|
70
|
+
h as getMime,
|
|
71
|
+
getPerformance,
|
|
72
|
+
getPixelRatio,
|
|
73
|
+
getQuery,
|
|
74
|
+
D as getRandomString,
|
|
75
|
+
getStatus,
|
|
76
|
+
getWindow,
|
|
77
|
+
handleConsole,
|
|
78
|
+
handleError,
|
|
79
|
+
handleFetchHook,
|
|
80
|
+
i as hexToRgb,
|
|
81
|
+
j as hsbToRgb,
|
|
82
|
+
k as hslToRgb,
|
|
83
|
+
l as hsvToHsl,
|
|
84
|
+
m as hsvToRgb,
|
|
85
|
+
n as hue2rgb,
|
|
86
|
+
imageRequest,
|
|
87
|
+
isBangDevice,
|
|
88
|
+
isClient,
|
|
89
|
+
i2 as isColorSupported,
|
|
90
|
+
isEqual,
|
|
91
|
+
isImageSize,
|
|
92
|
+
isMobile,
|
|
93
|
+
isSafari,
|
|
94
|
+
o as isString,
|
|
95
|
+
isWeiXin,
|
|
96
|
+
localStorageGetItem,
|
|
97
|
+
localStorageSetItem,
|
|
98
|
+
mathjs,
|
|
99
|
+
B as md5,
|
|
100
|
+
memoize,
|
|
101
|
+
merge,
|
|
102
|
+
mergeExports,
|
|
103
|
+
networkSpeed,
|
|
104
|
+
noop,
|
|
105
|
+
ocr,
|
|
106
|
+
p2 as paresUrl,
|
|
107
|
+
perToNum,
|
|
108
|
+
performanceTime,
|
|
109
|
+
f2 as prompt,
|
|
110
|
+
q2 as queryFileInfo,
|
|
111
|
+
querystring,
|
|
112
|
+
r as randomColor,
|
|
113
|
+
p as randomString,
|
|
114
|
+
range,
|
|
115
|
+
r3 as reactify,
|
|
116
|
+
r2 as readDir,
|
|
117
|
+
h2 as readFile,
|
|
118
|
+
j2 as readStream,
|
|
119
|
+
removeClassToElement,
|
|
120
|
+
removeGhosting,
|
|
121
|
+
replaceOld,
|
|
122
|
+
report,
|
|
123
|
+
requestUrlToBuffer,
|
|
124
|
+
retain,
|
|
125
|
+
q as rgbToHex,
|
|
126
|
+
s as rgbToHsb,
|
|
127
|
+
t as rgbToHsl,
|
|
128
|
+
k2 as runCommand,
|
|
129
|
+
scriptOnLoad,
|
|
130
|
+
setAttributeByGlobal,
|
|
131
|
+
setFontSize2html,
|
|
132
|
+
u as setMime,
|
|
133
|
+
s2 as startTask,
|
|
134
|
+
l2 as staticMiddleware,
|
|
135
|
+
status,
|
|
136
|
+
v as str2Xml,
|
|
137
|
+
w as strParse,
|
|
138
|
+
subscribers,
|
|
139
|
+
t2 as taskEnd,
|
|
140
|
+
throttle,
|
|
141
|
+
timeFormat,
|
|
142
|
+
timestampToTime,
|
|
143
|
+
y as toString,
|
|
144
|
+
transformNumber,
|
|
145
|
+
A as transformText,
|
|
146
|
+
m2 as traverse,
|
|
147
|
+
n2 as traverseSync,
|
|
148
|
+
w2 as watchFile,
|
|
149
|
+
webglVendor,
|
|
150
|
+
o2 as writeStream
|
|
1119
151
|
};
|
|
1120
|
-
//# sourceMappingURL=index.js.map
|