@kitware/vtk.js 25.8.4 → 25.8.6
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/Interaction/Manipulators/MouseRangeManipulator.js +6 -6
- package/Rendering/Core/Follower.js +1 -1
- package/Rendering/Core/Prop3D.js +6 -1
- package/Rendering/OpenGL/ShaderProgram.js +13 -20
- package/Widgets/Representations/WidgetRepresentation.js +23 -7
- package/Widgets/SVG/SVGLandmarkRepresentation.js +13 -1
- package/_vendor/available-typed-arrays/index.js_commonjs-proxy.js +1 -0
- package/_vendor/call-bind/callBound.js_commonjs-proxy.js +1 -0
- package/_vendor/call-bind/index.js_commonjs-module.js +3 -0
- package/_vendor/call-bind/index.js_commonjs-proxy.js +1 -0
- package/_vendor/deep-equal/node_modules/isarray/index.js_commonjs-proxy.js +1 -0
- package/_vendor/define-properties/index.js_commonjs-proxy.js +1 -0
- package/_vendor/es-abstract/helpers/getOwnPropertyDescriptor.js_commonjs-proxy.js +1 -0
- package/_vendor/es-get-iterator/index.js_commonjs-module.js +3 -0
- package/_vendor/es-get-iterator/index.js_commonjs-proxy.js +1 -0
- package/_vendor/es-get-iterator/node_modules/isarray/index.js_commonjs-proxy.js +1 -0
- package/_vendor/foreach/index.js_commonjs-proxy.js +1 -0
- package/_vendor/function-bind/implementation.js_commonjs-proxy.js +1 -0
- package/_vendor/function-bind/index.js_commonjs-proxy.js +1 -0
- package/_vendor/get-intrinsic/index.js_commonjs-proxy.js +1 -0
- package/_vendor/has/src/index.js_commonjs-proxy.js +1 -0
- package/_vendor/has-bigints/index.js_commonjs-proxy.js +1 -0
- package/_vendor/has-symbols/index.js_commonjs-proxy.js +1 -0
- package/_vendor/has-symbols/shams.js_commonjs-proxy.js +1 -0
- package/_vendor/has-tostringtag/shams.js_commonjs-proxy.js +1 -0
- package/_vendor/is-arguments/index.js_commonjs-proxy.js +1 -0
- package/_vendor/is-bigint/index.js_commonjs-module.js +3 -0
- package/_vendor/is-bigint/index.js_commonjs-proxy.js +1 -0
- package/_vendor/is-boolean-object/index.js_commonjs-proxy.js +1 -0
- package/_vendor/is-date-object/index.js_commonjs-proxy.js +1 -0
- package/_vendor/is-map/index.js_commonjs-proxy.js +1 -0
- package/_vendor/is-number-object/index.js_commonjs-proxy.js +1 -0
- package/_vendor/is-regex/index.js_commonjs-proxy.js +1 -0
- package/_vendor/is-set/index.js_commonjs-proxy.js +1 -0
- package/_vendor/is-string/index.js_commonjs-proxy.js +1 -0
- package/_vendor/is-symbol/index.js_commonjs-module.js +3 -0
- package/_vendor/is-symbol/index.js_commonjs-proxy.js +1 -0
- package/_vendor/is-typed-array/index.js_commonjs-proxy.js +1 -0
- package/_vendor/is-weakmap/index.js_commonjs-proxy.js +1 -0
- package/_vendor/is-weakset/index.js_commonjs-proxy.js +1 -0
- package/_vendor/object-inspect/index.js_commonjs-proxy.js +1 -0
- package/_vendor/object-is/implementation.js_commonjs-proxy.js +1 -0
- package/_vendor/object-is/index.js_commonjs-proxy.js +1 -0
- package/_vendor/object-is/polyfill.js_commonjs-proxy.js +1 -0
- package/_vendor/object-is/shim.js_commonjs-proxy.js +1 -0
- package/_vendor/object-keys/implementation.js_commonjs-proxy.js +1 -0
- package/_vendor/object-keys/index.js_commonjs-proxy.js +1 -0
- package/_vendor/object-keys/isArguments.js_commonjs-proxy.js +1 -0
- package/_vendor/object.assign/implementation.js_commonjs-proxy.js +1 -0
- package/_vendor/object.assign/index.js_commonjs-proxy.js +1 -0
- package/_vendor/object.assign/polyfill.js_commonjs-proxy.js +1 -0
- package/_vendor/object.assign/shim.js_commonjs-proxy.js +2 -0
- package/_vendor/regexp.prototype.flags/implementation.js_commonjs-proxy.js +1 -0
- package/_vendor/regexp.prototype.flags/index.js_commonjs-proxy.js +1 -0
- package/_vendor/regexp.prototype.flags/polyfill.js_commonjs-proxy.js +1 -0
- package/_vendor/regexp.prototype.flags/shim.js_commonjs-proxy.js +1 -0
- package/_vendor/side-channel/index.js_commonjs-proxy.js +1 -0
- package/_vendor/which-boxed-primitive/index.js_commonjs-proxy.js +5 -0
- package/_vendor/which-collection/index.js_commonjs-proxy.js +4 -0
- package/_vendor/which-typed-array/index.js_commonjs-proxy.js +1 -0
- package/_virtual/_node-resolve_empty.js_commonjs-proxy.js +6 -0
- package/_virtual/commonjsHelpers.js +18 -0
- package/_virtual/node-resolve_empty.js +8 -0
- package/_virtual/polyfill-node.global.js +5 -0
- package/_virtual/polyfill-node.process.js +225 -0
- package/macros.d.ts +5 -3
- package/macros.js +28 -3
- package/package.json +1 -1
- package/vendor/available-typed-arrays/index.js +29 -0
- package/vendor/call-bind/callBound.js +19 -0
- package/vendor/call-bind/index.js +52 -0
- package/vendor/deep-equal/index.js +379 -0
- package/vendor/deep-equal/node_modules/isarray/index.js +7 -0
- package/vendor/define-properties/index.js +60 -0
- package/vendor/es-abstract/helpers/getOwnPropertyDescriptor.js +17 -0
- package/vendor/es-get-iterator/index.js +217 -0
- package/vendor/es-get-iterator/node_modules/isarray/index.js +7 -0
- package/vendor/foreach/index.js +22 -0
- package/vendor/function-bind/implementation.js +52 -0
- package/vendor/function-bind/index.js +7 -0
- package/vendor/get-intrinsic/index.js +334 -0
- package/vendor/has/src/index.js +7 -0
- package/vendor/has-bigints/index.js +12 -0
- package/vendor/has-symbols/index.js +15 -0
- package/vendor/has-symbols/shams.js +42 -0
- package/vendor/has-tostringtag/shams.js +9 -0
- package/vendor/is-arguments/index.js +36 -0
- package/vendor/is-bigint/index.js +39 -0
- package/vendor/is-boolean-object/index.js +29 -0
- package/vendor/is-date-object/index.js +22 -0
- package/vendor/is-map/index.js +42 -0
- package/vendor/is-number-object/index.js +26 -0
- package/vendor/is-regex/index.js +61 -0
- package/vendor/is-set/index.js +42 -0
- package/vendor/is-string/index.js +26 -0
- package/vendor/is-symbol/index.js +36 -0
- package/vendor/is-typed-array/index.js +67 -0
- package/vendor/is-weakmap/index.js +42 -0
- package/vendor/is-weakset/index.js +42 -0
- package/vendor/object-inspect/index.js +515 -0
- package/vendor/object-is/implementation.js +18 -0
- package/vendor/object-is/index.js +25 -0
- package/vendor/object-is/polyfill.js +9 -0
- package/vendor/object-is/shim.js +17 -0
- package/vendor/object-keys/implementation.js +124 -0
- package/vendor/object-keys/index.js +35 -0
- package/vendor/object-keys/isArguments.js +17 -0
- package/vendor/object.assign/implementation.js +46 -0
- package/vendor/object.assign/index.js +29 -0
- package/vendor/object.assign/polyfill.js +57 -0
- package/vendor/object.assign/shim.js +17 -0
- package/vendor/regexp.prototype.flags/implementation.js +30 -0
- package/vendor/regexp.prototype.flags/index.js +25 -0
- package/vendor/regexp.prototype.flags/polyfill.js +23 -0
- package/vendor/regexp.prototype.flags/shim.js +29 -0
- package/vendor/side-channel/index.js +128 -0
- package/vendor/which-boxed-primitive/index.js +38 -0
- package/vendor/which-collection/index.js +29 -0
- package/vendor/which-typed-array/index.js +63 -0
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
import { g as global } from './polyfill-node.global.js';
|
|
2
|
+
|
|
3
|
+
// shim for using process in browser
|
|
4
|
+
// based off https://github.com/defunctzombie/node-process/blob/master/browser.js
|
|
5
|
+
|
|
6
|
+
function defaultSetTimout() {
|
|
7
|
+
throw new Error('setTimeout has not been defined');
|
|
8
|
+
}
|
|
9
|
+
function defaultClearTimeout () {
|
|
10
|
+
throw new Error('clearTimeout has not been defined');
|
|
11
|
+
}
|
|
12
|
+
var cachedSetTimeout = defaultSetTimout;
|
|
13
|
+
var cachedClearTimeout = defaultClearTimeout;
|
|
14
|
+
if (typeof global.setTimeout === 'function') {
|
|
15
|
+
cachedSetTimeout = setTimeout;
|
|
16
|
+
}
|
|
17
|
+
if (typeof global.clearTimeout === 'function') {
|
|
18
|
+
cachedClearTimeout = clearTimeout;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function runTimeout(fun) {
|
|
22
|
+
if (cachedSetTimeout === setTimeout) {
|
|
23
|
+
//normal enviroments in sane situations
|
|
24
|
+
return setTimeout(fun, 0);
|
|
25
|
+
}
|
|
26
|
+
// if setTimeout wasn't available but was latter defined
|
|
27
|
+
if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
|
|
28
|
+
cachedSetTimeout = setTimeout;
|
|
29
|
+
return setTimeout(fun, 0);
|
|
30
|
+
}
|
|
31
|
+
try {
|
|
32
|
+
// when when somebody has screwed with setTimeout but no I.E. maddness
|
|
33
|
+
return cachedSetTimeout(fun, 0);
|
|
34
|
+
} catch(e){
|
|
35
|
+
try {
|
|
36
|
+
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
|
|
37
|
+
return cachedSetTimeout.call(null, fun, 0);
|
|
38
|
+
} catch(e){
|
|
39
|
+
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
|
|
40
|
+
return cachedSetTimeout.call(this, fun, 0);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
}
|
|
46
|
+
function runClearTimeout(marker) {
|
|
47
|
+
if (cachedClearTimeout === clearTimeout) {
|
|
48
|
+
//normal enviroments in sane situations
|
|
49
|
+
return clearTimeout(marker);
|
|
50
|
+
}
|
|
51
|
+
// if clearTimeout wasn't available but was latter defined
|
|
52
|
+
if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
|
|
53
|
+
cachedClearTimeout = clearTimeout;
|
|
54
|
+
return clearTimeout(marker);
|
|
55
|
+
}
|
|
56
|
+
try {
|
|
57
|
+
// when when somebody has screwed with setTimeout but no I.E. maddness
|
|
58
|
+
return cachedClearTimeout(marker);
|
|
59
|
+
} catch (e){
|
|
60
|
+
try {
|
|
61
|
+
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
|
|
62
|
+
return cachedClearTimeout.call(null, marker);
|
|
63
|
+
} catch (e){
|
|
64
|
+
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
|
|
65
|
+
// Some versions of I.E. have different rules for clearTimeout vs setTimeout
|
|
66
|
+
return cachedClearTimeout.call(this, marker);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
}
|
|
73
|
+
var queue = [];
|
|
74
|
+
var draining = false;
|
|
75
|
+
var currentQueue;
|
|
76
|
+
var queueIndex = -1;
|
|
77
|
+
|
|
78
|
+
function cleanUpNextTick() {
|
|
79
|
+
if (!draining || !currentQueue) {
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
draining = false;
|
|
83
|
+
if (currentQueue.length) {
|
|
84
|
+
queue = currentQueue.concat(queue);
|
|
85
|
+
} else {
|
|
86
|
+
queueIndex = -1;
|
|
87
|
+
}
|
|
88
|
+
if (queue.length) {
|
|
89
|
+
drainQueue();
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function drainQueue() {
|
|
94
|
+
if (draining) {
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
var timeout = runTimeout(cleanUpNextTick);
|
|
98
|
+
draining = true;
|
|
99
|
+
|
|
100
|
+
var len = queue.length;
|
|
101
|
+
while(len) {
|
|
102
|
+
currentQueue = queue;
|
|
103
|
+
queue = [];
|
|
104
|
+
while (++queueIndex < len) {
|
|
105
|
+
if (currentQueue) {
|
|
106
|
+
currentQueue[queueIndex].run();
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
queueIndex = -1;
|
|
110
|
+
len = queue.length;
|
|
111
|
+
}
|
|
112
|
+
currentQueue = null;
|
|
113
|
+
draining = false;
|
|
114
|
+
runClearTimeout(timeout);
|
|
115
|
+
}
|
|
116
|
+
function nextTick(fun) {
|
|
117
|
+
var args = new Array(arguments.length - 1);
|
|
118
|
+
if (arguments.length > 1) {
|
|
119
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
120
|
+
args[i - 1] = arguments[i];
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
queue.push(new Item(fun, args));
|
|
124
|
+
if (queue.length === 1 && !draining) {
|
|
125
|
+
runTimeout(drainQueue);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
// v8 likes predictible objects
|
|
129
|
+
function Item(fun, array) {
|
|
130
|
+
this.fun = fun;
|
|
131
|
+
this.array = array;
|
|
132
|
+
}
|
|
133
|
+
Item.prototype.run = function () {
|
|
134
|
+
this.fun.apply(null, this.array);
|
|
135
|
+
};
|
|
136
|
+
var title = 'browser';
|
|
137
|
+
var platform = 'browser';
|
|
138
|
+
var browser = true;
|
|
139
|
+
var env = {};
|
|
140
|
+
var argv = [];
|
|
141
|
+
var version = ''; // empty string to avoid regexp issues
|
|
142
|
+
var versions = {};
|
|
143
|
+
var release = {};
|
|
144
|
+
var config = {};
|
|
145
|
+
|
|
146
|
+
function noop() {}
|
|
147
|
+
|
|
148
|
+
var on = noop;
|
|
149
|
+
var addListener = noop;
|
|
150
|
+
var once = noop;
|
|
151
|
+
var off = noop;
|
|
152
|
+
var removeListener = noop;
|
|
153
|
+
var removeAllListeners = noop;
|
|
154
|
+
var emit = noop;
|
|
155
|
+
|
|
156
|
+
function binding(name) {
|
|
157
|
+
throw new Error('process.binding is not supported');
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
function cwd () { return '/' }
|
|
161
|
+
function chdir (dir) {
|
|
162
|
+
throw new Error('process.chdir is not supported');
|
|
163
|
+
}function umask() { return 0; }
|
|
164
|
+
|
|
165
|
+
// from https://github.com/kumavis/browser-process-hrtime/blob/master/index.js
|
|
166
|
+
var performance = global.performance || {};
|
|
167
|
+
var performanceNow =
|
|
168
|
+
performance.now ||
|
|
169
|
+
performance.mozNow ||
|
|
170
|
+
performance.msNow ||
|
|
171
|
+
performance.oNow ||
|
|
172
|
+
performance.webkitNow ||
|
|
173
|
+
function(){ return (new Date()).getTime() };
|
|
174
|
+
|
|
175
|
+
// generate timestamp or delta
|
|
176
|
+
// see http://nodejs.org/api/process.html#process_process_hrtime
|
|
177
|
+
function hrtime(previousTimestamp){
|
|
178
|
+
var clocktime = performanceNow.call(performance)*1e-3;
|
|
179
|
+
var seconds = Math.floor(clocktime);
|
|
180
|
+
var nanoseconds = Math.floor((clocktime%1)*1e9);
|
|
181
|
+
if (previousTimestamp) {
|
|
182
|
+
seconds = seconds - previousTimestamp[0];
|
|
183
|
+
nanoseconds = nanoseconds - previousTimestamp[1];
|
|
184
|
+
if (nanoseconds<0) {
|
|
185
|
+
seconds--;
|
|
186
|
+
nanoseconds += 1e9;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
return [seconds,nanoseconds]
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
var startTime = new Date();
|
|
193
|
+
function uptime() {
|
|
194
|
+
var currentTime = new Date();
|
|
195
|
+
var dif = currentTime - startTime;
|
|
196
|
+
return dif / 1000;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
var browser$1 = {
|
|
200
|
+
nextTick: nextTick,
|
|
201
|
+
title: title,
|
|
202
|
+
browser: browser,
|
|
203
|
+
env: env,
|
|
204
|
+
argv: argv,
|
|
205
|
+
version: version,
|
|
206
|
+
versions: versions,
|
|
207
|
+
on: on,
|
|
208
|
+
addListener: addListener,
|
|
209
|
+
once: once,
|
|
210
|
+
off: off,
|
|
211
|
+
removeListener: removeListener,
|
|
212
|
+
removeAllListeners: removeAllListeners,
|
|
213
|
+
emit: emit,
|
|
214
|
+
binding: binding,
|
|
215
|
+
cwd: cwd,
|
|
216
|
+
chdir: chdir,
|
|
217
|
+
umask: umask,
|
|
218
|
+
hrtime: hrtime,
|
|
219
|
+
platform: platform,
|
|
220
|
+
release: release,
|
|
221
|
+
config: config,
|
|
222
|
+
uptime: uptime
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
export { browser$1 as b };
|
package/macros.d.ts
CHANGED
|
@@ -172,17 +172,19 @@ export function get(publicAPI: object, model: object, fieldNames: Array<string>)
|
|
|
172
172
|
* @param publicAPI object on which public methods get attached to
|
|
173
173
|
* @param model object on which protected fields are stored
|
|
174
174
|
* @param fieldNames list of fields available in model that we want to expose as set{FieldName} methods on the publicAPI
|
|
175
|
+
* * Can be a string (the name of the field to expose) or an object (e.g. {type:enum, name: {FieldName}, enum: FieldEnum}).
|
|
175
176
|
*/
|
|
176
|
-
export function set(publicAPI: object, model: object, fields: Array<string>): void;
|
|
177
|
+
export function set(publicAPI: object, model: object, fields: Array<string|object>): void;
|
|
177
178
|
|
|
178
179
|
/**
|
|
179
180
|
* Add setter+getter methods to the provided publicAPI
|
|
180
181
|
*
|
|
181
182
|
* @param publicAPI object on which public methods get attached to
|
|
182
183
|
* @param model object on which protected fields are stored
|
|
183
|
-
* @param fieldNames list of fields available in model that we want to expose as set{FieldName}+get{FieldName} methods on the publicAPI
|
|
184
|
+
* @param fieldNames list of fields available in model that we want to expose as set{FieldName}+get{FieldName} methods on the publicAPI.
|
|
185
|
+
* Can be a string (the name of the field to expose) or an object (e.g. {type:enum, name: {FieldName}, enum: FieldEnum}).
|
|
184
186
|
*/
|
|
185
|
-
export function setGet(publicAPI: object, model: object, fields: Array<string>): void;
|
|
187
|
+
export function setGet(publicAPI: object, model: object, fields: Array<string|object>): void;
|
|
186
188
|
|
|
187
189
|
/**
|
|
188
190
|
* Add getter methods to the provided publicAPI for arrays.
|
package/macros.js
CHANGED
|
@@ -3,6 +3,7 @@ import _typeof from '@babel/runtime/helpers/typeof';
|
|
|
3
3
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
4
4
|
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
5
5
|
import _construct from '@babel/runtime/helpers/construct';
|
|
6
|
+
import { d as deepEqual } from './vendor/deep-equal/index.js';
|
|
6
7
|
import vtk, { vtkGlobal } from './vtk.js';
|
|
7
8
|
import ClassHierarchy from './Common/Core/ClassHierarchy.js';
|
|
8
9
|
|
|
@@ -437,12 +438,25 @@ function obj() {
|
|
|
437
438
|
// getXXX: add getters
|
|
438
439
|
// ----------------------------------------------------------------------------
|
|
439
440
|
|
|
441
|
+
var objectGetterMap = {
|
|
442
|
+
object: function object(publicAPI, model, field) {
|
|
443
|
+
return function getter() {
|
|
444
|
+
return _objectSpread({}, model[field.name]);
|
|
445
|
+
};
|
|
446
|
+
}
|
|
447
|
+
};
|
|
440
448
|
function get(publicAPI, model, fieldNames) {
|
|
441
449
|
fieldNames.forEach(function (field) {
|
|
442
450
|
if (_typeof(field) === 'object') {
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
451
|
+
var getter = objectGetterMap[field.type];
|
|
452
|
+
|
|
453
|
+
if (getter) {
|
|
454
|
+
publicAPI["get".concat(_capitalize(field.name))] = getter(publicAPI, model, field);
|
|
455
|
+
} else {
|
|
456
|
+
publicAPI["get".concat(_capitalize(field.name))] = function () {
|
|
457
|
+
return model[field.name];
|
|
458
|
+
};
|
|
459
|
+
}
|
|
446
460
|
} else {
|
|
447
461
|
publicAPI["get".concat(_capitalize(field))] = function () {
|
|
448
462
|
return model[field];
|
|
@@ -491,6 +505,17 @@ var objectSetterMap = {
|
|
|
491
505
|
vtkErrorMacro("Set Enum with invalid argument (String/Number) ".concat(field, ", ").concat(value));
|
|
492
506
|
throw new TypeError('Set Enum with invalid argument (String/Number)');
|
|
493
507
|
};
|
|
508
|
+
},
|
|
509
|
+
object: function object(publicAPI, model, field) {
|
|
510
|
+
return function (value) {
|
|
511
|
+
if (!deepEqual(model[field.name], value)) {
|
|
512
|
+
model[field.name] = value;
|
|
513
|
+
publicAPI.modified();
|
|
514
|
+
return true;
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
return false;
|
|
518
|
+
};
|
|
494
519
|
}
|
|
495
520
|
};
|
|
496
521
|
|
package/package.json
CHANGED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { c as commonjsGlobal } from '../../_virtual/commonjsHelpers.js';
|
|
2
|
+
|
|
3
|
+
var possibleNames = [
|
|
4
|
+
'BigInt64Array',
|
|
5
|
+
'BigUint64Array',
|
|
6
|
+
'Float32Array',
|
|
7
|
+
'Float64Array',
|
|
8
|
+
'Int16Array',
|
|
9
|
+
'Int32Array',
|
|
10
|
+
'Int8Array',
|
|
11
|
+
'Uint16Array',
|
|
12
|
+
'Uint32Array',
|
|
13
|
+
'Uint8Array',
|
|
14
|
+
'Uint8ClampedArray'
|
|
15
|
+
];
|
|
16
|
+
|
|
17
|
+
var g = typeof globalThis === 'undefined' ? commonjsGlobal : globalThis;
|
|
18
|
+
|
|
19
|
+
var availableTypedArrays = function availableTypedArrays() {
|
|
20
|
+
var out = [];
|
|
21
|
+
for (var i = 0; i < possibleNames.length; i++) {
|
|
22
|
+
if (typeof g[possibleNames[i]] === 'function') {
|
|
23
|
+
out[out.length] = possibleNames[i];
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
return out;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export { availableTypedArrays as a };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { g as getIntrinsic } from '../get-intrinsic/index.js';
|
|
2
|
+
import './index.js';
|
|
3
|
+
import { c as callBind$1 } from '../../_vendor/call-bind/index.js_commonjs-module.js';
|
|
4
|
+
|
|
5
|
+
var GetIntrinsic = getIntrinsic;
|
|
6
|
+
|
|
7
|
+
var callBind = callBind$1.exports;
|
|
8
|
+
|
|
9
|
+
var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));
|
|
10
|
+
|
|
11
|
+
var callBound = function callBoundIntrinsic(name, allowMissing) {
|
|
12
|
+
var intrinsic = GetIntrinsic(name, !!allowMissing);
|
|
13
|
+
if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
|
|
14
|
+
return callBind(intrinsic);
|
|
15
|
+
}
|
|
16
|
+
return intrinsic;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export { callBound as c };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { c as callBind } from '../../_vendor/call-bind/index.js_commonjs-module.js';
|
|
2
|
+
import { f as functionBind } from '../function-bind/index.js';
|
|
3
|
+
import { g as getIntrinsic } from '../get-intrinsic/index.js';
|
|
4
|
+
|
|
5
|
+
(function (module) {
|
|
6
|
+
|
|
7
|
+
var bind = functionBind;
|
|
8
|
+
var GetIntrinsic = getIntrinsic;
|
|
9
|
+
|
|
10
|
+
var $apply = GetIntrinsic('%Function.prototype.apply%');
|
|
11
|
+
var $call = GetIntrinsic('%Function.prototype.call%');
|
|
12
|
+
var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);
|
|
13
|
+
|
|
14
|
+
var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);
|
|
15
|
+
var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
|
|
16
|
+
var $max = GetIntrinsic('%Math.max%');
|
|
17
|
+
|
|
18
|
+
if ($defineProperty) {
|
|
19
|
+
try {
|
|
20
|
+
$defineProperty({}, 'a', { value: 1 });
|
|
21
|
+
} catch (e) {
|
|
22
|
+
// IE 8 has a broken defineProperty
|
|
23
|
+
$defineProperty = null;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
module.exports = function callBind(originalFunction) {
|
|
28
|
+
var func = $reflectApply(bind, $call, arguments);
|
|
29
|
+
if ($gOPD && $defineProperty) {
|
|
30
|
+
var desc = $gOPD(func, 'length');
|
|
31
|
+
if (desc.configurable) {
|
|
32
|
+
// original length, plus the receiver, minus any additional arguments (after the receiver)
|
|
33
|
+
$defineProperty(
|
|
34
|
+
func,
|
|
35
|
+
'length',
|
|
36
|
+
{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return func;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
var applyBind = function applyBind() {
|
|
44
|
+
return $reflectApply(bind, $apply, arguments);
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
if ($defineProperty) {
|
|
48
|
+
$defineProperty(module.exports, 'apply', { value: applyBind });
|
|
49
|
+
} else {
|
|
50
|
+
module.exports.apply = applyBind;
|
|
51
|
+
}
|
|
52
|
+
}(callBind));
|