cdk-comprehend-s3olap 2.0.67 → 2.0.70
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/.jsii +4 -4
- package/lib/cdk-comprehend-s3olap.js +2 -2
- package/lib/comprehend-lambdas.js +2 -2
- package/lib/iam-roles.js +4 -4
- package/node_modules/aws-sdk/CHANGELOG.md +8 -1
- package/node_modules/aws-sdk/README.md +1 -1
- package/node_modules/aws-sdk/apis/rekognition-2016-06-27.examples.json +103 -0
- package/node_modules/aws-sdk/apis/rekognition-2016-06-27.min.json +252 -141
- package/node_modules/aws-sdk/apis/rekognition-2016-06-27.paginators.json +6 -0
- package/node_modules/aws-sdk/apis/wisdom-2020-10-19.min.json +59 -3
- package/node_modules/aws-sdk/clients/cloudfront.d.ts +2 -2
- package/node_modules/aws-sdk/clients/rekognition.d.ts +170 -3
- package/node_modules/aws-sdk/clients/servicecatalog.d.ts +57 -57
- package/node_modules/aws-sdk/clients/wisdom.d.ts +56 -0
- package/node_modules/aws-sdk/dist/aws-sdk-core-react-native.js +1 -1
- package/node_modules/aws-sdk/dist/aws-sdk-react-native.js +4 -4
- package/node_modules/aws-sdk/dist/aws-sdk.js +261 -144
- package/node_modules/aws-sdk/dist/aws-sdk.min.js +26 -26
- package/node_modules/aws-sdk/lib/core.js +1 -1
- package/node_modules/aws-sdk/package.json +1 -1
- package/node_modules/esbuild/install.js +4 -4
- package/node_modules/esbuild/lib/main.js +7 -7
- package/node_modules/esbuild/package.json +22 -22
- package/node_modules/esbuild-linux-64/bin/esbuild +0 -0
- package/node_modules/esbuild-linux-64/package.json +1 -1
- package/node_modules/object.assign/CHANGELOG.md +4 -0
- package/node_modules/object.assign/dist/browser.js +944 -0
- package/node_modules/object.assign/package.json +3 -2
- package/package.json +5 -5
@@ -0,0 +1,944 @@
|
|
1
|
+
(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
|
2
|
+
'use strict';
|
3
|
+
|
4
|
+
var keys = require('object-keys').shim();
|
5
|
+
delete keys.shim;
|
6
|
+
|
7
|
+
var assign = require('./');
|
8
|
+
|
9
|
+
module.exports = assign.shim();
|
10
|
+
|
11
|
+
delete assign.shim;
|
12
|
+
|
13
|
+
},{"./":3,"object-keys":15}],2:[function(require,module,exports){
|
14
|
+
'use strict';
|
15
|
+
|
16
|
+
// modified from https://github.com/es-shims/es6-shim
|
17
|
+
var objectKeys = require('object-keys');
|
18
|
+
var hasSymbols = require('has-symbols/shams')();
|
19
|
+
var callBound = require('call-bind/callBound');
|
20
|
+
var toObject = Object;
|
21
|
+
var $push = callBound('Array.prototype.push');
|
22
|
+
var $propIsEnumerable = callBound('Object.prototype.propertyIsEnumerable');
|
23
|
+
var originalGetSymbols = hasSymbols ? Object.getOwnPropertySymbols : null;
|
24
|
+
|
25
|
+
// eslint-disable-next-line no-unused-vars
|
26
|
+
module.exports = function assign(target, source1) {
|
27
|
+
if (target == null) { throw new TypeError('target must be an object'); }
|
28
|
+
var to = toObject(target); // step 1
|
29
|
+
if (arguments.length === 1) {
|
30
|
+
return to; // step 2
|
31
|
+
}
|
32
|
+
for (var s = 1; s < arguments.length; ++s) {
|
33
|
+
var from = toObject(arguments[s]); // step 3.a.i
|
34
|
+
|
35
|
+
// step 3.a.ii:
|
36
|
+
var keys = objectKeys(from);
|
37
|
+
var getSymbols = hasSymbols && (Object.getOwnPropertySymbols || originalGetSymbols);
|
38
|
+
if (getSymbols) {
|
39
|
+
var syms = getSymbols(from);
|
40
|
+
for (var j = 0; j < syms.length; ++j) {
|
41
|
+
var key = syms[j];
|
42
|
+
if ($propIsEnumerable(from, key)) {
|
43
|
+
$push(keys, key);
|
44
|
+
}
|
45
|
+
}
|
46
|
+
}
|
47
|
+
|
48
|
+
// step 3.a.iii:
|
49
|
+
for (var i = 0; i < keys.length; ++i) {
|
50
|
+
var nextKey = keys[i];
|
51
|
+
if ($propIsEnumerable(from, nextKey)) { // step 3.a.iii.2
|
52
|
+
var propValue = from[nextKey]; // step 3.a.iii.2.a
|
53
|
+
to[nextKey] = propValue; // step 3.a.iii.2.b
|
54
|
+
}
|
55
|
+
}
|
56
|
+
}
|
57
|
+
|
58
|
+
return to; // step 4
|
59
|
+
};
|
60
|
+
|
61
|
+
},{"call-bind/callBound":4,"has-symbols/shams":12,"object-keys":15}],3:[function(require,module,exports){
|
62
|
+
'use strict';
|
63
|
+
|
64
|
+
var defineProperties = require('define-properties');
|
65
|
+
var callBind = require('call-bind');
|
66
|
+
|
67
|
+
var implementation = require('./implementation');
|
68
|
+
var getPolyfill = require('./polyfill');
|
69
|
+
var shim = require('./shim');
|
70
|
+
|
71
|
+
var polyfill = callBind.apply(getPolyfill());
|
72
|
+
// eslint-disable-next-line no-unused-vars
|
73
|
+
var bound = function assign(target, source1) {
|
74
|
+
return polyfill(Object, arguments);
|
75
|
+
};
|
76
|
+
|
77
|
+
defineProperties(bound, {
|
78
|
+
getPolyfill: getPolyfill,
|
79
|
+
implementation: implementation,
|
80
|
+
shim: shim
|
81
|
+
});
|
82
|
+
|
83
|
+
module.exports = bound;
|
84
|
+
|
85
|
+
},{"./implementation":2,"./polyfill":17,"./shim":18,"call-bind":5,"define-properties":6}],4:[function(require,module,exports){
|
86
|
+
'use strict';
|
87
|
+
|
88
|
+
var GetIntrinsic = require('get-intrinsic');
|
89
|
+
|
90
|
+
var callBind = require('./');
|
91
|
+
|
92
|
+
var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));
|
93
|
+
|
94
|
+
module.exports = function callBoundIntrinsic(name, allowMissing) {
|
95
|
+
var intrinsic = GetIntrinsic(name, !!allowMissing);
|
96
|
+
if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
|
97
|
+
return callBind(intrinsic);
|
98
|
+
}
|
99
|
+
return intrinsic;
|
100
|
+
};
|
101
|
+
|
102
|
+
},{"./":5,"get-intrinsic":9}],5:[function(require,module,exports){
|
103
|
+
'use strict';
|
104
|
+
|
105
|
+
var bind = require('function-bind');
|
106
|
+
var GetIntrinsic = require('get-intrinsic');
|
107
|
+
|
108
|
+
var $apply = GetIntrinsic('%Function.prototype.apply%');
|
109
|
+
var $call = GetIntrinsic('%Function.prototype.call%');
|
110
|
+
var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);
|
111
|
+
|
112
|
+
var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);
|
113
|
+
var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
|
114
|
+
var $max = GetIntrinsic('%Math.max%');
|
115
|
+
|
116
|
+
if ($defineProperty) {
|
117
|
+
try {
|
118
|
+
$defineProperty({}, 'a', { value: 1 });
|
119
|
+
} catch (e) {
|
120
|
+
// IE 8 has a broken defineProperty
|
121
|
+
$defineProperty = null;
|
122
|
+
}
|
123
|
+
}
|
124
|
+
|
125
|
+
module.exports = function callBind(originalFunction) {
|
126
|
+
var func = $reflectApply(bind, $call, arguments);
|
127
|
+
if ($gOPD && $defineProperty) {
|
128
|
+
var desc = $gOPD(func, 'length');
|
129
|
+
if (desc.configurable) {
|
130
|
+
// original length, plus the receiver, minus any additional arguments (after the receiver)
|
131
|
+
$defineProperty(
|
132
|
+
func,
|
133
|
+
'length',
|
134
|
+
{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }
|
135
|
+
);
|
136
|
+
}
|
137
|
+
}
|
138
|
+
return func;
|
139
|
+
};
|
140
|
+
|
141
|
+
var applyBind = function applyBind() {
|
142
|
+
return $reflectApply(bind, $apply, arguments);
|
143
|
+
};
|
144
|
+
|
145
|
+
if ($defineProperty) {
|
146
|
+
$defineProperty(module.exports, 'apply', { value: applyBind });
|
147
|
+
} else {
|
148
|
+
module.exports.apply = applyBind;
|
149
|
+
}
|
150
|
+
|
151
|
+
},{"function-bind":8,"get-intrinsic":9}],6:[function(require,module,exports){
|
152
|
+
'use strict';
|
153
|
+
|
154
|
+
var keys = require('object-keys');
|
155
|
+
var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
|
156
|
+
|
157
|
+
var toStr = Object.prototype.toString;
|
158
|
+
var concat = Array.prototype.concat;
|
159
|
+
var origDefineProperty = Object.defineProperty;
|
160
|
+
|
161
|
+
var isFunction = function (fn) {
|
162
|
+
return typeof fn === 'function' && toStr.call(fn) === '[object Function]';
|
163
|
+
};
|
164
|
+
|
165
|
+
var hasPropertyDescriptors = require('has-property-descriptors')();
|
166
|
+
|
167
|
+
var supportsDescriptors = origDefineProperty && hasPropertyDescriptors;
|
168
|
+
|
169
|
+
var defineProperty = function (object, name, value, predicate) {
|
170
|
+
if (name in object && (!isFunction(predicate) || !predicate())) {
|
171
|
+
return;
|
172
|
+
}
|
173
|
+
if (supportsDescriptors) {
|
174
|
+
origDefineProperty(object, name, {
|
175
|
+
configurable: true,
|
176
|
+
enumerable: false,
|
177
|
+
value: value,
|
178
|
+
writable: true
|
179
|
+
});
|
180
|
+
} else {
|
181
|
+
object[name] = value; // eslint-disable-line no-param-reassign
|
182
|
+
}
|
183
|
+
};
|
184
|
+
|
185
|
+
var defineProperties = function (object, map) {
|
186
|
+
var predicates = arguments.length > 2 ? arguments[2] : {};
|
187
|
+
var props = keys(map);
|
188
|
+
if (hasSymbols) {
|
189
|
+
props = concat.call(props, Object.getOwnPropertySymbols(map));
|
190
|
+
}
|
191
|
+
for (var i = 0; i < props.length; i += 1) {
|
192
|
+
defineProperty(object, props[i], map[props[i]], predicates[props[i]]);
|
193
|
+
}
|
194
|
+
};
|
195
|
+
|
196
|
+
defineProperties.supportsDescriptors = !!supportsDescriptors;
|
197
|
+
|
198
|
+
module.exports = defineProperties;
|
199
|
+
|
200
|
+
},{"has-property-descriptors":10,"object-keys":15}],7:[function(require,module,exports){
|
201
|
+
'use strict';
|
202
|
+
|
203
|
+
/* eslint no-invalid-this: 1 */
|
204
|
+
|
205
|
+
var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
|
206
|
+
var slice = Array.prototype.slice;
|
207
|
+
var toStr = Object.prototype.toString;
|
208
|
+
var funcType = '[object Function]';
|
209
|
+
|
210
|
+
module.exports = function bind(that) {
|
211
|
+
var target = this;
|
212
|
+
if (typeof target !== 'function' || toStr.call(target) !== funcType) {
|
213
|
+
throw new TypeError(ERROR_MESSAGE + target);
|
214
|
+
}
|
215
|
+
var args = slice.call(arguments, 1);
|
216
|
+
|
217
|
+
var bound;
|
218
|
+
var binder = function () {
|
219
|
+
if (this instanceof bound) {
|
220
|
+
var result = target.apply(
|
221
|
+
this,
|
222
|
+
args.concat(slice.call(arguments))
|
223
|
+
);
|
224
|
+
if (Object(result) === result) {
|
225
|
+
return result;
|
226
|
+
}
|
227
|
+
return this;
|
228
|
+
} else {
|
229
|
+
return target.apply(
|
230
|
+
that,
|
231
|
+
args.concat(slice.call(arguments))
|
232
|
+
);
|
233
|
+
}
|
234
|
+
};
|
235
|
+
|
236
|
+
var boundLength = Math.max(0, target.length - args.length);
|
237
|
+
var boundArgs = [];
|
238
|
+
for (var i = 0; i < boundLength; i++) {
|
239
|
+
boundArgs.push('$' + i);
|
240
|
+
}
|
241
|
+
|
242
|
+
bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);
|
243
|
+
|
244
|
+
if (target.prototype) {
|
245
|
+
var Empty = function Empty() {};
|
246
|
+
Empty.prototype = target.prototype;
|
247
|
+
bound.prototype = new Empty();
|
248
|
+
Empty.prototype = null;
|
249
|
+
}
|
250
|
+
|
251
|
+
return bound;
|
252
|
+
};
|
253
|
+
|
254
|
+
},{}],8:[function(require,module,exports){
|
255
|
+
'use strict';
|
256
|
+
|
257
|
+
var implementation = require('./implementation');
|
258
|
+
|
259
|
+
module.exports = Function.prototype.bind || implementation;
|
260
|
+
|
261
|
+
},{"./implementation":7}],9:[function(require,module,exports){
|
262
|
+
'use strict';
|
263
|
+
|
264
|
+
var undefined;
|
265
|
+
|
266
|
+
var $SyntaxError = SyntaxError;
|
267
|
+
var $Function = Function;
|
268
|
+
var $TypeError = TypeError;
|
269
|
+
|
270
|
+
// eslint-disable-next-line consistent-return
|
271
|
+
var getEvalledConstructor = function (expressionSyntax) {
|
272
|
+
try {
|
273
|
+
return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
|
274
|
+
} catch (e) {}
|
275
|
+
};
|
276
|
+
|
277
|
+
var $gOPD = Object.getOwnPropertyDescriptor;
|
278
|
+
if ($gOPD) {
|
279
|
+
try {
|
280
|
+
$gOPD({}, '');
|
281
|
+
} catch (e) {
|
282
|
+
$gOPD = null; // this is IE 8, which has a broken gOPD
|
283
|
+
}
|
284
|
+
}
|
285
|
+
|
286
|
+
var throwTypeError = function () {
|
287
|
+
throw new $TypeError();
|
288
|
+
};
|
289
|
+
var ThrowTypeError = $gOPD
|
290
|
+
? (function () {
|
291
|
+
try {
|
292
|
+
// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
|
293
|
+
arguments.callee; // IE 8 does not throw here
|
294
|
+
return throwTypeError;
|
295
|
+
} catch (calleeThrows) {
|
296
|
+
try {
|
297
|
+
// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
|
298
|
+
return $gOPD(arguments, 'callee').get;
|
299
|
+
} catch (gOPDthrows) {
|
300
|
+
return throwTypeError;
|
301
|
+
}
|
302
|
+
}
|
303
|
+
}())
|
304
|
+
: throwTypeError;
|
305
|
+
|
306
|
+
var hasSymbols = require('has-symbols')();
|
307
|
+
|
308
|
+
var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto
|
309
|
+
|
310
|
+
var needsEval = {};
|
311
|
+
|
312
|
+
var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array);
|
313
|
+
|
314
|
+
var INTRINSICS = {
|
315
|
+
'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,
|
316
|
+
'%Array%': Array,
|
317
|
+
'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,
|
318
|
+
'%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined,
|
319
|
+
'%AsyncFromSyncIteratorPrototype%': undefined,
|
320
|
+
'%AsyncFunction%': needsEval,
|
321
|
+
'%AsyncGenerator%': needsEval,
|
322
|
+
'%AsyncGeneratorFunction%': needsEval,
|
323
|
+
'%AsyncIteratorPrototype%': needsEval,
|
324
|
+
'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,
|
325
|
+
'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,
|
326
|
+
'%Boolean%': Boolean,
|
327
|
+
'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,
|
328
|
+
'%Date%': Date,
|
329
|
+
'%decodeURI%': decodeURI,
|
330
|
+
'%decodeURIComponent%': decodeURIComponent,
|
331
|
+
'%encodeURI%': encodeURI,
|
332
|
+
'%encodeURIComponent%': encodeURIComponent,
|
333
|
+
'%Error%': Error,
|
334
|
+
'%eval%': eval, // eslint-disable-line no-eval
|
335
|
+
'%EvalError%': EvalError,
|
336
|
+
'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,
|
337
|
+
'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,
|
338
|
+
'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,
|
339
|
+
'%Function%': $Function,
|
340
|
+
'%GeneratorFunction%': needsEval,
|
341
|
+
'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,
|
342
|
+
'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,
|
343
|
+
'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,
|
344
|
+
'%isFinite%': isFinite,
|
345
|
+
'%isNaN%': isNaN,
|
346
|
+
'%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined,
|
347
|
+
'%JSON%': typeof JSON === 'object' ? JSON : undefined,
|
348
|
+
'%Map%': typeof Map === 'undefined' ? undefined : Map,
|
349
|
+
'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()),
|
350
|
+
'%Math%': Math,
|
351
|
+
'%Number%': Number,
|
352
|
+
'%Object%': Object,
|
353
|
+
'%parseFloat%': parseFloat,
|
354
|
+
'%parseInt%': parseInt,
|
355
|
+
'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,
|
356
|
+
'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,
|
357
|
+
'%RangeError%': RangeError,
|
358
|
+
'%ReferenceError%': ReferenceError,
|
359
|
+
'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,
|
360
|
+
'%RegExp%': RegExp,
|
361
|
+
'%Set%': typeof Set === 'undefined' ? undefined : Set,
|
362
|
+
'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()),
|
363
|
+
'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,
|
364
|
+
'%String%': String,
|
365
|
+
'%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined,
|
366
|
+
'%Symbol%': hasSymbols ? Symbol : undefined,
|
367
|
+
'%SyntaxError%': $SyntaxError,
|
368
|
+
'%ThrowTypeError%': ThrowTypeError,
|
369
|
+
'%TypedArray%': TypedArray,
|
370
|
+
'%TypeError%': $TypeError,
|
371
|
+
'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,
|
372
|
+
'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,
|
373
|
+
'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,
|
374
|
+
'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,
|
375
|
+
'%URIError%': URIError,
|
376
|
+
'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,
|
377
|
+
'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,
|
378
|
+
'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet
|
379
|
+
};
|
380
|
+
|
381
|
+
var doEval = function doEval(name) {
|
382
|
+
var value;
|
383
|
+
if (name === '%AsyncFunction%') {
|
384
|
+
value = getEvalledConstructor('async function () {}');
|
385
|
+
} else if (name === '%GeneratorFunction%') {
|
386
|
+
value = getEvalledConstructor('function* () {}');
|
387
|
+
} else if (name === '%AsyncGeneratorFunction%') {
|
388
|
+
value = getEvalledConstructor('async function* () {}');
|
389
|
+
} else if (name === '%AsyncGenerator%') {
|
390
|
+
var fn = doEval('%AsyncGeneratorFunction%');
|
391
|
+
if (fn) {
|
392
|
+
value = fn.prototype;
|
393
|
+
}
|
394
|
+
} else if (name === '%AsyncIteratorPrototype%') {
|
395
|
+
var gen = doEval('%AsyncGenerator%');
|
396
|
+
if (gen) {
|
397
|
+
value = getProto(gen.prototype);
|
398
|
+
}
|
399
|
+
}
|
400
|
+
|
401
|
+
INTRINSICS[name] = value;
|
402
|
+
|
403
|
+
return value;
|
404
|
+
};
|
405
|
+
|
406
|
+
var LEGACY_ALIASES = {
|
407
|
+
'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
|
408
|
+
'%ArrayPrototype%': ['Array', 'prototype'],
|
409
|
+
'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
|
410
|
+
'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
|
411
|
+
'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
|
412
|
+
'%ArrayProto_values%': ['Array', 'prototype', 'values'],
|
413
|
+
'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
|
414
|
+
'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
|
415
|
+
'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
|
416
|
+
'%BooleanPrototype%': ['Boolean', 'prototype'],
|
417
|
+
'%DataViewPrototype%': ['DataView', 'prototype'],
|
418
|
+
'%DatePrototype%': ['Date', 'prototype'],
|
419
|
+
'%ErrorPrototype%': ['Error', 'prototype'],
|
420
|
+
'%EvalErrorPrototype%': ['EvalError', 'prototype'],
|
421
|
+
'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
|
422
|
+
'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
|
423
|
+
'%FunctionPrototype%': ['Function', 'prototype'],
|
424
|
+
'%Generator%': ['GeneratorFunction', 'prototype'],
|
425
|
+
'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
|
426
|
+
'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
|
427
|
+
'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
|
428
|
+
'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
|
429
|
+
'%JSONParse%': ['JSON', 'parse'],
|
430
|
+
'%JSONStringify%': ['JSON', 'stringify'],
|
431
|
+
'%MapPrototype%': ['Map', 'prototype'],
|
432
|
+
'%NumberPrototype%': ['Number', 'prototype'],
|
433
|
+
'%ObjectPrototype%': ['Object', 'prototype'],
|
434
|
+
'%ObjProto_toString%': ['Object', 'prototype', 'toString'],
|
435
|
+
'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
|
436
|
+
'%PromisePrototype%': ['Promise', 'prototype'],
|
437
|
+
'%PromiseProto_then%': ['Promise', 'prototype', 'then'],
|
438
|
+
'%Promise_all%': ['Promise', 'all'],
|
439
|
+
'%Promise_reject%': ['Promise', 'reject'],
|
440
|
+
'%Promise_resolve%': ['Promise', 'resolve'],
|
441
|
+
'%RangeErrorPrototype%': ['RangeError', 'prototype'],
|
442
|
+
'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
|
443
|
+
'%RegExpPrototype%': ['RegExp', 'prototype'],
|
444
|
+
'%SetPrototype%': ['Set', 'prototype'],
|
445
|
+
'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
|
446
|
+
'%StringPrototype%': ['String', 'prototype'],
|
447
|
+
'%SymbolPrototype%': ['Symbol', 'prototype'],
|
448
|
+
'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
|
449
|
+
'%TypedArrayPrototype%': ['TypedArray', 'prototype'],
|
450
|
+
'%TypeErrorPrototype%': ['TypeError', 'prototype'],
|
451
|
+
'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
|
452
|
+
'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
|
453
|
+
'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
|
454
|
+
'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
|
455
|
+
'%URIErrorPrototype%': ['URIError', 'prototype'],
|
456
|
+
'%WeakMapPrototype%': ['WeakMap', 'prototype'],
|
457
|
+
'%WeakSetPrototype%': ['WeakSet', 'prototype']
|
458
|
+
};
|
459
|
+
|
460
|
+
var bind = require('function-bind');
|
461
|
+
var hasOwn = require('has');
|
462
|
+
var $concat = bind.call(Function.call, Array.prototype.concat);
|
463
|
+
var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
|
464
|
+
var $replace = bind.call(Function.call, String.prototype.replace);
|
465
|
+
var $strSlice = bind.call(Function.call, String.prototype.slice);
|
466
|
+
|
467
|
+
/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
|
468
|
+
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
|
469
|
+
var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
|
470
|
+
var stringToPath = function stringToPath(string) {
|
471
|
+
var first = $strSlice(string, 0, 1);
|
472
|
+
var last = $strSlice(string, -1);
|
473
|
+
if (first === '%' && last !== '%') {
|
474
|
+
throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`');
|
475
|
+
} else if (last === '%' && first !== '%') {
|
476
|
+
throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`');
|
477
|
+
}
|
478
|
+
var result = [];
|
479
|
+
$replace(string, rePropName, function (match, number, quote, subString) {
|
480
|
+
result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;
|
481
|
+
});
|
482
|
+
return result;
|
483
|
+
};
|
484
|
+
/* end adaptation */
|
485
|
+
|
486
|
+
var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
|
487
|
+
var intrinsicName = name;
|
488
|
+
var alias;
|
489
|
+
if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
|
490
|
+
alias = LEGACY_ALIASES[intrinsicName];
|
491
|
+
intrinsicName = '%' + alias[0] + '%';
|
492
|
+
}
|
493
|
+
|
494
|
+
if (hasOwn(INTRINSICS, intrinsicName)) {
|
495
|
+
var value = INTRINSICS[intrinsicName];
|
496
|
+
if (value === needsEval) {
|
497
|
+
value = doEval(intrinsicName);
|
498
|
+
}
|
499
|
+
if (typeof value === 'undefined' && !allowMissing) {
|
500
|
+
throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
|
501
|
+
}
|
502
|
+
|
503
|
+
return {
|
504
|
+
alias: alias,
|
505
|
+
name: intrinsicName,
|
506
|
+
value: value
|
507
|
+
};
|
508
|
+
}
|
509
|
+
|
510
|
+
throw new $SyntaxError('intrinsic ' + name + ' does not exist!');
|
511
|
+
};
|
512
|
+
|
513
|
+
module.exports = function GetIntrinsic(name, allowMissing) {
|
514
|
+
if (typeof name !== 'string' || name.length === 0) {
|
515
|
+
throw new $TypeError('intrinsic name must be a non-empty string');
|
516
|
+
}
|
517
|
+
if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
|
518
|
+
throw new $TypeError('"allowMissing" argument must be a boolean');
|
519
|
+
}
|
520
|
+
|
521
|
+
var parts = stringToPath(name);
|
522
|
+
var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
|
523
|
+
|
524
|
+
var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
|
525
|
+
var intrinsicRealName = intrinsic.name;
|
526
|
+
var value = intrinsic.value;
|
527
|
+
var skipFurtherCaching = false;
|
528
|
+
|
529
|
+
var alias = intrinsic.alias;
|
530
|
+
if (alias) {
|
531
|
+
intrinsicBaseName = alias[0];
|
532
|
+
$spliceApply(parts, $concat([0, 1], alias));
|
533
|
+
}
|
534
|
+
|
535
|
+
for (var i = 1, isOwn = true; i < parts.length; i += 1) {
|
536
|
+
var part = parts[i];
|
537
|
+
var first = $strSlice(part, 0, 1);
|
538
|
+
var last = $strSlice(part, -1);
|
539
|
+
if (
|
540
|
+
(
|
541
|
+
(first === '"' || first === "'" || first === '`')
|
542
|
+
|| (last === '"' || last === "'" || last === '`')
|
543
|
+
)
|
544
|
+
&& first !== last
|
545
|
+
) {
|
546
|
+
throw new $SyntaxError('property names with quotes must have matching quotes');
|
547
|
+
}
|
548
|
+
if (part === 'constructor' || !isOwn) {
|
549
|
+
skipFurtherCaching = true;
|
550
|
+
}
|
551
|
+
|
552
|
+
intrinsicBaseName += '.' + part;
|
553
|
+
intrinsicRealName = '%' + intrinsicBaseName + '%';
|
554
|
+
|
555
|
+
if (hasOwn(INTRINSICS, intrinsicRealName)) {
|
556
|
+
value = INTRINSICS[intrinsicRealName];
|
557
|
+
} else if (value != null) {
|
558
|
+
if (!(part in value)) {
|
559
|
+
if (!allowMissing) {
|
560
|
+
throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');
|
561
|
+
}
|
562
|
+
return void undefined;
|
563
|
+
}
|
564
|
+
if ($gOPD && (i + 1) >= parts.length) {
|
565
|
+
var desc = $gOPD(value, part);
|
566
|
+
isOwn = !!desc;
|
567
|
+
|
568
|
+
// By convention, when a data property is converted to an accessor
|
569
|
+
// property to emulate a data property that does not suffer from
|
570
|
+
// the override mistake, that accessor's getter is marked with
|
571
|
+
// an `originalValue` property. Here, when we detect this, we
|
572
|
+
// uphold the illusion by pretending to see that original data
|
573
|
+
// property, i.e., returning the value rather than the getter
|
574
|
+
// itself.
|
575
|
+
if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
|
576
|
+
value = desc.get;
|
577
|
+
} else {
|
578
|
+
value = value[part];
|
579
|
+
}
|
580
|
+
} else {
|
581
|
+
isOwn = hasOwn(value, part);
|
582
|
+
value = value[part];
|
583
|
+
}
|
584
|
+
|
585
|
+
if (isOwn && !skipFurtherCaching) {
|
586
|
+
INTRINSICS[intrinsicRealName] = value;
|
587
|
+
}
|
588
|
+
}
|
589
|
+
}
|
590
|
+
return value;
|
591
|
+
};
|
592
|
+
|
593
|
+
},{"function-bind":8,"has":13,"has-symbols":11}],10:[function(require,module,exports){
|
594
|
+
'use strict';
|
595
|
+
|
596
|
+
var GetIntrinsic = require('get-intrinsic');
|
597
|
+
|
598
|
+
var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
|
599
|
+
|
600
|
+
var hasPropertyDescriptors = function hasPropertyDescriptors() {
|
601
|
+
if ($defineProperty) {
|
602
|
+
try {
|
603
|
+
$defineProperty({}, 'a', { value: 1 });
|
604
|
+
return true;
|
605
|
+
} catch (e) {
|
606
|
+
// IE 8 has a broken defineProperty
|
607
|
+
return false;
|
608
|
+
}
|
609
|
+
}
|
610
|
+
return false;
|
611
|
+
};
|
612
|
+
|
613
|
+
hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
|
614
|
+
// node v0.6 has a bug where array lengths can be Set but not Defined
|
615
|
+
if (!hasPropertyDescriptors()) {
|
616
|
+
return null;
|
617
|
+
}
|
618
|
+
try {
|
619
|
+
return $defineProperty([], 'length', { value: 1 }).length !== 1;
|
620
|
+
} catch (e) {
|
621
|
+
// In Firefox 4-22, defining length on an array throws an exception.
|
622
|
+
return true;
|
623
|
+
}
|
624
|
+
};
|
625
|
+
|
626
|
+
module.exports = hasPropertyDescriptors;
|
627
|
+
|
628
|
+
},{"get-intrinsic":9}],11:[function(require,module,exports){
|
629
|
+
'use strict';
|
630
|
+
|
631
|
+
var origSymbol = typeof Symbol !== 'undefined' && Symbol;
|
632
|
+
var hasSymbolSham = require('./shams');
|
633
|
+
|
634
|
+
module.exports = function hasNativeSymbols() {
|
635
|
+
if (typeof origSymbol !== 'function') { return false; }
|
636
|
+
if (typeof Symbol !== 'function') { return false; }
|
637
|
+
if (typeof origSymbol('foo') !== 'symbol') { return false; }
|
638
|
+
if (typeof Symbol('bar') !== 'symbol') { return false; }
|
639
|
+
|
640
|
+
return hasSymbolSham();
|
641
|
+
};
|
642
|
+
|
643
|
+
},{"./shams":12}],12:[function(require,module,exports){
|
644
|
+
'use strict';
|
645
|
+
|
646
|
+
/* eslint complexity: [2, 18], max-statements: [2, 33] */
|
647
|
+
module.exports = function hasSymbols() {
|
648
|
+
if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
|
649
|
+
if (typeof Symbol.iterator === 'symbol') { return true; }
|
650
|
+
|
651
|
+
var obj = {};
|
652
|
+
var sym = Symbol('test');
|
653
|
+
var symObj = Object(sym);
|
654
|
+
if (typeof sym === 'string') { return false; }
|
655
|
+
|
656
|
+
if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
|
657
|
+
if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
|
658
|
+
|
659
|
+
// temp disabled per https://github.com/ljharb/object.assign/issues/17
|
660
|
+
// if (sym instanceof Symbol) { return false; }
|
661
|
+
// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
|
662
|
+
// if (!(symObj instanceof Symbol)) { return false; }
|
663
|
+
|
664
|
+
// if (typeof Symbol.prototype.toString !== 'function') { return false; }
|
665
|
+
// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
|
666
|
+
|
667
|
+
var symVal = 42;
|
668
|
+
obj[sym] = symVal;
|
669
|
+
for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
|
670
|
+
if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
|
671
|
+
|
672
|
+
if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
|
673
|
+
|
674
|
+
var syms = Object.getOwnPropertySymbols(obj);
|
675
|
+
if (syms.length !== 1 || syms[0] !== sym) { return false; }
|
676
|
+
|
677
|
+
if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
|
678
|
+
|
679
|
+
if (typeof Object.getOwnPropertyDescriptor === 'function') {
|
680
|
+
var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
|
681
|
+
if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
|
682
|
+
}
|
683
|
+
|
684
|
+
return true;
|
685
|
+
};
|
686
|
+
|
687
|
+
},{}],13:[function(require,module,exports){
|
688
|
+
'use strict';
|
689
|
+
|
690
|
+
var bind = require('function-bind');
|
691
|
+
|
692
|
+
module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);
|
693
|
+
|
694
|
+
},{"function-bind":8}],14:[function(require,module,exports){
|
695
|
+
'use strict';
|
696
|
+
|
697
|
+
var keysShim;
|
698
|
+
if (!Object.keys) {
|
699
|
+
// modified from https://github.com/es-shims/es5-shim
|
700
|
+
var has = Object.prototype.hasOwnProperty;
|
701
|
+
var toStr = Object.prototype.toString;
|
702
|
+
var isArgs = require('./isArguments'); // eslint-disable-line global-require
|
703
|
+
var isEnumerable = Object.prototype.propertyIsEnumerable;
|
704
|
+
var hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');
|
705
|
+
var hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');
|
706
|
+
var dontEnums = [
|
707
|
+
'toString',
|
708
|
+
'toLocaleString',
|
709
|
+
'valueOf',
|
710
|
+
'hasOwnProperty',
|
711
|
+
'isPrototypeOf',
|
712
|
+
'propertyIsEnumerable',
|
713
|
+
'constructor'
|
714
|
+
];
|
715
|
+
var equalsConstructorPrototype = function (o) {
|
716
|
+
var ctor = o.constructor;
|
717
|
+
return ctor && ctor.prototype === o;
|
718
|
+
};
|
719
|
+
var excludedKeys = {
|
720
|
+
$applicationCache: true,
|
721
|
+
$console: true,
|
722
|
+
$external: true,
|
723
|
+
$frame: true,
|
724
|
+
$frameElement: true,
|
725
|
+
$frames: true,
|
726
|
+
$innerHeight: true,
|
727
|
+
$innerWidth: true,
|
728
|
+
$onmozfullscreenchange: true,
|
729
|
+
$onmozfullscreenerror: true,
|
730
|
+
$outerHeight: true,
|
731
|
+
$outerWidth: true,
|
732
|
+
$pageXOffset: true,
|
733
|
+
$pageYOffset: true,
|
734
|
+
$parent: true,
|
735
|
+
$scrollLeft: true,
|
736
|
+
$scrollTop: true,
|
737
|
+
$scrollX: true,
|
738
|
+
$scrollY: true,
|
739
|
+
$self: true,
|
740
|
+
$webkitIndexedDB: true,
|
741
|
+
$webkitStorageInfo: true,
|
742
|
+
$window: true
|
743
|
+
};
|
744
|
+
var hasAutomationEqualityBug = (function () {
|
745
|
+
/* global window */
|
746
|
+
if (typeof window === 'undefined') { return false; }
|
747
|
+
for (var k in window) {
|
748
|
+
try {
|
749
|
+
if (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {
|
750
|
+
try {
|
751
|
+
equalsConstructorPrototype(window[k]);
|
752
|
+
} catch (e) {
|
753
|
+
return true;
|
754
|
+
}
|
755
|
+
}
|
756
|
+
} catch (e) {
|
757
|
+
return true;
|
758
|
+
}
|
759
|
+
}
|
760
|
+
return false;
|
761
|
+
}());
|
762
|
+
var equalsConstructorPrototypeIfNotBuggy = function (o) {
|
763
|
+
/* global window */
|
764
|
+
if (typeof window === 'undefined' || !hasAutomationEqualityBug) {
|
765
|
+
return equalsConstructorPrototype(o);
|
766
|
+
}
|
767
|
+
try {
|
768
|
+
return equalsConstructorPrototype(o);
|
769
|
+
} catch (e) {
|
770
|
+
return false;
|
771
|
+
}
|
772
|
+
};
|
773
|
+
|
774
|
+
keysShim = function keys(object) {
|
775
|
+
var isObject = object !== null && typeof object === 'object';
|
776
|
+
var isFunction = toStr.call(object) === '[object Function]';
|
777
|
+
var isArguments = isArgs(object);
|
778
|
+
var isString = isObject && toStr.call(object) === '[object String]';
|
779
|
+
var theKeys = [];
|
780
|
+
|
781
|
+
if (!isObject && !isFunction && !isArguments) {
|
782
|
+
throw new TypeError('Object.keys called on a non-object');
|
783
|
+
}
|
784
|
+
|
785
|
+
var skipProto = hasProtoEnumBug && isFunction;
|
786
|
+
if (isString && object.length > 0 && !has.call(object, 0)) {
|
787
|
+
for (var i = 0; i < object.length; ++i) {
|
788
|
+
theKeys.push(String(i));
|
789
|
+
}
|
790
|
+
}
|
791
|
+
|
792
|
+
if (isArguments && object.length > 0) {
|
793
|
+
for (var j = 0; j < object.length; ++j) {
|
794
|
+
theKeys.push(String(j));
|
795
|
+
}
|
796
|
+
} else {
|
797
|
+
for (var name in object) {
|
798
|
+
if (!(skipProto && name === 'prototype') && has.call(object, name)) {
|
799
|
+
theKeys.push(String(name));
|
800
|
+
}
|
801
|
+
}
|
802
|
+
}
|
803
|
+
|
804
|
+
if (hasDontEnumBug) {
|
805
|
+
var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);
|
806
|
+
|
807
|
+
for (var k = 0; k < dontEnums.length; ++k) {
|
808
|
+
if (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {
|
809
|
+
theKeys.push(dontEnums[k]);
|
810
|
+
}
|
811
|
+
}
|
812
|
+
}
|
813
|
+
return theKeys;
|
814
|
+
};
|
815
|
+
}
|
816
|
+
module.exports = keysShim;
|
817
|
+
|
818
|
+
},{"./isArguments":16}],15:[function(require,module,exports){
|
819
|
+
'use strict';
|
820
|
+
|
821
|
+
var slice = Array.prototype.slice;
|
822
|
+
var isArgs = require('./isArguments');
|
823
|
+
|
824
|
+
var origKeys = Object.keys;
|
825
|
+
var keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation');
|
826
|
+
|
827
|
+
var originalKeys = Object.keys;
|
828
|
+
|
829
|
+
keysShim.shim = function shimObjectKeys() {
|
830
|
+
if (Object.keys) {
|
831
|
+
var keysWorksWithArguments = (function () {
|
832
|
+
// Safari 5.0 bug
|
833
|
+
var args = Object.keys(arguments);
|
834
|
+
return args && args.length === arguments.length;
|
835
|
+
}(1, 2));
|
836
|
+
if (!keysWorksWithArguments) {
|
837
|
+
Object.keys = function keys(object) { // eslint-disable-line func-name-matching
|
838
|
+
if (isArgs(object)) {
|
839
|
+
return originalKeys(slice.call(object));
|
840
|
+
}
|
841
|
+
return originalKeys(object);
|
842
|
+
};
|
843
|
+
}
|
844
|
+
} else {
|
845
|
+
Object.keys = keysShim;
|
846
|
+
}
|
847
|
+
return Object.keys || keysShim;
|
848
|
+
};
|
849
|
+
|
850
|
+
module.exports = keysShim;
|
851
|
+
|
852
|
+
},{"./implementation":14,"./isArguments":16}],16:[function(require,module,exports){
|
853
|
+
'use strict';
|
854
|
+
|
855
|
+
var toStr = Object.prototype.toString;
|
856
|
+
|
857
|
+
module.exports = function isArguments(value) {
|
858
|
+
var str = toStr.call(value);
|
859
|
+
var isArgs = str === '[object Arguments]';
|
860
|
+
if (!isArgs) {
|
861
|
+
isArgs = str !== '[object Array]' &&
|
862
|
+
value !== null &&
|
863
|
+
typeof value === 'object' &&
|
864
|
+
typeof value.length === 'number' &&
|
865
|
+
value.length >= 0 &&
|
866
|
+
toStr.call(value.callee) === '[object Function]';
|
867
|
+
}
|
868
|
+
return isArgs;
|
869
|
+
};
|
870
|
+
|
871
|
+
},{}],17:[function(require,module,exports){
|
872
|
+
'use strict';
|
873
|
+
|
874
|
+
var implementation = require('./implementation');
|
875
|
+
|
876
|
+
var lacksProperEnumerationOrder = function () {
|
877
|
+
if (!Object.assign) {
|
878
|
+
return false;
|
879
|
+
}
|
880
|
+
/*
|
881
|
+
* v8, specifically in node 4.x, has a bug with incorrect property enumeration order
|
882
|
+
* note: this does not detect the bug unless there's 20 characters
|
883
|
+
*/
|
884
|
+
var str = 'abcdefghijklmnopqrst';
|
885
|
+
var letters = str.split('');
|
886
|
+
var map = {};
|
887
|
+
for (var i = 0; i < letters.length; ++i) {
|
888
|
+
map[letters[i]] = letters[i];
|
889
|
+
}
|
890
|
+
var obj = Object.assign({}, map);
|
891
|
+
var actual = '';
|
892
|
+
for (var k in obj) {
|
893
|
+
actual += k;
|
894
|
+
}
|
895
|
+
return str !== actual;
|
896
|
+
};
|
897
|
+
|
898
|
+
var assignHasPendingExceptions = function () {
|
899
|
+
if (!Object.assign || !Object.preventExtensions) {
|
900
|
+
return false;
|
901
|
+
}
|
902
|
+
/*
|
903
|
+
* Firefox 37 still has "pending exception" logic in its Object.assign implementation,
|
904
|
+
* which is 72% slower than our shim, and Firefox 40's native implementation.
|
905
|
+
*/
|
906
|
+
var thrower = Object.preventExtensions({ 1: 2 });
|
907
|
+
try {
|
908
|
+
Object.assign(thrower, 'xy');
|
909
|
+
} catch (e) {
|
910
|
+
return thrower[1] === 'y';
|
911
|
+
}
|
912
|
+
return false;
|
913
|
+
};
|
914
|
+
|
915
|
+
module.exports = function getPolyfill() {
|
916
|
+
if (!Object.assign) {
|
917
|
+
return implementation;
|
918
|
+
}
|
919
|
+
if (lacksProperEnumerationOrder()) {
|
920
|
+
return implementation;
|
921
|
+
}
|
922
|
+
if (assignHasPendingExceptions()) {
|
923
|
+
return implementation;
|
924
|
+
}
|
925
|
+
return Object.assign;
|
926
|
+
};
|
927
|
+
|
928
|
+
},{"./implementation":2}],18:[function(require,module,exports){
|
929
|
+
'use strict';
|
930
|
+
|
931
|
+
var define = require('define-properties');
|
932
|
+
var getPolyfill = require('./polyfill');
|
933
|
+
|
934
|
+
module.exports = function shimAssign() {
|
935
|
+
var polyfill = getPolyfill();
|
936
|
+
define(
|
937
|
+
Object,
|
938
|
+
{ assign: polyfill },
|
939
|
+
{ assign: function () { return Object.assign !== polyfill; } }
|
940
|
+
);
|
941
|
+
return polyfill;
|
942
|
+
};
|
943
|
+
|
944
|
+
},{"./polyfill":17,"define-properties":6}]},{},[1]);
|