@kitware/vtk.js 25.9.1 → 26.0.0-beta.1
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/Common/Core/CellArray.d.ts +0 -6
- package/Common/Core/CellArray.js +21 -12
- package/Common/Core/ClassHierarchy.js +11 -6
- package/Common/Core/DataArray.d.ts +20 -0
- package/Common/Core/DataArray.js +21 -4
- package/Proxy/Core/ViewProxy.js +17 -9
- package/Rendering/Core/Prop3D.js +1 -6
- package/Rendering/Core/RenderWindow.js +9 -6
- package/Rendering/Core/VolumeProperty.js +2 -3
- package/Rendering/Misc/CanvasView.js +6 -5
- package/Rendering/Misc/GenericRenderWindow.js +12 -7
- package/Rendering/OpenGL/Actor.js +4 -4
- package/Rendering/OpenGL/Actor2D.js +4 -4
- package/Rendering/OpenGL/Camera.js +7 -4
- package/Rendering/OpenGL/CubeAxesActor.js +7 -5
- package/Rendering/OpenGL/ForwardPass.js +1 -1
- package/Rendering/OpenGL/Glyph3DMapper.js +4 -4
- package/Rendering/OpenGL/ImageMapper.js +9 -5
- package/Rendering/OpenGL/ImageSlice.js +3 -3
- package/Rendering/OpenGL/PixelSpaceCallbackMapper.js +9 -5
- package/Rendering/OpenGL/PolyDataMapper.js +22 -14
- package/Rendering/OpenGL/PolyDataMapper2D.js +17 -10
- package/Rendering/OpenGL/ScalarBarActor.js +6 -4
- package/Rendering/OpenGL/Skybox.js +10 -6
- package/Rendering/OpenGL/Texture.js +6 -5
- package/Rendering/OpenGL/Volume.js +2 -2
- package/Rendering/OpenGL/VolumeMapper.js +11 -11
- package/Rendering/OpenGL/glsl/vtkVolumeFS.glsl.js +1 -1
- package/Rendering/SceneGraph/RenderPass.js +3 -2
- package/Rendering/WebGPU/ForwardPass.js +1 -1
- package/Rendering/WebGPU/HardwareSelectionPass.js +1 -1
- package/Rendering/WebGPU/HardwareSelector.js +14 -13
- package/Rendering/WebGPU/OpaquePass.js +1 -1
- package/Rendering/WebGPU/OrderIndependentTranslucentPass.js +1 -1
- package/Rendering/WebGPU/VolumePass.js +1 -1
- package/Utilities/config/rules-tests.js +28 -0
- package/Widgets/Core/AbstractWidgetFactory.js +1 -0
- package/Widgets/Core/StateBuilder/color3Mixin.js +22 -0
- package/Widgets/Core/StateBuilder/colorMixin.js +7 -0
- package/Widgets/Core/StateBuilder.js +2 -0
- package/Widgets/Representations/ArrowHandleRepresentation.js +28 -110
- package/Widgets/Representations/CircleContextRepresentation.js +43 -165
- package/Widgets/Representations/ContextRepresentation.js +0 -3
- package/Widgets/Representations/ConvexFaceContextRepresentation.js +11 -11
- package/Widgets/Representations/CroppingOutlineRepresentation.js +5 -12
- package/Widgets/Representations/CubeHandleRepresentation.js +15 -104
- package/Widgets/Representations/GlyphRepresentation.js +320 -0
- package/Widgets/Representations/HandleRepresentation.js +0 -5
- package/Widgets/Representations/ImplicitPlaneRepresentation.js +68 -49
- package/Widgets/Representations/LineHandleRepresentation.js +116 -0
- package/Widgets/Representations/PolyLineRepresentation.js +52 -49
- package/Widgets/Representations/RectangleContextRepresentation.js +16 -21
- package/Widgets/Representations/SphereContextRepresentation.js +30 -109
- package/Widgets/Representations/SphereHandleRepresentation.js +13 -110
- package/Widgets/Representations/SplineContextRepresentation.js +53 -36
- package/Widgets/Representations/WidgetRepresentation.d.ts +52 -1
- package/Widgets/Representations/WidgetRepresentation.js +140 -78
- package/Widgets/Representations.js +6 -0
- package/Widgets/SVG/SVGLandmarkRepresentation.js +1 -13
- package/Widgets/Widgets3D/AngleWidget.js +1 -4
- package/Widgets/Widgets3D/EllipseWidget/state.js +1 -1
- package/Widgets/Widgets3D/ResliceCursorWidget/Constants.js +15 -3
- package/Widgets/Widgets3D/ResliceCursorWidget/behavior.js +93 -36
- package/Widgets/Widgets3D/ResliceCursorWidget/helpers.js +75 -82
- package/Widgets/Widgets3D/ResliceCursorWidget/state.js +49 -170
- package/Widgets/Widgets3D/ResliceCursorWidget.js +61 -23
- package/index.d.ts +0 -1
- package/macros.d.ts +3 -5
- package/macros.js +4 -35
- package/package.json +2 -2
- package/Widgets/Representations/ResliceCursorContextRepresentation/Constants.js +0 -12
- package/Widgets/Representations/ResliceCursorContextRepresentation.d.ts +0 -54
- package/Widgets/Representations/ResliceCursorContextRepresentation.js +0 -357
- package/_vendor/available-typed-arrays/index.js_commonjs-proxy.js +0 -1
- package/_vendor/call-bind/callBound.js_commonjs-proxy.js +0 -1
- package/_vendor/call-bind/index.js_commonjs-module.js +0 -3
- package/_vendor/call-bind/index.js_commonjs-proxy.js +0 -1
- package/_vendor/deep-equal/node_modules/isarray/index.js_commonjs-proxy.js +0 -1
- package/_vendor/define-properties/index.js_commonjs-proxy.js +0 -1
- package/_vendor/es-abstract/helpers/getOwnPropertyDescriptor.js_commonjs-proxy.js +0 -1
- package/_vendor/es-get-iterator/index.js_commonjs-module.js +0 -3
- package/_vendor/es-get-iterator/index.js_commonjs-proxy.js +0 -1
- package/_vendor/es-get-iterator/node_modules/isarray/index.js_commonjs-proxy.js +0 -1
- package/_vendor/foreach/index.js_commonjs-proxy.js +0 -1
- package/_vendor/function-bind/implementation.js_commonjs-proxy.js +0 -1
- package/_vendor/function-bind/index.js_commonjs-proxy.js +0 -1
- package/_vendor/get-intrinsic/index.js_commonjs-proxy.js +0 -1
- package/_vendor/has/src/index.js_commonjs-proxy.js +0 -1
- package/_vendor/has-bigints/index.js_commonjs-proxy.js +0 -1
- package/_vendor/has-symbols/index.js_commonjs-proxy.js +0 -1
- package/_vendor/has-symbols/shams.js_commonjs-proxy.js +0 -1
- package/_vendor/has-tostringtag/shams.js_commonjs-proxy.js +0 -1
- package/_vendor/is-arguments/index.js_commonjs-proxy.js +0 -1
- package/_vendor/is-bigint/index.js_commonjs-module.js +0 -3
- package/_vendor/is-bigint/index.js_commonjs-proxy.js +0 -1
- package/_vendor/is-boolean-object/index.js_commonjs-proxy.js +0 -1
- package/_vendor/is-date-object/index.js_commonjs-proxy.js +0 -1
- package/_vendor/is-map/index.js_commonjs-proxy.js +0 -1
- package/_vendor/is-number-object/index.js_commonjs-proxy.js +0 -1
- package/_vendor/is-regex/index.js_commonjs-proxy.js +0 -1
- package/_vendor/is-set/index.js_commonjs-proxy.js +0 -1
- package/_vendor/is-string/index.js_commonjs-proxy.js +0 -1
- package/_vendor/is-symbol/index.js_commonjs-module.js +0 -3
- package/_vendor/is-symbol/index.js_commonjs-proxy.js +0 -1
- package/_vendor/is-typed-array/index.js_commonjs-proxy.js +0 -1
- package/_vendor/is-weakmap/index.js_commonjs-proxy.js +0 -1
- package/_vendor/is-weakset/index.js_commonjs-proxy.js +0 -1
- package/_vendor/object-inspect/index.js_commonjs-proxy.js +0 -1
- package/_vendor/object-is/implementation.js_commonjs-proxy.js +0 -1
- package/_vendor/object-is/index.js_commonjs-proxy.js +0 -1
- package/_vendor/object-is/polyfill.js_commonjs-proxy.js +0 -1
- package/_vendor/object-is/shim.js_commonjs-proxy.js +0 -1
- package/_vendor/object-keys/implementation.js_commonjs-proxy.js +0 -1
- package/_vendor/object-keys/index.js_commonjs-proxy.js +0 -1
- package/_vendor/object-keys/isArguments.js_commonjs-proxy.js +0 -1
- package/_vendor/object.assign/implementation.js_commonjs-proxy.js +0 -1
- package/_vendor/object.assign/index.js_commonjs-proxy.js +0 -1
- package/_vendor/object.assign/polyfill.js_commonjs-proxy.js +0 -1
- package/_vendor/object.assign/shim.js_commonjs-proxy.js +0 -2
- package/_vendor/regexp.prototype.flags/implementation.js_commonjs-proxy.js +0 -1
- package/_vendor/regexp.prototype.flags/index.js_commonjs-proxy.js +0 -1
- package/_vendor/regexp.prototype.flags/polyfill.js_commonjs-proxy.js +0 -1
- package/_vendor/regexp.prototype.flags/shim.js_commonjs-proxy.js +0 -1
- package/_vendor/side-channel/index.js_commonjs-proxy.js +0 -1
- package/_vendor/which-boxed-primitive/index.js_commonjs-proxy.js +0 -5
- package/_vendor/which-collection/index.js_commonjs-proxy.js +0 -4
- package/_vendor/which-typed-array/index.js_commonjs-proxy.js +0 -1
- package/_virtual/_node-resolve_empty.js_commonjs-proxy.js +0 -6
- package/_virtual/commonjsHelpers.js +0 -18
- package/_virtual/node-resolve_empty.js +0 -8
- package/_virtual/polyfill-node.global.js +0 -5
- package/_virtual/polyfill-node.process.js +0 -225
- package/vendor/available-typed-arrays/index.js +0 -29
- package/vendor/call-bind/callBound.js +0 -19
- package/vendor/call-bind/index.js +0 -52
- package/vendor/deep-equal/index.js +0 -379
- package/vendor/deep-equal/node_modules/isarray/index.js +0 -7
- package/vendor/define-properties/index.js +0 -60
- package/vendor/es-abstract/helpers/getOwnPropertyDescriptor.js +0 -17
- package/vendor/es-get-iterator/index.js +0 -217
- package/vendor/es-get-iterator/node_modules/isarray/index.js +0 -7
- package/vendor/foreach/index.js +0 -22
- package/vendor/function-bind/implementation.js +0 -52
- package/vendor/function-bind/index.js +0 -7
- package/vendor/get-intrinsic/index.js +0 -334
- package/vendor/has/src/index.js +0 -7
- package/vendor/has-bigints/index.js +0 -12
- package/vendor/has-symbols/index.js +0 -15
- package/vendor/has-symbols/shams.js +0 -42
- package/vendor/has-tostringtag/shams.js +0 -9
- package/vendor/is-arguments/index.js +0 -36
- package/vendor/is-bigint/index.js +0 -39
- package/vendor/is-boolean-object/index.js +0 -29
- package/vendor/is-date-object/index.js +0 -22
- package/vendor/is-map/index.js +0 -42
- package/vendor/is-number-object/index.js +0 -26
- package/vendor/is-regex/index.js +0 -61
- package/vendor/is-set/index.js +0 -42
- package/vendor/is-string/index.js +0 -26
- package/vendor/is-symbol/index.js +0 -36
- package/vendor/is-typed-array/index.js +0 -67
- package/vendor/is-weakmap/index.js +0 -42
- package/vendor/is-weakset/index.js +0 -42
- package/vendor/object-inspect/index.js +0 -515
- package/vendor/object-is/implementation.js +0 -18
- package/vendor/object-is/index.js +0 -25
- package/vendor/object-is/polyfill.js +0 -9
- package/vendor/object-is/shim.js +0 -17
- package/vendor/object-keys/implementation.js +0 -124
- package/vendor/object-keys/index.js +0 -35
- package/vendor/object-keys/isArguments.js +0 -17
- package/vendor/object.assign/implementation.js +0 -46
- package/vendor/object.assign/index.js +0 -29
- package/vendor/object.assign/polyfill.js +0 -57
- package/vendor/object.assign/shim.js +0 -17
- package/vendor/regexp.prototype.flags/implementation.js +0 -30
- package/vendor/regexp.prototype.flags/index.js +0 -25
- package/vendor/regexp.prototype.flags/polyfill.js +0 -23
- package/vendor/regexp.prototype.flags/shim.js +0 -29
- package/vendor/side-channel/index.js +0 -128
- package/vendor/which-boxed-primitive/index.js +0 -38
- package/vendor/which-collection/index.js +0 -29
- package/vendor/which-typed-array/index.js +0 -63
|
@@ -1,379 +0,0 @@
|
|
|
1
|
-
import { o as objectKeys$1 } from '../object-keys/index.js';
|
|
2
|
-
import { i as isArguments$1 } from '../is-arguments/index.js';
|
|
3
|
-
import { o as objectIs } from '../object-is/index.js';
|
|
4
|
-
import { i as isRegex$1 } from '../is-regex/index.js';
|
|
5
|
-
import { r as regexp_prototype_flags } from '../regexp.prototype.flags/index.js';
|
|
6
|
-
import { i as isarray } from './node_modules/isarray/index.js';
|
|
7
|
-
import { i as isDateObject } from '../is-date-object/index.js';
|
|
8
|
-
import { w as whichBoxedPrimitive$1 } from '../which-boxed-primitive/index.js';
|
|
9
|
-
import { g as getIntrinsic } from '../get-intrinsic/index.js';
|
|
10
|
-
import { c as callBound$1 } from '../call-bind/callBound.js';
|
|
11
|
-
import { w as whichCollection$1 } from '../which-collection/index.js';
|
|
12
|
-
import '../es-get-iterator/index.js';
|
|
13
|
-
import { s as sideChannel } from '../side-channel/index.js';
|
|
14
|
-
import { w as whichTypedArray$1 } from '../which-typed-array/index.js';
|
|
15
|
-
import { o as object_assign } from '../object.assign/index.js';
|
|
16
|
-
import { e as esGetIterator } from '../../_vendor/es-get-iterator/index.js_commonjs-module.js';
|
|
17
|
-
|
|
18
|
-
var objectKeys = objectKeys$1;
|
|
19
|
-
var isArguments = isArguments$1;
|
|
20
|
-
var is = objectIs;
|
|
21
|
-
var isRegex = isRegex$1;
|
|
22
|
-
var flags = regexp_prototype_flags;
|
|
23
|
-
var isArray = isarray;
|
|
24
|
-
var isDate = isDateObject;
|
|
25
|
-
var whichBoxedPrimitive = whichBoxedPrimitive$1;
|
|
26
|
-
var GetIntrinsic = getIntrinsic;
|
|
27
|
-
var callBound = callBound$1;
|
|
28
|
-
var whichCollection = whichCollection$1;
|
|
29
|
-
var getIterator = esGetIterator.exports;
|
|
30
|
-
var getSideChannel = sideChannel;
|
|
31
|
-
var whichTypedArray = whichTypedArray$1;
|
|
32
|
-
var assign = object_assign;
|
|
33
|
-
|
|
34
|
-
var $getTime = callBound('Date.prototype.getTime');
|
|
35
|
-
var gPO = Object.getPrototypeOf;
|
|
36
|
-
var $objToString = callBound('Object.prototype.toString');
|
|
37
|
-
|
|
38
|
-
var $Set = GetIntrinsic('%Set%', true);
|
|
39
|
-
var $mapHas = callBound('Map.prototype.has', true);
|
|
40
|
-
var $mapGet = callBound('Map.prototype.get', true);
|
|
41
|
-
var $mapSize = callBound('Map.prototype.size', true);
|
|
42
|
-
var $setAdd = callBound('Set.prototype.add', true);
|
|
43
|
-
var $setDelete = callBound('Set.prototype.delete', true);
|
|
44
|
-
var $setHas = callBound('Set.prototype.has', true);
|
|
45
|
-
var $setSize = callBound('Set.prototype.size', true);
|
|
46
|
-
|
|
47
|
-
// taken from https://github.com/browserify/commonjs-assert/blob/bba838e9ba9e28edf3127ce6974624208502f6bc/internal/util/comparisons.js#L401-L414
|
|
48
|
-
function setHasEqualElement(set, val1, opts, channel) {
|
|
49
|
-
var i = getIterator(set);
|
|
50
|
-
var result;
|
|
51
|
-
while ((result = i.next()) && !result.done) {
|
|
52
|
-
if (internalDeepEqual(val1, result.value, opts, channel)) { // eslint-disable-line no-use-before-define
|
|
53
|
-
// Remove the matching element to make sure we do not check that again.
|
|
54
|
-
$setDelete(set, result.value);
|
|
55
|
-
return true;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
return false;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
// taken from https://github.com/browserify/commonjs-assert/blob/bba838e9ba9e28edf3127ce6974624208502f6bc/internal/util/comparisons.js#L416-L439
|
|
63
|
-
function findLooseMatchingPrimitives(prim) {
|
|
64
|
-
if (typeof prim === 'undefined') {
|
|
65
|
-
return null;
|
|
66
|
-
}
|
|
67
|
-
if (typeof prim === 'object') { // Only pass in null as object!
|
|
68
|
-
return void 0;
|
|
69
|
-
}
|
|
70
|
-
if (typeof prim === 'symbol') {
|
|
71
|
-
return false;
|
|
72
|
-
}
|
|
73
|
-
if (typeof prim === 'string' || typeof prim === 'number') {
|
|
74
|
-
// Loose equal entries exist only if the string is possible to convert to a regular number and not NaN.
|
|
75
|
-
return +prim === +prim; // eslint-disable-line no-implicit-coercion
|
|
76
|
-
}
|
|
77
|
-
return true;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
// taken from https://github.com/browserify/commonjs-assert/blob/bba838e9ba9e28edf3127ce6974624208502f6bc/internal/util/comparisons.js#L449-L460
|
|
81
|
-
function mapMightHaveLoosePrim(a, b, prim, item, opts, channel) {
|
|
82
|
-
var altValue = findLooseMatchingPrimitives(prim);
|
|
83
|
-
if (altValue != null) {
|
|
84
|
-
return altValue;
|
|
85
|
-
}
|
|
86
|
-
var curB = $mapGet(b, altValue);
|
|
87
|
-
var looseOpts = assign({}, opts, { strict: false });
|
|
88
|
-
if (
|
|
89
|
-
(typeof curB === 'undefined' && !$mapHas(b, altValue))
|
|
90
|
-
// eslint-disable-next-line no-use-before-define
|
|
91
|
-
|| !internalDeepEqual(item, curB, looseOpts, channel)
|
|
92
|
-
) {
|
|
93
|
-
return false;
|
|
94
|
-
}
|
|
95
|
-
// eslint-disable-next-line no-use-before-define
|
|
96
|
-
return !$mapHas(a, altValue) && internalDeepEqual(item, curB, looseOpts, channel);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
// taken from https://github.com/browserify/commonjs-assert/blob/bba838e9ba9e28edf3127ce6974624208502f6bc/internal/util/comparisons.js#L441-L447
|
|
100
|
-
function setMightHaveLoosePrim(a, b, prim) {
|
|
101
|
-
var altValue = findLooseMatchingPrimitives(prim);
|
|
102
|
-
if (altValue != null) {
|
|
103
|
-
return altValue;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
return $setHas(b, altValue) && !$setHas(a, altValue);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
// taken from https://github.com/browserify/commonjs-assert/blob/bba838e9ba9e28edf3127ce6974624208502f6bc/internal/util/comparisons.js#L518-L533
|
|
110
|
-
function mapHasEqualEntry(set, map, key1, item1, opts, channel) {
|
|
111
|
-
var i = getIterator(set);
|
|
112
|
-
var result;
|
|
113
|
-
var key2;
|
|
114
|
-
while ((result = i.next()) && !result.done) {
|
|
115
|
-
key2 = result.value;
|
|
116
|
-
if (
|
|
117
|
-
// eslint-disable-next-line no-use-before-define
|
|
118
|
-
internalDeepEqual(key1, key2, opts, channel)
|
|
119
|
-
// eslint-disable-next-line no-use-before-define
|
|
120
|
-
&& internalDeepEqual(item1, $mapGet(map, key2), opts, channel)
|
|
121
|
-
) {
|
|
122
|
-
$setDelete(set, key2);
|
|
123
|
-
return true;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
return false;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
function internalDeepEqual(actual, expected, options, channel) {
|
|
131
|
-
var opts = options || {};
|
|
132
|
-
|
|
133
|
-
// 7.1. All identical values are equivalent, as determined by ===.
|
|
134
|
-
if (opts.strict ? is(actual, expected) : actual === expected) {
|
|
135
|
-
return true;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
var actualBoxed = whichBoxedPrimitive(actual);
|
|
139
|
-
var expectedBoxed = whichBoxedPrimitive(expected);
|
|
140
|
-
if (actualBoxed !== expectedBoxed) {
|
|
141
|
-
return false;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
// 7.3. Other pairs that do not both pass typeof value == 'object', equivalence is determined by ==.
|
|
145
|
-
if (!actual || !expected || (typeof actual !== 'object' && typeof expected !== 'object')) {
|
|
146
|
-
return opts.strict ? is(actual, expected) : actual == expected; // eslint-disable-line eqeqeq
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
/*
|
|
150
|
-
* 7.4. For all other Object pairs, including Array objects, equivalence is
|
|
151
|
-
* determined by having the same number of owned properties (as verified
|
|
152
|
-
* with Object.prototype.hasOwnProperty.call), the same set of keys
|
|
153
|
-
* (although not necessarily the same order), equivalent values for every
|
|
154
|
-
* corresponding key, and an identical 'prototype' property. Note: this
|
|
155
|
-
* accounts for both named and indexed properties on Arrays.
|
|
156
|
-
*/
|
|
157
|
-
// see https://github.com/nodejs/node/commit/d3aafd02efd3a403d646a3044adcf14e63a88d32 for memos/channel inspiration
|
|
158
|
-
|
|
159
|
-
var hasActual = channel.has(actual);
|
|
160
|
-
var hasExpected = channel.has(expected);
|
|
161
|
-
var sentinel;
|
|
162
|
-
if (hasActual && hasExpected) {
|
|
163
|
-
if (channel.get(actual) === channel.get(expected)) {
|
|
164
|
-
return true;
|
|
165
|
-
}
|
|
166
|
-
} else {
|
|
167
|
-
sentinel = {};
|
|
168
|
-
}
|
|
169
|
-
if (!hasActual) { channel.set(actual, sentinel); }
|
|
170
|
-
if (!hasExpected) { channel.set(expected, sentinel); }
|
|
171
|
-
|
|
172
|
-
// eslint-disable-next-line no-use-before-define
|
|
173
|
-
return objEquiv(actual, expected, opts, channel);
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
function isBuffer(x) {
|
|
177
|
-
if (!x || typeof x !== 'object' || typeof x.length !== 'number') {
|
|
178
|
-
return false;
|
|
179
|
-
}
|
|
180
|
-
if (typeof x.copy !== 'function' || typeof x.slice !== 'function') {
|
|
181
|
-
return false;
|
|
182
|
-
}
|
|
183
|
-
if (x.length > 0 && typeof x[0] !== 'number') {
|
|
184
|
-
return false;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
return !!(x.constructor && x.constructor.isBuffer && x.constructor.isBuffer(x));
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
function setEquiv(a, b, opts, channel) {
|
|
191
|
-
if ($setSize(a) !== $setSize(b)) {
|
|
192
|
-
return false;
|
|
193
|
-
}
|
|
194
|
-
var iA = getIterator(a);
|
|
195
|
-
var iB = getIterator(b);
|
|
196
|
-
var resultA;
|
|
197
|
-
var resultB;
|
|
198
|
-
var set;
|
|
199
|
-
while ((resultA = iA.next()) && !resultA.done) {
|
|
200
|
-
if (resultA.value && typeof resultA.value === 'object') {
|
|
201
|
-
if (!set) { set = new $Set(); }
|
|
202
|
-
$setAdd(set, resultA.value);
|
|
203
|
-
} else if (!$setHas(b, resultA.value)) {
|
|
204
|
-
if (opts.strict) { return false; }
|
|
205
|
-
if (!setMightHaveLoosePrim(a, b, resultA.value)) {
|
|
206
|
-
return false;
|
|
207
|
-
}
|
|
208
|
-
if (!set) { set = new $Set(); }
|
|
209
|
-
$setAdd(set, resultA.value);
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
if (set) {
|
|
213
|
-
while ((resultB = iB.next()) && !resultB.done) {
|
|
214
|
-
// We have to check if a primitive value is already matching and only if it's not, go hunting for it.
|
|
215
|
-
if (resultB.value && typeof resultB.value === 'object') {
|
|
216
|
-
if (!setHasEqualElement(set, resultB.value, opts.strict, channel)) {
|
|
217
|
-
return false;
|
|
218
|
-
}
|
|
219
|
-
} else if (
|
|
220
|
-
!opts.strict
|
|
221
|
-
&& !$setHas(a, resultB.value)
|
|
222
|
-
&& !setHasEqualElement(set, resultB.value, opts.strict, channel)
|
|
223
|
-
) {
|
|
224
|
-
return false;
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
return $setSize(set) === 0;
|
|
228
|
-
}
|
|
229
|
-
return true;
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
function mapEquiv(a, b, opts, channel) {
|
|
233
|
-
if ($mapSize(a) !== $mapSize(b)) {
|
|
234
|
-
return false;
|
|
235
|
-
}
|
|
236
|
-
var iA = getIterator(a);
|
|
237
|
-
var iB = getIterator(b);
|
|
238
|
-
var resultA;
|
|
239
|
-
var resultB;
|
|
240
|
-
var set;
|
|
241
|
-
var key;
|
|
242
|
-
var item1;
|
|
243
|
-
var item2;
|
|
244
|
-
while ((resultA = iA.next()) && !resultA.done) {
|
|
245
|
-
key = resultA.value[0];
|
|
246
|
-
item1 = resultA.value[1];
|
|
247
|
-
if (key && typeof key === 'object') {
|
|
248
|
-
if (!set) { set = new $Set(); }
|
|
249
|
-
$setAdd(set, key);
|
|
250
|
-
} else {
|
|
251
|
-
item2 = $mapGet(b, key);
|
|
252
|
-
if ((typeof item2 === 'undefined' && !$mapHas(b, key)) || !internalDeepEqual(item1, item2, opts, channel)) {
|
|
253
|
-
if (opts.strict) {
|
|
254
|
-
return false;
|
|
255
|
-
}
|
|
256
|
-
if (!mapMightHaveLoosePrim(a, b, key, item1, opts, channel)) {
|
|
257
|
-
return false;
|
|
258
|
-
}
|
|
259
|
-
if (!set) { set = new $Set(); }
|
|
260
|
-
$setAdd(set, key);
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
if (set) {
|
|
266
|
-
while ((resultB = iB.next()) && !resultB.done) {
|
|
267
|
-
key = resultB.value[0];
|
|
268
|
-
item2 = resultB.value[1];
|
|
269
|
-
if (key && typeof key === 'object') {
|
|
270
|
-
if (!mapHasEqualEntry(set, a, key, item2, opts, channel)) {
|
|
271
|
-
return false;
|
|
272
|
-
}
|
|
273
|
-
} else if (
|
|
274
|
-
!opts.strict
|
|
275
|
-
&& (!a.has(key) || !internalDeepEqual($mapGet(a, key), item2, opts, channel))
|
|
276
|
-
&& !mapHasEqualEntry(set, a, key, item2, assign({}, opts, { strict: false }), channel)
|
|
277
|
-
) {
|
|
278
|
-
return false;
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
return $setSize(set) === 0;
|
|
282
|
-
}
|
|
283
|
-
return true;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
function objEquiv(a, b, opts, channel) {
|
|
287
|
-
/* eslint max-statements: [2, 100], max-lines-per-function: [2, 120], max-depth: [2, 5] */
|
|
288
|
-
var i, key;
|
|
289
|
-
|
|
290
|
-
if (typeof a !== typeof b) { return false; }
|
|
291
|
-
if (a == null || b == null) { return false; }
|
|
292
|
-
|
|
293
|
-
if ($objToString(a) !== $objToString(b)) { return false; }
|
|
294
|
-
|
|
295
|
-
if (isArguments(a) !== isArguments(b)) { return false; }
|
|
296
|
-
|
|
297
|
-
var aIsArray = isArray(a);
|
|
298
|
-
var bIsArray = isArray(b);
|
|
299
|
-
if (aIsArray !== bIsArray) { return false; }
|
|
300
|
-
|
|
301
|
-
// TODO: replace when a cross-realm brand check is available
|
|
302
|
-
var aIsError = a instanceof Error;
|
|
303
|
-
var bIsError = b instanceof Error;
|
|
304
|
-
if (aIsError !== bIsError) { return false; }
|
|
305
|
-
if (aIsError || bIsError) {
|
|
306
|
-
if (a.name !== b.name || a.message !== b.message) { return false; }
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
var aIsRegex = isRegex(a);
|
|
310
|
-
var bIsRegex = isRegex(b);
|
|
311
|
-
if (aIsRegex !== bIsRegex) { return false; }
|
|
312
|
-
if ((aIsRegex || bIsRegex) && (a.source !== b.source || flags(a) !== flags(b))) {
|
|
313
|
-
return false;
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
var aIsDate = isDate(a);
|
|
317
|
-
var bIsDate = isDate(b);
|
|
318
|
-
if (aIsDate !== bIsDate) { return false; }
|
|
319
|
-
if (aIsDate || bIsDate) { // && would work too, because both are true or both false here
|
|
320
|
-
if ($getTime(a) !== $getTime(b)) { return false; }
|
|
321
|
-
}
|
|
322
|
-
if (opts.strict && gPO && gPO(a) !== gPO(b)) { return false; }
|
|
323
|
-
|
|
324
|
-
if (whichTypedArray(a) !== whichTypedArray(b)) {
|
|
325
|
-
return false;
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
var aIsBuffer = isBuffer(a);
|
|
329
|
-
var bIsBuffer = isBuffer(b);
|
|
330
|
-
if (aIsBuffer !== bIsBuffer) { return false; }
|
|
331
|
-
if (aIsBuffer || bIsBuffer) { // && would work too, because both are true or both false here
|
|
332
|
-
if (a.length !== b.length) { return false; }
|
|
333
|
-
for (i = 0; i < a.length; i++) {
|
|
334
|
-
if (a[i] !== b[i]) { return false; }
|
|
335
|
-
}
|
|
336
|
-
return true;
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
if (typeof a !== typeof b) { return false; }
|
|
340
|
-
|
|
341
|
-
var ka = objectKeys(a);
|
|
342
|
-
var kb = objectKeys(b);
|
|
343
|
-
// having the same number of owned properties (keys incorporates hasOwnProperty)
|
|
344
|
-
if (ka.length !== kb.length) { return false; }
|
|
345
|
-
|
|
346
|
-
// the same set of keys (although not necessarily the same order),
|
|
347
|
-
ka.sort();
|
|
348
|
-
kb.sort();
|
|
349
|
-
// ~~~cheap key test
|
|
350
|
-
for (i = ka.length - 1; i >= 0; i--) {
|
|
351
|
-
if (ka[i] != kb[i]) { return false; } // eslint-disable-line eqeqeq
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
// equivalent values for every corresponding key, and ~~~possibly expensive deep test
|
|
355
|
-
for (i = ka.length - 1; i >= 0; i--) {
|
|
356
|
-
key = ka[i];
|
|
357
|
-
if (!internalDeepEqual(a[key], b[key], opts, channel)) { return false; }
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
var aCollection = whichCollection(a);
|
|
361
|
-
var bCollection = whichCollection(b);
|
|
362
|
-
if (aCollection !== bCollection) {
|
|
363
|
-
return false;
|
|
364
|
-
}
|
|
365
|
-
if (aCollection === 'Set' || bCollection === 'Set') { // aCollection === bCollection
|
|
366
|
-
return setEquiv(a, b, opts, channel);
|
|
367
|
-
}
|
|
368
|
-
if (aCollection === 'Map') { // aCollection === bCollection
|
|
369
|
-
return mapEquiv(a, b, opts, channel);
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
return true;
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
var deepEqual = function deepEqual(a, b, opts) {
|
|
376
|
-
return internalDeepEqual(a, b, opts, getSideChannel());
|
|
377
|
-
};
|
|
378
|
-
|
|
379
|
-
export { deepEqual as d };
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { o as objectKeys } from '../object-keys/index.js';
|
|
2
|
-
|
|
3
|
-
var keys = objectKeys;
|
|
4
|
-
var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
|
|
5
|
-
|
|
6
|
-
var toStr = Object.prototype.toString;
|
|
7
|
-
var concat = Array.prototype.concat;
|
|
8
|
-
var origDefineProperty = Object.defineProperty;
|
|
9
|
-
|
|
10
|
-
var isFunction = function (fn) {
|
|
11
|
-
return typeof fn === 'function' && toStr.call(fn) === '[object Function]';
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
var arePropertyDescriptorsSupported = function () {
|
|
15
|
-
var obj = {};
|
|
16
|
-
try {
|
|
17
|
-
origDefineProperty(obj, 'x', { enumerable: false, value: obj });
|
|
18
|
-
// eslint-disable-next-line no-unused-vars, no-restricted-syntax
|
|
19
|
-
for (var _ in obj) { // jscs:ignore disallowUnusedVariables
|
|
20
|
-
return false;
|
|
21
|
-
}
|
|
22
|
-
return obj.x === obj;
|
|
23
|
-
} catch (e) { /* this is IE 8. */
|
|
24
|
-
return false;
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
var supportsDescriptors = origDefineProperty && arePropertyDescriptorsSupported();
|
|
28
|
-
|
|
29
|
-
var defineProperty = function (object, name, value, predicate) {
|
|
30
|
-
if (name in object && (!isFunction(predicate) || !predicate())) {
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
if (supportsDescriptors) {
|
|
34
|
-
origDefineProperty(object, name, {
|
|
35
|
-
configurable: true,
|
|
36
|
-
enumerable: false,
|
|
37
|
-
value: value,
|
|
38
|
-
writable: true
|
|
39
|
-
});
|
|
40
|
-
} else {
|
|
41
|
-
object[name] = value;
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
var defineProperties = function (object, map) {
|
|
46
|
-
var predicates = arguments.length > 2 ? arguments[2] : {};
|
|
47
|
-
var props = keys(map);
|
|
48
|
-
if (hasSymbols) {
|
|
49
|
-
props = concat.call(props, Object.getOwnPropertySymbols(map));
|
|
50
|
-
}
|
|
51
|
-
for (var i = 0; i < props.length; i += 1) {
|
|
52
|
-
defineProperty(object, props[i], map[props[i]], predicates[props[i]]);
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
defineProperties.supportsDescriptors = !!supportsDescriptors;
|
|
57
|
-
|
|
58
|
-
var defineProperties_1 = defineProperties;
|
|
59
|
-
|
|
60
|
-
export { defineProperties_1 as d };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { g as getIntrinsic } from '../../get-intrinsic/index.js';
|
|
2
|
-
|
|
3
|
-
var GetIntrinsic = getIntrinsic;
|
|
4
|
-
|
|
5
|
-
var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);
|
|
6
|
-
if ($gOPD) {
|
|
7
|
-
try {
|
|
8
|
-
$gOPD([], 'length');
|
|
9
|
-
} catch (e) {
|
|
10
|
-
// IE 8 has a broken gOPD
|
|
11
|
-
$gOPD = null;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
var getOwnPropertyDescriptor = $gOPD;
|
|
16
|
-
|
|
17
|
-
export { getOwnPropertyDescriptor as g };
|
|
@@ -1,217 +0,0 @@
|
|
|
1
|
-
import { b as browser$1 } from '../../_virtual/polyfill-node.process.js';
|
|
2
|
-
import { e as esGetIterator } from '../../_vendor/es-get-iterator/index.js_commonjs-module.js';
|
|
3
|
-
import { i as isArguments$1 } from '../is-arguments/index.js';
|
|
4
|
-
import { h as hasSymbols } from '../has-symbols/index.js';
|
|
5
|
-
import { s as shams } from '../has-symbols/shams.js';
|
|
6
|
-
import { i as isarray } from './node_modules/isarray/index.js';
|
|
7
|
-
import { i as isString$1 } from '../is-string/index.js';
|
|
8
|
-
import { g as getIntrinsic } from '../get-intrinsic/index.js';
|
|
9
|
-
import { c as callBound$1 } from '../call-bind/callBound.js';
|
|
10
|
-
import { i as isMap$1 } from '../is-map/index.js';
|
|
11
|
-
import { i as isSet$1 } from '../is-set/index.js';
|
|
12
|
-
|
|
13
|
-
/* eslint global-require: 0 */
|
|
14
|
-
// the code is structured this way so that bundlers can
|
|
15
|
-
// alias out `has-symbols` to `() => true` or `() => false` if your target
|
|
16
|
-
// environments' Symbol capabilities are known, and then use
|
|
17
|
-
// dead code elimination on the rest of this module.
|
|
18
|
-
//
|
|
19
|
-
// Similarly, `isarray` can be aliased to `Array.isArray` if
|
|
20
|
-
// available in all target environments.
|
|
21
|
-
|
|
22
|
-
var isArguments = isArguments$1;
|
|
23
|
-
|
|
24
|
-
if (hasSymbols() || shams()) {
|
|
25
|
-
var $iterator = Symbol.iterator;
|
|
26
|
-
// Symbol is available natively or shammed
|
|
27
|
-
// natively:
|
|
28
|
-
// - Chrome >= 38
|
|
29
|
-
// - Edge 12-14?, Edge >= 15 for sure
|
|
30
|
-
// - FF >= 36
|
|
31
|
-
// - Safari >= 9
|
|
32
|
-
// - node >= 0.12
|
|
33
|
-
esGetIterator.exports = function getIterator(iterable) {
|
|
34
|
-
// alternatively, `iterable[$iterator]?.()`
|
|
35
|
-
if (iterable != null && typeof iterable[$iterator] !== 'undefined') {
|
|
36
|
-
return iterable[$iterator]();
|
|
37
|
-
}
|
|
38
|
-
if (isArguments(iterable)) {
|
|
39
|
-
// arguments objects lack Symbol.iterator
|
|
40
|
-
// - node 0.12
|
|
41
|
-
return Array.prototype[$iterator].call(iterable);
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
} else {
|
|
45
|
-
// Symbol is not available, native or shammed
|
|
46
|
-
var isArray = isarray;
|
|
47
|
-
var isString = isString$1;
|
|
48
|
-
var GetIntrinsic = getIntrinsic;
|
|
49
|
-
var $Map = GetIntrinsic('%Map%', true);
|
|
50
|
-
var $Set = GetIntrinsic('%Set%', true);
|
|
51
|
-
var callBound = callBound$1;
|
|
52
|
-
var $arrayPush = callBound('Array.prototype.push');
|
|
53
|
-
var $charCodeAt = callBound('String.prototype.charCodeAt');
|
|
54
|
-
var $stringSlice = callBound('String.prototype.slice');
|
|
55
|
-
|
|
56
|
-
var advanceStringIndex = function advanceStringIndex(S, index) {
|
|
57
|
-
var length = S.length;
|
|
58
|
-
if ((index + 1) >= length) {
|
|
59
|
-
return index + 1;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
var first = $charCodeAt(S, index);
|
|
63
|
-
if (first < 0xD800 || first > 0xDBFF) {
|
|
64
|
-
return index + 1;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
var second = $charCodeAt(S, index + 1);
|
|
68
|
-
if (second < 0xDC00 || second > 0xDFFF) {
|
|
69
|
-
return index + 1;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
return index + 2;
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
var getArrayIterator = function getArrayIterator(arraylike) {
|
|
76
|
-
var i = 0;
|
|
77
|
-
return {
|
|
78
|
-
next: function next() {
|
|
79
|
-
var done = i >= arraylike.length;
|
|
80
|
-
var value;
|
|
81
|
-
if (!done) {
|
|
82
|
-
value = arraylike[i];
|
|
83
|
-
i += 1;
|
|
84
|
-
}
|
|
85
|
-
return {
|
|
86
|
-
done: done,
|
|
87
|
-
value: value
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
};
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
var getNonCollectionIterator = function getNonCollectionIterator(iterable, noPrimordialCollections) {
|
|
94
|
-
if (isArray(iterable) || isArguments(iterable)) {
|
|
95
|
-
return getArrayIterator(iterable);
|
|
96
|
-
}
|
|
97
|
-
if (isString(iterable)) {
|
|
98
|
-
var i = 0;
|
|
99
|
-
return {
|
|
100
|
-
next: function next() {
|
|
101
|
-
var nextIndex = advanceStringIndex(iterable, i);
|
|
102
|
-
var value = $stringSlice(iterable, i, nextIndex);
|
|
103
|
-
i = nextIndex;
|
|
104
|
-
return {
|
|
105
|
-
done: nextIndex > iterable.length,
|
|
106
|
-
value: value
|
|
107
|
-
};
|
|
108
|
-
}
|
|
109
|
-
};
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
// es6-shim and es-shims' es-map use a string "_es6-shim iterator_" property on different iterables, such as MapIterator.
|
|
113
|
-
if (noPrimordialCollections && typeof iterable['_es6-shim iterator_'] !== 'undefined') {
|
|
114
|
-
return iterable['_es6-shim iterator_']();
|
|
115
|
-
}
|
|
116
|
-
};
|
|
117
|
-
|
|
118
|
-
if (!$Map && !$Set) {
|
|
119
|
-
// the only language iterables are Array, String, arguments
|
|
120
|
-
// - Safari <= 6.0
|
|
121
|
-
// - Chrome < 38
|
|
122
|
-
// - node < 0.12
|
|
123
|
-
// - FF < 13
|
|
124
|
-
// - IE < 11
|
|
125
|
-
// - Edge < 11
|
|
126
|
-
|
|
127
|
-
esGetIterator.exports = function getIterator(iterable) {
|
|
128
|
-
if (iterable != null) {
|
|
129
|
-
return getNonCollectionIterator(iterable, true);
|
|
130
|
-
}
|
|
131
|
-
};
|
|
132
|
-
} else {
|
|
133
|
-
// either Map or Set are available, but Symbol is not
|
|
134
|
-
// - es6-shim on an ES5 browser
|
|
135
|
-
// - Safari 6.2 (maybe 6.1?)
|
|
136
|
-
// - FF v[13, 36)
|
|
137
|
-
// - IE 11
|
|
138
|
-
// - Edge 11
|
|
139
|
-
// - Safari v[6, 9)
|
|
140
|
-
|
|
141
|
-
var isMap = isMap$1;
|
|
142
|
-
var isSet = isSet$1;
|
|
143
|
-
|
|
144
|
-
// Firefox >= 27, IE 11, Safari 6.2 - 9, Edge 11, es6-shim in older envs, all have forEach
|
|
145
|
-
var $mapForEach = callBound('Map.prototype.forEach', true);
|
|
146
|
-
var $setForEach = callBound('Set.prototype.forEach', true);
|
|
147
|
-
if (typeof browser$1 === 'undefined' || !browser$1.versions || !browser$1.versions.node) { // "if is not node"
|
|
148
|
-
|
|
149
|
-
// Firefox 17 - 26 has `.iterator()`, whose iterator `.next()` either
|
|
150
|
-
// returns a value, or throws a StopIteration object. These browsers
|
|
151
|
-
// do not have any other mechanism for iteration.
|
|
152
|
-
var $mapIterator = callBound('Map.prototype.iterator', true);
|
|
153
|
-
var $setIterator = callBound('Set.prototype.iterator', true);
|
|
154
|
-
var getStopIterationIterator = function (iterator) {
|
|
155
|
-
var done = false;
|
|
156
|
-
return {
|
|
157
|
-
next: function next() {
|
|
158
|
-
try {
|
|
159
|
-
return {
|
|
160
|
-
done: done,
|
|
161
|
-
value: done ? undefined : iterator.next()
|
|
162
|
-
};
|
|
163
|
-
} catch (e) {
|
|
164
|
-
done = true;
|
|
165
|
-
return {
|
|
166
|
-
done: true,
|
|
167
|
-
value: undefined
|
|
168
|
-
};
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
};
|
|
172
|
-
};
|
|
173
|
-
}
|
|
174
|
-
// Firefox 27-35, and some older es6-shim versions, use a string "@@iterator" property
|
|
175
|
-
// this returns a proper iterator object, so we should use it instead of forEach.
|
|
176
|
-
// newer es6-shim versions use a string "_es6-shim iterator_" property.
|
|
177
|
-
var $mapAtAtIterator = callBound('Map.prototype.@@iterator', true) || callBound('Map.prototype._es6-shim iterator_', true);
|
|
178
|
-
var $setAtAtIterator = callBound('Set.prototype.@@iterator', true) || callBound('Set.prototype._es6-shim iterator_', true);
|
|
179
|
-
|
|
180
|
-
var getCollectionIterator = function getCollectionIterator(iterable) {
|
|
181
|
-
if (isMap(iterable)) {
|
|
182
|
-
if ($mapIterator) {
|
|
183
|
-
return getStopIterationIterator($mapIterator(iterable));
|
|
184
|
-
}
|
|
185
|
-
if ($mapAtAtIterator) {
|
|
186
|
-
return $mapAtAtIterator(iterable);
|
|
187
|
-
}
|
|
188
|
-
if ($mapForEach) {
|
|
189
|
-
var entries = [];
|
|
190
|
-
$mapForEach(iterable, function (v, k) {
|
|
191
|
-
$arrayPush(entries, [k, v]);
|
|
192
|
-
});
|
|
193
|
-
return getArrayIterator(entries);
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
if (isSet(iterable)) {
|
|
197
|
-
if ($setIterator) {
|
|
198
|
-
return getStopIterationIterator($setIterator(iterable));
|
|
199
|
-
}
|
|
200
|
-
if ($setAtAtIterator) {
|
|
201
|
-
return $setAtAtIterator(iterable);
|
|
202
|
-
}
|
|
203
|
-
if ($setForEach) {
|
|
204
|
-
var values = [];
|
|
205
|
-
$setForEach(iterable, function (v) {
|
|
206
|
-
$arrayPush(values, v);
|
|
207
|
-
});
|
|
208
|
-
return getArrayIterator(values);
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
};
|
|
212
|
-
|
|
213
|
-
esGetIterator.exports = function getIterator(iterable) {
|
|
214
|
-
return getCollectionIterator(iterable) || getNonCollectionIterator(iterable);
|
|
215
|
-
};
|
|
216
|
-
}
|
|
217
|
-
}
|