@d-i-t-a/reader 2.1.0-alpha.2 → 2.1.0-beta.2
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/README.md +52 -3
- package/dist/esm/index.js +48628 -0
- package/dist/esm/index.js.map +7 -0
- package/dist/injectables/click/click.js +1774 -2
- package/dist/injectables/click/click.js.map +7 -1
- package/dist/injectables/mui/script.js +205 -0
- package/dist/injectables/mui/style.css +271 -0
- package/dist/injectables/style/linefocus.css +55 -0
- package/dist/injectables/style/popover.css +125 -0
- package/dist/injectables/style/popup.css +121 -0
- package/dist/injectables/style/style.css +255 -0
- package/dist/injectables/style/toast.css +76 -0
- package/dist/reader.css +178 -87
- package/dist/reader.js +128 -3
- package/dist/reader.js.map +7 -1
- package/dist/reader.map.css +21 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/{model → types/model}/Link.d.ts +2 -1
- package/dist/{model → types/model}/Locator.d.ts +3 -18
- package/dist/types/model/Publication.d.ts +51 -0
- package/dist/{model → types/model}/user-settings/ReadiumCSS.d.ts +0 -0
- package/dist/{model → types/model}/user-settings/UserProperties.d.ts +10 -4
- package/dist/{model → types/model}/user-settings/UserSettings.d.ts +23 -23
- package/dist/{modules → types/modules}/AnnotationModule.d.ts +31 -19
- package/dist/types/modules/BookmarkModule.d.ts +57 -0
- package/dist/types/modules/ReaderModule.d.ts +2 -0
- package/dist/types/modules/TTS/TTSModule2.d.ts +74 -0
- package/dist/{modules → types/modules}/TTS/TTSSettings.d.ts +44 -20
- package/dist/types/modules/citation/CitationModule.d.ts +40 -0
- package/dist/{modules → types/modules}/highlight/HtmlElementSelector.d.ts +0 -0
- package/dist/types/modules/highlight/LayerSettings.d.ts +19 -0
- package/dist/{modules → types/modules}/highlight/TextHighlighter.d.ts +68 -61
- package/dist/{modules → types/modules}/highlight/common/document.d.ts +0 -0
- package/dist/{modules → types/modules}/highlight/common/events.d.ts +0 -0
- package/dist/types/modules/highlight/common/highlight.d.ts +71 -0
- package/dist/{modules → types/modules}/highlight/common/rect-utils.d.ts +2 -2
- package/dist/{modules → types/modules}/highlight/common/selection.d.ts +8 -3
- package/dist/{modules → types/modules}/highlight/renderer/common/cssselector.d.ts +0 -0
- package/dist/{modules → types/modules}/highlight/renderer/common/cssselector2.d.ts +0 -0
- package/dist/{modules → types/modules}/highlight/renderer/iframe/selection.d.ts +2 -2
- package/dist/{modules → types/modules}/highlight/renderer/iframe/state.d.ts +0 -3
- package/dist/types/modules/history/HistoryModule.d.ts +34 -0
- package/dist/types/modules/linefocus/LineFocusModule.d.ts +51 -0
- package/dist/{modules → types/modules}/mediaoverlays/MediaOverlayModule.d.ts +19 -14
- package/dist/{modules → types/modules}/mediaoverlays/MediaOverlaySettings.d.ts +21 -16
- package/dist/types/modules/pagebreak/PageBreakModule.d.ts +30 -0
- package/dist/{modules → types/modules}/positions/TimelineModule.d.ts +3 -3
- package/dist/{modules → types/modules}/protection/ContentProtectionModule.d.ts +14 -10
- package/dist/types/modules/sampleread/SampleReadEventHandler.d.ts +8 -0
- package/dist/types/modules/search/DefinitionsModule.d.ts +52 -0
- package/dist/types/modules/search/Popup.d.ts +10 -0
- package/dist/{modules → types/modules}/search/SearchModule.d.ts +22 -18
- package/dist/{modules → types/modules}/search/searchWithDomSeek.d.ts +1 -1
- package/dist/{navigator → types/navigator}/IFrameNavigator.d.ts +99 -74
- package/dist/{navigator → types/navigator}/Navigator.d.ts +0 -0
- package/dist/types/reader.d.ts +202 -0
- package/dist/types/store/Annotator.d.ts +25 -0
- package/dist/types/store/LocalAnnotator.d.ts +31 -0
- package/dist/{store → types/store}/LocalStorageStore.d.ts +3 -3
- package/dist/{store → types/store}/MemoryStore.d.ts +3 -3
- package/dist/types/store/Store.d.ts +6 -0
- package/dist/{utils → types/utils}/BrowserUtilities.d.ts +0 -0
- package/dist/types/utils/EventHandler.d.ts +23 -0
- package/dist/{utils → types/utils}/HTMLTemplates.d.ts +0 -0
- package/dist/{utils → types/utils}/HTMLUtilities.d.ts +3 -3
- package/dist/{utils → types/utils}/IconLib.d.ts +1 -0
- package/dist/{utils → types/utils}/JsonUtil.d.ts +0 -0
- package/dist/types/utils/KeyboardEventHandler.d.ts +10 -0
- package/dist/{utils → types/utils}/TouchEventHandler.d.ts +4 -1
- package/dist/types/utils/index.d.ts +6 -0
- package/dist/{views → types/views}/BookView.d.ts +10 -7
- package/dist/{views → types/views}/FixedBookView.d.ts +8 -4
- package/dist/{views → types/views}/ReflowableBookView.d.ts +7 -5
- package/package.json +54 -25
- package/NOTICE +0 -20
- package/dist/index.d.ts +0 -61
- package/dist/injectables/click/click.d.ts +0 -1
- package/dist/injectables/footnotes/footnotes.d.ts +0 -1
- package/dist/injectables/footnotes/footnotes.js +0 -2
- package/dist/injectables/footnotes/footnotes.js.map +0 -1
- package/dist/injectables/glossary/glossary.d.ts +0 -5
- package/dist/injectables/glossary/glossary.js +0 -3
- package/dist/injectables/glossary/glossary.js.LICENSE.txt +0 -6
- package/dist/injectables/glossary/glossary.js.map +0 -1
- package/dist/material.css +0 -4637
- package/dist/material.css.map +0 -30
- package/dist/model/MediaOverlayNode.d.ts +0 -3
- package/dist/model/Publication.d.ts +0 -26
- package/dist/modules/BookmarkModule.d.ts +0 -46
- package/dist/modules/ReaderModule.d.ts +0 -3
- package/dist/modules/TTS/TTSModule.d.ts +0 -58
- package/dist/modules/highlight/common/highlight.d.ts +0 -19
- package/dist/modules/highlight/common/styles.d.ts +0 -35
- package/dist/modules/syncnarration/SyncSettings.d.ts +0 -67
- package/dist/modules/syncnarration/SynchronizedNarrationModule.d.ts +0 -81
- package/dist/modules/syncnarration/renderer/media-overlays.d.ts +0 -0
- package/dist/reader.css.map +0 -21
- package/dist/reader.js.LICENSE.txt +0 -66
- package/dist/store/Annotator.d.ts +0 -25
- package/dist/store/LocalAnnotator.d.ts +0 -31
- package/dist/store/Store.d.ts +0 -6
- package/dist/utils/EventHandler.d.ts +0 -9
- package/dist/utils/KeyboardEventHandler.d.ts +0 -7
- package/dist/utils/decodeURI.d.ts +0 -1
|
@@ -1,2 +1,1774 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
(() => {
|
|
2
|
+
var __esm = (fn, res) => function __init() {
|
|
3
|
+
return fn && (res = (0, fn[Object.keys(fn)[0]])(fn = 0)), res;
|
|
4
|
+
};
|
|
5
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
6
|
+
return mod || (0, cb[Object.keys(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
// node_modules/process/browser.js
|
|
10
|
+
var require_browser = __commonJS({
|
|
11
|
+
"node_modules/process/browser.js"(exports, module) {
|
|
12
|
+
init_polyfills();
|
|
13
|
+
var process2 = module.exports = {};
|
|
14
|
+
var cachedSetTimeout;
|
|
15
|
+
var cachedClearTimeout;
|
|
16
|
+
function defaultSetTimout() {
|
|
17
|
+
throw new Error("setTimeout has not been defined");
|
|
18
|
+
}
|
|
19
|
+
function defaultClearTimeout() {
|
|
20
|
+
throw new Error("clearTimeout has not been defined");
|
|
21
|
+
}
|
|
22
|
+
(function() {
|
|
23
|
+
try {
|
|
24
|
+
if (typeof setTimeout === "function") {
|
|
25
|
+
cachedSetTimeout = setTimeout;
|
|
26
|
+
} else {
|
|
27
|
+
cachedSetTimeout = defaultSetTimout;
|
|
28
|
+
}
|
|
29
|
+
} catch (e) {
|
|
30
|
+
cachedSetTimeout = defaultSetTimout;
|
|
31
|
+
}
|
|
32
|
+
try {
|
|
33
|
+
if (typeof clearTimeout === "function") {
|
|
34
|
+
cachedClearTimeout = clearTimeout;
|
|
35
|
+
} else {
|
|
36
|
+
cachedClearTimeout = defaultClearTimeout;
|
|
37
|
+
}
|
|
38
|
+
} catch (e) {
|
|
39
|
+
cachedClearTimeout = defaultClearTimeout;
|
|
40
|
+
}
|
|
41
|
+
})();
|
|
42
|
+
function runTimeout(fun) {
|
|
43
|
+
if (cachedSetTimeout === setTimeout) {
|
|
44
|
+
return setTimeout(fun, 0);
|
|
45
|
+
}
|
|
46
|
+
if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
|
|
47
|
+
cachedSetTimeout = setTimeout;
|
|
48
|
+
return setTimeout(fun, 0);
|
|
49
|
+
}
|
|
50
|
+
try {
|
|
51
|
+
return cachedSetTimeout(fun, 0);
|
|
52
|
+
} catch (e) {
|
|
53
|
+
try {
|
|
54
|
+
return cachedSetTimeout.call(null, fun, 0);
|
|
55
|
+
} catch (e2) {
|
|
56
|
+
return cachedSetTimeout.call(this, fun, 0);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
function runClearTimeout(marker) {
|
|
61
|
+
if (cachedClearTimeout === clearTimeout) {
|
|
62
|
+
return clearTimeout(marker);
|
|
63
|
+
}
|
|
64
|
+
if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
|
|
65
|
+
cachedClearTimeout = clearTimeout;
|
|
66
|
+
return clearTimeout(marker);
|
|
67
|
+
}
|
|
68
|
+
try {
|
|
69
|
+
return cachedClearTimeout(marker);
|
|
70
|
+
} catch (e) {
|
|
71
|
+
try {
|
|
72
|
+
return cachedClearTimeout.call(null, marker);
|
|
73
|
+
} catch (e2) {
|
|
74
|
+
return cachedClearTimeout.call(this, marker);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
var queue = [];
|
|
79
|
+
var draining = false;
|
|
80
|
+
var currentQueue;
|
|
81
|
+
var queueIndex = -1;
|
|
82
|
+
function cleanUpNextTick() {
|
|
83
|
+
if (!draining || !currentQueue) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
draining = false;
|
|
87
|
+
if (currentQueue.length) {
|
|
88
|
+
queue = currentQueue.concat(queue);
|
|
89
|
+
} else {
|
|
90
|
+
queueIndex = -1;
|
|
91
|
+
}
|
|
92
|
+
if (queue.length) {
|
|
93
|
+
drainQueue();
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
function drainQueue() {
|
|
97
|
+
if (draining) {
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
var timeout = runTimeout(cleanUpNextTick);
|
|
101
|
+
draining = true;
|
|
102
|
+
var len = queue.length;
|
|
103
|
+
while (len) {
|
|
104
|
+
currentQueue = queue;
|
|
105
|
+
queue = [];
|
|
106
|
+
while (++queueIndex < len) {
|
|
107
|
+
if (currentQueue) {
|
|
108
|
+
currentQueue[queueIndex].run();
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
queueIndex = -1;
|
|
112
|
+
len = queue.length;
|
|
113
|
+
}
|
|
114
|
+
currentQueue = null;
|
|
115
|
+
draining = false;
|
|
116
|
+
runClearTimeout(timeout);
|
|
117
|
+
}
|
|
118
|
+
process2.nextTick = function(fun) {
|
|
119
|
+
var args = new Array(arguments.length - 1);
|
|
120
|
+
if (arguments.length > 1) {
|
|
121
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
122
|
+
args[i - 1] = arguments[i];
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
queue.push(new Item(fun, args));
|
|
126
|
+
if (queue.length === 1 && !draining) {
|
|
127
|
+
runTimeout(drainQueue);
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
function Item(fun, array) {
|
|
131
|
+
this.fun = fun;
|
|
132
|
+
this.array = array;
|
|
133
|
+
}
|
|
134
|
+
Item.prototype.run = function() {
|
|
135
|
+
this.fun.apply(null, this.array);
|
|
136
|
+
};
|
|
137
|
+
process2.title = "browser";
|
|
138
|
+
process2.browser = true;
|
|
139
|
+
process2.env = {};
|
|
140
|
+
process2.argv = [];
|
|
141
|
+
process2.version = "";
|
|
142
|
+
process2.versions = {};
|
|
143
|
+
function noop() {
|
|
144
|
+
}
|
|
145
|
+
process2.on = noop;
|
|
146
|
+
process2.addListener = noop;
|
|
147
|
+
process2.once = noop;
|
|
148
|
+
process2.off = noop;
|
|
149
|
+
process2.removeListener = noop;
|
|
150
|
+
process2.removeAllListeners = noop;
|
|
151
|
+
process2.emit = noop;
|
|
152
|
+
process2.prependListener = noop;
|
|
153
|
+
process2.prependOnceListener = noop;
|
|
154
|
+
process2.listeners = function(name) {
|
|
155
|
+
return [];
|
|
156
|
+
};
|
|
157
|
+
process2.binding = function(name) {
|
|
158
|
+
throw new Error("process.binding is not supported");
|
|
159
|
+
};
|
|
160
|
+
process2.cwd = function() {
|
|
161
|
+
return "/";
|
|
162
|
+
};
|
|
163
|
+
process2.chdir = function(dir) {
|
|
164
|
+
throw new Error("process.chdir is not supported");
|
|
165
|
+
};
|
|
166
|
+
process2.umask = function() {
|
|
167
|
+
return 0;
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
// node_modules/has-symbols/shams.js
|
|
173
|
+
var require_shams = __commonJS({
|
|
174
|
+
"node_modules/has-symbols/shams.js"(exports, module) {
|
|
175
|
+
init_polyfills();
|
|
176
|
+
"use strict";
|
|
177
|
+
module.exports = function hasSymbols() {
|
|
178
|
+
if (typeof Symbol !== "function" || typeof Object.getOwnPropertySymbols !== "function") {
|
|
179
|
+
return false;
|
|
180
|
+
}
|
|
181
|
+
if (typeof Symbol.iterator === "symbol") {
|
|
182
|
+
return true;
|
|
183
|
+
}
|
|
184
|
+
var obj = {};
|
|
185
|
+
var sym = Symbol("test");
|
|
186
|
+
var symObj = Object(sym);
|
|
187
|
+
if (typeof sym === "string") {
|
|
188
|
+
return false;
|
|
189
|
+
}
|
|
190
|
+
if (Object.prototype.toString.call(sym) !== "[object Symbol]") {
|
|
191
|
+
return false;
|
|
192
|
+
}
|
|
193
|
+
if (Object.prototype.toString.call(symObj) !== "[object Symbol]") {
|
|
194
|
+
return false;
|
|
195
|
+
}
|
|
196
|
+
var symVal = 42;
|
|
197
|
+
obj[sym] = symVal;
|
|
198
|
+
for (sym in obj) {
|
|
199
|
+
return false;
|
|
200
|
+
}
|
|
201
|
+
if (typeof Object.keys === "function" && Object.keys(obj).length !== 0) {
|
|
202
|
+
return false;
|
|
203
|
+
}
|
|
204
|
+
if (typeof Object.getOwnPropertyNames === "function" && Object.getOwnPropertyNames(obj).length !== 0) {
|
|
205
|
+
return false;
|
|
206
|
+
}
|
|
207
|
+
var syms = Object.getOwnPropertySymbols(obj);
|
|
208
|
+
if (syms.length !== 1 || syms[0] !== sym) {
|
|
209
|
+
return false;
|
|
210
|
+
}
|
|
211
|
+
if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) {
|
|
212
|
+
return false;
|
|
213
|
+
}
|
|
214
|
+
if (typeof Object.getOwnPropertyDescriptor === "function") {
|
|
215
|
+
var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
|
|
216
|
+
if (descriptor.value !== symVal || descriptor.enumerable !== true) {
|
|
217
|
+
return false;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
return true;
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
});
|
|
224
|
+
|
|
225
|
+
// node_modules/has-symbols/index.js
|
|
226
|
+
var require_has_symbols = __commonJS({
|
|
227
|
+
"node_modules/has-symbols/index.js"(exports, module) {
|
|
228
|
+
init_polyfills();
|
|
229
|
+
"use strict";
|
|
230
|
+
var origSymbol = typeof Symbol !== "undefined" && Symbol;
|
|
231
|
+
var hasSymbolSham = require_shams();
|
|
232
|
+
module.exports = function hasNativeSymbols() {
|
|
233
|
+
if (typeof origSymbol !== "function") {
|
|
234
|
+
return false;
|
|
235
|
+
}
|
|
236
|
+
if (typeof Symbol !== "function") {
|
|
237
|
+
return false;
|
|
238
|
+
}
|
|
239
|
+
if (typeof origSymbol("foo") !== "symbol") {
|
|
240
|
+
return false;
|
|
241
|
+
}
|
|
242
|
+
if (typeof Symbol("bar") !== "symbol") {
|
|
243
|
+
return false;
|
|
244
|
+
}
|
|
245
|
+
return hasSymbolSham();
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
});
|
|
249
|
+
|
|
250
|
+
// node_modules/function-bind/implementation.js
|
|
251
|
+
var require_implementation = __commonJS({
|
|
252
|
+
"node_modules/function-bind/implementation.js"(exports, module) {
|
|
253
|
+
init_polyfills();
|
|
254
|
+
"use strict";
|
|
255
|
+
var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
|
|
256
|
+
var slice = Array.prototype.slice;
|
|
257
|
+
var toStr = Object.prototype.toString;
|
|
258
|
+
var funcType = "[object Function]";
|
|
259
|
+
module.exports = function bind(that) {
|
|
260
|
+
var target = this;
|
|
261
|
+
if (typeof target !== "function" || toStr.call(target) !== funcType) {
|
|
262
|
+
throw new TypeError(ERROR_MESSAGE + target);
|
|
263
|
+
}
|
|
264
|
+
var args = slice.call(arguments, 1);
|
|
265
|
+
var bound;
|
|
266
|
+
var binder = function() {
|
|
267
|
+
if (this instanceof bound) {
|
|
268
|
+
var result = target.apply(this, args.concat(slice.call(arguments)));
|
|
269
|
+
if (Object(result) === result) {
|
|
270
|
+
return result;
|
|
271
|
+
}
|
|
272
|
+
return this;
|
|
273
|
+
} else {
|
|
274
|
+
return target.apply(that, args.concat(slice.call(arguments)));
|
|
275
|
+
}
|
|
276
|
+
};
|
|
277
|
+
var boundLength = Math.max(0, target.length - args.length);
|
|
278
|
+
var boundArgs = [];
|
|
279
|
+
for (var i = 0; i < boundLength; i++) {
|
|
280
|
+
boundArgs.push("$" + i);
|
|
281
|
+
}
|
|
282
|
+
bound = Function("binder", "return function (" + boundArgs.join(",") + "){ return binder.apply(this,arguments); }")(binder);
|
|
283
|
+
if (target.prototype) {
|
|
284
|
+
var Empty = function Empty2() {
|
|
285
|
+
};
|
|
286
|
+
Empty.prototype = target.prototype;
|
|
287
|
+
bound.prototype = new Empty();
|
|
288
|
+
Empty.prototype = null;
|
|
289
|
+
}
|
|
290
|
+
return bound;
|
|
291
|
+
};
|
|
292
|
+
}
|
|
293
|
+
});
|
|
294
|
+
|
|
295
|
+
// node_modules/function-bind/index.js
|
|
296
|
+
var require_function_bind = __commonJS({
|
|
297
|
+
"node_modules/function-bind/index.js"(exports, module) {
|
|
298
|
+
init_polyfills();
|
|
299
|
+
"use strict";
|
|
300
|
+
var implementation = require_implementation();
|
|
301
|
+
module.exports = Function.prototype.bind || implementation;
|
|
302
|
+
}
|
|
303
|
+
});
|
|
304
|
+
|
|
305
|
+
// node_modules/has/src/index.js
|
|
306
|
+
var require_src = __commonJS({
|
|
307
|
+
"node_modules/has/src/index.js"(exports, module) {
|
|
308
|
+
init_polyfills();
|
|
309
|
+
"use strict";
|
|
310
|
+
var bind = require_function_bind();
|
|
311
|
+
module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);
|
|
312
|
+
}
|
|
313
|
+
});
|
|
314
|
+
|
|
315
|
+
// node_modules/get-intrinsic/index.js
|
|
316
|
+
var require_get_intrinsic = __commonJS({
|
|
317
|
+
"node_modules/get-intrinsic/index.js"(exports, module) {
|
|
318
|
+
init_polyfills();
|
|
319
|
+
"use strict";
|
|
320
|
+
var undefined2;
|
|
321
|
+
var $SyntaxError = SyntaxError;
|
|
322
|
+
var $Function = Function;
|
|
323
|
+
var $TypeError = TypeError;
|
|
324
|
+
var getEvalledConstructor = function(expressionSyntax) {
|
|
325
|
+
try {
|
|
326
|
+
return $Function('"use strict"; return (' + expressionSyntax + ").constructor;")();
|
|
327
|
+
} catch (e) {
|
|
328
|
+
}
|
|
329
|
+
};
|
|
330
|
+
var $gOPD = Object.getOwnPropertyDescriptor;
|
|
331
|
+
if ($gOPD) {
|
|
332
|
+
try {
|
|
333
|
+
$gOPD({}, "");
|
|
334
|
+
} catch (e) {
|
|
335
|
+
$gOPD = null;
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
var throwTypeError = function() {
|
|
339
|
+
throw new $TypeError();
|
|
340
|
+
};
|
|
341
|
+
var ThrowTypeError = $gOPD ? function() {
|
|
342
|
+
try {
|
|
343
|
+
arguments.callee;
|
|
344
|
+
return throwTypeError;
|
|
345
|
+
} catch (calleeThrows) {
|
|
346
|
+
try {
|
|
347
|
+
return $gOPD(arguments, "callee").get;
|
|
348
|
+
} catch (gOPDthrows) {
|
|
349
|
+
return throwTypeError;
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
}() : throwTypeError;
|
|
353
|
+
var hasSymbols = require_has_symbols()();
|
|
354
|
+
var getProto = Object.getPrototypeOf || function(x) {
|
|
355
|
+
return x.__proto__;
|
|
356
|
+
};
|
|
357
|
+
var needsEval = {};
|
|
358
|
+
var TypedArray = typeof Uint8Array === "undefined" ? undefined2 : getProto(Uint8Array);
|
|
359
|
+
var INTRINSICS = {
|
|
360
|
+
"%AggregateError%": typeof AggregateError === "undefined" ? undefined2 : AggregateError,
|
|
361
|
+
"%Array%": Array,
|
|
362
|
+
"%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? undefined2 : ArrayBuffer,
|
|
363
|
+
"%ArrayIteratorPrototype%": hasSymbols ? getProto([][Symbol.iterator]()) : undefined2,
|
|
364
|
+
"%AsyncFromSyncIteratorPrototype%": undefined2,
|
|
365
|
+
"%AsyncFunction%": needsEval,
|
|
366
|
+
"%AsyncGenerator%": needsEval,
|
|
367
|
+
"%AsyncGeneratorFunction%": needsEval,
|
|
368
|
+
"%AsyncIteratorPrototype%": needsEval,
|
|
369
|
+
"%Atomics%": typeof Atomics === "undefined" ? undefined2 : Atomics,
|
|
370
|
+
"%BigInt%": typeof BigInt === "undefined" ? undefined2 : BigInt,
|
|
371
|
+
"%Boolean%": Boolean,
|
|
372
|
+
"%DataView%": typeof DataView === "undefined" ? undefined2 : DataView,
|
|
373
|
+
"%Date%": Date,
|
|
374
|
+
"%decodeURI%": decodeURI,
|
|
375
|
+
"%decodeURIComponent%": decodeURIComponent,
|
|
376
|
+
"%encodeURI%": encodeURI,
|
|
377
|
+
"%encodeURIComponent%": encodeURIComponent,
|
|
378
|
+
"%Error%": Error,
|
|
379
|
+
"%eval%": eval,
|
|
380
|
+
"%EvalError%": EvalError,
|
|
381
|
+
"%Float32Array%": typeof Float32Array === "undefined" ? undefined2 : Float32Array,
|
|
382
|
+
"%Float64Array%": typeof Float64Array === "undefined" ? undefined2 : Float64Array,
|
|
383
|
+
"%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? undefined2 : FinalizationRegistry,
|
|
384
|
+
"%Function%": $Function,
|
|
385
|
+
"%GeneratorFunction%": needsEval,
|
|
386
|
+
"%Int8Array%": typeof Int8Array === "undefined" ? undefined2 : Int8Array,
|
|
387
|
+
"%Int16Array%": typeof Int16Array === "undefined" ? undefined2 : Int16Array,
|
|
388
|
+
"%Int32Array%": typeof Int32Array === "undefined" ? undefined2 : Int32Array,
|
|
389
|
+
"%isFinite%": isFinite,
|
|
390
|
+
"%isNaN%": isNaN,
|
|
391
|
+
"%IteratorPrototype%": hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined2,
|
|
392
|
+
"%JSON%": typeof JSON === "object" ? JSON : undefined2,
|
|
393
|
+
"%Map%": typeof Map === "undefined" ? undefined2 : Map,
|
|
394
|
+
"%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols ? undefined2 : getProto(new Map()[Symbol.iterator]()),
|
|
395
|
+
"%Math%": Math,
|
|
396
|
+
"%Number%": Number,
|
|
397
|
+
"%Object%": Object,
|
|
398
|
+
"%parseFloat%": parseFloat,
|
|
399
|
+
"%parseInt%": parseInt,
|
|
400
|
+
"%Promise%": typeof Promise === "undefined" ? undefined2 : Promise,
|
|
401
|
+
"%Proxy%": typeof Proxy === "undefined" ? undefined2 : Proxy,
|
|
402
|
+
"%RangeError%": RangeError,
|
|
403
|
+
"%ReferenceError%": ReferenceError,
|
|
404
|
+
"%Reflect%": typeof Reflect === "undefined" ? undefined2 : Reflect,
|
|
405
|
+
"%RegExp%": RegExp,
|
|
406
|
+
"%Set%": typeof Set === "undefined" ? undefined2 : Set,
|
|
407
|
+
"%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols ? undefined2 : getProto(new Set()[Symbol.iterator]()),
|
|
408
|
+
"%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? undefined2 : SharedArrayBuffer,
|
|
409
|
+
"%String%": String,
|
|
410
|
+
"%StringIteratorPrototype%": hasSymbols ? getProto(""[Symbol.iterator]()) : undefined2,
|
|
411
|
+
"%Symbol%": hasSymbols ? Symbol : undefined2,
|
|
412
|
+
"%SyntaxError%": $SyntaxError,
|
|
413
|
+
"%ThrowTypeError%": ThrowTypeError,
|
|
414
|
+
"%TypedArray%": TypedArray,
|
|
415
|
+
"%TypeError%": $TypeError,
|
|
416
|
+
"%Uint8Array%": typeof Uint8Array === "undefined" ? undefined2 : Uint8Array,
|
|
417
|
+
"%Uint8ClampedArray%": typeof Uint8ClampedArray === "undefined" ? undefined2 : Uint8ClampedArray,
|
|
418
|
+
"%Uint16Array%": typeof Uint16Array === "undefined" ? undefined2 : Uint16Array,
|
|
419
|
+
"%Uint32Array%": typeof Uint32Array === "undefined" ? undefined2 : Uint32Array,
|
|
420
|
+
"%URIError%": URIError,
|
|
421
|
+
"%WeakMap%": typeof WeakMap === "undefined" ? undefined2 : WeakMap,
|
|
422
|
+
"%WeakRef%": typeof WeakRef === "undefined" ? undefined2 : WeakRef,
|
|
423
|
+
"%WeakSet%": typeof WeakSet === "undefined" ? undefined2 : WeakSet
|
|
424
|
+
};
|
|
425
|
+
var doEval = function doEval2(name) {
|
|
426
|
+
var value;
|
|
427
|
+
if (name === "%AsyncFunction%") {
|
|
428
|
+
value = getEvalledConstructor("async function () {}");
|
|
429
|
+
} else if (name === "%GeneratorFunction%") {
|
|
430
|
+
value = getEvalledConstructor("function* () {}");
|
|
431
|
+
} else if (name === "%AsyncGeneratorFunction%") {
|
|
432
|
+
value = getEvalledConstructor("async function* () {}");
|
|
433
|
+
} else if (name === "%AsyncGenerator%") {
|
|
434
|
+
var fn = doEval2("%AsyncGeneratorFunction%");
|
|
435
|
+
if (fn) {
|
|
436
|
+
value = fn.prototype;
|
|
437
|
+
}
|
|
438
|
+
} else if (name === "%AsyncIteratorPrototype%") {
|
|
439
|
+
var gen = doEval2("%AsyncGenerator%");
|
|
440
|
+
if (gen) {
|
|
441
|
+
value = getProto(gen.prototype);
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
INTRINSICS[name] = value;
|
|
445
|
+
return value;
|
|
446
|
+
};
|
|
447
|
+
var LEGACY_ALIASES = {
|
|
448
|
+
"%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
|
|
449
|
+
"%ArrayPrototype%": ["Array", "prototype"],
|
|
450
|
+
"%ArrayProto_entries%": ["Array", "prototype", "entries"],
|
|
451
|
+
"%ArrayProto_forEach%": ["Array", "prototype", "forEach"],
|
|
452
|
+
"%ArrayProto_keys%": ["Array", "prototype", "keys"],
|
|
453
|
+
"%ArrayProto_values%": ["Array", "prototype", "values"],
|
|
454
|
+
"%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"],
|
|
455
|
+
"%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"],
|
|
456
|
+
"%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"],
|
|
457
|
+
"%BooleanPrototype%": ["Boolean", "prototype"],
|
|
458
|
+
"%DataViewPrototype%": ["DataView", "prototype"],
|
|
459
|
+
"%DatePrototype%": ["Date", "prototype"],
|
|
460
|
+
"%ErrorPrototype%": ["Error", "prototype"],
|
|
461
|
+
"%EvalErrorPrototype%": ["EvalError", "prototype"],
|
|
462
|
+
"%Float32ArrayPrototype%": ["Float32Array", "prototype"],
|
|
463
|
+
"%Float64ArrayPrototype%": ["Float64Array", "prototype"],
|
|
464
|
+
"%FunctionPrototype%": ["Function", "prototype"],
|
|
465
|
+
"%Generator%": ["GeneratorFunction", "prototype"],
|
|
466
|
+
"%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"],
|
|
467
|
+
"%Int8ArrayPrototype%": ["Int8Array", "prototype"],
|
|
468
|
+
"%Int16ArrayPrototype%": ["Int16Array", "prototype"],
|
|
469
|
+
"%Int32ArrayPrototype%": ["Int32Array", "prototype"],
|
|
470
|
+
"%JSONParse%": ["JSON", "parse"],
|
|
471
|
+
"%JSONStringify%": ["JSON", "stringify"],
|
|
472
|
+
"%MapPrototype%": ["Map", "prototype"],
|
|
473
|
+
"%NumberPrototype%": ["Number", "prototype"],
|
|
474
|
+
"%ObjectPrototype%": ["Object", "prototype"],
|
|
475
|
+
"%ObjProto_toString%": ["Object", "prototype", "toString"],
|
|
476
|
+
"%ObjProto_valueOf%": ["Object", "prototype", "valueOf"],
|
|
477
|
+
"%PromisePrototype%": ["Promise", "prototype"],
|
|
478
|
+
"%PromiseProto_then%": ["Promise", "prototype", "then"],
|
|
479
|
+
"%Promise_all%": ["Promise", "all"],
|
|
480
|
+
"%Promise_reject%": ["Promise", "reject"],
|
|
481
|
+
"%Promise_resolve%": ["Promise", "resolve"],
|
|
482
|
+
"%RangeErrorPrototype%": ["RangeError", "prototype"],
|
|
483
|
+
"%ReferenceErrorPrototype%": ["ReferenceError", "prototype"],
|
|
484
|
+
"%RegExpPrototype%": ["RegExp", "prototype"],
|
|
485
|
+
"%SetPrototype%": ["Set", "prototype"],
|
|
486
|
+
"%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"],
|
|
487
|
+
"%StringPrototype%": ["String", "prototype"],
|
|
488
|
+
"%SymbolPrototype%": ["Symbol", "prototype"],
|
|
489
|
+
"%SyntaxErrorPrototype%": ["SyntaxError", "prototype"],
|
|
490
|
+
"%TypedArrayPrototype%": ["TypedArray", "prototype"],
|
|
491
|
+
"%TypeErrorPrototype%": ["TypeError", "prototype"],
|
|
492
|
+
"%Uint8ArrayPrototype%": ["Uint8Array", "prototype"],
|
|
493
|
+
"%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"],
|
|
494
|
+
"%Uint16ArrayPrototype%": ["Uint16Array", "prototype"],
|
|
495
|
+
"%Uint32ArrayPrototype%": ["Uint32Array", "prototype"],
|
|
496
|
+
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
497
|
+
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
498
|
+
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
499
|
+
};
|
|
500
|
+
var bind = require_function_bind();
|
|
501
|
+
var hasOwn = require_src();
|
|
502
|
+
var $concat = bind.call(Function.call, Array.prototype.concat);
|
|
503
|
+
var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
|
|
504
|
+
var $replace = bind.call(Function.call, String.prototype.replace);
|
|
505
|
+
var $strSlice = bind.call(Function.call, String.prototype.slice);
|
|
506
|
+
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
|
|
507
|
+
var reEscapeChar = /\\(\\)?/g;
|
|
508
|
+
var stringToPath = function stringToPath2(string) {
|
|
509
|
+
var first = $strSlice(string, 0, 1);
|
|
510
|
+
var last = $strSlice(string, -1);
|
|
511
|
+
if (first === "%" && last !== "%") {
|
|
512
|
+
throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`");
|
|
513
|
+
} else if (last === "%" && first !== "%") {
|
|
514
|
+
throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");
|
|
515
|
+
}
|
|
516
|
+
var result = [];
|
|
517
|
+
$replace(string, rePropName, function(match, number, quote, subString) {
|
|
518
|
+
result[result.length] = quote ? $replace(subString, reEscapeChar, "$1") : number || match;
|
|
519
|
+
});
|
|
520
|
+
return result;
|
|
521
|
+
};
|
|
522
|
+
var getBaseIntrinsic = function getBaseIntrinsic2(name, allowMissing) {
|
|
523
|
+
var intrinsicName = name;
|
|
524
|
+
var alias;
|
|
525
|
+
if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
|
|
526
|
+
alias = LEGACY_ALIASES[intrinsicName];
|
|
527
|
+
intrinsicName = "%" + alias[0] + "%";
|
|
528
|
+
}
|
|
529
|
+
if (hasOwn(INTRINSICS, intrinsicName)) {
|
|
530
|
+
var value = INTRINSICS[intrinsicName];
|
|
531
|
+
if (value === needsEval) {
|
|
532
|
+
value = doEval(intrinsicName);
|
|
533
|
+
}
|
|
534
|
+
if (typeof value === "undefined" && !allowMissing) {
|
|
535
|
+
throw new $TypeError("intrinsic " + name + " exists, but is not available. Please file an issue!");
|
|
536
|
+
}
|
|
537
|
+
return {
|
|
538
|
+
alias,
|
|
539
|
+
name: intrinsicName,
|
|
540
|
+
value
|
|
541
|
+
};
|
|
542
|
+
}
|
|
543
|
+
throw new $SyntaxError("intrinsic " + name + " does not exist!");
|
|
544
|
+
};
|
|
545
|
+
module.exports = function GetIntrinsic(name, allowMissing) {
|
|
546
|
+
if (typeof name !== "string" || name.length === 0) {
|
|
547
|
+
throw new $TypeError("intrinsic name must be a non-empty string");
|
|
548
|
+
}
|
|
549
|
+
if (arguments.length > 1 && typeof allowMissing !== "boolean") {
|
|
550
|
+
throw new $TypeError('"allowMissing" argument must be a boolean');
|
|
551
|
+
}
|
|
552
|
+
var parts = stringToPath(name);
|
|
553
|
+
var intrinsicBaseName = parts.length > 0 ? parts[0] : "";
|
|
554
|
+
var intrinsic = getBaseIntrinsic("%" + intrinsicBaseName + "%", allowMissing);
|
|
555
|
+
var intrinsicRealName = intrinsic.name;
|
|
556
|
+
var value = intrinsic.value;
|
|
557
|
+
var skipFurtherCaching = false;
|
|
558
|
+
var alias = intrinsic.alias;
|
|
559
|
+
if (alias) {
|
|
560
|
+
intrinsicBaseName = alias[0];
|
|
561
|
+
$spliceApply(parts, $concat([0, 1], alias));
|
|
562
|
+
}
|
|
563
|
+
for (var i = 1, isOwn = true; i < parts.length; i += 1) {
|
|
564
|
+
var part = parts[i];
|
|
565
|
+
var first = $strSlice(part, 0, 1);
|
|
566
|
+
var last = $strSlice(part, -1);
|
|
567
|
+
if ((first === '"' || first === "'" || first === "`" || (last === '"' || last === "'" || last === "`")) && first !== last) {
|
|
568
|
+
throw new $SyntaxError("property names with quotes must have matching quotes");
|
|
569
|
+
}
|
|
570
|
+
if (part === "constructor" || !isOwn) {
|
|
571
|
+
skipFurtherCaching = true;
|
|
572
|
+
}
|
|
573
|
+
intrinsicBaseName += "." + part;
|
|
574
|
+
intrinsicRealName = "%" + intrinsicBaseName + "%";
|
|
575
|
+
if (hasOwn(INTRINSICS, intrinsicRealName)) {
|
|
576
|
+
value = INTRINSICS[intrinsicRealName];
|
|
577
|
+
} else if (value != null) {
|
|
578
|
+
if (!(part in value)) {
|
|
579
|
+
if (!allowMissing) {
|
|
580
|
+
throw new $TypeError("base intrinsic for " + name + " exists, but the property is not available.");
|
|
581
|
+
}
|
|
582
|
+
return void 0;
|
|
583
|
+
}
|
|
584
|
+
if ($gOPD && i + 1 >= parts.length) {
|
|
585
|
+
var desc = $gOPD(value, part);
|
|
586
|
+
isOwn = !!desc;
|
|
587
|
+
if (isOwn && "get" in desc && !("originalValue" in desc.get)) {
|
|
588
|
+
value = desc.get;
|
|
589
|
+
} else {
|
|
590
|
+
value = value[part];
|
|
591
|
+
}
|
|
592
|
+
} else {
|
|
593
|
+
isOwn = hasOwn(value, part);
|
|
594
|
+
value = value[part];
|
|
595
|
+
}
|
|
596
|
+
if (isOwn && !skipFurtherCaching) {
|
|
597
|
+
INTRINSICS[intrinsicRealName] = value;
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
return value;
|
|
602
|
+
};
|
|
603
|
+
}
|
|
604
|
+
});
|
|
605
|
+
|
|
606
|
+
// node_modules/call-bind/index.js
|
|
607
|
+
var require_call_bind = __commonJS({
|
|
608
|
+
"node_modules/call-bind/index.js"(exports, module) {
|
|
609
|
+
init_polyfills();
|
|
610
|
+
"use strict";
|
|
611
|
+
var bind = require_function_bind();
|
|
612
|
+
var GetIntrinsic = require_get_intrinsic();
|
|
613
|
+
var $apply = GetIntrinsic("%Function.prototype.apply%");
|
|
614
|
+
var $call = GetIntrinsic("%Function.prototype.call%");
|
|
615
|
+
var $reflectApply = GetIntrinsic("%Reflect.apply%", true) || bind.call($call, $apply);
|
|
616
|
+
var $gOPD = GetIntrinsic("%Object.getOwnPropertyDescriptor%", true);
|
|
617
|
+
var $defineProperty = GetIntrinsic("%Object.defineProperty%", true);
|
|
618
|
+
var $max = GetIntrinsic("%Math.max%");
|
|
619
|
+
if ($defineProperty) {
|
|
620
|
+
try {
|
|
621
|
+
$defineProperty({}, "a", { value: 1 });
|
|
622
|
+
} catch (e) {
|
|
623
|
+
$defineProperty = null;
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
module.exports = function callBind(originalFunction) {
|
|
627
|
+
var func = $reflectApply(bind, $call, arguments);
|
|
628
|
+
if ($gOPD && $defineProperty) {
|
|
629
|
+
var desc = $gOPD(func, "length");
|
|
630
|
+
if (desc.configurable) {
|
|
631
|
+
$defineProperty(func, "length", { value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) });
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
return func;
|
|
635
|
+
};
|
|
636
|
+
var applyBind = function applyBind2() {
|
|
637
|
+
return $reflectApply(bind, $apply, arguments);
|
|
638
|
+
};
|
|
639
|
+
if ($defineProperty) {
|
|
640
|
+
$defineProperty(module.exports, "apply", { value: applyBind });
|
|
641
|
+
} else {
|
|
642
|
+
module.exports.apply = applyBind;
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
});
|
|
646
|
+
|
|
647
|
+
// node_modules/call-bind/callBound.js
|
|
648
|
+
var require_callBound = __commonJS({
|
|
649
|
+
"node_modules/call-bind/callBound.js"(exports, module) {
|
|
650
|
+
init_polyfills();
|
|
651
|
+
"use strict";
|
|
652
|
+
var GetIntrinsic = require_get_intrinsic();
|
|
653
|
+
var callBind = require_call_bind();
|
|
654
|
+
var $indexOf = callBind(GetIntrinsic("String.prototype.indexOf"));
|
|
655
|
+
module.exports = function callBoundIntrinsic(name, allowMissing) {
|
|
656
|
+
var intrinsic = GetIntrinsic(name, !!allowMissing);
|
|
657
|
+
if (typeof intrinsic === "function" && $indexOf(name, ".prototype.") > -1) {
|
|
658
|
+
return callBind(intrinsic);
|
|
659
|
+
}
|
|
660
|
+
return intrinsic;
|
|
661
|
+
};
|
|
662
|
+
}
|
|
663
|
+
});
|
|
664
|
+
|
|
665
|
+
// node_modules/is-arguments/index.js
|
|
666
|
+
var require_is_arguments = __commonJS({
|
|
667
|
+
"node_modules/is-arguments/index.js"(exports, module) {
|
|
668
|
+
init_polyfills();
|
|
669
|
+
"use strict";
|
|
670
|
+
var hasToStringTag = typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol";
|
|
671
|
+
var callBound = require_callBound();
|
|
672
|
+
var $toString = callBound("Object.prototype.toString");
|
|
673
|
+
var isStandardArguments = function isArguments(value) {
|
|
674
|
+
if (hasToStringTag && value && typeof value === "object" && Symbol.toStringTag in value) {
|
|
675
|
+
return false;
|
|
676
|
+
}
|
|
677
|
+
return $toString(value) === "[object Arguments]";
|
|
678
|
+
};
|
|
679
|
+
var isLegacyArguments = function isArguments(value) {
|
|
680
|
+
if (isStandardArguments(value)) {
|
|
681
|
+
return true;
|
|
682
|
+
}
|
|
683
|
+
return value !== null && typeof value === "object" && typeof value.length === "number" && value.length >= 0 && $toString(value) !== "[object Array]" && $toString(value.callee) === "[object Function]";
|
|
684
|
+
};
|
|
685
|
+
var supportsStandardArguments = function() {
|
|
686
|
+
return isStandardArguments(arguments);
|
|
687
|
+
}();
|
|
688
|
+
isStandardArguments.isLegacyArguments = isLegacyArguments;
|
|
689
|
+
module.exports = supportsStandardArguments ? isStandardArguments : isLegacyArguments;
|
|
690
|
+
}
|
|
691
|
+
});
|
|
692
|
+
|
|
693
|
+
// node_modules/is-generator-function/index.js
|
|
694
|
+
var require_is_generator_function = __commonJS({
|
|
695
|
+
"node_modules/is-generator-function/index.js"(exports, module) {
|
|
696
|
+
init_polyfills();
|
|
697
|
+
"use strict";
|
|
698
|
+
var toStr = Object.prototype.toString;
|
|
699
|
+
var fnToStr = Function.prototype.toString;
|
|
700
|
+
var isFnRegex = /^\s*(?:function)?\*/;
|
|
701
|
+
var hasToStringTag = typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol";
|
|
702
|
+
var getProto = Object.getPrototypeOf;
|
|
703
|
+
var getGeneratorFunc = function() {
|
|
704
|
+
if (!hasToStringTag) {
|
|
705
|
+
return false;
|
|
706
|
+
}
|
|
707
|
+
try {
|
|
708
|
+
return Function("return function*() {}")();
|
|
709
|
+
} catch (e) {
|
|
710
|
+
}
|
|
711
|
+
};
|
|
712
|
+
var GeneratorFunction;
|
|
713
|
+
module.exports = function isGeneratorFunction(fn) {
|
|
714
|
+
if (typeof fn !== "function") {
|
|
715
|
+
return false;
|
|
716
|
+
}
|
|
717
|
+
if (isFnRegex.test(fnToStr.call(fn))) {
|
|
718
|
+
return true;
|
|
719
|
+
}
|
|
720
|
+
if (!hasToStringTag) {
|
|
721
|
+
var str = toStr.call(fn);
|
|
722
|
+
return str === "[object GeneratorFunction]";
|
|
723
|
+
}
|
|
724
|
+
if (!getProto) {
|
|
725
|
+
return false;
|
|
726
|
+
}
|
|
727
|
+
if (typeof GeneratorFunction === "undefined") {
|
|
728
|
+
var generatorFunc = getGeneratorFunc();
|
|
729
|
+
GeneratorFunction = generatorFunc ? getProto(generatorFunc) : false;
|
|
730
|
+
}
|
|
731
|
+
return getProto(fn) === GeneratorFunction;
|
|
732
|
+
};
|
|
733
|
+
}
|
|
734
|
+
});
|
|
735
|
+
|
|
736
|
+
// node_modules/foreach/index.js
|
|
737
|
+
var require_foreach = __commonJS({
|
|
738
|
+
"node_modules/foreach/index.js"(exports, module) {
|
|
739
|
+
init_polyfills();
|
|
740
|
+
var hasOwn = Object.prototype.hasOwnProperty;
|
|
741
|
+
var toString = Object.prototype.toString;
|
|
742
|
+
module.exports = function forEach(obj, fn, ctx) {
|
|
743
|
+
if (toString.call(fn) !== "[object Function]") {
|
|
744
|
+
throw new TypeError("iterator must be a function");
|
|
745
|
+
}
|
|
746
|
+
var l = obj.length;
|
|
747
|
+
if (l === +l) {
|
|
748
|
+
for (var i = 0; i < l; i++) {
|
|
749
|
+
fn.call(ctx, obj[i], i, obj);
|
|
750
|
+
}
|
|
751
|
+
} else {
|
|
752
|
+
for (var k in obj) {
|
|
753
|
+
if (hasOwn.call(obj, k)) {
|
|
754
|
+
fn.call(ctx, obj[k], k, obj);
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
};
|
|
759
|
+
}
|
|
760
|
+
});
|
|
761
|
+
|
|
762
|
+
// node_modules/available-typed-arrays/index.js
|
|
763
|
+
var require_available_typed_arrays = __commonJS({
|
|
764
|
+
"node_modules/available-typed-arrays/index.js"(exports, module) {
|
|
765
|
+
init_polyfills();
|
|
766
|
+
"use strict";
|
|
767
|
+
var possibleNames = [
|
|
768
|
+
"BigInt64Array",
|
|
769
|
+
"BigUint64Array",
|
|
770
|
+
"Float32Array",
|
|
771
|
+
"Float64Array",
|
|
772
|
+
"Int16Array",
|
|
773
|
+
"Int32Array",
|
|
774
|
+
"Int8Array",
|
|
775
|
+
"Uint16Array",
|
|
776
|
+
"Uint32Array",
|
|
777
|
+
"Uint8Array",
|
|
778
|
+
"Uint8ClampedArray"
|
|
779
|
+
];
|
|
780
|
+
module.exports = function availableTypedArrays() {
|
|
781
|
+
var out = [];
|
|
782
|
+
for (var i = 0; i < possibleNames.length; i++) {
|
|
783
|
+
if (typeof globalThis[possibleNames[i]] === "function") {
|
|
784
|
+
out[out.length] = possibleNames[i];
|
|
785
|
+
}
|
|
786
|
+
}
|
|
787
|
+
return out;
|
|
788
|
+
};
|
|
789
|
+
}
|
|
790
|
+
});
|
|
791
|
+
|
|
792
|
+
// node_modules/es-abstract/helpers/getOwnPropertyDescriptor.js
|
|
793
|
+
var require_getOwnPropertyDescriptor = __commonJS({
|
|
794
|
+
"node_modules/es-abstract/helpers/getOwnPropertyDescriptor.js"(exports, module) {
|
|
795
|
+
init_polyfills();
|
|
796
|
+
"use strict";
|
|
797
|
+
var GetIntrinsic = require_get_intrinsic();
|
|
798
|
+
var $gOPD = GetIntrinsic("%Object.getOwnPropertyDescriptor%", true);
|
|
799
|
+
if ($gOPD) {
|
|
800
|
+
try {
|
|
801
|
+
$gOPD([], "length");
|
|
802
|
+
} catch (e) {
|
|
803
|
+
$gOPD = null;
|
|
804
|
+
}
|
|
805
|
+
}
|
|
806
|
+
module.exports = $gOPD;
|
|
807
|
+
}
|
|
808
|
+
});
|
|
809
|
+
|
|
810
|
+
// node_modules/is-typed-array/index.js
|
|
811
|
+
var require_is_typed_array = __commonJS({
|
|
812
|
+
"node_modules/is-typed-array/index.js"(exports, module) {
|
|
813
|
+
init_polyfills();
|
|
814
|
+
"use strict";
|
|
815
|
+
var forEach = require_foreach();
|
|
816
|
+
var availableTypedArrays = require_available_typed_arrays();
|
|
817
|
+
var callBound = require_callBound();
|
|
818
|
+
var $toString = callBound("Object.prototype.toString");
|
|
819
|
+
var hasSymbols = require_has_symbols()();
|
|
820
|
+
var hasToStringTag = hasSymbols && typeof Symbol.toStringTag === "symbol";
|
|
821
|
+
var typedArrays = availableTypedArrays();
|
|
822
|
+
var $indexOf = callBound("Array.prototype.indexOf", true) || function indexOf(array, value) {
|
|
823
|
+
for (var i = 0; i < array.length; i += 1) {
|
|
824
|
+
if (array[i] === value) {
|
|
825
|
+
return i;
|
|
826
|
+
}
|
|
827
|
+
}
|
|
828
|
+
return -1;
|
|
829
|
+
};
|
|
830
|
+
var $slice = callBound("String.prototype.slice");
|
|
831
|
+
var toStrTags = {};
|
|
832
|
+
var gOPD = require_getOwnPropertyDescriptor();
|
|
833
|
+
var getPrototypeOf = Object.getPrototypeOf;
|
|
834
|
+
if (hasToStringTag && gOPD && getPrototypeOf) {
|
|
835
|
+
forEach(typedArrays, function(typedArray) {
|
|
836
|
+
var arr = new globalThis[typedArray]();
|
|
837
|
+
if (!(Symbol.toStringTag in arr)) {
|
|
838
|
+
throw new EvalError("this engine has support for Symbol.toStringTag, but " + typedArray + " does not have the property! Please report this.");
|
|
839
|
+
}
|
|
840
|
+
var proto = getPrototypeOf(arr);
|
|
841
|
+
var descriptor = gOPD(proto, Symbol.toStringTag);
|
|
842
|
+
if (!descriptor) {
|
|
843
|
+
var superProto = getPrototypeOf(proto);
|
|
844
|
+
descriptor = gOPD(superProto, Symbol.toStringTag);
|
|
845
|
+
}
|
|
846
|
+
toStrTags[typedArray] = descriptor.get;
|
|
847
|
+
});
|
|
848
|
+
}
|
|
849
|
+
var tryTypedArrays = function tryAllTypedArrays(value) {
|
|
850
|
+
var anyTrue = false;
|
|
851
|
+
forEach(toStrTags, function(getter, typedArray) {
|
|
852
|
+
if (!anyTrue) {
|
|
853
|
+
try {
|
|
854
|
+
anyTrue = getter.call(value) === typedArray;
|
|
855
|
+
} catch (e) {
|
|
856
|
+
}
|
|
857
|
+
}
|
|
858
|
+
});
|
|
859
|
+
return anyTrue;
|
|
860
|
+
};
|
|
861
|
+
module.exports = function isTypedArray(value) {
|
|
862
|
+
if (!value || typeof value !== "object") {
|
|
863
|
+
return false;
|
|
864
|
+
}
|
|
865
|
+
if (!hasToStringTag) {
|
|
866
|
+
var tag = $slice($toString(value), 8, -1);
|
|
867
|
+
return $indexOf(typedArrays, tag) > -1;
|
|
868
|
+
}
|
|
869
|
+
if (!gOPD) {
|
|
870
|
+
return false;
|
|
871
|
+
}
|
|
872
|
+
return tryTypedArrays(value);
|
|
873
|
+
};
|
|
874
|
+
}
|
|
875
|
+
});
|
|
876
|
+
|
|
877
|
+
// node_modules/which-typed-array/index.js
|
|
878
|
+
var require_which_typed_array = __commonJS({
|
|
879
|
+
"node_modules/which-typed-array/index.js"(exports, module) {
|
|
880
|
+
init_polyfills();
|
|
881
|
+
"use strict";
|
|
882
|
+
var forEach = require_foreach();
|
|
883
|
+
var availableTypedArrays = require_available_typed_arrays();
|
|
884
|
+
var callBound = require_callBound();
|
|
885
|
+
var $toString = callBound("Object.prototype.toString");
|
|
886
|
+
var hasSymbols = require_has_symbols()();
|
|
887
|
+
var hasToStringTag = hasSymbols && typeof Symbol.toStringTag === "symbol";
|
|
888
|
+
var typedArrays = availableTypedArrays();
|
|
889
|
+
var $slice = callBound("String.prototype.slice");
|
|
890
|
+
var toStrTags = {};
|
|
891
|
+
var gOPD = require_getOwnPropertyDescriptor();
|
|
892
|
+
var getPrototypeOf = Object.getPrototypeOf;
|
|
893
|
+
if (hasToStringTag && gOPD && getPrototypeOf) {
|
|
894
|
+
forEach(typedArrays, function(typedArray) {
|
|
895
|
+
if (typeof globalThis[typedArray] === "function") {
|
|
896
|
+
var arr = new globalThis[typedArray]();
|
|
897
|
+
if (!(Symbol.toStringTag in arr)) {
|
|
898
|
+
throw new EvalError("this engine has support for Symbol.toStringTag, but " + typedArray + " does not have the property! Please report this.");
|
|
899
|
+
}
|
|
900
|
+
var proto = getPrototypeOf(arr);
|
|
901
|
+
var descriptor = gOPD(proto, Symbol.toStringTag);
|
|
902
|
+
if (!descriptor) {
|
|
903
|
+
var superProto = getPrototypeOf(proto);
|
|
904
|
+
descriptor = gOPD(superProto, Symbol.toStringTag);
|
|
905
|
+
}
|
|
906
|
+
toStrTags[typedArray] = descriptor.get;
|
|
907
|
+
}
|
|
908
|
+
});
|
|
909
|
+
}
|
|
910
|
+
var tryTypedArrays = function tryAllTypedArrays(value) {
|
|
911
|
+
var foundName = false;
|
|
912
|
+
forEach(toStrTags, function(getter, typedArray) {
|
|
913
|
+
if (!foundName) {
|
|
914
|
+
try {
|
|
915
|
+
var name = getter.call(value);
|
|
916
|
+
if (name === typedArray) {
|
|
917
|
+
foundName = name;
|
|
918
|
+
}
|
|
919
|
+
} catch (e) {
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
});
|
|
923
|
+
return foundName;
|
|
924
|
+
};
|
|
925
|
+
var isTypedArray = require_is_typed_array();
|
|
926
|
+
module.exports = function whichTypedArray(value) {
|
|
927
|
+
if (!isTypedArray(value)) {
|
|
928
|
+
return false;
|
|
929
|
+
}
|
|
930
|
+
if (!hasToStringTag) {
|
|
931
|
+
return $slice($toString(value), 8, -1);
|
|
932
|
+
}
|
|
933
|
+
return tryTypedArrays(value);
|
|
934
|
+
};
|
|
935
|
+
}
|
|
936
|
+
});
|
|
937
|
+
|
|
938
|
+
// node_modules/util/support/types.js
|
|
939
|
+
var require_types = __commonJS({
|
|
940
|
+
"node_modules/util/support/types.js"(exports) {
|
|
941
|
+
init_polyfills();
|
|
942
|
+
"use strict";
|
|
943
|
+
var isArgumentsObject = require_is_arguments();
|
|
944
|
+
var isGeneratorFunction = require_is_generator_function();
|
|
945
|
+
var whichTypedArray = require_which_typed_array();
|
|
946
|
+
var isTypedArray = require_is_typed_array();
|
|
947
|
+
function uncurryThis(f) {
|
|
948
|
+
return f.call.bind(f);
|
|
949
|
+
}
|
|
950
|
+
var BigIntSupported = typeof BigInt !== "undefined";
|
|
951
|
+
var SymbolSupported = typeof Symbol !== "undefined";
|
|
952
|
+
var ObjectToString = uncurryThis(Object.prototype.toString);
|
|
953
|
+
var numberValue = uncurryThis(Number.prototype.valueOf);
|
|
954
|
+
var stringValue = uncurryThis(String.prototype.valueOf);
|
|
955
|
+
var booleanValue = uncurryThis(Boolean.prototype.valueOf);
|
|
956
|
+
if (BigIntSupported) {
|
|
957
|
+
bigIntValue = uncurryThis(BigInt.prototype.valueOf);
|
|
958
|
+
}
|
|
959
|
+
var bigIntValue;
|
|
960
|
+
if (SymbolSupported) {
|
|
961
|
+
symbolValue = uncurryThis(Symbol.prototype.valueOf);
|
|
962
|
+
}
|
|
963
|
+
var symbolValue;
|
|
964
|
+
function checkBoxedPrimitive(value, prototypeValueOf) {
|
|
965
|
+
if (typeof value !== "object") {
|
|
966
|
+
return false;
|
|
967
|
+
}
|
|
968
|
+
try {
|
|
969
|
+
prototypeValueOf(value);
|
|
970
|
+
return true;
|
|
971
|
+
} catch (e) {
|
|
972
|
+
return false;
|
|
973
|
+
}
|
|
974
|
+
}
|
|
975
|
+
exports.isArgumentsObject = isArgumentsObject;
|
|
976
|
+
exports.isGeneratorFunction = isGeneratorFunction;
|
|
977
|
+
exports.isTypedArray = isTypedArray;
|
|
978
|
+
function isPromise(input) {
|
|
979
|
+
return typeof Promise !== "undefined" && input instanceof Promise || input !== null && typeof input === "object" && typeof input.then === "function" && typeof input.catch === "function";
|
|
980
|
+
}
|
|
981
|
+
exports.isPromise = isPromise;
|
|
982
|
+
function isArrayBufferView(value) {
|
|
983
|
+
if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) {
|
|
984
|
+
return ArrayBuffer.isView(value);
|
|
985
|
+
}
|
|
986
|
+
return isTypedArray(value) || isDataView(value);
|
|
987
|
+
}
|
|
988
|
+
exports.isArrayBufferView = isArrayBufferView;
|
|
989
|
+
function isUint8Array(value) {
|
|
990
|
+
return whichTypedArray(value) === "Uint8Array";
|
|
991
|
+
}
|
|
992
|
+
exports.isUint8Array = isUint8Array;
|
|
993
|
+
function isUint8ClampedArray(value) {
|
|
994
|
+
return whichTypedArray(value) === "Uint8ClampedArray";
|
|
995
|
+
}
|
|
996
|
+
exports.isUint8ClampedArray = isUint8ClampedArray;
|
|
997
|
+
function isUint16Array(value) {
|
|
998
|
+
return whichTypedArray(value) === "Uint16Array";
|
|
999
|
+
}
|
|
1000
|
+
exports.isUint16Array = isUint16Array;
|
|
1001
|
+
function isUint32Array(value) {
|
|
1002
|
+
return whichTypedArray(value) === "Uint32Array";
|
|
1003
|
+
}
|
|
1004
|
+
exports.isUint32Array = isUint32Array;
|
|
1005
|
+
function isInt8Array(value) {
|
|
1006
|
+
return whichTypedArray(value) === "Int8Array";
|
|
1007
|
+
}
|
|
1008
|
+
exports.isInt8Array = isInt8Array;
|
|
1009
|
+
function isInt16Array(value) {
|
|
1010
|
+
return whichTypedArray(value) === "Int16Array";
|
|
1011
|
+
}
|
|
1012
|
+
exports.isInt16Array = isInt16Array;
|
|
1013
|
+
function isInt32Array(value) {
|
|
1014
|
+
return whichTypedArray(value) === "Int32Array";
|
|
1015
|
+
}
|
|
1016
|
+
exports.isInt32Array = isInt32Array;
|
|
1017
|
+
function isFloat32Array(value) {
|
|
1018
|
+
return whichTypedArray(value) === "Float32Array";
|
|
1019
|
+
}
|
|
1020
|
+
exports.isFloat32Array = isFloat32Array;
|
|
1021
|
+
function isFloat64Array(value) {
|
|
1022
|
+
return whichTypedArray(value) === "Float64Array";
|
|
1023
|
+
}
|
|
1024
|
+
exports.isFloat64Array = isFloat64Array;
|
|
1025
|
+
function isBigInt64Array(value) {
|
|
1026
|
+
return whichTypedArray(value) === "BigInt64Array";
|
|
1027
|
+
}
|
|
1028
|
+
exports.isBigInt64Array = isBigInt64Array;
|
|
1029
|
+
function isBigUint64Array(value) {
|
|
1030
|
+
return whichTypedArray(value) === "BigUint64Array";
|
|
1031
|
+
}
|
|
1032
|
+
exports.isBigUint64Array = isBigUint64Array;
|
|
1033
|
+
function isMapToString(value) {
|
|
1034
|
+
return ObjectToString(value) === "[object Map]";
|
|
1035
|
+
}
|
|
1036
|
+
isMapToString.working = typeof Map !== "undefined" && isMapToString(new Map());
|
|
1037
|
+
function isMap(value) {
|
|
1038
|
+
if (typeof Map === "undefined") {
|
|
1039
|
+
return false;
|
|
1040
|
+
}
|
|
1041
|
+
return isMapToString.working ? isMapToString(value) : value instanceof Map;
|
|
1042
|
+
}
|
|
1043
|
+
exports.isMap = isMap;
|
|
1044
|
+
function isSetToString(value) {
|
|
1045
|
+
return ObjectToString(value) === "[object Set]";
|
|
1046
|
+
}
|
|
1047
|
+
isSetToString.working = typeof Set !== "undefined" && isSetToString(new Set());
|
|
1048
|
+
function isSet(value) {
|
|
1049
|
+
if (typeof Set === "undefined") {
|
|
1050
|
+
return false;
|
|
1051
|
+
}
|
|
1052
|
+
return isSetToString.working ? isSetToString(value) : value instanceof Set;
|
|
1053
|
+
}
|
|
1054
|
+
exports.isSet = isSet;
|
|
1055
|
+
function isWeakMapToString(value) {
|
|
1056
|
+
return ObjectToString(value) === "[object WeakMap]";
|
|
1057
|
+
}
|
|
1058
|
+
isWeakMapToString.working = typeof WeakMap !== "undefined" && isWeakMapToString(new WeakMap());
|
|
1059
|
+
function isWeakMap(value) {
|
|
1060
|
+
if (typeof WeakMap === "undefined") {
|
|
1061
|
+
return false;
|
|
1062
|
+
}
|
|
1063
|
+
return isWeakMapToString.working ? isWeakMapToString(value) : value instanceof WeakMap;
|
|
1064
|
+
}
|
|
1065
|
+
exports.isWeakMap = isWeakMap;
|
|
1066
|
+
function isWeakSetToString(value) {
|
|
1067
|
+
return ObjectToString(value) === "[object WeakSet]";
|
|
1068
|
+
}
|
|
1069
|
+
isWeakSetToString.working = typeof WeakSet !== "undefined" && isWeakSetToString(new WeakSet());
|
|
1070
|
+
function isWeakSet(value) {
|
|
1071
|
+
return isWeakSetToString(value);
|
|
1072
|
+
}
|
|
1073
|
+
exports.isWeakSet = isWeakSet;
|
|
1074
|
+
function isArrayBufferToString(value) {
|
|
1075
|
+
return ObjectToString(value) === "[object ArrayBuffer]";
|
|
1076
|
+
}
|
|
1077
|
+
isArrayBufferToString.working = typeof ArrayBuffer !== "undefined" && isArrayBufferToString(new ArrayBuffer());
|
|
1078
|
+
function isArrayBuffer(value) {
|
|
1079
|
+
if (typeof ArrayBuffer === "undefined") {
|
|
1080
|
+
return false;
|
|
1081
|
+
}
|
|
1082
|
+
return isArrayBufferToString.working ? isArrayBufferToString(value) : value instanceof ArrayBuffer;
|
|
1083
|
+
}
|
|
1084
|
+
exports.isArrayBuffer = isArrayBuffer;
|
|
1085
|
+
function isDataViewToString(value) {
|
|
1086
|
+
return ObjectToString(value) === "[object DataView]";
|
|
1087
|
+
}
|
|
1088
|
+
isDataViewToString.working = typeof ArrayBuffer !== "undefined" && typeof DataView !== "undefined" && isDataViewToString(new DataView(new ArrayBuffer(1), 0, 1));
|
|
1089
|
+
function isDataView(value) {
|
|
1090
|
+
if (typeof DataView === "undefined") {
|
|
1091
|
+
return false;
|
|
1092
|
+
}
|
|
1093
|
+
return isDataViewToString.working ? isDataViewToString(value) : value instanceof DataView;
|
|
1094
|
+
}
|
|
1095
|
+
exports.isDataView = isDataView;
|
|
1096
|
+
var SharedArrayBufferCopy = typeof SharedArrayBuffer !== "undefined" ? SharedArrayBuffer : void 0;
|
|
1097
|
+
function isSharedArrayBufferToString(value) {
|
|
1098
|
+
return ObjectToString(value) === "[object SharedArrayBuffer]";
|
|
1099
|
+
}
|
|
1100
|
+
function isSharedArrayBuffer(value) {
|
|
1101
|
+
if (typeof SharedArrayBufferCopy === "undefined") {
|
|
1102
|
+
return false;
|
|
1103
|
+
}
|
|
1104
|
+
if (typeof isSharedArrayBufferToString.working === "undefined") {
|
|
1105
|
+
isSharedArrayBufferToString.working = isSharedArrayBufferToString(new SharedArrayBufferCopy());
|
|
1106
|
+
}
|
|
1107
|
+
return isSharedArrayBufferToString.working ? isSharedArrayBufferToString(value) : value instanceof SharedArrayBufferCopy;
|
|
1108
|
+
}
|
|
1109
|
+
exports.isSharedArrayBuffer = isSharedArrayBuffer;
|
|
1110
|
+
function isAsyncFunction(value) {
|
|
1111
|
+
return ObjectToString(value) === "[object AsyncFunction]";
|
|
1112
|
+
}
|
|
1113
|
+
exports.isAsyncFunction = isAsyncFunction;
|
|
1114
|
+
function isMapIterator(value) {
|
|
1115
|
+
return ObjectToString(value) === "[object Map Iterator]";
|
|
1116
|
+
}
|
|
1117
|
+
exports.isMapIterator = isMapIterator;
|
|
1118
|
+
function isSetIterator(value) {
|
|
1119
|
+
return ObjectToString(value) === "[object Set Iterator]";
|
|
1120
|
+
}
|
|
1121
|
+
exports.isSetIterator = isSetIterator;
|
|
1122
|
+
function isGeneratorObject(value) {
|
|
1123
|
+
return ObjectToString(value) === "[object Generator]";
|
|
1124
|
+
}
|
|
1125
|
+
exports.isGeneratorObject = isGeneratorObject;
|
|
1126
|
+
function isWebAssemblyCompiledModule(value) {
|
|
1127
|
+
return ObjectToString(value) === "[object WebAssembly.Module]";
|
|
1128
|
+
}
|
|
1129
|
+
exports.isWebAssemblyCompiledModule = isWebAssemblyCompiledModule;
|
|
1130
|
+
function isNumberObject(value) {
|
|
1131
|
+
return checkBoxedPrimitive(value, numberValue);
|
|
1132
|
+
}
|
|
1133
|
+
exports.isNumberObject = isNumberObject;
|
|
1134
|
+
function isStringObject(value) {
|
|
1135
|
+
return checkBoxedPrimitive(value, stringValue);
|
|
1136
|
+
}
|
|
1137
|
+
exports.isStringObject = isStringObject;
|
|
1138
|
+
function isBooleanObject(value) {
|
|
1139
|
+
return checkBoxedPrimitive(value, booleanValue);
|
|
1140
|
+
}
|
|
1141
|
+
exports.isBooleanObject = isBooleanObject;
|
|
1142
|
+
function isBigIntObject(value) {
|
|
1143
|
+
return BigIntSupported && checkBoxedPrimitive(value, bigIntValue);
|
|
1144
|
+
}
|
|
1145
|
+
exports.isBigIntObject = isBigIntObject;
|
|
1146
|
+
function isSymbolObject(value) {
|
|
1147
|
+
return SymbolSupported && checkBoxedPrimitive(value, symbolValue);
|
|
1148
|
+
}
|
|
1149
|
+
exports.isSymbolObject = isSymbolObject;
|
|
1150
|
+
function isBoxedPrimitive(value) {
|
|
1151
|
+
return isNumberObject(value) || isStringObject(value) || isBooleanObject(value) || isBigIntObject(value) || isSymbolObject(value);
|
|
1152
|
+
}
|
|
1153
|
+
exports.isBoxedPrimitive = isBoxedPrimitive;
|
|
1154
|
+
function isAnyArrayBuffer(value) {
|
|
1155
|
+
return typeof Uint8Array !== "undefined" && (isArrayBuffer(value) || isSharedArrayBuffer(value));
|
|
1156
|
+
}
|
|
1157
|
+
exports.isAnyArrayBuffer = isAnyArrayBuffer;
|
|
1158
|
+
["isProxy", "isExternal", "isModuleNamespaceObject"].forEach(function(method) {
|
|
1159
|
+
Object.defineProperty(exports, method, {
|
|
1160
|
+
enumerable: false,
|
|
1161
|
+
value: function() {
|
|
1162
|
+
throw new Error(method + " is not supported in userland");
|
|
1163
|
+
}
|
|
1164
|
+
});
|
|
1165
|
+
});
|
|
1166
|
+
}
|
|
1167
|
+
});
|
|
1168
|
+
|
|
1169
|
+
// node_modules/util/support/isBufferBrowser.js
|
|
1170
|
+
var require_isBufferBrowser = __commonJS({
|
|
1171
|
+
"node_modules/util/support/isBufferBrowser.js"(exports, module) {
|
|
1172
|
+
init_polyfills();
|
|
1173
|
+
module.exports = function isBuffer(arg) {
|
|
1174
|
+
return arg && typeof arg === "object" && typeof arg.copy === "function" && typeof arg.fill === "function" && typeof arg.readUInt8 === "function";
|
|
1175
|
+
};
|
|
1176
|
+
}
|
|
1177
|
+
});
|
|
1178
|
+
|
|
1179
|
+
// node_modules/inherits/inherits_browser.js
|
|
1180
|
+
var require_inherits_browser = __commonJS({
|
|
1181
|
+
"node_modules/inherits/inherits_browser.js"(exports, module) {
|
|
1182
|
+
init_polyfills();
|
|
1183
|
+
if (typeof Object.create === "function") {
|
|
1184
|
+
module.exports = function inherits(ctor, superCtor) {
|
|
1185
|
+
if (superCtor) {
|
|
1186
|
+
ctor.super_ = superCtor;
|
|
1187
|
+
ctor.prototype = Object.create(superCtor.prototype, {
|
|
1188
|
+
constructor: {
|
|
1189
|
+
value: ctor,
|
|
1190
|
+
enumerable: false,
|
|
1191
|
+
writable: true,
|
|
1192
|
+
configurable: true
|
|
1193
|
+
}
|
|
1194
|
+
});
|
|
1195
|
+
}
|
|
1196
|
+
};
|
|
1197
|
+
} else {
|
|
1198
|
+
module.exports = function inherits(ctor, superCtor) {
|
|
1199
|
+
if (superCtor) {
|
|
1200
|
+
ctor.super_ = superCtor;
|
|
1201
|
+
var TempCtor = function() {
|
|
1202
|
+
};
|
|
1203
|
+
TempCtor.prototype = superCtor.prototype;
|
|
1204
|
+
ctor.prototype = new TempCtor();
|
|
1205
|
+
ctor.prototype.constructor = ctor;
|
|
1206
|
+
}
|
|
1207
|
+
};
|
|
1208
|
+
}
|
|
1209
|
+
}
|
|
1210
|
+
});
|
|
1211
|
+
|
|
1212
|
+
// node_modules/util/util.js
|
|
1213
|
+
var require_util = __commonJS({
|
|
1214
|
+
"node_modules/util/util.js"(exports) {
|
|
1215
|
+
init_polyfills();
|
|
1216
|
+
var getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors || function getOwnPropertyDescriptors2(obj) {
|
|
1217
|
+
var keys = Object.keys(obj);
|
|
1218
|
+
var descriptors = {};
|
|
1219
|
+
for (var i = 0; i < keys.length; i++) {
|
|
1220
|
+
descriptors[keys[i]] = Object.getOwnPropertyDescriptor(obj, keys[i]);
|
|
1221
|
+
}
|
|
1222
|
+
return descriptors;
|
|
1223
|
+
};
|
|
1224
|
+
var formatRegExp = /%[sdj%]/g;
|
|
1225
|
+
exports.format = function(f) {
|
|
1226
|
+
if (!isString(f)) {
|
|
1227
|
+
var objects = [];
|
|
1228
|
+
for (var i = 0; i < arguments.length; i++) {
|
|
1229
|
+
objects.push(inspect(arguments[i]));
|
|
1230
|
+
}
|
|
1231
|
+
return objects.join(" ");
|
|
1232
|
+
}
|
|
1233
|
+
var i = 1;
|
|
1234
|
+
var args = arguments;
|
|
1235
|
+
var len = args.length;
|
|
1236
|
+
var str = String(f).replace(formatRegExp, function(x2) {
|
|
1237
|
+
if (x2 === "%%")
|
|
1238
|
+
return "%";
|
|
1239
|
+
if (i >= len)
|
|
1240
|
+
return x2;
|
|
1241
|
+
switch (x2) {
|
|
1242
|
+
case "%s":
|
|
1243
|
+
return String(args[i++]);
|
|
1244
|
+
case "%d":
|
|
1245
|
+
return Number(args[i++]);
|
|
1246
|
+
case "%j":
|
|
1247
|
+
try {
|
|
1248
|
+
return JSON.stringify(args[i++]);
|
|
1249
|
+
} catch (_) {
|
|
1250
|
+
return "[Circular]";
|
|
1251
|
+
}
|
|
1252
|
+
default:
|
|
1253
|
+
return x2;
|
|
1254
|
+
}
|
|
1255
|
+
});
|
|
1256
|
+
for (var x = args[i]; i < len; x = args[++i]) {
|
|
1257
|
+
if (isNull(x) || !isObject(x)) {
|
|
1258
|
+
str += " " + x;
|
|
1259
|
+
} else {
|
|
1260
|
+
str += " " + inspect(x);
|
|
1261
|
+
}
|
|
1262
|
+
}
|
|
1263
|
+
return str;
|
|
1264
|
+
};
|
|
1265
|
+
exports.deprecate = function(fn, msg) {
|
|
1266
|
+
if (typeof process !== "undefined" && process.noDeprecation === true) {
|
|
1267
|
+
return fn;
|
|
1268
|
+
}
|
|
1269
|
+
if (typeof process === "undefined") {
|
|
1270
|
+
return function() {
|
|
1271
|
+
return exports.deprecate(fn, msg).apply(this, arguments);
|
|
1272
|
+
};
|
|
1273
|
+
}
|
|
1274
|
+
var warned = false;
|
|
1275
|
+
function deprecated() {
|
|
1276
|
+
if (!warned) {
|
|
1277
|
+
if (process.throwDeprecation) {
|
|
1278
|
+
throw new Error(msg);
|
|
1279
|
+
} else if (process.traceDeprecation) {
|
|
1280
|
+
console.trace(msg);
|
|
1281
|
+
} else {
|
|
1282
|
+
console.error(msg);
|
|
1283
|
+
}
|
|
1284
|
+
warned = true;
|
|
1285
|
+
}
|
|
1286
|
+
return fn.apply(this, arguments);
|
|
1287
|
+
}
|
|
1288
|
+
return deprecated;
|
|
1289
|
+
};
|
|
1290
|
+
var debugs = {};
|
|
1291
|
+
var debugEnvRegex = /^$/;
|
|
1292
|
+
if (process.env.NODE_DEBUG) {
|
|
1293
|
+
debugEnv = process.env.NODE_DEBUG;
|
|
1294
|
+
debugEnv = debugEnv.replace(/[|\\{}()[\]^$+?.]/g, "\\$&").replace(/\*/g, ".*").replace(/,/g, "$|^").toUpperCase();
|
|
1295
|
+
debugEnvRegex = new RegExp("^" + debugEnv + "$", "i");
|
|
1296
|
+
}
|
|
1297
|
+
var debugEnv;
|
|
1298
|
+
exports.debuglog = function(set) {
|
|
1299
|
+
set = set.toUpperCase();
|
|
1300
|
+
if (!debugs[set]) {
|
|
1301
|
+
if (debugEnvRegex.test(set)) {
|
|
1302
|
+
var pid = process.pid;
|
|
1303
|
+
debugs[set] = function() {
|
|
1304
|
+
var msg = exports.format.apply(exports, arguments);
|
|
1305
|
+
console.error("%s %d: %s", set, pid, msg);
|
|
1306
|
+
};
|
|
1307
|
+
} else {
|
|
1308
|
+
debugs[set] = function() {
|
|
1309
|
+
};
|
|
1310
|
+
}
|
|
1311
|
+
}
|
|
1312
|
+
return debugs[set];
|
|
1313
|
+
};
|
|
1314
|
+
function inspect(obj, opts) {
|
|
1315
|
+
var ctx = {
|
|
1316
|
+
seen: [],
|
|
1317
|
+
stylize: stylizeNoColor
|
|
1318
|
+
};
|
|
1319
|
+
if (arguments.length >= 3)
|
|
1320
|
+
ctx.depth = arguments[2];
|
|
1321
|
+
if (arguments.length >= 4)
|
|
1322
|
+
ctx.colors = arguments[3];
|
|
1323
|
+
if (isBoolean(opts)) {
|
|
1324
|
+
ctx.showHidden = opts;
|
|
1325
|
+
} else if (opts) {
|
|
1326
|
+
exports._extend(ctx, opts);
|
|
1327
|
+
}
|
|
1328
|
+
if (isUndefined(ctx.showHidden))
|
|
1329
|
+
ctx.showHidden = false;
|
|
1330
|
+
if (isUndefined(ctx.depth))
|
|
1331
|
+
ctx.depth = 2;
|
|
1332
|
+
if (isUndefined(ctx.colors))
|
|
1333
|
+
ctx.colors = false;
|
|
1334
|
+
if (isUndefined(ctx.customInspect))
|
|
1335
|
+
ctx.customInspect = true;
|
|
1336
|
+
if (ctx.colors)
|
|
1337
|
+
ctx.stylize = stylizeWithColor;
|
|
1338
|
+
return formatValue(ctx, obj, ctx.depth);
|
|
1339
|
+
}
|
|
1340
|
+
exports.inspect = inspect;
|
|
1341
|
+
inspect.colors = {
|
|
1342
|
+
"bold": [1, 22],
|
|
1343
|
+
"italic": [3, 23],
|
|
1344
|
+
"underline": [4, 24],
|
|
1345
|
+
"inverse": [7, 27],
|
|
1346
|
+
"white": [37, 39],
|
|
1347
|
+
"grey": [90, 39],
|
|
1348
|
+
"black": [30, 39],
|
|
1349
|
+
"blue": [34, 39],
|
|
1350
|
+
"cyan": [36, 39],
|
|
1351
|
+
"green": [32, 39],
|
|
1352
|
+
"magenta": [35, 39],
|
|
1353
|
+
"red": [31, 39],
|
|
1354
|
+
"yellow": [33, 39]
|
|
1355
|
+
};
|
|
1356
|
+
inspect.styles = {
|
|
1357
|
+
"special": "cyan",
|
|
1358
|
+
"number": "yellow",
|
|
1359
|
+
"boolean": "yellow",
|
|
1360
|
+
"undefined": "grey",
|
|
1361
|
+
"null": "bold",
|
|
1362
|
+
"string": "green",
|
|
1363
|
+
"date": "magenta",
|
|
1364
|
+
"regexp": "red"
|
|
1365
|
+
};
|
|
1366
|
+
function stylizeWithColor(str, styleType) {
|
|
1367
|
+
var style = inspect.styles[styleType];
|
|
1368
|
+
if (style) {
|
|
1369
|
+
return "[" + inspect.colors[style][0] + "m" + str + "[" + inspect.colors[style][1] + "m";
|
|
1370
|
+
} else {
|
|
1371
|
+
return str;
|
|
1372
|
+
}
|
|
1373
|
+
}
|
|
1374
|
+
function stylizeNoColor(str, styleType) {
|
|
1375
|
+
return str;
|
|
1376
|
+
}
|
|
1377
|
+
function arrayToHash(array) {
|
|
1378
|
+
var hash = {};
|
|
1379
|
+
array.forEach(function(val, idx) {
|
|
1380
|
+
hash[val] = true;
|
|
1381
|
+
});
|
|
1382
|
+
return hash;
|
|
1383
|
+
}
|
|
1384
|
+
function formatValue(ctx, value, recurseTimes) {
|
|
1385
|
+
if (ctx.customInspect && value && isFunction(value.inspect) && value.inspect !== exports.inspect && !(value.constructor && value.constructor.prototype === value)) {
|
|
1386
|
+
var ret = value.inspect(recurseTimes, ctx);
|
|
1387
|
+
if (!isString(ret)) {
|
|
1388
|
+
ret = formatValue(ctx, ret, recurseTimes);
|
|
1389
|
+
}
|
|
1390
|
+
return ret;
|
|
1391
|
+
}
|
|
1392
|
+
var primitive = formatPrimitive(ctx, value);
|
|
1393
|
+
if (primitive) {
|
|
1394
|
+
return primitive;
|
|
1395
|
+
}
|
|
1396
|
+
var keys = Object.keys(value);
|
|
1397
|
+
var visibleKeys = arrayToHash(keys);
|
|
1398
|
+
if (ctx.showHidden) {
|
|
1399
|
+
keys = Object.getOwnPropertyNames(value);
|
|
1400
|
+
}
|
|
1401
|
+
if (isError(value) && (keys.indexOf("message") >= 0 || keys.indexOf("description") >= 0)) {
|
|
1402
|
+
return formatError(value);
|
|
1403
|
+
}
|
|
1404
|
+
if (keys.length === 0) {
|
|
1405
|
+
if (isFunction(value)) {
|
|
1406
|
+
var name = value.name ? ": " + value.name : "";
|
|
1407
|
+
return ctx.stylize("[Function" + name + "]", "special");
|
|
1408
|
+
}
|
|
1409
|
+
if (isRegExp(value)) {
|
|
1410
|
+
return ctx.stylize(RegExp.prototype.toString.call(value), "regexp");
|
|
1411
|
+
}
|
|
1412
|
+
if (isDate(value)) {
|
|
1413
|
+
return ctx.stylize(Date.prototype.toString.call(value), "date");
|
|
1414
|
+
}
|
|
1415
|
+
if (isError(value)) {
|
|
1416
|
+
return formatError(value);
|
|
1417
|
+
}
|
|
1418
|
+
}
|
|
1419
|
+
var base = "", array = false, braces = ["{", "}"];
|
|
1420
|
+
if (isArray(value)) {
|
|
1421
|
+
array = true;
|
|
1422
|
+
braces = ["[", "]"];
|
|
1423
|
+
}
|
|
1424
|
+
if (isFunction(value)) {
|
|
1425
|
+
var n = value.name ? ": " + value.name : "";
|
|
1426
|
+
base = " [Function" + n + "]";
|
|
1427
|
+
}
|
|
1428
|
+
if (isRegExp(value)) {
|
|
1429
|
+
base = " " + RegExp.prototype.toString.call(value);
|
|
1430
|
+
}
|
|
1431
|
+
if (isDate(value)) {
|
|
1432
|
+
base = " " + Date.prototype.toUTCString.call(value);
|
|
1433
|
+
}
|
|
1434
|
+
if (isError(value)) {
|
|
1435
|
+
base = " " + formatError(value);
|
|
1436
|
+
}
|
|
1437
|
+
if (keys.length === 0 && (!array || value.length == 0)) {
|
|
1438
|
+
return braces[0] + base + braces[1];
|
|
1439
|
+
}
|
|
1440
|
+
if (recurseTimes < 0) {
|
|
1441
|
+
if (isRegExp(value)) {
|
|
1442
|
+
return ctx.stylize(RegExp.prototype.toString.call(value), "regexp");
|
|
1443
|
+
} else {
|
|
1444
|
+
return ctx.stylize("[Object]", "special");
|
|
1445
|
+
}
|
|
1446
|
+
}
|
|
1447
|
+
ctx.seen.push(value);
|
|
1448
|
+
var output;
|
|
1449
|
+
if (array) {
|
|
1450
|
+
output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
|
|
1451
|
+
} else {
|
|
1452
|
+
output = keys.map(function(key) {
|
|
1453
|
+
return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
|
|
1454
|
+
});
|
|
1455
|
+
}
|
|
1456
|
+
ctx.seen.pop();
|
|
1457
|
+
return reduceToSingleString(output, base, braces);
|
|
1458
|
+
}
|
|
1459
|
+
function formatPrimitive(ctx, value) {
|
|
1460
|
+
if (isUndefined(value))
|
|
1461
|
+
return ctx.stylize("undefined", "undefined");
|
|
1462
|
+
if (isString(value)) {
|
|
1463
|
+
var simple = "'" + JSON.stringify(value).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'";
|
|
1464
|
+
return ctx.stylize(simple, "string");
|
|
1465
|
+
}
|
|
1466
|
+
if (isNumber(value))
|
|
1467
|
+
return ctx.stylize("" + value, "number");
|
|
1468
|
+
if (isBoolean(value))
|
|
1469
|
+
return ctx.stylize("" + value, "boolean");
|
|
1470
|
+
if (isNull(value))
|
|
1471
|
+
return ctx.stylize("null", "null");
|
|
1472
|
+
}
|
|
1473
|
+
function formatError(value) {
|
|
1474
|
+
return "[" + Error.prototype.toString.call(value) + "]";
|
|
1475
|
+
}
|
|
1476
|
+
function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
|
|
1477
|
+
var output = [];
|
|
1478
|
+
for (var i = 0, l = value.length; i < l; ++i) {
|
|
1479
|
+
if (hasOwnProperty(value, String(i))) {
|
|
1480
|
+
output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, String(i), true));
|
|
1481
|
+
} else {
|
|
1482
|
+
output.push("");
|
|
1483
|
+
}
|
|
1484
|
+
}
|
|
1485
|
+
keys.forEach(function(key) {
|
|
1486
|
+
if (!key.match(/^\d+$/)) {
|
|
1487
|
+
output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, key, true));
|
|
1488
|
+
}
|
|
1489
|
+
});
|
|
1490
|
+
return output;
|
|
1491
|
+
}
|
|
1492
|
+
function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
|
|
1493
|
+
var name, str, desc;
|
|
1494
|
+
desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };
|
|
1495
|
+
if (desc.get) {
|
|
1496
|
+
if (desc.set) {
|
|
1497
|
+
str = ctx.stylize("[Getter/Setter]", "special");
|
|
1498
|
+
} else {
|
|
1499
|
+
str = ctx.stylize("[Getter]", "special");
|
|
1500
|
+
}
|
|
1501
|
+
} else {
|
|
1502
|
+
if (desc.set) {
|
|
1503
|
+
str = ctx.stylize("[Setter]", "special");
|
|
1504
|
+
}
|
|
1505
|
+
}
|
|
1506
|
+
if (!hasOwnProperty(visibleKeys, key)) {
|
|
1507
|
+
name = "[" + key + "]";
|
|
1508
|
+
}
|
|
1509
|
+
if (!str) {
|
|
1510
|
+
if (ctx.seen.indexOf(desc.value) < 0) {
|
|
1511
|
+
if (isNull(recurseTimes)) {
|
|
1512
|
+
str = formatValue(ctx, desc.value, null);
|
|
1513
|
+
} else {
|
|
1514
|
+
str = formatValue(ctx, desc.value, recurseTimes - 1);
|
|
1515
|
+
}
|
|
1516
|
+
if (str.indexOf("\n") > -1) {
|
|
1517
|
+
if (array) {
|
|
1518
|
+
str = str.split("\n").map(function(line) {
|
|
1519
|
+
return " " + line;
|
|
1520
|
+
}).join("\n").substr(2);
|
|
1521
|
+
} else {
|
|
1522
|
+
str = "\n" + str.split("\n").map(function(line) {
|
|
1523
|
+
return " " + line;
|
|
1524
|
+
}).join("\n");
|
|
1525
|
+
}
|
|
1526
|
+
}
|
|
1527
|
+
} else {
|
|
1528
|
+
str = ctx.stylize("[Circular]", "special");
|
|
1529
|
+
}
|
|
1530
|
+
}
|
|
1531
|
+
if (isUndefined(name)) {
|
|
1532
|
+
if (array && key.match(/^\d+$/)) {
|
|
1533
|
+
return str;
|
|
1534
|
+
}
|
|
1535
|
+
name = JSON.stringify("" + key);
|
|
1536
|
+
if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
|
|
1537
|
+
name = name.substr(1, name.length - 2);
|
|
1538
|
+
name = ctx.stylize(name, "name");
|
|
1539
|
+
} else {
|
|
1540
|
+
name = name.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'");
|
|
1541
|
+
name = ctx.stylize(name, "string");
|
|
1542
|
+
}
|
|
1543
|
+
}
|
|
1544
|
+
return name + ": " + str;
|
|
1545
|
+
}
|
|
1546
|
+
function reduceToSingleString(output, base, braces) {
|
|
1547
|
+
var numLinesEst = 0;
|
|
1548
|
+
var length = output.reduce(function(prev, cur) {
|
|
1549
|
+
numLinesEst++;
|
|
1550
|
+
if (cur.indexOf("\n") >= 0)
|
|
1551
|
+
numLinesEst++;
|
|
1552
|
+
return prev + cur.replace(/\u001b\[\d\d?m/g, "").length + 1;
|
|
1553
|
+
}, 0);
|
|
1554
|
+
if (length > 60) {
|
|
1555
|
+
return braces[0] + (base === "" ? "" : base + "\n ") + " " + output.join(",\n ") + " " + braces[1];
|
|
1556
|
+
}
|
|
1557
|
+
return braces[0] + base + " " + output.join(", ") + " " + braces[1];
|
|
1558
|
+
}
|
|
1559
|
+
exports.types = require_types();
|
|
1560
|
+
function isArray(ar) {
|
|
1561
|
+
return Array.isArray(ar);
|
|
1562
|
+
}
|
|
1563
|
+
exports.isArray = isArray;
|
|
1564
|
+
function isBoolean(arg) {
|
|
1565
|
+
return typeof arg === "boolean";
|
|
1566
|
+
}
|
|
1567
|
+
exports.isBoolean = isBoolean;
|
|
1568
|
+
function isNull(arg) {
|
|
1569
|
+
return arg === null;
|
|
1570
|
+
}
|
|
1571
|
+
exports.isNull = isNull;
|
|
1572
|
+
function isNullOrUndefined(arg) {
|
|
1573
|
+
return arg == null;
|
|
1574
|
+
}
|
|
1575
|
+
exports.isNullOrUndefined = isNullOrUndefined;
|
|
1576
|
+
function isNumber(arg) {
|
|
1577
|
+
return typeof arg === "number";
|
|
1578
|
+
}
|
|
1579
|
+
exports.isNumber = isNumber;
|
|
1580
|
+
function isString(arg) {
|
|
1581
|
+
return typeof arg === "string";
|
|
1582
|
+
}
|
|
1583
|
+
exports.isString = isString;
|
|
1584
|
+
function isSymbol(arg) {
|
|
1585
|
+
return typeof arg === "symbol";
|
|
1586
|
+
}
|
|
1587
|
+
exports.isSymbol = isSymbol;
|
|
1588
|
+
function isUndefined(arg) {
|
|
1589
|
+
return arg === void 0;
|
|
1590
|
+
}
|
|
1591
|
+
exports.isUndefined = isUndefined;
|
|
1592
|
+
function isRegExp(re) {
|
|
1593
|
+
return isObject(re) && objectToString(re) === "[object RegExp]";
|
|
1594
|
+
}
|
|
1595
|
+
exports.isRegExp = isRegExp;
|
|
1596
|
+
exports.types.isRegExp = isRegExp;
|
|
1597
|
+
function isObject(arg) {
|
|
1598
|
+
return typeof arg === "object" && arg !== null;
|
|
1599
|
+
}
|
|
1600
|
+
exports.isObject = isObject;
|
|
1601
|
+
function isDate(d) {
|
|
1602
|
+
return isObject(d) && objectToString(d) === "[object Date]";
|
|
1603
|
+
}
|
|
1604
|
+
exports.isDate = isDate;
|
|
1605
|
+
exports.types.isDate = isDate;
|
|
1606
|
+
function isError(e) {
|
|
1607
|
+
return isObject(e) && (objectToString(e) === "[object Error]" || e instanceof Error);
|
|
1608
|
+
}
|
|
1609
|
+
exports.isError = isError;
|
|
1610
|
+
exports.types.isNativeError = isError;
|
|
1611
|
+
function isFunction(arg) {
|
|
1612
|
+
return typeof arg === "function";
|
|
1613
|
+
}
|
|
1614
|
+
exports.isFunction = isFunction;
|
|
1615
|
+
function isPrimitive(arg) {
|
|
1616
|
+
return arg === null || typeof arg === "boolean" || typeof arg === "number" || typeof arg === "string" || typeof arg === "symbol" || typeof arg === "undefined";
|
|
1617
|
+
}
|
|
1618
|
+
exports.isPrimitive = isPrimitive;
|
|
1619
|
+
exports.isBuffer = require_isBufferBrowser();
|
|
1620
|
+
function objectToString(o) {
|
|
1621
|
+
return Object.prototype.toString.call(o);
|
|
1622
|
+
}
|
|
1623
|
+
function pad(n) {
|
|
1624
|
+
return n < 10 ? "0" + n.toString(10) : n.toString(10);
|
|
1625
|
+
}
|
|
1626
|
+
var months = [
|
|
1627
|
+
"Jan",
|
|
1628
|
+
"Feb",
|
|
1629
|
+
"Mar",
|
|
1630
|
+
"Apr",
|
|
1631
|
+
"May",
|
|
1632
|
+
"Jun",
|
|
1633
|
+
"Jul",
|
|
1634
|
+
"Aug",
|
|
1635
|
+
"Sep",
|
|
1636
|
+
"Oct",
|
|
1637
|
+
"Nov",
|
|
1638
|
+
"Dec"
|
|
1639
|
+
];
|
|
1640
|
+
function timestamp() {
|
|
1641
|
+
var d = new Date();
|
|
1642
|
+
var time = [
|
|
1643
|
+
pad(d.getHours()),
|
|
1644
|
+
pad(d.getMinutes()),
|
|
1645
|
+
pad(d.getSeconds())
|
|
1646
|
+
].join(":");
|
|
1647
|
+
return [d.getDate(), months[d.getMonth()], time].join(" ");
|
|
1648
|
+
}
|
|
1649
|
+
exports.log = function() {
|
|
1650
|
+
console.log("%s - %s", timestamp(), exports.format.apply(exports, arguments));
|
|
1651
|
+
};
|
|
1652
|
+
exports.inherits = require_inherits_browser();
|
|
1653
|
+
exports._extend = function(origin, add) {
|
|
1654
|
+
if (!add || !isObject(add))
|
|
1655
|
+
return origin;
|
|
1656
|
+
var keys = Object.keys(add);
|
|
1657
|
+
var i = keys.length;
|
|
1658
|
+
while (i--) {
|
|
1659
|
+
origin[keys[i]] = add[keys[i]];
|
|
1660
|
+
}
|
|
1661
|
+
return origin;
|
|
1662
|
+
};
|
|
1663
|
+
function hasOwnProperty(obj, prop) {
|
|
1664
|
+
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
1665
|
+
}
|
|
1666
|
+
var kCustomPromisifiedSymbol = typeof Symbol !== "undefined" ? Symbol("util.promisify.custom") : void 0;
|
|
1667
|
+
exports.promisify = function promisify(original) {
|
|
1668
|
+
if (typeof original !== "function")
|
|
1669
|
+
throw new TypeError('The "original" argument must be of type Function');
|
|
1670
|
+
if (kCustomPromisifiedSymbol && original[kCustomPromisifiedSymbol]) {
|
|
1671
|
+
var fn = original[kCustomPromisifiedSymbol];
|
|
1672
|
+
if (typeof fn !== "function") {
|
|
1673
|
+
throw new TypeError('The "util.promisify.custom" argument must be of type Function');
|
|
1674
|
+
}
|
|
1675
|
+
Object.defineProperty(fn, kCustomPromisifiedSymbol, {
|
|
1676
|
+
value: fn,
|
|
1677
|
+
enumerable: false,
|
|
1678
|
+
writable: false,
|
|
1679
|
+
configurable: true
|
|
1680
|
+
});
|
|
1681
|
+
return fn;
|
|
1682
|
+
}
|
|
1683
|
+
function fn() {
|
|
1684
|
+
var promiseResolve, promiseReject;
|
|
1685
|
+
var promise = new Promise(function(resolve, reject) {
|
|
1686
|
+
promiseResolve = resolve;
|
|
1687
|
+
promiseReject = reject;
|
|
1688
|
+
});
|
|
1689
|
+
var args = [];
|
|
1690
|
+
for (var i = 0; i < arguments.length; i++) {
|
|
1691
|
+
args.push(arguments[i]);
|
|
1692
|
+
}
|
|
1693
|
+
args.push(function(err, value) {
|
|
1694
|
+
if (err) {
|
|
1695
|
+
promiseReject(err);
|
|
1696
|
+
} else {
|
|
1697
|
+
promiseResolve(value);
|
|
1698
|
+
}
|
|
1699
|
+
});
|
|
1700
|
+
try {
|
|
1701
|
+
original.apply(this, args);
|
|
1702
|
+
} catch (err) {
|
|
1703
|
+
promiseReject(err);
|
|
1704
|
+
}
|
|
1705
|
+
return promise;
|
|
1706
|
+
}
|
|
1707
|
+
Object.setPrototypeOf(fn, Object.getPrototypeOf(original));
|
|
1708
|
+
if (kCustomPromisifiedSymbol)
|
|
1709
|
+
Object.defineProperty(fn, kCustomPromisifiedSymbol, {
|
|
1710
|
+
value: fn,
|
|
1711
|
+
enumerable: false,
|
|
1712
|
+
writable: false,
|
|
1713
|
+
configurable: true
|
|
1714
|
+
});
|
|
1715
|
+
return Object.defineProperties(fn, getOwnPropertyDescriptors(original));
|
|
1716
|
+
};
|
|
1717
|
+
exports.promisify.custom = kCustomPromisifiedSymbol;
|
|
1718
|
+
function callbackifyOnRejected(reason, cb) {
|
|
1719
|
+
if (!reason) {
|
|
1720
|
+
var newReason = new Error("Promise was rejected with a falsy value");
|
|
1721
|
+
newReason.reason = reason;
|
|
1722
|
+
reason = newReason;
|
|
1723
|
+
}
|
|
1724
|
+
return cb(reason);
|
|
1725
|
+
}
|
|
1726
|
+
function callbackify(original) {
|
|
1727
|
+
if (typeof original !== "function") {
|
|
1728
|
+
throw new TypeError('The "original" argument must be of type Function');
|
|
1729
|
+
}
|
|
1730
|
+
function callbackified() {
|
|
1731
|
+
var args = [];
|
|
1732
|
+
for (var i = 0; i < arguments.length; i++) {
|
|
1733
|
+
args.push(arguments[i]);
|
|
1734
|
+
}
|
|
1735
|
+
var maybeCb = args.pop();
|
|
1736
|
+
if (typeof maybeCb !== "function") {
|
|
1737
|
+
throw new TypeError("The last argument must be of type Function");
|
|
1738
|
+
}
|
|
1739
|
+
var self = this;
|
|
1740
|
+
var cb = function() {
|
|
1741
|
+
return maybeCb.apply(self, arguments);
|
|
1742
|
+
};
|
|
1743
|
+
original.apply(this, args).then(function(ret) {
|
|
1744
|
+
process.nextTick(cb.bind(null, null, ret));
|
|
1745
|
+
}, function(rej) {
|
|
1746
|
+
process.nextTick(callbackifyOnRejected.bind(null, rej, cb));
|
|
1747
|
+
});
|
|
1748
|
+
}
|
|
1749
|
+
Object.setPrototypeOf(callbackified, Object.getPrototypeOf(original));
|
|
1750
|
+
Object.defineProperties(callbackified, getOwnPropertyDescriptors(original));
|
|
1751
|
+
return callbackified;
|
|
1752
|
+
}
|
|
1753
|
+
exports.callbackify = callbackify;
|
|
1754
|
+
}
|
|
1755
|
+
});
|
|
1756
|
+
|
|
1757
|
+
// polyfills.js
|
|
1758
|
+
var process, util;
|
|
1759
|
+
var init_polyfills = __esm({
|
|
1760
|
+
"polyfills.js"() {
|
|
1761
|
+
process = require_browser();
|
|
1762
|
+
util = require_util();
|
|
1763
|
+
}
|
|
1764
|
+
});
|
|
1765
|
+
|
|
1766
|
+
// injectables/click/click.ts
|
|
1767
|
+
init_polyfills();
|
|
1768
|
+
var IS_DEV = false;
|
|
1769
|
+
document.addEventListener("click", async (_event) => {
|
|
1770
|
+
if (IS_DEV)
|
|
1771
|
+
console.log("Empty Click Handler");
|
|
1772
|
+
}, true);
|
|
1773
|
+
})();
|
|
1774
|
+
//# sourceMappingURL=click.js.map
|